Chromium Code Reviews| Index: Source/modules/speech/SpeechRecognition.cpp |
| diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp |
| index 9309fe571c22f61a05c5ec9b5e46297064540470..2cde2e584b66a005ce987310674ae2eb6f0fe783 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(ParsedURLString, m_serviceURI); |
| + // Throw an error if serviceuri is not empty and url is invalid. |
|
jochen (gone - plz use gerrit)
2015/05/06 13:03:58
nit. that comment doesn't add value, just omit it
kirtia
2015/05/06 14:57:13
Done.
|
| + if (!m_serviceURI.isEmpty() && !url.isValid()) { |
| + exceptionState.throwDOMException(SyntaxError, "serviceURI is neither empty nor a valid URL."); |
|
jochen (gone - plz use gerrit)
2015/05/06 13:03:58
i just double-checked the spec, and it doesn't def
kirtia
2015/06/02 20:56:57
Ack. It has been decided that we ignore malformed
|
| + 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; |
| } |