mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 19:41:49 +00:00
Bug 914341 - Fix BC to wrap primitive |this| in eval scripts. r=djvj
--HG-- extra : rebase_source : feea6164910b70dc8db175720c796c7b1aebca51
This commit is contained in:
parent
2900cc6657
commit
cd036919f1
5
js/src/jit-test/tests/ion/bug914341.js
Normal file
5
js/src/jit-test/tests/ion/bug914341.js
Normal file
@ -0,0 +1,5 @@
|
||||
function f() {
|
||||
assertEq(typeof eval("this"), "object");
|
||||
}
|
||||
for (var i=0; i<5; i++)
|
||||
f();
|
@ -969,7 +969,7 @@ BaselineCompiler::emit_JSOP_THIS()
|
||||
frame.pushThis();
|
||||
|
||||
// In strict mode function or self-hosted function, |this| is left alone.
|
||||
if (!function() || function()->strict() || function()->isSelfHostedBuiltin())
|
||||
if (function() && (function()->strict() || function()->isSelfHostedBuiltin()))
|
||||
return true;
|
||||
|
||||
Label skipIC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user