Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: Source/core/inspector/PageDebuggerAgent.cpp

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed assertion Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.cpp ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index 1e8269f92cc5f149a0c73f092f3a2143bb969a36..b3b0e1a99b7eeddc018e1009720bbd7757e7e195 100644
--- a/Source/core/inspector/PageDebuggerAgent.cpp
+++ b/Source/core/inspector/PageDebuggerAgent.cpp
@@ -84,12 +84,12 @@ void PageDebuggerAgent::disable()
void PageDebuggerAgent::startListeningScriptDebugServer()
{
- scriptDebugServer().addListener(this, m_pageAgent->page());
+ scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame());
}
void PageDebuggerAgent::stopListeningScriptDebugServer()
{
- scriptDebugServer().removeListener(this, m_pageAgent->page());
+ scriptDebugServer().removeListener(this, m_pageAgent->inspectedFrame());
}
PageScriptDebugServer& PageDebuggerAgent::scriptDebugServer()
@@ -122,7 +122,7 @@ void PageDebuggerAgent::overlaySteppedOver()
InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
{
if (!executionContextId) {
- ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->mainFrame());
+ ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->inspectedFrame());
InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
if (result.isEmpty())
*errorString = "Internal error: main world execution context not found.";
@@ -136,7 +136,8 @@ InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString* errorString
void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
{
- if (frame != m_pageAgent->mainFrame())
+ // FIXME: what about nested objects?
+ if (frame != m_pageAgent->inspectedFrame())
return;
reset();
@@ -149,8 +150,7 @@ void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame)
void PageDebuggerAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
{
- Frame* mainFrame = frame->page()->deprecatedLocalMainFrame();
- if (loader->frame() == mainFrame)
+ if (loader->frame() == m_pageAgent->inspectedFrame())
pageDidCommitLoad();
}
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.cpp ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698