Closed Bug 816452 Opened 13 years ago Closed 13 years ago

Don't fire mozbrowsererror when we get a statechange with status NS_BINDING_ABORTED; that just indicates we stopped the load.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox19 fixed, b2g18 fixed)

RESOLVED FIXED
blocking-basecamp +
Tracking Status
firefox19 --- fixed
b2g18 --- fixed

People

(Reporter: alive, Assigned: kk1fff)

References

Details

Attachments

(1 file, 1 obsolete file)

This is follow-up of https://bugzilla.mozilla.org/show_bug.cgi?id=815623#c9 Not sure this is gecko's problem but still wanna to track it in an individual bug. STR is stated in bug 815623. After doing some investigation, I find gaia is getting mozbrowsererror event fired to the iframe which doesn't encounter an error. It's strange. Not sure what the error is, but after reload no error happens.
mxr.mozilla.org/mozilla-central/source/uriloader/base/nsDocLoader.cpp#282
For the purposes of debugging this, you could dump the error code that's received in BrowserElementChild.js::onStateChange.
Thank Justin. I think that we can describe the mozbrowsererror in more detail (maybe copy some logics from nsDocShell::DisplayLoadError to determine the error type), so the embedder can get the type of mozbrowsererror. Currently, even stopping loading page can cause mozbrowsererror, and we have only one error type from onStateChange. There's a TODO in BEC's onStateChange, do we have a plan to do this?
> There's a TODO in BEC's onStateChange, do we have a plan to do this? I'm not aware of anyone else having a plan to do so.
(In reply to Justin Lebar [:jlebar] from comment #2) > For the purposes of debugging this, you could dump the error code that's > received in BrowserElementChild.js::onStateChange. The state in onStateChange is NS_BIND_ABORTED. It is set because nsDocLoader::Stop is called. The Stop is initially called in nsDocShell::InternalLoad()[1]. But I don't know why DocShell stops loading there. Justin, would you give some hint about this function? Thanks. [1] https://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp?rev=cf3081233fad#9032
> Justin, would you give some hint about this function? Thanks. Someone is navigating a page which is still doing stuff, so we call Stop() on the old page before we navigate away. We definitely don't want to display an error page in that case! In fact, we probably don't want to display an error page for any NS_BINDING_ABORTED loaderror's; docshell doesn't even handle that error in nsDocShell::DisplayLoadError.
Justin, would you help to review this patch? Thanks.
Assignee: nobody → pwang
Attachment #688189 - Flags: review?(justin.lebar+bug)
Comment on attachment 688189 [details] [diff] [review] Patch: don't fire mozbrowsererror when state changes to NS_BIND_ABORTED r=me, but please add a comment to BEC explaining why we ignore NS_BINDING_ABORTED.
Attachment #688189 - Flags: review?(justin.lebar+bug) → review+
r+ in comment 8. Adding comment according to comment 8.
Attachment #688189 - Attachment is obsolete: true
Attachment #688642 - Flags: review+
Summary: Unexpected mozbrowsererror event is fired. → Don't fire mozbrowsererror when we get a statechange with status NS_BINDING_ABORTED; that just indicates we stopped the load.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
This bug solve bug 821527 which is a blocking-basecamp bug. Can we backport this patch to beta? Ryan can you merge it?
Not without approval or blocking-basecamp status.
Blocks: 821527
blocking-basecamp: --- → ?
We should have landed this on b2g to begin with; I think we probably just forgot.
blocking-basecamp: ? → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: