Open Bug 280879 Opened 20 years ago Updated 2 years ago

Assertion when removing a link in personal toolbar using contextmenu

Categories

(Core :: DOM: Events, defect, P5)

defect

Tracking

()

People

(Reporter: sicking, Unassigned)

Details

If you rightclick a link in the personal toolback and choose 'Delete' we assert
a bunch of times. The problem is that we end up calling GetControllers a bunch
of times on a xulelement that is no longer part of a document (probably the link
itself). The caller of GetControllers is nsFocusController.

The stack isn't very interesting since it's mostly HandleDOMEvent calls as well
as js. The function that removes the xulelement from the tree is not in the
callstack, that seems to be over and done with.

What seems to be happening is that when the left mousebutton is released we
close the popup which ends up focusing the window. This will fire off a buch of
commands. During this firing we call GetController on the currently focused
node, which is the link that was just deleted.

We should probably let elements notify the focuscontroller when they are being
removed from the tree. Or the focuscontroller could be an nsIDocumentObserver
(though it might need to observe a whole lot of documents) so that it can remove
the focus from elements that are removed from the tree.
Or is it ok that we're asking for the controllers of an element that has been
removed from the tree? Should nsXULElement::GetControllers simply return null
without asserting?
Assignee: events → nobody
QA Contact: ian → events
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.