Closed Bug 515703 Opened 15 years ago Closed 15 years ago

"ASSERTION: What happened here?" in nsHTMLFormElement::GetDefaultSubmitElement

Categories

(Core :: Layout: Form Controls, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files, 2 obsolete files)

layout/reftests/bugs/352980-3d.html triggers:

###!!! ASSERTION: What happened here?: 'mDefaultSubmitElement == mFirstSubmitInElements || mDefaultSubmitElement == mFirstSubmitNotInElements', file /Users/jruderman/central/content/html/content/src/nsHTMLFormElement.cpp, line 1747

Could this be related to the recent change in bug 513153?
My local build with that change is not showing this bug.
No assertion after updating to tip either.  This is the case with both the normal and the HTML5 parser.  I'm on Mac.  Jesse, are you seeing this on Mac?  If so, what else are you doing that's interesting to trigger it?
Yes, I'm testing on Mac.  I still get it after updating and using a fresh profile.  It asserts with HTML5 parser both on and off.  rev b11f8b61ce71+

So, I don't know what extra thing I'm doing to trigger it :(
Btw, I'm loading the test directly, not as part of the test suite.
Attached file stack trace
I was testing rev 613cf52be14d, and also loading directly from a file:// url....
So what happens here is that inside a single update we first remove the node from the form and then do the rest of the attribute change, including the IntrinsicState() get when notifying on this stuff.  Since the mFirstSubmitElement doesn't get updated until after the update finishes, we run into this assertion.
Attached patch This should do the trick (obsolete) — Splinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #399939 - Flags: review?(jst)
Attached patch Without the bogus comment (obsolete) — Splinter Review
Attachment #399939 - Attachment is obsolete: true
Attachment #399940 - Flags: review?(jst)
Attachment #399939 - Flags: review?(jst)
Attachment #399940 - Attachment is obsolete: true
Attachment #399947 - Flags: review?(jst)
Attachment #399940 - Flags: review?(jst)
Attachment #399947 - Flags: superreview+
Attachment #399947 - Flags: review?(jst)
Attachment #399947 - Flags: review+
Pushed http://hg.mozilla.org/mozilla-central/rev/7830998eef61
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: