[Webkit-unassigned] [Bug 16815] Crash with navigator.plugins and navigator.mimeTypes after plugins.refresh

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 25 07:40:15 PST 2008


------- Comment #20 from darin at apple.com  2008-02-25 07:40 PDT -------
(From update of attachment 19346)
Changes look great.

+    // Version is everything in the user agent string past the "Mozilla/"
+    String userAgent = frame->loader()->userAgent(frame->document() ?
frame->document()->url() : KURL());
+    return jsString(userAgent.substring(userAgent.find('/') + 1));

I'd suggest leaving this part of appVersion in the Navigator object, and
calling jsString(imp->appVersion()) here in the JSNavigator binding.

+            for (Frame* frame = (*it)->mainFrame(); frame; frame =
+                if (frame->loader()->containsPlugins())
+                    framesNeedingReload.append(frame);

Our formatting rules would say that this for statement needs braces (the if
statement doesn't).

+#include <wtf/PassRefPtr.h>

Compiling things that include parameters and return values of type PassRefPtr
only requires <wtf/Forward.h>, although that's not critical.

+        MimeType(PassRefPtr<PluginData> pluginData, unsigned index);

We'd normally omit the parameter name "pluginData" here.

+    for (Vector<RefPtr<Frame> >::iterator it = framesNeedingReload.begin(); it
!= framesNeedingReload.end(); ++it)
+        (*it)->loader()->reload();

There's no real benefit to using an iterator to iterate a vector. It's probably
better practice to use indexing instead for vectors.

Obviously I can't say review+ for a patch that doesn't yet contain the changes
needed to compile on Mac OS X and Windows. So I'm not sure what to do next
here. I guess I can apply the patch myself and try to finish it on each

Configure bugmail: http://bugs.webkit.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