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

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

Issue 2628173005: [inspector] merged type and name of async task event (Closed)
Patch Set: addressed comments 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 if (!IS_UNDEFINED(script.data())) { 1081 if (!IS_UNDEFINED(script.data())) {
1082 o.data = script.data(); 1082 o.data = script.data();
1083 } 1083 }
1084 if (include_source) { 1084 if (include_source) {
1085 o.source = script.source(); 1085 o.source = script.source();
1086 } 1086 }
1087 return o; 1087 return o;
1088 } 1088 }
1089 1089
1090 1090
1091 function PromiseDebugActionNameToString(name) { 1091 function MakeAsyncTaskEvent(type, id) {
1092 switch (name) { 1092 return new AsyncTaskEvent(type, id);
1093 case kAsyncFunction: return "async function";
1094 case kPromiseResolve: return "Promise.resolve";
1095 case kPromiseReject: return "Promise.reject";
1096 case kPromiseResolveThenableJob: return "PromiseResolveThenableJob";
1097 case kDebugPromiseCollected: return "Promise collected";
1098 }
1099 }
1100
1101 function MakeAsyncTaskEvent(type, id, name) {
1102 return new AsyncTaskEvent(type,
1103 id, PromiseDebugActionNameToString(name));
1104 } 1093 }
1105 1094
1106 1095
1107 function AsyncTaskEvent(type, id, name) { 1096 function AsyncTaskEvent(type, id) {
1108 this.type_ = type; 1097 this.type_ = type;
1109 this.id_ = id; 1098 this.id_ = id;
1110 this.name_ = name;
1111 } 1099 }
1112 1100
1113 1101
1114 AsyncTaskEvent.prototype.type = function() { 1102 AsyncTaskEvent.prototype.type = function() {
1115 return this.type_; 1103 return this.type_;
1116 } 1104 }
1117 1105
1118 1106
1119 AsyncTaskEvent.prototype.name = function() {
1120 return this.name_;
1121 }
1122
1123
1124 AsyncTaskEvent.prototype.id = function() { 1107 AsyncTaskEvent.prototype.id = function() {
1125 return this.id_; 1108 return this.id_;
1126 } 1109 }
1127 1110
1128 1111
1129 function DebugCommandProcessor(exec_state, opt_is_running) { 1112 function DebugCommandProcessor(exec_state, opt_is_running) {
1130 this.exec_state_ = exec_state; 1113 this.exec_state_ = exec_state;
1131 this.running_ = opt_is_running || false; 1114 this.running_ = opt_is_running || false;
1132 } 1115 }
1133 1116
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 utils.InstallFunctions(utils, DONT_ENUM, [ 2384 utils.InstallFunctions(utils, DONT_ENUM, [
2402 "MakeExecutionState", MakeExecutionState, 2385 "MakeExecutionState", MakeExecutionState,
2403 "MakeExceptionEvent", MakeExceptionEvent, 2386 "MakeExceptionEvent", MakeExceptionEvent,
2404 "MakeBreakEvent", MakeBreakEvent, 2387 "MakeBreakEvent", MakeBreakEvent,
2405 "MakeCompileEvent", MakeCompileEvent, 2388 "MakeCompileEvent", MakeCompileEvent,
2406 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2389 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2407 "IsBreakPointTriggered", IsBreakPointTriggered, 2390 "IsBreakPointTriggered", IsBreakPointTriggered,
2408 ]); 2391 ]);
2409 2392
2410 }) 2393 })
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