From 82d7c2e9709a4624c08b451bed9625218ab4fb5c Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Wed, 11 May 2011 17:42:43 +0000 Subject: Don't send ReleaseResource notifications to the browser for fonts. They have no corresponding host resource so this would spew a lot of errors. Review URL: http://codereview.chromium.org/6982027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84997 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/plugin_resource_tracker.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ppapi/proxy') diff --git a/ppapi/proxy/plugin_resource_tracker.cc b/ppapi/proxy/plugin_resource_tracker.cc index 0abae90..24d1281 100644 --- a/ppapi/proxy/plugin_resource_tracker.cc +++ b/ppapi/proxy/plugin_resource_tracker.cc @@ -161,8 +161,10 @@ void PluginResourceTracker::ReleasePluginResourceRef( // dispatcher can be NULL if the plugin held on to a resource after the // instance was destroyed. In that case the browser-side resource has - // already been freed correctly on the browser side. - if (notify_browser_on_release && dispatcher) { + // already been freed correctly on the browser side. The host_resource + // will be NULL for proxy-only resources, which we obviously don't need to + // tell the host about. + if (notify_browser_on_release && dispatcher && !host_resource.is_null()) { dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( INTERFACE_ID_PPB_CORE, host_resource)); } -- cgit v1.1