mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 01:12:45 +00:00
LibWeb: Make TemporaryExecutionContext take a Realm&
This commit is contained in:
parent
f7a4d94b24
commit
cc91473f4d
Notes:
github-actions[bot]
2024-11-02 00:56:36 +00:00
Author: https://github.com/shannonbooth
Commit: cc91473f4d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1955
Reviewed-by: https://github.com/ADKaster ✅
34 changed files with 106 additions and 107 deletions
|
@ -296,7 +296,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> HTMLImageElement::decode(
|
|||
return false;
|
||||
|
||||
auto exception = WebIDL::EncodingError::create(realm, "Node document not fully active"_string);
|
||||
HTML::TemporaryExecutionContext context(HTML::relevant_settings_object(*this));
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
WebIDL::reject_promise(realm, promise, exception);
|
||||
return true;
|
||||
};
|
||||
|
@ -306,7 +306,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> HTMLImageElement::decode(
|
|||
return false;
|
||||
|
||||
auto exception = WebIDL::EncodingError::create(realm, "Current request state is broken"_string);
|
||||
HTML::TemporaryExecutionContext context(HTML::relevant_settings_object(*this));
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
WebIDL::reject_promise(realm, promise, exception);
|
||||
return true;
|
||||
};
|
||||
|
@ -354,7 +354,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> HTMLImageElement::decode(
|
|||
// (Typically, this would only be violated in low-memory situations that require evicting decoded image data, or when the image is too large
|
||||
// to keep in decoded form for this period of time.)
|
||||
|
||||
HTML::TemporaryExecutionContext context(HTML::relevant_settings_object(*this));
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
WebIDL::resolve_promise(realm, promise, JS::js_undefined());
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue