Comment 32 for bug 589236

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

What's the point of the CopyBasicDataTo change? The idea of that function is to copy whatever information you have, no? The header certainly documents it as copying that info. Look up why that was done originally? In any case, in your situation I can't see why removing this line is needed.

I'm not happy with the random object-creation stuff going on here. Why not change nsGNOMERegistry to expose functions to get a helper by type or extension and use them both in your new code and in the existing nsGNOMERegistry code?

Always setting the extension on the MIME info bothers me, though I can't figure out why. This is a situation where we got a MIME info for the MIME type, right? And the only issue was that this MIME info didn't have a default handler, which is why we fell back on getting one by extension? I guess we need to set the extension there to make the whole "get default app" thing work later...

Could we fix that by actually storing the default app in the MIMEInfo at construction time instead of messing around with hitting the GNOME registry every single time someone asks something of the MIME info? Or is there a major problem with that approach? I'm not sure why it wasn't taken here to start with.