Remove ContentParent calls to MessageChannel::CloseWithError. (bug 1275467, r=billm)

--HG--
extra : rebase_source : da7cd0836576aedb6ed3ee7a3b287445b102e6b4
This commit is contained in:
David Anderson 2016-06-09 17:52:33 -04:00
parent f2f2201959
commit a00c07b27f
2 changed files with 3 additions and 14 deletions

View File

@ -1762,8 +1762,7 @@ ContentParent::ShutDownProcess(ShutDownMethod aMethod)
}
// If Close() fails with an error, we'll end up back in this function, but
// with aMethod = CLOSE_CHANNEL_WITH_ERROR. It's important that we call
// CloseWithError() in this case; see bug 895204.
// with aMethod = CLOSE_CHANNEL_WITH_ERROR.
if (aMethod == CLOSE_CHANNEL && !mCalledClose) {
// Close() can only be called once: It kicks off the destruction
@ -1779,14 +1778,6 @@ ContentParent::ShutDownProcess(ShutDownMethod aMethod)
#endif
}
if (aMethod == CLOSE_CHANNEL_WITH_ERROR && !mCalledCloseWithError) {
MessageChannel* channel = GetIPCChannel();
if (channel) {
mCalledCloseWithError = true;
channel->CloseWithError();
}
}
const ManagedContainer<POfflineCacheUpdateParent>& ocuParents =
ManagedPOfflineCacheUpdateParent();
for (auto iter = ocuParents.ConstIter(); !iter.Done(); iter.Next()) {
@ -2315,7 +2306,6 @@ ContentParent::InitializeMembers()
mMetamorphosed = false;
mSendPermissionUpdates = false;
mCalledClose = false;
mCalledCloseWithError = false;
mCalledKillHard = false;
mCreatedPairedMinidumps = false;
mShutdownPending = false;

View File

@ -1168,10 +1168,9 @@ private:
bool mIsNuwaProcess;
bool mHasGamepadListener;
// These variables track whether we've called Close(), CloseWithError()
// and KillHard() on our channel.
// These variables track whether we've called Close() and KillHard() on our
// channel.
bool mCalledClose;
bool mCalledCloseWithError;
bool mCalledKillHard;
bool mCreatedPairedMinidumps;
bool mShutdownPending;