Bug 923614 - Remove assert, improve OOM handling in PropertyReadNeedsTypeBarrier. r=jandem, a=bkerensa
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 10 Dec 2013 08:34:47 -0800
changeset 167688 a7f34b5d4a9c87ea276ad947bfa33b3a014c09c5
parent 167687 e01187ca17026e95dfc8ac05ef1462981fab91ba
child 167689 6d880e4979bb431ce3151a086f9a31b476c4109c
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, bkerensa
bugs923614
milestone27.0
Bug 923614 - Remove assert, improve OOM handling in PropertyReadNeedsTypeBarrier. r=jandem, a=bkerensa
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -3817,17 +3817,16 @@ IonBuilder::inlineScriptedCall(CallInfo 
                                                  this->info().executionMode());
     if (!info)
         return false;
 
     MIRGraphExits saveExits;
     AutoAccumulateExits aae(graph(), saveExits);
 
     // Build the graph.
-    JS_ASSERT(!cx->isExceptionPending());
     IonBuilder inlineBuilder(cx, &temp(), &graph(), constraints(), &inspector, info, nullptr,
                              inliningDepth_ + 1, loopDepth_);
     if (!inlineBuilder.buildInline(this, outerResumePoint, callInfo)) {
         if (cx->isExceptionPending()) {
             IonSpew(IonSpew_Abort, "Inline builder raised exception.");
             abortReason_ = AbortReason_Error;
             return false;
         }
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2915,20 +2915,20 @@ jit::PropertyReadNeedsTypeBarrier(JSCont
                 break;
 
             types::TypeObjectKey *typeObj = types::TypeObjectKey::get(obj);
             if (!typeObj->unknownProperties()) {
                 types::HeapTypeSetKey property = typeObj->property(NameToId(name), propertycx);
                 if (property.maybeTypes()) {
                     types::TypeSet::TypeList types;
                     if (!property.maybeTypes()->enumerateTypes(&types))
-                        return false;
+                        break;
                     if (types.length()) {
-                        if (!observed->addType(types[0], GetIonContext()->temp->lifoAlloc()))
-                            return false;
+                        // Note: the return value here is ignored.
+                        observed->addType(types[0], GetIonContext()->temp->lifoAlloc());
                         break;
                     }
                 }
             }
 
             obj = obj->getProto();
         }
     }