Index: test/unittests/value-serializer-unittest.cc |
diff --git a/test/unittests/value-serializer-unittest.cc b/test/unittests/value-serializer-unittest.cc |
index 835aaa0ec6050bcf8bc63f7320dbb844df7b87a3..44ad79447b33eee05fd77cbc001d1caa3a27c841 100644 |
--- a/test/unittests/value-serializer-unittest.cc |
+++ b/test/unittests/value-serializer-unittest.cc |
@@ -64,6 +64,7 @@ class ValueSerializerTest : public TestWithIsolate { |
// Overridden in more specific fixtures. |
virtual ValueSerializer::Delegate* GetSerializerDelegate() { return nullptr; } |
virtual void BeforeEncode(ValueSerializer*) {} |
+ virtual void AfterEncode() {} |
virtual ValueDeserializer::Delegate* GetDeserializerDelegate() { |
return nullptr; |
} |
@@ -109,6 +110,7 @@ class ValueSerializerTest : public TestWithIsolate { |
if (!serializer.WriteValue(context, value).FromMaybe(false)) { |
return Nothing<std::vector<uint8_t>>(); |
} |
+ AfterEncode(); |
return Just(serializer.ReleaseBuffer()); |
} |
@@ -1740,7 +1742,6 @@ class ValueSerializerTestWithArrayBufferTransfer : public ValueSerializerTest { |
{ |
Context::Scope scope(serialization_context()); |
input_buffer_ = ArrayBuffer::New(isolate(), nullptr, 0); |
- input_buffer_->Neuter(); |
} |
{ |
Context::Scope scope(deserialization_context()); |
@@ -1757,6 +1758,8 @@ class ValueSerializerTestWithArrayBufferTransfer : public ValueSerializerTest { |
serializer->TransferArrayBuffer(0, input_buffer_); |
} |
+ void AfterEncode() override { input_buffer_->Neuter(); } |
+ |
void BeforeDecode(ValueDeserializer* deserializer) override { |
deserializer->TransferArrayBuffer(0, output_buffer_); |
} |