mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 784282 - GC: Assert that cross-compartment pointers are wrapped when marking r=billm
This commit is contained in:
parent
1a47184b94
commit
7fc41759f9
@ -1160,11 +1160,14 @@ GCMarker::processMarkStackTop(SliceBudget &budget)
|
||||
if (v.isString()) {
|
||||
JSString *str = v.toString();
|
||||
JS_COMPARTMENT_ASSERT_STR(runtime, str);
|
||||
if (str->markIfUnmarked())
|
||||
JS_ASSERT(str->compartment() == runtime->atomsCompartment ||
|
||||
str->compartment() == obj->compartment());
|
||||
if (str->markIfUnmarked())
|
||||
ScanString(this, str);
|
||||
} else if (v.isObject()) {
|
||||
JSObject *obj2 = &v.toObject();
|
||||
JS_COMPARTMENT_ASSERT(runtime, obj2);
|
||||
JS_ASSERT(obj->compartment() == obj2->compartment());
|
||||
if (obj2->markIfUnmarked(getMarkColor())) {
|
||||
pushValueArray(obj, vp, end);
|
||||
obj = obj2;
|
||||
|
Loading…
Reference in New Issue
Block a user