MCPcopy Index your code
hub / github.com/angular-ui/ui-router / completeOutstandingRequest

Function completeOutstandingRequest

test/angular/1.2/angular.js:4411–4426  ·  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

4409 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
4410 */
4411 function completeOutstandingRequest(fn) {
4412 try {
4413 fn.apply(null, sliceArgs(arguments, 1));
4414 } finally {
4415 outstandingRequestCount--;
4416 if (outstandingRequestCount === 0) {
4417 while(outstandingRequestCallbacks.length) {
4418 try {
4419 outstandingRequestCallbacks.pop()();
4420 } catch (e) {
4421 $log.error(e);
4422 }
4423 }
4424 }
4425 }
4426 }
4427
4428 function getHash(url) {
4429 var index = url.indexOf('#');

Callers 1

BrowserFunction · 0.70

Calls 1

sliceArgsFunction · 0.70

Tested by

no test coverage detected