Closed
Bug 300130
Opened 20 years ago
Closed 19 years ago
Schema Loader crashes due to missing NULL check
Categories
(Core Graveyard :: Web Services, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: doronr, Assigned: doronr)
Details
Attachments
(1 file, 2 obsolete files)
1.23 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
mkaply
:
approval1.8b4+
|
Details | Diff | Splinter Review |
Schema Loader crashes on: <xsd:element name="foo" type="bar"/> if bar is not defined.
Assignee | ||
Comment 1•20 years ago
|
||
Type may be not set, so make sure it is not null.
Attachment #188705 -
Flags: superreview?(peterv)
Comment 2•19 years ago
|
||
Comment on attachment 188705 [details] [diff] [review] patch type will always be null there (nsCOMPtr that hasn't been assigned a value).
Attachment #188705 -
Flags: superreview?(peterv) → superreview-
Assignee | ||
Comment 3•19 years ago
|
||
type might never be set, so only use it if it exists.
Attachment #188705 -
Attachment is obsolete: true
Attachment #189218 -
Flags: superreview?(peterv)
Comment 4•19 years ago
|
||
Comment on attachment 189218 [details] [diff] [review] oops, this is the right patch >Index: extensions/webservices/schema/src/nsSchemaComplexType.cpp >=================================================================== >@@ -133,31 +133,33 @@ nsSchemaComplexType::Resolve(nsIWebServi > if (mModelGroup) { > rv = mModelGroup->Resolve(aErrorHandler); > if (NS_FAILED(rv)) { >- nsAutoString modelName; >- nsresult rv1 = type->GetName(modelName); >- NS_ENSURE_SUCCESS(rv1, rv1); >- >- nsAutoString errorMsg; >- errorMsg.AppendLiteral("Failure resolving schema complex type, "); >- errorMsg.AppendLiteral("cannot resolve model group \""); >- errorMsg.Append(modelName); >- errorMsg.AppendLiteral("\""); >+ if (type) { >+ nsAutoString modelName; >+ nsresult rv1 = type->GetName(modelName); Shouldn't this just use mModelGroup->GetName()?
Assignee | ||
Updated•19 years ago
|
Attachment #189218 -
Attachment is obsolete: true
Attachment #189218 -
Flags: superreview?(peterv)
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #189778 -
Flags: review?(peterv)
Updated•19 years ago
|
Attachment #189778 -
Flags: superreview+
Attachment #189778 -
Flags: review?(peterv)
Attachment #189778 -
Flags: review+
Comment 6•19 years ago
|
||
Comment on attachment 189778 [details] [diff] [review] indeed, your way is more logical a=mkaply
Attachment #189778 -
Flags: approval1.8b4+
Assignee | ||
Comment 7•19 years ago
|
||
checked in, thanks!
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•