Closed Bug 570624 Opened 15 years ago Closed 15 years ago

"ASSERTION: called nsGenericElement::SetText"

Categories

(Core :: Layout: Form Controls, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5
Tracking Status
blocking2.0 --- final+

People

(Reporter: jruderman, Assigned: ehsan.akhgari)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files, 1 obsolete file)

Attached file testcase
###!!! ASSERTION: called nsGenericElement::SetText: 'Error', file /builds/moz2_slave/mozilla-central-macosx-debug/build/content/base/src/nsGenericElement.cpp, line 4954
Attached file stack
In nsTextControlFrame::UpdateValueDisplay rootNode is div@0x7f8260952be0 class="anonymous-div" intrinsicstate=[00020000] flags=[02200539] primaryframe=0x7f8261aa0680 refcount=7< br@0x7f8260952d30 _moz_editor_bogus_node="TRUE" _moz_dirty="" intrinsicstate=[00020000] flags=[02200111] primaryframe=0x7f826ac0a3c8 refcount=3<> > and we call SetText on textContent which is the br node.
Is this a regression from bug 534785?
(In reply to comment #2) > Is this a regression from bug 534785? Yes. And also yes. (The second yes is the answer to the next obvious question: "Do you have a patch?") ;-)
Blocks: 534785
blocking2.0: --- → ?
Keywords: regression
Attached patch Patch (v1) (obsolete) — Splinter Review
I was getting the editor from the text control frame inside the AttributeChange handler on the frame. If the editor was being initialized for the first time, we'd get into a situation where the editor was initialized, but mUseEditor was false. The editor added the bogus br node, but we thought that there was no editor around, so the we'd get more calls to UpdateValueDisplay.
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #450018 - Flags: review?(roc)
Attached patch Patch (v2)Splinter Review
Actually I found one more similar case in nsTextControlFrame, so let's fix that as well.
Attachment #450018 - Attachment is obsolete: true
Attachment #450021 - Flags: review?(roc)
Attachment #450018 - Flags: review?(roc)
Component: DOM → Layout: Form Controls
QA Contact: general → layout.form-controls
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: