mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Use StringView literals for all WebIDL::SimpleException
s
This commit is contained in:
parent
14d4f227f2
commit
6ce08d3f75
Notes:
sideshowbarker
2024-07-17 05:02:03 +09:00
Author: https://github.com/linusg
Commit: 6ce08d3f75
Pull-request: https://github.com/SerenityOS/serenity/pull/15831
6 changed files with 22 additions and 22 deletions
|
@ -74,11 +74,11 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
|
|||
[&](JS::Handle<Streams::ReadableStream> const& stream) -> WebIDL::ExceptionOr<void> {
|
||||
// If keepalive is true, then throw a TypeError.
|
||||
if (keepalive)
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot extract body from stream when keepalive is set" };
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot extract body from stream when keepalive is set"sv };
|
||||
|
||||
// If object is disturbed or locked, then throw a TypeError.
|
||||
if (stream->is_disturbed() || stream->is_locked())
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot extract body from disturbed or locked stream" };
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot extract body from disturbed or locked stream"sv };
|
||||
|
||||
return {};
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue