OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "core/workers/WorkerGlobalScope.h" | 37 #include "core/workers/WorkerGlobalScope.h" |
38 #include "core/workers/WorkerThread.h" | 38 #include "core/workers/WorkerThread.h" |
39 #include "wtf/MessageQueue.h" | 39 #include "wtf/MessageQueue.h" |
40 #include <v8.h> | 40 #include <v8.h> |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 static const char* workerContextDebugId = "[worker]"; | 44 static const char* workerContextDebugId = "[worker]"; |
45 | 45 |
46 WorkerScriptDebugServer::WorkerScriptDebugServer(WorkerGlobalScope* workerGlobal
Scope) | 46 WorkerScriptDebugServer::WorkerScriptDebugServer(WorkerGlobalScope* workerGlobal
Scope) |
47 : PerIsolateDebuggerClient(v8::Isolate::GetCurrent(), adoptPtr(new ScriptDeb
ugServer(v8::Isolate::GetCurrent(), this))) | 47 : PerIsolateDebuggerClient(v8::Isolate::GetCurrent(), ScriptDebugServer::cre
ate(v8::Isolate::GetCurrent(), this)) |
48 , m_listener(0) | 48 , m_listener(nullptr) |
49 , m_workerGlobalScope(workerGlobalScope) | 49 , m_workerGlobalScope(workerGlobalScope) |
50 { | 50 { |
51 } | 51 } |
52 | 52 |
| 53 WorkerScriptDebugServer::~WorkerScriptDebugServer() |
| 54 { |
| 55 } |
| 56 |
| 57 DEFINE_TRACE(WorkerScriptDebugServer) |
| 58 { |
| 59 visitor->trace(m_workerGlobalScope); |
| 60 PerIsolateDebuggerClient::trace(visitor); |
| 61 } |
| 62 |
53 void WorkerScriptDebugServer::setContextDebugData(v8::Local<v8::Context> context
) | 63 void WorkerScriptDebugServer::setContextDebugData(v8::Local<v8::Context> context
) |
54 { | 64 { |
55 ScriptDebugServer::setContextDebugData(context, workerContextDebugId); | 65 ScriptDebugServer::setContextDebugData(context, workerContextDebugId); |
56 } | 66 } |
57 | 67 |
58 void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener) | 68 void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener) |
59 { | 69 { |
60 ASSERT(!m_listener); | 70 ASSERT(!m_listener); |
61 scriptDebugServer()->enable(); | 71 scriptDebugServer()->enable(); |
62 m_listener = listener; | 72 m_listener = listener; |
(...skipping 28 matching lines...) Expand all Loading... |
91 if (m_listener) | 101 if (m_listener) |
92 m_listener->didContinue(); | 102 m_listener->didContinue(); |
93 } | 103 } |
94 | 104 |
95 void WorkerScriptDebugServer::quitMessageLoopOnPause() | 105 void WorkerScriptDebugServer::quitMessageLoopOnPause() |
96 { | 106 { |
97 // Nothing to do here in case of workers since runMessageLoopOnPause will ch
eck for paused state after each debugger command. | 107 // Nothing to do here in case of workers since runMessageLoopOnPause will ch
eck for paused state after each debugger command. |
98 } | 108 } |
99 | 109 |
100 } // namespace blink | 110 } // namespace blink |
OLD | NEW |