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