MCPcopy
hub / github.com/angular-ui/ui-router / completeOutstandingRequest

Function completeOutstandingRequest

test/angular/1.4/angular.js:5762–5777  ·  view source on GitHub ↗

* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.

(fn)

Source from the content-addressed store, hash-verified

5760 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
5761 */
5762 function completeOutstandingRequest(fn) {
5763 try {
5764 fn.apply(null, sliceArgs(arguments, 1));
5765 } finally {
5766 outstandingRequestCount--;
5767 if (outstandingRequestCount === 0) {
5768 while (outstandingRequestCallbacks.length) {
5769 try {
5770 outstandingRequestCallbacks.pop()();
5771 } catch (e) {
5772 $log.error(e);
5773 }
5774 }
5775 }
5776 }
5777 }
5778
5779 function getHash(url) {
5780 var index = url.indexOf('#');

Callers 1

BrowserFunction · 0.70

Calls 1

sliceArgsFunction · 0.70

Tested by

no test coverage detected