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

Issue 2809293004: Fix windows registry loader to carry over prefs from file thread correctly (Closed)

Created:
3 years, 8 months ago by lazyboy
Modified:
3 years, 8 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix windows registry loader to carry over prefs from file thread correctly Two calls to ExternalLoader::StartLoading() will schedule two LoadOnFileThread()s. However, because how CompleteLoadAndStartWatchingRegistry looked at the prefs written by LoadOnFileThread, the second LoadOnFileThread can overwrite the first one's written prefs. This will result in nullptr access in second CompleteLoadAndStartWatchingRegistry: StartLoading()->LoadOnFileThread()->Set prefs_, then PostTask to CompleteLoadAndStartWatchingRegistry[1] Call again: StartLoading()->LoadOnFileThread()->Overwrite prefs_, then PostTask to CompleteLoadAndStartWatchingRegistry[2] [1] CompleteLoadAndStartWatchingRegistry runs, then it consumes |prefs_| set by [2] [2] CompleteLoadAndStartWatchingRegistry runs, then it won't find |prefs_| BUG=709304 Review-Url: https://codereview.chromium.org/2809293004 Cr-Commit-Position: refs/heads/master@{#464182} Committed: https://chromium.googlesource.com/chromium/src/+/57972e07b6e78e5eb245e617f814a0c8e2ea3f4b

Patch Set 1 #

Patch Set 2 : add test #

Total comments: 4

Patch Set 3 : add TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -5 lines) Patch
M chrome/browser/extensions/external_loader.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/external_registry_loader_win.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/external_registry_loader_win.cc View 1 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/external_registry_loader_win_unittest.cc View 1 2 3 chunks +39 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (21 generated)
lazyboy
3 years, 8 months ago (2017-04-12 18:39:43 UTC) #10
Devlin
lgtm, but it'd be great if we can improve this yet more in the future. ...
3 years, 8 months ago (2017-04-12 19:32:06 UTC) #14
lazyboy
https://codereview.chromium.org/2809293004/diff/20001/chrome/browser/extensions/external_registry_loader_win.cc File chrome/browser/extensions/external_registry_loader_win.cc (right): https://codereview.chromium.org/2809293004/diff/20001/chrome/browser/extensions/external_registry_loader_win.cc#newcode207 chrome/browser/extensions/external_registry_loader_win.cc:207: LoadFinished(); On 2017/04/12 19:32:06, Devlin wrote: > I *think* ...
3 years, 8 months ago (2017-04-12 20:56:22 UTC) #15
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/2809293004/40001
3 years, 8 months ago (2017-04-12 21:47:28 UTC) #22
commit-bot: I haz the power
3 years, 8 months ago (2017-04-12 22:46:22 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/57972e07b6e78e5eb245e617f814...

Powered by Google App Engine
This is Rietveld 408576698