From d8ecd454698a702bc707834f48d959ffecd54611 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Mon, 30 Nov 2015 15:06:27 -0800 Subject: [PATCH] Add comment. --- src/lib/dom-api-flush.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/dom-api-flush.html b/src/lib/dom-api-flush.html index 618bdd722c..a198311f7c 100644 --- a/src/lib/dom-api-flush.html +++ b/src/lib/dom-api-flush.html @@ -31,6 +31,8 @@ this._flushGuard = 0; this._prepareFlush(); while (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) { + // Avoid using an index in this loop to ensure flush is safe to be + // called reentrantly from a debouncer callback being flushed while (this._debouncers.length) { this._debouncers.shift().complete(); }