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

Unified Diff: Source/modules/speech/SpeechRecognitionResultList.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/SpeechRecognitionResultList.cpp
diff --git a/Source/modules/speech/SpeechRecognitionResultList.cpp b/Source/modules/speech/SpeechRecognitionResultList.cpp
index 7327bf7f7f3707ac484af9e323ddcafbeb8a5e96..69a81c8d22c6a3bbb18c468c9581bc264b9efe39 100644
--- a/Source/modules/speech/SpeechRecognitionResultList.cpp
+++ b/Source/modules/speech/SpeechRecognitionResultList.cpp
@@ -29,9 +29,11 @@
namespace WebCore {
-PassRefPtr<SpeechRecognitionResultList> SpeechRecognitionResultList::create(const Vector<RefPtr<SpeechRecognitionResult> >& results)
+DEFINE_GC_INFO(SpeechRecognitionResultList);
+
+PassRefPtrWillBeRawPtr<SpeechRecognitionResultList> SpeechRecognitionResultList::create(const Vector<RefPtr<SpeechRecognitionResult> >& results)
{
- return adoptRef(new SpeechRecognitionResultList(results));
+ return adoptRefWillBeNoop(new SpeechRecognitionResultList(results));
}
SpeechRecognitionResult* SpeechRecognitionResultList::item(unsigned long index)
@@ -43,9 +45,21 @@ SpeechRecognitionResult* SpeechRecognitionResultList::item(unsigned long index)
}
SpeechRecognitionResultList::SpeechRecognitionResultList(const Vector<RefPtr<SpeechRecognitionResult> >& results)
+#if !ENABLE(OILPAN)
: m_results(results)
Vyacheslav Egorov (Chromium) 2014/02/14 14:01:42 We could provide a correctly delegating copying co
sof 2014/02/16 20:29:15 Yes, the eyesore would disappear then, but I'd be
haraken 2014/02/17 01:21:35 I think this is the right way to go. You can refer
+#endif
{
ScriptWrappable::init(this);
+#if ENABLE(OILPAN)
+ m_results.grow(results.size());
+ for (size_t i = 0; i < results.size(); i++)
+ m_results[i] = results[i].get();
+#endif
+}
+
+void SpeechRecognitionResultList::trace(Visitor* visitor)
+{
+ visitor->trace(m_results);
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698