Skip to content

Commit

Permalink
Update Dart (flutter#2909)
Browse files Browse the repository at this point in the history
  • Loading branch information
abarth authored Aug 11, 2016
1 parent 3252575 commit 0a54524
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
23 changes: 11 additions & 12 deletions sky/engine/core/script/dart_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,18 +587,17 @@ void InitDartVM() {

{
TRACE_EVENT0("flutter", "Dart_Initialize");
char* init_error = Dart_Initialize(
reinterpret_cast<uint8_t*>(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<uint8_t*>(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(&params);
if (init_error != nullptr)
FTL_LOG(FATAL) << "Error while initializing the Dart VM: " << init_error;
free(init_error);
Expand Down
7 changes: 4 additions & 3 deletions snapshotter/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(&params);
if (error)
FTL_LOG(FATAL) << error;
}
Expand Down

0 comments on commit 0a54524

Please sign in to comment.