(mod, traced, processed)
| 586 | } |
| 587 | |
| 588 | function breakCycle(mod, traced, processed) { |
| 589 | var id = mod.map.id; |
| 590 | |
| 591 | if (mod.error) { |
| 592 | mod.emit('error', mod.error); |
| 593 | } else { |
| 594 | traced[id] = true; |
| 595 | each(mod.depMaps, function (depMap, i) { |
| 596 | var depId = depMap.id, |
| 597 | dep = getOwn(registry, depId); |
| 598 | |
| 599 | //Only force things that have not completed |
| 600 | //being defined, so still in the registry, |
| 601 | //and only if it has not been matched up |
| 602 | //in the module already. |
| 603 | if (dep && !mod.depMatched[i] && !processed[depId]) { |
| 604 | if (getOwn(traced, depId)) { |
| 605 | mod.defineDep(i, defined[depId]); |
| 606 | mod.check(); //pass false? |
| 607 | } else { |
| 608 | breakCycle(dep, traced, processed); |
| 609 | } |
| 610 | } |
| 611 | }); |
| 612 | processed[id] = true; |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | function checkLoaded() { |
| 617 | var map, modId, err, usingPathFallback, |
no test coverage detected