summaryrefslogtreecommitdiffstats
path: root/content/browser/in_process_webkit/webkit_thread.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 22:05:31 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 22:05:31 +0000
commit8786b90ec7b8c0706ab4173faa4861f6ddc50eca (patch)
tree61a3f4349cd8154d8cf98782ffd0e122e56c17d8 /content/browser/in_process_webkit/webkit_thread.cc
parent86f24311984327d522d060bceb8adacfad64c896 (diff)
downloadchromium_src-8786b90ec7b8c0706ab4173faa4861f6ddc50eca.zip
chromium_src-8786b90ec7b8c0706ab4173faa4861f6ddc50eca.tar.gz
chromium_src-8786b90ec7b8c0706ab4173faa4861f6ddc50eca.tar.bz2
Revert 128993 - Refactor BaseTimer to avoid spamming the MessageLoop with orphaned tasks.
This change maintains the same API promises*, but instead of orphaning tasks when they are stopped, the BaseTimer_Helper class holds on to the task until either (1) it expires or (2) the user requests a delay that would arrive earlier than the pending task. If the user requests a longer delay than the pending task, a followup task will be posted when the pending task fires to span the remaining time. * The one change of usage is related to threading. The threading requirements are now more strict. It is not allowed to destruct a timer on a different thread than the one used to post tasks. A thread ID DCHECK is now in place that will help catch misuse. Some existing instances are changed as part of this CL. A side effect of this change is that the BaseTimer and DelayTimer are simplified to use features of BaseTimer_Helper (which is now called Timer). As suggested in timer.h, I ran the disabled TimerTest tests from linux, and they pass consistently. I also added some new tests to verify correct run states. BUG=117451,103667,119714,119750 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128412 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=128506 Review URL: https://chromiumcodereview.appspot.com/9655006 TBR=jbates@chromium.org Review URL: https://chromiumcodereview.appspot.com/9791009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/in_process_webkit/webkit_thread.cc')
-rw-r--r--content/browser/in_process_webkit/webkit_thread.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/content/browser/in_process_webkit/webkit_thread.cc b/content/browser/in_process_webkit/webkit_thread.cc
index db0cd07..bb1ae40 100644
--- a/content/browser/in_process_webkit/webkit_thread.cc
+++ b/content/browser/in_process_webkit/webkit_thread.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -66,10 +66,6 @@ void WebKitThread::InternalWebKitThread::Init() {
void WebKitThread::InternalWebKitThread::CleanUp() {
DCHECK(webkit_platform_support_.get());
WebKit::shutdown();
- // Delete BrowserWebKitPlatformSupportImpl now while on the same thread that
- // constructed it. (This prevents the WebKit shared timer from being destroyed
- // on a different thread than the one using it.)
- webkit_platform_support_.reset();
}
} // namespace content