Index: content/browser/renderer_host/render_message_filter.cc |
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc |
index 9d6b5b91d8104730610c7c56a308f7de3b2372d6..48bde7f7f24f1d73293be31d258af7576275c882 100644 |
--- a/content/browser/renderer_host/render_message_filter.cc |
+++ b/content/browser/renderer_host/render_message_filter.cc |
@@ -709,7 +709,7 @@ void RenderMessageFilter::OnOpenChannelToPepperPlugin( |
void RenderMessageFilter::OnDidCreateOutOfProcessPepperInstance( |
int plugin_child_id, |
int32 pp_instance, |
- int render_view_id, |
+ PepperRendererInstanceData instance_data, |
bool is_external) { |
// It's important that we supply the render process ID ourselves based on the |
// channel the message arrived on. We use the |
@@ -717,16 +717,18 @@ void RenderMessageFilter::OnDidCreateOutOfProcessPepperInstance( |
// mapping to decide how to handle messages received from the (untrusted) |
// plugin, so an exploited renderer must not be able to insert fake mappings |
// that may allow it access to other render processes. |
+ DCHECK(instance_data.render_process_id == 0); |
+ instance_data.render_process_id = render_process_id_; |
if (is_external) { |
// We provide the BrowserPpapiHost to the embedder, so it's safe to cast. |
BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>( |
GetContentClient()->browser()->GetExternalBrowserPpapiHost( |
plugin_child_id)); |
if (host) |
- host->AddInstanceForView(pp_instance, render_process_id_, render_view_id); |
+ host->AddInstance(pp_instance, instance_data); |
} else { |
PpapiPluginProcessHost::DidCreateOutOfProcessInstance( |
- plugin_child_id, pp_instance, render_process_id_, render_view_id); |
+ plugin_child_id, pp_instance, instance_data); |
} |
} |
@@ -740,7 +742,7 @@ void RenderMessageFilter::OnDidDeleteOutOfProcessPepperInstance( |
GetContentClient()->browser()->GetExternalBrowserPpapiHost( |
plugin_child_id)); |
if (host) |
- host->DeleteInstanceForView(pp_instance); |
+ host->DeleteInstance(pp_instance); |
} else { |
PpapiPluginProcessHost::DidDeleteOutOfProcessInstance( |
plugin_child_id, pp_instance); |