| Index: Source/modules/speech/SpeechRecognition.cpp
|
| diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
|
| index 051e89e1f1b27d94f3993734db7abebd0ae788d9..f36b6933dc71836ac90cb1924e01585b63f3f872 100644
|
| --- a/Source/modules/speech/SpeechRecognition.cpp
|
| +++ b/Source/modules/speech/SpeechRecognition.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "modules/speech/SpeechRecognitionController.h"
|
| #include "modules/speech/SpeechRecognitionError.h"
|
| #include "modules/speech/SpeechRecognitionEvent.h"
|
| +#include "platform/weborigin/KURL.h"
|
|
|
| namespace blink {
|
|
|
| @@ -58,8 +59,15 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
|
| return;
|
| }
|
|
|
| + KURL url(m_serviceURI);
|
| + // Throw an error if serviceuri is not empty and url is invalid.
|
| + if (!m_serviceURI.empty() && !url.isValid()) {
|
| + exceptionState.throwDOMException(ValidationError, "serviceuri is invalid");
|
| + return;
|
| + }
|
| +
|
| m_finalResults.clear();
|
| - m_controller->start(this, m_grammars, m_lang, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
|
| + m_controller->start(this, m_grammars, m_lang, url, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
|
| m_started = true;
|
| }
|
|
|
|
|