void InspectorInstrumentation::willEvaluateWorkerScript(WorkerContext* workerContext, int workerThreadStartMode) { if (workerThreadStartMode != PauseWorkerContextOnStart) return; InstrumentingAgents* instrumentingAgents = instrumentationForWorkerContext(workerContext); if (!instrumentingAgents) return; #if ENABLE(JAVASCRIPT_DEBUGGER) if (InspectorRuntimeAgent* runtimeAgent = instrumentingAgents->inspectorRuntimeAgent()) runtimeAgent->pauseWorkerContext(workerContext); #endif }
InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForWorkerContext(WorkerContext* workerContext) { if (!workerContext) return 0; return instrumentationForWorkerContext(workerContext); }
InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForNonDocumentContext(ScriptExecutionContext* context) { if (context->isWorkerContext()) return instrumentationForWorkerContext(static_cast<WorkerContext*>(context)); return 0; }