Backed out changeset b4d189ca8add (bug 1325351) for spidermonkey cgc and plain shell failure in Maybe.h. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 27 Dec 2016 10:41:01 +0100
changeset 327380 38fe624589d393730a347b2b54eabce53277cf47
parent 327379 d9c389a8bcbf43f32df70eddda5d2d564cd90e12
child 327381 ee7a215666021e8736f77ab13354c93b0023fea5
push id85168
push userphilringnalda@gmail.com
push dateWed, 28 Dec 2016 04:38:14 +0000
treeherdermozilla-inbound@197d0e1032b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1325351
milestone53.0a1
backs outb4d189ca8add5a3b5fd27d8e3b7d42c812a195d0
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
Backed out changeset b4d189ca8add (bug 1325351) for spidermonkey cgc and plain shell failure in Maybe.h. r=backout
mfbt/Maybe.h
--- a/mfbt/Maybe.h
+++ b/mfbt/Maybe.h
@@ -152,17 +152,23 @@ public:
     }
   }
 
   Maybe& operator=(const Maybe& aOther)
   {
     if (&aOther != this) {
       if (aOther.mIsSome) {
         if (mIsSome) {
+          // XXX(seth): The correct code for this branch, below, can't be used
+          // due to a bug in Visual Studio 2010. See bug 1052940.
+          /*
           ref() = aOther.ref();
+          */
+          reset();
+          emplace(*aOther);
         } else {
           emplace(*aOther);
         }
       } else {
         reset();
       }
     }
     return *this;