summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 13:48:55 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 13:48:55 +0000
commit313c20292cede66316f56ba5f32a89748d1dc369 (patch)
treef272cbc33e67d3daffa19512306fe80135b3c96c
parent645b929b9d7af38965320089e453bc3c44823781 (diff)
downloadchromium_src-313c20292cede66316f56ba5f32a89748d1dc369.zip
chromium_src-313c20292cede66316f56ba5f32a89748d1dc369.tar.gz
chromium_src-313c20292cede66316f56ba5f32a89748d1dc369.tar.bz2
Revert 65349 - Update CertVerifier to watch for the origin loop's destruction, so that
it doesn't crash if the SSLClientSocket is leaked. BUG=chromium-os:8179 TEST=None Linux browser tests are consistently failing. Example stack: SSLUITest.TestDisplaysInsecureContentTwoTabs: [11279:11279:1107/212311:929558354690:WARNING:chrome/installer/util/master_preferences.cc(56)] Failed to read master prefs file. [11279:11279:1107/212311:929558354814:ERROR:chrome/installer/util/master_preferences.cc(137)] Failed to parse /mnt/data/build/slave/Linux_Builder__Views_dbg_/build/src/out/Debug/master_preferences [11279:11279:1107/212311:929558672237:WARNING:views/widget/widget_gtk.cc(293)] compositing not supported; allowing anyway LEAK: 4 WebCoreNode [11279:11291:1107/212312:929559555051:FATAL:base/message_loop.cc(200)] Check failed: this == current(). Backtrace: base::debug::StackTrace::StackTrace() [0x124edb6] logging::LogMessage::~LogMessage() [0x126455b] MessageLoop::RemoveDestructionObserver() [0x126695d] net::CertVerifier::Request::Cancel() [0x1944eb5] net::CertVerifier::Request::~Request() [0x194505a] base::RefCountedThreadSafe<>::DeleteInternal() [0x194544c] base::DefaultRefCountedThreadSafeTraits<>::Destruct() [0x1945420] base::RefCountedThreadSafe<>::Release() [0x19452ec] RunnableMethodTraits<>::ReleaseCallee() [0x1945628] RunnableMethod<>::ReleaseCallee() [0x194559c] RunnableMethod<>::~RunnableMethod() [0x19454ce] (anonymous namespace)::WorkerThread::ThreadMain() [0x12c904f] ThreadFunc() [0x12860bf] start_thread [0x2afc1af6d9ca] 0x2afc1d5156fd [11279:11291:1107/212312:929559555051:FATAL:base/message_loop.cc(200)] Check failed: this == current(). Backtrace: base::debug::StackTrace::StackTrace() [0x124edb6] logging::LogMessage::~LogMessage() [0x126455b] MessageLoop::RemoveDestructionObserver() [0x126695d] net::CertVerifier::Request::Cancel() [0x1944eb5] net::CertVerifier::Request::~Request() [0x194505a] base::RefCountedThreadSafe<>::DeleteInternal() [0x194544c] base::DefaultRefCountedThreadSafeTraits<>::Destruct() [0x1945420] base::RefCountedThreadSafe<>::Release() [0x19452ec] RunnableMethodTraits<>::ReleaseCallee() [0x1945628] RunnableMethod<>::ReleaseCallee() [0x194559c] RunnableMethod<>::~RunnableMethod() [0x19454ce] (anonymous namespace)::WorkerThread::ThreadMain() [0x12c904f] ThreadFunc() [0x12860bf] start_thread [0x2afc1af6d9ca] 0x2afc1d5156fd Killed (timed out). Review URL: http://codereview.chromium.org/4299001 TBR=zork@chromium.org Review URL: http://codereview.chromium.org/4669003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65372 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/cert_verifier.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/net/base/cert_verifier.cc b/net/base/cert_verifier.cc
index 103c6c3..4e94133 100644
--- a/net/base/cert_verifier.cc
+++ b/net/base/cert_verifier.cc
@@ -17,8 +17,7 @@
namespace net {
class CertVerifier::Request :
- public base::RefCountedThreadSafe<CertVerifier::Request>,
- public MessageLoop::DestructionObserver {
+ public base::RefCountedThreadSafe<CertVerifier::Request> {
public:
Request(CertVerifier* verifier,
X509Certificate* cert,
@@ -34,8 +33,6 @@ class CertVerifier::Request :
callback_(callback),
origin_loop_(MessageLoop::current()),
error_(OK) {
- if (origin_loop_)
- origin_loop_->AddDestructionObserver(this);
}
void DoVerify() {
@@ -89,25 +86,13 @@ class CertVerifier::Request :
verifier_ = NULL;
AutoLock locked(origin_loop_lock_);
- if (origin_loop_) {
- origin_loop_->RemoveDestructionObserver(this);
- origin_loop_ = NULL;
- }
- }
-
- // MessageLoop::DestructionObserver override.
- virtual void WillDestroyCurrentMessageLoop() {
- LOG(ERROR) << "CertVerifier wasn't deleted before the thread was deleted.";
- AutoLock locked(origin_loop_lock_);
origin_loop_ = NULL;
}
private:
friend class base::RefCountedThreadSafe<CertVerifier::Request>;
- ~Request() {
- Cancel();
- }
+ ~Request() {}
// Set on the origin thread, read on the worker thread.
scoped_refptr<X509Certificate> cert_;