Index: src/interpreter/source-position-table.cc |
diff --git a/src/interpreter/source-position-table.cc b/src/interpreter/source-position-table.cc |
index 1d7f368242d679501d5301e7e895b6585eaa0c52..5d30f51be7ff032111dd893d2e27f3463a1a0956 100644 |
--- a/src/interpreter/source-position-table.cc |
+++ b/src/interpreter/source-position-table.cc |
@@ -151,9 +151,10 @@ void SourcePositionTableBuilder::AddEntry(const PositionTableEntry& entry) { |
} |
Handle<ByteArray> SourcePositionTableBuilder::ToSourcePositionTable() { |
+ if (bytes_.empty()) return isolate_->factory()->empty_byte_array(); |
+ |
Handle<ByteArray> table = isolate_->factory()->NewByteArray( |
static_cast<int>(bytes_.size()), TENURED); |
- if (bytes_.empty()) return table; |
MemCopy(table->GetDataStartAddress(), &*bytes_.begin(), bytes_.size()); |