Closed Bug 555657 Opened 14 years ago Closed 14 years ago

GetSubmissionFromForm caches the wrong doc

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

778  	GetSubmissionFromForm(nsGenericHTMLElement* aForm,

Event returned_pointer: Pointer "doc" returned from "aForm->GetCurrentDoc()" is never used
782  	  nsIDocument* doc = aForm->GetCurrentDoc();
783  	  NS_ASSERTION(doc, "Should have doc if we're building submission!");

doc is never used after this point (or at all in opt builds)

OwnerDoc here is used at least once, if not twice:
810  	      SendJSWarning(aForm->GetOwnerDoc(), "ForgotPostWarning",
811  	                    &enctypeStrPtr, 1);
812  	    }
813  	    *aFormSubmission = new nsFSURLEncoded(charset, method,
814  	                                          aForm->GetOwnerDoc());
Attached patch optimizeSplinter Review
Attachment #435555 - Flags: review?(jonas)
http://hg.mozilla.org/mozilla-central/rev/20912f623e84
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: