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

Issue 2630443003: Add thread checks to NaClBrowser, and make it leaky (Closed)

Created:
3 years, 11 months ago by Wez
Modified:
3 years, 9 months ago
Reviewers:
bradnelson, Daniel Erat, sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add thread checks to NaClBrowser, and make it leaky. This makes the following fixes to NaClBrowser: 1. Removes use of WeakPtr to allow in-progress file I/O to be abandoned when NaClBrowser is torn-down; this never worked as intended, since the WeakPtrs were used on the I/O thread while NaClBrowser was torn- down via the Singleton::OnExit handler, on the UI thread. 2. Adds thread checks to NaClBrowser to ensure it is only called from the browser's I/O thread. 3. Changes the signature of SetDelegate() to express that the caller no longer owns the supplied NaClBrowserDelegate. 4. Leaks the NaClBrowser and NaClBrowserDelegate, rather than cleaning them up on exit, since at present they have no cleanup to do. Review-Url: https://codereview.chromium.org/2630443003 Cr-Commit-Position: refs/heads/master@{#452697} Committed: https://chromium.googlesource.com/chromium/src/+/72c5d6e04f39f920ea41eb20d56c593fbf83a70c

Patch Set 1 #

Patch Set 2 : More cleanups #

Patch Set 3 : Move SetDelegate(nullptr) to ClearAndDeleteDelegateForTest() #

Total comments: 3

Patch Set 4 : Rebase #

Patch Set 5 : Use static methods for tests to set debug stub port listener #

Patch Set 6 : Update NaClGdbDebugStubTest #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -68 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/test/nacl/nacl_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M components/nacl/browser/nacl_browser.h View 1 2 3 4 6 chunks +23 lines, -24 lines 0 comments Download
M components/nacl/browser/nacl_browser.cc View 1 2 3 4 16 chunks +67 lines, -27 lines 1 comment Download
M components/nacl/browser/nacl_file_host_unittest.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M components/nacl/browser/test_nacl_browser_delegate.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M extensions/shell/browser/shell_browser_main_parts.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 45 (31 generated)
Wez
Brad, could you PTAL? NaClBrowser / NaClBrowserDelegate have some threading issues that I'm trying to ...
3 years, 11 months ago (2017-01-12 02:41:06 UTC) #3
Wez
https://codereview.chromium.org/2630443003/diff/40001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2630443003/diff/40001/chrome/browser/chrome_browser_main.cc#newcode1655 chrome/browser/chrome_browser_main.cc:1655: browser_process_->profile_manager())); bradnelson: Is it possible to move this to ...
3 years, 11 months ago (2017-01-14 01:53:11 UTC) #15
Wez
Pingy. :)
3 years, 11 months ago (2017-01-18 00:42:24 UTC) #16
Wez
Ping - WDYT re the threading issues here?
3 years, 11 months ago (2017-01-26 22:26:04 UTC) #17
Wez
Bard, PTAL - had to make ugly changes to allow tests to be lazy about ...
3 years, 10 months ago (2017-02-18 01:19:19 UTC) #30
bradnelson
lgtm https://codereview.chromium.org/2630443003/diff/100001/components/nacl/browser/nacl_browser.cc File components/nacl/browser/nacl_browser.cc (right): https://codereview.chromium.org/2630443003/diff/100001/components/nacl/browser/nacl_browser.cc#newcode201 components/nacl/browser/nacl_browser.cc:201: NOTREACHED(); Good idea
3 years, 10 months ago (2017-02-23 03:07:43 UTC) #31
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/2630443003/100001
3 years, 10 months ago (2017-02-23 03:16:16 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/370938)
3 years, 10 months ago (2017-02-23 03:25:46 UTC) #35
Wez
derat: Plz OWNERS shell_browser_main_parts.cc sky: Plz OWNERS chrome_browser_main.cc Thanks :)
3 years, 10 months ago (2017-02-23 03:32:02 UTC) #37
Daniel Erat
lgtm for extensions/shell/
3 years, 10 months ago (2017-02-23 04:21:45 UTC) #38
sky
LGTM
3 years, 10 months ago (2017-02-23 19:58:02 UTC) #39
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/2630443003/100001
3 years, 10 months ago (2017-02-24 00:30:03 UTC) #41
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/72c5d6e04f39f920ea41eb20d56c593fbf83a70c
3 years, 10 months ago (2017-02-24 00:54:23 UTC) #44
Wez
3 years, 9 months ago (2017-03-01 17:38:05 UTC) #45
Message was sent while issue was closed.
Brad: I'm concerned that this may actually create artificial dependencies across
NaClBrowser tests, since the NaClBrowser is no longer torn-down.

I'm wondering whether we need a clean shutdown mechanism for NaClBrowser, for
tests..?

Powered by Google App Engine
This is Rietveld 408576698