Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: src/interpreter/source-position-table.cc

Issue 1759603002: [debugger] Ensure at least one breakable position per function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698