mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-01 12:07:34 +09:00
Fix Value::isGCThing footgun, stop returning true for NullValue
This commit is contained in:
parent
9d2e0ff0c4
commit
10b24b8110
31 changed files with 87 additions and 103 deletions
|
|
@ -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() ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue