Code: void AudioOutputDevice::ShutDownOnIOThread() {
  DCHECK(message_loop()->BelongsToCurrentThread());

  if (stream_id_) {
    is_started_ = false;

    if (ipc_) {
      ipc_->CloseStream(stream_id_);
      ipc_->RemoveDelegate(stream_id_);
    }

    stream_id_ = 0;
  }

  base::AutoLock auto_lock_(audio_thread_lock_);
  if (!audio_thread_.get())
    return;
   base::ThreadRestrictions::ScopedAllowIO allow_io;
  audio_thread_->Stop(NULL);
  audio_thread_.reset();
   audio_callback_.reset();
 }

Vulnerability Type: Exec Code 
CWE ID: CWE-362
Summary: Race condition in Google Chrome before 22.0.1229.92 allows remote attackers to execute arbitrary code via vectors related to audio devices.
Commit Message: Revert r157378 as it caused WebRTC to dereference null pointers when restarting a call.

I've kept my unit test changes intact but disabled until I get a proper fix.

BUG=147499,150805
TBR=henrika

Review URL: https://codereview.chromium.org/10946040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157626 0039d316-1c4b-4281-b951-d872f2087c98