Check return value of hashify() call, bug 712907. r=luke
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 23 Dec 2011 18:19:51 -0800
changeset 84527 cf4feabb94cca2945a167c11d8bb4bc160c3a38f
parent 84526 8d1b087b9713400ef46de7e42725b0fb4603cc84
child 84528 eb614b45e4788f24219d2f3b118ad177783d95ee
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs712907
milestone12.0a1
Check return value of hashify() call, bug 712907. r=luke
js/src/jsscope.cpp
--- a/js/src/jsscope.cpp
+++ b/js/src/jsscope.cpp
@@ -456,17 +456,21 @@ Shape::newDictionaryList(JSContext *cx, 
         childp = &dprop->parent;
         shape = shape->parent;
     }
 
     *listp = root;
     root->listp = listp;
 
     JS_ASSERT(root->inDictionary());
-    root->hashify(cx);
+    if (!root->hashify(cx)) {
+        *listp = list;
+        return NULL;
+    }
+
     return root;
 }
 
 bool
 JSObject::toDictionaryMode(JSContext *cx)
 {
     JS_ASSERT(!inDictionaryMode());