| 3634 | function createInternalInjector(cache, factory) { |
| 3635 | |
| 3636 | function getService(serviceName) { |
| 3637 | if (cache.hasOwnProperty(serviceName)) { |
| 3638 | if (cache[serviceName] === INSTANTIATING) { |
| 3639 | throw $injectorMinErr('cdep', 'Circular dependency found: {0}', path.join(' <- ')); |
| 3640 | } |
| 3641 | return cache[serviceName]; |
| 3642 | } else { |
| 3643 | try { |
| 3644 | path.unshift(serviceName); |
| 3645 | cache[serviceName] = INSTANTIATING; |
| 3646 | return cache[serviceName] = factory(serviceName); |
| 3647 | } finally { |
| 3648 | path.shift(); |
| 3649 | } |
| 3650 | } |
| 3651 | } |
| 3652 | |
| 3653 | function invoke(fn, self, locals){ |
| 3654 | var args = [], |