Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index daaed525cc3b9f21255640a1cab9cf042f698055..b3178fa83c49cddcb0789662da9ff3e02af27a60 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7655,6 +7655,8 @@ void Code::Relocate(intptr_t delta) { |
void Code::CopyFrom(const CodeDesc& desc) { |
+ ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); |
+ |
// copy code |
memmove(instruction_start(), desc.buffer, desc.instr_size); |
@@ -7674,16 +7676,17 @@ void Code::CopyFrom(const CodeDesc& desc) { |
RelocInfo::Mode mode = it.rinfo()->rmode(); |
if (mode == RelocInfo::EMBEDDED_OBJECT) { |
Handle<Object> p = it.rinfo()->target_object_handle(origin); |
- it.rinfo()->set_target_object(*p); |
+ it.rinfo()->set_target_object(*p, SKIP_WRITE_BARRIER); |
} else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { |
Handle<JSGlobalPropertyCell> cell = it.rinfo()->target_cell_handle(); |
- it.rinfo()->set_target_cell(*cell); |
+ it.rinfo()->set_target_cell(*cell, SKIP_WRITE_BARRIER); |
} else if (RelocInfo::IsCodeTarget(mode)) { |
// rewrite code handles in inline cache targets to direct |
// pointers to the first instruction in the code object |
Handle<Object> p = it.rinfo()->target_object_handle(origin); |
Code* code = Code::cast(*p); |
- it.rinfo()->set_target_address(code->instruction_start()); |
+ it.rinfo()->set_target_address(code->instruction_start(), |
+ SKIP_WRITE_BARRIER); |
} else { |
it.rinfo()->apply(delta); |
} |