Index: src/snapshot/code-serializer.h |
diff --git a/src/snapshot/code-serializer.h b/src/snapshot/code-serializer.h |
index 6577df8c855cc0f1ff8d4c4b4c118222b4a7fc01..b9fc3608f31773b33462a8da572a68a3e5b94068 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) |