Return NULL, not false, from some JSObject::replaceWithNewEquivalentShape, which returns a Shape*. No bug, r=themaid
authorJeff Walden <jwalden@mit.edu>
Thu, 05 Jan 2012 17:12:18 -0600
changeset 86348 1111830907257ac74f8735ad1b8df50ef5a0b347
parent 86347 90e2471b7a422fedafb4e31ede0cc1b766a2cd6a
child 86349 e12b877ae637f5e2e8fa57ab6040ba25e10e3b8f
push idunknown
push userunknown
push dateunknown
reviewersthemaid
milestone12.0a1
Return NULL, not false, from some JSObject::replaceWithNewEquivalentShape, which returns a Shape*. No bug, r=themaid
js/src/jsscope.cpp
--- a/js/src/jsscope.cpp
+++ b/js/src/jsscope.cpp
@@ -1066,26 +1066,26 @@ JSObject::replaceWithNewEquivalentShape(
                  nativeLookup(cx, oldShape->maybePropid()) == oldShape);
 
     JSObject *self = this;
 
     if (!inDictionaryMode()) {
         RootObject selfRoot(cx, &self);
         RootShape newRoot(cx, &newShape);
         if (!toDictionaryMode(cx))
-            return false;
+            return NULL;
         oldShape = lastProperty();
     }
 
     if (!newShape) {
         RootObject selfRoot(cx, &self);
         RootShape oldRoot(cx, &oldShape);
         newShape = js_NewGCShape(cx);
         if (!newShape)
-            return false;
+            return NULL;
         new (newShape) Shape(oldShape->base()->unowned(), 0);
     }
 
     PropertyTable &table = self->lastProperty()->table();
     Shape **spp = oldShape->isEmptyShape()
                   ? NULL
                   : table.search(oldShape->maybePropid(), false);