mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't generate addprop PIC for JSOP_SETNAME, bug 735161. r=dvander
This commit is contained in:
parent
1e2974e277
commit
9cafbe15fa
4
js/src/jit-test/tests/jaeger/bug735161.js
Normal file
4
js/src/jit-test/tests/jaeger/bug735161.js
Normal file
@ -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)
|
||||
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
|
||||
* prototype chain to watch for an added setter.
|
||||
|
Loading…
Reference in New Issue
Block a user