Index: test/cctest/test-macro-assembler-arm.cc |
diff --git a/test/cctest/test-macro-assembler-arm.cc b/test/cctest/test-macro-assembler-arm.cc |
index d40b8a50c0a712552e388b2f3a94171f50ab4988..8aed4c27b5c11dfe928c80dcbbd48aadbc825a72 100644 |
--- a/test/cctest/test-macro-assembler-arm.cc |
+++ b/test/cctest/test-macro-assembler-arm.cc |
@@ -91,13 +91,10 @@ TEST(CopyBytes) { |
CodeDesc desc; |
masm->GetCode(&desc); |
- Object* code = isolate->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>()); |
- F f = FUNCTION_CAST<F>(Code::cast(code)->entry()); |
+ F f = FUNCTION_CAST<F>(code->entry()); |
// Initialise source data with non-zero bytes. |
for (int i = 0; i < data_size; i++) { |
@@ -218,14 +215,11 @@ TEST(LoadAndStoreWithRepresentation) { |
CodeDesc desc; |
masm->GetCode(&desc); |
- Object* code = isolate->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>()); |
// Call the function from C++. |
- F5 f = FUNCTION_CAST<F5>(Code::cast(code)->entry()); |
+ F5 f = FUNCTION_CAST<F5>(code->entry()); |
CHECK_EQ(0, CALL_GENERATED_CODE(f, 0, 0, 0, 0, 0)); |
} |