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..d8029afd1f6b2a1e6995a0da632b79a018e8c80d 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,10 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl |
scoped_refptr<media::AudioRendererSink> sink_; |
scoped_ptr<media::AudioBus> bus_wrapper_; |
+ // NOTE: This must always be last so it's invalidated before other member |
+ // variables might be accessed. |
+ base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_this_; |
+ |
DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl); |
}; |