Diff
Modified: trunk/Source/WebCore/ChangeLog (133017 => 133018)
--- trunk/Source/WebCore/ChangeLog 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/ChangeLog 2012-10-31 13:25:53 UTC (rev 133018)
@@ -1,3 +1,57 @@
+2012-10-31 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r133015.
+ http://trac.webkit.org/changeset/133015
+ https://bugs.webkit.org/show_bug.cgi?id=100847
+
+ broke Apple Win Debug compilation (Requested by podivilov on
+ #webkit).
+
+ * inspector/InspectorAgent.cpp:
+ (WebCore::InspectorAgent::InspectorAgent):
+ (WebCore::InspectorAgent::clearFrontend):
+ (WebCore::InspectorAgent::didCommitLoad):
+ * inspector/InspectorAgent.h:
+ (WebCore::InspectorAgent::didCommitLoadFired):
+ (InspectorAgent):
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore):
+ (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
+ (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
+ (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
+ * inspector/InspectorInstrumentation.h:
+ (InspectorInstrumentation):
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::restore):
+ * inspector/InspectorRuntimeAgent.cpp:
+ (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
+ (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent):
+ (WebCore::InspectorRuntimeAgent::run):
+ (WebCore):
+ (WebCore::InspectorRuntimeAgent::pauseWorkerContext):
+ * inspector/InspectorRuntimeAgent.h:
+ (InspectorRuntimeAgent):
+ * inspector/InstrumentingAgents.h:
+ (WebCore):
+ (WebCore::InstrumentingAgents::InstrumentingAgents):
+ (WebCore::InstrumentingAgents::inspectorRuntimeAgent):
+ (WebCore::InstrumentingAgents::setInspectorRuntimeAgent):
+ (InstrumentingAgents):
+ * inspector/PageRuntimeAgent.cpp:
+ (WebCore::PageRuntimeAgent::PageRuntimeAgent):
+ (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
+ (WebCore::PageRuntimeAgent::setFrontend):
+ (WebCore::PageRuntimeAgent::clearFrontend):
+ (WebCore::PageRuntimeAgent::enable):
+ (WebCore::PageRuntimeAgent::didClearWindowObject):
+ * inspector/PageRuntimeAgent.h:
+ (PageRuntimeAgent):
+ * inspector/WorkerRuntimeAgent.cpp:
+ (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
+ (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
+ * inspector/WorkerRuntimeAgent.h:
+ (WorkerRuntimeAgent):
+
2012-10-31 Kihong Kwon <[email protected]>
Add DeviceController base-class to remove duplication of DeviceXXXControler
Modified: trunk/Source/WebCore/inspector/InspectorAgent.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorAgent.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorAgent.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -68,6 +68,7 @@
, m_inspectedPage(page)
, m_frontend(0)
, m_injectedScriptManager(injectedScriptManager)
+ , m_didCommitLoadFired(false)
{
ASSERT_ARG(page, page);
m_instrumentingAgents->setInspectorAgent(this);
@@ -101,6 +102,7 @@
{
m_pendingEvaluateTestCommands.clear();
m_frontend = 0;
+ m_didCommitLoadFired = false;
m_injectedScriptManager->discardInjectedScripts();
ErrorString error;
disable(&error);
@@ -108,6 +110,7 @@
void InspectorAgent::didCommitLoad()
{
+ m_didCommitLoadFired = true;
m_injectedScriptManager->discardInjectedScripts();
}
Modified: trunk/Source/WebCore/inspector/InspectorAgent.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorAgent.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorAgent.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -79,6 +79,7 @@
void didCommitLoad();
void domContentLoadedEventFired();
+ bool didCommitLoadFired() { return m_didCommitLoadFired; }
bool hasFrontend() const { return m_frontend; }
@@ -108,6 +109,7 @@
pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<InspectorObject> > m_pendingInspectData;
typedef HashMap<String, String> InjectedScriptForOriginMap;
InjectedScriptForOriginMap m_injectedScriptForOrigin;
+ bool m_didCommitLoadFired;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -57,6 +57,7 @@
#include "InspectorPageAgent.h"
#include "InspectorProfilerAgent.h"
#include "InspectorResourceAgent.h"
+#include "InspectorRuntimeAgent.h"
#include "InspectorTimelineAgent.h"
#include "InspectorWorkerAgent.h"
#include "InstrumentingAgents.h"
@@ -66,7 +67,6 @@
#include "ScriptProfile.h"
#include "StyleRule.h"
#include "WorkerContext.h"
-#include "WorkerRuntimeAgent.h"
#include "WorkerThread.h"
#include "XMLHttpRequest.h"
#include <wtf/StdLibExtras.h>
@@ -127,7 +127,7 @@
#endif
if (PageRuntimeAgent* pageRuntimeAgent = instrumentingAgents->pageRuntimeAgent()) {
if (world == mainThreadNormalWorld())
- pageRuntimeAgent->didCreateMainWorldContext(frame);
+ pageRuntimeAgent->didClearWindowObject(frame);
}
}
@@ -1076,7 +1076,7 @@
if (!instrumentingAgents)
return;
#if ENABLE(_javascript__DEBUGGER)
- if (WorkerRuntimeAgent* runtimeAgent = instrumentingAgents->workerRuntimeAgent())
+ if (InspectorRuntimeAgent* runtimeAgent = instrumentingAgents->inspectorRuntimeAgent())
runtimeAgent->pauseWorkerContext(workerContext);
#endif
}
@@ -1164,6 +1164,13 @@
return consoleAgent && consoleAgent->enabled();
}
+bool InspectorInstrumentation::runtimeAgentEnabled(Frame* frame)
+{
+ InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame);
+ InspectorRuntimeAgent* runtimeAgent = instrumentingAgents ? instrumentingAgents->inspectorRuntimeAgent() : 0;
+ return runtimeAgent && runtimeAgent->enabled();
+}
+
bool InspectorInstrumentation::timelineAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
{
InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -257,6 +257,7 @@
static bool hasFrontends() { return s_frontendCounter; }
static bool canvasAgentEnabled(ScriptExecutionContext*);
static bool consoleAgentEnabled(ScriptExecutionContext*);
+ static bool runtimeAgentEnabled(Frame*);
static bool timelineAgentEnabled(ScriptExecutionContext*);
static bool collectingHTMLParseErrors(Page*);
#else
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -355,6 +355,9 @@
if (m_state->getBoolean(PageAgentState::pageAgentEnabled)) {
ErrorString error;
enable(&error);
+
+ if (m_inspectorAgent->didCommitLoadFired())
+ frameNavigated(m_page->mainFrame()->loader()->documentLoader());
#if ENABLE(TOUCH_EVENTS)
updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touchEventEmulationEnabled));
#endif
Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -37,6 +37,11 @@
#include "InjectedScript.h"
#include "InjectedScriptManager.h"
#include "InspectorValues.h"
+#include "InstrumentingAgents.h"
+#include "WorkerContext.h"
+#include "WorkerDebuggerAgent.h"
+#include "WorkerRunLoop.h"
+#include "WorkerThread.h"
#include <wtf/PassRefPtr.h>
@@ -58,11 +63,14 @@
#if ENABLE(_javascript__DEBUGGER)
, m_scriptDebugServer(0)
#endif
+ , m_paused(false)
{
+ m_instrumentingAgents->setInspectorRuntimeAgent(this);
}
InspectorRuntimeAgent::~InspectorRuntimeAgent()
{
+ m_instrumentingAgents->setInspectorRuntimeAgent(0);
}
#if ENABLE(_javascript__DEBUGGER)
@@ -164,6 +172,7 @@
void InspectorRuntimeAgent::run(ErrorString*)
{
+ m_paused = false;
}
#if ENABLE(_javascript__DEBUGGER)
@@ -171,6 +180,18 @@
{
m_scriptDebugServer = scriptDebugServer;
}
+
+#if ENABLE(WORKERS)
+void InspectorRuntimeAgent::pauseWorkerContext(WorkerContext* context)
+{
+ m_paused = true;
+ MessageQueueWaitResult result;
+ do {
+ result = context->thread()->runLoop().runInMode(context, WorkerDebuggerAgent::debuggerTaskMode);
+ // Keep waiting until execution is resumed.
+ } while (result == MessageQueueMessageReceived && m_paused);
+}
+#endif // ENABLE(WORKERS)
#endif // ENABLE(_javascript__DEBUGGER)
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -85,7 +85,10 @@
#if ENABLE(_javascript__DEBUGGER)
void setScriptDebugServer(ScriptDebugServer*);
+#if ENABLE(WORKERS)
+ void pauseWorkerContext(WorkerContext*);
#endif
+#endif
protected:
InspectorRuntimeAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*);
@@ -102,6 +105,7 @@
#if ENABLE(_javascript__DEBUGGER)
ScriptDebugServer* m_scriptDebugServer;
#endif
+ bool m_paused;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InstrumentingAgents.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/InstrumentingAgents.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/InstrumentingAgents.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -50,12 +50,12 @@
class InspectorPageAgent;
class InspectorProfilerAgent;
class InspectorResourceAgent;
+class InspectorRuntimeAgent;
class InspectorTimelineAgent;
class InspectorWorkerAgent;
class Page;
class PageRuntimeAgent;
class WorkerContext;
-class WorkerRuntimeAgent;
class InstrumentingAgents {
WTF_MAKE_NONCOPYABLE(InstrumentingAgents);
@@ -68,8 +68,8 @@
, m_inspectorConsoleAgent(0)
, m_inspectorDOMAgent(0)
, m_inspectorResourceAgent(0)
+ , m_inspectorRuntimeAgent(0)
, m_pageRuntimeAgent(0)
- , m_workerRuntimeAgent(0)
, m_inspectorTimelineAgent(0)
, m_inspectorDOMStorageAgent(0)
#if ENABLE(SQL_DATABASE)
@@ -109,12 +109,12 @@
InspectorResourceAgent* inspectorResourceAgent() const { return m_inspectorResourceAgent; }
void setInspectorResourceAgent(InspectorResourceAgent* agent) { m_inspectorResourceAgent = agent; }
+ InspectorRuntimeAgent* inspectorRuntimeAgent() const { return m_inspectorRuntimeAgent; }
+ void setInspectorRuntimeAgent(InspectorRuntimeAgent* agent) { m_inspectorRuntimeAgent = agent; }
+
PageRuntimeAgent* pageRuntimeAgent() const { return m_pageRuntimeAgent; }
void setPageRuntimeAgent(PageRuntimeAgent* agent) { m_pageRuntimeAgent = agent; }
- WorkerRuntimeAgent* workerRuntimeAgent() const { return m_workerRuntimeAgent; }
- void setWorkerRuntimeAgent(WorkerRuntimeAgent* agent) { m_workerRuntimeAgent = agent; }
-
InspectorTimelineAgent* inspectorTimelineAgent() const { return m_inspectorTimelineAgent; }
void setInspectorTimelineAgent(InspectorTimelineAgent* agent) { m_inspectorTimelineAgent = agent; }
@@ -160,8 +160,8 @@
InspectorConsoleAgent* m_inspectorConsoleAgent;
InspectorDOMAgent* m_inspectorDOMAgent;
InspectorResourceAgent* m_inspectorResourceAgent;
+ InspectorRuntimeAgent* m_inspectorRuntimeAgent;
PageRuntimeAgent* m_pageRuntimeAgent;
- WorkerRuntimeAgent* m_workerRuntimeAgent;
InspectorTimelineAgent* m_inspectorTimelineAgent;
InspectorDOMStorageAgent* m_inspectorDOMStorageAgent;
#if ENABLE(SQL_DATABASE)
Modified: trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -59,23 +59,22 @@
, 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);
@@ -99,7 +98,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_mainWorldContextCreated)
+ if (m_inspectorAgent->didCommitLoadFired())
reportExecutionContextCreation();
}
@@ -112,10 +111,8 @@
m_state->setBoolean(PageRuntimeAgentState::runtimeEnabled, false);
}
-void PageRuntimeAgent::didCreateMainWorldContext(Frame* frame)
+void PageRuntimeAgent::didClearWindowObject(Frame* frame)
{
- m_mainWorldContextCreated = true;
-
if (!m_enabled)
return;
ASSERT(m_frontend);
Modified: trunk/Source/WebCore/inspector/PageRuntimeAgent.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/PageRuntimeAgent.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/PageRuntimeAgent.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -58,7 +58,7 @@
virtual void enable(ErrorString*);
virtual void disable(ErrorString*);
- void didCreateMainWorldContext(Frame*);
+ void didClearWindowObject(Frame*);
void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);
private:
@@ -74,7 +74,6 @@
InspectorPageAgent* m_pageAgent;
InspectorAgent* m_inspectorAgent;
InspectorFrontend::Runtime* m_frontend;
- bool m_mainWorldContextCreated;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/WorkerRuntimeAgent.cpp (133017 => 133018)
--- trunk/Source/WebCore/inspector/WorkerRuntimeAgent.cpp 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/WorkerRuntimeAgent.cpp 2012-10-31 13:25:53 UTC (rev 133018)
@@ -35,26 +35,18 @@
#include "WorkerRuntimeAgent.h"
#include "InjectedScript.h"
-#include "InstrumentingAgents.h"
#include "ScriptState.h"
-#include "WorkerContext.h"
-#include "WorkerDebuggerAgent.h"
-#include "WorkerRunLoop.h"
-#include "WorkerThread.h"
namespace WebCore {
WorkerRuntimeAgent::WorkerRuntimeAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, WorkerContext* workerContext)
: InspectorRuntimeAgent(instrumentingAgents, state, injectedScriptManager)
, m_workerContext(workerContext)
- , m_paused(false)
{
- m_instrumentingAgents->setWorkerRuntimeAgent(this);
}
WorkerRuntimeAgent::~WorkerRuntimeAgent()
{
- m_instrumentingAgents->setWorkerRuntimeAgent(0);
}
InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, const int* executionContextId)
@@ -77,23 +69,6 @@
// We don't need to mute console for workers.
}
-void WorkerRuntimeAgent::run(ErrorString*)
-{
- m_paused = false;
-}
-
-#if ENABLE(_javascript__DEBUGGER)
-void WorkerRuntimeAgent::pauseWorkerContext(WorkerContext* context)
-{
- m_paused = true;
- MessageQueueWaitResult result;
- do {
- result = context->thread()->runLoop().runInMode(context, WorkerDebuggerAgent::debuggerTaskMode);
- // Keep waiting until execution is resumed.
- } while (result == MessageQueueMessageReceived && m_paused);
-}
-#endif // ENABLE(_javascript__DEBUGGER)
-
} // namespace WebCore
#endif // ENABLE(INSPECTOR) && ENABLE(WORKERS)
Modified: trunk/Source/WebCore/inspector/WorkerRuntimeAgent.h (133017 => 133018)
--- trunk/Source/WebCore/inspector/WorkerRuntimeAgent.h 2012-10-31 13:00:09 UTC (rev 133017)
+++ trunk/Source/WebCore/inspector/WorkerRuntimeAgent.h 2012-10-31 13:25:53 UTC (rev 133018)
@@ -48,20 +48,12 @@
}
virtual ~WorkerRuntimeAgent();
- // Protocol commands.
- virtual void run(ErrorString*);
-
-#if ENABLE(_javascript__DEBUGGER)
- void pauseWorkerContext(WorkerContext*);
-#endif // ENABLE(_javascript__DEBUGGER)
-
private:
WorkerRuntimeAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*, WorkerContext*);
virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId);
virtual void muteConsole();
virtual void unmuteConsole();
WorkerContext* m_workerContext;
- bool m_paused;
};
} // namespace WebCore