Index: webkit/plugins/npapi/plugin_host.cc |
=================================================================== |
--- webkit/plugins/npapi/plugin_host.cc (revision 70377) |
+++ webkit/plugins/npapi/plugin_host.cc (working copy) |
@@ -292,24 +292,17 @@ |
// Allocates memory from the host's memory space. |
void* NPN_MemAlloc(uint32_t size) { |
- scoped_refptr<PluginHost> host(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<PluginHost> host(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. |