mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:47:46 +00:00
LibJS: Rename GlobalObject::initialize() => initialize_global_object()
This function was shadowing Object::initialize() which cannot be called on global objects and has a different set of parameters.
This commit is contained in:
parent
ea81dc13cf
commit
d792200a55
11 changed files with 30 additions and 29 deletions
|
@ -53,7 +53,7 @@ public:
|
|||
auto interpreter = adopt_own(*new Interpreter(vm));
|
||||
VM::InterpreterExecutionScope scope(*interpreter);
|
||||
interpreter->m_global_object = make_handle(static_cast<Object*>(interpreter->heap().allocate_without_global_object<GlobalObjectType>(forward<Args>(args)...)));
|
||||
static_cast<GlobalObjectType*>(interpreter->m_global_object.cell())->initialize();
|
||||
static_cast<GlobalObjectType*>(interpreter->m_global_object.cell())->initialize_global_object();
|
||||
return interpreter;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ GlobalObject::GlobalObject()
|
|||
{
|
||||
}
|
||||
|
||||
void GlobalObject::initialize()
|
||||
void GlobalObject::initialize_global_object()
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class GlobalObject : public ScopeObject {
|
|||
|
||||
public:
|
||||
explicit GlobalObject();
|
||||
virtual void initialize();
|
||||
virtual void initialize_global_object();
|
||||
|
||||
virtual ~GlobalObject() override;
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ WindowObject::WindowObject(DOM::Window& impl)
|
|||
impl.set_wrapper({}, *this);
|
||||
}
|
||||
|
||||
void WindowObject::initialize()
|
||||
void WindowObject::initialize_global_object()
|
||||
{
|
||||
GlobalObject::initialize();
|
||||
Base::initialize_global_object();
|
||||
|
||||
set_prototype(&ensure_web_prototype<EventTargetPrototype>("EventTarget"));
|
||||
|
||||
|
|
|
@ -37,9 +37,11 @@ namespace Bindings {
|
|||
class WindowObject final
|
||||
: public JS::GlobalObject
|
||||
, public Weakable<WindowObject> {
|
||||
JS_OBJECT(WindowObject, JS::GlobalObject);
|
||||
|
||||
public:
|
||||
explicit WindowObject(DOM::Window&);
|
||||
virtual void initialize() override;
|
||||
virtual void initialize_global_object() override;
|
||||
virtual ~WindowObject() override;
|
||||
|
||||
DOM::Window& impl() { return *m_impl; }
|
||||
|
@ -74,7 +76,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "WindowObject"; }
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
JS_DECLARE_NATIVE_GETTER(document_getter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue