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

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

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 11 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 1d8c9e908240c816daa3c884ecc2c942f3d0425d..17bab00c98257cdb27b4cc039338c38c2106d968 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -222,9 +222,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
_toggleFormatScriptSource: function()
{
var uiSourceCode = this._sourcesView.currentUISourceCode();
- if (!this._isFormatableScript(uiSourceCode))
- return;
- this._formatUISourceCodeScript(uiSourceCode);
+ if (this._isFormatableScript(uiSourceCode))
+ this._formatUISourceCodeScript(uiSourceCode);
},
/**
@@ -349,7 +348,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
return;
}
- uiSourceCode.requestContent(contentLoaded.bind(this));
+ uiSourceCode.requestContent().then(contentLoaded.bind(this));
/**
* @this {WebInspector.ScriptFormatterEditorAction}

Powered by Google App Engine
This is Rietveld 408576698