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

Issue 1153143002: Fix race condition in WebstoreInstallHelper (Closed)

Created:
5 years, 7 months ago by Marc Treib
Modified:
5 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race condition in WebstoreInstallHelper. Before this CL, several member variables were accessed concurrently on the UI and IO threads. Fix this by using the SafeJsonParser helper class which handles the thread hopping, so that the WebstoreInstallHelper can live completely on the UI thread. Committed: https://crrev.com/8457c218e1df6bf2789658cd9c6205c08c2f1d41 Cr-Commit-Position: refs/heads/master@{#332171}

Patch Set 1 #

Total comments: 3

Patch Set 2 : new and improved! #

Total comments: 3

Patch Set 3 : RefCounted non-ThreadSafe #

Patch Set 4 : fix memleak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -86 lines) Patch
M chrome/browser/extensions/webstore_install_helper.h View 1 2 3 chunks +14 lines, -20 lines 0 comments Download
M chrome/browser/extensions/webstore_install_helper.cc View 1 2 3 4 chunks +28 lines, -66 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
Marc Treib
PTAL! https://codereview.chromium.org/1153143002/diff/1/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc File chrome/browser/bitmap_fetcher/bitmap_fetcher.cc (left): https://codereview.chromium.org/1153143002/diff/1/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc#oldcode40 chrome/browser/bitmap_fetcher/bitmap_fetcher.cc:40: DCHECK_CURRENTLY_ON(content::BrowserThread::UI); I don't think this DCHECK should be ...
5 years, 7 months ago (2015-05-27 08:23:04 UTC) #2
asargent_no_longer_on_chrome
See inline comment for a potential problem with the URLRequestContextGetter. Also, if we stick with ...
5 years, 7 months ago (2015-05-27 16:49:24 UTC) #3
Marc Treib
I've found a better way of doing the whole thing: Using SafeJsonParser. Now WebstoreInstallHelper doesn't ...
5 years, 6 months ago (2015-05-28 10:03:50 UTC) #4
asargent_no_longer_on_chrome
nice, lgtm https://codereview.chromium.org/1153143002/diff/20001/chrome/browser/extensions/webstore_install_helper.h File chrome/browser/extensions/webstore_install_helper.h (right): https://codereview.chromium.org/1153143002/diff/20001/chrome/browser/extensions/webstore_install_helper.h#newcode38 chrome/browser/extensions/webstore_install_helper.h:38: : public base::RefCountedThreadSafe<WebstoreInstallHelper>, On 2015/05/28 10:03:49, Marc ...
5 years, 6 months ago (2015-05-28 17:08:47 UTC) #5
Marc Treib
https://codereview.chromium.org/1153143002/diff/20001/chrome/browser/extensions/webstore_install_helper.h File chrome/browser/extensions/webstore_install_helper.h (right): https://codereview.chromium.org/1153143002/diff/20001/chrome/browser/extensions/webstore_install_helper.h#newcode38 chrome/browser/extensions/webstore_install_helper.h:38: : public base::RefCountedThreadSafe<WebstoreInstallHelper>, On 2015/05/28 17:08:47, Antony Sargent wrote: ...
5 years, 6 months ago (2015-05-29 07:48:49 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153143002/40001
5 years, 6 months ago (2015-05-29 07:49:04 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/11788)
5 years, 6 months ago (2015-05-29 09:18:45 UTC) #11
Marc Treib
I've uploaded a new patchset that fixes the memleak. What happened was: When constructing the ...
5 years, 6 months ago (2015-05-29 11:56:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153143002/60001
5 years, 6 months ago (2015-06-01 07:49:06 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 6 months ago (2015-06-01 09:05:51 UTC) #16
commit-bot: I haz the power
5 years, 6 months ago (2015-06-01 09:06:52 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8457c218e1df6bf2789658cd9c6205c08c2f1d41
Cr-Commit-Position: refs/heads/master@{#332171}

Powered by Google App Engine
This is Rietveld 408576698