Comment 13 for bug 320459

Revision history for this message
In , Mats Palmgren (matspal) wrote :

Created attachment 346918
Patch rev. 2
[Checkin: Comment 18 & 19]

This patch includes the earlier two patches, with roc's nit in comment 7.

Additionally,
1. add "StopAutoScrollTimer()" in DisconnectFromPresShell(), this will
   Cancel an outstanding timer and is necessary since it uses a raw
   pres context pointer (and other pointers) which could be stale.
2. use nsWeakView in UpdateWidgetsForView() to detect view destruction
3. keep strong refs on the pres shell and view manager over the
   viewManager->Composite() call, and give up if presShell->IsDestroying()
   after it.

I have high hopes for the UpdateWidgetsForView() fix - I think that's
a bug I've been hunting for years...

Tested on Linux, MacOSX and XP. There are still a few assertions for
the first testcase, but nothing too serious, they can be fixed separately.