[INFER] Fix bogus assert, bug 686179.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 11 Sep 2011 23:06:52 -0700
changeset 78382 820f11a3fdb154d335b2be1b6196fe15e0f99d3f
parent 78381 a250c3cb749aede88268cb78cdca3949edf1364d
child 78383 0b9a541b2e0a2a097cd19d3a9c80c35f9d52e23a
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs686179
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[INFER] Fix bogus assert, bug 686179.
js/src/jsobj.cpp
js/src/jsobjinlines.h
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -5648,16 +5648,18 @@ js_NativeGetInline(JSContext *cx, JSObje
     int32 sample;
 
     JS_ASSERT(pobj->isNative());
 
     slot = shape->slot;
     if (slot != SHAPE_INVALID_SLOT) {
         *vp = pobj->nativeGetSlot(slot);
         JS_ASSERT(!vp->isMagic());
+        JS_ASSERT_IF(!pobj->hasSingletonType() && shape->hasDefaultGetterOrIsMethod(),
+                     js::types::TypeHasProperty(cx, pobj->type(), shape->propid, *vp));
     } else {
         vp->setUndefined();
     }
     if (shape->hasDefaultGetter())
         return true;
 
     if (JS_UNLIKELY(shape->isMethod()) && (getHow & JSGET_NO_METHOD_BARRIER)) {
         JS_ASSERT(shape->methodObject() == vp->toObject());
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -138,18 +138,16 @@ JSObject::getProperty(JSContext *cx, JSO
 {
     js::PropertyIdOp op = getOps()->getProperty;
     if (op) {
         if (!op(cx, this, receiver, id, vp))
             return false;
     } else {
         if (!js_GetProperty(cx, this, receiver, id, vp))
             return false;
-        JS_ASSERT_IF(!hasSingletonType() && nativeContains(js_CheckForStringIndex(id)),
-                     js::types::TypeHasProperty(cx, type(), id, *vp));
     }
     return true;
 }
 
 inline JSBool
 JSObject::getProperty(JSContext *cx, jsid id, js::Value *vp)
 {
     return getProperty(cx, this, id, vp);