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