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 05cb04d135b8cdbf3795b86649204eb8c16aae42..71ce6049e70882148ab12a26c11753d6a5750467 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js |
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js |
@@ -38,10 +38,13 @@ WebInspector.Persistence.prototype = { |
*/ |
_onBindingCreated: function(binding) |
{ |
- if (binding.network.isDirty() || binding.fileSystem.isDirty()) { |
+ if (binding.network.isDirty()) { |
WebInspector.console.log(WebInspector.UIString("%s can not be persisted to file system due to unsaved changes.", binding.network.name())); |
return; |
} |
+ if (binding.fileSystem.isDirty()) |
+ binding.network.setWorkingCopy(binding.fileSystem.workingCopy()); |
+ |
binding.network[WebInspector.Persistence._binding] = binding; |
binding.fileSystem[WebInspector.Persistence._binding] = binding; |
@@ -61,6 +64,9 @@ WebInspector.Persistence.prototype = { |
*/ |
_onBindingRemoved: function(binding) |
{ |
+ if (binding.network.isDirty()) |
+ binding.fileSystem.setWorkingCopy(binding.network.workingCopy()); |
dgozman
2016/10/24 18:14:50
Can we test working copy as well?
lushnikov
2016/10/25 00:45:26
Done.
|
+ |
binding.network[WebInspector.Persistence._binding] = null; |
binding.fileSystem[WebInspector.Persistence._binding] = null; |