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

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

Issue 1833563002: [V8] Removed debugger V8::PromiseEvent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/debug/debug.cc ('k') | src/js/promise.js » ('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 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 (function (global, utils) { 5 (function (global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 var sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/; 44 var sourceLineBeginningSkip = /^(?:\s*(?:\/\*.*?\*\/)*)*/;
45 45
46 // Debug events which can occour in the V8 JavaScript engine. These originate 46 // Debug events which can occour in the V8 JavaScript engine. These originate
47 // from the API include file debug.h. 47 // from the API include file debug.h.
48 Debug.DebugEvent = { Break: 1, 48 Debug.DebugEvent = { Break: 1,
49 Exception: 2, 49 Exception: 2,
50 NewFunction: 3, 50 NewFunction: 3,
51 BeforeCompile: 4, 51 BeforeCompile: 4,
52 AfterCompile: 5, 52 AfterCompile: 5,
53 CompileError: 6, 53 CompileError: 6,
54 PromiseEvent: 7, 54 AsyncTaskEvent: 7 };
55 AsyncTaskEvent: 8 };
56 55
57 // Types of exceptions that can be broken upon. 56 // Types of exceptions that can be broken upon.
58 Debug.ExceptionBreak = { Caught : 0, 57 Debug.ExceptionBreak = { Caught : 0,
59 Uncaught: 1 }; 58 Uncaught: 1 };
60 59
61 // The different types of steps. 60 // The different types of steps.
62 Debug.StepAction = { StepOut: 0, 61 Debug.StepAction = { StepOut: 0,
63 StepNext: 1, 62 StepNext: 1,
64 StepIn: 2, 63 StepIn: 2,
65 StepFrame: 3 }; 64 StepFrame: 3 };
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 if (!IS_UNDEFINED(script.data())) { 1133 if (!IS_UNDEFINED(script.data())) {
1135 o.data = script.data(); 1134 o.data = script.data();
1136 } 1135 }
1137 if (include_source) { 1136 if (include_source) {
1138 o.source = script.source(); 1137 o.source = script.source();
1139 } 1138 }
1140 return o; 1139 return o;
1141 } 1140 }
1142 1141
1143 1142
1144 function MakePromiseEvent(event_data) {
1145 return new PromiseEvent(event_data);
1146 }
1147
1148
1149 function PromiseEvent(event_data) {
1150 this.promise_ = event_data.promise;
1151 this.parentPromise_ = event_data.parentPromise;
1152 this.status_ = event_data.status;
1153 this.value_ = event_data.value;
1154 }
1155
1156
1157 PromiseEvent.prototype.promise = function() {
1158 return MakeMirror(this.promise_);
1159 }
1160
1161
1162 PromiseEvent.prototype.parentPromise = function() {
1163 return MakeMirror(this.parentPromise_);
1164 }
1165
1166
1167 PromiseEvent.prototype.status = function() {
1168 return this.status_;
1169 }
1170
1171
1172 PromiseEvent.prototype.value = function() {
1173 return MakeMirror(this.value_);
1174 }
1175
1176
1177 function MakeAsyncTaskEvent(event_data) { 1143 function MakeAsyncTaskEvent(event_data) {
1178 return new AsyncTaskEvent(event_data); 1144 return new AsyncTaskEvent(event_data);
1179 } 1145 }
1180 1146
1181 1147
1182 function AsyncTaskEvent(event_data) { 1148 function AsyncTaskEvent(event_data) {
1183 this.type_ = event_data.type; 1149 this.type_ = event_data.type;
1184 this.name_ = event_data.name; 1150 this.name_ = event_data.name;
1185 this.id_ = event_data.id; 1151 this.id_ = event_data.id;
1186 } 1152 }
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 "CompileEvent", CompileEvent, 2476 "CompileEvent", CompileEvent,
2511 "BreakPoint", BreakPoint, 2477 "BreakPoint", BreakPoint,
2512 ]); 2478 ]);
2513 2479
2514 // Functions needed by the debugger runtime. 2480 // Functions needed by the debugger runtime.
2515 utils.InstallFunctions(utils, DONT_ENUM, [ 2481 utils.InstallFunctions(utils, DONT_ENUM, [
2516 "MakeExecutionState", MakeExecutionState, 2482 "MakeExecutionState", MakeExecutionState,
2517 "MakeExceptionEvent", MakeExceptionEvent, 2483 "MakeExceptionEvent", MakeExceptionEvent,
2518 "MakeBreakEvent", MakeBreakEvent, 2484 "MakeBreakEvent", MakeBreakEvent,
2519 "MakeCompileEvent", MakeCompileEvent, 2485 "MakeCompileEvent", MakeCompileEvent,
2520 "MakePromiseEvent", MakePromiseEvent,
2521 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2486 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2522 "IsBreakPointTriggered", IsBreakPointTriggered, 2487 "IsBreakPointTriggered", IsBreakPointTriggered,
2523 "UpdateScriptBreakPoints", UpdateScriptBreakPoints, 2488 "UpdateScriptBreakPoints", UpdateScriptBreakPoints,
2524 ]); 2489 ]);
2525 2490
2526 // Export to liveedit.js 2491 // Export to liveedit.js
2527 utils.Export(function(to) { 2492 utils.Export(function(to) {
2528 to.GetScriptBreakPoints = GetScriptBreakPoints; 2493 to.GetScriptBreakPoints = GetScriptBreakPoints;
2529 }); 2494 });
2530 2495
2531 }) 2496 })
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698