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

Unified Diff: test/mjsunit/harmony/reflect-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
Index: test/mjsunit/harmony/reflect-set-prototype-of.js
diff --git a/test/mjsunit/harmony/reflect-set-prototype-of.js b/test/mjsunit/harmony/reflect-set-prototype-of.js
index 95b05aacd9054080a183e6d4f3aed98592a77313..0e5554e907aca9021e0902969b52e7e9449d766b 100644
--- a/test/mjsunit/harmony/reflect-set-prototype-of.js
+++ b/test/mjsunit/harmony/reflect-set-prototype-of.js
@@ -136,6 +136,9 @@ function TestSetPrototypeOfNonExtensibleObject() {
for (var i = 0; i < objects.length; i++) {
var object = objects[i];
Object.preventExtensions(object);
+ // Setting the current prototype must succeed.
+ assertTrue(Reflect.setPrototypeOf(object, Object.getPrototypeOf(object)));
+ // Setting any other must fail.
assertFalse(Reflect.setPrototypeOf(object, proto));
}
}
« src/objects.cc ('K') | « src/objects.cc ('k') | test/mjsunit/harmony/set-prototype-of.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698