Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix browser crash on shutdown when ProfileImplIOData::Handle::Init is…
Browse files Browse the repository at this point in the history
…n't called.

With ephemeral profiles, in some cases, a Handle will be created and destroyed
without being initialized. Root cause of why the object is created is still not
known, but this change prevents the crash from occurring.

BUG=478215

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

Cr-Commit-Position: refs/heads/master@{#326371}
(cherry picked from commit 08f40f1)

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

Cr-Commit-Position: refs/branch-heads/2357@{#223}
Cr-Branched-From: 59d4494-refs/heads/master@{#323860}
  • Loading branch information
Jeremy Im committed Apr 24, 2015
1 parent 6975112 commit 1a40423
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chrome/browser/profiles/profile_impl_io_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ ProfileImplIOData::Handle::~Handle() {
if (io_data_->http_server_properties_manager_)
io_data_->http_server_properties_manager_->ShutdownOnPrefThread();

io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread();
// io_data_->data_reduction_proxy_io_data() might be NULL if Init() was
// never called.
if (io_data_->data_reduction_proxy_io_data())
io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread();

io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass());
}

Expand Down

0 comments on commit 1a40423

Please sign in to comment.