mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1114566 - matchCallee: Check if both functions have a script before comparing them. r=shu
This commit is contained in:
parent
6e378a070c
commit
aa29fbe0dd
2
js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js
Normal file
2
js/src/jit-test/tests/ion/recover-lambdas-bug1114566.js
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
(new Function("return (function o() {}).caller;"))();
|
@ -1124,8 +1124,12 @@ FrameIter::matchCallee(JSContext *cx, HandleFunction fun) const
|
||||
// expect both functions to have the same JSScript. If so, and if they are
|
||||
// different, then they cannot be equal.
|
||||
bool useSameScript = CloneFunctionObjectUseSameScript(fun->compartment(), currentCallee);
|
||||
if (useSameScript && currentCallee->nonLazyScript() != fun->nonLazyScript())
|
||||
if (useSameScript &&
|
||||
(currentCallee->hasScript() != fun->hasScript() ||
|
||||
currentCallee->nonLazyScript() != fun->nonLazyScript()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// If none of the previous filters worked, then take the risk of
|
||||
// invalidating the frame to identify the JSFunction.
|
||||
|
Loading…
Reference in New Issue
Block a user