Bug 6112 - REGRESSION: navigator.plugins empty
Summary: REGRESSION: navigator.plugins empty
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Geoffrey Garen
URL: file:///Applications/Safari.app/Conte...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-16 04:59 PST by mitz
Modified: 2005-12-18 08:19 PST (History)
1 user (show)

See Also:


Attachments
Fix (4.37 KB, patch)
2005-12-16 09:43 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Fix (661 bytes, patch)
2005-12-16 10:00 PST, Geoffrey Garen
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2005-12-16 04:59:20 PST
navigator.plugins returns an empty PluginArray. At the same time, the following error is printed:

ERROR: config number not implemented
(.../WebCore/kwq/KWQKConfigBase.mm:123 readNumEntry)

One way to reproduce is to choose Help > Installed Plug-ins in Safari.

This is a very fresh regression.
Comment 1 mitz 2005-12-16 05:12:59 PST
The regression is due to this change in kjs_navigator.cpp r1.41:

-        KConfig c(KGlobal::dirs()->saveLocation("data","nsplugins")+"/pluginsinfo");
+        KConfig c("");
Comment 2 mitz 2005-12-16 05:14:47 PST
I should add that the simplest fix is to pass "pluginsinfo" to the constructor.
Comment 3 Geoffrey Garen 2005-12-16 09:43:22 PST
Created attachment 5115 [details]
Fix

Mitz is right. Eric thought the old code passed a single string to a
constructor that returned NULL, so he replaced that string with "". In fact,
the old code passed one string to a constructor that returned NULL, and then
concatenated "pluginsinfo" to that string. So "pluginsinfo" is what we want.
Comment 4 Geoffrey Garen 2005-12-16 09:46:07 PST
I'm going to add "Plug-ins.html" to our layout test suite when I land this.
Comment 5 Geoffrey Garen 2005-12-16 10:00:22 PST
Created attachment 5116 [details]
Fix

Previous patch had extra junk in it.
Comment 6 Eric Seidel (no email) 2005-12-16 10:03:33 PST
Comment on attachment 5116 [details]
Fix

Agreed.  Mitz and I were discussting making this an enum, etc. but that can be
done later (in my next cleanup patch!).  Thanks for fixing this.  r=me
Comment 7 Eric Seidel (no email) 2005-12-16 10:05:29 PST
Oh, as a side-note.  Plugins.html (your test) should check that navigator.plugins has above a certain 
number of plugins, or perhaps one or two which we ship by default.  Unfortunately it can't just dump all 
the plugins as those will be different between machines.  Thanks again.
Comment 8 mitz 2005-12-18 08:19:12 PST
Thanks, Geoffrey!