Bug 936056 followup. Check for a DOM jitinfo before assuming we have a DOM method in Ion ICs. r=efaust
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 06 Jan 2014 21:53:23 -0500
changeset 162316 451513e0b68cf053409209679e5b9e18c0362e22
parent 162315 e9d6fd04d08e932028717fa5c0b09a4b04fc5118
child 162317 029a56c4ad4c7a331e6379b44af3611ce50b9d9e
push idunknown
push userunknown
push dateunknown
reviewersefaust
bugs936056
milestone29.0a1
Bug 936056 followup. Check for a DOM jitinfo before assuming we have a DOM method in Ion ICs. r=efaust
js/src/jit/IonCaches.cpp
--- a/js/src/jit/IonCaches.cpp
+++ b/js/src/jit/IonCaches.cpp
@@ -614,17 +614,17 @@ IsCacheableGetPropCallNative(JSObject *o
     if (!shape->getterValue().toObject().is<JSFunction>())
         return false;
 
     JSFunction& getter = shape->getterValue().toObject().as<JSFunction>();
     if (!getter.isNative())
         return false;
 
     // Check for a DOM method; those are OK with both inner and outer objects.
-    if (getter.jitInfo())
+    if (getter.jitInfo() && getter.jitInfo()->isDOMJitInfo())
         return true;
 
     // For non-DOM methods, don't cache if obj has an outerObject hook.
     return !obj->getClass()->ext.outerObject;
 }
 
 static bool
 IsCacheableGetPropCallPropertyOp(JSObject *obj, JSObject *holder, Shape *shape)