Closed
Bug 998356
Opened 10 years ago
Closed 10 years ago
View source is truncated on some parser errors
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
VERIFIED
FIXED
mozilla32
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
2.78 KB,
patch
|
hsivonen
:
review+
Sylvestre
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I came across this while investigating attachment 8408821 [details], but here is a simple testcase: view-source:data:text/html,<body><div/></body><div>Can you see me?</div> This is a regression from bug 943519 and in particular from http://hg.mozilla.org/mozilla-central/rev/bc87301018f7 -- if I back out that changeset locally, view source works correctly.
Flags: needinfo?(hsivonen)
Assignee | ||
Updated•10 years ago
|
Blocks: 943519
Keywords: regression
Assignee | ||
Comment 1•10 years ago
|
||
So we're ending up in Perform() with eTreeOpAddError. "msgId" is "errEndWithUnclosedElements", which is not a key present in htmlparser.properties. So this code: rv = nsContentUtils::FormatLocalizedString( nsContentUtils::eHTMLPARSER_PROPERTIES, msgId, params, message); NS_ENSURE_SUCCESS(rv, rv); that we hit in the !otherAtom && atom case fails and returns failure from Perform. Should we be returning NS_OK here if we fail to format the string? Should there be a string for "errEndWithUnclosedElements"?
Comment 2•10 years ago
|
||
My two cents: IMHO there should probably be a string for "errEndWithUnclosedElements"; on the other hand, I'm not quite sure that a missing localisation should mess up a functionality so, yes, I guess it should probably return NS_OK and output to stderr the issue. Probably changing that to NS_ENSURE_SUCCESS(rv, NS_OK)? But keep in mind that I'm little more than a newbie :)
Assignee | ||
Comment 3•10 years ago
|
||
What does errEndWithUnclosedElements mean? That is, what should the string say?
Comment 4•10 years ago
|
||
Given the code here (http://dxr.mozilla.org/mozilla-central/source/parser/html/javasrc/TreeBuilder.java#6334), it seems to me that errEndWithUnclosedElements is raised whenever an opening HTML tag is found without the matching closing tag before EOF is seen.
Comment 6•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #1) > Should we be returning NS_OK here if we fail to format the string? Depends on what failure mode we want for missing strings. I guess returning NS_OK would be more graceful. > Should > there be a string for "errEndWithUnclosedElements"? Apparently, yes! (In reply to Boris Zbarsky [:bz] from comment #3) > What does errEndWithUnclosedElements mean? That is, what should the string > say? End tag for “%1$S” seen, but there were unclosed elements.
Flags: needinfo?(hsivonen)
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8425961 -
Flags: review?(hsivonen)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Whiteboard: [need review]
Updated•10 years ago
|
Attachment #8425961 -
Flags: review?(hsivonen) → review+
Comment 8•10 years ago
|
||
Triage drive-by: this is tracked for FF30 and so would need to be ready (nominated) for uplift before next Tuesday morning Pacific time in order to make Beta.
status-firefox32:
--- → affected
tracking-firefox32:
--- → +
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8425961 [details] [diff] [review] Don't completely fail out of the parser if we can't format one of our string error messages [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 943519 User impact if declined: view-source will sometimes show only part of the source Testing completed (on m-c, etc.): Passes tests Risk to taking this patch (and alternatives if risky): Low risk, imo. String or IDL/UUID changes made by this patch: There is a string addition, but we could leave that out of the patch that lands on beta. The other part of the patch is enough to fix the bug on its own.
Attachment #8425961 -
Flags: approval-mozilla-beta?
Attachment #8425961 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b45a3f742d8
Flags: in-testsuite?
Whiteboard: [need review]
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0b45a3f742d8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•10 years ago
|
Attachment #8425961 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 12•10 years ago
|
||
Comment on attachment 8425961 [details] [diff] [review] Don't completely fail out of the parser if we can't format one of our string error messages a=me for a patch without the string change for Beta.
Attachment #8425961 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Updated•10 years ago
|
Keywords: branch-patch-needed
Comment 14•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/c4c795f7c441
Keywords: branch-patch-needed
Updated•10 years ago
|
status-b2g-v1.4:
--- → fixed
status-b2g-v2.0:
--- → fixed
Comment 16•10 years ago
|
||
I reproduced the issue with Nightly from April 2nd (BuildID: 20140402030201). The issue no longer reproduces with: FF 30 Beta 8 (BuildID: 20140527133511), latest FF 31.0a2 Aurora (BuildID: 20140528004008), and latest FF 32.0a1 Nightly (BuildID: 20140527030202). Verified on Win 7 x64, Mac OS X 10.9, Ubuntu 13.10 x86.
Status: RESOLVED → VERIFIED
Comment 17•10 years ago
|
||
It's the second time I see a patch without strings landing on beta, and then a patch with a string change landing on aurora. Aurora is supposed to be string frozen exactly like beta, what am I missing?
Comment 18•10 years ago
|
||
Ryan - can you back out the patch with string changes from Aurora and re-land the one without string changes?
Flags: needinfo?(ryanvm)
Comment 19•10 years ago
|
||
Backed out: https://hg.mozilla.org/releases/mozilla-aurora/rev/bf098f063410 Relanded: https://hg.mozilla.org/releases/mozilla-aurora/rev/9c6352be5499
Flags: needinfo?(ryanvm)
You need to log in
before you can comment on or make changes to this bug.
Description
•