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

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

Issue 2727393003: [debugger,api] deprecate everything in v8-debug.h (Closed)
Patch Set: 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') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('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" // 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 15 matching lines...) Expand all
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 // TODO(dcarney): data arg should be a MaybeLocal
193 static MaybeLocal<Value> Call(Local<Context> context, 193 V8_DEPRECATED("No longer supported",
194 v8::Local<v8::Function> fun, 194 static MaybeLocal<Value> Call(
195 Local<Value> data = Local<Value>()); 195 Local<Context> context, v8::Local<v8::Function> fun,
196 Local<Value> data = Local<Value>()));
196 197
197 // This is now a no-op. 198 // This is now a no-op.
198 V8_DEPRECATED("No longer supported", 199 V8_DEPRECATED("No longer supported",
199 static void ProcessDebugMessages(Isolate* isolate)); 200 static void ProcessDebugMessages(Isolate* isolate));
200 201
201 /** 202 /**
202 * Debugger is running in its own context which is entered while debugger 203 * Debugger is running in its own context which is entered while debugger
203 * messages are being dispatched. This is an explicit getter for this 204 * messages are being dispatched. This is an explicit getter for this
204 * debugger context. Note that the content of the debugger context is subject 205 * 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 206 * to change. The Context exists only when the debugger is active, i.e. at
206 * least one DebugEventListener or MessageHandler is set. 207 * least one DebugEventListener or MessageHandler is set.
207 */ 208 */
208 V8_DEPRECATED("Use v8-inspector", 209 V8_DEPRECATED("Use v8-inspector",
209 static Local<Context> GetDebugContext(Isolate* isolate)); 210 static Local<Context> GetDebugContext(Isolate* isolate));
210 211
211 /** 212 /**
212 * While in the debug context, this method returns the top-most non-debug 213 * While in the debug context, this method returns the top-most non-debug
213 * context, if it exists. 214 * context, if it exists.
214 */ 215 */
215 V8_DEPRECATED( 216 V8_DEPRECATED(
216 "No longer supported", 217 "No longer supported",
217 static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate)); 218 static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate));
218 219
219 /** 220 /**
220 * Enable/disable LiveEdit functionality for the given Isolate 221 * Enable/disable LiveEdit functionality for the given Isolate
221 * (default Isolate if not provided). V8 will abort if LiveEdit is 222 * (default Isolate if not provided). V8 will abort if LiveEdit is
222 * unexpectedly used. LiveEdit is enabled by default. 223 * unexpectedly used. LiveEdit is enabled by default.
223 */ 224 */
224 static void SetLiveEditEnabled(Isolate* isolate, bool enable); 225 V8_DEPRECATED("No longer supported",
226 static void SetLiveEditEnabled(Isolate* isolate, bool enable));
225 227
226 /** 228 /**
227 * Returns array of internal properties specific to the value type. Result has 229 * Returns array of internal properties specific to the value type. Result has
228 * the following format: [<name>, <value>,...,<name>, <value>]. Result array 230 * the following format: [<name>, <value>,...,<name>, <value>]. Result array
229 * will be allocated in the current context. 231 * will be allocated in the current context.
230 */ 232 */
231 static MaybeLocal<Array> GetInternalProperties(Isolate* isolate, 233 V8_DEPRECATED("No longer supported",
232 Local<Value> value); 234 static MaybeLocal<Array> GetInternalProperties(
235 Isolate* isolate, Local<Value> value));
233 236
234 /** 237 /**
235 * Defines if the ES2015 tail call elimination feature is enabled or not. 238 * Defines if the ES2015 tail call elimination feature is enabled or not.
236 * The change of this flag triggers deoptimization of all functions that 239 * The change of this flag triggers deoptimization of all functions that
237 * contain calls at tail position. 240 * contain calls at tail position.
238 */ 241 */
239 static bool IsTailCallEliminationEnabled(Isolate* isolate); 242 V8_DEPRECATED("No longer supported",
240 static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); 243 static bool IsTailCallEliminationEnabled(Isolate* isolate));
244 V8_DEPRECATED("No longer supported",
245 static void SetTailCallEliminationEnabled(Isolate* isolate,
246 bool enabled));
241 }; 247 };
242 248
243 249
244 } // namespace v8 250 } // namespace v8
245 251
246 252
247 #undef EXPORT 253 #undef EXPORT
248 254
249 255
250 #endif // V8_V8_DEBUG_H_ 256 #endif // V8_V8_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698