[Webkit-unassigned] [Bug 27651] [Qt] QWebPluginDatabase API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 3 13:00:17 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27651


Simon Hausmann <hausmann at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hausmann at webkit.org




--- Comment #29 from Simon Hausmann <hausmann at webkit.org>  2009-08-03 13:00:16 PDT ---
(In reply to comment #25)
> (In reply to comment #24)
> > (From update of attachment 33766 [details] [details])
> > r=me
> > 
> > +    if (plugin && !plugin->mimeToExtensions().contains(mimeType))
> > 
> > I would formulate this one the other way around:
> > 
> > if (!plugin || plugin->mimeToExtension().contains(mimeType))
> >     return;
> > 
> > What do you think?
> 
> That was not the purpose. We want to set the plugin only if it supports the
> given mime type or is null (because that will reset the setting).
> 
> Or did you mean:
> 
> if (!plugin || plugin->mimeToExtension().contains(mimeType))
>     m_preferredPlugins.set(mimeType.lower(), plugin);
> 
> ?

Ahh, yes and no. I think what I found strange was that it would allow for a
null plugin pointer to be passed, which doesn't seem intentional. Perhaps it
would make sense to separate the null pointer check from the extension check,
i.e. make the method return if (!plugin) regardless. Does that make any sense?
:)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list