Переглянути джерело

LibWeb: Remove unnecessary hack in HTML::Window::initialize()

We don't need to force-set the realm's global object during
initialization anymore, now that intrinsics are set up elsewhere.
Andreas Kling 2 роки тому
батько
коміт
8fd59fce9c

+ 0 - 8
Userland/Libraries/LibWeb/HTML/Window.cpp

@@ -697,14 +697,6 @@ HTML::BrowsingContext* Window::browsing_context()
     return m_associated_document->browsing_context();
 }
 
-void Window::initialize(JS::Realm& realm)
-{
-    Base::initialize(realm);
-
-    // FIXME: This is a hack..
-    realm.set_global_object(this, this);
-}
-
 void Window::initialize_web_interfaces(Badge<WindowEnvironmentSettingsObject>)
 {
     auto& realm = this->realm();

+ 0 - 1
Userland/Libraries/LibWeb/HTML/Window.h

@@ -127,7 +127,6 @@ public:
 
 private:
     explicit Window(JS::Realm&);
-    virtual void initialize(JS::Realm&) override;
 
     virtual void visit_edges(Cell::Visitor&) override;