Index: Source/modules/speech/SpeechSynthesis.cpp |
diff --git a/Source/modules/speech/SpeechSynthesis.cpp b/Source/modules/speech/SpeechSynthesis.cpp |
index 2a989a9514d29873f77f26251ed9f35517cc7e02..21ffe1d32984d1e46bc0d9a9f4892090ec53d70a 100644 |
--- a/Source/modules/speech/SpeechSynthesis.cpp |
+++ b/Source/modules/speech/SpeechSynthesis.cpp |
@@ -34,9 +34,11 @@ |
namespace WebCore { |
-PassRefPtr<SpeechSynthesis> SpeechSynthesis::create(ExecutionContext* context) |
+DEFINE_GC_INFO(SpeechSynthesis); |
+ |
+PassRefPtrWillBeRawPtr<SpeechSynthesis> SpeechSynthesis::create(ExecutionContext* context) |
{ |
- return adoptRef(new SpeechSynthesis(context)); |
+ return adoptRefWillBeNoop(new SpeechSynthesis(context)); |
} |
SpeechSynthesis::SpeechSynthesis(ExecutionContext* context) |
@@ -65,7 +67,7 @@ void SpeechSynthesis::voicesDidChange() |
dispatchEvent(Event::create(EventTypeNames::voiceschanged)); |
} |
-const Vector<RefPtr<SpeechSynthesisVoice> >& SpeechSynthesis::getVoices() |
+const Vector<RefPtrWillBeMember<SpeechSynthesisVoice> >& SpeechSynthesis::getVoices() |
{ |
if (m_voiceList.size()) |
return m_voiceList; |
@@ -125,7 +127,7 @@ void SpeechSynthesis::cancel() |
{ |
// Remove all the items from the utterance queue. |
// Hold on to the current utterance so the platform synthesizer can have a chance to clean up. |
- RefPtr<SpeechSynthesisUtterance> current = m_currentSpeechUtterance; |
+ RefPtrWillBeMember<SpeechSynthesisUtterance> current = m_currentSpeechUtterance; |
m_utteranceQueue.clear(); |
m_platformSpeechSynthesizer->cancel(); |
current = 0; |
@@ -162,7 +164,7 @@ void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utteranc |
fireEvent(errorOccurred ? EventTypeNames::error : EventTypeNames::end, utterance, 0, String()); |
if (m_utteranceQueue.size()) { |
- RefPtr<SpeechSynthesisUtterance> firstUtterance = m_utteranceQueue.first(); |
+ RefPtrWillBeMember<SpeechSynthesisUtterance> firstUtterance = m_utteranceQueue.first(); |
ASSERT(firstUtterance == utterance); |
if (firstUtterance == utterance) |
m_utteranceQueue.removeFirst(); |
@@ -227,4 +229,14 @@ const AtomicString& SpeechSynthesis::interfaceName() const |
return EventTargetNames::SpeechSynthesisUtterance; |
} |
+void SpeechSynthesis::trace(Visitor* visitor) |
+{ |
+#if ENABLE(OILPAN) |
haraken
2014/02/12 05:18:45
Is this #if needed?
sof
2014/02/12 07:48:51
Think so; one will be a Vector<RefPtr>, the other
|
+ visitor->trace(m_voiceList); |
+ visitor->trace(m_currentSpeechUtterance); |
+#endif |
+ for (Deque<RefPtrWillBeMember<SpeechSynthesisUtterance> >::const_iterator it = m_utteranceQueue.begin(); it != m_utteranceQueue.end(); ++it) |
+ visitor->trace(*it); |
haraken
2014/02/12 05:18:45
Can't you write this like visitor->trace(m_utteran
sof
2014/02/12 07:48:51
This is over the Deque<>; should we add a trace()
haraken
2014/02/12 08:04:50
I think we have trace() methods for Vector<Member>
sof
2014/02/12 10:17:09
Sorry, I spoke incorrectly. There is a Deque<> tra
|
+} |
+ |
} // namespace WebCore |