Bug 945754 - Make EnsureTrackPropertyTypes handle OOM. r=bhackett
authorChristian Holler <choller@mozilla.com>
Tue, 03 Dec 2013 17:43:18 +0100
changeset 158575 8a7ed8362caa0c86108c442f303f1e6762b58a9c
parent 158574 0d2c9cafe2e8fe38e57b9dfc847dfcc639aebb85
child 158576 85694fd9b17cf468f11350af85f82f79d16e2e39
child 158611 3930e0fc40aca2ec07979db52f5c8a57edf244b4
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbhackett
bugs945754
milestone28.0a1
Bug 945754 - Make EnsureTrackPropertyTypes handle OOM. r=bhackett
js/src/jsinferinlines.h
--- a/js/src/jsinferinlines.h
+++ b/js/src/jsinferinlines.h
@@ -426,16 +426,17 @@ EnsureTrackPropertyTypes(JSContext *cx, 
         return;
 
     id = IdToTypeId(id);
 
     if (obj->hasSingletonType()) {
         AutoEnterAnalysis enter(cx);
         if (obj->hasLazyType() && !obj->getType(cx)) {
             cx->compartment()->types.setPendingNukeTypes(cx);
+            cx->clearPendingException();
             return;
         }
         if (!obj->type()->unknownProperties())
             obj->type()->getProperty(cx, id);
     }
 
     JS_ASSERT(obj->type()->unknownProperties() || TrackPropertyTypes(cx, obj, id));
 }