Closed Bug 401160 Opened 17 years ago Closed 17 years ago

Infinite-recursion crash calling focus() involving label, legend, contenteditable

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: jruderman, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: crash, testcase)

Attachments

(4 files)

Loading the testcase makes Firefox crash due to running out of stack space. ... 106 nsHTMLLegendElement::SetFocus (nsHTMLLegendElement.cpp:272) 107 nsHTMLLabelElement::SetFocus (nsHTMLLabelElement.cpp:276) 108 nsEventStateManager::ChangeFocusWith (nsEventStateManager.cpp:3285) 109 nsEventStateManager::ShiftFocusInternal (nsEventStateManager.cpp:3570) 110 nsEventStateManager::ShiftFocus (nsEventStateManager.cpp:3365) 111 nsFocusController::MoveFocus (nsFocusController.cpp:327) 112 nsHTMLLegendElement::SetFocus (nsHTMLLegendElement.cpp:272) ...
Component: Editor → Event Handling
OS: Mac OS X → All
QA Contact: editor → events
Hardware: PC → All
Assignee: nobody → mats.palmgren
Attached patch Patch rev. 1Splinter Review
Ignore recursive invocation of SetFocus()
Attachment #286299 - Flags: superreview?(peterv)
Attachment #286299 - Flags: review?(peterv)
Better description: Ignore recursive invocation of SetFocus() on the same element.
Attached patch mochitestSplinter Review
Flags: in-testsuite?
Comment on attachment 286299 [details] [diff] [review] Patch rev. 1 >Index: content/html/content/src/nsHTMLLabelElement.cpp >=================================================================== >+ PRPackedBool mHandlingEvent :1; >+ PRPackedBool mInSetFocus :1; No need for bitfields, just use plain PRPackedBools.
Attachment #286299 - Flags: superreview?(peterv)
Attachment #286299 - Flags: superreview+
Attachment #286299 - Flags: review?(peterv)
Attachment #286299 - Flags: review+
Attachment #286299 - Flags: approval1.9?
Comment on attachment 286299 [details] [diff] [review] Patch rev. 1 approving crash fix..
Attachment #286299 - Flags: approval1.9? → approval1.9+
mozilla/content/html/content/src/nsHTMLLabelElement.cpp 1.106 mozilla/content/html/content/src/nsHTMLLegendElement.cpp 1.70 mozilla/content/html/content/test/Makefile.in 1.32 mozilla/content/html/content/test/test_bug401160.xhtml 1.1 -> FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M10
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: