Skip to content

Commit

Permalink
[vm] Cleanup todo - assert isolate_group is available when compiling.
Browse files Browse the repository at this point in the history
If there is current thread, assert there is isolate_group too.

TEST=ci

Change-Id: Id4bce1091084b707b6b671038ec3377ded6791c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402427
Reviewed-by: Siva Annamalai <[email protected]>
Commit-Queue: Alexander Aprelev <[email protected]>
  • Loading branch information
aam authored and Commit Queue committed Jan 2, 2025
1 parent 673ee1f commit cb93352
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions runtime/vm/kernel_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -836,15 +836,10 @@ class KernelCompilationRequest : public ValueObject {
dart_embed_sources.type = Dart_CObject_kBool;
dart_embed_sources.value.as_bool = embed_sources;

// TODO(aam): Assert that isolate exists once we move CompileAndReadScript
// compilation logic out of CreateIsolateAndSetupHelper and into
// IsolateSetupHelper in main.cc.
auto thread = Thread::Current();
auto isolate_group = thread != nullptr ? thread->isolate_group() : nullptr;
ASSERT((thread == nullptr) || (isolate_group != nullptr));

if (incremental_compile) {
ASSERT(isolate_group != nullptr);
}
Dart_CObject isolate_id;
isolate_id.type = Dart_CObject_kInt64;
isolate_id.value.as_int64 = isolate_group != nullptr
Expand Down

0 comments on commit cb93352

Please sign in to comment.