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

Issue 2781083002: Fix the multi-threaded access to WeakPtr<BrowsingDataRemoverImpl> (Closed)

Created:
3 years, 8 months ago by msramek
Modified:
3 years, 8 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the multi-threaded access to WeakPtr<BrowsingDataRemoverImpl> Previously, we depended on a WeakPtr to access BrowsingDataRemoverImpl to gain access to its delegate on which we called the embedder origin type matching method. With this CL, the delegate provides a callback to a static method, eliminating the need for any pointers. To prevent a similar bug from happening in the future, we proactively bind the WeakPtr<BrowsingDataRemoverImpl> to the UI thread, so it would immediately DCHECK if it was misused on the IO thread. BUG=705538, 668114 Review-Url: https://codereview.chromium.org/2781083002 Cr-Commit-Position: refs/heads/master@{#462530} Committed: https://chromium.googlesource.com/chromium/src/+/c9f101b745929a50b391abf446cefb6b2f4b4bd6

Patch Set 1 #

Total comments: 4

Patch Set 2 : Changed the class to a static method. #

Total comments: 2

Patch Set 3 : Ordering #

Total comments: 2

Patch Set 4 : Static method to local namespace. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -87 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover_delegate.h View 1 1 chunk +13 lines, -7 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_impl.cc View 1 2 5 chunks +65 lines, -46 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc View 1 2 3 2 chunks +30 lines, -21 lines 0 comments Download
M chrome/browser/browsing_data/mock_browsing_data_remover_delegate.h View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/mock_browsing_data_remover_delegate.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 31 (24 generated)
msramek
Hi Bernhard, Can you have a look? I'm sending this to you because you reviewed ...
3 years, 8 months ago (2017-03-29 16:54:10 UTC) #12
Bernhard Bauer
On 2017/03/29 16:54:10, msramek wrote: > Regarding your comment from the issue tracker > (https://bugs.chromium.org/p/chromium/issues/detail?id=705973#c2), ...
3 years, 8 months ago (2017-03-30 10:49:26 UTC) #13
msramek
Sorry for the delay / context loss, I haven't had time to return to this ...
3 years, 8 months ago (2017-04-06 12:06:39 UTC) #17
Bernhard Bauer
LGTM, thanks! https://codereview.chromium.org/2781083002/diff/60001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h File chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h (right): https://codereview.chromium.org/2781083002/diff/60001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h#newcode199 chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h:199: static bool DoesOriginMatchEmbedderMask( Does this need to ...
3 years, 8 months ago (2017-04-06 15:02:13 UTC) #22
msramek
Thank you! https://codereview.chromium.org/2781083002/diff/60001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h File chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h (right): https://codereview.chromium.org/2781083002/diff/60001/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h#newcode199 chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h:199: static bool DoesOriginMatchEmbedderMask( On 2017/04/06 15:02:12, Bernhard ...
3 years, 8 months ago (2017-04-06 16:27:31 UTC) #24
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/2781083002/80001
3 years, 8 months ago (2017-04-06 16:33:28 UTC) #28
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 17:30:51 UTC) #31
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/c9f101b745929a50b391abf446ce...

Powered by Google App Engine
This is Rietveld 408576698