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

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

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: avoid calling functions Created 3 years, 11 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/debug/interface-types.h » ('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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 return o; 1087 return o;
1088 } 1088 }
1089 1089
1090 1090
1091 function PromiseDebugActionNameToString(name) { 1091 function PromiseDebugActionNameToString(name) {
1092 switch (name) { 1092 switch (name) {
1093 case kAsyncFunction: return "async function"; 1093 case kAsyncFunction: return "async function";
1094 case kPromiseResolve: return "Promise.resolve"; 1094 case kPromiseResolve: return "Promise.resolve";
1095 case kPromiseReject: return "Promise.reject"; 1095 case kPromiseReject: return "Promise.reject";
1096 case kPromiseResolveThenableJob: return "PromiseResolveThenableJob"; 1096 case kPromiseResolveThenableJob: return "PromiseResolveThenableJob";
1097 } 1097 case kDebugPromiseCollected: return "Promise collected";
1098 }
1099
1100 function PromiseDebugActionTypeToString(type) {
1101 switch (type) {
1102 case kEnqueue: return "enqueue";
1103 case kEnqueueRecurring: return "enqueueRecurring";
1104 case kCancel: return "cancel";
1105 case kWillHandle: return "willHandle";
1106 case kDidHandle: return "didHandle";
1107 } 1098 }
1108 } 1099 }
1109 1100
1110 function MakeAsyncTaskEvent(type, id, name) { 1101 function MakeAsyncTaskEvent(type, id, name) {
1111 return new AsyncTaskEvent(PromiseDebugActionTypeToString(type), 1102 return new AsyncTaskEvent(type,
1112 id, PromiseDebugActionNameToString(name)); 1103 id, PromiseDebugActionNameToString(name));
1113 } 1104 }
1114 1105
1115 1106
1116 function AsyncTaskEvent(type, id, name) { 1107 function AsyncTaskEvent(type, id, name) {
1117 this.type_ = type; 1108 this.type_ = type;
1118 this.id_ = id; 1109 this.id_ = id;
1119 this.name_ = name; 1110 this.name_ = name;
1120 } 1111 }
1121 1112
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 utils.InstallFunctions(utils, DONT_ENUM, [ 2401 utils.InstallFunctions(utils, DONT_ENUM, [
2411 "MakeExecutionState", MakeExecutionState, 2402 "MakeExecutionState", MakeExecutionState,
2412 "MakeExceptionEvent", MakeExceptionEvent, 2403 "MakeExceptionEvent", MakeExceptionEvent,
2413 "MakeBreakEvent", MakeBreakEvent, 2404 "MakeBreakEvent", MakeBreakEvent,
2414 "MakeCompileEvent", MakeCompileEvent, 2405 "MakeCompileEvent", MakeCompileEvent,
2415 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2406 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2416 "IsBreakPointTriggered", IsBreakPointTriggered, 2407 "IsBreakPointTriggered", IsBreakPointTriggered,
2417 ]); 2408 ]);
2418 2409
2419 }) 2410 })
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/interface-types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698