RESOLVED FIXED 22452
Unchecking "Enable plugins" does not have any effect on navigator.plugins
https://bugs.webkit.org/show_bug.cgi?id=22452
Summary Unchecking "Enable plugins" does not have any effect on navigator.plugins
Simo Kinnunen
Reported 2008-11-24 04:52:29 PST
Unlike in Firefox and Opera, a plugin's entry in navigator.plugins and its corresponding mimetype entries in navigator.mimeTypes are set even if plugins are disabled. Internet Explorer is of no concern because of its ActiveX plugin architecture; the aforementioned collections are always empty. Firefox (3.1b1), Flash enabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> Plugin navigator.mimeTypes['application/x-shockwave-flash'] -> MimeType navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> Plugin Firefox (3.1b1), Flash disabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> undefined navigator.mimeTypes['application/x-shockwave-flash'] -> undefined navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> throws TypeError Opera (9.62), Flash enabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> Plugin navigator.mimeTypes['application/x-shockwave-flash'] -> MimeType navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> Plugin Opera (9.62), Flash disabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> undefined navigator.mimeTypes['application/x-shockwave-flash'] -> undefined navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> throws TypeError WebKit r38699, Flash enabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> Plugin navigator.mimeTypes['application/x-shockwave-flash'] -> MimeType navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> Plugin INCONSISTENT: WebKit r38699, Flash disabled: --------------------------------------- navigator.plugins['Shockwave Flash'] -> Plugin navigator.mimeTypes['application/x-shockwave-flash'] -> MimeType navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin -> null
Attachments
Patch to fix the problem (415 bytes, patch)
2009-01-15 08:47 PST, Ariya Hidayat
no flags
patch to fix the problem (1.71 KB, patch)
2009-01-16 05:11 PST, Ariya Hidayat
no flags
updated patch, changelog (5.44 KB, patch)
2009-01-16 06:42 PST, Ariya Hidayat
aroben: review+
Mark Rowe (bdash)
Comment 1 2008-11-24 04:53:23 PST
Ariya Hidayat
Comment 2 2009-01-15 08:37:59 PST
*** Bug 23329 has been marked as a duplicate of this bug. ***
Ariya Hidayat
Comment 3 2009-01-15 08:47:32 PST
Created attachment 26758 [details] Patch to fix the problem Do not return pluginData if plugins are disabled.
Ariya Hidayat
Comment 4 2009-01-16 05:11:17 PST
Created attachment 26790 [details] patch to fix the problem Updated patch, with entry to ChangeLog.
Ariya Hidayat
Comment 5 2009-01-16 06:42:13 PST
Created attachment 26792 [details] updated patch, changelog addressing Simon's comment: safeguard some places where pluginData() might return NULL.
Adam Roben (:aroben)
Comment 6 2009-01-16 07:07:34 PST
Comment on attachment 26792 [details] updated patch, changelog r=me
Ariya Hidayat
Comment 7 2009-01-16 07:17:57 PST
Landed in r39969.
Note You need to log in before you can comment on or make changes to this bug.