Closed
Bug 224901
Opened 22 years ago
Closed 22 years ago
oom crash in MakeContentObject for form controls
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
(Keywords: crash)
Attachments
(1 file, 1 obsolete file)
2.01 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
in mozilla/content/html/document/src/nsHTMLContentSink.cpp
trace MakeContentObject(
aNodeType=eHTMLTag_input
aInsideNoXXXTag=false
)
let NS_NewHTMLInputElement fail
execute SetForm
-crash-
Comment on attachment 134915 [details] [diff] [review]
-uw5p
i believe all form controls types are covered by the switch (minus the two
which take a different code path) so there's no need for warnings about
unhandled cases.
Attachment #134915 -
Flags: superreview?(dbaron)
Attachment #134915 -
Flags: review?(dbaron)
If the methods in question propagate NS_ERROR_OUT_OF_MEMORY properly, shouldn't
you check NS_SUCCEEDED(rv) instead?
Attachment #134915 -
Flags: superreview?(dbaron)
Attachment #134915 -
Flags: review?(dbaron)
Attachment #134915 -
Attachment is obsolete: true
Comment on attachment 134918 [details] [diff] [review]
-uw5p check rv
indeed (and it matters)
Attachment #134918 -
Flags: superreview?(dbaron)
Attachment #134918 -
Flags: review?(dbaron)
Comment on attachment 134918 [details] [diff] [review]
-uw5p check rv
>+ if (NS_SUCCEEDED(rv) && !aInsideNoXXXTag) {
> switch (aNodeType) {
> case eHTMLTag_button:
> case eHTMLTag_fieldset:
> case eHTMLTag_label:
> case eHTMLTag_legend:
> case eHTMLTag_object:
> case eHTMLTag_textarea:
>- if (!aInsideNoXXXTag) {
> SetForm(*aResult, aForm);
>+ break;
>+ default: ;
> }
> }
Fix the wacky indentation of the default: and remove the extra ;, and
r+sr=dbaron, although for future reference I'm probably not the best reviewer
for content sink code.
Attachment #134918 -
Flags: superreview?(dbaron)
Attachment #134918 -
Flags: superreview+
Attachment #134918 -
Flags: review?(dbaron)
Attachment #134918 -
Flags: review+
checked in (note that the whacky indentaiton was a relic of -w) with a break in
default:
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: ian → general
You need to log in
before you can comment on or make changes to this bug.
Description
•