Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Issue 2540253002: Fix heap use-after-free in PrintingMessageFilter (Closed)

Created:
4 years ago by rbpotter
Modified:
4 years ago
CC:
chromium-reviews, jam, Lei Zhang
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix heap use-after-free in PrintingMessageFilter Change PrintingMessageFilter and PluginInfoMessageFilter to use KeyedServiceShutdownNotifier. This prevents the warning on Chrome shutdown about pref observers due to PluginInfoMessageFilter not destroying the pref observers and prevents a possible use after free in PrintingMessageFilter if the Profile and PrefMember were deleted before the pointer to the PrefMember it was storing previously. BUG=669289 Committed: https://crrev.com/654f42dca9af36fa50f097514a39e97682c27730 Cr-Commit-Position: refs/heads/master@{#436049}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix compile error #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -7 lines) Patch
M chrome/browser/plugins/plugin_info_message_filter.h View 1 4 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 4 chunks +37 lines, -0 lines 0 comments Download
M chrome/browser/printing/printing_message_filter.h View 3 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/printing/printing_message_filter.cc View 1 6 chunks +40 lines, -5 lines 4 comments Download

Messages

Total messages: 31 (21 generated)
Bernhard Bauer
https://codereview.chromium.org/2540253002/diff/1/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/2540253002/diff/1/chrome/browser/plugins/plugin_info_message_filter.cc#newcode243 chrome/browser/plugins/plugin_info_message_filter.cc:243: // Destroy on the UI thread because we contain ...
4 years ago (2016-11-30 22:53:18 UTC) #2
rbpotter
https://codereview.chromium.org/2540253002/diff/1/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): https://codereview.chromium.org/2540253002/diff/1/chrome/browser/printing/printing_message_filter.cc#newcode119 chrome/browser/printing/printing_message_filter.cc:119: BrowserThread::DeleteOnUIThread::Destruct(this); On 2016/11/30 22:53:18, Bernhard Bauer wrote: > I ...
4 years ago (2016-12-01 01:11:12 UTC) #3
Bernhard Bauer
Initial version LGTM; sorry for the noise. https://codereview.chromium.org/2540253002/diff/1/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): https://codereview.chromium.org/2540253002/diff/1/chrome/browser/printing/printing_message_filter.cc#newcode119 chrome/browser/printing/printing_message_filter.cc:119: BrowserThread::DeleteOnUIThread::Destruct(this); On ...
4 years ago (2016-12-01 23:49:25 UTC) #10
rbpotter
Uploaded a new patch that returns to the original version and fixes a compilation error ...
4 years ago (2016-12-02 18:10:36 UTC) #20
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/2540253002/diff/40001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): https://codereview.chromium.org/2540253002/diff/40001/chrome/browser/printing/printing_message_filter.cc#newcode95 chrome/browser/printing/printing_message_filter.cc:95: is_printing_enabled_.MoveToThread( Thy it's moved to IO thread here, but ...
4 years ago (2016-12-02 18:51:00 UTC) #21
rbpotter
https://codereview.chromium.org/2540253002/diff/40001/chrome/browser/printing/printing_message_filter.cc File chrome/browser/printing/printing_message_filter.cc (right): https://codereview.chromium.org/2540253002/diff/40001/chrome/browser/printing/printing_message_filter.cc#newcode95 chrome/browser/printing/printing_message_filter.cc:95: is_printing_enabled_.MoveToThread( On 2016/12/02 18:51:00, Vitaly Buka wrote: > Thy ...
4 years ago (2016-12-02 19:28:34 UTC) #22
Vitaly Buka (NO REVIEWS)
> Since GetValue is called from the IO thread, it won't update any more after ...
4 years ago (2016-12-02 19:54:04 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2540253002/40001
4 years ago (2016-12-02 21:09:38 UTC) #26
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years ago (2016-12-02 22:17:41 UTC) #29
commit-bot: I haz the power
4 years ago (2016-12-02 22:19:52 UTC) #31
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/654f42dca9af36fa50f097514a39e97682c27730
Cr-Commit-Position: refs/heads/master@{#436049}

Powered by Google App Engine
This is Rietveld 408576698