diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 13:22:18 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 13:22:18 +0000 |
commit | 4ef18aaad580ef76fd5d0121b8df41c90118cea4 (patch) | |
tree | f1a3cf07d2182ef579d4d736b61a57a6fb29fe14 /content | |
parent | 02541a4e8ab1648c0fe984c37eda493f2ffde881 (diff) | |
download | chromium_src-4ef18aaad580ef76fd5d0121b8df41c90118cea4.zip chromium_src-4ef18aaad580ef76fd5d0121b8df41c90118cea4.tar.gz chromium_src-4ef18aaad580ef76fd5d0121b8df41c90118cea4.tar.bz2 |
Change GetFontListAsync() to use the blocking pool.
PPB_Font_Dev.GetFontFamilies() is a sync operation that waits for GetFontListAsync() to finish on the FILE thread in the browser process.
If the thread is busy, it could hang for quite a while.
Some Pepper Flash hangs are caused by this.
BUG=155931
TEST=None
Review URL: https://chromiumcodereview.appspot.com/11143028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/font_list_async.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/browser/font_list_async.cc b/content/browser/font_list_async.cc index 032cfdb..819e62b 100644 --- a/content/browser/font_list_async.cc +++ b/content/browser/font_list_async.cc @@ -20,7 +20,7 @@ void ReturnFontListToOriginalThread( callback.Run(result.Pass()); } -void GetFontListOnFileThread( +void GetFontListInBlockingPool( BrowserThread::ID calling_thread_id, const base::Callback<void(scoped_ptr<base::ListValue>)>& callback) { scoped_ptr<base::ListValue> result(GetFontList_SlowBlocking()); @@ -38,8 +38,8 @@ void GetFontListAsync( DCHECK(well_known_thread) << "Can only call GetFontList from a well-known thread."; - BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, - base::Bind(&GetFontListOnFileThread, id, callback)); + BrowserThread::PostBlockingPoolTask(FROM_HERE, + base::Bind(&GetFontListInBlockingPool, id, callback)); } } // namespace content |