Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: third_party/WebKit/Source/modules/eventsource/EventSource.cpp

Issue 2649323005: Cleanly detach XHR and other pending loader clients from Inspector. (Closed)
Patch Set: rebalance XHR disposal steps Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/eventsource/EventSource.cpp
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
index 55659cda1f1db9b7da2d066761ce1bc2c3454f19..646b47063596a54006294e8a2b2c683be53aff6a 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
+++ b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
@@ -122,6 +122,10 @@ EventSource::~EventSource() {
DCHECK(!m_loader);
}
+void EventSource::dispose() {
+ InspectorInstrumentation::detachClientRequest(getExecutionContext(), this);
+}
+
void EventSource::scheduleInitialConnect() {
DCHECK_EQ(kConnecting, m_state);
DCHECK(!m_loader);
@@ -370,6 +374,7 @@ void EventSource::abortConnectionAttempt() {
}
void EventSource::contextDestroyed(ExecutionContext*) {
+ InspectorInstrumentation::detachClientRequest(getExecutionContext(), this);
close();
}
« no previous file with comments | « third_party/WebKit/Source/modules/eventsource/EventSource.h ('k') | third_party/WebKit/Source/modules/fetch/FetchManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698