Index: test/cctest/test-reloc-info.cc |
diff --git a/test/cctest/test-reloc-info.cc b/test/cctest/test-reloc-info.cc |
index e638201db2258434fbf7c744d752903992849539..5ab9e803c253b32ebb54b4ad844be76370cb9fc8 100644 |
--- a/test/cctest/test-reloc-info.cc |
+++ b/test/cctest/test-reloc-info.cc |
@@ -47,8 +47,8 @@ TEST(Positions) { |
const int buffer_size = code_size + relocation_info_size; |
SmartArrayPointer<byte> buffer(new byte[buffer_size]); |
- byte* pc = *buffer; |
- byte* buffer_end = *buffer + buffer_size; |
+ byte* pc = buffer.get(); |
+ byte* buffer_end = buffer.get() + buffer_size; |
RelocInfoWriter writer(buffer_end, pc); |
byte* relocation_info_end = buffer_end - relocation_info_size; |
@@ -60,13 +60,13 @@ TEST(Positions) { |
} |
relocation_info_size = static_cast<int>(buffer_end - writer.pos()); |
- CodeDesc desc = { *buffer, buffer_size, code_size, |
+ CodeDesc desc = { buffer.get(), buffer_size, code_size, |
relocation_info_size, NULL }; |
// Read only (non-statement) positions. |
{ |
RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::POSITION)); |
- pc = *buffer; |
+ pc = buffer.get(); |
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) { |
RelocInfo::Mode mode = (i % 2 == 0) ? |
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION; |
@@ -83,7 +83,7 @@ TEST(Positions) { |
// Read only statement positions. |
{ |
RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION)); |
- pc = *buffer; |
+ pc = buffer.get(); |
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) { |
RelocInfo::Mode mode = (i % 2 == 0) ? |
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION; |
@@ -100,7 +100,7 @@ TEST(Positions) { |
// Read both types of positions. |
{ |
RelocIterator it(desc, RelocInfo::kPositionMask); |
- pc = *buffer; |
+ pc = buffer.get(); |
for (int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) { |
RelocInfo::Mode mode = (i % 2 == 0) ? |
RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION; |