Index: src/snapshot/code-serializer.h |
diff --git a/src/snapshot/code-serializer.h b/src/snapshot/code-serializer.h |
index 7d78bdccdbf1c07f1bfb118944b8e6fc3c9f8b17..61780ec0f860dc17bc1b76b96fb255c82917cebd 100644 |
--- a/src/snapshot/code-serializer.h |
+++ b/src/snapshot/code-serializer.h |
@@ -74,7 +74,9 @@ class WasmCompiledModuleSerializer : public CodeSerializer { |
} |
} |
- bool ElideObject(Object* obj) override { return obj->IsWeakCell(); }; |
+ bool ElideObject(Object* obj) override { |
+ return obj->IsWeakCell() || obj->IsForeign(); |
+ }; |
private: |
WasmCompiledModuleSerializer(Isolate* isolate, uint32_t source_hash) |