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

Unified Diff: src/debug/debug.cc

Issue 2816373004: [inspector] don't enter to debugger context for PromiseEventOccurred (Closed)
Patch Set: Created 3 years, 8 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/debug/debug.h ('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 e4107afdc2b13883e737ef27f94f42fc1808b485..f0e93841fd1260ef52b99adb864b0fddb1448165 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -2044,9 +2044,6 @@ void Debug::OnAsyncTaskEvent(debug::PromiseDebugActionType type, int id,
if (in_debug_scope() || ignore_events()) return;
if (!debug_delegate_) return;
SuppressDebug while_processing(this);
- DebugScope debug_scope(isolate_->debug());
- if (debug_scope.failed()) return;
- HandleScope scope(isolate_);
PostponeInterruptsScope no_interrupts(isolate_);
DisableBreak no_recursive_break(this);
bool created_by_user = false;
@@ -2058,9 +2055,7 @@ void Debug::OnAsyncTaskEvent(debug::PromiseDebugActionType type, int id,
!it.done() &&
!IsFrameBlackboxed(it.frame());
}
- debug_delegate_->PromiseEventOccurred(
- Utils::ToLocal(debug_scope.GetContext()), type, id, parent_id,
- created_by_user);
+ debug_delegate_->PromiseEventOccurred(type, id, parent_id, created_by_user);
}
void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
@@ -2346,8 +2341,11 @@ bool Debug::PerformSideEffectCheckForCallback(Address function) {
}
void LegacyDebugDelegate::PromiseEventOccurred(
- v8::Local<v8::Context> context, v8::debug::PromiseDebugActionType type,
- int id, int parent_id, bool created_by_user) {
+ v8::debug::PromiseDebugActionType type, int id, int parent_id,
+ bool created_by_user) {
+ DebugScope debug_scope(isolate_->debug());
+ if (debug_scope.failed()) return;
+ HandleScope scope(isolate_);
Handle<Object> event_data;
if (isolate_->debug()->MakeAsyncTaskEvent(type, id).ToHandle(&event_data)) {
ProcessDebugEvent(v8::AsyncTaskEvent, Handle<JSObject>::cast(event_data));
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698