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

Unified Diff: src/typedarray.js

Issue 19562002: Add BYTES_PER_ELEMENT property to constructors of typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | test/mjsunit/harmony/typedarrays.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index a7421ae1c97823dc3f1a8fb9a705e273c69f02ed..601012d58ef07c15f446220f547605f5582b137e 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -180,6 +180,8 @@ function SetupTypedArray(arrayId, name, constructor, elementSize) {
%SetCode(constructor, fun);
%FunctionSetPrototype(constructor, new $Object());
+ %SetProperty(constructor, "BYTES_PER_ELEMENT", elementSize,
+ READ_ONLY | DONT_ENUM | DONT_DELETE);
%SetProperty(constructor.prototype,
"constructor", constructor, DONT_ENUM);
%SetProperty(constructor.prototype,
« no previous file with comments | « no previous file | test/mjsunit/harmony/typedarrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698