mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Ladybird: Turn initialize_global_object() into a regular initialize()
See: cfa5885
This commit is contained in:
parent
1e7d4bc089
commit
9789d8b769
3 changed files with 4 additions and 5 deletions
|
@ -35,7 +35,7 @@ ConsoleClient::ConsoleClient(JS::Console& console, WeakPtr<JS::Interpreter> inte
|
|||
// It gets removed immediately after creating the interpreter in Document::interpreter().
|
||||
auto& eso = verify_cast<Web::HTML::EnvironmentSettingsObject>(*m_interpreter->realm().host_defined());
|
||||
vm.push_execution_context(eso.realm_execution_context());
|
||||
console_global_object->initialize_global_object(realm);
|
||||
console_global_object->initialize(realm);
|
||||
vm.pop_execution_context();
|
||||
|
||||
m_console_global_object = JS::make_handle(console_global_object);
|
||||
|
|
|
@ -21,9 +21,9 @@ ConsoleGlobalObject::ConsoleGlobalObject(JS::Realm& realm, Web::Bindings::Window
|
|||
{
|
||||
}
|
||||
|
||||
void ConsoleGlobalObject::initialize_global_object(JS::Realm& realm)
|
||||
void ConsoleGlobalObject::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize_global_object(realm);
|
||||
Base::initialize(realm);
|
||||
|
||||
// $0 magic variable
|
||||
define_native_accessor(realm, "$0", inspected_node_getter, nullptr, 0);
|
||||
|
|
|
@ -24,6 +24,7 @@ class ConsoleGlobalObject final : public JS::GlobalObject {
|
|||
|
||||
public:
|
||||
ConsoleGlobalObject(JS::Realm&, Web::Bindings::WindowObject&);
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual ~ConsoleGlobalObject() override = default;
|
||||
|
||||
virtual JS::ThrowCompletionOr<Object*> internal_get_prototype_of() const override;
|
||||
|
@ -38,8 +39,6 @@ public:
|
|||
virtual JS::ThrowCompletionOr<bool> internal_delete(JS::PropertyKey const& name) override;
|
||||
virtual JS::ThrowCompletionOr<JS::MarkedVector<JS::Value>> internal_own_property_keys() const override;
|
||||
|
||||
virtual void initialize_global_object(JS::Realm&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue