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

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

Issue 2546583003: DevTools: [Persistence] guard against multiple UISourceCodes with similar URL (Closed)
Patch Set: add fixme Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
index 0a0bd178b62cd8b9dd369500c53d07d7b7e8d650..817cad606a3a75ebd61f5e8dff0f8f5f1712d059 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
@@ -32,6 +32,9 @@ Persistence.Persistence = class extends Common.Object {
* @param {!Persistence.PersistenceBinding} binding
*/
_onBindingCreated(binding) {
+ // FIXME(lushnikov): workspace should contain only one UISourceCode per URL.
dgozman 2016/12/01 18:29:05 TODO
+ if (binding.network[Persistence.Persistence._binding] || binding.fileSystem[Persistence.Persistence._binding])
dgozman 2016/12/01 18:29:06 I think we should move this check to both mappings
lushnikov 2016/12/02 01:54:55 Since Persistence instance is nicely isolated from
+ return;
if (binding.network.isDirty()) {
Common.console.log(
Common.UIString('%s can not be persisted to file system due to unsaved changes.', binding.network.name()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698