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

Unified Diff: webkit/plugins/npapi/plugin_lib_mac.mm

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 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 | « content/browser/utility_process_host.cc ('k') | webkit/plugins/npapi/plugin_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_lib_mac.mm
diff --git a/webkit/plugins/npapi/plugin_lib_mac.mm b/webkit/plugins/npapi/plugin_lib_mac.mm
index 542b43dcc857b74520a61da25c46329cec526179..5cb832b3c2bb171afe25899b431442d6564789fc 100644
--- a/webkit/plugins/npapi/plugin_lib_mac.mm
+++ b/webkit/plugins/npapi/plugin_lib_mac.mm
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#import <Carbon/Carbon.h>
+#import <CoreFoundation/CoreFoundation.h>
#include "webkit/plugins/npapi/plugin_lib.h"
@@ -176,24 +177,38 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
ScopedCFTypeRef<CFURLRef> bundle_url(CFURLCreateFromFileSystemRepresentation(
kCFAllocatorDefault, (const UInt8*)filename.value().c_str(),
filename.value().length(), true));
- if (!bundle_url)
+ if (!bundle_url) {
+ LOG_IF(ERROR, PluginList::DebugPluginLoading())
+ << "PluginLib::ReadWebPluginInfo could not create bundle URL";
return false;
+ }
ScopedCFTypeRef<CFBundleRef> bundle(CFBundleCreate(kCFAllocatorDefault,
bundle_url.get()));
- if (!bundle)
+ if (!bundle) {
+ LOG_IF(ERROR, PluginList::DebugPluginLoading())
+ << "PluginLib::ReadWebPluginInfo could not create CFBundleRef";
return false;
+ }
// preflight
OSType type = 0;
CFBundleGetPackageInfo(bundle.get(), &type, NULL);
- if (type != FOUR_CHAR_CODE('BRPL'))
+ if (type != FOUR_CHAR_CODE('BRPL')) {
+ LOG_IF(ERROR, PluginList::DebugPluginLoading())
+ << "PluginLib::ReadWebPluginInfo bundle is not BRPL, is " << type;
return false;
+ }
CFErrorRef error;
Boolean would_load = CFBundlePreflightExecutable(bundle.get(), &error);
- if (!would_load)
+ if (!would_load) {
+ ScopedCFTypeRef<CFStringRef> error_string(CFErrorCopyDescription(error));
+ LOG_IF(ERROR, PluginList::DebugPluginLoading())
+ << "PluginLib::ReadWebPluginInfo bundle failed preflight: "
+ << base::SysCFStringRefToUTF8(error_string);
return false;
+ }
// get the info
« no previous file with comments | « content/browser/utility_process_host.cc ('k') | webkit/plugins/npapi/plugin_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698