Closed
Bug 504474
Opened 15 years ago
Closed 15 years ago
JS_ValueToBoolean is void
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
(deleted),
patch
|
brendan
:
review+
jorendorff
:
review+
|
Details | Diff | Splinter Review |
according to brendan JS_ValueToBoolean will never return JS_FALSE, so we can stop pretending it will. This will make Coverity happy since we're slightly inconsistent at this point.
Attachment #388844 -
Flags: review?(brendan)
Comment 2•15 years ago
|
||
The API could be changed too, but at some cost to embedders. Probably better to focus on new C++ API. /be
Comment 3•15 years ago
|
||
In any new API that was infallible, the cx param would go, since its presence implies fallibility -- it is used only to CHECK_REQUEST(cx) in the current API wrapper impl. Could have new API in jsapi.h, but opt-in by name or ifdef. Worth it? Comments welcome. /be
Updated•15 years ago
|
Attachment #388844 -
Flags: review?(jorendorff)
Attachment #388844 -
Flags: review?(brendan)
Attachment #388844 -
Flags: review+
Comment 4•15 years ago
|
||
Comment on attachment 388844 [details] [diff] [review] stop checking the return value Just noticed the quickstub generation code uses PRBool to declare the out param, which works because JSBool is PRBool is int, but JSBool is better. Looking mainly for jorendorff's blessing since I am weak reviewer for the quickstubs code, at best. /be
Updated•15 years ago
|
Attachment #388844 -
Flags: review?(jorendorff) → review+
http://hg.mozilla.org/mozilla-central/rev/2956e5255fc9
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•