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

Unified Diff: Source/WebCore/inspector/WorkerRuntimeAgent.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/WorkerRuntimeAgent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/WorkerRuntimeAgent.cpp
===================================================================
--- Source/WebCore/inspector/WorkerRuntimeAgent.cpp (revision 133600)
+++ Source/WebCore/inspector/WorkerRuntimeAgent.cpp (working copy)
@@ -35,18 +35,26 @@
#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)
@@ -69,6 +77,23 @@
// 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)
« no previous file with comments | « Source/WebCore/inspector/WorkerRuntimeAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698