Make sure to always set errors on failed requests

RESOLVED FIXED in mozilla18



7 years ago
7 years ago


(Reporter: bent.mozilla, Assigned: bent.mozilla)



Firefox Tracking Flags

(Not tracked)



(1 attachment)

Posted patch Patch, v1Splinter Review
Found while looking at bug 792547. We have an early return where we associate an error code with a failed request and it causes later error reporting code to fail. Simple patch.
Attachment #663011 - Flags: review?(khuey)
I'm not so sure about this one.  If our page is navigated why do we need to have working error reporting?
Well, currently all failed requests end up firing Error events, here:

If left unhandled that error event bubbles to the window and we eventually end up here:

At this point the request has no idea about its error code, so we don't report anything.
Sure, I understand that.  But if CheckInnerWindowCorrectness fails, the window is already "gone".  The page has been navigated to something new.  Running script on the page after CheckInnerWindowCorrectness fails seems like a bad idea.
It's not "gone". It's in the bfcache. I think we kick pages out of the bfcache in certain cases when DOM events are fired, but there's nothing special going on here. The event listener code should handle this.
Would we run something in the "gone" page or just propagate the error so that
there would be something in the error console?
(I'm not familiar with IDB code)

Note, event listeners aren't called if innerwindow check fails.
Comment on attachment 663011 [details] [diff] [review]
Patch, v1

Review of attachment 663011 [details] [diff] [review]:

Alright, I was convinced on IRC.
Attachment #663011 - Flags: review?(khuey) → review+
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.