#include "third_party/blink/renderer/core/script/pending_script.h"
#include <optional>
#include "base/trace_event/trace_event.h"
#include "third_party/blink/public/mojom/script/script_type.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/document_parser_timing.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/loader/render_blocking_resource_manager.h"
#include "third_party/blink/renderer/core/script/ignore_destructive_write_count_incrementer.h"
#include "third_party/blink/renderer/core/script/script_element_base.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h"
namespace blink {
namespace {
WebScopedVirtualTimePauser CreateWebScopedVirtualTimePauser(
ScriptElementBase* element) { … }
}
PendingScript::PendingScript(ScriptElementBase* element,
const TextPosition& starting_position,
scheduler::TaskAttributionInfo* parent_task)
: … { … }
PendingScript::~PendingScript() { … }
void PendingScript::Dispose() { … }
void PendingScript::WatchForLoad(PendingScriptClient* client) { … }
void PendingScript::StopWatchingForLoad() { … }
void PendingScript::PendingScriptFinished() { … }
ScriptElementBase* PendingScript::GetElement() const { … }
void PendingScript::MarkParserBlockingLoadStartTime() { … }
void PendingScript::ExecuteScriptBlock() { … }
void PendingScript::ExecuteScriptBlockInternal(
Script* script,
ScriptElementBase* element,
bool was_canceled,
bool is_external,
bool created_during_document_write,
base::TimeTicks parser_blocking_load_start_time,
bool is_controlled_by_script_runner) { … }
void PendingScript::Trace(Visitor* visitor) const { … }
bool PendingScript::IsControlledByScriptRunner() const { … }
}