mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1187791 - Part 1 of 1 - SpeechRecognition::maxAlternatives can't throw; so, rm webidl throws specifier. r=smaug
This commit is contained in:
parent
2d545a0f85
commit
c8b6f5100e
@ -54,8 +54,7 @@ public:
|
|||||||
SpeechRecognitionResultList* resultList =
|
SpeechRecognitionResultList* resultList =
|
||||||
new SpeechRecognitionResultList(mRecognition);
|
new SpeechRecognitionResultList(mRecognition);
|
||||||
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
||||||
ErrorResult rv;
|
if (0 < mRecognition->MaxAlternatives()) {
|
||||||
if (0 < mRecognition->GetMaxAlternatives(rv)) { // GetMaxAlternatives can't fail
|
|
||||||
SpeechRecognitionAlternative* alternative =
|
SpeechRecognitionAlternative* alternative =
|
||||||
new SpeechRecognitionAlternative(mRecognition);
|
new SpeechRecognitionAlternative(mRecognition);
|
||||||
|
|
||||||
@ -331,8 +330,7 @@ PocketSphinxSpeechRecognitionService::BuildMockResultList()
|
|||||||
SpeechRecognitionResultList* resultList =
|
SpeechRecognitionResultList* resultList =
|
||||||
new SpeechRecognitionResultList(mRecognition);
|
new SpeechRecognitionResultList(mRecognition);
|
||||||
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
||||||
ErrorResult rv;
|
if (0 < mRecognition->MaxAlternatives()) {
|
||||||
if (0 < mRecognition->GetMaxAlternatives(rv)) { // GetMaxAlternatives can't fail
|
|
||||||
SpeechRecognitionAlternative* alternative =
|
SpeechRecognitionAlternative* alternative =
|
||||||
new SpeechRecognitionAlternative(mRecognition);
|
new SpeechRecognitionAlternative(mRecognition);
|
||||||
|
|
||||||
|
@ -684,13 +684,13 @@ SpeechRecognition::SetInterimResults(bool aArg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
SpeechRecognition::GetMaxAlternatives(ErrorResult& aRv) const
|
SpeechRecognition::MaxAlternatives() const
|
||||||
{
|
{
|
||||||
return mMaxAlternatives;
|
return mMaxAlternatives;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SpeechRecognition::SetMaxAlternatives(uint32_t aArg, ErrorResult& aRv)
|
SpeechRecognition::SetMaxAlternatives(uint32_t aArg)
|
||||||
{
|
{
|
||||||
mMaxAlternatives = aArg;
|
mMaxAlternatives = aArg;
|
||||||
return;
|
return;
|
||||||
|
@ -87,9 +87,9 @@ public:
|
|||||||
|
|
||||||
void SetInterimResults(bool aArg);
|
void SetInterimResults(bool aArg);
|
||||||
|
|
||||||
uint32_t GetMaxAlternatives(ErrorResult& aRv) const;
|
uint32_t MaxAlternatives() const;
|
||||||
|
|
||||||
void SetMaxAlternatives(uint32_t aArg, ErrorResult& aRv);
|
void SetMaxAlternatives(uint32_t aArg);
|
||||||
|
|
||||||
void GetServiceURI(nsString& aRetVal, ErrorResult& aRv) const;
|
void GetServiceURI(nsString& aRetVal, ErrorResult& aRv) const;
|
||||||
|
|
||||||
|
@ -102,8 +102,7 @@ FakeSpeechRecognitionService::BuildMockResultList()
|
|||||||
{
|
{
|
||||||
SpeechRecognitionResultList* resultList = new SpeechRecognitionResultList(mRecognition);
|
SpeechRecognitionResultList* resultList = new SpeechRecognitionResultList(mRecognition);
|
||||||
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
SpeechRecognitionResult* result = new SpeechRecognitionResult(mRecognition);
|
||||||
ErrorResult rv;
|
if (0 < mRecognition->MaxAlternatives()) {
|
||||||
if (0 < mRecognition->GetMaxAlternatives(rv)) { // GetMaxAlternatives can't fail
|
|
||||||
SpeechRecognitionAlternative* alternative = new SpeechRecognitionAlternative(mRecognition);
|
SpeechRecognitionAlternative* alternative = new SpeechRecognitionAlternative(mRecognition);
|
||||||
|
|
||||||
alternative->mTranscript = NS_LITERAL_STRING("Mock final result");
|
alternative->mTranscript = NS_LITERAL_STRING("Mock final result");
|
||||||
|
@ -20,7 +20,6 @@ interface SpeechRecognition : EventTarget {
|
|||||||
[Throws]
|
[Throws]
|
||||||
attribute boolean continuous;
|
attribute boolean continuous;
|
||||||
attribute boolean interimResults;
|
attribute boolean interimResults;
|
||||||
[Throws]
|
|
||||||
attribute unsigned long maxAlternatives;
|
attribute unsigned long maxAlternatives;
|
||||||
[Throws]
|
[Throws]
|
||||||
attribute DOMString serviceURI;
|
attribute DOMString serviceURI;
|
||||||
|
Loading…
Reference in New Issue
Block a user