| Index: Source/core/inspector/PageRuntimeAgent.cpp
|
| diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp
|
| index 7f811fe405e49b815a69c542e90943330c6b1ca4..7bb1a3d26897f8a273baf545d17c6c0f90b1306b 100644
|
| --- a/Source/core/inspector/PageRuntimeAgent.cpp
|
| +++ b/Source/core/inspector/PageRuntimeAgent.cpp
|
| @@ -40,6 +40,7 @@
|
| #include "core/inspector/InjectedScript.h"
|
| #include "core/inspector/InjectedScriptManager.h"
|
| #include "core/inspector/InspectorIdentifiers.h"
|
| +#include "core/inspector/InspectorPageAgent.h"
|
| #include "core/inspector/InstrumentingAgents.h"
|
| #include "core/page/Page.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
| @@ -48,9 +49,9 @@
|
|
|
| static int s_nextDebuggerId = 1;
|
|
|
| -PageRuntimeAgent::PageRuntimeAgent(LocalFrame* inspectedFrame, InjectedScriptManager* injectedScriptManager, Client* client, ScriptDebugServer* scriptDebugServer)
|
| +PageRuntimeAgent::PageRuntimeAgent(InjectedScriptManager* injectedScriptManager, Client* client, ScriptDebugServer* scriptDebugServer, InspectorPageAgent* pageAgent)
|
| : InspectorRuntimeAgent(injectedScriptManager, scriptDebugServer, client)
|
| - , m_inspectedFrame(inspectedFrame)
|
| + , m_pageAgent(pageAgent)
|
| , m_mainWorldContextCreated(false)
|
| , m_debuggerId(s_nextDebuggerId++)
|
| {
|
| @@ -65,7 +66,7 @@
|
|
|
| DEFINE_TRACE(PageRuntimeAgent)
|
| {
|
| - visitor->trace(m_inspectedFrame);
|
| + visitor->trace(m_pageAgent);
|
| InspectorRuntimeAgent::trace(visitor);
|
| }
|
|
|
| @@ -129,7 +130,7 @@
|
| InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
|
| {
|
| if (!executionContextId) {
|
| - ScriptState* scriptState = ScriptState::forMainWorld(m_inspectedFrame);
|
| + ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->inspectedFrame());
|
| InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
|
| if (result.isEmpty())
|
| *errorString = "Internal error: main world execution context not found.";
|
| @@ -154,7 +155,7 @@
|
| void PageRuntimeAgent::reportExecutionContextCreation()
|
| {
|
| Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
|
| - for (Frame* frame = m_inspectedFrame; frame; frame = frame->tree().traverseNext(m_inspectedFrame)) {
|
| + for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext(m_pageAgent->inspectedFrame())) {
|
| if (!frame->isLocalFrame())
|
| continue;
|
| LocalFrame* localFrame = toLocalFrame(frame);
|
|
|