NS_ERROR_FACTORY_NOT_REGISTERED from nsIDocShellHistory.useGlobalHistory opening view source

RESOLVED FIXED in mozilla1.9.1b3

Status

()

Toolkit
View Source
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: philor, Assigned: cbartley)

Tracking

({fixed1.9.1})

Trunk
mozilla1.9.1b3
fixed1.9.1
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
Bug 17612 added some front-end support for browsing within view-source (which itself is going to be... interesting in a client that doesn't expose http:), and includes back and forward by adding things to session history.

We, of course, don't have global history, so the part where the |disablehistory="true"| was removed from the view-source browser means we now squawk in the error console when the browser constructor tries to wire up global history.
(Assignee)

Comment 1

10 years ago
I believe that we can restore the "disablehistory=true", and create our session history programmatically in JavaScript.  This would permit us to use history when available and punt when it's not.  I'm not suggesting that's the best way to approach this problem, but it's one alternative.
(Reporter)

Comment 2

10 years ago
Might be what it takes, since disablehistory is just the tip - Tb has a viewSourceOverlay already, so I overlaid disablehistory back in, but then I hit the next failure from nsIWebNavigation.canGoBack...
(Assignee)

Comment 3

10 years ago
It might be better just to maintain history manually inside viewSource and not rely on the nsDocShell code at all for this.  ViewSource clearly needs some basic functionality, but other stuff, e.g. visited links, etc. may not be that important.
(In reply to comment #0)
> We, of course, don't have global history, so the part where the
> |disablehistory="true"| was removed from the view-source browser means we now
> squawk in the error console when the browser constructor tries to wire up
> global history.

I guess you don't have session history either? view-source doesn't really care about global history, it just relies on session history. We could have the browser fail gracefully initing global history if that's really the only problem, or allow disabling it specifically.

I don't think it's a good idea to re-implement docshell code in view-source. We should instead make the view-source code handle missing session history without reporting exceptions.
(Reporter)

Comment 5

10 years ago
I would have thought we had session history - isn't it implemented in docshell?
Yeah, I guess so. Perhaps we should just have browser.xml catch NS_ERROR_FACTORY_NOT_REGISTERED specifically and ignore it?

Comment 7

10 years ago
I also get this error if I click on a link from a warning/error in the error console (I also get another error, but this is bug 459790). E.g. open the addressbook to trigger the "timed textboxes" warning in the error console and click on that link.

Error: [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIDocShellHistory.useGlobalHistory]"  nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)"  location: "JS frame :: chrome://global/content/bindings/browser.xml ::  :: line 643"  data: no]
Source File: chrome://global/content/bindings/browser.xml
Line: 647

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081112 Shredder/3.0b1pre
(Assignee)

Comment 8

10 years ago
Created attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

The real problem here appears to be that we can't use the session history for navigation without also touching global history, which Thunderbird doesn't have.  This patch doesn't fix that problem, but it does completely turn off the BACK/FORWARD UI and logic when the view-source browser has disablehistory="true", which seems like a good idea anyway.  This will prevent the exception and error message originally reported in this bug.
Attachment #348078 - Flags: review?(gavin.sharp)
Attachment #348078 - Flags: review?(gavin.sharp) → review+
Comment on attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

This will break if someone dynamically removes the disablehistory attribute after onload, but that's not a case we need to worry about. r=me
(Assignee)

Comment 10

10 years ago
Comment on attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

Requesting approval for post-beta 2.  This bug is causing Thunderbird some inconvenience.  With the patch, they will be able to turn off history in view-source, eliminating the annoying exception and error message.  It should be a low risk change for Firefox since these changes won't have any effect with history enabled.
Attachment #348078 - Flags: approval1.9.1?

Comment 11

10 years ago
Still seeing this error report with Shredder build:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081116 Shredder/3.0b1pre

Are there any projections for when this will drop off the Error Console RADAR?
(Assignee)

Comment 12

10 years ago
(In reply to comment #11)
> Still seeing this error report with Shredder build:
> Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081116
> Shredder/3.0b1pre
> 
> Are there any projections for when this will drop off the Error Console RADAR?

You will need to add <<<disablehistory="true">>> to the browser element at the bottom of mozilla/toolkit/components/viewsource/content/viewSource.xul.  That's not part of the patch since we don't won't to disable it for Firefox.  (According to Philor's comment #2, there's a Thunderbird-specific overlay for viewSource.xul that would probably be the best place to put this tag)

Also note that the exception:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]

is not related.  See bug 459790.

Comment 13

10 years ago
(In reply to comment #12)
> You will need to add <<<disablehistory="true">>> to the browser element at the
> bottom of mozilla/toolkit/components/viewsource/content/viewSource.xul.  That's
> not part of the patch since we don't won't to disable it for Firefox.

Is this the reason why I still get the error on my patched (this patch) Thunderbird build?
(Reporter)

Comment 14

10 years ago
Not that I could ever imagine a situation where approval requests off the beaten path would be ignored, but let's move this over to view source, where the bulk of it will be.
Assignee: nobody → cbartley
Component: General → View Source
Product: Thunderbird → Toolkit
QA Contact: general → view.source
(Reporter)

Comment 15

10 years ago
Created attachment 349127 [details] [diff] [review]
Make disablehistory="true" in Thunderbird view-source
[Checkin: Comment 21]

Seems to quiet things down nicely, without breaking much of anything.
Attachment #349127 - Flags: review?(mkmelin+mozilla)

Updated

10 years ago
Attachment #349127 - Flags: review?(mkmelin+mozilla) → review+

Comment 16

10 years ago
I apply this patches for one week on my own builds now. And since that I doesn't get any error (in the TB error console) anymore.  :)

Comment 17

10 years ago
(In reply to comment #15)
> Created an attachment (id=349127) [details]
> Make disablehistory="true" in Thunderbird view-source
> 
> Seems to quiet things down nicely, without breaking much of anything.

Has this patch landed for Shredder? I still see the Error with the 20081126 Windows build.
Comment on attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

a191=beltzner
Attachment #348078 - Flags: approval1.9.1? → approval1.9.1+
(Assignee)

Comment 19

10 years ago
I don't have check-in privileges yet.  Can someone check this patch in for me?
Keywords: checkin-needed
Comment on attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

http://hg.mozilla.org/mozilla-central/rev/7650cecd9913
Attachment #348078 - Attachment description: Disable all BACK/FORWARD UI and logic when disablehistory="true". → Disable all BACK/FORWARD UI and logic when disablehistory="true" [Checkin: Comment 20]
Comment on attachment 349127 [details] [diff] [review]
Make disablehistory="true" in Thunderbird view-source
[Checkin: Comment 21]

http://hg.mozilla.org/comm-central/rev/4211efe014b4
Attachment #349127 - Attachment description: Make disablehistory="true" in Thunderbird view-source → Make disablehistory="true" in Thunderbird view-source [Checkin: Comment 21]
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Whiteboard: [c-n: (m-c patch) baking for 1.9.1]
Target Milestone: --- → mozilla1.9.2a1
(Reporter)

Updated

10 years ago
Duplicate of this bug: 468409
Comment on attachment 348078 [details] [diff] [review]
Disable all BACK/FORWARD UI and logic when disablehistory="true"
[Checkin: Comment 20 & 23]

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/e1489e75e0e5
Attachment #348078 - Attachment description: Disable all BACK/FORWARD UI and logic when disablehistory="true" [Checkin: Comment 20] → Disable all BACK/FORWARD UI and logic when disablehistory="true" [Checkin: Comment 20 & 23]
Keywords: checkin-needed → fixed1.9.1
Whiteboard: [c-n: (m-c patch) baking for 1.9.1]
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.