diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 16:37:54 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 16:37:54 +0000 |
commit | 097d4edc2c748cf3d1c2e7a2ce7b4f232998cd8c (patch) | |
tree | bb5492ff39f7b73b3f2dbd56786b59f0121c322e /content/browser/plugin_process_host.cc | |
parent | a531e9bdfbe80bc7cec4d5b8e8527ee04df0108e (diff) | |
download | chromium_src-097d4edc2c748cf3d1c2e7a2ce7b4f232998cd8c.zip chromium_src-097d4edc2c748cf3d1c2e7a2ce7b4f232998cd8c.tar.gz chromium_src-097d4edc2c748cf3d1c2e7a2ce7b4f232998cd8c.tar.bz2 |
Add a flag to disable the Carbon interpose library in Mac NPAPI
Allows testing without the Carbon in Mac plugins, to see how many of the
major plugins rely on Carbon calls (directly, or via indirect calls from
Cocoa to Carbon).
This is an incremental step to hopefully being able to remove this library
all together now that most plugins have hopefully moved away from
depending on Carbon.
BUG=157130
Review URL: https://chromiumcodereview.appspot.com/11236028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_process_host.cc')
-rw-r--r-- | content/browser/plugin_process_host.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index 29ec5f4..7d8b89f 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -221,21 +221,23 @@ bool PluginProcessHost::Init(const webkit::WebPluginInfo& info) { #if defined(OS_POSIX) base::EnvironmentVector env; #if defined(OS_MACOSX) && !defined(__LP64__) - std::string interpose_list = - content::GetContentClient()->GetCarbonInterposePath(); - if (!interpose_list.empty()) { - // Add our interposing library for Carbon. This is stripped back out in - // plugin_main.cc, so changes here should be reflected there. - const char* existing_list = - getenv(plugin_interpose_strings::kDYLDInsertLibrariesKey); - if (existing_list) { - interpose_list.insert(0, ":"); - interpose_list.insert(0, existing_list); + if (!browser_command_line.HasSwitch(switches::kDisableCarbonInterposing)) { + std::string interpose_list = + content::GetContentClient()->GetCarbonInterposePath(); + if (!interpose_list.empty()) { + // Add our interposing library for Carbon. This is stripped back out in + // plugin_main.cc, so changes here should be reflected there. + const char* existing_list = + getenv(plugin_interpose_strings::kDYLDInsertLibrariesKey); + if (existing_list) { + interpose_list.insert(0, ":"); + interpose_list.insert(0, existing_list); + } } + env.push_back(std::pair<std::string, std::string>( + plugin_interpose_strings::kDYLDInsertLibrariesKey, + interpose_list)); } - env.push_back(std::pair<std::string, std::string>( - plugin_interpose_strings::kDYLDInsertLibrariesKey, - interpose_list)); #endif #endif |