Bug 830086 - Do not add read property stubs for proxies. r=djvj

This commit is contained in:
Nicolas B. Pierron 2013-01-24 10:31:42 -08:00
parent 87a1519f6f
commit 882fd6c383

View File

@ -880,10 +880,13 @@ TryAttachNativeGetPropStub(JSContext *cx, IonScript *ion,
jsbytecode *pc;
cache.getScriptedLocation(&script, &pc);
if (IsCacheableGetPropReadSlot(checkObj, holder, shape) ||
IsCacheableNoProperty(checkObj, holder, shape, pc, cache.output()))
if (IsCacheableGetPropReadSlot(obj, holder, shape) ||
IsCacheableNoProperty(obj, holder, shape, pc, cache.output()))
{
readSlot = true;
// With Proxies, we cannot garantee any property access as the proxy can
// mask any property from the prototype chain.
if (!obj->isProxy())
readSlot = true;
} else if (IsCacheableGetPropCallNative(checkObj, holder, shape) ||
IsCacheableGetPropCallPropertyOp(checkObj, holder, shape))
{