Closed Bug 289595 Opened 20 years ago Closed 20 years ago

Can't assume there is a non-null mSchema per model

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doronr, Assigned: doronr)

Details

Attachments

(2 files)

nsXFormsModelElement::GetTypeForControl assumes there is a valid mSchema, but we
can have models without any schemas to load.
Attached patch patchSplinter Review
Attachment #180093 - Flags: review?(aaronr)
Comment on attachment 180093 [details] [diff] [review]
patch

please add comments around validator.GetType and validator.ValidateString to
point out that just because we don't load a schema that validation will still
work for base types.  Otherwise it isn't immediately apparent that there is
value to using a validator that hasn't had a schema loaded.

Also, if you are putting  schemaColl->GetSchema inside a if(schemaColl) test in
the first part of your patch, should do the same in the second part of your
patch.

With those nits, r=me
Attachment #180093 - Flags: review?(aaronr) → review+
Yes, you definitely need to include the ::ValidateNode part of your patch in a
if(schemaColl) test as I just got this same trap with this patch applied
Attached patch fix nitSplinter Review
Attachment #181448 - Flags: review?(smaug)
Attachment #181448 - Flags: review?(smaug) → review+
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: