Closed
Bug 996831
Opened 10 years ago
Closed 10 years ago
Add a ToJSValue overload for nsresult
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: nsm, Assigned: bzbarsky)
Details
Attachments
(1 file)
6.51 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
This should return a DOMError or exception based on the error code. Useful for non-[Throws] Promises that should be rejected by errors.
![]() |
Assignee | |
Comment 1•10 years ago
|
||
Attachment #8407620 -
Flags: review?(bobbyholley)
![]() |
Assignee | |
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8407620 [details] [diff] [review] Add a ToJSValue overload for nsresult, to allow rejecting promises from C++ more easily. Review of attachment 8407620 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: dom/bindings/ToJSValue.h @@ +211,5 @@ > aValue.set(aArgument); > return MaybeWrapValue(aCx, aValue); > } > > +// Accept nsresult, for use in rejections Mention that this converts the result into an XPCOM exception object?
Attachment #8407620 -
Flags: review?(bobbyholley) → review+
![]() |
Assignee | |
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7acce569bd84 with the comment.
Flags: in-testsuite-
![]() |
Assignee | |
Comment 4•10 years ago
|
||
And https://hg.mozilla.org/integration/mozilla-inbound/rev/8f98a4c2257f to make gcc happy.
![]() |
Assignee | |
Comment 5•10 years ago
|
||
And b2g is _still_ unhappy, since nsresult is uint32_t over there, apparently, so those two signatures are not distinguishable. :(
Comment 6•10 years ago
|
||
Backed out for B2G bustage. https://hg.mozilla.org/integration/mozilla-inbound/rev/5b54654e26cd
![]() |
Assignee | |
Comment 7•10 years ago
|
||
I ifdefed out the uint32_t ToJSValue for now. https://hg.mozilla.org/integration/mozilla-inbound/rev/5d75982d37a5
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5d75982d37a5
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•