diff options
author | Igor Pissolati <igo08an@hotmail.com> | 2022-04-04 10:12:19 -0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-04 14:22:16 +0100 |
commit | 5560d8a25dd380c60bddb21944aa79d1322129b9 (patch) | |
tree | 818b33f9fd074e7381fc03b478d40bc66c0e5ba6 /Userland | |
parent | 195572dd2af07dd24c6857eb262372a1aa7112eb (diff) | |
download | serenity-5560d8a25dd380c60bddb21944aa79d1322129b9.zip |
LibWeb: Use correct global object in legacy factories
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp index b657468de5..d735f17660 100644 --- a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp @@ -38,7 +38,7 @@ JS::ThrowCompletionOr<JS::Value> AudioConstructor::call() JS::ThrowCompletionOr<JS::Object*> AudioConstructor::construct(FunctionObject&) { // 1. Let document be the current global object's associated Document. - auto& window = static_cast<WindowObject&>(global_object()); + auto& window = static_cast<WindowObject&>(HTML::current_global_object()); auto& document = window.impl().associated_document(); // 2. Let audio be the result of creating an element given document, audio, and the HTML namespace. diff --git a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp index 2c0a9adf9f..6f839b1acc 100644 --- a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp @@ -38,7 +38,7 @@ JS::ThrowCompletionOr<JS::Value> ImageConstructor::call() JS::ThrowCompletionOr<JS::Object*> ImageConstructor::construct(FunctionObject&) { // 1. Let document be the current global object's associated Document. - auto& window = static_cast<WindowObject&>(global_object()); + auto& window = static_cast<WindowObject&>(HTML::current_global_object()); auto& document = window.impl().associated_document(); // 2. Let img be the result of creating an element given document, img, and the HTML namespace. |