diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp index 94698f2991..a88a983de3 100644 --- a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp @@ -49,7 +49,7 @@ ThrowCompletionOr<Object*> ErrorConstructor::construct(FunctionObject& new_targe // 3. If message is not undefined, then if (!message.is_undefined()) { // a. Let msg be ? ToString(message). - auto msg = TRY(message.to_string(global_object)); + auto msg = TRY(message.to_string(vm)); // b. Perform CreateNonEnumerableDataPropertyOrThrow(O, "message", msg). error->create_non_enumerable_data_property_or_throw(vm.names.message, js_string(vm, move(msg))); @@ -103,7 +103,7 @@ ThrowCompletionOr<Object*> ErrorConstructor::construct(FunctionObject& new_targe /* 3. If message is not undefined, then */ \ if (!message.is_undefined()) { \ /* a. Let msg be ? ToString(message). */ \ - auto msg = TRY(message.to_string(global_object)); \ + auto msg = TRY(message.to_string(vm)); \ \ /* b. Perform CreateNonEnumerableDataPropertyOrThrow(O, "message", msg). */ \ error->create_non_enumerable_data_property_or_throw(vm.names.message, js_string(vm, move(msg))); \ |