summaryrefslogtreecommitdiff
path: root/xpcom/base/nsCycleCollector.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
commitedee6fab0d1774120eca1f343574a305c46359e9 (patch)
tree581523beea01c0b144051caebb6cb8a95539717a /xpcom/base/nsCycleCollector.cpp
parentc2cb5e2195a8553cddec26819522a57671312071 (diff)
downloaduxp-edee6fab0d1774120eca1f343574a305c46359e9.tar.gz
Fix Value::isGCThing footgun, stop returning true for NullValue
Diffstat (limited to 'xpcom/base/nsCycleCollector.cpp')
-rw-r--r--xpcom/base/nsCycleCollector.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
index ca7057628c..d867f596e3 100644
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2690,7 +2690,7 @@ public:
void* aClosure) const override
{
const JS::Value& val = aValue->unbarrieredGet();
- if (val.isMarkable() && ValueIsGrayCCThing(val)) {
+ if (val.isGCThing() && ValueIsGrayCCThing(val)) {
MOZ_ASSERT(!js::gc::IsInsideNursery(val.toGCThing()));
mCollector->GetJSPurpleBuffer()->mValues.InfallibleAppend(val);
}