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

Unified Diff: content/public/browser/speech_recognition_session_config.h

Issue 170243005: Making sure that SpeechRecognitionDispatcherHost is not used after free (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments 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: content/public/browser/speech_recognition_session_config.h
diff --git a/content/public/browser/speech_recognition_session_config.h b/content/public/browser/speech_recognition_session_config.h
index dd63582888ba0b1d0b34af4776dee960c85cb766..813fbd1056a3baa3ee8101f70ab4b474f2bd992f 100644
--- a/content/public/browser/speech_recognition_session_config.h
+++ b/content/public/browser/speech_recognition_session_config.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "content/public/browser/speech_recognition_session_context.h"
#include "content/public/common/speech_recognition_grammar.h"
@@ -31,7 +32,7 @@ struct CONTENT_EXPORT SpeechRecognitionSessionConfig {
uint32 max_hypotheses;
SpeechRecognitionSessionContext initial_context;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter;
- SpeechRecognitionEventListener* event_listener;
+ base::WeakPtr<SpeechRecognitionEventListener> event_listener;
};
} // namespace content
« no previous file with comments | « content/public/browser/speech_recognition_manager.h ('k') | content/public/browser/speech_recognition_session_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698