diff options
Diffstat (limited to 'chrome/browser/chrome_plugin_host.cc')
-rw-r--r-- | chrome/browser/chrome_plugin_host.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc index 5f13109..5b09fd8 100644 --- a/chrome/browser/chrome_plugin_host.cc +++ b/chrome/browser/chrome_plugin_host.cc @@ -735,13 +735,10 @@ CPError STDCALL CPB_SendSyncMessage(CPID id, const void *data, uint32 data_len, CPError STDCALL CPB_PluginThreadAsyncCall(CPID id, void (*func)(void *), void *user_data) { - MessageLoop *message_loop = ChromeThread::GetMessageLoop(ChromeThread::IO); - if (!message_loop) { - return CPERR_FAILURE; - } - message_loop->PostTask(FROM_HERE, NewRunnableFunction(func, user_data)); - - return CPERR_SUCCESS; + bool posted = ChromeThread::PostTask( + ChromeThread::IO, FROM_HERE, + NewRunnableFunction(func, user_data)); + return posted ? CPERR_SUCCESS : CPERR_FAILURE; } CPError STDCALL CPB_OpenFileDialog(CPID id, |