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

Unified Diff: Source/core/inspector/PageRuntimeAgent.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/PageRuntimeAgent.h ('k') | Source/core/page/Chrome.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.h ('k') | Source/core/page/Chrome.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698