diff --git a/lib/v8.js b/lib/v8.js index ed93b094ca7895..0d9ffc6033ced2 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -143,7 +143,7 @@ const arrayBufferViewTypeToIndex = new Map(); } } -const bufferConstructorIndex = arrayBufferViewTypes.push(Buffer) - 1; +const bufferConstructorIndex = arrayBufferViewTypes.push(FastBuffer) - 1; class DefaultSerializer extends Serializer { constructor() { diff --git a/test/parallel/test-v8-deserialize-buffer.js b/test/parallel/test-v8-deserialize-buffer.js new file mode 100644 index 00000000000000..b6438027bafbfd --- /dev/null +++ b/test/parallel/test-v8-deserialize-buffer.js @@ -0,0 +1,8 @@ +// Flags: --pending-deprecation --no-warnings +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); + +process.on('warning', common.mustNotCall()); +v8.deserialize(v8.serialize(Buffer.alloc(0)));