Closed Bug 290870 Opened 19 years ago Closed 19 years ago

[FIXr]lack of XBL error reporting if unexpected element is found

Categories

(Core :: XBL, defect, P1)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla1.8beta2

People

(Reporter: vlad, Assigned: bzbarsky)

Details

Attachments

(3 files)

If an unexpected child element is missing from a <binding>, the entire XBL
document ends up silently being invalid somehow.  For example:

<binding>
  <property name="foo" onget="return 10" />
</binding>

will cause the document to be silently invalid (since the property needs to be
in an <implementation>), as does:

<binding>
 <implementation>
  <handlers>
   <handler .... ></>
  </handlers>
 </implementation>
</binding>

Because <handlers> should be under <binding>, not under <implementation>.

No errors seem to get reported anywhere, and there don't seem to be any logging
bits to turn on to help with this.
Attached patch Possible patchSplinter Review
Attached file Testcase
Assignee: general → bzbarsky
Status: NEW → ASSIGNED
Attachment #181086 - Flags: superreview?(bryner)
Attachment #181086 - Flags: review?(bryner)
Priority: -- → P1
Summary: lack of XBL error reporting if unexpected element is found → [FIX]lack of XBL error reporting if unexpected element is found
Target Milestone: --- → mozilla1.8beta2
Attachment #181086 - Flags: superreview?(bryner)
Attachment #181086 - Flags: superreview+
Attachment #181086 - Flags: review?(bryner)
Attachment #181086 - Flags: review+
Comment on attachment 181086 [details] [diff] [review]
Same as diff -w for ease of review

Requesting 1.8b2 approval.  This should be quite safe and should significantly
improve our error-reporting for malformed XBL.
Attachment #181086 - Flags: approval1.8b2?
Summary: [FIX]lack of XBL error reporting if unexpected element is found → [FIXr]lack of XBL error reporting if unexpected element is found
Comment on attachment 181086 [details] [diff] [review]
Same as diff -w for ease of review

a=asa
Attachment #181086 - Flags: approval1.8b2? → approval1.8b2+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I'm now seeing correct errors sent to stderr at least (and I presume the JS
console) for the cases where I had silent failure before, so verifying this. 
Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: