[vm, gc] Avoid growth policy data race.
TEST=tsan Bug: https://github.com/dart-lang/sdk/issues/61862 Change-Id: Icd16140999282b33fd9fbcceda901b82e4267c7a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458421 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
Commit Queue
parent
e0fe7efd1c
commit
2608c03824
@@ -6008,6 +6008,9 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
|
||||
// If this is an auxiliary isolate inside a larger isolate group, we will not
|
||||
// re-initialize the growth policy.
|
||||
if (I->group()->ContainsOnlyOneIsolate()) {
|
||||
// Helper tasks like the background compile might be running. Avoid data
|
||||
// races on the growth policy.
|
||||
GcSafepointOperationScope safepoint(T);
|
||||
I->group()->heap()->old_space()->EvaluateAfterLoading();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user