Closed
Bug 708525
Opened 13 years ago
Closed 13 years ago
about: pages do not load favicons
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox11 affected, firefox12 affected, firefox13 affected, fennec11+)
People
(Reporter: mfinkle, Assigned: mfinkle)
References
Details
Attachments
(1 file)
4.61 KB,
patch
|
lucasr
:
review+
|
Details | Diff | Splinter Review |
The favicon loading fails because we try to turn "about:foo" into a Java URL, which fails, and we are casting the faviconURL connection to HTTP, whcih fails for a "jar:" URL.
This patch only tries to turn the page URL into a Java URL if we need it for the fallback favicon.ico, which about: pages can't use anyway.
The patch also uses a simpler URLConnection as long as possible, only casting to an HttpURLConnection when we need to disconnect. That is not supported in URLConnection itself.
Tested and about:home now loads a favicon. All http favicons still work too, including "favicon.ico" fallbacks.
Attachment #579966 -
Flags: review?(lucasr.at.mozilla)
Comment 1•13 years ago
|
||
Comment on attachment 579966 [details] [diff] [review]
patch
Review of attachment 579966 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with nits fixed and questions answered.
::: mobile/android/base/Favicons.java
@@ +298,5 @@
> ByteArrayInputStream byteStream = null;
> BitmapDrawable image = null;
>
> try {
> + urlConnection = faviconUrl.openConnection();
You're generalizing this code to handle different types of connections such as what? Just checking.
@@ +313,5 @@
> }
> } catch (Exception e) {
> Log.d(LOGTAG, "Error downloading favicon: " + e);
> } finally {
> + if (urlConnection != null && urlConnection instanceof HttpURLConnection) {
Is it enough to only cover HttpURLConnection here? What about, say, HttpsURLConnection?
@@ +316,5 @@
> } finally {
> + if (urlConnection != null && urlConnection instanceof HttpURLConnection) {
> + HttpURLConnection httpConnection = (HttpURLConnection) urlConnection;
> + httpConnection.disconnect();
> + }
Add empty line here.
@@ +355,5 @@
> + pageUrl = new URL(mPageUrl);
> + } catch (MalformedURLException e) {
> + Log.d(LOGTAG, "The provided URL is not valid: " + e);
> + return null;
> + }
Add empty line here.
Attachment #579966 -
Flags: review?(lucasr.at.mozilla) → review+
Assignee | ||
Comment 2•13 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #1)
> ::: mobile/android/base/Favicons.java
> > ByteArrayInputStream byteStream = null;
> > BitmapDrawable image = null;
> >
> > try {
> > + urlConnection = faviconUrl.openConnection();
>
> You're generalizing this code to handle different types of connections such
> as what? Just checking.
JarURLConnection - which is what's returned for jar: URLs, like the ones about pages end up using.
> > } catch (Exception e) {
> > Log.d(LOGTAG, "Error downloading favicon: " + e);
> > } finally {
> > + if (urlConnection != null && urlConnection instanceof HttpURLConnection) {
>
> Is it enough to only cover HttpURLConnection here? What about, say,
> HttpsURLConnection?
We were casting the urlConnection to a HttpURLConnection previously. HttpsURLConnection derives from HttpConnection, which has the disconnect method.
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mark.finkle
Priority: -- → P3
Comment 4•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•13 years ago
|
||
Note: This is broken again because of bug 709250
Updated•13 years ago
|
tracking-fennec: --- → 11+
Updated•13 years ago
|
status-firefox11:
--- → fixed
Comment 6•13 years ago
|
||
Verified fixed on:
Firefox 13.0a1 (2012-02-24)
20120224031039
http://hg.mozilla.org/mozilla-central/rev/cd120efbe4c6
Still reproducible on:
Firefox 12.0a2 (2012-02-24)
20120224042008
http://hg.mozilla.org/releases/mozilla-aurora/rev/643e4dd65350
Firefox 11.0 (2012-02-24)
20120223235138
http://hg.mozilla.org/releases/mozilla-beta/rev/0e30f13e9012
--
Device: Motorola Droid 2
OS: Android 2.3.3
status-firefox12:
--- → affected
status-firefox13:
--- → verified
OS: Linux → Android
Hardware: x86 → ARM
Version: unspecified → Trunk
Comment 7•13 years ago
|
||
I missed a tab. Sorry for the comment #6. I will check this again when bug 709250 will be fixed
status-firefox12:
affected → ---
status-firefox13:
verified → ---
Comment 8•13 years ago
|
||
Since there is no favicon for any about: page due to bug 709250, I will reopen this bug.
Status: RESOLVED → REOPENED
status-firefox12:
--- → affected
status-firefox13:
--- → affected
Resolution: FIXED → ---
Assignee | ||
Comment 9•13 years ago
|
||
Please don't reopen a bug that has been fixed. The new breakage is new. Bug 709250 covers the new breakage.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 10•13 years ago
|
||
I'm closing this bug based on the previously comment. The new breakage is covered by Bug 709250.
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•