Bug 1293062 - Plugin permissions are confused between Flash and the VLC plugin. Fix this by checking that the plugin name for the special Flash plugin is "Shockwave Flash", which is true of Adobe Flash but not replacement plugins such as VLC or even gnash. This causes other plugins to have their own pref tag so that users can enable/disable them separately. r=jimm
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 24 Aug 2016 12:40:17 -0400
changeset 407626 75ab2126e8087b538868ecf9439c7f9163bce9f3
parent 407625 fdf0f27af56b0ebcfece8ff25136048616e3b723
child 407627 90664e24b3bb3dbfaad623ca52b980105bbe213e
child 407743 6203381730cf2ac9f1ad56ce94b1fb0fd9573f8c
child 408094 eec752971334e5b2d3e63715a363adbd32fc196d
push id27999
push usercykesiopka.bmo@gmail.com
push dateTue, 30 Aug 2016 17:35:37 +0000
reviewersjimm
bugs1293062
milestone51.0a1
Bug 1293062 - Plugin permissions are confused between Flash and the VLC plugin. Fix this by checking that the plugin name for the special Flash plugin is "Shockwave Flash", which is true of Adobe Flash but not replacement plugins such as VLC or even gnash. This causes other plugins to have their own pref tag so that users can enable/disable them separately. r=jimm MozReview-Commit-ID: 3sGKO4S3U8U
dom/plugins/base/nsPluginTags.cpp
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -355,18 +355,22 @@ void nsPluginTag::InitMime(const char* c
 
     // Look for certain special plugins.
     switch (nsPluginHost::GetSpecialType(mimeType)) {
       case nsPluginHost::eSpecialType_Java:
         mIsJavaPlugin = true;
         mSupportsAsyncInit = true;
         break;
       case nsPluginHost::eSpecialType_Flash:
-        mIsFlashPlugin = true;
-        mSupportsAsyncInit = true;
+        // VLC sometimes claims to implement the Flash MIME type, and we want
+        // to allow users to control that separately from Adobe Flash.
+        if (Name().EqualsLiteral("Shockwave Flash")) {
+          mIsFlashPlugin = true;
+          mSupportsAsyncInit = true;
+        }
         break;
       case nsPluginHost::eSpecialType_Silverlight:
       case nsPluginHost::eSpecialType_Unity:
       case nsPluginHost::eSpecialType_Test:
         mSupportsAsyncInit = true;
         break;
       case nsPluginHost::eSpecialType_None:
       default: