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

Unified Diff: src/heap/heap.cc

Issue 2852463003: [heap] Filter out non-heap values when tracing wrappers (Closed)
Patch Set: Created 3 years, 8 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/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 6f030b306997d2b7f90f366f8ca1a936a8eb30e8..168febcf989e486b3efca855308912f0a6918a87 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5671,11 +5671,10 @@ void Heap::TracePossibleWrapper(JSObject* js_object) {
}
void Heap::RegisterExternallyReferencedObject(Object** object) {
+ // The embedder is not aware of whether numbers are materialized as heap
+ // objects are just passed around as Smis.
+ if (!(*object)->IsHeapObject()) return;
Hannes Payer (out of office) 2017/04/27 14:46:18 Do you still want to keep the nullptr check? Or ca
Michael Lippautz 2017/04/27 14:47:50 If it is a heap object it cannot be null, as this
HeapObject* heap_object = HeapObject::cast(*object);
- if (heap_object == nullptr) {
- // We might encounter non-empty handles that point to nullptr.
- return;
- }
DCHECK(Contains(heap_object));
if (FLAG_incremental_marking_wrappers && incremental_marking()->IsMarking()) {
IncrementalMarking::MarkGrey(this, heap_object);
« 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