Index: third_party/WebKit/Source/devtools/front_end/common/Throttler.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Throttler.js b/third_party/WebKit/Source/devtools/front_end/common/Throttler.js |
index 284f47e321ee8c04af82a43e97bcb43e4dd2d625..074b27dc9aeb4ce9868a4cd8942dc15b2ea476d8 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/common/Throttler.js |
+++ b/third_party/WebKit/Source/devtools/front_end/common/Throttler.js |
@@ -13,11 +13,13 @@ WebInspector.Throttler = function(timeout) |
this._asSoonAsPossible = false; |
/** @type {?function():(!Promise.<?>)} */ |
this._process = null; |
+ this._lastCompleteTime = 0; |
} |
WebInspector.Throttler.prototype = { |
_processCompleted: function() |
{ |
+ this._lastCompleteTime = Date.now(); |
caseq
2016/05/05 01:39:19
performance.now() * 1000?
|
this._isRunningProcess = false; |
if (this._process) |
this._innerSchedule(false); |
@@ -53,7 +55,7 @@ WebInspector.Throttler.prototype = { |
// Run the first scheduled task instantly. |
var hasScheduledTasks = !!this._processTimeout || this._isRunningProcess; |
- asSoonAsPossible = !!asSoonAsPossible || !hasScheduledTasks; |
+ asSoonAsPossible = !!asSoonAsPossible || (!hasScheduledTasks && Date.now() - this._lastCompleteTime > this._timeout); |
caseq
2016/05/05 01:39:19
ditto.
|
var forceTimerUpdate = asSoonAsPossible && !this._asSoonAsPossible; |
this._asSoonAsPossible = this._asSoonAsPossible || asSoonAsPossible; |