Comment 19 for bug 239952

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

FWIW, it passes my current test suite (which is not as complete as I would like it to be yet), except for 1 subtest that relies on the current behaviour, which may or may not be the right thing. This behaviour is that currently, when you do getFromTypeAndExtension('wrong/type', 'knownextension'), you get a handler with a type of 'wrong/type', and 'knownextension' as the sole extension in the extensions list. The handler also doesn't equals() the handler you would get from getFromTypeAndExtension('correct/type', 'knownextension');
With your patch applied, this behaviour changes, and both handlers are similar. Boris, do you think this is a good thing ? I actually don't know what the windows or mac builds do in this case. I'll try to get the test case running on windows to see...

Also, while your patch is nice for a possible 1.9.0 fix, I think it's not the right thing to do on trunk, because it ends up duplicating work. GetFromExtension is already doing a lot that GetFromType does, which you end up doing twice, then. That part is addressed in my patch for bug #444440.