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

Unified Diff: Source/devtools/front_end/bindings/StylesSourceMapping.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/bindings/StylesSourceMapping.js
diff --git a/Source/devtools/front_end/bindings/StylesSourceMapping.js b/Source/devtools/front_end/bindings/StylesSourceMapping.js
index ea0a69745197c32a86e80b13688e06fbe97ea45d..ba4edd05f0eedd831438e44bf6d907525df87a43 100644
--- a/Source/devtools/front_end/bindings/StylesSourceMapping.js
+++ b/Source/devtools/front_end/bindings/StylesSourceMapping.js
@@ -373,16 +373,12 @@ WebInspector.StyleFile.prototype = {
this._commitThrottler.schedule(this._commitIncrementalEdit.bind(this), false);
},
- /**
- * @param {!WebInspector.Throttler.FinishCallback} finishCallback
- */
- _commitIncrementalEdit: function(finishCallback)
+ _commitIncrementalEdit: function()
{
- this._mapping._setStyleContent(this._uiSourceCode, this._uiSourceCode.workingCopy(), this._isMajorChangePending)
+ var promise = this._mapping._setStyleContent(this._uiSourceCode, this._uiSourceCode.workingCopy(), this._isMajorChangePending)
.then(this._styleContentSet.bind(this))
- .then(finishCallback)
- .catch(/** @type {function()} */(finishCallback));
this._isMajorChangePending = false;
+ return promise;
},
/**

Powered by Google App Engine
This is Rietveld 408576698