[sdk/vm] Make Base64._inverseAlphabet shared.
This is so that Base64 decoding is available for isolategroup-bound callbacks. TEST=run_isolate_group_run_test BUG=https://github.com/dart-lang/sdk/issues/61541 CoreLibraryReviewExempt: vm-only pragma Change-Id: I30b8f0c36b0f980a1f5a13cec3cb07e214324ce0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461180 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
c5268b20d7
commit
d793fc0ed5
@@ -589,6 +589,7 @@ class _Base64Decoder {
|
||||
/// 62nd and 63rd alphabet characters), and considers `%` a padding
|
||||
/// character, which must then be followed by `3D`, the percent-escape
|
||||
/// for `=`.
|
||||
@pragma('vm:shared')
|
||||
static final List<int> _inverseAlphabet = Int8List.fromList([
|
||||
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, //
|
||||
__, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, //
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
// VMOptions=--experimental-shared-data --profiler --profile_vm=false
|
||||
|
||||
import 'package:dart_internal/isolate_group.dart' show IsolateGroup;
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
import 'dart:isolate';
|
||||
|
||||
@@ -259,5 +260,12 @@ main(List<String> args) {
|
||||
});
|
||||
Expect.isTrue(resultIdentical);
|
||||
|
||||
Expect.listEquals(
|
||||
"abcdefghijklmnopqrstuvwxyz".codeUnits,
|
||||
IsolateGroup.runSync(() {
|
||||
return Base64Decoder().convert("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=");
|
||||
}),
|
||||
);
|
||||
|
||||
print("All tests completed :)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user