summaryrefslogtreecommitdiff
path: root/js/src/vm/ProxyObject.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-07 12:24:30 -0500
committertrav90 <travawine@protonmail.ch>2018-04-07 13:11:38 -0500
commitbbd4001cb261cc54e2adf804ea7cbeb09078d7d9 (patch)
tree581523beea01c0b144051caebb6cb8a95539717a /js/src/vm/ProxyObject.cpp
parentd960419686462067cb5745dcd1ad264abe0b1485 (diff)
downloaduxp-bbd4001cb261cc54e2adf804ea7cbeb09078d7d9.tar.gz
Fix Value::isGCThing footgun, stop returning true for NullValue
Diffstat (limited to 'js/src/vm/ProxyObject.cpp')
-rw-r--r--js/src/vm/ProxyObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/vm/ProxyObject.cpp b/js/src/vm/ProxyObject.cpp
index 49ed5a6241..69b4cd952f 100644
--- a/js/src/vm/ProxyObject.cpp
+++ b/js/src/vm/ProxyObject.cpp
@@ -45,7 +45,7 @@ ProxyObject::New(JSContext* cx, const BaseProxyHandler* handler, HandleValue pri
// wrappee. Prefer to allocate in the nursery, when possible.
NewObjectKind newKind = NurseryAllocatedProxy;
if (options.singleton()) {
- MOZ_ASSERT(priv.isGCThing() && priv.toGCThing()->isTenured());
+ MOZ_ASSERT(priv.isNull() || (priv.isGCThing() && priv.toGCThing()->isTenured()));
newKind = SingletonObject;
} else if ((priv.isGCThing() && priv.toGCThing()->isTenured()) ||
!handler->canNurseryAllocate() ||