Bug 889146 (part 4) - Rename DataView as DataViewObject in comments, where appropriate. r=sfink.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 02 Jul 2013 12:48:35 -0700
changeset 137280 64cdd849567d6b8e691210d6d1d8196b5dd95a6d
parent 137279 13dd71c1b82270d3141f47c994b2a523be608da8
child 137281 909027ddcb436c6bc339bd2944476d7f6665c752
push id1824
push userryanvm@gmail.com
push dateWed, 03 Jul 2013 18:16:56 +0000
treeherderfx-team@dcbbfcdf7bb4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs889146
milestone25.0a1
Bug 889146 (part 4) - Rename DataView as DataViewObject in comments, where appropriate. r=sfink.
js/src/jstypedarray.cpp
js/src/jstypedarray.h
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -595,18 +595,18 @@ ArrayBufferObject::createDataViewForThis
      */
     JS_ASSERT(args.length() >= 2);
 
     Rooted<JSObject*> proto(cx, &args[args.length() - 1].toObject());
 
     Rooted<JSObject*> buffer(cx, &args.thisv().toObject());
 
     /*
-     * Pop off the passed-along prototype and delegate to normal DataView
-     * object construction.
+     * Pop off the passed-along prototype and delegate to normal DataViewObject
+     * construction.
      */
     CallArgs frobbedArgs = CallArgsFromVp(args.length() - 1, args.base());
     return DataViewObject::construct(cx, buffer, frobbedArgs, proto);
 }
 
 JSBool
 ArrayBufferObject::createDataViewForThis(JSContext *cx, unsigned argc, Value *vp)
 {
@@ -1334,17 +1334,17 @@ js::ClampDoubleToUint8(const double x)
          */
         return (y & ~1);
     }
 
     return y;
 }
 
 /*
- * This method is used to trace TypedArray and DataView objects. We need a
+ * This method is used to trace TypedArray and DataViewObjects. We need a
  * custom tracer because some of an ArrayBufferViewObject's reserved slots are
  * weak references, and some need to be updated specially during moving GCs.
  */
 static void
 TraceArrayBufferView(JSTracer *trc, JSObject *obj)
 {
     HeapSlot &bufSlot = obj->getReservedSlotRef(ArrayBufferViewObject::BUFFER_SLOT);
     MarkSlot(trc, &bufSlot, "typedarray.buffer");
@@ -3799,17 +3799,17 @@ DataViewObject::initClass(JSContext *cx)
         return NULL;
 
     if (!JS_DefineFunctions(cx, proto, DataViewObject::jsfuncs))
         return NULL;
 
     /*
      * Create a helper function to implement the craziness of
      * |new DataView(new otherWindow.ArrayBuffer())|, and install it in the
-     * global for use by the DataView constructor.
+     * global for use by the DataViewObject constructor.
      */
     RootedFunction fun(cx, NewFunction(cx, NullPtr(), ArrayBufferObject::createDataViewForThis,
                                        0, JSFunction::NATIVE_FUN, global, NullPtr()));
     if (!fun)
         return NULL;
 
     if (!DefineConstructorAndPrototype(cx, global, JSProto_DataView, ctor, proto))
         return NULL;
--- a/js/src/jstypedarray.h
+++ b/js/src/jstypedarray.h
@@ -34,19 +34,20 @@ typedef Vector<ArrayBufferObject *, 0, S
 //
 // Note that |TypedArrayTemplate| is just an implementation detail that makes
 // implementing its various subclasses easier.
 
 /*
  * ArrayBufferObject
  *
  * This class holds the underlying raw buffer that the various
- * ArrayBufferViewObject subclasses (DataView and the TypedArrays) access. It
- * can be created explicitly and passed to an ArrayBufferViewObject subclass,
- * or can be created implicitly by constructing a TypedArray with a size.
+ * ArrayBufferViewObject subclasses (DataViewObject and the TypedArrays)
+ * access. It can be created explicitly and passed to an ArrayBufferViewObject
+ * subclass, or can be created implicitly by constructing a TypedArray with a
+ * size.
  */
 class ArrayBufferObject : public JSObject
 {
     static bool byteLengthGetterImpl(JSContext *cx, CallArgs args);
     static bool fun_slice_impl(JSContext *cx, CallArgs args);
 
   public:
     static Class class_;