Bug 1497388 clarify documentation of out-parameter values for wrappers and proxies r=jwalden
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 10 Oct 2018 17:49:50 +0000
changeset 499062 300a08d9762e3efcfdedb292d540420ba9c9083f
parent 499061 70505741627fe29e79facb7fab0e3297320f0421
child 499063 6af35f6a050fb97ce23ecde1a937e0c81e8e4c02
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1497388
milestone64.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 1497388 clarify documentation of out-parameter values for wrappers and proxies r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D8049
js/src/jsapi.h
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -2736,31 +2736,31 @@ extern JS_PUBLIC_API(bool)
 JS_GetArrayLength(JSContext* cx, JS::Handle<JSObject*> obj, uint32_t* lengthp);
 
 extern JS_PUBLIC_API(bool)
 JS_SetArrayLength(JSContext* cx, JS::Handle<JSObject*> obj, uint32_t length);
 
 namespace JS {
 
 /**
- * Returns true and sets |*isMap| indicating whether |obj| is an Map object
- * or a wrapper around one, otherwise returns false on failure.
+ * On success, returns true, setting |*isMap| to true if |obj| is a Map object
+ * or a wrapper around one, or to false if not.  Returns false on failure.
  *
- * This method returns true with |*isMap == false| when passed a proxy whose
- * target is an Map, or when passed a revoked proxy.
+ * This method returns true with |*isMap == false| when passed an ES6 proxy
+ * whose target is a Map, or when passed a revoked proxy.
  */
 extern JS_PUBLIC_API(bool)
 IsMapObject(JSContext* cx, JS::HandleObject obj, bool* isMap);
 
 /**
- * Returns true and sets |*isSet| indicating whether |obj| is an Set object
- * or a wrapper around one, otherwise returns false on failure.
+ * On success, returns true, setting |*isSet| to true if |obj| is a Set object
+ * or a wrapper around one, or to false if not.  Returns false on failure.
  *
- * This method returns true with |*isSet == false| when passed a proxy whose
- * target is an Set, or when passed a revoked proxy.
+ * This method returns true with |*isSet == false| when passed an ES6 proxy
+ * whose target is a Set, or when passed a revoked proxy.
  */
 extern JS_PUBLIC_API(bool)
 IsSetObject(JSContext* cx, JS::HandleObject obj, bool* isSet);
 
 } /* namespace JS */
 
 /**
  * Assign 'undefined' to all of the object's non-reserved slots. Note: this is
@@ -4278,21 +4278,22 @@ SetForEach(JSContext *cx, HandleObject o
 /*
  * Dates.
  */
 
 extern JS_PUBLIC_API(JSObject*)
 JS_NewDateObject(JSContext* cx, int year, int mon, int mday, int hour, int min, int sec);
 
 /**
- * Returns true and sets |*isDate| indicating whether |obj| is a Date object or
- * a wrapper around one, otherwise returns false on failure.
+ * On success, returns true, setting |*isDate| to true if |obj| is a Date
+ * object or a wrapper around one, or to false if not.  Returns false on
+ * failure.
  *
- * This method returns true with |*isDate == false| when passed a proxy whose
- * target is a Date, or when passed a revoked proxy.
+ * This method returns true with |*isDate == false| when passed an ES6 proxy
+ * whose target is a Date, or when passed a revoked proxy.
  */
 extern JS_PUBLIC_API(bool)
 JS_ObjectIsDate(JSContext* cx, JS::HandleObject obj, bool* isDate);
 
 /************************************************************************/
 
 /*
  * Regular Expressions.
@@ -4322,21 +4323,22 @@ JS_ExecuteRegExp(JSContext* cx, JS::Hand
 
 /* RegExp interface for clients without a global object. */
 
 extern JS_PUBLIC_API(bool)
 JS_ExecuteRegExpNoStatics(JSContext* cx, JS::HandleObject reobj, char16_t* chars, size_t length,
                           size_t* indexp, bool test, JS::MutableHandleValue rval);
 
 /**
- * Returns true and sets |*isRegExp| indicating whether |obj| is a RegExp
- * object or a wrapper around one, otherwise returns false on failure.
+ * On success, returns true, setting |*isRegExp| to true if |obj| is a RegExp
+ * object or a wrapper around one, or to false if not.  Returns false on
+ * failure.
  *
- * This method returns true with |*isRegExp == false| when passed a proxy whose
- * target is a RegExp, or when passed a revoked proxy.
+ * This method returns true with |*isRegExp == false| when passed an ES6 proxy
+ * whose target is a RegExp, or when passed a revoked proxy.
  */
 extern JS_PUBLIC_API(bool)
 JS_ObjectIsRegExp(JSContext* cx, JS::HandleObject obj, bool* isRegExp);
 
 extern JS_PUBLIC_API(unsigned)
 JS_GetRegExpFlags(JSContext* cx, JS::HandleObject obj);
 
 extern JS_PUBLIC_API(JSString*)