diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 03:13:44 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 03:13:44 +0000 |
commit | 5d455ec52e025b9322c6fa4cf96ea319cce9bc21 (patch) | |
tree | 18a765f4f19054105f58977c2da95ff13c9495ee /chrome/browser | |
parent | 4e44b4d3cc5f4ea5c57ce9b495d1357563388962 (diff) | |
download | chromium_src-5d455ec52e025b9322c6fa4cf96ea319cce9bc21.zip chromium_src-5d455ec52e025b9322c6fa4cf96ea319cce9bc21.tar.gz chromium_src-5d455ec52e025b9322c6fa4cf96ea319cce9bc21.tar.bz2 |
Fix crash due to race condition in ImportingProgressView.
What is happening is that the ImporterView creates an ImportingProgressView to show the progress of the import but the ImportingProgressView receives the Cancel event before ImportStarted, so importing_ is not set to true. Cancel will think import is done and returns true (allowing the view to be destroyed) and then the ImporterView will try to communicate with a dead observer.
By initializing importing_ to true this crash is avoided (we wouldn't be creating the view unless we were about to import, right?).
BUG=1320194
TEST=Open Import dialog, press Enter and then Esc really quickly and Chrome should not crash (try it 10 times to be sure).
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/views/importing_progress_view.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/views/importing_progress_view.cc b/chrome/browser/views/importing_progress_view.cc index 60953b3..ec5945d 100644 --- a/chrome/browser/views/importing_progress_view.cc +++ b/chrome/browser/views/importing_progress_view.cc @@ -67,7 +67,7 @@ ImportingProgressView::ImportingProgressView(const std::wstring& source_name, coordinator_(coordinator), import_observer_(observer), items_(items), - importing_(false) { + importing_(true) { coordinator_->SetObserver(this); label_info_->SetMultiLine(true); label_info_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT); |