diff options
author | Thays Grazia <thaystg@gmail.com> | 2022-11-11 18:15:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 18:15:52 +0300 |
commit | ce0b82ea7a19957ad3796e7e9a92e393bf6e30cc (patch) | |
tree | af9b5454a41faf7de9f0121805b01e7f74e1fc41 | |
parent | f09e7ac0d8ee753db1f7bb9c858a789c68372d12 (diff) |
remove unnecessary code (#78171)
-rw-r--r-- | src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs index effd7e06e45..32727996e98 100644 --- a/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs +++ b/src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs @@ -1186,8 +1186,7 @@ namespace Microsoft.WebAssembly.Diagnostics this.DebuggerFileName = url.Replace("\\", "/").Replace(":", ""); this.BreakableLines = new List<int>(); - var urlWithSpecialCharCodedHex = EscapeAscii(url); - this.SourceUri = new Uri((Path.IsPathRooted(url) ? "file://" : "") + urlWithSpecialCharCodedHex, UriKind.RelativeOrAbsolute); + this.SourceUri = new Uri((Path.IsPathRooted(url) ? "file://" : "") + url, UriKind.RelativeOrAbsolute); if (SourceUri.IsFile && File.Exists(SourceUri.LocalPath)) { this.Url = this.SourceUri.ToString(); @@ -1198,33 +1197,6 @@ namespace Microsoft.WebAssembly.Diagnostics } } - private static string EscapeAscii(string path) - { - var builder = new StringBuilder(); - foreach (char c in path) - { - switch (c) - { - case var _ when c >= 'a' && c <= 'z': - case var _ when c >= 'A' && c <= 'Z': - case var _ when char.IsDigit(c): - case var _ when c > 255: - case var _ when c == '+' || c == ':' || c == '.' || c == '-' || c == '_' || c == '~': - builder.Append(c); - break; - case var _ when c == Path.DirectorySeparatorChar: - case var _ when c == Path.AltDirectorySeparatorChar: - case var _ when c == '\\': - builder.Append(c); - break; - default: - builder.AppendFormat("%{0:X2}", (int)c); - break; - } - } - return builder.ToString(); - } - internal void AddMethod(MethodInfo mi) { if (!this.methods.ContainsKey(mi.Token)) |