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

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

Issue 139803012: Move speech module over to Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pull in TraceTrait<RefPtr<T>> template specialization + add trace() over RawPtr<T>s. 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 364332ee89098792393ccd585a9bcdf32895dd6b..d81aa2c39bb27c27fc8c47816f62d219ded98328 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(adoptRefCountedWillBeRefCountedGarbageCollected(new SpeechRecognition(context)));
speechRecognition->suspendIfNeeded();
return speechRecognition.release();
}
@@ -189,4 +191,9 @@ SpeechRecognition::~SpeechRecognition()
{
}
+void SpeechRecognition::trace(Visitor* visitor)
+{
+ visitor->trace(m_grammars);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698