From ec1828c2b67a84d5a6ca54fb34138510b3cfb135 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 21 Jun 2017 20:24:31 +0200 Subject: [PATCH] v8: add new to the throw statement Backport-PR-URL: https://github.com/nodejs/node/pull/22380 PR-URL: https://github.com/nodejs/node/pull/13857 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson --- lib/v8.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v8.js b/lib/v8.js index ba95c98dadc1ee..fccc39edc6833f 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -154,7 +154,7 @@ class DefaultSerializer extends Serializer { i = arrayBufferViewTypeToIndex.get(tag); if (i === undefined) { - throw this._getDataCloneError(`Unknown host object type: ${tag}`); + throw new this._getDataCloneError(`Unknown host object type: ${tag}`); } } this.writeUint32(i);