OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_V8_DEBUG_H_ | 5 #ifndef V8_V8_DEBUG_H_ |
6 #define V8_V8_DEBUG_H_ | 6 #define V8_V8_DEBUG_H_ |
7 | 7 |
8 #include "v8.h" // NOLINT(build/include) | 8 #include "v8.h" // NOLINT(build/include) |
9 | 9 |
10 /** | 10 /** |
(...skipping 20 matching lines...) Expand all Loading... |
31 */ | 31 */ |
32 class ClientData { | 32 class ClientData { |
33 public: | 33 public: |
34 virtual ~ClientData() {} | 34 virtual ~ClientData() {} |
35 }; | 35 }; |
36 | 36 |
37 | 37 |
38 /** | 38 /** |
39 * A message object passed to the debug message handler. | 39 * A message object passed to the debug message handler. |
40 */ | 40 */ |
41 class Message { | 41 V8_DEPRECATED("No longer supported", class Message { |
42 public: | 42 public: |
43 /** | 43 /** |
44 * Check type of message. | 44 * Check type of message. |
45 */ | 45 */ |
46 virtual bool IsEvent() const = 0; | 46 virtual bool IsEvent() const = 0; |
47 virtual bool IsResponse() const = 0; | 47 virtual bool IsResponse() const = 0; |
48 virtual DebugEvent GetEvent() const = 0; | 48 virtual DebugEvent GetEvent() const = 0; |
49 | 49 |
50 /** | 50 /** |
51 * Indicate whether this is a response to a continue command which will | 51 * Indicate whether this is a response to a continue command which will |
(...skipping 26 matching lines...) Expand all Loading... |
78 * client_data data value passed into Debug::SendCommand along with the | 78 * client_data data value passed into Debug::SendCommand along with the |
79 * request that led to the message or NULL if the message is an event. The | 79 * request that led to the message or NULL if the message is an event. The |
80 * debugger takes ownership of the data and will delete it even if there is | 80 * debugger takes ownership of the data and will delete it even if there is |
81 * no message handler. | 81 * no message handler. |
82 */ | 82 */ |
83 virtual ClientData* GetClientData() const = 0; | 83 virtual ClientData* GetClientData() const = 0; |
84 | 84 |
85 virtual Isolate* GetIsolate() const = 0; | 85 virtual Isolate* GetIsolate() const = 0; |
86 | 86 |
87 virtual ~Message() {} | 87 virtual ~Message() {} |
88 }; | 88 }); |
89 | |
90 | 89 |
91 /** | 90 /** |
92 * An event details object passed to the debug event listener. | 91 * An event details object passed to the debug event listener. |
93 */ | 92 */ |
94 class EventDetails { | 93 class EventDetails { |
95 public: | 94 public: |
96 /** | 95 /** |
97 * Event type. | 96 * Event type. |
98 */ | 97 */ |
99 virtual DebugEvent GetEvent() const = 0; | 98 virtual DebugEvent GetEvent() const = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 * A EventCallback2 does not take possession of the event data, | 137 * A EventCallback2 does not take possession of the event data, |
139 * and must not rely on the data persisting after the handler returns. | 138 * and must not rely on the data persisting after the handler returns. |
140 */ | 139 */ |
141 typedef void (*EventCallback)(const EventDetails& event_details); | 140 typedef void (*EventCallback)(const EventDetails& event_details); |
142 | 141 |
143 /** | 142 /** |
144 * Debug message callback function. | 143 * Debug message callback function. |
145 * | 144 * |
146 * \param message the debug message handler message object | 145 * \param message the debug message handler message object |
147 * | 146 * |
148 * A MessageHandler2 does not take possession of the message data, | 147 * A MessageHandler does not take possession of the message data, |
149 * and must not rely on the data persisting after the handler returns. | 148 * and must not rely on the data persisting after the handler returns. |
150 */ | 149 */ |
151 typedef void (*MessageHandler)(const Message& message); | 150 V8_DEPRECATED("No longer supported", |
| 151 typedef void (*MessageHandler)(const Message& message)); |
152 | 152 |
153 /** | 153 /** |
154 * Callback function for the host to ensure debug messages are processed. | 154 * Callback function for the host to ensure debug messages are processed. |
155 */ | 155 */ |
156 typedef void (*DebugMessageDispatchHandler)(); | 156 typedef void (*DebugMessageDispatchHandler)(); |
157 | 157 |
158 static bool SetDebugEventListener(Isolate* isolate, EventCallback that, | 158 static bool SetDebugEventListener(Isolate* isolate, EventCallback that, |
159 Local<Value> data = Local<Value>()); | 159 Local<Value> data = Local<Value>()); |
160 | 160 |
161 // Schedule a debugger break to happen when JavaScript code is run | 161 // Schedule a debugger break to happen when JavaScript code is run |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 }; | 282 }; |
283 | 283 |
284 | 284 |
285 } // namespace v8 | 285 } // namespace v8 |
286 | 286 |
287 | 287 |
288 #undef EXPORT | 288 #undef EXPORT |
289 | 289 |
290 | 290 |
291 #endif // V8_V8_DEBUG_H_ | 291 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |