Closed
Bug 506637
Opened 17 years ago
Closed 17 years ago
nsFocusController::GetControllers does not handle a null nsIFocusManager* fm well
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, crash)
Attachments
(1 file)
|
812 bytes,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
94 nsFocusController::GetControllers(nsIControllers** aResult)
95 {
99 nsCOMPtr<nsIDOMElement> focusedElement;
100 nsIFocusManager* fm = nsFocusManager::GetFocusManager();
101 if (fm)
102 fm->GetFocusedElement(getter_AddRefs(focusedElement));
here we carefully checked for a null focusmanager, if it was null, then focusedElement will not be set to non null
so this condition will be false:
104 if (focusedElement) {
131 }
132 else {
and off we go to try to get a window:
133 nsCOMPtr<nsIDOMWindow> focusedWindow;
... from the null focus manager:
134 fm->GetFocusedWindow(getter_AddRefs(focusedWindow));
Updated•17 years ago
|
Attachment #390911 -
Flags: review?(Olli.Pettay) → review+
Updated•17 years ago
|
Flags: wanted1.9.2?
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 3•15 years ago
|
||
I believe this issue exists on 1.9.2 as well? Crash fix, wanted?
Updated•8 years ago
|
Blocks: coverity-analysis
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•