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

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

Issue 169343002: [WIP]Add WebPrivateHeapPtr and use it for speech platform layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/SpeechRecognition.cpp
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
index d81aa2c39bb27c27fc8c47816f62d219ded98328..01a6d06fa524ade4652d18707b3eaf31e44896ad 100644
--- a/Source/modules/speech/SpeechRecognition.cpp
+++ b/Source/modules/speech/SpeechRecognition.cpp
@@ -108,21 +108,21 @@ void SpeechRecognition::didEndAudio()
dispatchEvent(Event::create(EventTypeNames::audioend));
}
-void SpeechRecognition::didReceiveResults(const Vector<RefPtr<SpeechRecognitionResult> >& newFinalResults, const Vector<RefPtr<SpeechRecognitionResult> >& currentInterimResults)
+void SpeechRecognition::didReceiveResults(const Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> >& newFinalResults, const Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> >& currentInterimResults)
{
unsigned long resultIndex = m_finalResults.size();
for (size_t i = 0; i < newFinalResults.size(); ++i)
m_finalResults.append(newFinalResults[i]);
- Vector<RefPtr<SpeechRecognitionResult> > results = m_finalResults;
+ WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> > results = m_finalResults;
for (size_t i = 0; i < currentInterimResults.size(); ++i)
results.append(currentInterimResults[i]);
dispatchEvent(SpeechRecognitionEvent::createResult(resultIndex, results));
}
-void SpeechRecognition::didReceiveNoMatch(PassRefPtr<SpeechRecognitionResult> result)
+void SpeechRecognition::didReceiveNoMatch(PassRefPtrWillBeRawPtr<SpeechRecognitionResult> result)
{
dispatchEvent(SpeechRecognitionEvent::createNoMatch(result));
}

Powered by Google App Engine
This is Rietveld 408576698