Closed Bug 1001936 Opened 11 years ago Closed 11 years ago

textareas can read a stale cached value when the editor is being reattached as part of a reframe

Categories

(Core :: DOM: Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox31 + fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Keywords: regression, Whiteboard: [qa-])

Attachments

(1 file)

This bug has always been there in a way, but bug 821307 made it actually obvious. The test case in that bug hits this. Basically what happened is that bug 821307 moved the GetValue call further up in nsTextEditor::PrepareEditor() and in that test case when we call GetValue we end up taking the first branch in the function but we read the wrong cached value. The value cache was not updated in the SetValue call which happened while the text control did not have a bound frame. Because in general we can't trust the cached value when we don't have an editor attached, we should clear it out when the editor is being destroyed.
Depends on: 997805
Comment on attachment 8413293 [details] [diff] [review] Clear the value cache when the editor is being destroyed because it won't get updated when we don't have a bound frame Fast reviews appreciated, as I want to land this before we branch 31 off.
Attachment #8413293 - Flags: review?(roc)
Attachment #8413293 - Flags: review?(bzbarsky)
Comment on attachment 8413293 [details] [diff] [review] Clear the value cache when the editor is being destroyed because it won't get updated when we don't have a bound frame r=me
Attachment #8413293 - Flags: review?(bzbarsky) → review+
Attachment #8413293 - Flags: review?(roc)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: