Backed out changeset f8d33a975228 (bug 1295197) for being a possible cause of crashtest assertions CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 16 Aug 2016 11:22:23 -0700
changeset 309538 3f52630cfbe8c3cccdaa4ea15f24a0642e504c46
parent 309537 5c7d45d6ebfaa6b47e7135a7d0c38ca35543f06f
child 309539 1eaa34d5dba1e3698785c7ffab4e5bd0f9529a0f
push id80641
push userkwierso@gmail.com
push dateTue, 16 Aug 2016 18:22:30 +0000
treeherdermozilla-inbound@3f52630cfbe8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1295197
milestone51.0a1
backs outf8d33a9752282800cec9eb6e67e967de68e7dcc4
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 f8d33a975228 (bug 1295197) for being a possible cause of crashtest assertions CLOSED TREE
xpcom/base/nsCycleCollector.cpp
xpcom/glue/PLDHashTable.cpp
xpcom/glue/nsCOMArray.cpp
xpcom/glue/nsTArray.h
xpcom/glue/nsTHashtable.h
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -714,17 +714,17 @@ public:
         }
 
         *mNextBlock = block;
         mNext = block->mEntries;
         mBlockEnd = block->mEntries + NodeBlockSize;
         block->mNext = nullptr;
         mNextBlock = &block->mNext;
       }
-      return new (mozilla::KnownNotNull, mNext++) PtrInfo(aPointer, aParticipant);
+      return new (mNext++) PtrInfo(aPointer, aParticipant);
     }
   private:
     NodeBlock** mNextBlock;
     PtrInfo*& mNext;
     PtrInfo* mBlockEnd;
   };
 
   class Enumerator;
--- a/xpcom/glue/PLDHashTable.cpp
+++ b/xpcom/glue/PLDHashTable.cpp
@@ -6,17 +6,16 @@
 
 #include <new>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include "PLDHashTable.h"
 #include "mozilla/HashFunctions.h"
 #include "mozilla/MathAlgorithms.h"
-#include "mozilla/OperatorNewExtensions.h"
 #include "nsAlgorithm.h"
 #include "mozilla/Likely.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/ChaosMode.h"
 
 using namespace mozilla;
 
 #ifdef DEBUG
@@ -313,17 +312,17 @@ PLDHashTable::~PLDHashTable()
 void
 PLDHashTable::ClearAndPrepareForLength(uint32_t aLength)
 {
   // Get these values before the destructor clobbers them.
   const PLDHashTableOps* ops = mOps;
   uint32_t entrySize = mEntrySize;
 
   this->~PLDHashTable();
-  new (KnownNotNull, this) PLDHashTable(ops, entrySize, aLength);
+  new (this) PLDHashTable(ops, entrySize, aLength);
 }
 
 void
 PLDHashTable::Clear()
 {
   ClearAndPrepareForLength(kDefaultInitialLength);
 }
 
--- a/xpcom/glue/nsCOMArray.cpp
+++ b/xpcom/glue/nsCOMArray.cpp
@@ -2,37 +2,36 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsCOMArray.h"
 
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/OperatorNewExtensions.h"
 
 #include "nsCOMPtr.h"
 
 // This specialization is private to nsCOMArray.
 // It exists solely to automatically zero-out newly created array elements.
 template<>
 class nsTArrayElementTraits<nsISupports*>
 {
   typedef nsISupports* E;
 public:
   // Zero out the value
   static inline void Construct(E* aE)
   {
-    new (mozilla::KnownNotNull, static_cast<void*>(aE)) E();
+    new (static_cast<void*>(aE)) E();
   }
   // Invoke the copy-constructor in place.
   template<class A>
   static inline void Construct(E* aE, const A& aArg)
   {
-    new (mozilla::KnownNotNull, static_cast<void*>(aE)) E(aArg);
+    new (static_cast<void*>(aE)) E(aArg);
   }
   // Invoke the destructor in place.
   static inline void Destruct(E* aE)
   {
     aE->~E();
   }
 };
 
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -13,17 +13,16 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/BinarySearch.h"
 #include "mozilla/fallible.h"
 #include "mozilla/Function.h"
 #include "mozilla/InitializerList.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
-#include "mozilla/OperatorNewExtensions.h"
 #include "mozilla/ReverseIterator.h"
 #include "mozilla/TypeTraits.h"
 
 #include <string.h>
 
 #include "nsCycleCollectionNoteChild.h"
 #include "nsAlgorithm.h"
 #include "nscore.h"
@@ -500,28 +499,28 @@ public:
   // Invoke the default constructor in place.
   static inline void Construct(E* aE)
   {
     // Do NOT call "E()"! That triggers C++ "default initialization"
     // which zeroes out POD ("plain old data") types such as regular
     // ints.  We don't want that because it can be a performance issue
     // and people don't expect it; nsTArray should work like a regular
     // C/C++ array in this respect.
-    new (mozilla::KnownNotNull, static_cast<void*>(aE)) E;
+    new (static_cast<void*>(aE)) E;
   }
   // Invoke the copy-constructor in place.
   template<class A>
   static inline void Construct(E* aE, A&& aArg)
   {
     typedef typename mozilla::RemoveCV<E>::Type E_NoCV;
     typedef typename mozilla::RemoveCV<A>::Type A_NoCV;
     static_assert(!mozilla::IsSame<E_NoCV*, A_NoCV>::value,
                   "For safety, we disallow constructing nsTArray<E> elements "
                   "from E* pointers. See bug 960591.");
-    new (mozilla::KnownNotNull, static_cast<void*>(aE)) E(mozilla::Forward<A>(aArg));
+    new (static_cast<void*>(aE)) E(mozilla::Forward<A>(aArg));
   }
   // Invoke the destructor in place.
   static inline void Destruct(E* aE) { aE->~E(); }
 };
 
 // The default comparator used by nsTArray
 template<class A, class B>
 class nsDefaultComparator
--- a/xpcom/glue/nsTHashtable.h
+++ b/xpcom/glue/nsTHashtable.h
@@ -9,17 +9,16 @@
 
 #include "PLDHashTable.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/fallible.h"
 #include "mozilla/MemoryChecking.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
-#include "mozilla/OperatorNewExtensions.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/TypeTraits.h"
 
 #include <new>
 
 /**
  * a base class for templated hashtables.
  *
@@ -387,17 +386,17 @@ template<class EntryType>
 void
 nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable* aTable,
                                      const PLDHashEntryHdr* aFrom,
                                      PLDHashEntryHdr* aTo)
 {
   EntryType* fromEntry =
     const_cast<EntryType*>(static_cast<const EntryType*>(aFrom));
 
-  new (mozilla::KnownNotNull, aTo) EntryType(mozilla::Move(*fromEntry));
+  new (aTo) EntryType(mozilla::Move(*fromEntry));
 
   fromEntry->~EntryType();
 }
 
 template<class EntryType>
 void
 nsTHashtable<EntryType>::s_ClearEntry(PLDHashTable* aTable,
                                       PLDHashEntryHdr* aEntry)
@@ -405,17 +404,17 @@ nsTHashtable<EntryType>::s_ClearEntry(PL
   static_cast<EntryType*>(aEntry)->~EntryType();
 }
 
 template<class EntryType>
 void
 nsTHashtable<EntryType>::s_InitEntry(PLDHashEntryHdr* aEntry,
                                      const void* aKey)
 {
-  new (mozilla::KnownNotNull, aEntry) EntryType(static_cast<KeyTypePointer>(aKey));
+  new (aEntry) EntryType(static_cast<KeyTypePointer>(aKey));
 }
 
 class nsCycleCollectionTraversalCallback;
 
 template<class EntryType>
 inline void
 ImplCycleCollectionUnlink(nsTHashtable<EntryType>& aField)
 {