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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.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/elements/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index 765bcc4cfa0814faaf6b428cf0db93657b1f0ad6..30c757486cb9a2b913ef40a8078cfb7bc8e54c4a 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -469,15 +469,16 @@ WebInspector.StylesSidebarPane.prototype = {
{
if (!styleSheetHeader)
return;
- styleSheetHeader.requestContent(onStyleSheetContent.bind(this, styleSheetHeader.id));
+ styleSheetHeader.requestContent().then(onStyleSheetContent.bind(this, styleSheetHeader.id));
/**
* @param {string} styleSheetId
- * @param {string} text
+ * @param {?string} text
* @this {WebInspector.StylesSidebarPane}
*/
function onStyleSheetContent(styleSheetId, text)
{
+ text = text || "";
var lines = text.split("\n");
var range = WebInspector.TextRange.createFromLocation(lines.length - 1, lines[lines.length - 1].length);
this._addBlankSection(this._sectionBlocks[0].sections[0], styleSheetId, range);

Powered by Google App Engine
This is Rietveld 408576698