diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp index 6332d9c180..2895fbc38d 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp @@ -179,7 +179,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic // 17. If parameters is a List of errors, throw a SyntaxError exception. if (parameters_parser.has_errors()) { auto error = parameters_parser.errors()[0]; - return vm.throw_completion<SyntaxError>(global_object, error.to_string()); + return vm.throw_completion<SyntaxError>(error.to_string()); } // 18. Let body be ParseText(StringToCodePoints(bodyString), bodySym). @@ -196,7 +196,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic // 19. If body is a List of errors, throw a SyntaxError exception. if (body_parser.has_errors()) { auto error = body_parser.errors()[0]; - return vm.throw_completion<SyntaxError>(global_object, error.to_string()); + return vm.throw_completion<SyntaxError>(error.to_string()); } // 20. NOTE: The parameters and body are parsed separately to ensure that each is valid alone. For example, new Function("/*", "*/ ) {") is not legal. @@ -210,7 +210,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic // 23. If expr is a List of errors, throw a SyntaxError exception. if (source_parser.has_errors()) { auto error = source_parser.errors()[0]; - return vm.throw_completion<SyntaxError>(global_object, error.to_string()); + return vm.throw_completion<SyntaxError>(error.to_string()); } // 24. Let proto be ? GetPrototypeFromConstructor(newTarget, fallbackProto). |