#include "third_party/blink/renderer/core/loader/modulescript/module_tree_linker.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/module_record.h"
#include "third_party/blink/renderer/bindings/core/v8/module_request.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h"
#include "third_party/blink/renderer/core/loader/modulescript/module_script_fetch_request.h"
#include "third_party/blink/renderer/core/loader/modulescript/module_tree_linker_registry.h"
#include "third_party/blink/renderer/core/script/module_script.h"
#include "third_party/blink/renderer/platform/bindings/v8_throw_exception.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_loading_log.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
struct ModuleScriptFetchTarget { … };
}
ModuleTreeLinker::ModuleTreeLinker(
ResourceFetcher* fetch_client_settings_object_fetcher,
mojom::blink::RequestContextType context_type,
network::mojom::RequestDestination destination,
Modulator* modulator,
ModuleScriptCustomFetchType custom_fetch_type,
ModuleTreeLinkerRegistry* registry,
ModuleTreeClient* client,
base::PassKey<ModuleTreeLinkerRegistry>)
: … { … }
void ModuleTreeLinker::Trace(Visitor* visitor) const { … }
#if DCHECK_IS_ON()
const char* ModuleTreeLinker::StateToString(ModuleTreeLinker::State state) { … }
#endif
void ModuleTreeLinker::AdvanceState(State new_state) { … }
void ModuleTreeLinker::FetchRoot(const KURL& original_url,
ModuleType module_type,
const ScriptFetchOptions& options,
base::PassKey<ModuleTreeLinkerRegistry>,
String referrer) { … }
void ModuleTreeLinker::FetchRootInline(
ModuleScript* module_script,
base::PassKey<ModuleTreeLinkerRegistry>) { … }
void ModuleTreeLinker::NotifyModuleLoadFinished(ModuleScript* module_script) { … }
void ModuleTreeLinker::FetchDescendants(const ModuleScript* module_script) { … }
void ModuleTreeLinker::FinalizeFetchDescendantsForOneModuleScript() { … }
void ModuleTreeLinker::Instantiate() { … }
ScriptValue ModuleTreeLinker::FindFirstParseError(
const ModuleScript* module_script,
HeapHashSet<Member<const ModuleScript>>* discovered_set) const { … }
#if DCHECK_IS_ON()
std::ostream& operator<<(std::ostream& stream, ModuleType module_type) { … }
std::ostream& operator<<(std::ostream& stream, const ModuleTreeLinker& linker) { … }
#endif
}