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

Side by Side Diff: src/debug-debugger.js

Issue 494303004: fix and update debug-debugger.js (Closed) Base URL: https://github.com/v8/v8@master
Patch Set: Created 6 years, 3 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Default number of frames to include in the response to backtrace request. 5 // Default number of frames to include in the response to backtrace request.
6 var kDefaultBacktraceLength = 10; 6 var kDefaultBacktraceLength = 10;
7 7
8 var Debug = {}; 8 var Debug = {};
9 9
10 // Regular expression to skip "crud" at the beginning of a source line which is 10 // Regular expression to skip "crud" at the beginning of a source line which is
11 // not really code. Currently the regular expression matches whitespace and 11 // not really code. Currently the regular expression matches whitespace and
12 // comments. 12 // comments.
13 var sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/; 13 var sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/;
14 14
15 // Debug events which can occour in the V8 JavaScript engine. These originate 15 // Debug events which can occour in the V8 JavaScript engine. These originate
16 // from the API include file debug.h. 16 // from the API include file debug.h.
17 Debug.DebugEvent = { Break: 1, 17 Debug.DebugEvent = { Break: 1,
18 Exception: 2, 18 Exception: 2,
19 NewFunction: 3, 19 NewFunction: 3,
20 BeforeCompile: 4, 20 BeforeCompile: 4,
21 AfterCompile: 5, 21 AfterCompile: 5,
22 CompileError: 6, 22 CompileError: 6,
23 PromiseEvent: 7, 23 PromiseEvent: 7,
24 AsyncTaskEvent: 8 }; 24 AsyncTaskEvent: 8,
25 BreakForCommand: 9 };
25 26
26 // Types of exceptions that can be broken upon. 27 // Types of exceptions that can be broken upon.
27 Debug.ExceptionBreak = { Caught : 0, 28 Debug.ExceptionBreak = { Caught : 0,
28 Uncaught: 1 }; 29 Uncaught: 1 };
29 30
30 // The different types of steps. 31 // The different types of steps.
31 Debug.StepAction = { StepOut: 0, 32 Debug.StepAction = { StepOut: 0,
32 StepNext: 1, 33 StepNext: 1,
33 StepIn: 2, 34 StepIn: 2,
34 StepMin: 3, 35 StepMin: 3,
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 return this.script_; 1166 return this.script_;
1166 }; 1167 };
1167 1168
1168 1169
1169 CompileEvent.prototype.toJSONProtocol = function() { 1170 CompileEvent.prototype.toJSONProtocol = function() {
1170 var o = new ProtocolMessage(); 1171 var o = new ProtocolMessage();
1171 o.running = true; 1172 o.running = true;
1172 switch (this.type_) { 1173 switch (this.type_) {
1173 case Debug.DebugEvent.BeforeCompile: 1174 case Debug.DebugEvent.BeforeCompile:
1174 o.event = "beforeCompile"; 1175 o.event = "beforeCompile";
1176 break;
1175 case Debug.DebugEvent.AfterCompile: 1177 case Debug.DebugEvent.AfterCompile:
1176 o.event = "afterCompile"; 1178 o.event = "afterCompile";
1179 break;
1177 case Debug.DebugEvent.CompileError: 1180 case Debug.DebugEvent.CompileError:
1178 o.event = "compileError"; 1181 o.event = "compileError";
1182 break;
1179 } 1183 }
1180 o.body = {}; 1184 o.body = {};
1181 o.body.script = this.script_; 1185 o.body.script = this.script_;
1182 1186
1183 return o.toJSONProtocol(); 1187 return o.toJSONProtocol();
1184 }; 1188 };
1185 1189
1186 1190
1187 function MakeScriptObject_(script, include_source) { 1191 function MakeScriptObject_(script, include_source) {
1188 var o = { id: script.id(), 1192 var o = { id: script.id(),
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 2579
2576 default: 2580 default:
2577 json = null; 2581 json = null;
2578 } 2582 }
2579 return json; 2583 return json;
2580 } 2584 }
2581 2585
2582 Debug.TestApi = { 2586 Debug.TestApi = {
2583 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_ 2587 CommandProcessorResolveValue: DebugCommandProcessor.resolveValue_
2584 }; 2588 };
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698