mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Respect object's extensibility in addprop ICs (bug 805747, r=djvj).
This commit is contained in:
parent
6faf816e95
commit
72bd0337eb
@ -1295,6 +1295,9 @@ IsPropertyAddInlineable(JSContext *cx, HandleObject obj, jsid id, uint32_t oldSl
|
||||
if (obj->getClass()->resolve != JS_ResolveStub)
|
||||
return false;
|
||||
|
||||
if (!obj->isExtensible())
|
||||
return false;
|
||||
|
||||
// walk up the object prototype chain and ensure that all prototypes
|
||||
// are native, and that all prototypes have no getter or setter
|
||||
// defined on the property
|
||||
|
Loading…
Reference in New Issue
Block a user