(queue, context)
| 8163 | } |
| 8164 | |
| 8165 | function commitCallbacks(queue, context) { |
| 8166 | var callbackList = queue.callbackList; |
| 8167 | if (callbackList === null) { |
| 8168 | return; |
| 8169 | } |
| 8170 | // Set the list to null to make sure they don't get called more than once. |
| 8171 | queue.callbackList = null; |
| 8172 | for (var i = 0; i < callbackList.length; i++) { |
| 8173 | var update = callbackList[i]; |
| 8174 | var _callback = update.callback; |
| 8175 | // This update might be processed again. Clear the callback so it's only |
| 8176 | // called once. |
| 8177 | update.callback = null; |
| 8178 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 8179 | _callback.call(context); |
| 8180 | } |
| 8181 | } |
| 8182 | |
| 8183 | var fakeInternalInstance = {}; |
| 8184 | var isArray = Array.isArray; |
no test coverage detected