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

Unified Diff: Source/core/speech/SpeechInputResultList.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/core/speech/SpeechInputResultList.cpp
diff --git a/Source/core/speech/SpeechInputResultList.cpp b/Source/core/speech/SpeechInputResultList.cpp
index 86f7fda07648bce06568865776a2856a57d6551c..5c333a5eb18f47dd0cbb3896facc5208458ab5d4 100644
--- a/Source/core/speech/SpeechInputResultList.cpp
+++ b/Source/core/speech/SpeechInputResultList.cpp
@@ -35,9 +35,11 @@
namespace WebCore {
-PassRefPtr<SpeechInputResultList> SpeechInputResultList::create(const SpeechInputResultArray& results)
+DEFINE_GC_INFO(SpeechInputResultList);
+
+PassRefPtrWillBeRawPtr<SpeechInputResultList> SpeechInputResultList::create(const SpeechInputResultArray& results)
{
- return adoptRef(new SpeechInputResultList(results));
+ return adoptRefWillBeNoop(new SpeechInputResultList(results));
}
SpeechInputResult* SpeechInputResultList::item(unsigned index)
@@ -46,11 +48,16 @@ SpeechInputResult* SpeechInputResultList::item(unsigned index)
}
SpeechInputResultList::SpeechInputResultList(const SpeechInputResultArray& results)
- : m_results(results) // Takes a copy of the array of RefPtrs.
+ : m_results(results) // Copies the incoming result array.
{
ScriptWrappable::init(this);
}
+void SpeechInputResultList::trace(Visitor* visitor)
+{
+ visitor->trace(m_results);
+}
+
} // namespace WebCore
#endif // ENABLE(INPUT_SPEECH)

Powered by Google App Engine
This is Rietveld 408576698