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

Unified Diff: Source/devtools/front_end/emulation/MediaQueryInspector.js

Issue 1285183006: DevTools: WI.Throttler goes promisified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cc
Patch Set: remove dependent patchset Created 5 years, 4 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: Source/devtools/front_end/emulation/MediaQueryInspector.js
diff --git a/Source/devtools/front_end/emulation/MediaQueryInspector.js b/Source/devtools/front_end/emulation/MediaQueryInspector.js
index 0fa351ff1d8a390d185626f7d4a0ef1869a4015f..6624d38a1b3c416f3249bc8b0f042e43c7dc6c91 100644
--- a/Source/devtools/front_end/emulation/MediaQueryInspector.js
+++ b/Source/devtools/front_end/emulation/MediaQueryInspector.js
@@ -175,20 +175,13 @@ WebInspector.MediaQueryInspector.prototype = {
this._mediaThrottler.schedule(this._refetchMediaQueries.bind(this));
},
- /**
- * @param {!WebInspector.Throttler.FinishCallback} finishCallback
- */
- _refetchMediaQueries: function(finishCallback)
+ _refetchMediaQueries: function()
{
- if (!this._enabled || !this._cssModel) {
- finishCallback();
- return;
- }
+ if (!this._enabled || !this._cssModel)
+ return Promise.resolve();
- this._cssModel.mediaQueriesPromise()
+ return this._cssModel.mediaQueriesPromise()
.then(this._rebuildMediaQueries.bind(this))
- .then(finishCallback)
- .catch(finishCallback);
},
/**
« no previous file with comments | « Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | Source/devtools/front_end/emulation/OverridesSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698