зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1509985: Backout diagnostic bug 1366083 - slight slowdown, and it has not found any errors, r=jonco
--HG-- extra : topic : hazard extra : rebase_source : 5cbcd285bfb0fde14225a84b9107178fb70d5470 extra : amend_source : 0ed3afa45b1e1a9777d0a6e05e1cec46e447eb89
This commit is contained in:
Родитель
5b2fef1b25
Коммит
da6839f947
|
@ -481,18 +481,6 @@ union alignas(8) Value
|
|||
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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче