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)

defect
Not set
normal

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.
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.
The signatures look good to me now.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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.