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

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

Issue 812583003: Support tasks injection into a running VM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added a comment. Created 6 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/debug.h » ('J')
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 // 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" 8 #include "v8.h"
9 9
10 /** 10 /**
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Check if a debugger break is scheduled in the given isolate. 170 // Check if a debugger break is scheduled in the given isolate.
171 static bool CheckDebugBreak(Isolate* isolate); 171 static bool CheckDebugBreak(Isolate* isolate);
172 172
173 // Break execution of JavaScript in the given isolate (this method 173 // Break execution of JavaScript in the given isolate (this method
174 // can be invoked from a non-VM thread) for further client command 174 // can be invoked from a non-VM thread) for further client command
175 // execution on a VM thread. Client data is then passed in 175 // execution on a VM thread. Client data is then passed in
176 // EventDetails to EventCallback2 at the moment when the VM actually 176 // EventDetails to EventCallback2 at the moment when the VM actually
177 // stops. 177 // stops.
178 static void DebugBreakForCommand(Isolate* isolate, ClientData* data); 178 static void DebugBreakForCommand(Isolate* isolate, ClientData* data);
179 179
180 class Task {
Sven Panne 2014/12/18 08:27:50 We already have v8::Task, why do we need another o
alph 2014/12/18 14:28:03 Sorry, missed the v8::Task.
181 public:
182 virtual void Run() = 0;
183 virtual ~Task() {}
184 };
185
186 // Break execution of JavaScript in the given isolate (this method
187 // can be invoked from a non-VM thread) and execute the given task on the
188 // VM thread. The VM takes ownership of the task.
Sven Panne 2014/12/18 08:27:51 Please extend the comment a bit, describing that t
alph 2014/12/18 14:28:03 Done.
189 static void BreakAndRun(Isolate* isolate, Task* task);
190
180 // Message based interface. The message protocol is JSON. 191 // Message based interface. The message protocol is JSON.
181 static void SetMessageHandler(MessageHandler handler); 192 static void SetMessageHandler(MessageHandler handler);
182 193
183 static void SendCommand(Isolate* isolate, 194 static void SendCommand(Isolate* isolate,
184 const uint16_t* command, int length, 195 const uint16_t* command, int length,
185 ClientData* client_data = NULL); 196 ClientData* client_data = NULL);
186 197
187 /** 198 /**
188 * Run a JavaScript function in the debugger. 199 * Run a JavaScript function in the debugger.
189 * \param fun the function to call 200 * \param fun the function to call
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 }; 272 };
262 273
263 274
264 } // namespace v8 275 } // namespace v8
265 276
266 277
267 #undef EXPORT 278 #undef EXPORT
268 279
269 280
270 #endif // V8_V8_DEBUG_H_ 281 #endif // V8_V8_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/debug.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698