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

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

Issue 2578823002: DevTools: [Persistence] sync resetting of working copy (Closed)
Patch Set: 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-expected.txt ('k') | 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 d22a345776ca9a6fa31024670452ecdc51bef5ad..8ecf83d5bcbaa8e205c2249b067f278813c19941 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js
@@ -135,6 +135,14 @@ Persistence.Persistence = class extends Common.Object {
if (!binding || binding[Persistence.Persistence._muteWorkingCopy])
return;
var other = binding.network === uiSourceCode ? binding.fileSystem : binding.network;
+ if (!uiSourceCode.isDirty()) {
+ binding[Persistence.Persistence._muteWorkingCopy] = true;
+ other.resetWorkingCopy();
+ binding[Persistence.Persistence._muteWorkingCopy] = false;
+ this._contentSyncedForTest();
+ return;
+ }
+
var target = Bindings.NetworkProject.targetForUISourceCode(binding.network);
if (target.isNodeJS()) {
var newContent = uiSourceCode.workingCopy();
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sync-content-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698