[vm] Cleanup todo - assert isolate_group is available when compiling.

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 <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
Alexander Aprelev
2025-01-02 14:27:39 -08:00
committed by Commit Queue
parent 673ee1f218
commit cb93352697
+1 -6
View File
@@ -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