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

Unified Diff: src/runtime/runtime-promise.cc

Issue 2648873002: [inspector] added creation frame for async call chains for promises (Closed)
Patch Set: fixed usage of external reference 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
Index: src/runtime/runtime-promise.cc
diff --git a/src/runtime/runtime-promise.cc b/src/runtime/runtime-promise.cc
index 3335045d98fad839d4c0d794972bdf725612da0d..27870ab336749eaf81535a35b52c74295376edaa 100644
--- a/src/runtime/runtime-promise.cc
+++ b/src/runtime/runtime-promise.cc
@@ -204,6 +204,10 @@ RUNTIME_FUNCTION(Runtime_PromiseHookInit) {
CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, parent, 1);
isolate->RunPromiseHook(PromiseHookType::kInit, promise, parent);
+ if (isolate->debug()->is_active()) {
+ int id = isolate->debug()->NextAsyncTaskId(promise);
+ isolate->debug()->OnAsyncTaskEvent(debug::kDebugPromiseCreated, id);
+ }
return isolate->heap()->undefined_value();
}

Powered by Google App Engine
This is Rietveld 408576698