[webkit-reviews] review granted: [Bug 48046] WebKit shouldn't load a plug-in based on file extension if a MIME type is specified. : [Attachment 71401] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 21 08:21:06 PDT 2010


Eric Carlson <eric.carlson at apple.com> has granted Andy Estes
<aestes at apple.com>'s request for review:
Bug 48046: WebKit shouldn't load a plug-in based on file extension if a MIME
type is specified.
https://bugs.webkit.org/show_bug.cgi?id=48046

Attachment 71401: Patch
https://bugs.webkit.org/attachment.cgi?id=71401&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=71401&action=review

r=me with the suggested changes

>> WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:1632
>> +	if (!pluginPackage && [extension length] != 0 && [MIMEType length] ==
0) {
> 
> Should we be using [extension length] && ![MIMEType length] and get rid of
the comparisons with 0?

Indeed, please follow current WebKit style even though the old code is
incorrect.

>
LayoutTests/plugins/invalid-mime-with-valid-extension-shows-missing-plugin.html
:19
>  

I would guess that the data: url will be delivered to the plug-in much faster
than the test file, so I think you have a potential race condition here even
with the setTimeout(0). I think you may want to use the test file for both
plug-in instances and use a non-zero timeout instead.


More information about the webkit-reviews mailing list