From 38b895f04ba8068e0c49f8eacaa1c65ccbe943ef Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 24 Sep 2013 16:20:15 -0400 Subject: [PATCH] Backed out changeset 74459407359a (bug 917593) for Windows debug checktest asserts. --- mfbt/Endian.h | 4 ++-- mfbt/tests/TestEndian.cpp | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mfbt/Endian.h b/mfbt/Endian.h index cb6bd27c050..dc6d11d3baf 100644 --- a/mfbt/Endian.h +++ b/mfbt/Endian.h @@ -238,9 +238,9 @@ class EndianUtils { DebugOnly byteDestPtr = static_cast(dest); DebugOnly byteSrcPtr = static_cast(src); - MOZ_ASSERT((byteDestPtr <= byteSrcPtr && + MOZ_ASSERT((byteDestPtr < byteSrcPtr && byteDestPtr + count <= byteSrcPtr) || - (byteSrcPtr <= byteDestPtr && + (byteSrcPtr < byteDestPtr && byteSrcPtr + count <= byteDestPtr)); } diff --git a/mfbt/tests/TestEndian.cpp b/mfbt/tests/TestEndian.cpp index 640d1ab8387..b2f1e9beeeb 100644 --- a/mfbt/tests/TestEndian.cpp +++ b/mfbt/tests/TestEndian.cpp @@ -396,10 +396,5 @@ main() TestBulkInPlaceNoSwap(uint64_values); TestBulkInPlaceNoSwap(int64_values); - // Make sure we don't incorrectly cry overlap for zero-length buffers. - uint64_t scratch = 0xdeadbeef; - NativeEndian::copyAndSwapFromLittleEndian(&scratch, &scratch, 0); - MOZ_ASSERT(scratch == 0xdeadbeef); - return 0; }