mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:17:45 +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
|
@ -151,9 +151,9 @@ bool SheetGlobalObject::put(const JS::PropertyName& name, JS::Value value, JS::V
|
|||
return GlobalObject::put(name, value, receiver);
|
||||
}
|
||||
|
||||
void SheetGlobalObject::initialize()
|
||||
void SheetGlobalObject::initialize_global_object()
|
||||
{
|
||||
GlobalObject::initialize();
|
||||
Base::initialize_global_object();
|
||||
define_native_function("get_real_cell_contents", get_real_cell_contents, 1);
|
||||
define_native_function("set_real_cell_contents", set_real_cell_contents, 2);
|
||||
define_native_function("parse_cell_name", parse_cell_name, 1);
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
virtual JS::Value get(const JS::PropertyName&, JS::Value receiver = {}) const override;
|
||||
virtual bool put(const JS::PropertyName&, JS::Value value, JS::Value receiver = {}) override;
|
||||
virtual void initialize() override;
|
||||
virtual void initialize_global_object() override;
|
||||
|
||||
JS_DECLARE_NATIVE_FUNCTION(get_real_cell_contents);
|
||||
JS_DECLARE_NATIVE_FUNCTION(set_real_cell_contents);
|
||||
|
|
|
@ -61,7 +61,7 @@ Sheet::Sheet(Workbook& workbook)
|
|||
{
|
||||
JS::DeferGC defer_gc(m_workbook.interpreter().heap());
|
||||
m_global_object = m_workbook.interpreter().heap().allocate_without_global_object<SheetGlobalObject>(*this);
|
||||
global_object().initialize();
|
||||
global_object().initialize_global_object();
|
||||
global_object().put("workbook", m_workbook.workbook_object());
|
||||
global_object().put("thisSheet", &global_object()); // Self-reference is unfortunate, but required.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue