Closed
Bug 793918
Opened 12 years ago
Closed 12 years ago
Missing JSContext* parameter and wrong return mechanism in JSAPI functions
Categories
(Developer Documentation Graveyard :: General, defect)
Developer Documentation Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mozillabugs, Unassigned)
Details
The documentation for at least the following functions is missing the JSContext* parameter that the actual API in jsapi.h requires:
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_ConcatStrings
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_CompareStrings
The last page has additional problems: It shows the function as returning an integer with the result of the comparison, while in reality that integer is returned via a jsval* argument, and the function's return value is a JSBool.
Fixed:
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_ConcatStrings$revision/320641
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_CompareStrings$revision/320643
Please comment if changes are satisfactory.
Reporter | ||
Comment 2•12 years ago
|
||
Sorry, I was wrong about the jsval* argument - it's actually a int32_t*. The source to match here is really jsapi.h.
I feel quite stupid now :) I looked at the source and realised the int32_t, then came back and read this, and I'm used to JS_* functions taking jsvals as the last argument, so I went and put that.
Fixed now.
Reporter | ||
Comment 4•12 years ago
|
||
The signatures look good to me now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in
before you can comment on or make changes to this bug.
Description
•