Chromium Code Reviews| Index: Source/core/speech/SpeechInputResult.h |
| diff --git a/Source/core/speech/SpeechInputResult.h b/Source/core/speech/SpeechInputResult.h |
| index 5a5d44da7bdf6c3f42337ce6a7cc352fe1e6f107..401cec7888f299cb80dae9edb693d80fe8ce4aa8 100644 |
| --- a/Source/core/speech/SpeechInputResult.h |
| +++ b/Source/core/speech/SpeechInputResult.h |
| @@ -29,6 +29,7 @@ |
| #if ENABLE(INPUT_SPEECH) |
| #include "bindings/v8/ScriptWrappable.h" |
| +#include "heap/Handle.h" |
| #include "wtf/PassRefPtr.h" |
| #include "wtf/RefCounted.h" |
| #include "wtf/text/WTFString.h" |
| @@ -37,14 +38,17 @@ namespace WebCore { |
| // This class holds one speech recognition result including the text and other related |
| // fields, as received from the embedder. |
| -class SpeechInputResult : public RefCounted<SpeechInputResult>, public ScriptWrappable { |
| +class SpeechInputResult : public RefCountedWillBeGarbageCollectedFinalized<SpeechInputResult>, public ScriptWrappable { |
| + DECLARE_GC_INFO; |
| public: |
| - static PassRefPtr<SpeechInputResult> create(const SpeechInputResult& source); |
| - static PassRefPtr<SpeechInputResult> create(const String& utterance, double confidence); |
| + static PassRefPtrWillBeRawPtr<SpeechInputResult> create(const RawPtr<SpeechInputResult>& source); |
|
tkent
2014/02/19 23:49:46
Why do you change the argument type?
sof
2014/02/20 06:48:01
Passing in a GCed object by reference looked unsaf
|
| + static PassRefPtrWillBeRawPtr<SpeechInputResult> create(const String& utterance, double confidence); |
| double confidence() const; |
| const String& utterance() const; |
| + void trace(Visitor *) { } |
| + |
| private: |
| SpeechInputResult(const String& utterance, double confidence); |
| @@ -52,7 +56,7 @@ private: |
| double m_confidence; |
| }; |
| -typedef Vector<RefPtr<SpeechInputResult> > SpeechInputResultArray; |
| +typedef WillBeHeapVector<RefPtrWillBeMember<SpeechInputResult> > SpeechInputResultArray; |
| } // namespace WebCore |