Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Unified Diff: content/renderer/pepper/host_dispatcher_wrapper.h

Issue 589213003: PPAPI: Never re-enter JavaScript for PostMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make MessageChannel observer clean up more reliably, guarantee HungPluginFilter stays alive long en… Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/pepper/host_dispatcher_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/host_dispatcher_wrapper.h
diff --git a/content/renderer/pepper/host_dispatcher_wrapper.h b/content/renderer/pepper/host_dispatcher_wrapper.h
index e5349178ed2abd35fde3f677527926e54e1b83b3..fc5655de91838c17099ec97a07f65631d6166f1b 100644
--- a/content/renderer/pepper/host_dispatcher_wrapper.h
+++ b/content/renderer/pepper/host_dispatcher_wrapper.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_RENDERER_PEPPER_HOST_DISPATCHER_WRAPPER_H_
#define CONTENT_RENDERER_PEPPER_HOST_DISPATCHER_WRAPPER_H_
+#include "base/memory/ref_counted.h"
#include "base/process/process_handle.h"
+#include "content/renderer/pepper/pepper_hung_plugin_filter.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/ppp.h"
#include "ppapi/proxy/host_dispatcher.h"
@@ -34,7 +36,7 @@ class HostDispatcherWrapper {
bool Init(const IPC::ChannelHandle& channel_handle,
PP_GetInterface_Func local_get_interface,
const ppapi::Preferences& preferences,
- PepperHungPluginFilter* filter);
+ scoped_refptr<PepperHungPluginFilter> filter);
// Implements GetInterface for the proxied plugin.
const void* GetProxiedInterface(const char* name);
@@ -69,6 +71,9 @@ class HostDispatcherWrapper {
scoped_ptr<ppapi::proxy::HostDispatcher> dispatcher_;
scoped_ptr<ppapi::proxy::ProxyChannel::Delegate> dispatcher_delegate_;
+ // We hold the hung_plugin_filter_ to guarantee it outlives |dispatcher_|,
+ // since it is an observer of |dispatcher_| for sync calls.
+ scoped_refptr<PepperHungPluginFilter> hung_plugin_filter_;
};
} // namespace content
« no previous file with comments | « no previous file | content/renderer/pepper/host_dispatcher_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698