LibWeb: Make TemporaryExecutionContext take a Realm&

This commit is contained in:
Shannon Booth 2024-10-24 20:39:18 +13:00 committed by Andrew Kaster
parent f7a4d94b24
commit cc91473f4d
Notes: github-actions[bot] 2024-11-02 00:56:36 +00:00
34 changed files with 106 additions and 107 deletions

View file

@ -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());
}
}));