Add instrumentation to track down Code::CopyFrom crasher.

R=jkummerow@chromium.org
BUG=chromium:196330

Review URL: https://codereview.chromium.org/12916005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ab782e58
......@@ -3785,7 +3785,11 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
ASSERT(!isolate_->code_range()->exists() ||
isolate_->code_range()->contains(code->address()));
code->set_instruction_size(desc.instr_size);
// TODO(mstarzinger): Remove once we found the bug.
CHECK(reloc_info->IsByteArray());
code->set_relocation_info(reloc_info);
// TODO(mstarzinger): Remove once we found the bug.
CHECK(code->relocation_info()->IsByteArray());
code->set_flags(flags);
if (code->is_call_stub() || code->is_keyed_call_stub()) {
code->set_check_type(RECEIVER_MAP_CHECK);
......
......@@ -8816,6 +8816,8 @@ void Code::CopyFrom(const CodeDesc& desc) {
memmove(instruction_start(), desc.buffer, desc.instr_size);
// copy reloc info
// TODO(mstarzinger): Remove once we found the bug.
CHECK(relocation_info()->IsByteArray());
memmove(relocation_start(),
desc.buffer + desc.buffer_size - desc.reloc_size,
desc.reloc_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment