Index: Source/modules/speech/SpeechRecognitionResultList.cpp |
diff --git a/Source/modules/speech/SpeechRecognitionResultList.cpp b/Source/modules/speech/SpeechRecognitionResultList.cpp |
index 7327bf7f7f3707ac484af9e323ddcafbeb8a5e96..b34f93f4eef0d896f1e9e5ff4cf72e7ad10e4419 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,23 @@ SpeechRecognitionResult* SpeechRecognitionResultList::item(unsigned long index) |
} |
SpeechRecognitionResultList::SpeechRecognitionResultList(const Vector<RefPtr<SpeechRecognitionResult> >& results) |
+#if !ENABLE(OILPAN) |
: m_results(results) |
+#endif |
{ |
ScriptWrappable::init(this); |
+#if ENABLE(OILPAN) |
+ m_results.grow(results.size()); |
haraken
2014/02/12 05:18:45
Ditto. We want to avoid the copying code. We want
|
+ for (size_t i = 0; i < results.size(); i++) |
+ m_results[i] = results[i].get(); |
+#endif |
+} |
+ |
+void SpeechRecognitionResultList::trace(Visitor* visitor) |
+{ |
+#if ENABLE(OILPAN) |
haraken
2014/02/12 05:18:45
Is this #if needed?
sof
2014/02/12 07:48:51
Like the previous two involving Vector<RefPtr> in
|
+ visitor->trace(m_results); |
+#endif |
} |
} // namespace WebCore |