Bug 1398134 - Fix warning in BindingUtils.h. r=bkelly
authorNicolas Silva <nsilva@mozilla.com>
Mon, 11 Sep 2017 14:50:15 +0200
changeset 429563 171282de032d841014618a88510a30f08113e498
parent 429562 4edf631edd326bf69999b229516d994a84fe2748
child 429564 3b924184c333c508df0890c811e115a195e71e7a
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1398134
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1398134 - Fix warning in BindingUtils.h. r=bkelly
dom/bindings/BindingUtils.h
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -281,17 +281,17 @@ UnwrapObjectInternal(V& obj, U& value, p
   // Recursive call is OK, because now we're using false for mayBeWrapper and
   // we never reach this code if that boolean is false, so can't keep calling
   // ourselves.
   //
   // Unwrap into a temporary pointer, because in general unwrapping into
   // something of type U might trigger GC (e.g. release the value currently
   // stored in there, with arbitrary consequences) and invalidate the
   // "unwrappedObj" pointer.
-  T* tempValue;
+  T* tempValue = nullptr;
   nsresult rv = UnwrapObjectInternal<T, false>(unwrappedObj, tempValue,
                                                protoID, protoDepth);
   if (NS_SUCCEEDED(rv)) {
     // It's very important to not update "obj" with the "unwrappedObj" value
     // until we know the unwrap has succeeded.  Otherwise, in a situation in
     // which we have an overload of object and primitive we could end up
     // converting to the primitive from the unwrappedObj, whereas we want to do
     // it from the original object.