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

Unified Diff: src/isolate.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/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index accaea8bcd0066a80d3dda17631a1821bfaf80d3..b3412ebd36721b20aaa99dd81a39c0e69a3d94fe 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2215,6 +2215,7 @@ Isolate::Isolate(bool enable_serializer)
// be fixed once the default isolate cleanup is done.
random_number_generator_(NULL),
rail_mode_(PERFORMANCE_ANIMATION),
+ promise_hook_or_debug_is_active_(false),
promise_hook_(NULL),
load_start_time_ms_(0),
serializer_enabled_(enable_serializer),
@@ -3245,7 +3246,14 @@ void Isolate::FireCallCompletedCallback() {
}
}
-void Isolate::SetPromiseHook(PromiseHook hook) { promise_hook_ = hook; }
+void Isolate::DebugStateChanged() {
+ promise_hook_or_debug_is_active_ = promise_hook_ || debug()->is_active();
+}
+
+void Isolate::SetPromiseHook(PromiseHook hook) {
+ promise_hook_ = hook;
+ DebugStateChanged();
+}
void Isolate::RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise,
Handle<Object> parent) {

Powered by Google App Engine
This is Rietveld 408576698