mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779819 - Fix handling of MaybeArguments as second argument of jsop_funapply call. (r=nbp)
This commit is contained in:
parent
f1cd2ae670
commit
65a6f4f28e
@ -3585,9 +3585,15 @@ IonBuilder::jsop_funapply(uint32 argc)
|
||||
if (argc != 2)
|
||||
return makeCall(native, argc, false);
|
||||
|
||||
// Reject when called with an Array or object.
|
||||
// Disable compilation if the second argument to |apply| cannot be guaranteed
|
||||
// to be either definitely |arguments| or definitely not |arguments|.
|
||||
types::TypeSet *argObjTypes = oracle->getCallArg(script, argc, 2, pc);
|
||||
if (oracle->isArgumentObject(argObjTypes) != DefinitelyArguments)
|
||||
LazyArgumentsType isArgObj = oracle->isArgumentObject(argObjTypes);
|
||||
if (isArgObj == MaybeArguments)
|
||||
return abort("NYI: Handle fun.apply with MaybeArguments.");
|
||||
|
||||
// Fallback to regular call if arg 2 is not definitely |arguments|.
|
||||
if (isArgObj != DefinitelyArguments)
|
||||
return makeCall(native, argc, false);
|
||||
|
||||
// Extract call target.
|
||||
|
Loading…
Reference in New Issue
Block a user