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

Unified Diff: Source/devtools/front_end/platform/utilities.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/platform/utilities.js
diff --git a/Source/devtools/front_end/platform/utilities.js b/Source/devtools/front_end/platform/utilities.js
index ebd6d503c7aabee84be11b3b9fe33d1c1b281727..2e2939251e5a93d7558685853e35fa26b6b44af0 100644
--- a/Source/devtools/front_end/platform/utilities.js
+++ b/Source/devtools/front_end/platform/utilities.js
@@ -1422,6 +1422,23 @@ CallbackBarrier.prototype = {
},
/**
+ * @return {!Promise.<undefined>}
+ */
+ donePromise: function()
+ {
+ return new Promise(promiseConstructor.bind(this));
+
+ /**
+ * @param {function()} success
+ * @this {CallbackBarrier}
+ */
+ function promiseConstructor(success)
+ {
+ this.callWhenDone(success);
+ }
+ },
+
+ /**
* @param {function(...)=} userCallback
*/
_incomingCallback: function(userCallback)
« no previous file with comments | « Source/devtools/front_end/network/NetworkTimeCalculator.js ('k') | Source/devtools/front_end/profiler/HeapSnapshotView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698