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

Unified Diff: Source/WebCore/inspector/PageRuntimeAgent.cpp

Issue 11366107: Merge 133052 - Web Inspector: frame chooser does not work on subsequent inspector open. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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/WebCore/inspector/PageRuntimeAgent.h ('k') | Source/WebCore/inspector/WorkerRuntimeAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/PageRuntimeAgent.cpp
===================================================================
--- Source/WebCore/inspector/PageRuntimeAgent.cpp (revision 133600)
+++ Source/WebCore/inspector/PageRuntimeAgent.cpp (working copy)
@@ -38,7 +38,6 @@
#include "Document.h"
#include "InjectedScript.h"
#include "InjectedScriptManager.h"
-#include "InspectorAgent.h"
#include "InspectorPageAgent.h"
#include "InspectorState.h"
#include "InstrumentingAgents.h"
@@ -53,28 +52,28 @@
static const char runtimeEnabled[] = "runtimeEnabled";
};
-PageRuntimeAgent::PageRuntimeAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, Page* page, InspectorPageAgent* pageAgent, InspectorAgent* inspectorAgent)
+PageRuntimeAgent::PageRuntimeAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, Page* page, InspectorPageAgent* pageAgent)
: InspectorRuntimeAgent(instrumentingAgents, state, injectedScriptManager)
, m_inspectedPage(page)
, m_pageAgent(pageAgent)
- , m_inspectorAgent(inspectorAgent)
, m_frontend(0)
+ , m_mainWorldContextCreated(false)
{
+ m_instrumentingAgents->setPageRuntimeAgent(this);
}
PageRuntimeAgent::~PageRuntimeAgent()
{
+ m_instrumentingAgents->setPageRuntimeAgent(0);
}
void PageRuntimeAgent::setFrontend(InspectorFrontend* frontend)
{
m_frontend = frontend->runtime();
- m_instrumentingAgents->setPageRuntimeAgent(this);
}
void PageRuntimeAgent::clearFrontend()
{
- m_instrumentingAgents->setPageRuntimeAgent(0);
m_frontend = 0;
String errorString;
disable(&errorString);
@@ -98,7 +97,7 @@
// Only report existing contexts if the page did commit load, otherwise we may
// unintentionally initialize contexts in the frames which may trigger some listeners
// that are expected to be triggered only after the load is committed, see http://crbug.com/131623
- if (m_inspectorAgent->didCommitLoadFired())
+ if (m_mainWorldContextCreated)
reportExecutionContextCreation();
}
@@ -111,8 +110,10 @@
m_state->setBoolean(PageRuntimeAgentState::runtimeEnabled, false);
}
-void PageRuntimeAgent::didClearWindowObject(Frame* frame)
+void PageRuntimeAgent::didCreateMainWorldContext(Frame* frame)
{
+ m_mainWorldContextCreated = true;
+
if (!m_enabled)
return;
ASSERT(m_frontend);
« no previous file with comments | « Source/WebCore/inspector/PageRuntimeAgent.h ('k') | Source/WebCore/inspector/WorkerRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698