Commit 9fcc6867 authored by sky@chromium.org's avatar sky@chromium.org

Removes setting destroyed_flag_ in NotifyError

I'm changing two things to Connector:
. Removing setting destroyed_flag in NotifyError. This seems wrong
  since Connector hasn't been destroyed. If destoyed_flag_ was
  non-NULL and we set it to true and we're nested, then when the stack
  unravels destroyed_flag_ won't be unset even though Connector may
  not have been destroyed. This would leave Connector in a very bad
  state.
. Makes NotifyError cancel a wait. If there was a wait outstanding or
  a notification was in flight than if we don't cancel the wait we may
  very well end up back in OnHandleReady trying to do something.

BUG=none
TEST=none

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

Cr-Commit-Position: refs/heads/master@{#291354}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291354 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c4d0683
......@@ -198,11 +198,7 @@ void Connector::CancelWait() {
void Connector::NotifyError() {
error_ = true;
// The error handler might destroyed |this|. Also, after an error, all method
// should end early.
if (destroyed_flag_) {
*destroyed_flag_ = true; // Propagate flag.
}
CancelWait();
if (error_handler_)
error_handler_->OnConnectionError();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment