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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js

Issue 2702583003: DevTools: do not assign empty content to CSS UISourceCode in case of protocol error (Closed)
Patch Set: fix test Created 3 years, 10 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/bindings/StylesSourceMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
index 49cb560acdc6cfcf0a820d99581a6e6968d0192a..ede1cdd25fc0578f8c770f5723b6a54013314086 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
@@ -269,11 +269,15 @@ Bindings.StylesSourceMapping = class {
*/
function callback(uiSourceCode, content) {
var styleFile = this._styleFiles.get(uiSourceCode);
- if (styleFile)
- styleFile.addRevision(content || '');
+ if (typeof content === 'string' && styleFile)
+ styleFile.addRevision(content);
+ this._styleFileSyncedForTest();
}
}
+ _styleFileSyncedForTest() {
+ }
+
dispose() {
Common.EventTarget.removeEventListeners(this._eventListeners);
}

Powered by Google App Engine
This is Rietveld 408576698