Chromium Code Reviews| 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 |