Closed
Bug 884407
Opened 11 years ago
Closed 11 years ago
Update SpeechRecognitionError to use enum
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: smaug, Unassigned)
References
Details
Attachments
(2 files, 1 obsolete file)
19.73 KB,
patch
|
ggp
:
review+
|
Details | Diff | Splinter Review |
1.26 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Comment 1•11 years ago
|
||
This patch creates an enum for the error codes for SpeechRecognitionError. It also removes nsIDOMSpeechRecognitionError, since that turned out to be possible (but let me know if you'd actually like to keep it), and updates the tests accordingly.
Attachment #766141 -
Flags: review?(bugs)
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 766141 [details] [diff] [review]
Bug 884407 - Use an enum in SpeechRecognitionError
>+DOMCI_DATA(SpeechRecognitionError, mozilla::dom::SpeechRecognitionError)
No need for DOMCI_DATA
>+namespace mozilla {
>+namespace dom {
>+
>+SpeechRecognitionError::SpeechRecognitionError(mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext, nsEvent* aEvent)
>+: nsDOMEvent(aOwner, aPresContext, aEvent),
>+ mError(),
>+ mMessage()
There shouldn't be need for mMessage().
(codegen may create such).
>+{
>+ SetIsDOMBinding();
No need for this anymore. These days all the events use DOM bindings, so
SetIsBOMBinding() is called in the nsDOMEvent ctor.
>+ nsresult
>+ InitSpeechRecognitionError(const nsAString& aType,
>+ bool aCanBubble,
>+ bool aCancelable,
>+ SpeechRecognitionErrorCode aError,
>+ const nsAString& aMessage);
So if we don't have .idl, why do we need this version?
Wouldn't the one with ErrorResult be enough?
Attachment #766141 -
Flags: review?(bugs) → review+
Comment 3•11 years ago
|
||
Refreshing the patch after addressing review comments. Keeping r+ from smaug.
Attachment #766141 -
Attachment is obsolete: true
Attachment #766918 -
Flags: review+
Comment 4•11 years ago
|
||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
It seems this breaks compilation with --disable-webspeech ... Can you please fix it?
Comment 8•11 years ago
|
||
Sorry about that. This patch should fix it.
Attachment #768102 -
Flags: review?(bugs)
Reporter | ||
Comment 9•11 years ago
|
||
Comment on attachment 768102 [details] [diff] [review]
Only build SpeechRecognitionError when MOZ_WEBSPEECH is enabled
I guess that works (I'm not familiar with the syntax moz.build uses)
Attachment #768102 -
Flags: review?(bugs) → review+
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
Keywords: checkin-needed
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
Seems to work, thanks.
Assignee | ||
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
•