$ the-wire · showcase
Flutter fixes web image disposal and Wasm build cache, Swift lands COM calling convention groundwork
By RepoJournal · Filed · About Mobile platforms · Composed from the cited sources · methodology
Flutter closed two web rendering gaps and a stale Wasm recompilation bug, while Swift's compiler gained COM method plumbing and Kotlin's Lombok support fixed two crashes.
Flutter fixed a web rendering bug where canvas drawing operations could lose their underlying `ImageSource` before rasterization. `ImageSource` references are now retained across CanvasKit and Skwasm drawing until the resulting `Picture` is disposed, which prevents premature DOM texture closure and black rendering [1]. On the build side, `ResidentWebRunner` no longer hardcodes `optimizationLevel` and `stripWasm` defaults in its `WasmCompilerConfig`, eliminating unnecessary Wasm recompilations during `flutter run` that resulted from a mismatch with `flutter build` [2].
A separate Flutter fix addresses a Linux Wayland resize artifact: OpenGL places the window origin at bottom-left and Wayland at top-left, so while a resize left surface and frame at different heights the contents jumped vertically, leaving a stale strip. The frame is now kept at the top of the resizing subsurface [3]. The accessibility evaluations feature flag is also gone: the `isAccessibilityEvaluationsEnabled` runtime flag and `enable-accessibility-evaluations` tool feature are removed now that a11y evaluation is supported outside debug mode [4].
Swift's compiler work landed in two areas. The COM method calling convention is now modeled as a new function type representation, `COMMethod`, across enums and type systems, though lowering and code generation are not yet implemented and these paths trigger `llvm_unreachable` assertions [5]. Sema validation for COM interface declarations was added in the same effort, rejecting associated types, initializers, static and generic requirements, and async or throwing methods that cannot be represented by the COM vtable ABI [6]. Separately, embedded Swift fixed two witness table specialization bugs for opaque result types: abstract associated conformances no longer crash with an assert in `Conformance.isSpecialized`, and a witness table that is not itself specialized but has a specialized associated conformance no longer produces an undefined symbol at link time [7].
On Kotlin, the Lombok plugin fixed two crashes. Delegating constructor calls attached in FIR previously caused fir2ir to inline property initializers and `init` blocks into the generated constructor, and an initializer reading a plain primary constructor parameter then read a symbol that constructor never binds, failing the JVM backend with "No mapping for symbol". `ConstructorBodyBuilder` now builds the body after fir2ir [8]. Inner class constructors generated by Lombok also failed with "Cannot determine expected receiver type" because they carried no dispatch receiver; `dispatchReceiverType` now defaults to the containing class's type whenever the target is an inner class [9].
Action items
- → Rebuild Flutter web benchmarks and test Wasm `flutter run` loops to confirm recompilation and profile cleanup fixes flutter/flutter [monitor]
- → Review Flutter Linux Wayland apps for subsurface resize artifacts flutter/flutter [plan]
- → Re-run embedded Swift builds using opaque result types to confirm witness table link fixes apple/swift [plan]
- → Test Kotlin Lombok inner class and delegating constructor generation against the IR backend JetBrains/kotlin [plan]
References
- [1] [web] Keep ImageSource alive until Picture disposal (#192516) ↗ flutter/flutter
- [2] Fix Wasm build cache mismatch in ResidentWebRunner and browser 404 fallbacks (#190786) ↗ flutter/flutter
- [3] [Linux] Keep the frame at the top of a resizing subsurface (#192408) ↗ flutter/flutter
- [4] Remove the accessibility evaluations feature flag (#192266) ↗ flutter/flutter
- [5] AST,SIL: model the COM method calling convention ↗ apple/swift
- [6] Sema: validate COM interface requirements ↗ apple/swift
- [7] embedded: fix some problems with witness table specialization for opaque result types ↗ apple/swift
- [8] [Lombok] Build the generated constructor bodies in the IR backend ↗ JetBrains/kotlin
- [9] [Lombok] Support the constructor annotations on a Java inner class ↗ JetBrains/kotlin