diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 02:40:02 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-06 02:40:02 +0000 |
commit | f47f3bb594b063d5539373c656b0b2fb39780ea1 (patch) | |
tree | f93b717c00686a488a75682f11546054138181e0 /remoting/jingle_glue | |
parent | 1189fa620b5a1b86804e0c50bcaf323db4330ebd (diff) | |
download | chromium_src-f47f3bb594b063d5539373c656b0b2fb39780ea1.zip chromium_src-f47f3bb594b063d5539373c656b0b2fb39780ea1.tar.gz chromium_src-f47f3bb594b063d5539373c656b0b2fb39780ea1.tar.bz2 |
Don't crash in ~HostNPScriptObject() when the object wasn't initialized.
BUG=112656
Review URL: https://chromiumcodereview.appspot.com/9582031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue')
-rw-r--r-- | remoting/jingle_glue/jingle_thread.cc | 8 | ||||
-rw-r--r-- | remoting/jingle_glue/jingle_thread.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/remoting/jingle_glue/jingle_thread.cc b/remoting/jingle_glue/jingle_thread.cc index 742e3b1..74a5a7b 100644 --- a/remoting/jingle_glue/jingle_thread.cc +++ b/remoting/jingle_glue/jingle_thread.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -153,9 +153,11 @@ JingleThread::~JingleThread() { Stop(); } -void JingleThread::Start() { - Thread::Start(); +bool JingleThread::Start() { + if (!Thread::Start()) + return false; started_event_.Wait(); + return true; } void JingleThread::Run() { diff --git a/remoting/jingle_glue/jingle_thread.h b/remoting/jingle_glue/jingle_thread.h index 0d6018e..7c3aba0 100644 --- a/remoting/jingle_glue/jingle_thread.h +++ b/remoting/jingle_glue/jingle_thread.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -47,7 +47,7 @@ class JingleThread : public talk_base::Thread { JingleThread(); virtual ~JingleThread(); - void Start(); + bool Start(); // Main function for the thread. Should not be called directly. virtual void Run() OVERRIDE; |