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)
Tracking
(blocking-basecamp:+, firefox19 fixed, b2g18 fixed)
RESOLVED
FIXED
blocking-basecamp | + |
People
(Reporter: alive, Assigned: kk1fff)
References
Details
Attachments
(1 file, 1 obsolete file)
2.04 KB,
patch
|
kk1fff
:
review+
|
Details | Diff | Splinter Review |
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.
Comment 1•13 years ago
|
||
mxr.mozilla.org/mozilla-central/source/uriloader/base/nsDocLoader.cpp#282
Comment 2•13 years ago
|
||
For the purposes of debugging this, you could dump the error code that's received in BrowserElementChild.js::onStateChange.
Updated•13 years ago
|
Blocks: browser-api
Assignee | ||
Comment 3•13 years ago
|
||
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?
Comment 4•13 years ago
|
||
> 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.
Assignee | ||
Comment 5•13 years ago
|
||
(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
Comment 6•13 years ago
|
||
> 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.
Assignee | ||
Comment 7•13 years ago
|
||
Justin, would you help to review this patch? Thanks.
Assignee: nobody → pwang
Attachment #688189 -
Flags: review?(justin.lebar+bug)
Comment 8•13 years ago
|
||
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+
Assignee | ||
Comment 9•13 years ago
|
||
Attachment #688189 -
Attachment is obsolete: true
Attachment #688642 -
Flags: review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 10•13 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Updated•13 years ago
|
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.
Comment 11•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 12•13 years ago
|
||
This bug solve bug 821527 which is a blocking-basecamp bug. Can we backport this patch to beta?
Ryan can you merge it?
Comment 13•13 years ago
|
||
Not without approval or blocking-basecamp status.
Comment 14•13 years ago
|
||
We should have landed this on b2g to begin with; I think we probably just forgot.
Updated•13 years ago
|
blocking-basecamp: ? → +
https://hg.mozilla.org/releases/mozilla-aurora/rev/8f4f38d57907
https://hg.mozilla.org/releases/mozilla-b2g18/rev/a7a4704fd1ef
status-b2g18:
--- → fixed
status-firefox19:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•