mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 14:27:18 +00:00
[vm/isolates] Clean up redundant SafepointOperationScope when installing allocation stub.
The SafepointOperationScope is provided by RunWithStoppedMutators. Change-Id: Ib0f3a86de58b074a0b5b84b05631ecc59d62de36 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153640 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
8e3b375123
commit
8b9f920c52
3 changed files with 4 additions and 4 deletions
|
@ -659,7 +659,7 @@ CodePtr CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
|
|||
// those writes are observed atomically.
|
||||
//
|
||||
thread()->isolate_group()->RunWithStoppedMutators(
|
||||
install_code_fun, install_code_fun, /*use_force_growth=*/true);
|
||||
install_code_fun, /*use_force_growth=*/true);
|
||||
}
|
||||
if (!result->IsNull()) {
|
||||
// Must be called outside of safepoint.
|
||||
|
|
|
@ -220,7 +220,7 @@ CodePtr StubCode::GetAllocationStubForClass(const Class& cls) {
|
|||
}
|
||||
};
|
||||
auto bg_compiler_fun = [&]() {
|
||||
ForceGrowthSafepointOperationScope safepoint_scope(thread);
|
||||
ASSERT(Thread::Current()->IsAtSafepoint());
|
||||
stub = cls.allocation_stub();
|
||||
// Check if stub was already generated.
|
||||
if (!stub.IsNull()) {
|
||||
|
|
|
@ -226,8 +226,8 @@ CodePtr TypeTestingStubGenerator::BuildCodeForType(const Type& type) {
|
|||
// a) We allocate an instructions object, which might cause us to
|
||||
// temporarily flip page protections from (RX -> RW -> RX).
|
||||
//
|
||||
thread->isolate_group()->RunWithStoppedMutators(
|
||||
install_code_fun, install_code_fun, /*use_force_growth=*/true);
|
||||
thread->isolate_group()->RunWithStoppedMutators(install_code_fun,
|
||||
/*use_force_growth=*/true);
|
||||
|
||||
Code::NotifyCodeObservers(name, code, /*optimized=*/false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue