| Index: Source/core/inspector/PageRuntimeAgent.cpp
|
| diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp
|
| index b0d4d28ba2001d1934f2229ea45de7c517a967b8..9b4f937f1e762f0503a71cbdfb1520fe082b5243 100644
|
| --- a/Source/core/inspector/PageRuntimeAgent.cpp
|
| +++ b/Source/core/inspector/PageRuntimeAgent.cpp
|
| @@ -48,10 +48,9 @@ namespace blink {
|
|
|
| static int s_nextDebuggerId = 1;
|
|
|
| -PageRuntimeAgent::PageRuntimeAgent(InjectedScriptManager* injectedScriptManager, InspectorClient* client, ScriptDebugServer* scriptDebugServer, Page* page, InspectorPageAgent* pageAgent)
|
| +PageRuntimeAgent::PageRuntimeAgent(InjectedScriptManager* injectedScriptManager, InspectorClient* client, ScriptDebugServer* scriptDebugServer, InspectorPageAgent* pageAgent)
|
| : InspectorRuntimeAgent(injectedScriptManager, scriptDebugServer)
|
| , m_client(client)
|
| - , m_inspectedPage(page)
|
| , m_pageAgent(pageAgent)
|
| , m_mainWorldContextCreated(false)
|
| , m_debuggerId(s_nextDebuggerId++)
|
| @@ -67,7 +66,6 @@ PageRuntimeAgent::~PageRuntimeAgent()
|
|
|
| void PageRuntimeAgent::trace(Visitor* visitor)
|
| {
|
| - visitor->trace(m_inspectedPage);
|
| visitor->trace(m_pageAgent);
|
| InspectorRuntimeAgent::trace(visitor);
|
| }
|
| @@ -137,7 +135,7 @@ void PageRuntimeAgent::willReleaseScriptContext(LocalFrame* frame, ScriptState*
|
| InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
|
| {
|
| if (!executionContextId) {
|
| - ScriptState* scriptState = ScriptState::forMainWorld(m_inspectedPage->deprecatedLocalMainFrame());
|
| + ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->inspectedFrame());
|
| InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
|
| if (result.isEmpty())
|
| *errorString = "Internal error: main world execution context not found.";
|
| @@ -162,7 +160,7 @@ void PageRuntimeAgent::unmuteConsole()
|
| void PageRuntimeAgent::reportExecutionContextCreation()
|
| {
|
| Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
|
| - for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) {
|
| + for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext(m_pageAgent->inspectedFrame())) {
|
| if (!frame->isLocalFrame())
|
| continue;
|
| LocalFrame* localFrame = toLocalFrame(frame);
|
|
|