summaryrefslogtreecommitdiff
path: root/lib/v8.js
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2018-06-07 22:51:47 +0530
committerUjjwal Sharma <usharma1998@gmail.com>2018-06-14 11:47:53 +0530
commit82db6729915e031814425360d2b8e7c83328697d (patch)
treef5f27e9a4d7b5782d6b0b3a81c51baf321032a7e /lib/v8.js
parent60e6991291e8571c4b27172714582e7d65f29c41 (diff)
downloadandroid-node-v8-82db6729915e031814425360d2b8e7c83328697d.tar.gz
android-node-v8-82db6729915e031814425360d2b8e7c83328697d.tar.bz2
android-node-v8-82db6729915e031814425360d2b8e7c83328697d.zip
v8: replace Buffer with FastBuffer in deserialize
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: https://github.com/nodejs/node/issues/21181 PR-URL: https://github.com/nodejs/node/pull/21196 Fixes: https://github.com/nodejs/node/issues/21181 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/v8.js')
-rw-r--r--lib/v8.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/v8.js b/lib/v8.js
index ed93b094ca..0d9ffc6033 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() {