Closed
Bug 1306540
Opened 8 years ago
Closed 8 years ago
Convert FindEnumStringIndex to JSAPI signature convention.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: arai, Assigned: Waldo)
References
Details
Attachments
(1 file)
3.33 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from bug 1289050 comment #43)
> > template<bool InvalidValueFatal>
> > inline int
> > FindEnumStringIndex(JSContext* cx, JS::Handle<JS::Value> v, const EnumEntry* values,
> > const char* type, const char* sourceDescription, bool* ok)
>
> It would be good to file a followup bug to convert this to the JSAPI
> signature convention of returning false on failure, filling the index in an
> outparam. This is in a bunch of JSAPI-using code, and the oddball
> convention makes the code harder to read -- plus you have oddities like
> being forced to set an outparam *and* return a value that should never be
> examined (like |return 0| when ToString fails is a perfectly reasonable
> return value, but you have to know the caller will never look at it because
> of the |*ok = false;| to know it's fine).
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Assignee | ||
Updated•8 years ago
|
Component: JavaScript Engine → DOM
Assignee | ||
Updated•8 years ago
|
Attachment #8796427 -
Attachment description: Unbuilt patch → Patch
Attachment #8796427 -
Flags: review?(peterv)
Comment 2•8 years ago
|
||
Comment on attachment 8796427 [details] [diff] [review]
Patch
r=me
Attachment #8796427 -
Flags: review?(peterv) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/83fd09630531
FindEnumStringIndex should follow JSAPI interface conventions. r=bz
Comment 4•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•