Index: src/debug/debug.cc |
diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
index 76ded2cc7ada18cb7d511d55d315cf80733f799f..95fdae71f3a0586f27e50dc9b972d926e2c5c736 100644 |
--- a/src/debug/debug.cc |
+++ b/src/debug/debug.cc |
@@ -1291,7 +1291,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) { |
HeapIterator iterator(isolate_->heap()); |
HeapObject* obj; |
- while ((obj = iterator.next())) { |
+ while ((obj = iterator.next()) != nullptr) { |
if (obj->IsJSFunction()) { |
JSFunction* function = JSFunction::cast(obj); |
if (!function->Inlines(*shared)) continue; |
@@ -1637,7 +1637,7 @@ Handle<FixedArray> Debug::GetLoadedScripts() { |
{ |
Script::Iterator iterator(isolate_); |
Script* script; |
- while ((script = iterator.Next())) { |
+ while ((script = iterator.Next()) != nullptr) { |
if (script->HasValidSource()) results->set(length++, script); |
} |
} |