зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634982 - Don't call DocumentChannelBridgeDisconnected when already being disconnected from the DocumentLoadListener. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74517
This commit is contained in:
Родитель
3ccaaa0422
Коммит
28d4ac9c33
|
@ -162,12 +162,16 @@ void ParentProcessDocumentChannel::DisconnectDocumentLoadListener() {
|
|||
if (!mDocumentLoadListener) {
|
||||
return;
|
||||
}
|
||||
mDocumentLoadListener->DocumentChannelBridgeDisconnected();
|
||||
mDocumentLoadListener = nullptr;
|
||||
RemoveObserver();
|
||||
}
|
||||
|
||||
void ParentProcessDocumentChannel::RemoveObserver() {
|
||||
if (nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService()) {
|
||||
observerService->RemoveObserver(this, NS_HTTP_ON_MODIFY_REQUEST_TOPIC);
|
||||
}
|
||||
mDocumentLoadListener->DocumentChannelBridgeDisconnected();
|
||||
mDocumentLoadListener = nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -42,7 +42,8 @@ class ParentProcessDocumentChannel : public DocumentChannel,
|
|||
void DisconnectChildListeners(nsresult aStatus,
|
||||
nsresult aLoadGroupStatus) override {
|
||||
DocumentChannel::DisconnectChildListeners(aStatus, aLoadGroupStatus);
|
||||
DisconnectDocumentLoadListener();
|
||||
RemoveObserver();
|
||||
mDocumentLoadListener = nullptr;
|
||||
}
|
||||
void Delete() override {}
|
||||
void DeleteIPDL() override {
|
||||
|
@ -53,6 +54,7 @@ class ParentProcessDocumentChannel : public DocumentChannel,
|
|||
private:
|
||||
virtual ~ParentProcessDocumentChannel();
|
||||
void DisconnectDocumentLoadListener();
|
||||
void RemoveObserver();
|
||||
|
||||
RefPtr<DocumentLoadListener> mDocumentLoadListener;
|
||||
nsTArray<ipc::Endpoint<extensions::PStreamFilterParent>>
|
||||
|
|
Загрузка…
Ссылка в новой задаче