summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-01 03:49:31 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-01 03:49:31 +0000
commit3f4550960a5b379c10805f106074237de6c7a52d (patch)
treeabbf120f3fa52a3f341f513a42012e0dd8ec2af9
parent0de6d540c5b1079293e0f434e5733df7b242f48c (diff)
downloadchromium_src-3f4550960a5b379c10805f106074237de6c7a52d.zip
chromium_src-3f4550960a5b379c10805f106074237de6c7a52d.tar.gz
chromium_src-3f4550960a5b379c10805f106074237de6c7a52d.tar.bz2
Fix crash in ExtensionApiTest.FLAKY_WebSocket
TBR=darin BUG=none TEST=browser_tests ExtensionApiTest.FLAKY_WebSocket doesn't crash Review URL: http://codereview.chromium.org/660259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40253 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/websockets/websocket_job.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 3ba0c36..59acfc5 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -129,7 +129,8 @@ void WebSocketJob::RestartWithAuth(
void WebSocketJob::DetachDelegate() {
state_ = CLOSED;
delegate_ = NULL;
- socket_->DetachDelegate();
+ if (socket_)
+ socket_->DetachDelegate();
socket_ = NULL;
}