Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 3a2ec3e559a16863db44acfcbce63a72cc9762aa..de7b06f670c6874ad5f1c95f0d22469b931c1ef7 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -4,6 +4,7 @@ |
#include "src/v8.h" |
+#include "src/bootstrapper.h" |
#include "src/disasm.h" |
#include "src/disassembler.h" |
#include "src/heap/objects-visiting.h" |
@@ -1281,9 +1282,11 @@ void Code::VerifyEmbeddedObjects(VerifyMode mode) { |
void Code::VerifyRecompiledCode(Code* old_code, Code* new_code) { |
if (old_code->kind() != FUNCTION) return; |
if (new_code->kind() != FUNCTION) return; |
- static const int mask = RelocInfo::kCodeTargetMask; |
- |
Isolate* isolate = old_code->GetIsolate(); |
+ // Do not verify during bootstrapping. We may replace code using %SetCode. |
+ if (isolate->bootstrapper()->IsActive()) return; |
+ |
+ static const int mask = RelocInfo::kCodeTargetMask; |
RelocIterator old_it(old_code, mask); |
RelocIterator new_it(new_code, mask); |
Code* stack_check = isolate->builtins()->builtin(Builtins::kStackCheck); |
@@ -1316,7 +1319,10 @@ void Code::VerifyRecompiledCode(Code* old_code, Code* new_code) { |
Code* new_target = |
Code::GetCodeFromTargetAddress(new_it.rinfo()->target_address()); |
CHECK_EQ(old_target->kind(), new_target->kind()); |
- if (!old_target->is_handler() && !old_target->is_inline_cache_stub()) { |
+ // Check call target for equality unless it's an IC or an interrupt check. |
+ // In both cases they may be patched to be something else. |
+ if (!old_target->is_handler() && !old_target->is_inline_cache_stub() && |
+ new_target == isolate->builtins()->builtin(Builtins::kInterruptCheck)) { |
CHECK_EQ(old_target, new_target); |
} |
old_it.next(); |