tools/clusterfuzz/js_fuzzer/source_helpers.js
/**
   * Recursively adds dependencies of a this source file.
   *
   * @param {Map} dependencies Dependency map to which to add new, parsed
   *     dependencies unless they are already in the map.
   * @param {Map} visitedDependencies A set for avoiding loops.
   */
Recursively adds dependencies of a this source file.
@param {Map} dependencies Dependency map to which to add new, parsed
dependencies unless they are already in the map.
@param {Map} visitedDependencies A set for avoiding loops.
Recursively adds dependencies of a this source file . @param { Map } dependencies Dependency map to which to add new parsed dependencies unless they are already in the map . @param { Map } visitedDependencies A set for avoiding loops .
loadDependencies(dependencies, visitedDependencies) {
    visitedDependencies = visitedDependencies || new Set();
    for (const absPath of this.dependentPaths) {
      if (dependencies.has(absPath) ||
          visitedDependencies.has(absPath)) {
        continue;
      }
      visitedDependencies.add(absPath);
      const dependency = loadDependencyAbs(this.baseDir, absPath);
      dependency.loadDependencies(dependencies, visitedDependencies);
      dependencies.set(absPath, dependency);
    }
  }
loadDependencies ( dependencies , visitedDependencies ) { visitedDependencies = visitedDependencies || new Set ( ) ; for ( const absPath of this . dependentPaths ) { if ( dependencies . has ( absPath ) || visitedDependencies . has ( absPath ) ) { continue ; } visitedDependencies . add ( absPath ) ; const dependency = loadDependencyAbs ( this . baseDir , absPath ) ; dependency . loadDependencies ( dependencies , visitedDependencies ) ; dependencies . set ( absPath , dependency ) ; } }
Recursively adds dependencies of a this source file.
Recursively adds dependencies of a this source file .
// Already added. // Prevent infinite loops. // Recursively load dependencies. // Add the dependency.