mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 916039 - Don't wrap |this| in strict mode eval. r=bhackett
--HG-- extra : rebase_source : 678d783f4cfe32a9b00db1a0bbb34940938bae0b
This commit is contained in:
parent
e0fe2d1079
commit
2c10974948
4
js/src/jit-test/tests/baseline/bug916039.js
Normal file
4
js/src/jit-test/tests/baseline/bug916039.js
Normal file
@ -0,0 +1,4 @@
|
||||
(function() {
|
||||
"use strict";
|
||||
assertEq(eval("this"), undefined);
|
||||
})();
|
@ -971,8 +971,8 @@ BaselineCompiler::emit_JSOP_THIS()
|
||||
// Keep this value in R0
|
||||
frame.pushThis();
|
||||
|
||||
// In strict mode function or self-hosted function, |this| is left alone.
|
||||
if (function() && (function()->strict() || function()->isSelfHostedBuiltin()))
|
||||
// In strict mode code or self-hosted functions, |this| is left alone.
|
||||
if (script->strict || (function() && function()->isSelfHostedBuiltin()))
|
||||
return true;
|
||||
|
||||
Label skipIC;
|
||||
|
Loading…
Reference in New Issue
Block a user