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

Unified Diff: src/debug/debug.cc

Issue 2592893003: [inspector] migrate AsycEvent to tupple (Closed)
Patch Set: 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/api.cc ('k') | src/debug/debug-interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 04f6a1f281e3c5e4a13d12923b65824abac7258e..a41033f98308ad342de655ac4e897fad0924200c 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1846,10 +1846,18 @@ void Debug::OnAsyncTaskEvent(debug::AsyncTaskEventType type, Handle<Object> id,
DebugScope debug_scope(this);
if (debug_scope.failed()) return;
+ Handle<Smi> type_smi(Smi::FromInt(type), isolate_);
+ if (event_listener_.is_null()) {
+ ProcessDebugEvent(v8::AsyncTaskEvent,
+ Handle<JSObject>::cast(
+ isolate_->factory()->NewTuple3(type_smi, id, name)),
+ true);
+ return;
+ }
+
// Create the script collected state object.
Handle<Object> event_data;
// Bail out and don't call debugger if exception.
- Handle<Smi> type_smi(Smi::FromInt(type), isolate_);
if (!MakeAsyncTaskEvent(type_smi, id, name).ToHandle(&event_data)) return;
// Process debug event.
« no previous file with comments | « src/api.cc ('k') | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698