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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js

Issue 1974543002: DevTools: do not pro-actively query all StyleSheets for their content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/sources/ScriptFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index 8099ae75c0640ab4fa913bba955cace7a9edae5a..03c947ba9bb9916a520c401c8a502e2bfa34034b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -369,7 +369,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
{
var scripts = this._scriptsForUISourceCode(uiSourceCode);
var formattedURL = uiSourceCode.url() + ":formatted";
- var contentProvider = new WebInspector.StaticContentProvider(formattedURL, uiSourceCode.contentType(), Promise.resolve(formattedContent));
+ var contentProvider = WebInspector.StaticContentProvider.fromString(formattedURL, uiSourceCode.contentType(), formattedContent);
var formattedUISourceCode = this._project.addContentProvider(formattedURL, contentProvider);
var formattedPath = formattedUISourceCode.url();
var formatData = new WebInspector.FormatterScriptMapping.FormatData(uiSourceCode.project().id(), uiSourceCode.url(), formatterMapping, scripts);

Powered by Google App Engine
This is Rietveld 408576698