[es6] throw TypeError when setting cyclic prototype value
authorcaitpotter88 <caitpotter88@gmail.com>
Fri, 19 Jun 2015 22:18:18 +0000 (15:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 22:18:36 +0000 (22:18 +0000)
commit1765866b0b378334180a307c8819b0420a702812
tree04fbfaa4467fe0b1a7b17a8d6fbaa6217642712e
parent7876b43bbe0a2bfd43ffda49bf7cb733d92bafdf
[es6] throw TypeError when setting cyclic prototype value

Object.setPrototypeOf() throws a TypeError if value would create a
cycle. Previously a plain Error was thrown rather than a TypeError.

BUG=v8:4197
R=mike@bocoup.com
LOG=N

Review URL: https://codereview.chromium.org/1198523002

Cr-Commit-Position: refs/heads/master@{#29169}
src/objects.cc
test/mjsunit/harmony/set-prototype-of.js
test/mjsunit/proto-accessor.js
test/webkit/cyclic-prototypes-expected.txt