зеркало из https://github.com/mozilla/gecko-dev.git
backing out last patch for bug 240771 - causes crashes on mac.
This commit is contained in:
Родитель
93f6d16654
Коммит
19e7aa65ac
|
@ -224,16 +224,16 @@ nsOSHelperAppService::GetMIMEInfoFromOS(const nsACString& aMIMEType,
|
|||
if (!hasDefault && miByType && miByExt) {
|
||||
// IC currently always uses nsMIMEInfoBase-derived classes.
|
||||
// When it stops doing that, this code will need changing.
|
||||
// Using dynamic_cast here so we can fail sorta gracefully if this is no
|
||||
// nsMIMEInfoMac.
|
||||
// XXX This assumes that IC will give os an nsMIMEInfoBase. I'd use
|
||||
// dynamic_cast but that crashes.
|
||||
// XXX these pBy* variables are needed because .get() returns an
|
||||
// nsDerivedSafe thingy that can't be cast to nsMIMEInfoBase*
|
||||
nsIMIMEInfo* pByType = miByType.get();
|
||||
nsIMIMEInfo* pByExt = miByExt.get();
|
||||
nsMIMEInfoMac* byType = dynamic_cast<nsMIMEInfoMac*>(pByType);
|
||||
nsMIMEInfoMac* byExt = dynamic_cast<nsMIMEInfoMac*>(pByExt);
|
||||
nsMIMEInfoBase* byType = NS_STATIC_CAST(nsMIMEInfoBase*, pByType);
|
||||
nsMIMEInfoBase* byExt = NS_STATIC_CAST(nsMIMEInfoBase*, pByExt);
|
||||
if (!byType || !byExt) {
|
||||
NS_ERROR("IC gave us an nsIMIMEInfo that's no nsMIMEInfoMac! Fix nsOSHelperAppService.");
|
||||
NS_ERROR("IC gave us an nsIMIMEInfo that's no nsMIMEInfoBase! Fix nsOSHelperAppService.");
|
||||
return nsnull;
|
||||
}
|
||||
// Copy the attributes of miByType onto miByExt
|
||||
|
|
Загрузка…
Ссылка в новой задаче