| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 * Client data passed with the corresponding request if any. This is the | 135 * Client data passed with the corresponding request if any. This is the |
| 136 * client_data data value passed into Debug::SendCommand along with the | 136 * client_data data value passed into Debug::SendCommand along with the |
| 137 * request that led to the message or NULL if the message is an event. The | 137 * request that led to the message or NULL if the message is an event. The |
| 138 * debugger takes ownership of the data and will delete it even if there is | 138 * debugger takes ownership of the data and will delete it even if there is |
| 139 * no message handler. | 139 * no message handler. |
| 140 */ | 140 */ |
| 141 virtual ClientData* GetClientData() const = 0; | 141 virtual ClientData* GetClientData() const = 0; |
| 142 | 142 |
| 143 virtual ~Message() {} | 143 virtual ~Message() {} |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 | 146 |
| 147 /** | 147 /** |
| 148 * An event details object passed to the debug event listener. | 148 * An event details object passed to the debug event listener. |
| 149 */ | 149 */ |
| 150 class EventDetails { | 150 class EventDetails { |
| 151 public: | 151 public: |
| 152 /** | 152 /** |
| 153 * Event type. | 153 * Event type. |
| 154 */ | 154 */ |
| 155 virtual DebugEvent GetEvent() const = 0; | 155 virtual DebugEvent GetEvent() const = 0; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 /** | 294 /** |
| 295 * Run a JavaScript function in the debugger. | 295 * Run a JavaScript function in the debugger. |
| 296 * \param fun the function to call | 296 * \param fun the function to call |
| 297 * \param data passed as second argument to the function | 297 * \param data passed as second argument to the function |
| 298 * With this call the debugger is entered and the function specified is called | 298 * With this call the debugger is entered and the function specified is called |
| 299 * with the execution state as the first argument. This makes it possible to | 299 * with the execution state as the first argument. This makes it possible to |
| 300 * get access to information otherwise not available during normal JavaScript | 300 * get access to information otherwise not available during normal JavaScript |
| 301 * execution e.g. details on stack frames. Receiver of the function call will | 301 * execution e.g. details on stack frames. Receiver of the function call will |
| 302 * be the debugger context global object, however this is a subject to change. | 302 * be the debugger context global object, however this is a subject to change. |
| 303 * The following example show a JavaScript function which when passed to | 303 * The following example show a JavaScript function which when passed to |
| 304 * v8::Debug::Call will return the current line of JavaScript execution. | 304 * v8::Debug::Call will return the current line of JavaScript execution. |
| 305 * | 305 * |
| 306 * \code | 306 * \code |
| 307 * function frame_source_line(exec_state) { | 307 * function frame_source_line(exec_state) { |
| 308 * return exec_state.frame(0).sourceLine(); | 308 * return exec_state.frame(0).sourceLine(); |
| 309 * } | 309 * } |
| 310 * \endcode | 310 * \endcode |
| 311 */ | 311 */ |
| 312 static Local<Value> Call(v8::Handle<v8::Function> fun, | 312 static Local<Value> Call(v8::Handle<v8::Function> fun, |
| 313 Handle<Value> data = Handle<Value>()); | 313 Handle<Value> data = Handle<Value>()); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 }; | 375 }; |
| 376 | 376 |
| 377 | 377 |
| 378 } // namespace v8 | 378 } // namespace v8 |
| 379 | 379 |
| 380 | 380 |
| 381 #undef EXPORT | 381 #undef EXPORT |
| 382 | 382 |
| 383 | 383 |
| 384 #endif // V8_V8_DEBUG_H_ | 384 #endif // V8_V8_DEBUG_H_ |
| OLD | NEW |