LibJS: Remove a bunch of unnecessary uses of Cell::interpreter()

We'll want to get rid of all uses of this, to free up the engine from
the old assumption that there's always an Interpreter available.
This commit is contained in:
Andreas Kling 2020-09-27 20:07:25 +02:00
parent 591b7b7031
commit 063acda76e
Notes: sideshowbarker 2024-07-19 02:10:08 +09:00
9 changed files with 13 additions and 21 deletions

View file

@ -53,7 +53,7 @@ ScriptFunction* ScriptFunction::create(GlobalObject& global_object, const FlyStr
}
ScriptFunction::ScriptFunction(GlobalObject& global_object, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, LexicalEnvironment* parent_environment, Object& prototype, bool is_arrow_function)
: Function(prototype, is_arrow_function ? interpreter().this_value(global_object) : Value(), {})
: Function(prototype, is_arrow_function ? vm().this_value(global_object) : Value(), {})
, m_name(name)
, m_body(body)
, m_parameters(move(parameters))