Bug 1509985: Backout diagnostic bug 1366083 - slight slowdown, and it has not found any errors, r=jonco
authorSteve Fink <sfink@mozilla.com>
Mon, 26 Nov 2018 11:58:03 -0800
changeset 507627 4688e47fcb9dd1bc48c14108eb87931c8e0dc648
parent 507626 e524ab71423449bd1b9e534ec0a7ee88d0b51e6d
child 507628 7930771be5507d20e7b06cdf66f26840ad6e4978
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1509985, 1366083
milestone65.0a1
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
Bug 1509985: Backout diagnostic bug 1366083 - slight slowdown, and it has not found any errors, r=jonco
js/public/Value.h
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -476,28 +476,16 @@ union alignas(8) Value
         MOZ_ASSERT(js::gc::IsCellPointerValid(bi));
         asBits_ = bitsFromTagAndPayload(JSVAL_TAG_BIGINT, PayloadType(bi));
     }
 #endif
 
     void setObject(JSObject& obj) {
         MOZ_ASSERT(js::gc::IsCellPointerValid(&obj));
 
-        // This should not be possible and is undefined behavior, but some
-        // ObjectValue(nullptr) are sneaking in. Try to catch them here, if
-        // indeed they are going through this code. I tested gcc, and it at
-        // least will *not* elide the null check even though it would be
-        // permitted according to the spec. The temporary is necessary to
-        // prevent gcc from helpfully pointing out that this code makes no
-        // sense.
-#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
-        JSObject* testObj = &obj;
-        MOZ_DIAGNOSTIC_ASSERT(testObj != nullptr);
-#endif
-
 #if defined(JS_PUNBOX64)
         // VisualStudio cannot contain parenthesized C++ style cast and shift
         // inside decltype in template parameter:
         //   AssertionConditionType<decltype((uintptr_t(x) >> 1))>
         // It throws syntax error.
         MOZ_ASSERT((((uintptr_t)&obj) >> JSVAL_TAG_SHIFT) == 0);
 #endif
         setObjectNoCheck(&obj);