Bug 1527850 - Null out CompartmentPrivate's scope pointer when moving XPCWrappedNativeScope to the dying scopes list. r=bzbarsky

Differential Revision: https://phabricator.services.mozilla.com/D19772

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-02-14 15:59:42 +00:00
Родитель bdd1cad961
Коммит 095c9d9c6f
1 изменённых файлов: 1 добавлений и 0 удалений

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

@ -351,6 +351,7 @@ void XPCWrappedNativeScope::UpdateWeakPointersAfterGC() {
// Update our pointer to the compartment in case we finalized all globals.
if (!js::CompartmentHasLiveGlobal(mCompartment)) {
CompartmentPrivate::Get(mCompartment)->scope = nullptr;
mCompartment = nullptr;
GetWrappedNativeMap()->Clear();
mWrappedNativeProtoMap->Clear();