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

Unified Diff: content/renderer/media/webaudiosourceprovider_impl.h

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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/renderer/media/webaudiosourceprovider_impl.h
diff --git a/content/renderer/media/webaudiosourceprovider_impl.h b/content/renderer/media/webaudiosourceprovider_impl.h
index d1a6fe723226eff398d3084acf91b991bd49f513..aca9d830021cb51a64b819d8573fc7cbfc297603 100644
--- a/content/renderer/media/webaudiosourceprovider_impl.h
+++ b/content/renderer/media/webaudiosourceprovider_impl.h
@@ -56,8 +56,6 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl
// Calls setFormat() on |client_| from the Blink renderer thread.
void OnSetFormat();
- base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_this_;
-
// Closure that posts a task to call OnSetFormat() on the renderer thread.
base::Closure set_format_cb_;
@@ -81,6 +79,9 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl
scoped_refptr<media::AudioRendererSink> sink_;
scoped_ptr<media::AudioBus> bus_wrapper_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl);
};
« no previous file with comments | « content/renderer/media/video_capture_impl_manager.h ('k') | content/renderer/media/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698