Index: runtime/vm/stub_code_arm64.cc |
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc |
index a4e43e9e59628c1ff615c12390430b2db5a7e9bc..6ccef25825dad54a0f44813fbff5894a5d0e9599 100644 |
--- a/runtime/vm/stub_code_arm64.cc |
+++ b/runtime/vm/stub_code_arm64.cc |
@@ -1819,6 +1819,7 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) { |
// R2: frame_pointer. |
// R3: error object. |
// R4: address of stacktrace object. |
+// R5: isolate. |
// Does not return. |
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
ASSERT(kExceptionObjectReg == R0); |
@@ -1828,6 +1829,11 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
__ mov(FP, R2); // Frame_pointer. |
__ mov(R0, R3); // Exception object. |
__ mov(R1, R4); // StackTrace object. |
+ // Set the tag. |
+ __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP); |
+ __ StoreToOffset(R2, R5, Isolate::vm_tag_offset(), kNoPP); |
+ // Clear top exit frame. |
+ __ StoreToOffset(ZR, R5, Isolate::top_exit_frame_info_offset(), kNoPP); |
__ ret(); // Jump to the exception handler code. |
} |