(queue, context)
| 8122 | } |
| 8123 | |
| 8124 | function commitCallbacks(queue, context) { |
| 8125 | var callbackList = queue.callbackList; |
| 8126 | if (callbackList === null) { |
| 8127 | return; |
| 8128 | } |
| 8129 | // Set the list to null to make sure they don't get called more than once. |
| 8130 | queue.callbackList = null; |
| 8131 | for (var i = 0; i < callbackList.length; i++) { |
| 8132 | var update = callbackList[i]; |
| 8133 | var _callback = update.callback; |
| 8134 | // This update might be processed again. Clear the callback so it's only |
| 8135 | // called once. |
| 8136 | update.callback = null; |
| 8137 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 8138 | _callback.call(context); |
| 8139 | } |
| 8140 | } |
| 8141 | |
| 8142 | var fakeInternalInstance = {}; |
| 8143 | var isArray = Array.isArray; |
no test coverage detected