1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:47:35 +00:00

Spreadsheet: Replace hacky JS VM configuration with a more correct one

Now we give each sheet its own interpreter and realm, and only make them
share the VM.
This is to prepare for the next commit, which will be refactoring a
bunch of things to propagate exceptions via ThrowCompletionOr<T>.
This commit is contained in:
Ali Mohammad Pur 2021-11-21 05:04:55 +03:30 committed by Ali Mohammad Pur
parent 82dde46a30
commit 235eb0b1ad
5 changed files with 27 additions and 26 deletions

View file

@ -356,7 +356,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::get_column_bound)
}
WorkbookObject::WorkbookObject(Workbook& workbook)
: JS::Object(*JS::Object::create(workbook.global_object(), workbook.global_object().object_prototype()))
: JS::Object(*JS::Object::create(workbook.vm().interpreter().global_object(), workbook.vm().interpreter().global_object().object_prototype()))
, m_workbook(workbook)
{
}