Closed Bug 310828 Opened 19 years ago Closed 18 years ago

JS error when hitting try again button on an error page

Categories

(Core :: DOM: Navigation, defect)

1.8 Branch
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: whimboo, Assigned: ispiked)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051001 Firefox/1.6a1

When hitting the Try Again button on an error page following lines appears on my
console:

JavaScript error: , line 0: uncaught exception: [Exception... "Component
returned failure code: 0x804b0013 [nsIDOMNSLocation.reload]"  nsresult:
"0x804b0013 (<unknown>)"  location: "JS frame ::
about:neterror?e=deniedPortAccess&u=http%3A//www.mozilla.org%3A25/&c=UTF-8&d=www.mozilla.org%3A25%20uses%20a%20network%20port%20which%20is%20normally%20used%20for%20purposes%20other%20than%20Web%20browsing.%20Firefox%20has%20canceled%20the%20request%20for%20your%20protection.
:: retryThis :: line 98"  data: no]
###!!! ASSERTION: XPConnect is being called on a scope without a 'Components'
property!

This is pretty much always bad. It usually means that native code is
making a callback to an interface implemented in JavaScript, but the
document where the JS object was created has already been cleared and the
global properties of that document's window are *gone*. Generally this
indicates a problem that should be addressed in the design and use of the
callback code.
: 'Error', file
../../../../../../mozilla/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 564
Break: at file
../../../../../../mozilla/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 564
++DOMWINDOW == 21
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(result)) failed, file
../../../../../../mozilla/content/xml/document/src/nsXMLContentSink.cpp, line 1002
Is this a regressio?  What's the regression range, if so?
Oh, and this worksforme with current trunk Firefox (9/30) and Seamonkey (10/2) both.
*** Bug 311175 has been marked as a duplicate of this bug. ***
I can reproduce the bug using the steps from 311175.  This is not a recent
regression (occurred in trunk build 20050708 when error pages were enabled in
seamonkey).
OS: Linux → All
Oh, this is only for the file channel case?
(In reply to comment #5)
> Oh, this is only for the file channel case?

No, it happens for me for all "file not found" and "denied port access" error
cases. The error of bug 311175 is another one as mine but both result on the
same action. 

Both assertions were raised somewhere here:
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsLocation.cpp#825

The additional output which I get is only raised on debug builds:
http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcwrappednativescope.cpp#538
OS: All → Linux
I don't see any assertions.  I do see the exceptions; perhaps we should try/catch around that loadURI call in the error page?  Throwing the exception from loadURI is the right thing, maybe.  Not sure about that.
Flags: blocking1.9a1?
Summary: Assertion thrown and JS error when hitting try again button on an error page → JS error when hitting try again button on an error page
-'ing for 1.9, maybe need try/catch around loadURI -- only thing this hurts is spam in error console
Component: Embedding: Docshell → Error Console
Flags: blocking1.9a1? → blocking1.9-
Keywords: helpwanted
Product: Core → Firefox
Assignee: adamlock → nobody
QA Contact: adamlock → javascript.console
Attached patch try/catch the reload() call (obsolete) — Splinter Review
This is what bz suggested. I'm not sure why vlad moved this to Firefox : Error Console...
Attachment #237286 - Flags: superreview?(bzbarsky)
Attachment #237286 - Flags: review?(bzbarsky)
Assignee: nobody → js-console
Severity: normal → minor
Flags: review?(bzbarsky)
Keywords: helpwanted
OS: Linux → All
Product: Firefox → Core
QA Contact: javascript.console → error-console
Hardware: PC → All
Assignee: js-console → nobody
Component: Error Console → Embedding: Docshell
QA Contact: error-console → docshell
Attachment #237286 - Flags: review?(bzbarsky)
Comment on attachment 237286 [details] [diff] [review]
try/catch the reload() call

Looks good.  Thanks!
Attachment #237286 - Flags: superreview?(bzbarsky)
Attachment #237286 - Flags: superreview+
Attachment #237286 - Flags: review?(bzbarsky)
Attachment #237286 - Flags: review+
The previous patch had some tabs in it. This patch is what needs to be checked in.
Attachment #237286 - Attachment is obsolete: true
Attachment #237295 - Flags: superreview+
Attachment #237295 - Flags: review+
Assignee: nobody → ispiked
Whiteboard: [checkin needed]
Comment on attachment 237295 [details] [diff] [review]
try/catch the reload() call (for check-in)

Trivial patch.
Attachment #237295 - Flags: approval1.8.1?
Comment on attachment 237295 [details] [diff] [review]
try/catch the reload() call (for check-in)

a=schrep for drivers.
Attachment #237295 - Flags: approval1.8.1? → approval1.8.1+
Patch checked in on trunk and branch by bz. ->FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.8.1
Version: Trunk → 1.8 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: