Bug 1003918 followup - Fix non-unified builds. r=red
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 01 May 2014 12:03:38 +0200
changeset 181556 7210c4f043a59d153706e443aea8df83ea87e72d
parent 181555 fa468cb36e5e43bc5afda6ab72fc1ef7549debbb
child 181557 7dc742da42106567618c91c0b2b4886e1135c572
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersred
bugs1003918
milestone32.0a1
Bug 1003918 followup - Fix non-unified builds. r=red
js/src/jit/VMFunctions.cpp
js/src/jit/VMFunctions.h
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -1091,16 +1091,22 @@ SetDenseElement(JSContext *cx, HandleObj
     if (result == JSObject::ED_FAILED)
         return false;
     MOZ_ASSERT(result == JSObject::ED_SPARSE);
 
     RootedValue indexVal(cx, Int32Value(index));
     return SetObjectElement(cx, obj, indexVal, value, strict);
 }
 
+void
+AutoDetectInvalidation::setReturnOverride()
+{
+    cx_->runtime()->jitRuntime()->setIonReturnOverride(*rval_);
+}
+
 #ifdef DEBUG
 void
 AssertValidObjectPtr(JSContext *cx, JSObject *obj)
 {
     // Check what we can, so that we'll hopefully assert/crash if we get a
     // bogus object (pointer).
     JS_ASSERT(obj->compartment() == cx->compartment());
     JS_ASSERT(obj->runtimeFromMainThread() == cx->runtime());
--- a/js/src/jit/VMFunctions.h
+++ b/js/src/jit/VMFunctions.h
@@ -551,27 +551,29 @@ template <class R, class Context, class 
 
 class AutoDetectInvalidation
 {
     JSContext *cx_;
     IonScript *ionScript_;
     Value *rval_;
     bool disabled_;
 
+    void setReturnOverride();
+
   public:
     AutoDetectInvalidation(JSContext *cx, Value *rval, IonScript *ionScript = nullptr);
 
     void disable() {
         JS_ASSERT(!disabled_);
         disabled_ = true;
     }
 
     ~AutoDetectInvalidation() {
         if (!disabled_ && ionScript_->invalidated())
-            cx_->runtime()->jitRuntime()->setIonReturnOverride(*rval_);
+            setReturnOverride();
     }
 };
 
 bool InvokeFunction(JSContext *cx, HandleObject obj0, uint32_t argc, Value *argv, Value *rval);
 JSObject *NewGCObject(JSContext *cx, gc::AllocKind allocKind, gc::InitialHeap initialHeap);
 
 bool CheckOverRecursed(JSContext *cx);
 bool CheckOverRecursedWithExtra(JSContext *cx, BaselineFrame *frame,