CompletionHandlerAgent fire() is a one shot.

This commit is contained in:
cacaodev committed 2017-06-30 12:03:09 +02:00
1 parent dc87354702
commit b78e9062a1
1 file changed
+8 -1
+8 -1
View File
@@ -501,7 +501,12 @@ CompletionHandlerAgent.prototype.completionHandler = function()
CompletionHandlerAgent.prototype.fire = function()
{
this._completionHandler();
if (this.valid)
{
this._completionHandler();
this.valid = false;
this.total = 0;
}
};
CompletionHandlerAgent.prototype.increment = function(inc)
@@ -525,6 +530,8 @@ CompletionHandlerAgent.prototype.decrement = function()
CompletionHandlerAgent.prototype.invalidate = function()
{
this.valid = false;
this.total = 0;
this._completionHandler = null;
};
var _animationFlushingObserverCallback = function()