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

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed)

Created:
8 years, 8 months ago by jam
Modified:
8 years, 8 months ago
Reviewers:
brettw
CC:
chromium-reviews, cbentzel+watch_chromium.org, yusukes+watch_chromium.org, erikwright (departed), jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, MAD, brettw-cc_chromium.org, James Su, Ilya Sherman, jar (doing other things)
Visibility:
Public.

Description

Disallow UI/IO thread blocking on any other thread. By design, there's no ScopedAllowWait that is reachable by all code. From experience with ScopedAllowIO, it will be abused. So instead the existing callers (which should all be fixed other than two) are friends with ThreadRestrictions. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134114

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -34 lines) Patch
M base/synchronization/condition_variable_posix.cc View 3 chunks +3 lines, -0 lines 0 comments Download
M base/synchronization/condition_variable_win.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M base/synchronization/waitable_event_posix.cc View 3 chunks +4 lines, -2 lines 0 comments Download
M base/synchronization/waitable_event_win.cc View 4 chunks +4 lines, -0 lines 0 comments Download
M base/test/thread_test_helper.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M base/threading/simple_thread.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M base/threading/simple_thread.cc View 1 2 3 4 5 6 3 chunks +7 lines, -0 lines 0 comments Download
M base/threading/thread.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M base/threading/thread_restrictions.h View 1 2 3 4 5 3 chunks +77 lines, -0 lines 0 comments Download
M base/threading/thread_restrictions.cc View 3 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/net/predictor.cc View 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_process_sub_thread.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/text_input_client_mac.mm View 4 chunks +7 lines, -0 lines 0 comments Download
M media/audio/audio_output_controller.cc View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M net/base/file_stream_posix.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M net/base/file_stream_win.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M net/base/network_change_notifier_linux.cc View 1 2 3 chunks +27 lines, -24 lines 0 comments Download
M net/disk_cache/backend_impl.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/disk_cache/in_flight_io.cc View 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
jam
8 years, 8 months ago (2012-04-25 03:01:22 UTC) #1
brettw
Nice LGTM http://codereview.chromium.org/10151009/diff/8003/base/synchronization/condition_variable_win.cc File base/synchronization/condition_variable_win.cc (right): http://codereview.chromium.org/10151009/diff/8003/base/synchronization/condition_variable_win.cc#newcode244 base/synchronization/condition_variable_win.cc:244: void WinXPCondVar::TimedWait(const TimeDelta& max_time) { Do you ...
8 years, 8 months ago (2012-04-25 05:41:14 UTC) #2
jam
8 years, 8 months ago (2012-04-25 22:56:46 UTC) #3
http://codereview.chromium.org/10151009/diff/8003/base/synchronization/condit...
File base/synchronization/condition_variable_win.cc (right):

http://codereview.chromium.org/10151009/diff/8003/base/synchronization/condit...
base/synchronization/condition_variable_win.cc:244: void
WinXPCondVar::TimedWait(const TimeDelta& max_time) {
On 2012/04/25 05:41:14, brettw wrote:
> Do you also want to add the assert to the XP implementation? It doesn't matter
> since most developers don't use XP, but it's probably good for completeness.

Done.

Powered by Google App Engine
This is Rietveld 408576698