summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorErik Arvidsson <arv@chromium.org>2015-04-08 15:15:07 -0400
committerErik Arvidsson <arv@chromium.org>2015-04-08 19:17:54 +0000
commita5a386a2d335e09f80a4572f70001f4ecd4f0103 (patch)
tree43f643a0f65b3d10b3576c105ff0ad27327c9c9b /chrome/test
parente6e6b4f89e109b2a53f6508f8b0dd9cbafa6521b (diff)
downloadchromium_src-a5a386a2d335e09f80a4572f70001f4ecd4f0103.zip
chromium_src-a5a386a2d335e09f80a4572f70001f4ecd4f0103.tar.gz
chromium_src-a5a386a2d335e09f80a4572f70001f4ecd4f0103.tar.bz2
Do not poison %FunctionPrototype%'s restricted properties
In ES6, these properties of the intrinsic %FunctionPrototype% are poisoned during CreateIntrinsics() / AddRestrictedFunctionProperties(). It's unnecessary to poison them again, and testing whether they are a function or not causes tests to fail. BUG=v8:3982 R=arv@chromium.org Review URL: https://codereview.chromium.org/1067223002 Cr-Commit-Position: refs/heads/master@{#324265}
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js b/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
index fb46498..fae9c57 100644
--- a/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
+++ b/chrome/test/data/extensions/api_test/messaging/externally_connectable/sites/assertions.js
@@ -29,11 +29,15 @@ function clobber(obj, name, qualifiedName) {
// SafeBuiltins does not support getters yet. See crbug.com/463526.
// Clobbering Function.call would make it impossible to implement these tests.
// Clobbering Object.valueOf breaks v8.
+ // Clobbering %FunctionPrototype%.caller and .arguments will break because
+ // these properties are poisoned accessors in ES6.
if (name == 'constructor' ||
name == 'toString' ||
name == '__proto__' ||
name == 'name' && typeof obj == 'function' ||
qualifiedName == 'Function.call' ||
+ (obj !== Function && qualifiedName == 'Function.caller') ||
+ (obj !== Function && qualifiedName == 'Function.arguments') ||
qualifiedName == 'Object.valueOf') {
return;
}