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

Issue 3872002: Thread IO safety: file_util annotated, IO thread blocked from doing IO (Closed)

Created:
10 years, 2 months ago by Evan Martin
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, cbentzel+watch_chromium.org, ben+cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org, Erik does not do reviews, Aaron Boodman, Paweł Hajdan Jr.
Visibility:
Public.

Description

Thread IO safety: annotate file_util, and block IO thread from doing IO - Mark functions in file_util_posix as requiring permission to perform disk actions. - Mark the IO thread as disallowed from performing disk actions. - Temporarily work around the protections in places where we currently have bugs. BUG=59847, 59849, 60207, 60211 TEST=no dchecks in debug builds Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63600

Patch Set 1 #

Patch Set 2 : ui tests sorta work #

Patch Set 3 : works #

Patch Set 4 : ok #

Patch Set 5 : extra file #

Total comments: 16

Patch Set 6 : ok #

Patch Set 7 : more #

Patch Set 8 : even more #

Patch Set 9 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -8 lines) Patch
M base/file_util_posix.cc View 1 2 3 4 5 6 24 chunks +35 lines, -0 lines 0 comments Download
M base/shared_memory_posix.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M base/thread_restrictions.h View 1 2 3 4 5 2 chunks +24 lines, -3 lines 0 comments Download
M base/thread_restrictions.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/autoupdate_interceptor.cc View 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/net/url_request_mock_http_job.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/net/url_request_mock_util.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/printing/print_dialog_cloud_uitest.cc View 4 3 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/service/service_process_control.cc View 8 2 chunks +9 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_resource.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M net/url_request/url_request_file_job.cc View 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
Evan Martin
jam: FYI will: you might as well review, since we discussed this so much
10 years, 2 months ago (2010-10-21 17:24:04 UTC) #1
willchan no longer on Chromium
I just took a look at your thread_restrictions.cc implementation. Isn't this going to crash on ...
10 years, 2 months ago (2010-10-21 17:45:54 UTC) #2
Evan Martin
On 2010/10/21 17:45:54, willchan wrote: > I just took a look at your thread_restrictions.cc implementation. ...
10 years, 2 months ago (2010-10-21 17:51:16 UTC) #3
Evan Martin
On 2010/10/21 17:45:54, willchan wrote: > I just took a look at your thread_restrictions.cc implementation. ...
10 years, 2 months ago (2010-10-21 18:07:45 UTC) #4
willchan no longer on Chromium
http://codereview.chromium.org/3872002/diff/12001/13001 File base/file_util_posix.cc (right): http://codereview.chromium.org/3872002/diff/12001/13001#newcode53 base/file_util_posix.cc:53: if (!realpath(path.value().c_str(), buf)) Are you ignoring this one on ...
10 years, 2 months ago (2010-10-21 18:45:06 UTC) #5
willchan no longer on Chromium
http://codereview.chromium.org/3872002/diff/12001/13011 File chrome/test/out_of_proc_test_runner.cc (right): http://codereview.chromium.org/3872002/diff/12001/13011#newcode488 chrome/test/out_of_proc_test_runner.cc:488: // Run AtExit handlers once per iteration. On 2010/10/21 ...
10 years, 2 months ago (2010-10-21 18:50:53 UTC) #6
Evan Martin
Landed the leak fix, responded to your comments. http://codereview.chromium.org/3872002/diff/12001/13001 File base/file_util_posix.cc (right): http://codereview.chromium.org/3872002/diff/12001/13001#newcode53 base/file_util_posix.cc:53: if ...
10 years, 2 months ago (2010-10-21 20:43:02 UTC) #7
willchan no longer on Chromium
LGTM http://codereview.chromium.org/3872002/diff/12001/13001 File base/file_util_posix.cc (right): http://codereview.chromium.org/3872002/diff/12001/13001#newcode565 base/file_util_posix.cc:565: if (!getcwd(system_buffer, sizeof(system_buffer))) { On 2010/10/21 20:43:02, Evan ...
10 years, 2 months ago (2010-10-21 20:57:40 UTC) #8
Evan Martin
Note new file in this change: chrome/browser/service/service_process_control.cc http://codereview.chromium.org/3872002/diff/12001/13002 File base/shared_memory_posix.cc (right): http://codereview.chromium.org/3872002/diff/12001/13002#newcode152 base/shared_memory_posix.cc:152: // and ...
10 years, 2 months ago (2010-10-21 21:54:50 UTC) #9
Evan Martin
Oops, mentioned your earlier LGTM (my only changes since that are to put more AssertIOAllowed ...
10 years, 2 months ago (2010-10-21 22:45:52 UTC) #10
Evan Martin
10 years, 2 months ago (2010-10-21 22:46:04 UTC) #11
On 2010/10/21 22:45:52, Evan Martin wrote:
> Oops, mentioned your earlier LGTM (my only changes since that are to put more

s/mentioned/missed/

> AssertIOAllowed and to mark one more buggy file)

Powered by Google App Engine
This is Rietveld 408576698