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

Unified Diff: src/debug/debug.h

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: fix stuff Created 3 years, 12 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/contexts.h ('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 90d1791f6a73b60577f012390cf7459a3bd33808..e87e8aecad1644dc19e5da283942a83c37f6a8fd 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -71,6 +71,25 @@ enum DebugBreakType {
DEBUG_BREAK_SLOT_AT_TAIL_CALL,
};
+const int kDebugPromiseNoID = 0;
+const int kDebugPromiseFirstID = 1;
+
+enum PromiseDebugActionName {
+ kDebugNotActive,
+ kDebugAsyncFunction,
+ kDebugPromiseResolve,
+ kDebugPromiseReject,
+ kDebugPromiseResolveThenableJob,
+};
+
+enum PromiseDebugActionType {
+ kDebugEnqueue,
+ kDebugEnqueueRecurring,
+ kDebugCancel,
+ kDebugWillHandle,
+ kDebugDidHandle,
+};
+
class BreakLocation {
public:
static BreakLocation FromFrame(Handle<DebugInfo> debug_info,
@@ -407,8 +426,8 @@ 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,
- Handle<String> name);
+ void OnAsyncTaskEvent(PromiseDebugActionType type, int id,
+ PromiseDebugActionName name);
// API facing.
void SetEventListener(Handle<Object> callback, Handle<Object> data);
@@ -584,9 +603,9 @@ 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,
- Handle<Object> id,
- Handle<String> name);
+ MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent(Handle<Smi> type,
+ Handle<Smi> id,
+ Handle<Smi> name);
// Mirror cache handling.
void ClearMirrorCache();
« no previous file with comments | « src/contexts.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698