Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Issue 9384024: Prefer ScopedNestableTaskAllower over manual save/restore (Closed)

Created:
8 years, 10 months ago by dhollowa
Modified:
8 years, 10 months ago
CC:
chromium-reviews, asanka, ncarter (slow), jam, sadrul, akalin, tfarina, Raghu Simha, kkania, Randy Smith (Not in Mondays), dcheng, cbentzel+watch_chromium.org, joi+watch-content_chromium.org, robertshield, pam+watch_chromium.org, rdsmith+dwatch_chromium.org, brettw-cc_chromium.org, darin (slow to review), tim (not reviewing), willchan no longer on Chromium
Visibility:
Public.

Description

Prefer ScopedNestableTaskAllower over manual save/restore Cleanup. Changes various calls sites to use the ScopedNestableTaskAllower class to save/restore nestable task state. BUG=None TEST=Existing unit tests [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=121914

Patch Set 1 #

Total comments: 38

Patch Set 2 : Addressing review comments. #

Patch Set 3 : Address willchan's comments #

Patch Set 4 : Backing out client_socket_pool_base_unittest change #

Patch Set 5 : Rename back to "allow". #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -106 lines) Patch
M base/message_loop.h View 1 2 chunks +10 lines, -5 lines 0 comments Download
M base/message_loop_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M base/tracked_objects.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/automation/automation_provider_win.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/printing/print_job.cc View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/printing/print_view_manager.cc View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 1 chunk +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/simple_message_box_views.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc View 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/webui/downloads_dom_handler.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/ui_test_utils.cc View 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/download/drag_download_file.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M content/renderer/devtools_agent.cc View 1 chunk +1 line, -3 lines 0 comments Download
M ipc/ipc_sync_channel.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M net/base/file_stream_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M net/socket/transport_client_socket_pool_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ppapi/proxy/ppb_testing_proxy.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M webkit/database/database_connections.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 chunk +1 line, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl.cc View 1 chunk +1 line, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc View 1 2 3 1 chunk +4 lines, -6 lines 0 comments Download
M webkit/support/webkit_support.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M webkit/tools/test_shell/test_shell_devtools_agent.cc View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
dhollowa
Hello various owners! This is what I had in mind: jar -> base scottbyer -> ...
8 years, 10 months ago (2012-02-11 02:08:12 UTC) #1
Ryan Sleevi
net/ LGTM, but a few comments below https://chromiumcodereview.appspot.com/9384024/diff/1/base/message_loop.h File base/message_loop.h (right): https://chromiumcodereview.appspot.com/9384024/diff/1/base/message_loop.h#newcode74 base/message_loop.h:74: // // ...
8 years, 10 months ago (2012-02-11 02:17:21 UTC) #2
Scott Byer
LGTM for chrome/browser/printing/print_job.cc chrome/browser/printing/print_view_manager.cc On 2012/02/11 02:08:12, dhollowa wrote: > Hello various owners! This is ...
8 years, 10 months ago (2012-02-11 02:17:57 UTC) #3
tony
webkit LGTM except for the part rsleevi mentioned. Not sure if it matters there so ...
8 years, 10 months ago (2012-02-11 02:56:20 UTC) #4
jar (doing other things)
I detest nested message loops, and their use is endlessly fraught with peril. All code ...
8 years, 10 months ago (2012-02-11 03:24:37 UTC) #5
jar (doing other things)
Scott, could you comment on my questions in those files? Thanks, Jim On Fri, Feb ...
8 years, 10 months ago (2012-02-11 03:25:52 UTC) #6
brettw
ppapi lgtm
8 years, 10 months ago (2012-02-11 05:25:10 UTC) #7
dhollowa
http://codereview.chromium.org/9384024/diff/1/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/9384024/diff/1/base/message_loop.h#newcode74 base/message_loop.h:74: // // Process |hr| (the result returned by DoDragDrop()). ...
8 years, 10 months ago (2012-02-13 17:44:25 UTC) #8
dhollowa
On 2012/02/11 03:24:37, jar wrote: > [...] > If anything, I'd suggest adding an alarming ...
8 years, 10 months ago (2012-02-13 17:51:21 UTC) #9
jar (doing other things)
Darin, Can you take a look at the snippets below that are attributed to you? ...
8 years, 10 months ago (2012-02-13 18:03:01 UTC) #10
sky
LGTM
8 years, 10 months ago (2012-02-13 18:28:10 UTC) #11
akalin
sync lgtm
8 years, 10 months ago (2012-02-13 22:23:31 UTC) #12
dhollowa
jar: Ok if I land this CL and follow up on the print issues out-of-band?
8 years, 10 months ago (2012-02-14 01:31:45 UTC) #13
willchan no longer on Chromium
http://codereview.chromium.org/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc File net/socket/client_socket_pool_base_unittest.cc (right): http://codereview.chromium.org/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc#newcode1416 net/socket/client_socket_pool_base_unittest.cc:1416: within_callback_ = true; On 2012/02/13 17:44:26, dhollowa wrote: > ...
8 years, 10 months ago (2012-02-14 01:43:41 UTC) #14
jar (doing other things)
I'm fine with you landing... as it is an improvement. LGTM Please consider removing the ...
8 years, 10 months ago (2012-02-14 01:51:42 UTC) #15
willchan no longer on Chromium
https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc File net/socket/client_socket_pool_base_unittest.cc (right): https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc#newcode1441 net/socket/client_socket_pool_base_unittest.cc:1441: base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10)); Jim's suggestion sounds correct to me here, we ...
8 years, 10 months ago (2012-02-14 01:54:09 UTC) #16
dhollowa
http://codereview.chromium.org/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc File net/socket/client_socket_pool_base_unittest.cc (right): http://codereview.chromium.org/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc#newcode1416 net/socket/client_socket_pool_base_unittest.cc:1416: within_callback_ = true; On 2012/02/14 01:43:42, willchan wrote: > ...
8 years, 10 months ago (2012-02-14 03:19:49 UTC) #17
sky
https://chromiumcodereview.appspot.com/9384024/diff/1/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc File chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc (right): https://chromiumcodereview.appspot.com/9384024/diff/1/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc#newcode217 chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc:217: result_op = aura::client::GetDragDropClient()->StartDragAndDrop( On 2012/02/14 01:51:43, jar wrote: > ...
8 years, 10 months ago (2012-02-14 04:45:05 UTC) #18
dhollowa
https://chromiumcodereview.appspot.com/9384024/diff/1/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc File chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc (right): https://chromiumcodereview.appspot.com/9384024/diff/1/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc#newcode217 chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc:217: result_op = aura::client::GetDragDropClient()->StartDragAndDrop( On 2012/02/14 04:45:05, sky wrote: > ...
8 years, 10 months ago (2012-02-14 05:42:19 UTC) #19
dhollowa
https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc File net/socket/client_socket_pool_base_unittest.cc (right): https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc#newcode1441 net/socket/client_socket_pool_base_unittest.cc:1441: base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10)); On 2012/02/14 03:19:49, dhollowa wrote: > On 2012/02/14 ...
8 years, 10 months ago (2012-02-14 16:35:50 UTC) #20
sky
\On Mon, Feb 13, 2012 at 9:42 PM, <[email protected]> wrote: > > https://chromiumcodereview.appspot.com/9384024/diff/1/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc > File ...
8 years, 10 months ago (2012-02-14 20:28:55 UTC) #21
willchan no longer on Chromium
8 years, 10 months ago (2012-02-14 20:31:39 UTC) #22
On Tue, Feb 14, 2012 at 8:35 AM, <[email protected]> wrote:

>
> https://chromiumcodereview.**appspot.com/9384024/diff/1/**
>
net/socket/client_socket_pool_**base_unittest.cc<https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc>
> File net/socket/client_socket_pool_**base_unittest.cc (right):
>
> https://chromiumcodereview.**appspot.com/9384024/diff/1/**
>
net/socket/client_socket_pool_**base_unittest.cc#newcode1441<https://chromiumcodereview.appspot.com/9384024/diff/1/net/socket/client_socket_pool_base_unittest.cc#newcode1441>
> net/socket/client_socket_pool_**base_unittest.cc:1441:
> base::PlatformThread::Sleep(**base::TimeDelta::**FromMilliseconds(10));
> On 2012/02/14 03:19:49, dhollowa wrote:
>
>> On 2012/02/14 01:54:10, willchan wrote:
>> > Jim's suggestion sounds correct to me here, we can get rid of the
>> > ScopedNestableTaskAllower.
>> >
>> > On 2012/02/14 01:51:43, jar wrote:
>> > > What about removing this allow call??
>> > >
>> > > On 2012/02/11 03:24:38, jar wrote:
>> > > > This doesn't make sense to me.  All we're doing is sleeping
>>
> (blocking the
>
>> > > > current thread).  We're not running a task.  I think we should
>>
> remove the
>
>> > > > Allower completely.
>> > > >
>> > > > ...alternatively... you could investigate the history of this
>>
> code... and
>
>> > see
>> > > > how we got here... and see if we dropped some critical code on
>>
> the floor.
>
>> > >
>> >
>>
>
>  Done.
>>
>
> I had to restore the ScopedNestableTaskAllower because removing it hung
> the ClientSocketPoolBaseTest.**RequestPendingJobTwice test.
>

I don't understand why, but OK. It's not your fault in any case. Please add
it to the existing bug you created for that file. We'll fix it in the
future.


>
>
https://chromiumcodereview.**appspot.com/9384024/<https://chromiumcodereview....
>

Powered by Google App Engine
This is Rietveld 408576698