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

Unified Diff: third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp

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/platform/speech/PlatformSpeechSynthesisVoice.cpp
diff --git a/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp b/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp
index e323de442178e314bf3869a6f52bfc56a2cb3e7e..dfcd92ecf5b1956484083131de32bec1e17dc099 100644
--- a/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp
+++ b/third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesisVoice.cpp
@@ -27,14 +27,14 @@
namespace blink {
-PlatformSpeechSynthesisVoice* PlatformSpeechSynthesisVoice::create(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault)
+PassRefPtr<PlatformSpeechSynthesisVoice> PlatformSpeechSynthesisVoice::create(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault)
{
- return new PlatformSpeechSynthesisVoice(voiceURI, name, lang, localService, isDefault);
+ return adoptRef(new PlatformSpeechSynthesisVoice(voiceURI, name, lang, localService, isDefault));
}
-PlatformSpeechSynthesisVoice* PlatformSpeechSynthesisVoice::create()
+PassRefPtr<PlatformSpeechSynthesisVoice> PlatformSpeechSynthesisVoice::create()
{
- return new PlatformSpeechSynthesisVoice();
+ return adoptRef(new PlatformSpeechSynthesisVoice);
}
PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice(const String& voiceURI, const String& name, const String& lang, bool localService, bool isDefault)

Powered by Google App Engine
This is Rietveld 408576698