Reviewers: adamk,

Description:
Test that TypedArray properties cannot be set in strict mode

Properties like %TypedArray%.prototype.length have a getter and no
setter. This test verifies that property, which was apparently not
true in the past or had no test ensuring throwing in this case.

BUG=v8:3048
LOG=N
R=adamk

Please review this at https://codereview.chromium.org/1232843005/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+1, -0 lines):
  M test/mjsunit/es6/typedarray.js


Index: test/mjsunit/es6/typedarray.js
diff --git a/test/mjsunit/es6/typedarray.js b/test/mjsunit/es6/typedarray.js
index ef7955ce928bfd80deff04bea4ef71f2ad8395cc..f79255cdb30068163ee9ee253f1f2332456a3de5 100644
--- a/test/mjsunit/es6/typedarray.js
+++ b/test/mjsunit/es6/typedarray.js
@@ -417,6 +417,7 @@ var typedArrayConstructors = [

 function TestPropertyTypeChecks(constructor) {
   function CheckProperty(name) {
+ assertThrows(function() { 'use strict'; new constructor(10)[name] = 0; })
     var d = Object.getOwnPropertyDescriptor(constructor.prototype, name);
     var o = {};
     assertThrows(function() {d.get.call(o);}, TypeError);


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to