Skip to content

Commit 8b01075

Browse files
thaystggithub-actions
authored andcommitted
Changing what was suggested by @radical.
1 parent a370c42 commit 8b01075

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,9 +1224,7 @@ public async Task<MonoBinaryReader> GetTypePropertiesReader(SessionId sessionId,
12241224
commandParamsWriter.Write(typeId);
12251225

12261226
var reader = await SendDebuggerAgentCommand<CmdType>(sessionId, CmdType.GetProperties, commandParams, token);
1227-
var ms = new MemoryStream();
1228-
reader.BaseStream.CopyTo(ms);
1229-
typeInfo.PropertiesBuffer = ms.ToArray();
1227+
typeInfo.PropertiesBuffer = reader.ReadBytes((int)reader.BaseStream.Length);
12301228
reader.BaseStream.Position = 0;
12311229
return reader;
12321230
}

src/mono/wasm/debugger/DebuggerTestSuite/CustomViewTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Newtonsoft.Json.Linq;
99
using System.Threading;
1010
using Xunit;
11+
using System.Collections.Generic;
1112

1213
namespace DebuggerTests
1314
{
@@ -88,7 +89,7 @@ async Task<bool> CheckProperties(JObject pause_location)
8889

8990
pause_location = await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-custom-view-test.cs", bp.Value["locations"][0]["lineNumber"].Value<int>()+2, bp.Value["locations"][0]["columnNumber"].Value<int>(), "run");
9091

91-
System.Collections.Generic.List<Task<bool>> tasks = new System.Collections.Generic.List<Task<bool>>();
92+
List<Task<bool>> tasks = new();
9293
for (int i = 0 ; i < 10; i++)
9394
{
9495
var task = CheckProperties(pause_location);

0 commit comments

Comments
 (0)