diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-11-03 03:39:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 03:39:50 +0300 |
commit | de2c2506486e3381a5353f27098e48d37aee1b36 (patch) | |
tree | 9acd6dce92b301da596887b32c5b220e915a25dc | |
parent | 00d3109a0ead8b11243ee8544ab820e2d60df286 (diff) |
[release/7.0] [wasm][debugger] Never send messages from our internal 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>
-rw-r--r-- | src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs index b34437b7238..0d5f948259c 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs @@ -283,7 +283,8 @@ namespace Microsoft.WebAssembly.Diagnostics 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) @@ -582,8 +583,8 @@ namespace Microsoft.WebAssembly.Diagnostics } } } - - 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) |