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

LibJS: Fix crash due to AST node tracking inside call stack

This commit is contained in:
Jean-Baptiste Boric 2021-03-01 19:18:33 +01:00 committed by Andreas Kling
parent 74d1caf7d1
commit 6f668ca3a4
4 changed files with 6 additions and 5 deletions

View file

@ -134,6 +134,7 @@ public:
const CallFrame& call_frame() const { return *m_call_stack.last(); }
const Vector<CallFrame*>& call_stack() const { return m_call_stack; }
Vector<CallFrame*>& call_stack() { return m_call_stack; }
const ASTNode* current_node() const { return !m_ast_nodes.is_empty() ? m_ast_nodes.last() : nullptr; }
const Vector<const ASTNode*>& node_stack() const { return m_ast_nodes; }
const ScopeObject* current_scope() const { return call_frame().scope; }