未验证 提交 2b07c8c4 编写于 作者: T Thays Grazia 提交者: GitHub

Fix debug a app that has another .NET Wasm instance in a service worker (#76072)

上级 26cc618b
......@@ -92,6 +92,9 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, JObject par
{
case "Runtime.consoleAPICalled":
{
// Don't process events from sessions we aren't tracking
if (!contexts.TryGetValue(sessionId, out ExecutionContext context))
return false;
string type = args["type"]?.ToString();
if (type == "debug")
{
......@@ -110,7 +113,6 @@ protected override async Task<bool> AcceptEvent(SessionId sessionId, JObject par
{
// The optional 3rd argument is the stringified assembly
// list so that we don't have to make more round trips
ExecutionContext context = GetContext(sessionId);
string loaded = a[2]?["value"]?.ToString();
if (loaded != null)
context.LoadedFiles = JToken.Parse(loaded).ToObject<string[]>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册