1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibJS+LibWeb: Remove last uses of GlobalObject::associated_realm()

This commit is contained in:
Linus Groh 2022-08-27 01:03:50 +01:00
parent 50428ea8d2
commit 61bd9fef7d
3 changed files with 4 additions and 5 deletions

View file

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