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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 89 |
90 | |
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; |
100 | 99 |
(...skipping 37 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 typedef void (*MessageHandler)(const Message& message); |
152 | 151 |
153 /** | 152 /** |
154 * Callback function for the host to ensure debug messages are processed. | 153 * Callback function for the host to ensure debug messages are processed. |
155 */ | 154 */ |
156 typedef void (*DebugMessageDispatchHandler)(); | 155 typedef void (*DebugMessageDispatchHandler)(); |
157 | 156 |
158 static bool SetDebugEventListener(Isolate* isolate, EventCallback that, | 157 static bool SetDebugEventListener(Isolate* isolate, EventCallback that, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 }; | 281 }; |
283 | 282 |
284 | 283 |
285 } // namespace v8 | 284 } // namespace v8 |
286 | 285 |
287 | 286 |
288 #undef EXPORT | 287 #undef EXPORT |
289 | 288 |
290 | 289 |
291 #endif // V8_V8_DEBUG_H_ | 290 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |