Bug 797515 - Fix race condition in assertion in ContentParent::~ContentParent. r=cjones

This commit is contained in:
Justin Lebar 2012-10-04 00:44:50 -04:00
Родитель d069aa6366
Коммит abae78a22a
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -774,8 +774,12 @@ ContentParent::~ContentParent()
MOZ_ASSERT(!gNonAppContentParents ||
!gNonAppContentParents->Contains(this));
} else {
// In general, we expect gAppContentParents->Get(mAppManifestURL) to be
// NULL. But it could be that we created another ContentParent for this
// app after we did this->ActorDestroy(), so the right check is that
// gAppContentParent->Get(mAppManifestURL) != this.
MOZ_ASSERT(!gAppContentParents ||
!gAppContentParents->Get(mAppManifestURL));
gAppContentParents->Get(mAppManifestURL) != this);
}
}