зеркало из https://github.com/mozilla/gecko-dev.git
Don't generate addprop PIC for JSOP_SETNAME, bug 735161. r=dvander
This commit is contained in:
Родитель
8708c2df91
Коммит
9de3d74777
|
@ -0,0 +1,4 @@
|
||||||
|
var obj = {valueOf: function() { "use strict"; undeclared = 7; }};
|
||||||
|
try { '' + obj; assertEq(true, false); } catch(e) { }
|
||||||
|
try { '' + obj; assertEq(true, false); } catch(e) { }
|
||||||
|
assertEq("undeclared" in this, false);
|
|
@ -561,6 +561,13 @@ class SetPropCompiler : public PICStubCompiler
|
||||||
if (clasp->ops.defineProperty)
|
if (clasp->ops.defineProperty)
|
||||||
return disable("ops define property hook");
|
return disable("ops define property hook");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't add properties for SETNAME, which requires checks in
|
||||||
|
* strict mode code.
|
||||||
|
*/
|
||||||
|
if (JSOp(*f.pc()) == JSOP_SETNAME)
|
||||||
|
return disable("add property under SETNAME");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When adding a property we need to check shapes along the entire
|
* When adding a property we need to check shapes along the entire
|
||||||
* prototype chain to watch for an added setter.
|
* prototype chain to watch for an added setter.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче