#include "third_party/blink/renderer/core/inspector/worker_thread_debugger.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_script_runner.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/core/events/error_event.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/inspector/console_message_storage.h"
#include "third_party/blink/renderer/core/inspector/identifiers_factory.h"
#include "third_party/blink/renderer/core/inspector/v8_inspector_string.h"
#include "third_party/blink/renderer/core/inspector/worker_inspector_controller.h"
#include "third_party/blink/renderer/core/shadow_realm/shadow_realm_global_scope.h"
#include "third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h"
#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
#include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
#include "third_party/blink/renderer/core/workers/worker_thread.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/source_location.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
const int kInvalidContextGroupId = …;
}
WorkerThreadDebugger* WorkerThreadDebugger::From(v8::Isolate* isolate) { … }
WorkerThreadDebugger::WorkerThreadDebugger(v8::Isolate* isolate)
: … { … }
WorkerThreadDebugger::~WorkerThreadDebugger() { … }
void WorkerThreadDebugger::ReportConsoleMessage(
ExecutionContext* context,
mojom::ConsoleMessageSource source,
mojom::ConsoleMessageLevel level,
const String& message,
SourceLocation* location) { … }
int WorkerThreadDebugger::ContextGroupId(WorkerThread* worker_thread) { … }
void WorkerThreadDebugger::WorkerThreadCreated(WorkerThread* worker_thread) { … }
void WorkerThreadDebugger::WorkerThreadDestroyed(WorkerThread* worker_thread) { … }
void WorkerThreadDebugger::ContextCreated(WorkerThread* worker_thread,
const KURL& url_for_debugger,
v8::Local<v8::Context> context) { … }
void WorkerThreadDebugger::ContextWillBeDestroyed(
WorkerThread* worker_thread,
v8::Local<v8::Context> context) { … }
void WorkerThreadDebugger::ExceptionThrown(WorkerThread* worker_thread,
ErrorEvent* event) { … }
int WorkerThreadDebugger::ContextGroupId(ExecutionContext* context) { … }
void WorkerThreadDebugger::PauseWorkerOnStart(WorkerThread* worker_thread) { … }
void WorkerThreadDebugger::runMessageLoopOnPause(int context_group_id) { … }
void WorkerThreadDebugger::quitMessageLoopOnPause() { … }
void WorkerThreadDebugger::muteMetrics(int context_group_id) { … }
void WorkerThreadDebugger::unmuteMetrics(int context_group_id) { … }
v8::Local<v8::Context> WorkerThreadDebugger::ensureDefaultContextInGroup(
int context_group_id) { … }
void WorkerThreadDebugger::beginEnsureAllContextsInGroup(int context_group_id) { … }
void WorkerThreadDebugger::endEnsureAllContextsInGroup(int context_group_id) { … }
bool WorkerThreadDebugger::canExecuteScripts(int context_group_id) { … }
void WorkerThreadDebugger::runIfWaitingForDebugger(int context_group_id) { … }
void WorkerThreadDebugger::consoleAPIMessage(
int context_group_id,
v8::Isolate::MessageErrorLevel level,
const v8_inspector::StringView& message,
const v8_inspector::StringView& url,
unsigned line_number,
unsigned column_number,
v8_inspector::V8StackTrace* stack_trace) { … }
void WorkerThreadDebugger::consoleClear(int context_group_id) { … }
v8::MaybeLocal<v8::Value> WorkerThreadDebugger::memoryInfo(
v8::Isolate*,
v8::Local<v8::Context>) { … }
}