The following HTML code triggers an assertion on Fennec Native (mozilla-central, debug build, rev 448f554f6acb): <script> var x = navigator; var y = x["mimeTypes"]; y.setAttribute("onseeked", ""); </script>
Created attachment 672944 [details] [diff] [review] Take out invalid assertion The assertion is now on line 308, and I think it's invalid and can just be taken out. Top of the gdb backtrace: (gdb) bt #0 nsMIMEInfoAndroid::SetPrimaryExtension (this=0x657fdf40, aExtension=...) at /Users/kats/zspace/mozilla-git/uriloader/exthandler/android/nsMIMEInfoAndroid.cpp:308 #1 0x63af495a in nsMIMEInfoAndroid::GetMimeInfoForMimeType (aMimeType=..., aMimeInfo=0x5e0b74b4) at /Users/kats/zspace/mozilla-git/uriloader/exthandler/android/nsMIMEInfoAndroid.cpp:61 #2 0x63af3e0e in nsOSHelperAppService::GetMIMEInfoFromOS (this=<optimized out>, aMIMEType=..., aFileExt=..., aFound=0x5e0b76a6) at /Users/kats/zspace/mozilla-git/uriloader/exthandler/android/nsOSHelperAppService.cpp:28 #3 0x63aed3e2 in nsExternalHelperAppService::GetFromTypeAndExtension (this=0x65558fa0, aMIMEType=..., aFileExt=..., _retval=0x5e0b7870) at /Users/kats/zspace/mozilla-git/uriloader/exthandler/nsExternalHelperAppService.cpp:2478 #4 0x637991f8 in nsMimeTypeArray::GetNamedItem (this=0x663cc780, aName=..., aResult=0x5e0b78f8) at /Users/kats/zspace/mozilla-git/dom/base/nsMimeTypeArray.cpp:128 #5 0x6379f868 in nsNamedArraySH::NewResolve (this=0x610a86c0, wrapper=0x657fde40, cx=0x5ffa0e80, obj=0x60dac2a0, id=..., flags=1, objp=0x5e0b79b0, _retval=0x5e0b79bf) at /Users/kats/zspace/mozilla-git/dom/base/nsDOMClassInfo.cpp:8368 The fileExt passed in to info->SetPrimaryExtension from nsMIMEInfoAndroid::GetMimeInfoForMimeType is empty because java returns an empty file extension for the invalid mime type.
Attachment #672944 - Flags: review?(blassey.bugs)
Attachment #672944 - Flags: review?(blassey.bugs) → review+
I think at one point we had fallback code to never have an empty file extension. For example "image/jpeg" would fallback to ".jpeg" Perhaps we should add that back?
(In reply to Brad Lassey [:blassey] from comment #2) > I think at one point we had fallback code to never have an empty file > extension. For example "image/jpeg" would fallback to ".jpeg" Perhaps we > should add that back? Maybe, but in this case the mimetype being queried is "setAttribute" so i don't think that would help. https://hg.mozilla.org/integration/mozilla-inbound/rev/33d6f55a0b7a
Assignee: nobody → bugmail.mozilla
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
You need to log in before you can comment on or make changes to this bug.