Index: src/value-serializer.cc |
diff --git a/src/value-serializer.cc b/src/value-serializer.cc |
index 11335b7e00696450b416541a5d1dfa331d4a951c..0452c9b6e59d764ea7a463324a1ddbd86fb2b5e2 100644 |
--- a/src/value-serializer.cc |
+++ b/src/value-serializer.cc |
@@ -401,7 +401,7 @@ |
// Eliminate callable and exotic objects, which should not be serialized. |
InstanceType instance_type = receiver->map()->instance_type(); |
- if (receiver->IsCallable() || (IsSpecialReceiverInstanceType(instance_type) && |
+ if (receiver->IsCallable() || (instance_type <= LAST_SPECIAL_RECEIVER_TYPE && |
instance_type != JS_SPECIAL_API_OBJECT_TYPE)) { |
ThrowDataCloneError(MessageTemplate::kDataCloneError, receiver); |
return Nothing<bool>(); |