|
@@ -67,14 +67,14 @@ BoundFunction* Function::bind(Value bound_this_value, Vector<Value> arguments)
|
|
|
|
|
|
i32 computed_length = 0;
|
|
|
auto length_property = get("length");
|
|
|
- if (interpreter().exception())
|
|
|
+ if (vm().exception())
|
|
|
return nullptr;
|
|
|
if (length_property.is_number())
|
|
|
computed_length = max(0, length_property.as_i32() - static_cast<i32>(arguments.size()));
|
|
|
|
|
|
Object* constructor_prototype = nullptr;
|
|
|
auto prototype_property = target_function.get("prototype");
|
|
|
- if (interpreter().exception())
|
|
|
+ if (vm().exception())
|
|
|
return nullptr;
|
|
|
if (prototype_property.is_object())
|
|
|
constructor_prototype = &prototype_property.as_object();
|
|
@@ -82,7 +82,7 @@ BoundFunction* Function::bind(Value bound_this_value, Vector<Value> arguments)
|
|
|
auto all_bound_arguments = bound_arguments();
|
|
|
all_bound_arguments.append(move(arguments));
|
|
|
|
|
|
- return interpreter().heap().allocate<BoundFunction>(global_object(), global_object(), target_function, bound_this_object, move(all_bound_arguments), computed_length, constructor_prototype);
|
|
|
+ return heap().allocate<BoundFunction>(global_object(), global_object(), target_function, bound_this_object, move(all_bound_arguments), computed_length, constructor_prototype);
|
|
|
}
|
|
|
|
|
|
void Function::visit_children(Visitor& visitor)
|