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

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

Issue 2727393003: [debugger,api] deprecate everything in v8-debug.h (Closed)
Patch Set: remove TODO Created 3 years, 9 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 /**
11 * Debugger support for the V8 JavaScript engine. 11 * ATTENTION: The debugger API exposed by this file is deprecated and will be
12 * removed by the end of 2017. Please use the V8 inspector declared
13 * in include/v8-inspector.h instead.
12 */ 14 */
13 namespace v8 { 15 namespace v8 {
14 16
15 // Debug events which can occur in the V8 JavaScript engine. 17 // Debug events which can occur in the V8 JavaScript engine.
16 enum DebugEvent { 18 enum DebugEvent {
17 Break = 1, 19 Break = 1,
18 Exception = 2, 20 Exception = 2,
19 AfterCompile = 3, 21 AfterCompile = 3,
20 CompileError = 4, 22 CompileError = 4,
21 AsyncTaskEvent = 5, 23 AsyncTaskEvent = 5,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 * A EventCallback does not take possession of the event data, 135 * A EventCallback does not take possession of the event data,
134 * and must not rely on the data persisting after the handler returns. 136 * and must not rely on the data persisting after the handler returns.
135 */ 137 */
136 typedef void (*EventCallback)(const EventDetails& event_details); 138 typedef void (*EventCallback)(const EventDetails& event_details);
137 139
138 /** 140 /**
139 * This is now a no-op. 141 * This is now a no-op.
140 */ 142 */
141 typedef void (*MessageHandler)(const Message& message); 143 typedef void (*MessageHandler)(const Message& message);
142 144
143 /** 145 V8_DEPRECATED("No longer supported", static bool SetDebugEventListener(
144 * This is now a no-op. 146 Isolate* isolate, EventCallback that,
145 */ 147 Local<Value> data = Local<Value>()));
146 typedef void (*DebugMessageDispatchHandler)();
147
148 static bool SetDebugEventListener(Isolate* isolate, EventCallback that,
149 Local<Value> data = Local<Value>());
150 148
151 // Schedule a debugger break to happen when JavaScript code is run 149 // Schedule a debugger break to happen when JavaScript code is run
152 // in the given isolate. 150 // in the given isolate.
153 static void DebugBreak(Isolate* isolate); 151 V8_DEPRECATED("No longer supported",
152 static void DebugBreak(Isolate* isolate));
154 153
155 // Remove scheduled debugger break in given isolate if it has not 154 // Remove scheduled debugger break in given isolate if it has not
156 // happened yet. 155 // happened yet.
157 static void CancelDebugBreak(Isolate* isolate); 156 V8_DEPRECATED("No longer supported",
157 static void CancelDebugBreak(Isolate* isolate));
158 158
159 // Check if a debugger break is scheduled in the given isolate. 159 // Check if a debugger break is scheduled in the given isolate.
160 V8_DEPRECATED("No longer supported", 160 V8_DEPRECATED("No longer supported",
161 static bool CheckDebugBreak(Isolate* isolate)); 161 static bool CheckDebugBreak(Isolate* isolate));
162 162
163 // This is now a no-op. 163 // This is now a no-op.
164 V8_DEPRECATED("No longer supported", 164 V8_DEPRECATED("No longer supported",
165 static void SetMessageHandler(Isolate* isolate, 165 static void SetMessageHandler(Isolate* isolate,
166 MessageHandler handler)); 166 MessageHandler handler));
167 167
(...skipping 14 matching lines...) Expand all
182 * be the debugger context global object, however this is a subject to change. 182 * be the debugger context global object, however this is a subject to change.
183 * The following example shows a JavaScript function which when passed to 183 * The following example shows a JavaScript function which when passed to
184 * v8::Debug::Call will return the current line of JavaScript execution. 184 * v8::Debug::Call will return the current line of JavaScript execution.
185 * 185 *
186 * \code 186 * \code
187 * function frame_source_line(exec_state) { 187 * function frame_source_line(exec_state) {
188 * return exec_state.frame(0).sourceLine(); 188 * return exec_state.frame(0).sourceLine();
189 * } 189 * }
190 * \endcode 190 * \endcode
191 */ 191 */
192 // TODO(dcarney): data arg should be a MaybeLocal 192 V8_DEPRECATED("No longer supported",
193 static MaybeLocal<Value> Call(Local<Context> context, 193 static MaybeLocal<Value> Call(
194 v8::Local<v8::Function> fun, 194 Local<Context> context, v8::Local<v8::Function> fun,
195 Local<Value> data = Local<Value>()); 195 Local<Value> data = Local<Value>()));
196 196
197 // This is now a no-op. 197 // This is now a no-op.
198 V8_DEPRECATED("No longer supported", 198 V8_DEPRECATED("No longer supported",
199 static void ProcessDebugMessages(Isolate* isolate)); 199 static void ProcessDebugMessages(Isolate* isolate));
200 200
201 /** 201 /**
202 * Debugger is running in its own context which is entered while debugger 202 * Debugger is running in its own context which is entered while debugger
203 * messages are being dispatched. This is an explicit getter for this 203 * messages are being dispatched. This is an explicit getter for this
204 * debugger context. Note that the content of the debugger context is subject 204 * debugger context. Note that the content of the debugger context is subject
205 * to change. The Context exists only when the debugger is active, i.e. at 205 * to change. The Context exists only when the debugger is active, i.e. at
206 * least one DebugEventListener or MessageHandler is set. 206 * least one DebugEventListener or MessageHandler is set.
207 */ 207 */
208 V8_DEPRECATED("Use v8-inspector", 208 V8_DEPRECATED("Use v8-inspector",
209 static Local<Context> GetDebugContext(Isolate* isolate)); 209 static Local<Context> GetDebugContext(Isolate* isolate));
210 210
211 /** 211 /**
212 * While in the debug context, this method returns the top-most non-debug 212 * While in the debug context, this method returns the top-most non-debug
213 * context, if it exists. 213 * context, if it exists.
214 */ 214 */
215 V8_DEPRECATED( 215 V8_DEPRECATED(
216 "No longer supported", 216 "No longer supported",
217 static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate)); 217 static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate));
218 218
219 /** 219 /**
220 * Enable/disable LiveEdit functionality for the given Isolate 220 * Enable/disable LiveEdit functionality for the given Isolate
221 * (default Isolate if not provided). V8 will abort if LiveEdit is 221 * (default Isolate if not provided). V8 will abort if LiveEdit is
222 * unexpectedly used. LiveEdit is enabled by default. 222 * unexpectedly used. LiveEdit is enabled by default.
223 */ 223 */
224 static void SetLiveEditEnabled(Isolate* isolate, bool enable); 224 V8_DEPRECATED("No longer supported",
225 static void SetLiveEditEnabled(Isolate* isolate, bool enable));
225 226
226 /** 227 /**
227 * Returns array of internal properties specific to the value type. Result has 228 * Returns array of internal properties specific to the value type. Result has
228 * the following format: [<name>, <value>,...,<name>, <value>]. Result array 229 * the following format: [<name>, <value>,...,<name>, <value>]. Result array
229 * will be allocated in the current context. 230 * will be allocated in the current context.
230 */ 231 */
231 static MaybeLocal<Array> GetInternalProperties(Isolate* isolate, 232 V8_DEPRECATED("No longer supported",
232 Local<Value> value); 233 static MaybeLocal<Array> GetInternalProperties(
234 Isolate* isolate, Local<Value> value));
233 235
234 /** 236 /**
235 * Defines if the ES2015 tail call elimination feature is enabled or not. 237 * Defines if the ES2015 tail call elimination feature is enabled or not.
236 * The change of this flag triggers deoptimization of all functions that 238 * The change of this flag triggers deoptimization of all functions that
237 * contain calls at tail position. 239 * contain calls at tail position.
238 */ 240 */
239 static bool IsTailCallEliminationEnabled(Isolate* isolate); 241 V8_DEPRECATED("No longer supported",
240 static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); 242 static bool IsTailCallEliminationEnabled(Isolate* isolate));
243 V8_DEPRECATED("No longer supported",
244 static void SetTailCallEliminationEnabled(Isolate* isolate,
245 bool enabled));
241 }; 246 };
242 247
243 248
244 } // namespace v8 249 } // namespace v8
245 250
246 251
247 #undef EXPORT 252 #undef EXPORT
248 253
249 254
250 #endif // V8_V8_DEBUG_H_ 255 #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