mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Avoid calling js_ComputeThis when we don't have to from js_Invoke. bug 417947, r+a=brendan
This commit is contained in:
parent
3a8966f57d
commit
f1ecb4b0a4
@ -1260,8 +1260,13 @@ have_fun:
|
|||||||
* We must call js_ComputeThis in case we are not called from the
|
* We must call js_ComputeThis in case we are not called from the
|
||||||
* interpreter, where a prior bytecode has computed an appropriate
|
* interpreter, where a prior bytecode has computed an appropriate
|
||||||
* |this| already.
|
* |this| already.
|
||||||
|
*
|
||||||
|
* But we only need to eagerly compute this only for slow native
|
||||||
|
* functions. Fast natives must use JS_THIS and any scripted functions
|
||||||
|
* will go through the appropriate this-computing bytecode.
|
||||||
*/
|
*/
|
||||||
if (!js_ComputeThis(cx, JS_FALSE, vp + 2)) {
|
if (native && fun && !(fun->flags & JSFUN_FAST_NATIVE) &&
|
||||||
|
!js_ComputeThis(cx, JS_FALSE, vp + 2)) {
|
||||||
ok = JS_FALSE;
|
ok = JS_FALSE;
|
||||||
goto out2;
|
goto out2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user