diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp index 2895fbc38d..8a004167b0 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/FunctionConstructor.cpp @@ -148,7 +148,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic // ii. Let nextArgString be ? ToString(nextArg). // iii. Set P to the string-concatenation of P, "," (a comma), and nextArgString. - parameters.append(TRY(next_arg.to_string(global_object))); + parameters.append(TRY(next_arg.to_string(vm))); // iv. Set k to k + 1. } @@ -159,7 +159,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic } // 13. Let bodyString be the string-concatenation of 0x000A (LINE FEED), ? ToString(bodyArg), and 0x000A (LINE FEED). - auto body_string = String::formatted("\n{}\n", body_arg.has_value() ? TRY(body_arg->to_string(global_object)) : ""); + auto body_string = String::formatted("\n{}\n", body_arg.has_value() ? TRY(body_arg->to_string(vm)) : ""); // 14. Let sourceString be the string-concatenation of prefix, " anonymous(", P, 0x000A (LINE FEED), ") {", bodyString, and "}". // 15. Let sourceText be StringToCodePoints(sourceString). |