Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1817)

Unified Diff: test/mjsunit/harmony/set-prototype-of.js

Issue 1423603002: Fix corner-case behavior of JSObject::SetPrototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/objects.cc ('K') | « test/mjsunit/harmony/reflect-set-prototype-of.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/set-prototype-of.js
diff --git a/test/mjsunit/harmony/set-prototype-of.js b/test/mjsunit/harmony/set-prototype-of.js
index e92a0c37bc3de9eb3b4750b0474581319061304e..7406fb54bf225e25e4f0cf7ae5c3f60ed13ae4f6 100644
--- a/test/mjsunit/harmony/set-prototype-of.js
+++ b/test/mjsunit/harmony/set-prototype-of.js
@@ -131,6 +131,9 @@ function TestSetPrototypeOfNonExtensibleObject() {
for (var i = 0; i < objects.length; i++) {
var object = objects[i];
Object.preventExtensions(object);
+ // Setting the current prototype must succeed.
+ Object.setPrototypeOf(object, Object.getPrototypeOf(object));
+ // Setting any other must fail.
assertThrows(function() {
Object.setPrototypeOf(object, proto);
}, TypeError);
« src/objects.cc ('K') | « test/mjsunit/harmony/reflect-set-prototype-of.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698