| Index: Source/core/inspector/PageDebuggerAgent.cpp
|
| diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
|
| index b3b0e1a99b7eeddc018e1009720bbd7757e7e195..1e8269f92cc5f149a0c73f092f3a2143bb969a36 100644
|
| --- a/Source/core/inspector/PageDebuggerAgent.cpp
|
| +++ b/Source/core/inspector/PageDebuggerAgent.cpp
|
| @@ -84,12 +84,12 @@
|
|
|
| void PageDebuggerAgent::startListeningScriptDebugServer()
|
| {
|
| - scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame());
|
| + scriptDebugServer().addListener(this, m_pageAgent->page());
|
| }
|
|
|
| void PageDebuggerAgent::stopListeningScriptDebugServer()
|
| {
|
| - scriptDebugServer().removeListener(this, m_pageAgent->inspectedFrame());
|
| + scriptDebugServer().removeListener(this, m_pageAgent->page());
|
| }
|
|
|
| PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer()
|
| @@ -122,7 +122,7 @@
|
| InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
|
| {
|
| if (!executionContextId) {
|
| - ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->inspectedFrame());
|
| + ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->mainFrame());
|
| InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
|
| if (result.isEmpty())
|
| *errorString = "Internal error: main world execution context not found.";
|
| @@ -136,8 +136,7 @@
|
|
|
| void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
|
| {
|
| - // FIXME: what about nested objects?
|
| - if (frame != m_pageAgent->inspectedFrame())
|
| + if (frame != m_pageAgent->mainFrame())
|
| return;
|
|
|
| reset();
|
| @@ -150,7 +149,8 @@
|
|
|
| void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
|
| {
|
| - if (loader->frame() == m_pageAgent->inspectedFrame())
|
| + Frame* mainFrame = frame->page()->deprecatedLocalMainFrame();
|
| + if (loader->frame() == mainFrame)
|
| pageDidCommitLoad();
|
| }
|
|
|
|
|