| Index: Source/core/inspector/InspectorInstrumentation.cpp
|
| diff --git a/Source/core/inspector/InspectorInstrumentation.cpp b/Source/core/inspector/InspectorInstrumentation.cpp
|
| index 4029db903331a586f9b287da8479a64df5113755..ccc9b2800731f0053f027e7a95542f28f325ab59 100644
|
| --- a/Source/core/inspector/InspectorInstrumentation.cpp
|
| +++ b/Source/core/inspector/InspectorInstrumentation.cpp
|
| @@ -195,9 +195,11 @@
|
| return 0;
|
| }
|
|
|
| -InstrumentingAgents* instrumentingAgentsFor(LocalFrame* frame)
|
| -{
|
| - return frame ? frame->instrumentingAgents() : nullptr;
|
| +InstrumentingAgents* instrumentingAgentsFor(Page* page)
|
| +{
|
| + if (!page)
|
| + return 0;
|
| + return instrumentationForPage(page);
|
| }
|
|
|
| InstrumentingAgents* instrumentingAgentsFor(EventTarget* eventTarget)
|
| @@ -217,6 +219,11 @@
|
| if (!workerGlobalScope)
|
| return 0;
|
| return instrumentationForWorkerGlobalScope(workerGlobalScope);
|
| +}
|
| +
|
| +InstrumentingAgents* instrumentingAgentsFor(FrameHost* host)
|
| +{
|
| + return instrumentationForPage(&host->page());
|
| }
|
|
|
| InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext* context)
|
| @@ -247,6 +254,12 @@
|
| const char CallbackName[] = "callbackName";
|
| };
|
|
|
| +InstrumentingAgents* instrumentationForPage(Page* page)
|
| +{
|
| + ASSERT(isMainThread());
|
| + return page->inspectorController().m_instrumentingAgents.get();
|
| +}
|
| +
|
| InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
|
| {
|
| if (WorkerInspectorController* controller = workerGlobalScope->workerInspectorController())
|
|
|