(serviceName, caller)
| 4537 | function createInternalInjector(cache, factory) { |
| 4538 | |
| 4539 | function getService(serviceName, caller) { |
| 4540 | if (cache.hasOwnProperty(serviceName)) { |
| 4541 | if (cache[serviceName] === INSTANTIATING) { |
| 4542 | throw $injectorMinErr('cdep', 'Circular dependency found: {0}', |
| 4543 | serviceName + ' <- ' + path.join(' <- ')); |
| 4544 | } |
| 4545 | return cache[serviceName]; |
| 4546 | } else { |
| 4547 | try { |
| 4548 | path.unshift(serviceName); |
| 4549 | cache[serviceName] = INSTANTIATING; |
| 4550 | return cache[serviceName] = factory(serviceName, caller); |
| 4551 | } catch (err) { |
| 4552 | if (cache[serviceName] === INSTANTIATING) { |
| 4553 | delete cache[serviceName]; |
| 4554 | } |
| 4555 | throw err; |
| 4556 | } finally { |
| 4557 | path.shift(); |
| 4558 | } |
| 4559 | } |
| 4560 | } |
| 4561 | |
| 4562 | |
| 4563 | function injectionArgs(fn, locals, serviceName) { |
no test coverage detected