From cf3bb593decb0c5cd648a22c5d14653295ca390c Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 6 Aug 2018 15:59:11 -0500 Subject: [PATCH] v8: move serdes to internalBinding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/22161 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Ruben Bridgewater Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Trivikram Kamat Reviewed-By: Jon Moss Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Franziska Hinkelmann Reviewed-By: Michael Dawson --- lib/v8.js | 3 ++- src/node_serdes.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/v8.js b/lib/v8.js index 0d9ffc6033c..bca70996209 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -16,10 +16,11 @@ const { Buffer } = require('buffer'); const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; +const { internalBinding } = require('internal/bootstrap/loaders'); const { Serializer: _Serializer, Deserializer: _Deserializer -} = process.binding('serdes'); +} = internalBinding('serdes'); const { copy } = process.binding('buffer'); const { objectToString } = require('internal/util'); const { FastBuffer } = require('internal/buffer'); diff --git a/src/node_serdes.cc b/src/node_serdes.cc index 5de0ddd8190..490d2c325ac 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -501,4 +501,4 @@ void Initialize(Local target, } // anonymous namespace } // namespace node -NODE_BUILTIN_MODULE_CONTEXT_AWARE(serdes, node::Initialize) +NODE_MODULE_CONTEXT_AWARE_INTERNAL(serdes, node::Initialize)