Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: include/v8-debug.h

Issue 12472: Added a debugger call to run a JavaScript function in the debugger. When call... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // Remove a JavaScript debug event listener. 122 // Remove a JavaScript debug event listener.
123 static void RemoveDebugEventListener(v8::Handle<v8::Function> that); 123 static void RemoveDebugEventListener(v8::Handle<v8::Function> that);
124 124
125 // Break execution of JavaScript. 125 // Break execution of JavaScript.
126 static void DebugBreak(); 126 static void DebugBreak();
127 127
128 // Message based interface. The message protocol is JSON. 128 // Message based interface. The message protocol is JSON.
129 static void SetMessageHandler(DebugMessageHandler handler, void* data = NULL); 129 static void SetMessageHandler(DebugMessageHandler handler, void* data = NULL);
130 static void SendCommand(const uint16_t* command, int length); 130 static void SendCommand(const uint16_t* command, int length);
131
132 /**
133 * Run a JavaScript function in the debugger.
134 * \param fun the function to call
135 * \param data passed as second argument to the function
136 * With this call the debugger is entered and the function specified is called
137 * with the execution state as the first argument. This makes it possible to
138 * get access to information otherwise not available during normal JavaScript
139 * execution e.g. details on stack frames. The following example show a
140 * JavaScript function which when passed to v8::Debug::Call will return the
141 * current line of JavaScript execution.
142 *
143 * \code
144 * function frame_source_line(exec_state) {
145 * return exec_state.frame(0).sourceLine();
146 * }
147 * \endcode
148 */
149 static Handle<Value> Call(v8::Handle<v8::Function> fun,
150 Handle<Value> data = Handle<Value>());
131 }; 151 };
132 152
133 153
134 } // namespace v8 154 } // namespace v8
135 155
136 156
137 #undef EXPORT 157 #undef EXPORT
138 158
139 159
140 #endif // V8_DEBUG_H_ 160 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698