Bug 1498320 - Remove obsolete "|options.utf8| must be set" comments from UTF-8 compilation function docs. r=tcampbell
authorJeff Walden <jwalden@mit.edu>
Thu, 01 Nov 2018 17:34:53 -0700
changeset 445968 958a348c9ee087971c06c74db8cf18de5d3578fe
parent 445967 cbe3c9df4f9c62a27e3c91751846d17a2c4265be
child 445969 15d7f3fb96d5337164049be2fbd49bac97a04f8a
push id35030
push usercsabou@mozilla.com
push dateTue, 13 Nov 2018 04:24:01 +0000
treeherdermozilla-central@f6df375b8698 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1498320
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1498320 - Remove obsolete "|options.utf8| must be set" comments from UTF-8 compilation function docs. r=tcampbell
js/public/CompilationAndEvaluation.h
--- a/js/public/CompilationAndEvaluation.h
+++ b/js/public/CompilationAndEvaluation.h
@@ -117,114 +117,89 @@ Evaluate(JSContext* cx, const ReadOnlyCo
 extern JS_PUBLIC_API(bool)
 Evaluate(JSContext* cx, AutoVector<JSObject*>& envChain, const ReadOnlyCompileOptions& options,
          SourceBufferHolder& srcBuf, MutableHandle<Value> rval);
 
 /**
  * Evaluate the provided UTF-8 data in the scope of the current global of |cx|,
  * and return the completion value in |rval|.  If the data contains invalid
  * UTF-8, an error is reported.
- *
- * The |options.utf8| flag is asserted to be true.  At a future time this flag
- * will be removed and UTF-8-ness of source bytes will be entirely determined
- * by which compilation function is called.
  */
 extern JS_PUBLIC_API(bool)
 EvaluateUtf8(JSContext* cx, const ReadOnlyCompileOptions& options,
              const char* bytes, size_t length, MutableHandle<Value> rval);
 
 /**
  * Evaluate the provided Latin-1 data (i.e. each byte directly corresponds to
  * the same Unicode code point) in the scope of the current global of |cx|, and
  * return the completion value in |rval|.
  *
- * The |options.utf8| flag is asserted to be false.  At a future time this flag
- * will be removed and UTF-8-ness of source bytes will be entirely determined
- * by which compilation function is called.
- *
  * This function may eventually be removed, such that *only* bytes containing
  * UTF-8 source text may be directly compiled.  Avoid using it if you can.
  */
 extern JS_PUBLIC_API(bool)
 EvaluateLatin1(JSContext* cx, const ReadOnlyCompileOptions& options,
                const char* bytes, size_t length, MutableHandle<Value> rval);
 
 /**
  * Evaluate the UTF-8 contents of the file at the given path, and return the
  * completion value in |rval|.  (The path itself is in the system encoding, not
  * [necessarily] UTF-8.)  If the contents contain any malformed UTF-8, an error
  * is reported.
- *
- * The |options.utf8| flag is asserted to be true.  At a future time this flag
- * will be removed.
  */
 extern JS_PUBLIC_API(bool)
 EvaluateUtf8Path(JSContext* cx, const ReadOnlyCompileOptions& options,
                  const char* filename, MutableHandle<Value> rval);
 
 /**
  * |script| will always be set. On failure, it will be set to nullptr.
  */
 extern JS_PUBLIC_API(bool)
 Compile(JSContext* cx, const ReadOnlyCompileOptions& options,
         SourceBufferHolder& srcBuf, MutableHandle<JSScript*> script);
 
 /**
  * Compile the provided UTF-8 data into a script.  If the data contains invalid
  * UTF-8, an error is reported.
  *
- * The |options.utf8| flag is asserted to be true.  At a future time this flag
- * will be removed and UTF-8-ness of source bytes will be entirely determined
- * by which compilation function is called.
- *
  * |script| is always set to the compiled script or to null in case of error.
  */
 extern JS_PUBLIC_API(bool)
 CompileUtf8(JSContext* cx, const ReadOnlyCompileOptions& options,
             const char* bytes, size_t length, MutableHandle<JSScript*> script);
 
 /**
  * Compile the provided Latin-1 data (i.e. each byte directly corresponds to
  * the same Unicode code point) into a script.
  *
- * The |options.utf8| flag is asserted to be false.  At a future time this flag
- * will be removed and UTF-8-ness of source bytes will be entirely determined
- * by which compilation function is called.
- *
  * This function may eventually be removed, such that *only* bytes containing
  * UTF-8 source text may be directly compiled.  Avoid using it if you can.
  *
  * |script| is always set to the compiled script or to null in case of error.
  */
 extern JS_PUBLIC_API(bool)
 CompileLatin1(JSContext* cx, const ReadOnlyCompileOptions& options,
               const char* bytes, size_t length, MutableHandle<JSScript*> script);
 
 /**
  * Compile the UTF-8 contents of the given file into a script.  If the contents
  * contain any malformed UTF-8, an error is reported.
  *
  * |script| is always set to the compiled script or to null in case of error.
- *
- * The |options.utf8| flag is asserted to be true.  At a future time this flag
- * will be removed.
  */
 extern JS_PUBLIC_API(bool)
 CompileUtf8File(JSContext* cx, const ReadOnlyCompileOptions& options,
                 FILE* file, MutableHandle<JSScript*> script);
 
 /**
  * Compile the UTF-8 contents of the file at the given path into a script.
  * (The path itself is in the system encoding, not [necessarily] UTF-8.)  If
  * the contents contain any malformed UTF-8, an error is reported.
  *
  * |script| is always set to the compiled script or to null in case of error.
- *
- * The |options.utf8| flag is asserted to be true.  At a future time this flag
- * will be removed.
  */
 extern JS_PUBLIC_API(bool)
 CompileUtf8Path(JSContext* cx, const ReadOnlyCompileOptions& options,
                 const char* filename, MutableHandle<JSScript*> script);
 
 extern JS_PUBLIC_API(bool)
 CompileForNonSyntacticScope(JSContext* cx, const ReadOnlyCompileOptions& options,
                             SourceBufferHolder& srcBuf, MutableHandle<JSScript*> script);