Web Inspector: SourceCode.requestContent should return a promise
[WebKit-https.git] / Source / WebInspectorUI / UserInterface / Controllers / CSSStyleManager.js
index 7aa64abb066662e501abc16c187f1563d99d0b16..9e1c88b2545a11e6ace899cbf240762d52bfe240 100644 (file)
@@ -310,8 +310,11 @@ WebInspector.CSSStyleManager.prototype = {
     {
         console.assert(styleSheet);
 
-        function fetchedStyleSheetContent(styleSheet, content)
+        function fetchedStyleSheetContent(parameters)
         {
+            var styleSheet = parameters.sourceCode;
+            var content = parameters.content;
+
             delete styleSheet.__pendingChangeTimeout;
 
             console.assert(styleSheet.url);
@@ -347,7 +350,7 @@ WebInspector.CSSStyleManager.prototype = {
 
         function styleSheetReady()
         {
-            styleSheet.requestContent(fetchedStyleSheetContent.bind(this));
+            styleSheet.requestContent().then(fetchedStyleSheetContent.bind(this));
         }
 
         function applyStyleSheetChanges()