Index: media/audio/alsa/alsa_input.h |
diff --git a/media/audio/alsa/alsa_input.h b/media/audio/alsa/alsa_input.h |
index 6e9aad9056ebf643d5f2b3c1b2ab6c51f3417d33..90c388382a0b68f5c0be8238cca5bbdd3ab46d9f 100644 |
--- a/media/audio/alsa/alsa_input.h |
+++ b/media/audio/alsa/alsa_input.h |
@@ -80,10 +80,12 @@ class AlsaPcmInputStream : public AgcAudioStream<AudioInputStream> { |
snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device. |
snd_mixer_t* mixer_handle_; // Handle to the ALSA microphone mixer. |
snd_mixer_elem_t* mixer_element_handle_; // Handle to the capture element. |
- base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_; |
scoped_ptr<uint8[]> audio_buffer_; // Buffer used for reading audio data. |
bool read_callback_behind_schedule_; |
+ // NOTE: Weak pointers must be invalidated before all other member variables. |
+ base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream); |
}; |