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

Unified Diff: third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h

Issue 1617383003: Move PlatformSpeechSynthesisVoice off the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix oilpan compilation Created 4 years, 11 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: third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
index 3e071ee33836bd5fc2f4db5c32d63f8927b8ca39..c39a2f6c9246e9dcfaa609490a172206082ce36c 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
@@ -29,14 +29,16 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "platform/speech/PlatformSpeechSynthesisVoice.h"
+#include "wtf/Forward.h"
#include "wtf/text/WTFString.h"
namespace blink {
-class SpeechSynthesisVoice final : public GarbageCollected<SpeechSynthesisVoice>, public ScriptWrappable {
+class SpeechSynthesisVoice final : public GarbageCollectedFinalized<SpeechSynthesisVoice>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static SpeechSynthesisVoice* create(PlatformSpeechSynthesisVoice*);
+ static SpeechSynthesisVoice* create(PassRefPtr<PlatformSpeechSynthesisVoice>);
+ ~SpeechSynthesisVoice();
const String& voiceURI() const { return m_platformVoice->voiceURI(); }
const String& name() const { return m_platformVoice->name(); }
@@ -44,14 +46,14 @@ public:
bool localService() const { return m_platformVoice->localService(); }
bool isDefault() const { return m_platformVoice->isDefault(); }
- PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice; }
+ PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice.get(); }
- DECLARE_TRACE();
+ DEFINE_INLINE_TRACE() { }
private:
- explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice*);
+ explicit SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice>);
- Member<PlatformSpeechSynthesisVoice> m_platformVoice;
+ RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698