Index: test/cctest/test-disasm-x64.cc |
diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc |
index 52f4e17ad0509f1f01f64f61011df52925033d50..b0b486c4e98cb21b1bae6645c78ffdff835be2d3 100644 |
--- a/test/cctest/test-disasm-x64.cc |
+++ b/test/cctest/test-disasm-x64.cc |
@@ -431,15 +431,12 @@ TEST(DisasmX64) { |
CodeDesc desc; |
assm.GetCode(&desc); |
- Object* code = CcTest::heap()->CreateCode( |
- desc, |
- Code::ComputeFlags(Code::STUB), |
- Handle<Code>())->ToObjectChecked(); |
- CHECK(code->IsCode()); |
+ Handle<Code> code = isolate->factory()->NewCode( |
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
#ifdef OBJECT_PRINT |
- Code::cast(code)->Print(); |
- byte* begin = Code::cast(code)->instruction_start(); |
- byte* end = begin + Code::cast(code)->instruction_size(); |
+ code->Print(); |
+ byte* begin = code->instruction_start(); |
+ byte* end = begin + code->instruction_size(); |
disasm::Disassembler::Disassemble(stdout, begin, end); |
#endif |
} |