Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index ef069a98bc1f5eb493347a5423efb73189cf20d6..699cb5b8d1906cb6cf0722a91990d701ba795a84 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -3076,10 +3076,15 @@ void Assembler::dd(uint32_t data) { |
void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
ASSERT(rmode != RelocInfo::NONE); |
// Don't record external references unless the heap will be serialized. |
- if (rmode == RelocInfo::EXTERNAL_REFERENCE && |
- !Serializer::enabled() && |
- !FLAG_debug_code) { |
- return; |
+ if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
+#ifdef DEBUG |
+ if (!Serializer::enabled()) { |
+ Serializer::TooLateToEnableNow(); |
+ } |
+#endif |
+ if (!Serializer::enabled() && !FLAG_debug_code) { |
+ return; |
+ } |
} |
RelocInfo rinfo(pc_, rmode, data); |
reloc_info_writer.Write(&rinfo); |