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

Unified Diff: test/webkit/preventExtensions.js

Issue 1011823003: [es6] don't throw if argument is non-object (O.freeze, O.seal, O.preventExtensions) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« test/mjsunit/object-freeze.js ('K') | « test/mjsunit/object-seal.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/preventExtensions.js
diff --git a/test/webkit/preventExtensions.js b/test/webkit/preventExtensions.js
index ec9223583c048dfb7a9035126b9e2d3133dfdeca..47cd781fab57faff74ab61b7010657d397ef4a81 100644
--- a/test/webkit/preventExtensions.js
+++ b/test/webkit/preventExtensions.js
@@ -92,8 +92,8 @@ shouldBe('test(freeze(obj()))', '"(a:1)(b:2)SF"'); // sealed and frozen, CANNOT
// check that we can preventExtensions on a host function.
shouldBe('Object.preventExtensions(Math.sin)', 'Math.sin');
-shouldThrow('var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
-shouldThrow('"use strict"; var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
+shouldBe('var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
arv (Not doing code reviews) 2015/03/19 19:38:08 This looks strange. shouldBe takes two strings tha
caitp (gmail) 2015/03/19 20:16:15 Looks like in this case, it should throw https://p
+shouldBe('"use strict"; var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
arv (Not doing code reviews) 2015/03/19 19:38:08 This should still throw, shouldn't it?
caitp (gmail) 2015/03/19 19:42:10 Yeah. I passed make check, but I guess the WebKit
// check that we can still access static properties on an object after calling preventExtensions.
shouldBe('Object.preventExtensions(Math); Math.sqrt(4)', '2');
« test/mjsunit/object-freeze.js ('K') | « test/mjsunit/object-seal.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698