Skip to content

Commit 74639e2

Browse files
authored
minor stuff (#100933)
1 parent 2b9b588 commit 74639e2

File tree

7 files changed

+33
-22
lines changed

7 files changed

+33
-22
lines changed

src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/WebWorkerTest.WebSocket.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ await executor.Execute(async () =>
3939

4040

4141
[Theory, MemberData(nameof(GetTargetThreads2x))]
42+
[ActiveIssue("https://github.com/dotnet/runtime/issues/100931")]
4243
public async Task WebSocketClient_ResponseCloseInDifferentThread(Executor executor1, Executor executor2)
4344
{
4445
using var cts = CreateTestCaseTimeoutSource();

src/libraries/tests.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@
398398
<!-- Issue: https://github.com/dotnet/runtime/issues/95795 -->
399399
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Tests\Hybrid\System.Globalization.Hybrid.WASM.Tests.csproj" />
400400
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Calendars.Tests\Hybrid\System.Globalization.Calendars.Hybrid.WASM.Tests.csproj" />
401+
<!-- Issue: https://github.com/dotnet/runtime/issues/100932 -->
402+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Reflection.Tests\System.Reflection.Tests.csproj" />
401403
</ItemGroup>
402404

403405
<!-- Aggressive Trimming related failures -->

src/mono/browser/runtime/assets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ export function instantiate_asset (asset: AssetEntry, url: string, bytes: Uint8A
4444
// FIXME
4545
const lastSlash = virtualName.lastIndexOf("/");
4646
let parentDirectory = (lastSlash > 0)
47-
? virtualName.substr(0, lastSlash)
47+
? virtualName.substring(0, lastSlash)
4848
: null;
4949
let fileName = (lastSlash > 0)
50-
? virtualName.substr(lastSlash + 1)
50+
? virtualName.substring(lastSlash + 1)
5151
: virtualName;
5252
if (fileName.startsWith("/"))
53-
fileName = fileName.substr(1);
53+
fileName = fileName.substring(1);
5454
if (parentDirectory) {
5555
mono_log_debug(`Creating directory '${parentDirectory}'`);
5656

src/mono/browser/runtime/loader/exit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function mono_exit (exit_code: number, reason?: any): void {
122122
}
123123
}
124124
} catch (err) {
125-
mono_log_warn("mono_exit failed", err);
125+
mono_log_warn("mono_exit A failed", err);
126126
// don't propagate any failures
127127
}
128128

@@ -132,7 +132,7 @@ export function mono_exit (exit_code: number, reason?: any): void {
132132
appendElementOnExit(exit_code);
133133
}
134134
} catch (err) {
135-
mono_log_warn("mono_exit failed", err);
135+
mono_log_warn("mono_exit B failed", err);
136136
// don't propagate any failures
137137
}
138138

@@ -177,7 +177,7 @@ function set_exit_code_and_quit_now (exit_code: number, reason?: any): void {
177177
runtimeHelpers.nativeExit(exit_code);
178178
} catch (error: any) {
179179
if (runtimeHelpers.ExitStatus && !(error instanceof runtimeHelpers.ExitStatus)) {
180-
mono_log_warn("mono_wasm_exit failed: " + error.toString());
180+
mono_log_warn("set_exit_code_and_quit_now failed: " + error.toString());
181181
}
182182
}
183183
}

src/mono/browser/runtime/logging.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,6 @@ export const wasm_func_map = new Map<number, string>();
4747
let wasm_pending_symbol_table: string | undefined;
4848
const regexes: any[] = [];
4949

50-
// V8
51-
// at <anonymous>:wasm-function[1900]:0x83f63
52-
// at dlfree (<anonymous>:wasm-function[18739]:0x2328ef)
53-
regexes.push(/at (?<replaceSection>[^:()]+:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/);
54-
55-
//# 5: WASM [009712b2], function #111 (''), pc=0x7c16595c973 (+0x53), pos=38740 (+11)
56-
regexes.push(/(?:WASM \[[\da-zA-Z]+\], (?<replaceSection>function #(?<funcNum>[\d]+) \(''\)))/);
57-
58-
//# chrome
59-
//# at http://127.0.0.1:63817/dotnet.wasm:wasm-function[8963]:0x1e23f4
60-
regexes.push(/(?<replaceSection>[a-z]+:\/\/[^ )]*:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)/);
61-
62-
//# <?>.wasm-function[8962]
63-
regexes.push(/(?<replaceSection><[^ >]+>[.:]wasm-function\[(?<funcNum>[0-9]+)\])/);
64-
6550
export function mono_wasm_symbolicate_string (message: string): string {
6651
try {
6752
performDeferredSymbolMapParsing();
@@ -186,6 +171,21 @@ function performDeferredSymbolMapParsing () {
186171
if (!wasm_pending_symbol_table)
187172
return;
188173

174+
// V8
175+
// at <anonymous>:wasm-function[1900]:0x83f63
176+
// at dlfree (<anonymous>:wasm-function[18739]:0x2328ef)
177+
regexes.push(/at (?<replaceSection>[^:()]+:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/);
178+
179+
//# 5: WASM [009712b2], function #111 (''), pc=0x7c16595c973 (+0x53), pos=38740 (+11)
180+
regexes.push(/(?:WASM \[[\da-zA-Z]+\], (?<replaceSection>function #(?<funcNum>[\d]+) \(''\)))/);
181+
182+
//# chrome
183+
//# at http://127.0.0.1:63817/dotnet.wasm:wasm-function[8963]:0x1e23f4
184+
regexes.push(/(?<replaceSection>[a-z]+:\/\/[^ )]*:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)/);
185+
186+
//# <?>.wasm-function[8962]
187+
regexes.push(/(?<replaceSection><[^ >]+>[.:]wasm-function\[(?<funcNum>[0-9]+)\])/);
188+
189189
const text = wasm_pending_symbol_table!;
190190
wasm_pending_symbol_table = undefined;
191191
try {

src/mono/browser/runtime/runtime.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ static void *sysglobal_native_handle;
229229
static void*
230230
wasm_dl_load (const char *name, int flags, char **err, void *user_data)
231231
{
232+
#if WASM_SUPPORTS_DLOPEN
233+
if (!name)
234+
return dlopen(NULL, flags);
235+
#else
236+
if (!name)
237+
return NULL;
238+
#endif
239+
232240
void* handle = wasm_dl_lookup_pinvoke_table (name);
233241
if (handle)
234242
return handle;

src/mono/browser/test-main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if (!ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WEB && typeof globalThis.crypto ===
5252
}
5353

5454
if (ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER) {
55-
console.log("Running '" + globalThis.navigator.userAgent + "' at: " + globalThis.location.href);
55+
console.log("Running '" + globalThis.navigator.userAgent + "' at: \n" + globalThis.location.href + "\n");
5656
}
5757

5858
let v8args;

0 commit comments

Comments
 (0)