Skip to content

[breaking change][vm] Add class modifiers to dart:nativewrappers #51896

@dcharkes

Description

@dcharkes

The NativeWrapperClasses should be marked base so that none of their subtypes can be implemented.

Implementing subtypes can lead to issues when passing such native wrapper to a native call, as it will try to unwrap a native field that doesn't exist (likely leading to a segfault).

CL: https://dart-review.googlesource.com/c/sdk/+/291761

Flutter has classes which extend NativeWrapperClasses and are mocked in tests.
And Flutter has already opted in to 3.0, so adding the class modifiers to dart:nativewrappers is a breaking change for Flutter.

log

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.breaking-change-approvedbreaking-change-requestThis tracks requests for feedback on breaking changesvm-native

Type

No type

Projects

Status

Complete

Relationships

None yet

Development

No branches or pull requests

Issue actions