diff options
author | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 09:13:52 +0000 |
---|---|---|
committer | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 09:13:52 +0000 |
commit | 3a72769978d5d76ae95982b1f7b34b5743c3390f (patch) | |
tree | 0a544e3a5566b309dd38356f38ca1794ef1eb680 /content/renderer | |
parent | 2b64f29cec2b525b1d4e4caac7c6995eec004f2d (diff) | |
download | chromium_src-3a72769978d5d76ae95982b1f7b34b5743c3390f.zip chromium_src-3a72769978d5d76ae95982b1f7b34b5743c3390f.tar.gz chromium_src-3a72769978d5d76ae95982b1f7b34b5743c3390f.tar.bz2 |
Make RendererPpapiHostImpl work with NaCl instances, which change modules.
Changes RendererPpapiHostImpl to let the instance determine if it's valid for a
given module.
Adds a method to PluginInstance to determine if the instance is valid for a
module. This allows us to check against the current module and the original one.
BUG=Ppapi resource refactoring
TEST=browser_tests
Review URL: https://chromiumcodereview.appspot.com/11795006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/pepper/renderer_ppapi_host_impl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc index 8eba13a..fdc2459 100644 --- a/content/renderer/pepper/renderer_ppapi_host_impl.cc +++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc @@ -137,7 +137,7 @@ RendererPpapiHostImpl* RendererPpapiHostImpl::GetForPPInstance( if (!instance) return NULL; - // All modules created by content will have their embedders state be the + // All modules created by content will have their embedder state be the // host impl. return static_cast<RendererPpapiHostImpl*>( instance->module()->GetEmbedderState()); @@ -261,7 +261,7 @@ PluginInstance* RendererPpapiHostImpl::GetAndValidateInstance( PluginInstance* instance = HostGlobals::Get()->GetInstance(pp_instance); if (!instance) return NULL; - if (instance->module() != module_) + if (!instance->IsValidInstanceOf(module_)) return NULL; return instance; } |