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

Unified Diff: src/debug/debug.h

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: fmt 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 | « 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..893a60326e01cbef778992381dafeed86442e981 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -71,6 +71,24 @@ enum DebugBreakType {
DEBUG_BREAK_SLOT_AT_TAIL_CALL,
};
+const int DEBUG_PROMISE_DEFAULT_ID = 0;
adamk 2017/01/03 18:18:17 kDebugPromiseDefaultId please. SHOUTING_CASE is on
+
+enum PromiseDebugActionName {
+ DEBUG_NOT_ACTIVE,
+ DEBUG_ASYNC_FUNCTION,
+ DEBUG_PROMISE_RESOLVE,
+ DEBUG_PROMISE_REJECT,
+ DEBUG_PROMISE_RESOLVE_THENABLE_JOB,
+};
+
+enum PromiseDebugActionType {
+ DEBUG_ENQUEUE,
+ DEBUG_ENQUEUE_RECURRING,
+ DEBUG_CANCEL,
+ DEBUG_WILL_HANDLE,
+ DEBUG_DID_HANDLE,
+};
+
class BreakLocation {
public:
static BreakLocation FromFrame(Handle<DebugInfo> debug_info,
@@ -407,8 +425,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 +602,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