| Index: Source/modules/speech/SpeechRecognition.cpp
|
| diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
|
| index 9309fe571c22f61a05c5ec9b5e46297064540470..c8252601054ff4477eaa633dff7b89b283a7aede 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,14 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
|
| return;
|
| }
|
|
|
| + KURL url(ParsedURLString, m_serviceURI);
|
| + if (!m_serviceURI.isEmpty() && !url.isValid()) {
|
| + exceptionState.throwDOMException(SyntaxError, "serviceURI is neither empty nor a valid URL.");
|
| + return;
|
| + }
|
| +
|
| m_finalResults.clear();
|
| - m_controller->start(this, m_grammars, m_lang, m_serviceURI, 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;
|
| }
|
|
|
|
|