mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]
This commit is contained in:
parent
7856886ed5
commit
25849f8a6d
95 changed files with 536 additions and 677 deletions
|
@ -40,7 +40,6 @@ ThrowCompletionOr<Value> DataViewConstructor::call()
|
|||
ThrowCompletionOr<Object*> DataViewConstructor::construct(FunctionObject& new_target)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
|
||||
auto buffer = vm.argument(0);
|
||||
if (!buffer.is_object() || !is<ArrayBuffer>(buffer.as_object()))
|
||||
|
@ -67,7 +66,7 @@ ThrowCompletionOr<Object*> DataViewConstructor::construct(FunctionObject& new_ta
|
|||
return vm.throw_completion<RangeError>(ErrorType::InvalidLength, vm.names.DataView);
|
||||
}
|
||||
|
||||
auto* data_view = TRY(ordinary_create_from_constructor<DataView>(global_object, new_target, &GlobalObject::data_view_prototype, &array_buffer, view_byte_length, offset));
|
||||
auto* data_view = TRY(ordinary_create_from_constructor<DataView>(vm, new_target, &GlobalObject::data_view_prototype, &array_buffer, view_byte_length, offset));
|
||||
|
||||
if (array_buffer.is_detached())
|
||||
return vm.throw_completion<TypeError>(ErrorType::DetachedArrayBuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue