Fix Value::isGCThing footgun, stop returning true for NullValue

This commit is contained in:
trav90
2018-04-07 12:24:30 -05:00
parent d960419686
commit bbd4001cb2
31 changed files with 87 additions and 103 deletions
+1 -1
View File
@@ -3309,7 +3309,7 @@ js::detail::CopyScript(JSContext* cx, HandleScript src, HandleScript dst,
GCPtrValue* vector = Rebase<GCPtrValue>(dst, src, src->consts()->vector);
dst->consts()->vector = vector;
for (unsigned i = 0; i < nconsts; ++i)
MOZ_ASSERT_IF(vector[i].isMarkable(), vector[i].toString()->isAtom());
MOZ_ASSERT_IF(vector[i].isGCThing(), vector[i].toString()->isAtom());
}
if (nobjects != 0) {
GCPtrObject* vector = Rebase<GCPtrObject>(dst, src, src->objects()->vector);