(queue, context)
| 8266 | } |
| 8267 | |
| 8268 | function commitCallbacks(queue, context) { |
| 8269 | var callbackList = queue.callbackList; |
| 8270 | if (callbackList === null) { |
| 8271 | return; |
| 8272 | } |
| 8273 | // Set the list to null to make sure they don't get called more than once. |
| 8274 | queue.callbackList = null; |
| 8275 | for (var i = 0; i < callbackList.length; i++) { |
| 8276 | var update = callbackList[i]; |
| 8277 | var _callback = update.callback; |
| 8278 | // This update might be processed again. Clear the callback so it's only |
| 8279 | // called once. |
| 8280 | update.callback = null; |
| 8281 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 8282 | _callback.call(context); |
| 8283 | } |
| 8284 | } |
| 8285 | |
| 8286 | var fakeInternalInstance = {}; |
| 8287 | var isArray = Array.isArray; |
no test coverage detected