| Index: Source/bindings/core/v8/V8Debugger.cpp
|
| diff --git a/Source/bindings/core/v8/V8Debugger.cpp b/Source/bindings/core/v8/V8Debugger.cpp
|
| index 3e3966e7c3e8619f034b5779c82dd7fd1e634639..579efe25fd9d11e3fdd548b4d881cb68f149e862 100644
|
| --- a/Source/bindings/core/v8/V8Debugger.cpp
|
| +++ b/Source/bindings/core/v8/V8Debugger.cpp
|
| @@ -37,9 +37,7 @@
|
| #include "core/inspector/JavaScriptCallFrame.h"
|
| #include "core/inspector/ScriptDebugListener.h"
|
| #include "platform/JSONValues.h"
|
| -#include "wtf/Deque.h"
|
| #include "wtf/StdLibExtras.h"
|
| -#include "wtf/ThreadingPrimitives.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/dtoa/utils.h"
|
| #include "wtf/text/CString.h"
|
| @@ -51,27 +49,6 @@ const char stepIntoV8MethodName[] = "stepIntoStatement";
|
| const char stepOutV8MethodName[] = "stepOutOfFunction";
|
| }
|
|
|
| -class V8Debugger::ThreadSafeTaskQueue {
|
| - WTF_MAKE_NONCOPYABLE(ThreadSafeTaskQueue);
|
| -public:
|
| - ThreadSafeTaskQueue() { }
|
| - PassOwnPtr<Task> tryTake()
|
| - {
|
| - MutexLocker lock(m_mutex);
|
| - if (m_queue.isEmpty())
|
| - return nullptr;
|
| - return m_queue.takeFirst();
|
| - }
|
| - void append(PassOwnPtr<Task> task)
|
| - {
|
| - MutexLocker lock(m_mutex);
|
| - m_queue.append(task);
|
| - }
|
| -private:
|
| - Mutex m_mutex;
|
| - Deque<OwnPtr<Task>> m_queue;
|
| -};
|
| -
|
| v8::MaybeLocal<v8::Value> V8Debugger::callDebuggerMethod(const char* functionName, int argc, v8::Local<v8::Value> argv[])
|
| {
|
| v8::Local<v8::Object> debuggerScript = debuggerScriptLocal();
|
| @@ -85,7 +62,6 @@ V8Debugger::V8Debugger(v8::Isolate* isolate, Client* client)
|
| , m_client(client)
|
| , m_breakpointsActivated(true)
|
| , m_runningNestedMessageLoop(false)
|
| - , m_taskQueue(adoptPtr(new ThreadSafeTaskQueue))
|
| {
|
| }
|
|
|
| @@ -482,22 +458,6 @@ PassRefPtrWillBeRawPtr<JavaScriptCallFrame> V8Debugger::callFrameNoScopes(int in
|
| return JavaScriptCallFrame::create(debuggerContext(), v8::Local<v8::Object>::Cast(currentCallFrameV8));
|
| }
|
|
|
| -void V8Debugger::interruptAndRun(PassOwnPtr<Task> task)
|
| -{
|
| - m_taskQueue->append(task);
|
| - m_isolate->RequestInterrupt(&v8InterruptCallback, this);
|
| -}
|
| -
|
| -void V8Debugger::runPendingTasks()
|
| -{
|
| - while (true) {
|
| - OwnPtr<Task> task = m_taskQueue->tryTake();
|
| - if (!task)
|
| - return;
|
| - task->run();
|
| - }
|
| -}
|
| -
|
| static V8Debugger* toV8Debugger(v8::Local<v8::Value> data)
|
| {
|
| void* p = v8::Local<v8::External>::Cast(data)->Value();
|
| @@ -557,13 +517,6 @@ void V8Debugger::handleProgramBreak(ScriptState* pausedScriptState, v8::Local<v8
|
| }
|
| }
|
|
|
| -void V8Debugger::v8InterruptCallback(v8::Isolate*, void* data)
|
| -{
|
| - V8Debugger* server = static_cast<V8Debugger*>(data);
|
| - if (server->enabled())
|
| - server->runPendingTasks();
|
| -}
|
| -
|
| void V8Debugger::v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails)
|
| {
|
| V8Debugger* thisPtr = toV8Debugger(eventDetails.GetCallbackData());
|
|
|