Status: New
Owner: ----
New issue 3048 by [email protected]: Array.prototype methods applied to
TypedArray instances should throw errors
http://code.google.com/p/v8/issues/detail?id=3048
Based on the current ES6 draft spec, when applying Array.prototype methods
to typed array instances, any attempt to delete indexed properties or
change the length should throw. Reasoning: Array.prototype methods pass
true for the throw flag when making any modifications, and for TypedArray
instances, indexed properties are non-configurable and length is an
accessor with an undefined setter.
I believe all of the following should throw:
(function() { "use strict"; var arr = new Int16Array(2); arr.length = 5
})();
var arr = new Int16Array(0);
Array.prototype.pop.apply(arr);
var arr = new Int16Array(1);
Array.prototype.pop.apply(arr);
V8's behavior could be in part because it does not throw in this
non-TypedArray case as well:
var obj = { get length() { return 0 }};
return Array.prototype.pop.call(obj);
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.