[Webkit-unassigned] [Bug 10038] New: Length of navigator.mimeTypes collection returns number of installed plugins, not number of registered mime types

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Thu Jul 20 19:15:38 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=10038

           Summary: Length of navigator.mimeTypes collection returns number
                    of installed plugins, not number of registered mime
                    types
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh PowerPC
               URL: http://www.andrew.cmu.edu/user/firebird/bug-
                    regression.html
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: phoenix1701 at gmail.com


(This bug is a regression from Safari 419.3.)

The "navigator.mimeTypes" collection is supposed to store a list of all
registered MIME types for which the browser has a handler.  In the nightly
WebKit builds, however, querying the length of this collection in the WebKit
nightly returns the length of the navigator.plugins collection instead.

Since this is typically much less than the number of registered MIME types, a
script looping over all the registered types will only access the first n of
them, where n is the number of installed plugins.  Attempting to access
out-of-bounds indices that are within the bounds of the actual array does work
as expected:

>> navigator.mimeTypes.length
<< 14
>> navigator.mimeTypes[70]
<< "audio/x-aiff"

which leads me to believe that it's simply the wrong length being returned.

REDUCTION:

The URL for this bug points to a simple reduction of the bug, using Safari's
"Help > Installed Plug-ins" page is a template.  Scroll to the bottom to see
the incorrect behavior.

As this will cripple any script attempting to loop over all the installed
plugins (as Apple's own plugin example does), this bug is considered a critical
one.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list