Skip to content

Commit 727fc8f

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Fix bad safepoint transition during AcceptCompilation.
When there is an error, we need to return to the VM state before allocating the exception and its message. TEST=ci (flaky) Change-Id: I69f37aee1d3f308ab942f1581fc05501507c5346 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414840 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 6f70ffa commit 727fc8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

runtime/vm/isolate_reload.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,11 @@ static intptr_t CommonSuffixLength(const char* a, const char* b) {
639639
}
640640

641641
static ObjectPtr AcceptCompilation(Thread* thread) {
642-
TransitionVMToNative transition(thread);
643-
Dart_KernelCompilationResult result = KernelIsolate::AcceptCompilation();
642+
Dart_KernelCompilationResult result;
643+
{
644+
TransitionVMToNative transition(thread);
645+
result = KernelIsolate::AcceptCompilation();
646+
}
644647
if (result.status != Dart_KernelCompilationStatus_Ok) {
645648
if (result.status != Dart_KernelCompilationStatus_MsgFailed) {
646649
FATAL(

0 commit comments

Comments
 (0)