diff options
author | Nicolas B. Pierron <nicolas.b.pierron@nbp.name> | 2019-03-21 21:28:10 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-23 02:00:27 +0100 |
commit | 5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1 (patch) | |
tree | 7334158aa587ccda58b698db7555d97c09505bea /js | |
parent | 80dfca45772a4d4fc5fd61630e2a812e779ec620 (diff) | |
download | UXP-5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1.tar UXP-5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1.tar.gz UXP-5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1.tar.lz UXP-5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1.tar.xz UXP-5ec124cf03f7380da68d6b1b5bcdf41ec7d5dbe1.zip |
Force expected crashes on unexpected magic values.
Diffstat (limited to 'js')
-rw-r--r-- | js/public/Value.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/public/Value.h b/js/public/Value.h index 01666ed4e..7c4f833e3 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -567,8 +567,11 @@ class MOZ_NON_PARAM alignas(8) Value } bool isMagic(JSWhyMagic why) const { - MOZ_ASSERT_IF(isMagic(), data.s.payload.why == why); - return isMagic(); + if (!isMagic()) { + return false; + } + MOZ_RELEASE_ASSERT(data.s.payload.why == why); + return true; } JS::TraceKind traceKind() const { |