Closed
Bug 1612007
Opened 5 years ago
Closed 5 years ago
Add convenient methods for throwing DOMExceptions on ErrorResult
Categories
(Core :: DOM: Bindings (WebIDL), enhancement, P2)
Core
DOM: Bindings (WebIDL)
Tracking
()
RESOLVED
FIXED
mozilla74
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Things like ThrowSyntaxError
, etc. Nika suggested this today.
In the new setup you can do: aRv.ThrowSyntaxError("you typed it wrong")
.
We can convert existing ThrowDOMException uses to these, then make ThrowDOMException private...
Assignee | ||
Comment 1•5 years ago
|
||
Note that we are getting pretty close to just being able to create our DOMExceptions without an nsresult at all. Once everyone is switched to the new accessors, might be worth doing that, perhaps.
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
And fwiw, we only have ~100 ThrowDOMException callsites, and can convert them to this new thing pretty easily...
Assignee | ||
Comment 4•5 years ago
|
||
Note that we are getting pretty close to just being able to create our DOMExceptions without an nsresult at all.
Though that might be slower, because then it will look up the nsresult by name....
Updated•5 years ago
|
Attachment #9123407 -
Attachment description: Bug 1612007. Add convenience methods for throwing varioys spec-defined DOMExceptions on ErrorResult. r=smaug → Bug 1612007. Add convenience methods for throwing various spec-defined DOMExceptions on ErrorResult. r=smaug
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/70615b052db5
Add convenience methods for throwing various spec-defined DOMExceptions on ErrorResult. r=smaug
Comment 6•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox74:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Updated•4 years ago
|
Type: defect → enhancement
You need to log in
before you can comment on or make changes to this bug.
Description
•