Skip to content

Commit 64b9eef

Browse files
authored
Revert "Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (flutter#9634)" (flutter#9637)
This broke the Fuchsia build. This reverts commit 45e1ad2.
1 parent 45e1ad2 commit 64b9eef

8 files changed

Lines changed: 35 additions & 38 deletions

File tree

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ vars = {
3434
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
3535
# You can use //tools/dart/create_updated_flutter_deps.py to produce
3636
# updated revision list of existing dependencies.
37-
'dart_revision': '67ab3be10d35d994641da167cc806f20a7ffa679',
37+
'dart_revision': '0abff7b2bb047cc893ea737d95656f9dabfef1e9',
3838

3939
# WARNING: DO NOT EDIT MANUALLY
4040
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py

ci/licenses_golden/licenses_third_party

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: f1e40299965f80773c3d4983274e6c46
1+
Signature: 128f33291640edb36f623069120b87d6
22

33
UNUSED LICENSES:
44

runtime/dart_isolate.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate, bool is_root_isolate) {
163163
}
164164

165165
auto* isolate_data = static_cast<std::shared_ptr<DartIsolate>*>(
166-
Dart_IsolateGroupData(dart_isolate));
166+
Dart_IsolateData(dart_isolate));
167167
if (isolate_data->get() != this) {
168168
return false;
169169
}
@@ -174,7 +174,7 @@ bool DartIsolate::Initialize(Dart_Isolate dart_isolate, bool is_root_isolate) {
174174
// We are entering a new scope (for the first time since initialization) and
175175
// we want to restore the current scope to null when we exit out of this
176176
// method. This balances the implicit Dart_EnterIsolate call made by
177-
// Dart_CreateIsolateGroup (which calls the Initialize).
177+
// Dart_CreateIsolate (which calls the Initialize).
178178
Dart_ExitIsolate();
179179

180180
tonic::DartIsolateScope scope(isolate());
@@ -636,8 +636,8 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
636636
return service_isolate->isolate();
637637
}
638638

639-
// |Dart_IsolateGroupCreateCallback|
640-
Dart_Isolate DartIsolate::DartIsolateGroupCreateCallback(
639+
// |Dart_IsolateCreateCallback|
640+
Dart_Isolate DartIsolate::DartIsolateCreateCallback(
641641
const char* advisory_script_uri,
642642
const char* advisory_script_entrypoint,
643643
const char* package_root,
@@ -720,16 +720,14 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair(
720720
}
721721

722722
// Create the Dart VM isolate and give it the embedder object as the baton.
723-
Dart_Isolate isolate = Dart_CreateIsolateGroup(
723+
Dart_Isolate isolate = Dart_CreateIsolate(
724724
advisory_script_uri, //
725725
advisory_script_entrypoint, //
726726
(*embedder_isolate)->GetIsolateSnapshot()->GetDataMapping(),
727727
(*embedder_isolate)->GetIsolateSnapshot()->GetInstructionsMapping(),
728728
(*embedder_isolate)->GetSharedSnapshot()->GetDataMapping(),
729729
(*embedder_isolate)->GetSharedSnapshot()->GetInstructionsMapping(), flags,
730-
embedder_isolate.get(), // isolate_group_data
731-
embedder_isolate.get(), // isolate_data
732-
error);
730+
embedder_isolate.get(), error);
733731

734732
if (isolate == nullptr) {
735733
FML_DLOG(ERROR) << *error;
@@ -776,8 +774,8 @@ void DartIsolate::DartIsolateShutdownCallback(
776774
embedder_isolate->get()->OnShutdownCallback();
777775
}
778776

779-
// |Dart_IsolateGroupCleanupCallback|
780-
void DartIsolate::DartIsolateGroupCleanupCallback(
777+
// |Dart_IsolateCleanupCallback|
778+
void DartIsolate::DartIsolateCleanupCallback(
781779
std::shared_ptr<DartIsolate>* embedder_isolate) {
782780
delete embedder_isolate;
783781
}

runtime/dart_isolate.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ class DartIsolate : public UIDartState {
156156

157157
void OnShutdownCallback();
158158

159-
// |Dart_IsolateGroupCreateCallback|
160-
static Dart_Isolate DartIsolateGroupCreateCallback(
159+
// |Dart_IsolateCreateCallback|
160+
static Dart_Isolate DartIsolateCreateCallback(
161161
const char* advisory_script_uri,
162162
const char* advisory_script_entrypoint,
163163
const char* package_root,
@@ -188,8 +188,8 @@ class DartIsolate : public UIDartState {
188188
static void DartIsolateShutdownCallback(
189189
std::shared_ptr<DartIsolate>* embedder_isolate);
190190

191-
// |Dart_IsolateGroupCleanupCallback|
192-
static void DartIsolateGroupCleanupCallback(
191+
// |Dart_IsolateCleanupCallback|
192+
static void DartIsolateCleanupCallback(
193193
std::shared_ptr<DartIsolate>* embedder_isolate);
194194

195195
FML_DISALLOW_COPY_AND_ASSIGN(DartIsolate);

runtime/dart_vm.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,12 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
366366
params.vm_snapshot_data = vm_data_->GetVMSnapshot().GetDataMapping();
367367
params.vm_snapshot_instructions =
368368
vm_data_->GetVMSnapshot().GetInstructionsMapping();
369-
params.create_group = reinterpret_cast<decltype(params.create_group)>(
370-
DartIsolate::DartIsolateGroupCreateCallback);
371-
params.shutdown_isolate =
372-
reinterpret_cast<decltype(params.shutdown_isolate)>(
373-
DartIsolate::DartIsolateShutdownCallback);
374-
params.cleanup_group = reinterpret_cast<decltype(params.cleanup_group)>(
375-
DartIsolate::DartIsolateGroupCleanupCallback);
369+
params.create = reinterpret_cast<decltype(params.create)>(
370+
DartIsolate::DartIsolateCreateCallback);
371+
params.shutdown = reinterpret_cast<decltype(params.shutdown)>(
372+
DartIsolate::DartIsolateShutdownCallback);
373+
params.cleanup = reinterpret_cast<decltype(params.cleanup)>(
374+
DartIsolate::DartIsolateCleanupCallback);
376375
params.thread_exit = ThreadExitCallback;
377376
params.get_service_assets = GetVMServiceAssetsArchiveCallback;
378377
params.entropy_source = dart::bin::GetEntropy;

shell/platform/fuchsia/dart/dart_component_controller.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ bool DartComponentController::CreateIsolate(
324324
auto state = new std::shared_ptr<tonic::DartState>(new tonic::DartState(
325325
namespace_fd, [this](Dart_Handle result) { MessageEpilogue(result); }));
326326

327-
isolate_ = Dart_CreateIsolateGroup(
327+
isolate_ = Dart_CreateIsolate(
328328
url_.c_str(), label_.c_str(), isolate_snapshot_data,
329329
isolate_snapshot_instructions, shared_snapshot_data,
330330
shared_snapshot_instructions, nullptr /* flags */, state, &error);
331331
if (!isolate_) {
332-
FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolateGroup failed: %s", error);
332+
FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolate failed: %s", error);
333333
return false;
334334
}
335335

shell/platform/fuchsia/dart/dart_runner.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ const char* kDartVMArgs[] = {
6161
// clang-format on
6262
};
6363

64-
Dart_Isolate IsolateGroupCreateCallback(const char* uri,
65-
const char* name,
66-
const char* package_root,
67-
const char* package_config,
68-
Dart_IsolateFlags* flags,
69-
void* callback_data,
70-
char** error) {
64+
Dart_Isolate IsolateCreateCallback(const char* uri,
65+
const char* name,
66+
const char* package_root,
67+
const char* package_config,
68+
Dart_IsolateFlags* flags,
69+
void* callback_data,
70+
char** error) {
7171
if (std::string(uri) == DART_VM_SERVICE_ISOLATE_NAME) {
7272
#if defined(DART_PRODUCT)
7373
*error = strdup("The service isolate is not implemented in product mode");
@@ -92,7 +92,7 @@ void IsolateShutdownCallback(void* callback_data) {
9292
}
9393
}
9494

95-
void IsolateGroupCleanupCallback(void* callback_data) {
95+
void IsolateCleanupCallback(void* callback_data) {
9696
delete static_cast<std::shared_ptr<tonic::DartState>*>(callback_data);
9797
}
9898

@@ -167,9 +167,9 @@ DartRunner::DartRunner() : context_(sys::ComponentContext::Create()) {
167167
params.vm_snapshot_data = vm_snapshot_data_.address();
168168
params.vm_snapshot_instructions = vm_snapshot_instructions_.address();
169169
#endif
170-
params.create_group = IsolateGroupCreateCallback;
171-
params.shutdown_isolate = IsolateShutdownCallback;
172-
params.cleanup_group = IsolateGroupCleanupCallback;
170+
params.create = IsolateCreateCallback;
171+
params.shutdown = IsolateShutdownCallback;
172+
params.cleanup = IsolateCleanupCallback;
173173
params.entropy_source = EntropySource;
174174
#if !defined(DART_PRODUCT)
175175
params.get_service_assets = GetVMServiceAssetsArchiveCallback;

shell/platform/fuchsia/dart/service_isolate.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ Dart_Isolate CreateServiceIsolate(const char* uri,
123123
#endif
124124

125125
auto state = new std::shared_ptr<tonic::DartState>(new tonic::DartState());
126-
Dart_Isolate isolate = Dart_CreateIsolateGroup(
126+
Dart_Isolate isolate = Dart_CreateIsolate(
127127
uri, DART_VM_SERVICE_ISOLATE_NAME, mapped_isolate_snapshot_data.address(),
128128
mapped_isolate_snapshot_instructions.address(),
129129
mapped_shared_snapshot_data.address(),
130130
mapped_shared_snapshot_instructions.address(), nullptr /* flags */, state,
131131
error);
132132
if (!isolate) {
133-
FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolateGroup failed: %s", *error);
133+
FX_LOGF(ERROR, LOG_TAG, "Dart_CreateIsolate failed: %s", *error);
134134
return nullptr;
135135
}
136136

0 commit comments

Comments
 (0)