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

Unified Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 7277077: While initializing the pepper plugin registry in the renderer we load each plugin and attempt to ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « webkit/plugins/ppapi/plugin_module.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_module.cc
===================================================================
--- webkit/plugins/ppapi/plugin_module.cc (revision 91570)
+++ webkit/plugins/ppapi/plugin_module.cc (working copy)
@@ -422,6 +422,7 @@
name_(name),
path_(path),
reserve_instance_id_(NULL) {
+ memset(&entry_points_, 0, sizeof(entry_points_));
pp_module_ = ResourceTracker::Get()->AddModule(this);
GetMainThreadMessageLoop(); // Initialize the main thread message loop.
GetLivePluginSet()->insert(this);
@@ -451,8 +452,11 @@
}
bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) {
- entry_points_ = entry_points;
- return InitializeModule();
+ if (InitializeModule(entry_points)) {
+ entry_points_ = entry_points;
+ return true;
+ }
+ return false;
}
bool PluginModule::InitAsLibrary(const FilePath& path) {
@@ -460,12 +464,14 @@
if (!library)
return false;
- if (!LoadEntryPointsFromLibrary(library, &entry_points_) ||
- !InitializeModule()) {
+ EntryPoints entry_points;
+
+ if (!LoadEntryPointsFromLibrary(library, &entry_points) ||
+ !InitializeModule(entry_points)) {
base::UnloadNativeLibrary(library);
return false;
}
-
+ entry_points_ = entry_points;
library_ = library;
return true;
}
@@ -576,9 +582,10 @@
return webkit_forwarding_.get();
}
-bool PluginModule::InitializeModule() {
+bool PluginModule::InitializeModule(const EntryPoints& entry_points) {
DCHECK(!out_of_process_proxy_.get()) << "Don't call for proxied modules.";
- int retval = entry_points_.initialize_module(pp_module(), &GetInterface);
+ DCHECK(entry_points.initialize_module != NULL);
+ int retval = entry_points.initialize_module(pp_module(), &GetInterface);
if (retval != 0) {
LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
return false;
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698