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

Unified Diff: src/debug/debug.h

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: added missing handle scope Created 4 years 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 | « no previous file | src/debug/debug.cc » ('j') | src/debug/debug.cc » ('J')
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 9a5060088fdfd94d8ab97b08d87f5b107e5e7b87..089c8d3e01fa7cce3eb13f2086eaa51f04912063 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"
@@ -407,7 +408,7 @@ class Debug {
void OnPromiseReject(Handle<Object> promise, Handle<Object> value);
void OnCompileError(Handle<Script> script);
void OnAfterCompile(Handle<Script> script);
- void OnAsyncTaskEvent(Handle<String> type, Handle<Object> id,
+ void OnAsyncTaskEvent(debug::AsyncTaskEventType, Handle<Object> id,
Handle<String> name);
// API facing.
@@ -455,6 +456,8 @@ class Debug {
void RecordGenerator(Handle<JSGeneratorObject> generator_object);
+ Handle<Object> 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.
@@ -584,7 +587,7 @@ class Debug {
Handle<Object> promise);
MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent(
Handle<Script> script, v8::DebugEvent type);
- MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent(Handle<String> type,
+ MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent(Handle<Smi> type,
Handle<Object> id,
Handle<String> name);
@@ -702,6 +705,9 @@ class Debug {
Handle<Object> return_value_;
Object* suspended_generator_;
+
+ int async_task_count_;
+ Handle<JSWeakMap> async_task_ids_;
};
// Storage location for registers when handling debug break calls
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698