forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix --trace-shutdown with thread-local tracing.
With thread-local tracing (r221766), TraceLog::Flush() is async and needs to be called from a thread having a message loop. It also requires that tracing has been stopped. BrowserShutdownProfileDumper is a special caller that TraceLog::Flush() was originally called from a thread without message loop. Now start another thread for flushing, and call TraceLog::SetDisabled() before TraceLog::Flush(). The calling thread needs to wait for the completion of the flush, otherwise the browser may shutdown before all trace events written. Temporarily allow the thread to wait in ThreadRestrictions. BUG=none TEST=manual run chrome with --trace-shutdown. Should not assert. Should generate correct trace file. Review URL: https://chromiumcodereview.appspot.com/24047007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223819 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
wangxianzhu@chromium.org
committed
Sep 18, 2013
1 parent
c963883
commit f9be105
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters