Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThays Grazia <thaystg@gmail.com>2022-11-11 18:15:52 +0300
committerGitHub <noreply@github.com>2022-11-11 18:15:52 +0300
commitce0b82ea7a19957ad3796e7e9a92e393bf6e30cc (patch)
treeaf9b5454a41faf7de9f0121805b01e7f74e1fc41
parentf09e7ac0d8ee753db1f7bb9c858a789c68372d12 (diff)
remove unnecessary code (#78171)
-rw-r--r--src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs30
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))