mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
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:
parent
591b7b7031
commit
063acda76e
9 changed files with 13 additions and 21 deletions
|
@ -118,7 +118,7 @@ Value LexicalEnvironment::get_this_binding() const
|
|||
{
|
||||
ASSERT(has_this_binding());
|
||||
if (this_binding_status() == ThisBindingStatus::Uninitialized) {
|
||||
interpreter().vm().throw_exception<ReferenceError>(interpreter().global_object(), ErrorType::ThisHasNotBeenInitialized);
|
||||
vm().throw_exception<ReferenceError>(interpreter().global_object(), ErrorType::ThisHasNotBeenInitialized);
|
||||
return {};
|
||||
}
|
||||
return m_this_value;
|
||||
|
@ -128,7 +128,7 @@ void LexicalEnvironment::bind_this_value(Value this_value)
|
|||
{
|
||||
ASSERT(has_this_binding());
|
||||
if (m_this_binding_status == ThisBindingStatus::Initialized) {
|
||||
interpreter().vm().throw_exception<ReferenceError>(interpreter().global_object(), ErrorType::ThisIsAlreadyInitialized);
|
||||
vm().throw_exception<ReferenceError>(interpreter().global_object(), ErrorType::ThisIsAlreadyInitialized);
|
||||
return;
|
||||
}
|
||||
m_this_value = this_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue