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

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

Issue 2040853003: Add a convenience method to get the debugged context (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months 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') | 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 // 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 */ 118 */
119 virtual Local<Value> GetCallbackData() const = 0; 119 virtual Local<Value> GetCallbackData() const = 0;
120 120
121 /** 121 /**
122 * Client data passed to DebugBreakForCommand function. The 122 * Client data passed to DebugBreakForCommand function. The
123 * debugger takes ownership of the data and will delete it even if 123 * debugger takes ownership of the data and will delete it even if
124 * there is no message handler. 124 * there is no message handler.
125 */ 125 */
126 virtual ClientData* GetClientData() const = 0; 126 virtual ClientData* GetClientData() const = 0;
127 127
128 virtual Isolate* GetIsolate() const = 0;
129
128 virtual ~EventDetails() {} 130 virtual ~EventDetails() {}
129 }; 131 };
130 132
131 /** 133 /**
132 * Debug event callback function. 134 * Debug event callback function.
133 * 135 *
134 * \param event_details object providing information about the debug event 136 * \param event_details object providing information about the debug event
135 * 137 *
136 * A EventCallback2 does not take possession of the event data, 138 * A EventCallback2 does not take possession of the event data,
137 * and must not rely on the data persisting after the handler returns. 139 * and must not rely on the data persisting after the handler returns.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 * Debugger is running in its own context which is entered while debugger 254 * Debugger is running in its own context which is entered while debugger
253 * messages are being dispatched. This is an explicit getter for this 255 * messages are being dispatched. This is an explicit getter for this
254 * debugger context. Note that the content of the debugger context is subject 256 * debugger context. Note that the content of the debugger context is subject
255 * to change. The Context exists only when the debugger is active, i.e. at 257 * to change. The Context exists only when the debugger is active, i.e. at
256 * least one DebugEventListener or MessageHandler is set. 258 * least one DebugEventListener or MessageHandler is set.
257 */ 259 */
258 static Local<Context> GetDebugContext(Isolate* isolate); 260 static Local<Context> GetDebugContext(Isolate* isolate);
259 V8_DEPRECATED("Use version with an Isolate", 261 V8_DEPRECATED("Use version with an Isolate",
260 static Local<Context> GetDebugContext()); 262 static Local<Context> GetDebugContext());
261 263
264 /**
265 * While in the debug context, this method returns the top-most non-debug
266 * context, if it exists.
267 */
268 static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate);
262 269
263 /** 270 /**
264 * Enable/disable LiveEdit functionality for the given Isolate 271 * Enable/disable LiveEdit functionality for the given Isolate
265 * (default Isolate if not provided). V8 will abort if LiveEdit is 272 * (default Isolate if not provided). V8 will abort if LiveEdit is
266 * unexpectedly used. LiveEdit is enabled by default. 273 * unexpectedly used. LiveEdit is enabled by default.
267 */ 274 */
268 static void SetLiveEditEnabled(Isolate* isolate, bool enable); 275 static void SetLiveEditEnabled(Isolate* isolate, bool enable);
269 276
270 /** 277 /**
271 * Returns array of internal properties specific to the value type. Result has 278 * Returns array of internal properties specific to the value type. Result has
(...skipping 13 matching lines...) Expand all
285 }; 292 };
286 293
287 294
288 } // namespace v8 295 } // namespace v8
289 296
290 297
291 #undef EXPORT 298 #undef EXPORT
292 299
293 300
294 #endif // V8_V8_DEBUG_H_ 301 #endif // V8_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