[vm] Fix Dart_CObject_Type breaking change
https://dart-review.googlesource.com/c/sdk/+/257925 added a new entry in the middle of the `Dart_CObject_Type` enum, which changed the value of the entries below. However, this enum is part of `dart_api_dl.h` and versioned by `dart_version.h`. New entries to `Dart_CObject_Type` should be added at the end of the enum to avoid making breaking changes to the type. TEST=tests/ffi/vmspecific_handle_dynamically_linked_test.dart Bug: https://github.com/dart-lang/sdk/issues/51459 Change-Id: I367b54f62e59ddf925e255bb56c0f8660be7c227 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284161 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
committed by
Commit Queue
parent
789971863e
commit
14e4a52657
@@ -27,7 +27,7 @@ main() async {
|
||||
print("C = C T1 or C T2.");
|
||||
print("Dart: Setup.");
|
||||
Expect.isTrue(NativeApi.majorVersion == 2);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 1);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 2);
|
||||
final initializeApi = dl.lookupFunction<IntPtr Function(Pointer<Void>),
|
||||
int Function(Pointer<Void>)>("InitDartApiDL");
|
||||
Expect.isTrue(initializeApi(NativeApi.initializeApiDLData) == 0);
|
||||
|
||||
@@ -36,7 +36,7 @@ main() async {
|
||||
print("C = C T1 or C T2.");
|
||||
print("Dart: Setup.");
|
||||
Expect.isTrue(NativeApi.majorVersion == 2);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 1);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 2);
|
||||
final initializeApi = dl.lookupFunction<IntPtr Function(Pointer<Void>),
|
||||
int Function(Pointer<Void>)>("InitDartApiDL");
|
||||
Expect.isTrue(initializeApi(NativeApi.initializeApiDLData) == 0);
|
||||
|
||||
@@ -54,7 +54,7 @@ final closureCallbackPointer =
|
||||
|
||||
void doDynamicLinking() {
|
||||
Expect.isTrue(NativeApi.majorVersion == 2);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 1);
|
||||
Expect.isTrue(NativeApi.minorVersion >= 2);
|
||||
final initializeApi = testLibrary.lookupFunction<
|
||||
IntPtr Function(Pointer<Void>),
|
||||
int Function(Pointer<Void>)>("InitDartApiDL");
|
||||
|
||||
Reference in New Issue
Block a user