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

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

Issue 315133004: Enable Oilpan by default in modules/speech/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Events aren't on the heap by default yet; adjust member decl. Created 6 years, 6 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.h
diff --git a/Source/modules/speech/SpeechRecognition.h b/Source/modules/speech/SpeechRecognition.h
index 9bc5a793f1930046223df0c76ea0c0d4c567217a..ab15ecc2dbf41487b8328ce9ffb7897e34b01e76 100644
--- a/Source/modules/speech/SpeechRecognition.h
+++ b/Source/modules/speech/SpeechRecognition.h
@@ -33,8 +33,6 @@
#include "modules/speech/SpeechRecognitionResult.h"
#include "platform/heap/Handle.h"
#include "wtf/Compiler.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -44,16 +42,16 @@ class ExecutionContext;
class SpeechRecognitionController;
class SpeechRecognitionError;
-class SpeechRecognition FINAL : public RefCountedWillBeRefCountedGarbageCollected<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData {
- REFCOUNTED_EVENT_TARGET(SpeechRecognition);
+class SpeechRecognition FINAL : public RefCountedGarbageCollected<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData {
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<SpeechRecognition>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SpeechRecognition);
public:
- static PassRefPtrWillBeRawPtr<SpeechRecognition> create(ExecutionContext*);
+ static SpeechRecognition* create(ExecutionContext*);
virtual ~SpeechRecognition();
// Attributes.
SpeechGrammarList* grammars() { return m_grammars.get(); }
- void setGrammars(PassRefPtrWillBeRawPtr<SpeechGrammarList> grammars) { m_grammars = grammars; }
+ void setGrammars(SpeechGrammarList* grammars) { m_grammars = grammars; }
String lang() { return m_lang; }
void setLang(const String& lang) { m_lang = lang; }
bool continuous() { return m_continuous; }
@@ -75,9 +73,9 @@ public:
void didEndSpeech();
void didEndSound();
void didEndAudio();
- void didReceiveResults(const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> >& newFinalResults, const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> >& currentInterimResults);
- void didReceiveNoMatch(PassRefPtrWillBeRawPtr<SpeechRecognitionResult>);
- void didReceiveError(PassRefPtrWillBeRawPtr<SpeechRecognitionError>);
+ void didReceiveResults(const HeapVector<Member<SpeechRecognitionResult> >& newFinalResults, const HeapVector<Member<SpeechRecognitionResult> >& currentInterimResults);
+ void didReceiveNoMatch(SpeechRecognitionResult*);
+ void didReceiveError(SpeechRecognitionError*);
void didStart();
void didEnd();
@@ -104,11 +102,9 @@ public:
virtual void trace(Visitor*) OVERRIDE;
private:
- friend class RefCounted<SpeechRecognition>;
-
explicit SpeechRecognition(ExecutionContext*);
- RefPtrWillBeMember<SpeechGrammarList> m_grammars;
+ Member<SpeechGrammarList> m_grammars;
String m_lang;
bool m_continuous;
bool m_interimResults;
@@ -118,7 +114,7 @@ private:
bool m_stoppedByActiveDOMObject;
bool m_started;
bool m_stopping;
- WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> > m_finalResults;
+ HeapVector<Member<SpeechRecognitionResult> > m_finalResults;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698