mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
LibJS+LibWeb: Replace GlobalObject with Realm in Heap::allocate<T>()
This is a continuation of the previous three commits. Now that create() receives the allocating realm, we can simply forward that to allocate(), which accounts for the majority of these changes. Additionally, we can get rid of the realm_from_global_object() in one place, with one more remaining in VM::throw_completion().
This commit is contained in:
@@ -110,7 +110,7 @@ void Worker::run_a_worker(AK::URL& url, EnvironmentSettingsObject& outside_setti
|
||||
TODO();
|
||||
// FIXME: Make and use subclasses of WorkerGlobalScope, however this requires JS::GlobalObject to
|
||||
// play nicely with the IDL interpreter, to make spec-compliant extensions, which it currently does not.
|
||||
m_worker_scope = m_worker_vm->heap().allocate_without_global_object<JS::GlobalObject>(realm);
|
||||
m_worker_scope = m_worker_vm->heap().allocate_without_realm<JS::GlobalObject>(realm);
|
||||
return m_worker_scope;
|
||||
},
|
||||
nullptr);
|
||||
|
||||
Reference in New Issue
Block a user