diff options
author | Ben Murdoch <benm@google.com> | 2011-01-20 11:51:18 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-01-20 11:53:21 +0000 |
commit | 30e3c5655f359d936aed6862d2ff1b749904c0cb (patch) | |
tree | 56c6918168759f0dee110367bf897cd424e22351 /webkit | |
parent | b77e7ebdce2a50e06c5e02e39a19bf7c26236f5a (diff) | |
download | external_chromium-30e3c5655f359d936aed6862d2ff1b749904c0cb.zip external_chromium-30e3c5655f359d936aed6862d2ff1b749904c0cb.tar.gz external_chromium-30e3c5655f359d936aed6862d2ff1b749904c0cb.tar.bz2 |
Merge Chromium at 9.0.597.76: Trivial merge by Git
Change-Id: I3a36375821806209cd5c303c78225428396c5010
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 28aba02..670f589 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -283,24 +283,17 @@ extern "C" { // Allocates memory from the host's memory space. void* NPN_MemAlloc(uint32_t size) { - scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton()); - if (host != NULL) { - // Note: We must use the same allocator/deallocator - // that is used by the javascript library, as some of the - // JS APIs will pass memory to the plugin which the plugin - // will attempt to free. - return malloc(size); - } - return NULL; + // Note: We must use the same allocator/deallocator + // that is used by the javascript library, as some of the + // JS APIs will pass memory to the plugin which the plugin + // will attempt to free. + return malloc(size); } // Deallocates memory from the host's memory space void NPN_MemFree(void* ptr) { - scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton()); - if (host != NULL) { - if (ptr != NULL && ptr != reinterpret_cast<void*>(-1)) - free(ptr); - } + if (ptr != NULL && ptr != reinterpret_cast<void*>(-1)) + free(ptr); } // Requests that the host free a specified amount of memory. |