Bug 1349699 - Assert that the Chromium channel is closed when MessageLoop is destroyed (r=dvander)

MozReview-Commit-ID: I7HyjVanlxJ
This commit is contained in:
Bill McCloskey 2017-03-20 15:29:05 -07:00
Родитель 754aae1913
Коммит 48196dd880
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -654,6 +654,16 @@ MessageChannel::Clear()
// In practice, mListener owns the channel, so the channel gets deleted
// before mListener. But just to be safe, mListener is a weak pointer.
#if !defined(ANDROID)
if (!Unsound_IsClosed()) {
#if defined(MOZ_CRASHREPORTER)
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ProtocolName"),
nsDependentCString(mName));
#endif
MOZ_CRASH("MessageChannel destroyed without being closed");
}
#endif
if (gParentProcessBlocker == this) {
gParentProcessBlocker = nullptr;
}