Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2278)

Unified Diff: Source/modules/speech/SpeechRecognitionResult.cpp

Issue 139803012: Move speech module over to Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make SpeechSynthesisVoice GC-finalized Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/speech/SpeechRecognitionResult.cpp
diff --git a/Source/modules/speech/SpeechRecognitionResult.cpp b/Source/modules/speech/SpeechRecognitionResult.cpp
index b4bfe7d71161fd13307bf4102f69d2e9c9a85d24..09c58590db27c29bda8a79d585789d7d46963d22 100644
--- a/Source/modules/speech/SpeechRecognitionResult.cpp
+++ b/Source/modules/speech/SpeechRecognitionResult.cpp
@@ -29,11 +29,13 @@
namespace WebCore {
+DEFINE_GC_INFO(SpeechRecognitionResult);
+
SpeechRecognitionResult::~SpeechRecognitionResult()
{
}
-PassRefPtr<SpeechRecognitionResult> SpeechRecognitionResult::create(const Vector<RefPtr<SpeechRecognitionAlternative> >& alternatives, bool final)
+PassRefPtr<SpeechRecognitionResult> SpeechRecognitionResult::create(const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionAlternative> >& alternatives, bool final)
{
return adoptRef(new SpeechRecognitionResult(alternatives, final));
}
@@ -46,11 +48,16 @@ SpeechRecognitionAlternative* SpeechRecognitionResult::item(unsigned long index)
return m_alternatives[index].get();
}
-SpeechRecognitionResult::SpeechRecognitionResult(const Vector<RefPtr<SpeechRecognitionAlternative> >& alternatives, bool final)
- : m_alternatives(alternatives)
- , m_final(final)
+SpeechRecognitionResult::SpeechRecognitionResult(const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionAlternative> >& alternatives, bool final)
+ : m_final(final)
+ , m_alternatives(alternatives)
{
ScriptWrappable::init(this);
}
+void SpeechRecognitionResult::trace(Visitor* visitor)
+{
+ visitor->trace(m_alternatives);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698