Bug 1522817 - Always expose returned target object of wrapper r=sfink

The comment here talks about unmarking wrapper targets in case we're in incremental GC, but it does it conditially based on the color of the wrapper.  We can't depend on that because a wrapper marked gray may eventually be marked black.  Also, I don't think we should be touching gray wrappers anyway.  Let's just always expose here.

Differential Revision: https://phabricator.services.mozilla.com/D29211
This commit is contained in:
Jon Coppeard 2019-04-29 16:06:09 +01:00
Родитель 7244e596e1
Коммит 9fb9743d5d
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -310,9 +310,7 @@ JSObject* Wrapper::wrappedObject(JSObject* wrapper) {
// Unmark wrapper targets that should be black in case an incremental GC
// hasn't marked them the correct color yet.
if (!wrapper->isMarkedGray()) {
JS::ExposeObjectToActiveJS(target);
}
JS::ExposeObjectToActiveJS(target);
}
return target;