summaryrefslogtreecommitdiff
path: root/src/node_messaging.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-06-02 16:46:13 +0200
committerAnna Henningsen <anna@addaleax.net>2019-06-10 15:22:54 +0200
commit7bd2a3fcb407970babc88650ff030526ccf79f9f (patch)
tree3ab4bfd93ed57c3894f3680fbdbb7d734c6c1277 /src/node_messaging.cc
parent55de20999b8b60a7ef889ea0d9573e9f271e1d17 (diff)
downloadandroid-node-v8-7bd2a3fcb407970babc88650ff030526ccf79f9f.tar.gz
android-node-v8-7bd2a3fcb407970babc88650ff030526ccf79f9f.tar.bz2
android-node-v8-7bd2a3fcb407970babc88650ff030526ccf79f9f.zip
worker: use DataCloneError for unknown native objects
This aligns the behaviour better with the web. PR-URL: https://github.com/nodejs/node/pull/28025 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/node_messaging.cc')
-rw-r--r--src/node_messaging.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_messaging.cc b/src/node_messaging.cc
index 0e782ef726..ba39d01dc3 100644
--- a/src/node_messaging.cc
+++ b/src/node_messaging.cc
@@ -232,7 +232,7 @@ class SerializerDelegate : public ValueSerializer::Delegate {
return WriteMessagePort(Unwrap<MessagePort>(object));
}
- THROW_ERR_CANNOT_TRANSFER_OBJECT(env_);
+ ThrowDataCloneError(env_->clone_unsupported_type_str());
return Nothing<bool>();
}