Index: src/wasm/wasm-objects.cc |
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc |
index b96be04c7c8ad684130456bf22695e691eab12b7..19d48aa04b3b2eec7cfc9df9e10c30f4f0b08ffe 100644 |
--- a/src/wasm/wasm-objects.cc |
+++ b/src/wasm/wasm-objects.cc |
@@ -349,7 +349,7 @@ void WasmCompiledModule::PrintInstancesChain() { |
if (!FLAG_trace_wasm_instances) return; |
for (WasmCompiledModule* current = this; current != nullptr;) { |
PrintF("->%d", current->instance_id()); |
- if (current->ptr_to_weak_next_instance() == nullptr) break; |
+ if (!current->has_weak_next_instance()) break; |
CHECK(!current->ptr_to_weak_next_instance()->cleared()); |
current = |
WasmCompiledModule::cast(current->ptr_to_weak_next_instance()->value()); |