(queue, context)
| 7361 | } |
| 7362 | |
| 7363 | function commitCallbacks(queue, context) { |
| 7364 | var callbackList = queue.callbackList; |
| 7365 | if (callbackList === null) { |
| 7366 | return; |
| 7367 | } |
| 7368 | // Set the list to null to make sure they don't get called more than once. |
| 7369 | queue.callbackList = null; |
| 7370 | for (var i = 0; i < callbackList.length; i++) { |
| 7371 | var update = callbackList[i]; |
| 7372 | var _callback = update.callback; |
| 7373 | // This update might be processed again. Clear the callback so it's only |
| 7374 | // called once. |
| 7375 | update.callback = null; |
| 7376 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 7377 | _callback.call(context); |
| 7378 | } |
| 7379 | } |
| 7380 | |
| 7381 | var fakeInternalInstance = {}; |
| 7382 | var isArray = Array.isArray; |
no test coverage detected