#include "third_party/blink/renderer/core/script/html_parser_script_runner.h"
#include <inttypes.h>
#include <memory>
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/dom/document_parser_timing.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/nesting_level_incrementer.h"
#include "third_party/blink/renderer/core/html/parser/html_input_stream.h"
#include "third_party/blink/renderer/core/script/html_parser_script_runner_host.h"
#include "third_party/blink/renderer/core/script/script_loader.h"
#include "third_party/blink/renderer/core/script/script_runner.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h"
#include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
namespace blink {
namespace {
std::unique_ptr<TracedValue> GetTraceArgsForScriptElement(
Document& document,
const TextPosition& text_position,
const KURL& url) { … }
void DoExecuteScript(PendingScript* pending_script, Document& document) { … }
void TraceParserBlockingScript(const PendingScript* pending_script,
Document& document) { … }
}
HTMLParserScriptRunner::HTMLParserScriptRunner(
HTMLParserReentryPermit* reentry_permit,
Document* document,
HTMLParserScriptRunnerHost* host)
: … { … }
HTMLParserScriptRunner::~HTMLParserScriptRunner() { … }
void HTMLParserScriptRunner::Detach() { … }
bool HTMLParserScriptRunner::IsParserBlockingScriptReady() { … }
void HTMLParserScriptRunner::
ExecutePendingParserBlockingScriptAndDispatchEvent() { … }
void HTMLParserScriptRunner::ExecutePendingDeferredScriptAndDispatchEvent(
PendingScript* pending_script) { … }
void HTMLParserScriptRunner::PendingScriptFinished(
PendingScript* pending_script) { … }
void HTMLParserScriptRunner::ProcessScriptElement(
Element* script_element,
const TextPosition& script_start_position) { … }
bool HTMLParserScriptRunner::HasParserBlockingScript() const { … }
void HTMLParserScriptRunner::ExecuteParsingBlockingScripts() { … }
void HTMLParserScriptRunner::ExecuteScriptsWaitingForLoad() { … }
void HTMLParserScriptRunner::ExecuteScriptsWaitingForResources() { … }
PendingScript* HTMLParserScriptRunner::TryTakeReadyScriptWaitingForParsing(
HeapDeque<Member<PendingScript>>* waiting_scripts) { … }
bool HTMLParserScriptRunner::ExecuteScriptsWaitingForParsing() { … }
void HTMLParserScriptRunner::ProcessScriptElementInternal(
Element* script,
const TextPosition& script_start_position) { … }
void HTMLParserScriptRunner::Trace(Visitor* visitor) const { … }
}