(queue, context)
| 7458 | } |
| 7459 | |
| 7460 | function commitCallbacks(queue, context) { |
| 7461 | var callbackList = queue.callbackList; |
| 7462 | if (callbackList === null) { |
| 7463 | return; |
| 7464 | } |
| 7465 | // Set the list to null to make sure they don't get called more than once. |
| 7466 | queue.callbackList = null; |
| 7467 | for (var i = 0; i < callbackList.length; i++) { |
| 7468 | var update = callbackList[i]; |
| 7469 | var _callback = update.callback; |
| 7470 | // This update might be processed again. Clear the callback so it's only |
| 7471 | // called once. |
| 7472 | update.callback = null; |
| 7473 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 7474 | _callback.call(context); |
| 7475 | } |
| 7476 | } |
| 7477 | |
| 7478 | var fakeInternalInstance = {}; |
| 7479 | var isArray = Array.isArray; |
no test coverage detected