summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-01-10 07:01:57 -0500
committerAndreas Kling <kling@serenityos.org>2023-01-10 16:08:14 +0100
commitc2939d58c71a9e8ae6afb071720ffadcbd7591c2 (patch)
tree6a4ee76cb4f74665703ae88c6a7cf0fa9f37f6a1 /Userland/Libraries/LibWeb/Bindings
parentaf75493883762b5726da825a01f5ec305a6c3e56 (diff)
downloadserenity-c2939d58c71a9e8ae6afb071720ffadcbd7591c2.zip
LibWeb: Convert uses of cached_web_prototype to ensure_web_prototype
Once the construction of these objects is lazy, we cannot assume they exist.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Bindings/WindowConstructor.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp
index f3e9561345..8962b4fef8 100644
--- a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp
@@ -23,7 +23,7 @@ void AudioConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "HTMLAudioElement"), 0);
+ define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLAudioElementPrototype>(realm, "HTMLAudioElement"), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
}
diff --git a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp
index 2d1f968ef4..42410d7510 100644
--- a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp
@@ -23,7 +23,7 @@ void ImageConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "HTMLImageElement"), 0);
+ define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLImageElementPrototype>(realm, "HTMLImageElement"), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
}
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
index 9d1b84371f..6a7d7a5dd8 100644
--- a/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
@@ -32,7 +32,7 @@ void LocationConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "Location"), 0);
+ define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::LocationPrototype>(realm, "Location"), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
}
diff --git a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp
index 8c75e0e055..c1eecd19ac 100644
--- a/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/OptionConstructor.cpp
@@ -25,7 +25,7 @@ void OptionConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "HTMLOptionElement"), 0);
+ define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLOptionElementPrototype>(realm, "HTMLOptionElement"), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
}
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/WindowConstructor.cpp
index d6f93ab501..f392e07969 100644
--- a/Userland/Libraries/LibWeb/Bindings/WindowConstructor.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/WindowConstructor.cpp
@@ -32,7 +32,7 @@ void WindowConstructor::initialize(JS::Realm& realm)
auto& vm = this->vm();
NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &cached_web_prototype(realm, "Window"), 0);
+ define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::WindowPrototype>(realm, "Window"), 0);
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
}