diff --git a/DEPS b/DEPS index 53038466cf62c..afa19d29a4498 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { # Note: When updating the Dart revision, ensure that all entries that are # dependencies of dart are also updated - 'dart_revision': '5a2193ecc4f5672a61169cba93197dc3aa46e1d1', + 'dart_revision': 'cfdd6ee5cc6a7af56ead91190af8f8dcc33e82ea', 'dart_boringssl_revision': '8d343b44bbab829d1a28fdef650ca95f7db4412e', 'dart_observatory_packages_revision': 'a01235b5b71df27b602dae4676d0bf771cbe7fa2', 'dart_root_certificates_revision': 'aed07942ce98507d2be28cbd29e879525410c7fc', diff --git a/sky/engine/core/script/dart_init.cc b/sky/engine/core/script/dart_init.cc index 62976c07dc9ce..7a6a37a74b9c6 100644 --- a/sky/engine/core/script/dart_init.cc +++ b/sky/engine/core/script/dart_init.cc @@ -587,18 +587,17 @@ void InitDartVM() { { TRACE_EVENT0("flutter", "Dart_Initialize"); - char* init_error = Dart_Initialize( - reinterpret_cast(DART_SYMBOL(kDartVmIsolateSnapshotBuffer)), - PrecompiledInstructionsSymbolIfPresent(), - PrecompiledDataSnapshotSymbolIfPresent(), IsolateCreateCallback, - nullptr, // Isolate interrupt callback. - nullptr, IsolateShutdownCallback, ThreadExitCallback, - // File IO callbacks. - nullptr, nullptr, nullptr, nullptr, - // Entroy source - nullptr, - // VM service assets archive - GetVMServiceAssetsArchiveCallback); + Dart_InitializeParams params = {}; + params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION; + params.vm_isolate_snapshot = + reinterpret_cast(DART_SYMBOL(kDartVmIsolateSnapshotBuffer)); + params.instructions_snapshot = PrecompiledInstructionsSymbolIfPresent(); + params.data_snapshot = PrecompiledDataSnapshotSymbolIfPresent(); + params.create = IsolateCreateCallback; + params.shutdown = IsolateShutdownCallback; + params.thread_exit = ThreadExitCallback; + params.get_service_assets = GetVMServiceAssetsArchiveCallback; + char* init_error = Dart_Initialize(¶ms); if (init_error != nullptr) FTL_LOG(FATAL) << "Error while initializing the Dart VM: " << init_error; free(init_error); diff --git a/snapshotter/main.cc b/snapshotter/main.cc index 8d05981af65dd..3f95be7352ad0 100644 --- a/snapshotter/main.cc +++ b/snapshotter/main.cc @@ -86,9 +86,10 @@ class DartScope { void InitDartVM() { FTL_CHECK(Dart_SetVMFlags(arraysize(kDartArgs), kDartArgs)); - char* error = Dart_Initialize( - kDartVmIsolateSnapshotBuffer, nullptr, nullptr, nullptr, nullptr, nullptr, - nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + Dart_InitializeParams params = {}; + params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION; + params.vm_isolate_snapshot = kDartVmIsolateSnapshotBuffer; + char* error = Dart_Initialize(¶ms); if (error) FTL_LOG(FATAL) << error; }