summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/buffered_resource_handler.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 02:50:19 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 02:50:19 +0000
commitf7a015e81a689a7518d4335b263c850511608254 (patch)
treea8fd06623ab6e51c6d126f845b90a12e2a2e89ce /chrome/browser/renderer_host/buffered_resource_handler.h
parent576949cc9cf3d9aba8633873e387607006d3477d (diff)
downloadchromium_src-f7a015e81a689a7518d4335b263c850511608254.zip
chromium_src-f7a015e81a689a7518d4335b263c850511608254.tar.gz
chromium_src-f7a015e81a689a7518d4335b263c850511608254.tar.bz2
Fix reliability bot crashes after moving plugin loading to file thread.
The problem was that the BufferedResourceHandler could now be destructed on the file thread, if the task that it posted on the IO thread completed before the code on the file thread returned. Solved this by doing manual refcounting. Review URL: http://codereview.chromium.org/171015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/buffered_resource_handler.h')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.h b/chrome/browser/renderer_host/buffered_resource_handler.h
index 1a0af52..919a675 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.h
+++ b/chrome/browser/renderer_host/buffered_resource_handler.h
@@ -9,6 +9,7 @@
#include "chrome/browser/renderer_host/resource_handler.h"
+class MessageLoop;
class ResourceDispatcherHost;
class URLRequest;
@@ -61,7 +62,12 @@ class BufferedResourceHandler : public ResourceHandler {
bool ShouldDownload(bool* need_plugin_list);
// Called on the file thread to load the list of plugins.
- void LoadPlugins();
+ static void LoadPlugins(BufferedResourceHandler* handler,
+ MessageLoop* main_message_loop);
+
+ // Runs on the main thread to notify the IO thread that plugins have been
+ // loaded. This is needed since the file thread outlives the IO thread.
+ static void NotifyPluginsLoaded(BufferedResourceHandler* handler);
// Called on the IO thread once the list of plugins has been loaded.
void OnPluginsLoaded();