Skip to content

Commit

Permalink
[release/7.0] [wasm][debugger] Never send messages from our internal …
Browse files Browse the repository at this point in the history
…protocol extensions to the browser (#77619)

* ignore messages from protocol extensions even for unknown context

* Addressing @radical comments

* adressing @radical comments

* adressing @radical comments

Co-authored-by: Thays Grazia <thaystg@gmail.com>
  • Loading branch information
github-actions[bot] and thaystg committed Nov 3, 2022
1 parent 00d3109 commit de2c250
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
if (pauseOnException != PauseOnExceptionsKind.Unset)
_defaultPauseOnExceptions = pauseOnException;
}
return false;
// for Dotnetdebugger.* messages, treat them as handled, thus not passing them on to the browser
return method.StartsWith("DotnetDebugger.", StringComparison.OrdinalIgnoreCase);
}

switch (method)
Expand Down Expand Up @@ -582,8 +583,8 @@ protected override async Task<bool> AcceptCommand(MessageId id, JObject parms, C
}
}
}

return false;
// for Dotnetdebugger.* messages, treat them as handled, thus not passing them on to the browser
return method.StartsWith("DotnetDebugger.", StringComparison.OrdinalIgnoreCase);
}

private async Task<bool> ApplyUpdates(MessageId id, JObject args, CancellationToken token)
Expand Down

0 comments on commit de2c250

Please sign in to comment.