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

Unified Diff: test/mjsunit/function-bind.js

Issue 1027283004: [es6] do not add caller/arguments to ES6 function definitions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 8 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
« no previous file with comments | « test/mjsunit/es6/generators-runtime.js ('k') | test/mjsunit/harmony/arrow-functions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/function-bind.js
diff --git a/test/mjsunit/function-bind.js b/test/mjsunit/function-bind.js
index 4a8f2d2a62443234d8488a0fcdeaf5f89d7fc7e0..23dacf157e6ea85064d4b69a1718c1ddcea1470e 100644
--- a/test/mjsunit/function-bind.js
+++ b/test/mjsunit/function-bind.js
@@ -268,14 +268,18 @@ assertEquals([true, 0, undefined], s());
// Check that property descriptors are correct (unconfigurable, unenumerable,
// and both get and set is the ThrowTypeError function).
-var cdesc = Object.getOwnPropertyDescriptor(f, "caller");
-var adesc = Object.getOwnPropertyDescriptor(f, "arguments");
+//
+// Poisoned accessors are no longer own properties --- get them from the
+// prototype
+var f_proto = Object.getPrototypeOf(f);
+var cdesc = Object.getOwnPropertyDescriptor(f_proto, "caller");
+var adesc = Object.getOwnPropertyDescriptor(f_proto, "arguments");
assertFalse(cdesc.enumerable);
-assertFalse(cdesc.configurable);
+assertTrue(cdesc.configurable);
assertFalse(adesc.enumerable);
-assertFalse(adesc.configurable);
+assertTrue(adesc.configurable);
assertSame(cdesc.get, cdesc.set);
assertSame(cdesc.get, adesc.get);
« no previous file with comments | « test/mjsunit/es6/generators-runtime.js ('k') | test/mjsunit/harmony/arrow-functions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698