Closed Bug 592410 Opened 12 years ago Closed 12 years ago

WebConsole: Reloading page while requests are not done causes exception

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 4.0b7

People

(Reporter: julian.viereck, Assigned: pcwalton)

References

Details

(Whiteboard: [kd4b6])

Attachments

(2 files)

When a page hasn't finished loading yet (or at least some of the requests for the page) and you hit the reload button you will sometimes see exceptions like this:

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.visitResponseHeaders]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource://gre/modules/HUDService.jsm :: RL_setResponseHeader :: line 166"  data: no]
Source File: resource://gre/modules/HUDService.jsm
Line: 166
Attached patch Patch v1.0Splinter Review
Another simple fix - no unit tests (which should be fine as that was okay for bug 592264 as well and this fix goes the same way).
Attachment #470895 - Flags: feedback?(ddahl)
Comment on attachment 470895 [details] [diff] [review]
Patch v1.0

nice catch!
Attachment #470895 - Flags: feedback?(ddahl) → feedback+
Attachment #470895 - Flags: review?(sdwilsh)
Comment on attachment 470895 [details] [diff] [review]
Patch v1.0

>+        // Accessing the response header can throw an NS_ERROR_NOT_AVAILABLE
>+        // exception. Catch it and stop it to make it not show up in the
>+        // error console. See bug 592410.
Explaining why in the code is more useful than referencing the bug.  Please just explain it here and lose the bug reference.

r=sdwilsh
Attachment #470895 - Flags: review?(sdwilsh) → review+
Attached patch Patch v1.1Splinter Review
Improved based on Shawn's review.
Keywords: checkin-needed
Needs approval to land.
Assignee: nobody → julian.viereck
Keywords: checkin-needed
Attachment #471458 - Flags: approval2.0?
Assignee: julian.viereck → pwalton
Attachment #471458 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/520233ed37c1
Keywords: checkin-needed
Target Milestone: --- → Firefox 4.0b6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.