diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 19:33:52 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 19:33:52 +0000 |
commit | b5717a4f9f66283a9fe04ae1f9a3a89920d5b6b0 (patch) | |
tree | 9d14cf64e2cbeed63b232ba09a8c1274280d81b0 /webkit/tools | |
parent | bbdfcab9e264df0f264f56d8cb5f7ef61e5f96b6 (diff) | |
download | chromium_src-b5717a4f9f66283a9fe04ae1f9a3a89920d5b6b0.zip chromium_src-b5717a4f9f66283a9fe04ae1f9a3a89920d5b6b0.tar.gz chromium_src-b5717a4f9f66283a9fe04ae1f9a3a89920d5b6b0.tar.bz2 |
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
R=jar@chromium.org, scottbyer@chromium.org, sky@chromium.org, akalin@chromium.org, rsleevi@chromium.org, brettw@chromium.org, tony@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9384024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_shell_devtools_agent.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/webkit/tools/test_shell/test_shell_devtools_agent.cc b/webkit/tools/test_shell/test_shell_devtools_agent.cc index b2e4a95..e4ae508 100644 --- a/webkit/tools/test_shell/test_shell_devtools_agent.cc +++ b/webkit/tools/test_shell/test_shell_devtools_agent.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -29,10 +29,8 @@ class WebKitClientMessageLoopImpl message_loop_ = NULL; } virtual void run() { - bool old_state = message_loop_->NestableTasksAllowed(); - message_loop_->SetNestableTasksAllowed(true); + MessageLoop::ScopedNestableTaskAllower allow(message_loop_); message_loop_->Run(); - message_loop_->SetNestableTasksAllowed(old_state); } virtual void quitNow() { message_loop_->QuitNow(); |