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

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js

Issue 2784733002: DevTools: prepare tests for Persistence2.0 release (Closed)
Patch Set: address comments + three special tests Created 3 years, 9 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/devtools/front_end/persistence/Automapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js b/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
index 5c837a177eeeab5b71e3a851ec1e97b007ef4ca7..d71391a7581569f513840c327e5afdb8fd2f3852 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
@@ -149,7 +149,7 @@ Persistence.Automapping = class {
if (networkSourceCode[Persistence.Automapping._processingPromise] !== createBindingPromise)
return;
networkSourceCode[Persistence.Automapping._processingPromise] = null;
- if (!binding) {
+ if (!binding || this._disposed) {
this._onBindingFailedForTest();
return;
}
@@ -277,6 +277,15 @@ Persistence.Automapping = class {
return timeMatches && contentMatches;
});
}
+
+ dispose() {
+ if (this._disposed)
+ return;
+ this._disposed = true;
+ Common.EventTarget.removeEventListeners(this._eventListeners);
+ for (var binding of this._bindings.valuesArray())
+ this._unbindNetwork(binding.network);
+ }
};
Persistence.Automapping._binding = Symbol('Automapping.Binding');

Powered by Google App Engine
This is Rietveld 408576698