Backed out changeset 3411f1c818f6 (bug 1374629) for build bustage a=backout
authorWes Kocher <wkocher@mozilla.com>
Wed, 21 Jun 2017 15:50:15 -0700
changeset 416502 34248d40b52f3ec5882846b42aedbbb2f9be85bf
parent 416501 3411f1c818f69059bfb93b4fcb105f41647846b6
child 416503 dc422ed66f91e7ee67b3f36ca59cbf3e0c38cfd9
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1374629
milestone56.0a1
backs out3411f1c818f69059bfb93b4fcb105f41647846b6
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 3411f1c818f6 (bug 1374629) for build bustage a=backout MozReview-Commit-ID: GHWdfD0h8LI
mfbt/NotNull.h
--- a/mfbt/NotNull.h
+++ b/mfbt/NotNull.h
@@ -58,17 +58,16 @@
 // - When the handle is rebound to another object. References don't allow this.
 //
 // - When the handle has type |void|. |void&| is not allowed.
 //
 // NotNull is an alternative that can be used in any of the above cases except
 // for the last one, where the handle type is |void|. See below.
 
 #include "mozilla/Assertions.h"
-#include <stddef.h>
 
 namespace mozilla {
 
 // NotNull can be used to wrap a "base" pointer (raw or smart) to indicate it
 // is not null. Some examples:
 //
 // - NotNull<char*>
 // - NotNull<RefPtr<Event>>
@@ -110,22 +109,17 @@ class NotNull
   explicit NotNull(U aBasePtr) : mBasePtr(aBasePtr) {}
 
 public:
   // Disallow default construction.
   NotNull() = delete;
 
   // Construct/assign from another NotNull with a compatible base pointer type.
   template <typename U>
-  MOZ_IMPLICIT NotNull(const NotNull<U>& aOther) : mBasePtr(aOther.get()) {
-    static_assert(sizeof(T) == sizeof(NotNull<T>),
-                  "NotNull must have zero space overhead.");
-    static_assert(offsetof(NotNull<T>, mBasePtr) == 0,
-                  "mBasePtr must have zero offset.");
-  }
+  MOZ_IMPLICIT NotNull(const NotNull<U>& aOther) : mBasePtr(aOther.get()) {}
 
   // Default copy/move construction and assignment.
   NotNull(const NotNull<T>&) = default;
   NotNull<T>& operator=(const NotNull<T>&) = default;
   NotNull(NotNull<T>&&) = default;
   NotNull<T>& operator=(NotNull<T>&&) = default;
 
   // Disallow null checks, which are unnecessary for this type.