Fix a few typos in comments in js/src. No bug, no_r=me.
authorJason Orendorff <>
Fri, 20 Jan 2012 06:11:42 -0600
changeset 86217 bd3c52671d7455ce4bb88b5b618e649407da057a
parent 86216 11ba93db719a7e3ee2b61fb1036bcbde2545e78c
child 86218 6a5e20a0f7419f896f82f19d3665f75b7334ed08
push id805
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Fix a few typos in comments in js/src. No bug, no_r=me.
--- a/js/src/ds/Sort.h
+++ b/js/src/ds/Sort.h
@@ -100,17 +100,17 @@ MergeArrayRuns(T *dst, const T *src, siz
  * Sort the array using the merge sort algorithm. The scratch should point to
  * a temporary storage that can hold nelems elements.
  * The comparator must provide the () operator with the following signature:
  *     bool operator()(const T& a, const T& a, bool *lessOrEqualp);
- * It should return true on success and sets lessOrEqualp to the result of
+ * It should return true on success and set *lessOrEqualp to the result of
  * a <= b operation. If it returns false, the sort terminates immediately with
  * the false result. In this case the content of the array and scratch is
  * arbitrary.
 template<typename T, typename Comparator>
 MergeSort(T *array, size_t nelems, T *scratch, Comparator c)
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -54,17 +54,17 @@
  *  - The array's initialized length, accessible with
  *    getDenseArrayInitializedLength().
  * In dense mode, holes in the array are represented by
  * MagicValue(JS_ARRAY_HOLE) invalid values.
  * NB: the capacity and length of a dense array are entirely unrelated!  The
  * length may be greater than, less than, or equal to the capacity. The first
- * case may occur when the user writes "new Array(100), in which case the
+ * case may occur when the user writes "new Array(100)", in which case the
  * length is 100 while the capacity remains 0 (indices below length and above
  * capacity must be treated as holes). See array_length_setter for another
  * explanation of how the first case may occur.
  * The initialized length of a dense array specifies the number of elements
  * that have been initialized. All elements above the initialized length are
  * holes in the array, and the memory for all elements between the initialized
  * length and capacity is left uninitialized. When type inference is disabled,
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -365,17 +365,17 @@ PodEqual(T *one, T *two, size_t len)
 JS_ALWAYS_INLINE static size_t
 UnsignedPtrDiff(const void *bigger, const void *smaller)
     return size_t(bigger) - size_t(smaller);
- * Ordinarily, a function taking a JSContext* 'cx' paremter reports errors on
+ * Ordinarily, a function taking a JSContext* 'cx' parameter reports errors on
  * the context. In some cases, functions optionally report and indicate this by
  * taking a nullable 'maybecx' parameter. In some cases, though, a function
  * always needs a 'cx', but optionally reports. This option is presented by the
  * MaybeReportError.
 enum MaybeReportError { REPORT_ERROR = true, DONT_REPORT_ERROR = false };
 }  /* namespace js */