mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Bug 1899339 - Part 2: Tighten up assertions when setting proxy private r=sfink
Something else I noticed while investigating this was the conditional assertion about not creating black to gray edges here. The contract is that we never pass gray GC things into the JS engine so this assertion can be tightened up. I tested with this change and didn't see any failures. Differential Revision: https://phabricator.services.mozilla.com/D212539
This commit is contained in:
parent
d6dc1ea230
commit
d3fda1245a
@ -554,9 +554,8 @@ inline void SetProxyReservedSlot(JSObject* obj, size_t n,
|
||||
|
||||
inline void SetProxyPrivate(JSObject* obj, const JS::Value& value) {
|
||||
#ifdef DEBUG
|
||||
if (gc::detail::ObjectIsMarkedBlack(obj)) {
|
||||
JS::AssertValueIsNotGray(value);
|
||||
}
|
||||
JS::AssertObjectIsNotGray(obj);
|
||||
JS::AssertValueIsNotGray(value);
|
||||
#endif
|
||||
|
||||
JS::Value* vp = &detail::GetProxyDataLayout(obj)->values()->privateSlot;
|
||||
|
Loading…
x
Reference in New Issue
Block a user