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

Unified Diff: src/debug/debug.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-promise.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.h
diff --git a/src/debug/debug.h b/src/debug/debug.h
index e87e8aecad1644dc19e5da283942a83c37f6a8fd..4f32857c8a0d948aa91a921440a53c120670e9b9 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -12,6 +12,7 @@
#include "src/base/hashmap.h"
#include "src/base/platform/platform.h"
#include "src/debug/debug-interface.h"
+#include "src/debug/interface-types.h"
#include "src/execution.h"
#include "src/factory.h"
#include "src/flags.h"
@@ -80,14 +81,7 @@ enum PromiseDebugActionName {
kDebugPromiseResolve,
kDebugPromiseReject,
kDebugPromiseResolveThenableJob,
-};
-
-enum PromiseDebugActionType {
- kDebugEnqueue,
- kDebugEnqueueRecurring,
- kDebugCancel,
- kDebugWillHandle,
- kDebugDidHandle,
+ kDebugPromiseCollected,
};
class BreakLocation {
@@ -426,7 +420,7 @@ class Debug {
void OnPromiseReject(Handle<Object> promise, Handle<Object> value);
void OnCompileError(Handle<Script> script);
void OnAfterCompile(Handle<Script> script);
- void OnAsyncTaskEvent(PromiseDebugActionType type, int id,
+ void OnAsyncTaskEvent(debug::PromiseDebugActionType type, int id,
PromiseDebugActionName name);
// API facing.
@@ -474,6 +468,8 @@ class Debug {
void RecordGenerator(Handle<JSGeneratorObject> generator_object);
+ int NextAsyncTaskId(Handle<JSObject> promise);
+
// Returns whether the operation succeeded. Compilation can only be triggered
// if a valid closure is passed as the second argument, otherwise the shared
// function needs to be compiled already.
@@ -721,6 +717,8 @@ class Debug {
Handle<Object> return_value_;
Object* suspended_generator_;
+
+ int async_task_count_;
};
// Storage location for registers when handling debug break calls
« no previous file with comments | « src/builtins/builtins-promise.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698