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

Unified Diff: src/heap/heap.cc

Issue 2836013003: [heap] Filter out nullptr when registering externally referenced objects (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 eba313d283cdd21e08f7214e1cafd35079b35562..81ad774140ba2e95428994e47dce7f0b5cd579fe 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5662,6 +5662,10 @@ void Heap::TracePossibleWrapper(JSObject* js_object) {
void Heap::RegisterExternallyReferencedObject(Object** object) {
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