FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

WASM MT by MartinZikmund · Pull Request #24103 · unoplatform/uno · GitHub

WASM MT - #24103

Draft
MartinZikmund wants to merge 7 commits into
feature/breakingchangesfrom
dev/wasm-mt
Draft

WASM MT#24103
MartinZikmund wants to merge 7 commits into
feature/breakingchangesfrom
dev/wasm-mt

Conversation

Copy link
Copy Markdown
Member

…drop"

This reverts commit e7518b8, reversing
changes made to 4990906.

Conflicts:

src/Directory.Build.propsGitHub Issue: closes

PR Type:

What changed? 🚀

PR Checklist ✅

github-actions Bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform area/automation Categorizes an issue or PR as relevant to project automation labels Aug 18, 2026

github-actions Bot commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 58s —— View job


PR Review: WASM MT

  • Gather context and read changed files
  • Analyze code for issues
  • Post inline review comments
  • Update summary

Summary

Verdict: fix-first — one correctness bug must be addressed before merge; three style regressions also flagged.

Severity Count
Bug 1
Style 3

Findings

  1. Bug — isThreadingEnabled() always treats SharedArrayBuffer as present (WebAssemblyThreading.ts:5)
    typeof SharedArrayBuffer !== undefined compares a string against the value undefined, which is always true. The string literal 'undefined' is required. In practice this only misclassifies environments where crossOriginIsolated is true but SharedArrayBuffer is not available; however it's still a semantic error that could break single-threaded detection as the code evolves.

  2. Style — #nullable enable missing from new WebAssemblyThreading.cs (line 1) and WindowObject should be JSObject? (line 23) once nullable is enabled.

  3. Style — #nullable enable was removed from CoreApplicationNative.cs (line 1).

  4. Style — missing indentation in else block in WebAssemblyWindowWrapper.ts (line 45).

Cross-cutting notes

The overall architecture is sound: moving InitializeExports() to an explicit await in WebAssemblyBrowserHost.InitializeAsync() (before the run loop starts) is a cleaner ordering than the old setImmediate-based workaround, and the StorageFolder.makePersistent simplification is safe given the new call sequence. The OnResizeAsync / IsAutoEnableAccessibilityAsync Task-returning [JSExport] pattern is the correct approach for MT WASM interop.

export class WebAssemblyThreading {
public static isThreadingEnabled() {
return (<any>globalThis).crossOriginIsolated &&
typeof SharedArrayBuffer !== undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bug: typeof comparison is always true

typeof always returns a string ("function", "undefined", etc.), so comparing it to the value undefined (not the string 'undefined') is always true — SharedArrayBuffer is effectively never checked.

Suggested change
typeof SharedArrayBuffer !== undefined &&
return (<any>globalThis).crossOriginIsolated &&
typeof SharedArrayBuffer !== 'undefined' &&
(<any>Module).PThread !== undefined;

With the current code, isThreadingEnabled() treats SharedArrayBuffer as always present when crossOriginIsolated is true, which can mis-classify single-threaded environments as multi-threaded.

@@ -0,0 +1,33 @@
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Missing #nullable enable directive

Project convention requires a per-file #nullable enable at the top of every new/refactored file (see .claude/rules/code-style.md). Without it, WindowObject (line 23) is an unguarded non-nullable reference that the compiler silently allows to be null before Initialize() is called.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;

/// Use this for JSImports calls inside JSWebWorker.
/// See: JSProxyContext.SealJSImportCapturing().
/// </summary>
public static JSObject WindowObject { get; private set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

WindowObject should be nullable

After adding #nullable enable, this property needs a ? annotation (or a null! initializer if callers are always post-Initialize()). Before Initialize() is called, WindowObject is null and the property type makes no promise that it won't be.

Suggested change
public static JSObject WindowObject { get; private set; }
public static JSObject? WindowObject { get; private set; }

#nullable enable

using System.Runtime.InteropServices.JavaScript;
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

#nullable enable was removed

The prior version of this file had #nullable enable at the top; this commit drops it. Please restore it — nullable annotations must not regress.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;
using System.Threading.Tasks;

this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResizeAsync;
}
else {
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Missing indentation in else body

The OnResize assignment is at the same level as the else keyword rather than indented inside the block.

Suggested change
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;
else {
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;
}

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24103/wasm-skia-net9/index.html

Copy link
Copy Markdown
Contributor

The build 228350 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 122

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Attributed_text_FontSize_Changing.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png
    • CalendarView_Theming.png-dark
    • DropDownButtonPage.png-dark
    • ExpanderColorValidationPage.png-dark
    • ElementLevelTheme.png-dark
    • ExpanderColorValidationPage.png
    • ElementLevelTheme.png
    • Examples.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • ImageBrush_Stretch.png
    • DynamicFont.png
    • ImageIconPage.png-dark
  • skia-windows-screenshots: 122 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Basics.png-dark
    • Examples.png
    • ContentPresenter_Template.png-dark
    • ContentPresenter_Template.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Battery.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • ElementLevelTheme.png-dark
    • GeolocatorPositionChanged.png-dark
    • GeolocatorPositionChanged.png
    • ContentPresenter_NativeEmbedding_Android_FillType.png
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • DisplayInformation.png-dark
    • Dopes.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png

github-actions Bot commented Aug 20, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 13s —— View job


PR Review: WASM MT

  • Gather context and read changed files
  • Analyze code for new/remaining issues
  • Post inline review comments
  • Update summary

Summary

Verdict: fix-first — the same findings from the previous review cycle remain unaddressed. No new issues were found in the new commits (OnResizeAsync, IsAutoEnableAccessibilityAsync, InitializeExports sequencing).

Severity Count
Bug 1
Style 4

All five inline comments from the prior review have been re-posted on the current commit, since none were resolved:

  1. Bug — typeof SharedArrayBuffer !== undefined in WebAssemblyThreading.ts:5 compares a string against the value undefined (always true). Must be !== 'undefined' (the string).
  2. Style — #nullable enable missing from WebAssemblyThreading.cs.
  3. Style — WindowObject (line 23 of WebAssemblyThreading.cs) must be JSObject? once nullable is enabled — before Initialize() it is null.
  4. Style — #nullable enable was removed from CoreApplicationNative.cs and must be restored.
  5. Style — else body in WebAssemblyWindowWrapper.ts:47 is missing one level of indentation.

What's good in the new commits

  • OnResizeAsync / IsAutoEnableAccessibilityAsync returning Task from [JSExport] is the correct MT WASM interop pattern.
  • Moving await CoreApplicationNative.InitializeExports() to InitializeAsync() (before the run loop) is cleaner than the prior setImmediate workaround.
  • WebAssemblyThreading.Initialize() called early in InitializeAsync() correctly gates the threading-aware code paths before any window wrapper runs.

export class WebAssemblyThreading {
public static isThreadingEnabled() {
return (<any>globalThis).crossOriginIsolated &&
typeof SharedArrayBuffer !== undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bug (unresolved): typeof comparison against value undefined is always true

typeof always returns a string — comparing it to the value undefined (not the string 'undefined') always evaluates to true. As a result, isThreadingEnabled() never actually checks whether SharedArrayBuffer is available; it only checks crossOriginIsolated and Module.PThread.

Suggested change
typeof SharedArrayBuffer !== undefined &&
typeof SharedArrayBuffer !== 'undefined' &&

This was flagged in the previous review cycle and is still unaddressed.

@@ -0,0 +1,33 @@
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (unresolved): missing #nullable enable

Project convention requires #nullable enable at the top of every new/refactored file (.claude/rules/code-style.md). Without it the compiler silently permits WindowObject (line 23) to be null before Initialize() is called.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;

/// Use this for JSImports calls inside JSWebWorker.
/// See: JSProxyContext.SealJSImportCapturing().
/// </summary>
public static JSObject WindowObject { get; private set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (unresolved): WindowObject should be nullable

Before Initialize() is called, WindowObject is null but the property type makes no such promise. Once #nullable enable is added (line 1), this must be annotated with ? to match the actual lifecycle.

Suggested change
public static JSObject WindowObject { get; private set; }
public static JSObject? WindowObject { get; private set; }

#nullable enable

using System.Runtime.InteropServices.JavaScript;
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (unresolved): #nullable enable was removed

The previous version of this file had #nullable enable; this PR drops it. Nullable annotations must not regress.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;
using System.Threading.Tasks;

this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResizeAsync;
}
else {
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (unresolved): missing indentation inside else body

this.onResize is at the same tab depth as the else keyword rather than indented one level inside the block. Should be 4 tabs to match the if branch on line 44.

Suggested change
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24103/wasm-skia-net9/index.html

github-actions Bot commented Aug 21, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 42s —— View job


PR Review: WASM MT

  • Gather context and read changed files
  • Analyze code for new/remaining issues
  • Post inline review comments
  • Update summary

Summary

Verdict: fix-first — the same five findings from the prior two review cycles remain unaddressed after this synchronize. No new issues were introduced by the latest commits.

Severity Count
Bug 1
Style 4

Findings (all pre-existing, all still open)

  1. Bug — typeof SharedArrayBuffer !== undefined in WebAssemblyThreading.ts:5 compares a string against the value undefined, which is always true. Must be !== 'undefined'.
  2. Style — #nullable enable missing from WebAssemblyThreading.cs (new file, project convention requires it).
  3. Style — WindowObject on line 23 of WebAssemblyThreading.cs must be JSObject? — it is null before Initialize() is called.
  4. Style — #nullable enable was removed from CoreApplicationNative.cs; nullable coverage must not regress.
  5. Style — else body in WebAssemblyWindowWrapper.ts:47 is missing one level of indentation.

All five inline comments from the previous cycle have been re-posted on the current commit since none were resolved. Each has a one-click suggestion block ready to apply.

export class WebAssemblyThreading {
public static isThreadingEnabled() {
return (<any>globalThis).crossOriginIsolated &&
typeof SharedArrayBuffer !== undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bug (still unresolved): typeof comparison against value undefined is always true

typeof always returns a string ("undefined", "function", etc.). Comparing a string with the value undefined (not the string 'undefined') always evaluates to true, so this check never actually gates on whether SharedArrayBuffer exists.

Suggested change
typeof SharedArrayBuffer !== undefined &&
typeof SharedArrayBuffer !== 'undefined' &&

This has been flagged in both previous review cycles and is still unaddressed.

@@ -0,0 +1,33 @@
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (still unresolved): missing #nullable enable

Project convention requires #nullable enable at the top of every new/refactored file (.claude/rules/code-style.md). Without it the compiler silently allows WindowObject (line 23) to be null before Initialize() is called.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;

/// Use this for JSImports calls inside JSWebWorker.
/// See: JSProxyContext.SealJSImportCapturing().
/// </summary>
public static JSObject WindowObject { get; private set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (still unresolved): WindowObject must be nullable

Before Initialize() is called, WindowObject is null, but the property type makes no such promise. Once #nullable enable is added (line 1), this must be annotated with ? to reflect the pre-initialization lifecycle.

Suggested change
public static JSObject WindowObject { get; private set; }
public static JSObject? WindowObject { get; private set; }

#nullable enable

using System.Runtime.InteropServices.JavaScript;
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (still unresolved): #nullable enable was removed

The previous version of this file had #nullable enable; this PR drops it. Nullable annotations must not regress.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;
using System.Threading.Tasks;

this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResizeAsync;
}
else {
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (still unresolved): missing indentation inside else body

this.onResize is at the same tab depth as the else keyword rather than indented one level inside the block. Should be 4 tabs to match the if branch on line 44.

Suggested change
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24103/wasm-skia-net9/index.html

Copy link
Copy Markdown
Contributor

The build 229242 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 158

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ContextRequested.png-dark
    • DynamicFont.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Attributed_text_FontSize_Changing.png
    • Buttons.png
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ContentControl_Inheritance.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png
    • ImageBrush_Stretch.png
    • ImageIconPage.png-dark
  • skia-windows-screenshots: 158 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • Dopes.png-dark
    • GetFocus.png-dark
    • GetFocus.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ContentPresenter_Template.png-dark
    • ContentPresenter_Template.png
    • DataTransferManager.png-dark
    • DataTransferManager.png
    • DoubleImageBrushInList.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • EmailManagerTests.png-dark
    • EmailManagerTests.png
    • Attributed_text_FontSize_Changing.png-dark
    • Examples.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24103/wasm-skia-net9/index.html

github-actions Bot commented Aug 22, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 5s —— View job


PR Review: WASM MT

  • Gather context and read changed files
  • Check if previously flagged issues are resolved
  • Analyze code for new issues
  • Post inline review comments
  • Update summary

Summary

Verdict: fix-first — the same five findings from the previous three review cycles remain unaddressed after this synchronize. No new issues were introduced by the latest commits (fix(wasm): Disable dotnet.js fingerprinting on the SamplesApp head).

Severity Count
Bug 1
Style 4

All five inline comments have been re-posted on the current commit since none were resolved across four review cycles. Each has a one-click suggestion block ready to apply.

  1. Bug — typeof SharedArrayBuffer !== undefined in WebAssemblyThreading.ts:5 compares a string against the value undefined (always true). Must be !== 'undefined'.
  2. Style — #nullable enable missing from WebAssemblyThreading.cs (line 1).
  3. Style — WindowObject on line 23 of WebAssemblyThreading.cs must be JSObject? — it is null before Initialize() is called.
  4. Style — #nullable enable was removed from CoreApplicationNative.cs; nullable coverage must not regress.
  5. Style — else body in WebAssemblyWindowWrapper.ts:47 is missing one level of indentation.

What's good in the new commits

  • WasmShellEnableDotnetJsFingerprinting=false workaround in the SamplesApp csproj is correctly scoped to the SamplesApp head project only.
  • OnResizeAsync / IsAutoEnableAccessibilityAsync returning Task from [JSExport] is the correct MT WASM interop pattern.
  • await CoreApplicationNative.InitializeExports() before WebAssemblyWindowWrapper.Initialize() ensures assembly exports are ready before the window wrapper tries to resolve them.
  • WebAssemblyThreading.Initialize() called at the top of InitializeAsync() correctly gates all threading-aware code paths.

export class WebAssemblyThreading {
public static isThreadingEnabled() {
return (<any>globalThis).crossOriginIsolated &&
typeof SharedArrayBuffer !== undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Bug (4th cycle, still unresolved): typeof comparison against value undefined is always true

typeof always returns a string ("undefined", "function", etc.). Comparing that string with the value undefined (not the string 'undefined') always evaluates to true, so this check never actually gates on whether SharedArrayBuffer exists. In cross-origin-isolated environments where SharedArrayBuffer is absent, isThreadingEnabled() will incorrectly return true (assuming Module.PThread is also present).

Suggested change
typeof SharedArrayBuffer !== undefined &&
typeof SharedArrayBuffer !== 'undefined' &&

@@ -0,0 +1,33 @@
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (4th cycle, still unresolved): missing #nullable enable

Project convention (.claude/rules/code-style.md) requires #nullable enable at the top of every new/refactored file. Without it the compiler silently permits WindowObject (line 23) to be assigned null before Initialize() is called, and callers get no nullability diagnostics.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;

/// Use this for JSImports calls inside JSWebWorker.
/// See: JSProxyContext.SealJSImportCapturing().
/// </summary>
public static JSObject WindowObject { get; private set; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (4th cycle, still unresolved): WindowObject must be nullable

Before Initialize() is called WindowObject holds its default value of null, but the property type JSObject makes no such promise. Once #nullable enable is added at line 1, this must carry a ? annotation to match the actual pre-initialization lifecycle — and all callers will be able to guard against it being null.

Suggested change
public static JSObject WindowObject { get; private set; }
public static JSObject? WindowObject { get; private set; }

#nullable enable

using System.Runtime.InteropServices.JavaScript;
using System.Runtime.InteropServices.JavaScript;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (4th cycle, still unresolved): #nullable enable was removed

The previous version of this file had #nullable enable. This PR drops it while adding a new Task-returning JSImport — nullable coverage must not regress.

Suggested change
using System.Runtime.InteropServices.JavaScript;
#nullable enable
using System.Runtime.InteropServices.JavaScript;
using System.Threading.Tasks;

this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResizeAsync;
}
else {
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Style (4th cycle, still unresolved): missing indentation inside else body

this.onResize is at the same tab depth as the else keyword rather than indented one level inside the block. It should be at 4 tabs to match the if branch on line 44.

Suggested change
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;
this.onResize = WebAssemblyWindowWrapper.assemblyExports.Uno.UI.Runtime.Skia.WebAssemblyWindowWrapper.OnResize;

Copy link
Copy Markdown
Contributor

The build 229435 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 171

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png
    • DropDownButtonPage.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ContentControl_Inheritance.png
    • Examples.png
    • CalendarView_Theming.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ContextRequested.png-dark
    • DynamicFont.png
  • skia-windows-screenshots: 171 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Dopes.png-dark
    • EmailManagerTests.png-dark
    • EmailManagerTests.png
    • ContentPresenter_Template.png-dark
    • Examples.png
    • EllipsemaskingEllipseGrid.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
    • ExpanderColorValidationPage.png-dark
    • ChatBox.png-dark
    • ChatBox.png
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • DataTransferManager.png-dark
    • DataTransferManager.png

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 228350 has failed on Uno.UI - CI.

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 229242 has failed on Uno.UI - CI.

Copy link
Copy Markdown
Contributor

The build 228918 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 420

Details
  • skia-linux-screenshots: 73 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png
    • ContentControl_Inheritance.png
    • Attributed_text_FontSize_Changing.png
    • DropDownButtonPage.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Examples.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageBrush_Stretch.png
    • ContextRequested.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Image_Margin_Large.png
    • Focus_FocusVisual_Properties.png-dark
  • skia-windows-screenshots: 420 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ApplicationViewMode.png
    • Application_DispatcherShutdownMode.png
    • Basics.png-dark
    • ChatBox.png
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • DataTransferManager.png-dark
    • DataTransferManager.png
    • Focus_FocusState.png-dark
    • Focus_FocusState.png
    • Accessibility_ScreenReader.png-dark
    • ApplicationViewMode.png-dark
    • ButtonWithClippingAndOffset.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • DoubleTappedTests.png-dark
    • DoubleTappedTests.png
    • DownloadFileSavePickerTests.png-dark
    • DownloadFileSavePickerTests.png
    • Examples.png

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 228918 has failed on Uno.UI - CI.

MartinZikmund requested a review from ebariche August 24, 2026 13:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL