[VM / vmservice] Run service isolate in sound null safe mode (JIT)

TEST=ci
CoreLibraryReviewExempt: No files in other platforms were changed.
Change-Id: I567dae64226867c2036809739a14c14fdf52077b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357211
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
asiva 2024-03-13 17:56:49 +00:00 committed by Commit Queue
parent 3411564829
commit 9f951f7fb5
2 changed files with 3 additions and 2 deletions

View file

@ -523,6 +523,7 @@ static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
// Set flag to load and retain the vmservice library.
flags->load_vmservice_library = true;
flags->null_safety = true; // Service isolate runs in sound null safe mode.
const uint8_t* isolate_snapshot_data = core_isolate_snapshot_data;
const uint8_t* isolate_snapshot_instructions =
core_isolate_snapshot_instructions;

View file

@ -147,7 +147,7 @@ class Message {
// elements in the list are strings, making consumption by C++ simpler.
// This has a side effect that boolean literal values like true become 'true'
// and thus indistinguishable from the string literal 'true'.
List<String> _makeAllString(List<Object> list) {
List<String> _makeAllString(List<Object?> list) {
var new_list = List<String>.filled(list.length, "");
for (var i = 0; i < list.length; i++) {
new_list[i] = list[i].toString();
@ -168,7 +168,7 @@ class Message {
};
final keys = _makeAllString(params.keys.toList(growable: false));
final values =
_makeAllString(params.values.cast<Object>().toList(growable: false));
_makeAllString(params.values.cast<Object?>().toList(growable: false));
final request = List<Object?>.filled(6, null)
..[0] = 0 // Make room for OOB message type.
..[1] = receivePort.sendPort