Closed Bug 382702 Opened 18 years ago Closed 14 years ago

Nonexistant about: url should show an error page rather than throwing a dialog

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: netrolller.3d, Assigned: torisugari)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Currently, if the user attempts to go to a nonexistent about: URL (like about:nothing), he/she is greeted with an intrusive error dialog. I suspect that the same happens if a FRAME, OBJECT or IFRAME attempts to load such a page. This is definitely unacceptable. We need error pages, like for the rest of the errors.
->All/All.
OS: Windows Vista → All
Hardware: PC → All
Component: Networking → Embedding: Docshell
QA Contact: networking → docshell
We already have a bug on the "use error page when we can't create URI" problem, no? This would be a duplicate.
Whiteboard: DUPEME
(In reply to Boris Zbarsky (:bz) from comment #4) > We already have a bug on the "use error page when we can't create URI" > problem, no? This would be a duplicate. I can't find another "backout of bug 291876" bug. How about setting "about:blank"? i.e. for an "about:nothing" request, docshell::currentURI: "about:blank" onLocationChange: "about:blank" Session history: "about:blank" Global history / bookmark: kick. content.location.href: "about:blank" contentDocument.documentURI: "about:neterror?e=malformedURI&u=about:nothing&d=Hey,%20watch%20out!" URLbar: "about:blank" or "about:nothing" The session history will work with this kind of hack?
Attached patch proposal v1Splinter Review
It seems to me the session history works as expected.
Blocks: 616843
Attachment #581971 - Flags: review?(cbiesinger)
Comment on attachment 581971 [details] [diff] [review] proposal v1 Interesting. Yeah, this should work, and it seems reasonable to me. One thing, do add a comment above your NS_NewURI call describing why you're adding this.
Attachment #581971 - Flags: review?(cbiesinger) → review+
Assignee: nobody → torisugari
Oh. I don't have enough time to write a new patch for a month or two. (In reply to Christian :Biesinger (don't email me, ping me on IRC) from comment #7) > do add a comment above your NS_NewURI call describing why you're > adding this. Then, something like this: +// Something is wrong with converting from |aURL| to |aURI|. We don't like to let |mFailedURI| NULL (see bug 291876), we provisionally set "about:blank" instead.
If Christian signs off on a particular comment, I'm happy to update the patch and land it.
(In reply to Josh Matthews [:jdm] from comment #9) > If Christian signs off on a particular comment, I'm happy to update the > patch and land it. Thank you very much! Maybe you've already realized or not, this patch heavily (?) depends on bug 312680's landing. And, btw, I should have put |rv| outside of the {} block and have made it reusable if that is not too confusing to other developers.
Depends on: 312680
Comment on attachment 581971 [details] [diff] [review] proposal v1 I'd go for: // We need a URI object to store a session history entry, so make up a URI
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
in one of the older bugs, restoring about:blank on session restore caused a large performance hit. was this fixed, or does the fix for this bug cause this problem again?
Depends on: 867957
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: