[webkit-reviews] review granted: [Bug 80424] Speech JavaScript API: SpeechRecognitionAlternative, Result and ResultList : [Attachment 130633] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 7 10:32:46 PST 2012


Adam Barth <abarth at webkit.org> has granted Hans Wennborg <hans at chromium.org>'s
request for review:
Bug 80424: Speech JavaScript API: SpeechRecognitionAlternative, Result and
ResultList
https://bugs.webkit.org/show_bug.cgi?id=80424

Attachment 130633: Patch
https://bugs.webkit.org/attachment.cgi?id=130633&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=130633&action=review


> Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:42
> +    String transcript() { return m_transcript; }

String transcript() -> const String& transcript() const

> Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:43
> +    double confidence() { return m_confidence; }

double confidence() -> double confidence() const

> Source/WebCore/Modules/speech/SpeechRecognitionResult.h:42
> +    PassRefPtr<SpeechRecognitionAlternative> item(unsigned long index);

Why a PassRefPtr ?  We're not transferring ownership.  This should return a
SpeechRecognitionAlternative*.	Please see
http://www.webkit.org/coding/RefPtr.html for more information about RefPtr and
friends.

> Source/WebCore/Modules/speech/SpeechRecognitionResult.idl:31
> +	   getter SpeechRecognitionAlternative item(in unsigned long index);

As I mentioned in the other patch, we don't support the "getter" syntax (yet!).
 Instead you should use https://trac.webkit.org/wiki/WebKitIDL#IndexedGetter

> Source/WebCore/Modules/speech/SpeechRecognitionResultList.h:42
> +    PassRefPtr<SpeechRecognitionResult> item(unsigned long index);

Same issue here.  This should be a SpeechRecognitionResult*

> Source/WebCore/Modules/speech/SpeechRecognitionResultList.idl:31
> +	   getter SpeechRecognitionResult item(in unsigned long index);

Same issue with "getter"


More information about the webkit-reviews mailing list