mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Spreadsheet: Always keep the workbook interpreter in VM scope
Fixes #3570.
This commit is contained in:
parent
cba5a69f07
commit
e7f5090808
Notes:
sideshowbarker
2024-07-19 02:19:02 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/e7f50908081 Pull-request: https://github.com/SerenityOS/serenity/pull/3572 Issue: https://github.com/SerenityOS/serenity/issues/3570
2 changed files with 2 additions and 0 deletions
|
@ -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());
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
private:
|
||||
NonnullRefPtrVector<Sheet> m_sheets;
|
||||
NonnullOwnPtr<JS::Interpreter> m_interpreter;
|
||||
JS::VM::InterpreterScope m_interpreter_scope;
|
||||
WorkbookObject* m_workbook_object { nullptr };
|
||||
|
||||
String m_current_filename;
|
||||
|
|
Loading…
Reference in a new issue