(queue, context)
| 8001 | } |
| 8002 | |
| 8003 | function commitCallbacks(queue, context) { |
| 8004 | var callbackList = queue.callbackList; |
| 8005 | if (callbackList === null) { |
| 8006 | return; |
| 8007 | } |
| 8008 | // Set the list to null to make sure they don't get called more than once. |
| 8009 | queue.callbackList = null; |
| 8010 | for (var i = 0; i < callbackList.length; i++) { |
| 8011 | var update = callbackList[i]; |
| 8012 | var _callback = update.callback; |
| 8013 | // This update might be processed again. Clear the callback so it's only |
| 8014 | // called once. |
| 8015 | update.callback = null; |
| 8016 | !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0; |
| 8017 | _callback.call(context); |
| 8018 | } |
| 8019 | } |
| 8020 | |
| 8021 | var fakeInternalInstance = {}; |
| 8022 | var isArray = Array.isArray; |
no test coverage detected