Closed
Bug 845055
Opened 11 years ago
Closed 11 years ago
"mimeType is null" in Page Info's makePreview()
Categories
(Firefox :: Page Info Window, defect)
Firefox
Page Info Window
Tracking
()
VERIFIED
FIXED
Firefox 22
People
(Reporter: jruderman, Assigned: yosy101)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Attachments
(2 files)
104 bytes,
text/html
|
Details | |
1.32 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
1. Load the testcase. 2. Open the Page Info window (press Cmd+I) JavaScript error: chrome://browser/content/pageinfo/pageInfo.js, line 987: mimeType is null I'm guessing this is a regression from bug 792968 (similar to bug 797430). https://hg.mozilla.org/mozilla-central/rev/9e32aa6fe544#l5.50 changed: > - (item instanceof HTMLObjectElement && /^image\//.test(mimeType)) || isBG) && isProtocolAllowed) { > + (item instanceof HTMLObjectElement && mimeType.startsWith("image/")) || isBG) && isProtocolAllowed) {
Comment 2•11 years ago
|
||
Yosy, can you fix this regression from your patch?
Assignee: nobody → yosy101
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #2) > Yosy, can you fix this regression from your patch? Hi, I don't have the firefox source code, I will download and compile it and will post a patch
Reporter | ||
Updated•11 years ago
|
Attachment #720096 -
Flags: review?(dao)
Comment 5•11 years ago
|
||
> - (item instanceof HTMLObjectElement && mimeType.startsWith("image/")) || isBG) && isProtocolAllowed) {
. + (item instanceof HTMLObjectElement && mimeType !== null && mimeType.startsWith("image/")) || isBG) && isProtocolAllowed) {
Does it work if you just use "&& mimeType" instead of "&& mimeType !== null" ?
(In reply to Philip Chee from comment #5) > > - (item instanceof HTMLObjectElement && mimeType.startsWith("image/")) || isBG) && isProtocolAllowed) { > . + (item instanceof HTMLObjectElement && mimeType !== null && > mimeType.startsWith("image/")) || isBG) && isProtocolAllowed) { > > Does it work if you just use "&& mimeType" instead of "&& mimeType !== null" > ? What is the difference?
Comment 7•11 years ago
|
||
>> Does it work if you just use "&& mimeType" instead of "&& mimeType !== null" ? > What is the difference? It's shorter and easier to read and makes use of Javascript truthy/falsy behaviour: <http://james.padolsey.com/javascript/truthy-falsey/>
Comment 8•11 years ago
|
||
Comment on attachment 720096 [details] [diff] [review] Patch Yes, please remove "!== null". r=me with that change. Thanks!
Attachment #720096 -
Flags: review?(dao) → review+
Reporter | ||
Comment 9•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b16eb3dac7bc
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b16eb3dac7bc
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Comment 11•11 years ago
|
||
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:23.0) Gecko/20130428 Firefox/23.0 Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20130428 Firefox/23.0 Verified as fixed on Windows 7 x64 and Ubuntu 12.04 x86_64 with latest Nightly 23.0a1 (Build ID: 20130429030926)
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•