(queue, context)
| 7489 | } |
| 7490 | |
| 7491 | function commitCallbacks(queue, context) { |
| 7492 | var callbackList = queue.callbackList; |
| 7493 | if (callbackList === null) { |
| 7494 | return; |
| 7495 | } |
| 7496 | // Set the list to null to make sure they don't get called more than once. |
| 7497 | queue.callbackList = null; |
| 7498 | for (var i = 0; i < callbackList.length; i++) { |
| 7499 | var update = callbackList[i]; |
| 7500 | var _callback = update.callback; |
| 7501 | // This update might be processed again. Clear the callback so it's only |
| 7502 | // called once. |
| 7503 | update.callback = null; |
| 7504 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 7505 | _callback.call(context); |
| 7506 | } |
| 7507 | } |
| 7508 | |
| 7509 | var fakeInternalInstance = {}; |
| 7510 | var isArray = Array.isArray; |
no test coverage detected