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

Unified Diff: src/debug/debug.cc

Issue 2742713003: [debugger] correctly annotate scripts with debug id. (Closed)
Patch Set: address comments Created 3 years, 9 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/compiler.cc ('k') | test/debugger/debug/debug-step.js » ('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 5cff7f4a347fd74493ab13a5b0ed11a1686fdd94..7c4b66a46f9ac4acc5cb1a6d0cb04c28fb68cacd 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -2025,6 +2025,10 @@ void Debug::OnAsyncTaskEvent(debug::PromiseDebugActionType type, int id,
}
void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
+ // Attach the correct debug id to the script. The debug id is used by the
+ // inspector to filter scripts by native context.
+ FixedArray* array = isolate_->native_context()->embedder_data();
+ script->set_context_data(array->get(v8::Context::kDebugIdIndex));
if (ignore_events()) return;
if (script->type() != i::Script::TYPE_NORMAL &&
script->type() != i::Script::TYPE_WASM) {
« no previous file with comments | « src/compiler.cc ('k') | test/debugger/debug/debug-step.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698