Bug 1313049 - Follow-up to fix bustage on 32bit, responsible for a CLOSED TREE. r=me
☠☠ backed out by b171726c465e ☠ ☠
authorTill Schneidereit <till@tillschneidereit.net>
Sat, 29 Oct 2016 00:45:25 +0200
changeset 320085 8c08e1aca9ea4953d610ead9b7d1cd4eb0d822d3
parent 320084 72764ba31b81562e3069f6935da33cae06fe6b00
child 320086 2777fabbe62a3a55a3514d724303977bac7260fb
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1313049
milestone52.0a1
Bug 1313049 - Follow-up to fix bustage on 32bit, responsible for a CLOSED TREE. r=me MozReview-Commit-ID: DNNL3N2NTu3
js/src/builtin/Promise.cpp
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -194,17 +194,17 @@ class PromiseReactionRecord : public Nat
                         ? ReactionRecordSlot_OnFulfilled
                         : ReactionRecordSlot_OnRejected;
         return getFixedSlot(slot);
     }
     Value handlerArg() {
         MOZ_ASSERT(targetState() != JS::PromiseState::Pending);
         return getFixedSlot(ReactionRecordSlot_HandlerArg);
     }
-    void setHandlerArg(Value arg) {
+    void setHandlerArg(Value& arg) {
         MOZ_ASSERT(targetState() == JS::PromiseState::Pending);
         setFixedSlot(ReactionRecordSlot_HandlerArg, arg);
     }
     JSObject* incumbentGlobalObject() {
         return getFixedSlot(ReactionRecordSlot_IncumbentGlobalObject).toObjectOrNull();
     }
 };
 
@@ -451,17 +451,17 @@ EnqueuePromiseReactionJob(JSContext* cx,
     } else {
         reaction = &reactionObj->as<PromiseReactionRecord>();
     }
 
     // Must not enqueue a reaction job more than once.
     MOZ_ASSERT(reaction->targetState() == JS::PromiseState::Pending);
 
     assertSameCompartment(cx, handlerArg);
-    reaction->setHandlerArg(handlerArg);
+    reaction->setHandlerArg(handlerArg.get());
 
     RootedValue reactionVal(cx, ObjectValue(*reaction));
 
     reaction->setTargetState(targetState);
     RootedValue handler(cx, reaction->handler());
 
     // If we have a handler callback, we enter that handler's compartment so
     // that the promise reaction job function is created in that compartment.