Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 Handle<Object> exec_state, | 155 Handle<Object> exec_state, |
| 156 Handle<Object> event_data, | 156 Handle<Object> event_data, |
| 157 Handle<Value> data); | 157 Handle<Value> data); |
| 158 | 158 |
| 159 | 159 |
| 160 /** | 160 /** |
| 161 * Debug message callback function. | 161 * Debug message callback function. |
| 162 * | 162 * |
| 163 * \param message the debug message handler message object | 163 * \param message the debug message handler message object |
| 164 * \param length length of the message | 164 * \param length length of the message |
| 165 * \param data the data value passed when registering the message handler | 165 * \param client_data the data value passed when registering the message handl er |
| 166 | 166 |
| 167 * A MessageHandler does not take posession of the message string, | 167 * A MessageHandler does not take posession of the message string, |
| 168 * and must not rely on the data persisting after the handler returns. | 168 * and must not rely on the data persisting after the handler returns. |
| 169 * | |
| 170 * This message handler is deprecated. Use MessageHandler2 instead. | |
| 169 */ | 171 */ |
| 170 typedef void (*MessageHandler)(const Message& message); | 172 typedef void (*MessageHandler)(const uint16_t* message, int length, |
| 173 ClientData* client_data); | |
| 174 | |
| 175 /** | |
| 176 * Debug message callback function. | |
| 177 * | |
| 178 * \param message the debug message handler message object | |
| 179 | |
| 180 * A MessageHandler does not take posession of the message data, | |
| 181 * and must not rely on the data persisting after the handler returns. | |
| 182 */ | |
| 183 typedef void (*MessageHandler2)(const Message& message); | |
| 171 | 184 |
| 172 /** | 185 /** |
| 173 * Debug host dispatch callback function. | 186 * Debug host dispatch callback function. |
| 174 */ | 187 */ |
| 175 typedef void (*HostDispatchHandler)(); | 188 typedef void (*HostDispatchHandler)(); |
| 176 | 189 |
| 177 // Set a C debug event listener. | 190 // Set a C debug event listener. |
| 178 static bool SetDebugEventListener(EventCallback that, | 191 static bool SetDebugEventListener(EventCallback that, |
| 179 Handle<Value> data = Handle<Value>()); | 192 Handle<Value> data = Handle<Value>()); |
| 180 | 193 |
| 181 // Set a JavaScript debug event listener. | 194 // Set a JavaScript debug event listener. |
| 182 static bool SetDebugEventListener(v8::Handle<v8::Object> that, | 195 static bool SetDebugEventListener(v8::Handle<v8::Object> that, |
| 183 Handle<Value> data = Handle<Value>()); | 196 Handle<Value> data = Handle<Value>()); |
| 184 | 197 |
| 185 // Break execution of JavaScript. | 198 // Break execution of JavaScript. |
| 186 static void DebugBreak(); | 199 static void DebugBreak(); |
| 187 | 200 |
| 188 // Message based interface. The message protocol is JSON. NOTE the message | 201 // Message based interface. The message protocol is JSON. NOTE the message |
| 189 // handler thread is not supported any more parameter must be false. | 202 // handler thread is not supported any more parameter must be false. |
| 190 static void SetMessageHandler(MessageHandler handler, | 203 static void SetMessageHandler(MessageHandler handler, |
| 191 bool message_handler_thread = false); | 204 bool message_handler_thread = false); |
| 205 static void SetMessageHandler2(MessageHandler2 handler); | |
|
yurys
2009/04/29 12:36:08
When all clients are switched to the new message h
Søren Thygesen Gjesse
2009/04/29 13:24:15
I agree that this is not optimal, but we need to k
| |
| 192 static void SendCommand(const uint16_t* command, int length, | 206 static void SendCommand(const uint16_t* command, int length, |
| 193 ClientData* client_data = NULL); | 207 ClientData* client_data = NULL); |
| 194 | 208 |
| 195 // Dispatch interface. | 209 // Dispatch interface. |
| 196 static void SetHostDispatchHandler(HostDispatchHandler handler, | 210 static void SetHostDispatchHandler(HostDispatchHandler handler, |
| 197 int period = 100); | 211 int period = 100); |
| 198 | 212 |
| 199 /** | 213 /** |
| 200 * Run a JavaScript function in the debugger. | 214 * Run a JavaScript function in the debugger. |
| 201 * \param fun the function to call | 215 * \param fun the function to call |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 226 }; | 240 }; |
| 227 | 241 |
| 228 | 242 |
| 229 } // namespace v8 | 243 } // namespace v8 |
| 230 | 244 |
| 231 | 245 |
| 232 #undef EXPORT | 246 #undef EXPORT |
| 233 | 247 |
| 234 | 248 |
| 235 #endif // V8_DEBUG_H_ | 249 #endif // V8_DEBUG_H_ |
| OLD | NEW |