Issue #1952 - m-c 1383775: Clean up function toString/toSource code, remove remnants of source decompiler

This commit is contained in:
Martok 2022-07-01 12:53:23 +02:00 committed by roytam1
commit 85af7f6e80
24 changed files with 55 additions and 64 deletions

View file

@ -4577,7 +4577,7 @@ DecompileFunction(JSContext* cx, unsigned argc, Value* vp)
return true;
}
RootedFunction fun(cx, &args[0].toObject().as<JSFunction>());
JSString* result = JS_DecompileFunction(cx, fun, 0);
JSString* result = JS_DecompileFunction(cx, fun);
if (!result)
return false;
args.rval().setString(result);
@ -4599,7 +4599,7 @@ DecompileThisScript(JSContext* cx, unsigned argc, Value* vp)
JSAutoCompartment ac(cx, iter.script());
RootedScript script(cx, iter.script());
JSString* result = JS_DecompileScript(cx, script, "test", 0);
JSString* result = JS_DecompileScript(cx, script);
if (!result)
return false;