diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-27 01:03:50 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-27 11:29:10 +0100 |
commit | 61bd9fef7d14b32e24c0d4d7841e569068d37629 (patch) | |
tree | bf4d2272e87789ba029617988e0a449cd07155ce /Userland/Libraries/LibWeb | |
parent | 50428ea8d21045bbc3c5584a16496cff4a38fdc5 (diff) | |
download | serenity-61bd9fef7d14b32e24c0d4d7841e569068d37629.zip |
LibJS+LibWeb: Remove last uses of GlobalObject::associated_realm()
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/WindowObject.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/WindowObject.h b/Userland/Libraries/LibWeb/Bindings/WindowObject.h index d65673aa33..df346b8f44 100644 --- a/Userland/Libraries/LibWeb/Bindings/WindowObject.h +++ b/Userland/Libraries/LibWeb/Bindings/WindowObject.h @@ -53,7 +53,7 @@ public: auto it = m_prototypes.find(class_name); if (it != m_prototypes.end()) return *it->value; - auto& realm = *associated_realm(); + auto& realm = shape().realm(); auto* prototype = heap().allocate<T>(realm, realm); m_prototypes.set(class_name, prototype); return *prototype; @@ -65,7 +65,7 @@ public: auto it = m_constructors.find(class_name); if (it != m_constructors.end()) return *it->value; - auto& realm = *associated_realm(); + auto& realm = shape().realm(); auto* constructor = heap().allocate<T>(realm, realm); m_constructors.set(class_name, constructor); define_direct_property(class_name, JS::Value(constructor), JS::Attribute::Writable | JS::Attribute::Configurable); diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index f45b4af4f3..b80cd11415 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1081,8 +1081,7 @@ JS::Realm& Document::realm() { VERIFY(m_window); VERIFY(m_window->wrapper()); - VERIFY(m_window->wrapper()->associated_realm()); - return *m_window->wrapper()->associated_realm(); + return m_window->wrapper()->shape().realm(); } JS::Interpreter& Document::interpreter() |