Skip to content

Commit

Permalink
v8: replace Buffer with FastBuffer in deserialize
Browse files Browse the repository at this point in the history
Replace the Buffer constructor with a FastBuffer in v8.deserialize in
order to avoid calling the Buffer constructor and thus triggering a
deprecation warning from code inside the core.

Fixes: nodejs#21181
  • Loading branch information
ryzokuken committed Jun 7, 2018
1 parent 6dbd6f6 commit b072d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/v8.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit b072d74

Please sign in to comment.