1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 19:25:10 +00:00

Spreadsheet: Always keep the workbook interpreter in VM scope

Fixes #3570.
This commit is contained in:
AnotherTest 2020-09-21 01:31:49 +03:30 committed by Andreas Kling
parent cba5a69f07
commit e7f5090808
2 changed files with 2 additions and 0 deletions

View file

@ -48,6 +48,7 @@ static JS::VM& global_vm()
Workbook::Workbook(NonnullRefPtrVector<Sheet>&& sheets)
: m_sheets(move(sheets))
, m_interpreter(JS::Interpreter::create<JS::GlobalObject>(global_vm()))
, m_interpreter_scope(JS::VM::InterpreterScope(interpreter()))
{
m_workbook_object = interpreter().heap().allocate<WorkbookObject>(global_object(), *this);
global_object().put("workbook", workbook_object());