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

Unified Diff: src/heap-snapshot-generator.cc

Issue 169393004: Fix heap snapshot crash when JSArrayBuffer has no backing_store. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index 71362ffc0d36b4a2dc4c405762aea6a270136c5b..8a9b0d6b3d3d2cb2dd4785e0f1cebfd58d2a0b13 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1464,6 +1464,8 @@ void V8HeapExplorer::ExtractJSArrayBufferReferences(
"weak_first_view", buffer->weak_first_view(),
JSArrayBuffer::kWeakFirstViewOffset);
// Setup a reference to a native memory backing_store object.
+ if (!buffer->backing_store())
+ return;
size_t data_size = NumberToSize(heap_->isolate(), buffer->byte_length());
CHECK(data_size <= static_cast<size_t>(kMaxInt));
HeapEntry* data_entry = AddEntry(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698