* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
(fn)
| 5800 | * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed. |
| 5801 | */ |
| 5802 | function completeOutstandingRequest(fn) { |
| 5803 | try { |
| 5804 | fn.apply(null, sliceArgs(arguments, 1)); |
| 5805 | } finally { |
| 5806 | outstandingRequestCount--; |
| 5807 | if (outstandingRequestCount === 0) { |
| 5808 | while (outstandingRequestCallbacks.length) { |
| 5809 | try { |
| 5810 | outstandingRequestCallbacks.pop()(); |
| 5811 | } catch (e) { |
| 5812 | $log.error(e); |
| 5813 | } |
| 5814 | } |
| 5815 | } |
| 5816 | } |
| 5817 | } |
| 5818 | |
| 5819 | function getHash(url) { |
| 5820 | var index = url.indexOf('#'); |