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

Unified Diff: Source/web/SpeechRecognitionClientProxy.cpp

Issue 168963003: Make WebPrivatePtr capable of wrapping garbage collected objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use vegorov's trait-based WebPrivatePtr instead; much better. 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
« no previous file with comments | « Source/modules/speech/SpeechRecognitionResultList.cpp ('k') | Source/web/WebDOMMediaStreamTrack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/SpeechRecognitionClientProxy.cpp
diff --git a/Source/web/SpeechRecognitionClientProxy.cpp b/Source/web/SpeechRecognitionClientProxy.cpp
index 4d5b1ebd3c87309c56a5445951f64df6cbf46dae..86bb72b1fcd5e0622e926f8049502471743b1448 100644
--- a/Source/web/SpeechRecognitionClientProxy.cpp
+++ b/Source/web/SpeechRecognitionClientProxy.cpp
@@ -76,67 +76,67 @@ void SpeechRecognitionClientProxy::abort(SpeechRecognition* recognition)
void SpeechRecognitionClientProxy::didStartAudio(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didStartAudio();
}
void SpeechRecognitionClientProxy::didStartSound(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didStartSound();
recognition->didStartSpeech();
}
void SpeechRecognitionClientProxy::didEndSound(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didEndSpeech();
recognition->didEndSound();
}
void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didEndAudio();
}
void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionHandle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, const WebVector<WebSpeechRecognitionResult>& currentInterimResults)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
- Vector<RefPtr<SpeechRecognitionResult> > finalResultsVector(newFinalResults.size());
+ Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> > finalResultsVector(newFinalResults.size());
Mads Ager (chromium) 2014/02/18 09:15:39 These need to be WillBeHeapVector<RefPtrWillBeMemb
sof 2014/02/18 09:42:23 Thanks, fixed.
for (size_t i = 0; i < newFinalResults.size(); ++i)
- finalResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(newFinalResults[i]);
+ finalResultsVector[i] = PassRefPtrWillBeRawPtr<SpeechRecognitionResult>(newFinalResults[i]);
- Vector<RefPtr<SpeechRecognitionResult> > interimResultsVector(currentInterimResults.size());
+ Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> > interimResultsVector(currentInterimResults.size());
for (size_t i = 0; i < currentInterimResults.size(); ++i)
- interimResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(currentInterimResults[i]);
+ interimResultsVector[i] = PassRefPtrWillBeRawPtr<SpeechRecognitionResult>(currentInterimResults[i]);
recognition->didReceiveResults(finalResultsVector, interimResultsVector);
}
void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionHandle& handle, const WebSpeechRecognitionResult& result)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didReceiveNoMatch(result);
}
void SpeechRecognitionClientProxy::didReceiveError(const WebSpeechRecognitionHandle& handle, const WebString& message, WebSpeechRecognizerClient::ErrorCode code)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
SpeechRecognitionError::ErrorCode errorCode = static_cast<SpeechRecognitionError::ErrorCode>(code);
recognition->didReceiveError(SpeechRecognitionError::create(errorCode, message));
}
void SpeechRecognitionClientProxy::didStart(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didStart();
}
void SpeechRecognitionClientProxy::didEnd(const WebSpeechRecognitionHandle& handle)
{
- RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
+ RefPtrWillBeRawPtr<SpeechRecognition> recognition = PassRefPtrWillBeRawPtr<SpeechRecognition>(handle);
recognition->didEnd();
}
« no previous file with comments | « Source/modules/speech/SpeechRecognitionResultList.cpp ('k') | Source/web/WebDOMMediaStreamTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698