diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-08 18:16:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 18:16:01 +0200 |
commit | 6ac47e95318efb654682ed774fbbde1eb0fa2dd3 (patch) | |
tree | 05e3594dc85fd66d29d122184157901fe7e51837 /js/public/Proxy.h | |
parent | bf6bb142fc5bcb49b053788e06160af304f639e5 (diff) | |
parent | bbd4001cb261cc54e2adf804ea7cbeb09078d7d9 (diff) | |
download | UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.gz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.lz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.tar.xz UXP-6ac47e95318efb654682ed774fbbde1eb0fa2dd3.zip |
Merge pull request #94 from trav90/js-work
Fix Value::isGCThing footgun, stop returning true for NullValue
Diffstat (limited to 'js/public/Proxy.h')
-rw-r--r-- | js/public/Proxy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/public/Proxy.h b/js/public/Proxy.h index 3e95538db..5acb91b26 100644 --- a/js/public/Proxy.h +++ b/js/public/Proxy.h @@ -456,7 +456,7 @@ SetProxyExtra(JSObject* obj, size_t n, const Value& extra) Value* vp = &detail::GetProxyDataLayout(obj)->values->extraSlots[n]; // Trigger a barrier before writing the slot. - if (vp->isMarkable() || extra.isMarkable()) + if (vp->isGCThing() || extra.isGCThing()) SetValueInProxy(vp, extra); else *vp = extra; @@ -482,7 +482,7 @@ SetReservedOrProxyPrivateSlot(JSObject* obj, size_t slot, const Value& value) MOZ_ASSERT(slot == 0); MOZ_ASSERT(slot < JSCLASS_RESERVED_SLOTS(GetObjectClass(obj)) || IsProxy(obj)); shadow::Object* sobj = reinterpret_cast<shadow::Object*>(obj); - if (sobj->slotRef(slot).isMarkable() || value.isMarkable()) + if (sobj->slotRef(slot).isGCThing() || value.isGCThing()) SetReservedOrProxyPrivateSlotWithBarrier(obj, slot, value); else sobj->slotRef(slot) = value; |