commit be1920b7172dec6f6e3be0110e686d6632e444c1 Author: Arlo Breault arlolra@gmail.com Date: Tue Mar 22 23:42:58 2016 -0700
block-plugins.mozpatch -> trac-16475.mozpatch --- projects/instantbird/block-plugins.mozpatch | 53 ----------------------------- projects/instantbird/config | 2 +- projects/instantbird/trac-16475.mozpatch | 53 +++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/projects/instantbird/block-plugins.mozpatch b/projects/instantbird/block-plugins.mozpatch deleted file mode 100644 index 6e4586a..0000000 --- a/projects/instantbird/block-plugins.mozpatch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp ---- a/dom/plugins/base/nsPluginHost.cpp -+++ b/dom/plugins/base/nsPluginHost.cpp -@@ -2085,6 +2085,26 @@ - } - } - -+PRBool nsPluginHost::GhettoBlacklist(nsIFile *pluginFile) -+{ -+ nsCString leaf; -+ const char *leafStr; -+ nsresult rv; -+ -+ rv = pluginFile->GetNativeLeafName(leaf); -+ if (NS_FAILED(rv)) { -+ return PR_TRUE; // blacklist. -+ } -+ -+ leafStr = leaf.get(); -+ -+ if (!leafStr) { -+ return PR_TRUE; // blacklist. -+ } -+ -+ return PR_TRUE; // blacklist. -+} -+ - typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void); - - nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, -@@ -2194,6 +2214,10 @@ - continue; - } - -+ if (GhettoBlacklist(localfile)) { -+ continue; -+ } -+ - // if it is not found in cache info list or has been changed, create a new one - if (!pluginTag) { - nsPluginFile pluginFile(localfile); -diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h ---- a/dom/plugins/base/nsPluginHost.h -+++ b/dom/plugins/base/nsPluginHost.h -@@ -334,6 +334,8 @@ - // Loads all cached plugins info into mCachedPlugins - nsresult ReadPluginInfo(); - -+ PRBool GhettoBlacklist(nsIFile *pluginFile); -+ - // Given a file path, returns the plugins info from our cache - // and removes it from the cache. - void RemoveCachedPluginsInfo(const char *filePath, diff --git a/projects/instantbird/config b/projects/instantbird/config index 61ae74c..d039aed 100644 --- a/projects/instantbird/config +++ b/projects/instantbird/config @@ -115,7 +115,7 @@ input_files: - filename: 0001-Bug-1197281-Use-MOZ_FIND_WINSDK_VERSION-for-MOZ_WINS.mozpatch enable: '[% c("var/windows") %]' - filename: Bug-9173-Change-the-default-Firefox-profile-director.mozpatch - - filename: block-plugins.mozpatch + - filename: trac-16475.mozpatch - filename: OSX-package-as-tar.bz2.mozpatch enable: '[% c("var/osx") %]' - filename: 'mozconfig-[% c("var/osname") %]' diff --git a/projects/instantbird/trac-16475.mozpatch b/projects/instantbird/trac-16475.mozpatch new file mode 100644 index 0000000..6e4586a --- /dev/null +++ b/projects/instantbird/trac-16475.mozpatch @@ -0,0 +1,53 @@ +diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp +--- a/dom/plugins/base/nsPluginHost.cpp ++++ b/dom/plugins/base/nsPluginHost.cpp +@@ -2085,6 +2085,26 @@ + } + } + ++PRBool nsPluginHost::GhettoBlacklist(nsIFile *pluginFile) ++{ ++ nsCString leaf; ++ const char *leafStr; ++ nsresult rv; ++ ++ rv = pluginFile->GetNativeLeafName(leaf); ++ if (NS_FAILED(rv)) { ++ return PR_TRUE; // blacklist. ++ } ++ ++ leafStr = leaf.get(); ++ ++ if (!leafStr) { ++ return PR_TRUE; // blacklist. ++ } ++ ++ return PR_TRUE; // blacklist. ++} ++ + typedef NS_NPAPIPLUGIN_CALLBACK(char *, NP_GETMIMEDESCRIPTION)(void); + + nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, +@@ -2194,6 +2214,10 @@ + continue; + } + ++ if (GhettoBlacklist(localfile)) { ++ continue; ++ } ++ + // if it is not found in cache info list or has been changed, create a new one + if (!pluginTag) { + nsPluginFile pluginFile(localfile); +diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h +--- a/dom/plugins/base/nsPluginHost.h ++++ b/dom/plugins/base/nsPluginHost.h +@@ -334,6 +334,8 @@ + // Loads all cached plugins info into mCachedPlugins + nsresult ReadPluginInfo(); + ++ PRBool GhettoBlacklist(nsIFile *pluginFile); ++ + // Given a file path, returns the plugins info from our cache + // and removes it from the cache. + void RemoveCachedPluginsInfo(const char *filePath,
tor-commits@lists.torproject.org