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

Unified Diff: Source/devtools/front_end/profiler/HeapSnapshotView.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
« no previous file with comments | « Source/devtools/front_end/platform/utilities.js ('k') | Source/devtools/front_end/ui/ThrottledWidget.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/profiler/HeapSnapshotView.js
diff --git a/Source/devtools/front_end/profiler/HeapSnapshotView.js b/Source/devtools/front_end/profiler/HeapSnapshotView.js
index 6b34a901ea99826cc257b9e6236ee51def96a3cd..d8592b1f1b121c8ba63cde99e5f7d8a26fbd8463 100644
--- a/Source/devtools/front_end/profiler/HeapSnapshotView.js
+++ b/Source/devtools/front_end/profiler/HeapSnapshotView.js
@@ -630,17 +630,7 @@ WebInspector.HeapSnapshotView.prototype = {
jumpBackwards || false
);
- // FIXME: remove this function once the Throttler becomes promisified.
- /**
- * @param {!WebInspector.HeapSnapshotCommon.SearchConfig} nextQuery
- * @param {function()} callback
- * @this {WebInspector.HeapSnapshotView}
- */
- function performSearchWrapper(nextQuery, callback)
- {
- this._performSearch(nextQuery).then(callback);
- }
- this._searchThrottler.schedule(performSearchWrapper.bind(this, nextQuery));
+ this._searchThrottler.schedule(this._performSearch.bind(this, nextQuery));
},
/**
@@ -686,16 +676,6 @@ WebInspector.HeapSnapshotView.prototype = {
},
/**
- * @param {number} searchResultIndex
- * @param {function()} callback
- */
- _jumpToSearchResultWrapper: function(searchResultIndex, callback)
- {
- // FIXME: remove this function once the Throttler becomes promisified.
- this._jumpToSearchResult(searchResultIndex).then(callback);
- },
-
- /**
* @override
*/
jumpToNextSearchResult: function()
@@ -703,7 +683,7 @@ WebInspector.HeapSnapshotView.prototype = {
if (!this._searchResults.length)
return;
this._currentSearchResultIndex = (this._currentSearchResultIndex + 1) % this._searchResults.length;
- this._searchThrottler.schedule(this._jumpToSearchResultWrapper.bind(this, this._currentSearchResultIndex));
+ this._searchThrottler.schedule(this._jumpToSearchResult.bind(this, this._currentSearchResultIndex));
},
/**
@@ -714,7 +694,7 @@ WebInspector.HeapSnapshotView.prototype = {
if (!this._searchResults.length)
return;
this._currentSearchResultIndex = (this._currentSearchResultIndex + this._searchResults.length - 1) % this._searchResults.length;
- this._searchThrottler.schedule(this._jumpToSearchResultWrapper.bind(this, this._currentSearchResultIndex));
+ this._searchThrottler.schedule(this._jumpToSearchResult.bind(this, this._currentSearchResultIndex));
},
/**
« no previous file with comments | « Source/devtools/front_end/platform/utilities.js ('k') | Source/devtools/front_end/ui/ThrottledWidget.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698