Closed Bug 571428 Opened 14 years ago Closed 14 years ago

"ASSERTION: Can't be unbound without being bound originally"

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b1

People

(Reporter: jruderman, Assigned: ehsan.akhgari)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files, 2 obsolete files)

Attached file testcase
###!!! ASSERTION: Can't be unbound without being bound originally: 'mBoundFrame', file /builds/moz2_slave/mozilla-central-macosx-debug/build/content/html/content/src/nsTextEditorState.cpp, line 1326

More fallout from bug 534785, maybe?
(In reply to comment #0)
> More fallout from bug 534785, maybe?

Looks like it.
Assignee: nobody → ehsan
Blocks: 534785
Status: NEW → ASSIGNED
Keywords: regression
Attached patch Patch (v1) (obsolete) — Splinter Review
What's happening here is that we change the type, which causes us to free our nsTextEditorState object, then change the type back to text again, which allocates a new nsTextEditorState object.  After this, the original frame gets destroyed, and it asserts when it tries to unbind itself from the nsTextEditorState object, because that object has gone away for a long time.

The only way that I could think of to fix it is to unbind the frame (if there's any) before the nsTextEditorState object is freed.  The code doesn't look that clean to me, though.  Is there a better way to fix this?
Attachment #450671 - Flags: review?(roc)
Attached patch Patch (v1.1) (obsolete) — Splinter Review
Let's make HasBoundFrame non-inline so that every file which #includes nsTextEditorState.h shouldn't have to #include nsTextControlFrame.h as well.
Attachment #450671 - Attachment is obsolete: true
Attachment #450718 - Flags: review?(roc)
Attachment #450671 - Flags: review?(roc)
Why not just make nsTextEditorState::UnbindFromFrame check HasBoundFrame internally, and call UnbindFromFrame from nsHTMLInputElement::FreeData?
Attached patch Patch (v2)Splinter Review
Attachment #450718 - Attachment is obsolete: true
Attachment #451175 - Flags: review?(roc)
Attachment #450718 - Flags: review?(roc)
http://hg.mozilla.org/mozilla-central/rev/a0f03aecadef
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: