mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 852761 - dis() doesn't work on arrow functions. r=luke.
This commit is contained in:
parent
c29c55e65d
commit
827c995879
@ -1417,6 +1417,15 @@ ValueToScript(JSContext *cx, jsval v, JSFunction **funp = NULL)
|
|||||||
if (!fun)
|
if (!fun)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
// Unwrap bound functions.
|
||||||
|
while (fun->isBoundFunction()) {
|
||||||
|
JSObject *target = fun->getBoundFunctionTarget();
|
||||||
|
if (target && target->isFunction())
|
||||||
|
fun = target->toFunction();
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
RootedScript script(cx);
|
RootedScript script(cx);
|
||||||
JSFunction::maybeGetOrCreateScript(cx, fun, &script);
|
JSFunction::maybeGetOrCreateScript(cx, fun, &script);
|
||||||
if (!script)
|
if (!script)
|
||||||
|
Loading…
Reference in New Issue
Block a user