mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 05:45:33 +00:00
Bug 1290646 - Remove VS2012 crash workaround in nsTArray. r=jimm
This commit is contained in:
parent
39526a4f0c
commit
1eccabf8d3
@ -43,6 +43,7 @@ namespace layers {
|
||||
struct TileClient;
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
||||
//
|
||||
// nsTArray is a resizable array class, like std::vector.
|
||||
//
|
||||
@ -2240,12 +2241,11 @@ private:
|
||||
static_assert(MOZ_ALIGNOF(elem_type) <= 8,
|
||||
"can't handle alignments greater than 8, "
|
||||
"see nsTArray_base::UsesAutoArrayBuffer()");
|
||||
// Temporary work around for VS2012 RC compiler crash
|
||||
Header** phdr = base_type::PtrToHdr();
|
||||
*phdr = reinterpret_cast<Header*>(&mAutoBuf);
|
||||
(*phdr)->mLength = 0;
|
||||
(*phdr)->mCapacity = N;
|
||||
(*phdr)->mIsAutoArray = 1;
|
||||
|
||||
*base_type::PtrToHdr() = reinterpret_cast<Header*>(&mAutoBuf);
|
||||
base_type::Hdr()->mLength = 0;
|
||||
base_type::Hdr()->mCapacity = N;
|
||||
base_type::Hdr()->mIsAutoArray = 1;
|
||||
|
||||
MOZ_ASSERT(base_type::GetAutoArrayBuffer(MOZ_ALIGNOF(elem_type)) ==
|
||||
reinterpret_cast<Header*>(&mAutoBuf),
|
||||
|
Loading…
x
Reference in New Issue
Block a user