Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 77443f6ba6f1f6cd3fcd4678c250c5cc6b3ecc6b..b712d521fd235229ffe2d2a14cdd3afdb0720ddf 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2838,13 +2838,18 @@ MaybeLocal<String> JSON::Stringify(Local<Context> context, |
// --- V a l u e S e r i a l i z a t i o n --- |
struct ValueSerializer::PrivateData { |
- explicit PrivateData(i::Isolate* i) : isolate(i), serializer(i) {} |
+ explicit PrivateData(i::Isolate* i, ValueSerializer::Delegate* delegate) |
+ : isolate(i), serializer(i, delegate) {} |
i::Isolate* isolate; |
i::ValueSerializer serializer; |
}; |
ValueSerializer::ValueSerializer(Isolate* isolate) |
- : private_(new PrivateData(reinterpret_cast<i::Isolate*>(isolate))) {} |
+ : ValueSerializer(isolate, nullptr) {} |
+ |
+ValueSerializer::ValueSerializer(Isolate* isolate, Delegate* delegate) |
+ : private_( |
+ new PrivateData(reinterpret_cast<i::Isolate*>(isolate), delegate)) {} |
ValueSerializer::~ValueSerializer() { delete private_; } |