Backed out changeset f8d33a975228 (bug 1295197) for being a possible cause of crashtest assertions CLOSED TREE

This commit is contained in:
Wes Kocher 2016-08-16 11:22:23 -07:00
Родитель 57773cd69e
Коммит f378fa54b1
5 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -719,7 +719,7 @@ public:
block->mNext = nullptr;
mNextBlock = &block->mNext;
}
return new (mozilla::KnownNotNull, mNext++) PtrInfo(aPointer, aParticipant);
return new (mNext++) PtrInfo(aPointer, aParticipant);
}
private:
NodeBlock** mNextBlock;

Просмотреть файл

@ -11,7 +11,6 @@
#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"
@ -318,7 +317,7 @@ PLDHashTable::ClearAndPrepareForLength(uint32_t aLength)
uint32_t entrySize = mEntrySize;
this->~PLDHashTable();
new (KnownNotNull, this) PLDHashTable(ops, entrySize, aLength);
new (this) PLDHashTable(ops, entrySize, aLength);
}
void

Просмотреть файл

@ -7,7 +7,6 @@
#include "nsCOMArray.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/OperatorNewExtensions.h"
#include "nsCOMPtr.h"
@ -21,13 +20,13 @@ 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)

Просмотреть файл

@ -18,7 +18,6 @@
#include "mozilla/MathAlgorithms.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Move.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/ReverseIterator.h"
#include "mozilla/TypeTraits.h"
@ -505,7 +504,7 @@ public:
// 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>
@ -516,7 +515,7 @@ public:
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(); }

Просмотреть файл

@ -14,7 +14,6 @@
#include "mozilla/MemoryChecking.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/Move.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/PodOperations.h"
#include "mozilla/TypeTraits.h"
@ -392,7 +391,7 @@ nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable* aTable,
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();
}
@ -410,7 +409,7 @@ 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;