Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 44b3721b1a67738546aaf2416a6331113d2f8cd5..cb74ef106c5f7b8d86ada38b45eb79e10025b18b 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12402,7 +12402,8 @@ MaybeHandle<Object> JSObject::SetPrototype(Handle<JSObject> object, |
!iter.IsAtEnd(); iter.Advance()) { |
if (JSReceiver::cast(iter.GetCurrent()) == *object) { |
// Cycle detected. |
- THROW_NEW_ERROR(isolate, NewError(MessageTemplate::kCyclicProto), Object); |
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kCyclicProto), |
+ Object); |
} |
} |