which make it possible to tell the thread name in crash dumps
from the call stack. Added a volatile automatic variable to
avoid global optimizers optimizing the function.
This change would help us to triage ThreadWatcher crashes
for IO thread. It would also help in debugging crashes.
R=sky, jar
Review URL: https://chromiumcodereview.appspot.com/10796079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147949 0039d316-1c4b-4281-b951-d872f2087c98
In tessts, it is possible for BrowserThread static methods like
IsWellKnownThread to get called when no message loops exists. We can
infer the answer for many methods from the fact the globals are
NULL without having to construct them. (constructing them can have the
undesireable side effect in these cases of hitting DCHECK for
MessageLoop::current() in the SequencedWorkerPool constructor)
BUG=117940
TEST=out/Debug/unit_tests --gtest_filter=TemplateURLPrepopulateDataTest.ProvidersFromPrefs
Review URL: http://codereview.chromium.org/9696034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126626 0039d316-1c4b-4281-b951-d872f2087c98
Make SequencedWorkerPool ref-counted, merge it with ::Inner, and
make its destructor private. Make users hold a scoped_refptr.
Fix bug where SequencedWorkerPool::Worker wasn't taking a reference
to the worker pool.
Rename SequencedWorkerPool::PostTask to PostTaskHelper.
Clean up includes and use forward declarations when possible.
Make SequencedWorkerPool::Shutdown completely thread-safe by merging
the terminating_ and shutdown_called_ flag. (Now that it's ref-counted,
it can be passed around multiple threads.)
Clean up includes and params in webkit/dom_storage a bit.
BUG=114329,114330
TEST=
Review URL: https://chromiumcodereview.appspot.com/9347056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123823 0039d316-1c4b-4281-b951-d872f2087c98
These functions add TimeDelta interfaces in addition to the int ms interfaces,
which will be removed at a later date.
BUG=108171
Review URL: http://codereview.chromium.org/9427023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123683 0039d316-1c4b-4281-b951-d872f2087c98
TaskRunner just has Post{,Delayed}Task(), SequencedTaskRunner
extends Executor to have ordering guarantees and PostNonNestable{,Delayed}Task(), and SingleThreadTaskRunner extends SequencedTaskRunner and guarantees execution on a single thread.
Move a bunch of methods from MessageLoopProxy into the TaskRunner classes and make it inherit from SingleThreadTaskRunner.
BUG=110973
TEST=
Review URL: https://chromiumcodereview.appspot.com/9169037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121999 0039d316-1c4b-4281-b951-d872f2087c98
and hide LeakyLazyInstanceTraits in base::internal to discourage cargo-culting
new users.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9117038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119173 0039d316-1c4b-4281-b951-d872f2087c98
[re-land of 116816 http://codereview.chromium.org/9065009]
This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays.
It also hooks up the visited link master's I/O to use this new system as a proof of concept.
Review URL: https://chromiumcodereview.appspot.com/9124033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118236 0039d316-1c4b-4281-b951-d872f2087c98
This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays.
It also hooks up the visited link master's I/O to use this new system as a proof of concept.
Review URL: http://codereview.chromium.org/9065009TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/9122022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116817 0039d316-1c4b-4281-b951-d872f2087c98
This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays.
It also hooks up the visited link master's I/O to use this new system as a proof of concept.
Review URL: http://codereview.chromium.org/9065009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116816 0039d316-1c4b-4281-b951-d872f2087c98
This also removes several accessors on BrowserProcess that are no longer used.
I wanted to remove all retrieval of MessageLoop objects via BrowserThread, but this proved harder than it looked, because several net:: classes use MessageLoop and have fairly deep assumptions that it is a real MessageLoop, e.g. they use MessageLoopForIO with its IO observers and so forth. Therefore, we now have UnsafeGetMessageLoopForThread but UnsafeGetBrowserThread is gone.
TBR=abodenha@chromium.org
BUG=98716
Review URL: http://codereview.chromium.org/8769013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113377 0039d316-1c4b-4281-b951-d872f2087c98
Instead introduce BrowserThread::UnsafeGetMessageLoop which is used in
a couple of places. This will be removed in a follow-up change. I
could have used UnsafeGetBrowserThread(id)->message_loop() but this is
even easier to search for.
Also, remove a couple of BrowserProcess accessors that aren't used by anybody, and that were using UnsafeGetBrowserThread.
TBR=battre@chromium.org
BUG=98716
Review URL: http://codereview.chromium.org/8775014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112697 0039d316-1c4b-4281-b951-d872f2087c98
Change embedding API and embedders to allow for this.
Push inheritance of base::Thread down to content::BrowserThreadImpl so
that content::BrowserThread is just a namespace for API functions.
This change temporarily disables chrome_frame_net_tests as agreed by the CF lead, see bug 105435.
TBR=ben@chromium.org (IWYU change only)
BUG=98716,104578,105435
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111695
Reverted (problems on official bot): r111698
Review URL: http://codereview.chromium.org/8477004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111705 0039d316-1c4b-4281-b951-d872f2087c98
Reason: Problems on official builders.
Change embedding API and embedders to allow for this.
Push inheritance of base::Thread down to content::BrowserThreadImpl so
that content::BrowserThread is just a namespace for API functions.
This change temporarily disables chrome_frame_net_tests as agreed by the CF lead, see bug 105435.
TBR=ben@chromium.org (IWYU change only)
BUG=98716,104578,105435
Review URL: http://codereview.chromium.org/8477004TBR=joi@chromium.org
Review URL: http://codereview.chromium.org/8718012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111698 0039d316-1c4b-4281-b951-d872f2087c98
Change embedding API and embedders to allow for this.
Push inheritance of base::Thread down to content::BrowserThreadImpl so
that content::BrowserThread is just a namespace for API functions.
This change temporarily disables chrome_frame_net_tests as agreed by the CF lead, see bug 105435.
TBR=ben@chromium.org (IWYU change only)
BUG=98716,104578,105435
Review URL: http://codereview.chromium.org/8477004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111695 0039d316-1c4b-4281-b951-d872f2087c98
Update base::Thread documentation, fix all subclasses I could find
that had a problem, and remove no-longer-necessary suppressions.
BUG=102134
Review URL: http://codereview.chromium.org/8427007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108296 0039d316-1c4b-4281-b951-d872f2087c98
This is a local fix because TSAN is complaining only about this
particular case. A follow-up change (which will likely take more
time) will make sure this is OK across the code-base.
BUG=98716,102134
Review URL: http://codereview.chromium.org/8343062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107755 0039d316-1c4b-4281-b951-d872f2087c98
Only content/ now has the ability to create BrowserThread objects,
with the exception that tests can create the
content::TestBrowserThread subclass, and (temporarily) code in chrome/
can create the DeprecatedBrowserThread subclass.
A follow-up change will make content/ take care of its own thread
creation, remove DeprecatedBrowserThread, and move all state and
non-trivial constructors from BrowserThread down to BrowserThreadImpl.
Also moved BrowserProcessSubThread into content/ namespace. As part
of follow-up cleanup, chrome/ will stop using this class.
BUG=98716
TEST=existing
Review URL: http://codereview.chromium.org/8392042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98