Open Bug 1254674 Opened 9 years ago Updated 2 years ago

Calling speak() on an empty utterance should not raise an error.

Categories

(Core :: Web Speech, defect)

All
macOS
defect

Tracking

()

People

(Reporter: eeejay, Unassigned)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

This seems to be an issue specifically on osx. I think that is not good. If anything, because of fingerprinting.
Whiteboard: [good first bug]
Assignee: nobody → m_kato
OSX's NSSpeechSynthesizer throws error when text is empty. So we dispatch start and end event manually when text is empty. Review commit: https://reviewboard.mozilla.org/r/43443/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/43443/
Attachment #8736600 - Flags: review?(eitan)
Attachment #8736600 - Flags: review?(eitan)
Comment on attachment 8736600 [details] MozReview Request: Bug 1254674 - Calling speak() on an empty utterance should not raise an error. r?eeejay https://reviewboard.mozilla.org/r/43443/#review40405 ::: dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm:376 (Diff revision 1) > > + if (aText.IsEmpty()) { > + // NSSpeechSynthesizer throws error when text is empty. > + // If so, we dispatch start and end event instead of error > + aTask->DispatchStart(); > + aTask->DispatchEnd(0, 0); These methods are expected to be called asynchronously. Otherwise lockups and bad states happen. Here are some examples: https://dxr.mozilla.org/mozilla-central/source/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp#519 https://dxr.mozilla.org/mozilla-central/source/dom/media/webspeech/synth/test/nsFakeSynthServices.cpp#279
Keywords: good-first-bug
Whiteboard: [good first bug]

This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: m_kato → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: