Index: Source/modules/speech/SpeechRecognition.cpp |
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp |
index 364332ee89098792393ccd585a9bcdf32895dd6b..03eef7dbe8ca04d3baaaf3e38af408ec0efbc4ba 100644 |
--- a/Source/modules/speech/SpeechRecognition.cpp |
+++ b/Source/modules/speech/SpeechRecognition.cpp |
@@ -37,9 +37,11 @@ |
namespace WebCore { |
-PassRefPtr<SpeechRecognition> SpeechRecognition::create(ExecutionContext* context) |
+DEFINE_GC_INFO(SpeechRecognition); |
+ |
+PassRefPtrWillBeRawPtr<SpeechRecognition> SpeechRecognition::create(ExecutionContext* context) |
{ |
- RefPtr<SpeechRecognition> speechRecognition(adoptRef(new SpeechRecognition(context))); |
+ RefPtrWillBeRawPtr<SpeechRecognition> speechRecognition(adoptRefWillBeNoop(new SpeechRecognition(context))); |
speechRecognition->suspendIfNeeded(); |
return speechRecognition.release(); |
} |
@@ -113,7 +115,9 @@ void SpeechRecognition::didReceiveResults(const Vector<RefPtr<SpeechRecognitionR |
for (size_t i = 0; i < newFinalResults.size(); ++i) |
m_finalResults.append(newFinalResults[i]); |
- Vector<RefPtr<SpeechRecognitionResult> > results = m_finalResults; |
+ Vector<RefPtr<SpeechRecognitionResult> > results(m_finalResults.size()); |
sof
2014/02/12 10:17:09
This is suboptimal, but it will require changing w
|
+ for (size_t i = 0; i < m_finalResults.size(); ++i) |
+ results[i] = m_finalResults[i]; |
for (size_t i = 0; i < currentInterimResults.size(); ++i) |
results.append(currentInterimResults[i]); |
@@ -189,4 +193,9 @@ SpeechRecognition::~SpeechRecognition() |
{ |
} |
+void SpeechRecognition::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_grammars); |
+} |
+ |
} // namespace WebCore |