Bug 537873: Use the standard JS_PropertyStub for setters of typed arrays' read-only properties, not a Jsvalification of the getters. r=brendan
authorJim Blandy <jimb@mozilla.com>
Wed, 09 Feb 2011 11:31:39 -0800
changeset 62394 5625f3beded999f92fbbc1fa0fe60574432df4f0
parent 62393 26c98c344fab9f49954cadb0cfdeef262bf24478
child 62395 4b56bfdf61a79a0f0fd896aa7970c48f40195363
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbrendan
bugs537873
milestone2.0b12pre
Bug 537873: Use the standard JS_PropertyStub for setters of typed arrays' read-only properties, not a Jsvalification of the getters. r=brendan This makes the patch to give getters and setters distinct types a little easier to read.
js/src/jstypedarray.cpp
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -1449,37 +1449,37 @@ Class ArrayBuffer::jsclass = {
     ResolveStub,
     ConvertStub,
     ArrayBuffer::class_finalize,
 };
 
 JSPropertySpec ArrayBuffer::jsprops[] = {
     { "byteLength",
       -1, JSPROP_SHARED | JSPROP_PERMANENT | JSPROP_READONLY,
-      Jsvalify(ArrayBuffer::prop_getByteLength), Jsvalify(ArrayBuffer::prop_getByteLength) },
+      Jsvalify(ArrayBuffer::prop_getByteLength), JS_PropertyStub },
     {0,0,0,0,0}
 };
 
 /*
  * shared TypedArray
  */
 
 JSPropertySpec TypedArray::jsprops[] = {
     { js_length_str,
       -1, JSPROP_SHARED | JSPROP_PERMANENT | JSPROP_READONLY,
-      Jsvalify(TypedArray::prop_getLength), Jsvalify(TypedArray::prop_getLength) },
+      Jsvalify(TypedArray::prop_getLength), JS_PropertyStub },
     { "byteLength",
       -1, JSPROP_SHARED | JSPROP_PERMANENT | JSPROP_READONLY,
-      Jsvalify(TypedArray::prop_getByteLength), Jsvalify(TypedArray::prop_getByteLength) },
+      Jsvalify(TypedArray::prop_getByteLength), JS_PropertyStub },
     { "byteOffset",
       -1, JSPROP_SHARED | JSPROP_PERMANENT | JSPROP_READONLY,
-      Jsvalify(TypedArray::prop_getByteOffset), Jsvalify(TypedArray::prop_getByteOffset) },
+      Jsvalify(TypedArray::prop_getByteOffset), JS_PropertyStub },
     { "buffer",
       -1, JSPROP_SHARED | JSPROP_PERMANENT | JSPROP_READONLY,
-      Jsvalify(TypedArray::prop_getBuffer), Jsvalify(TypedArray::prop_getBuffer) },
+      Jsvalify(TypedArray::prop_getBuffer), JS_PropertyStub },
     {0,0,0,0,0}
 };
 
 /*
  * TypedArray boilerplate
  */
 
 #define IMPL_TYPED_ARRAY_STATICS(_typedArray)                                  \