Reviewers: jgw,

Description:
Description:
============
Panel.onDetachChildren iterates through its children, detaching each
one.  If onLoad/Unload throws an exception, the loop will be interupted,
resulting in a detached parent with some detached children and some
attached children.  This inconsistent state is unresolvable in GWT and
leaves widgets permanently attached to the page.

Fix:
===
We now wrap onLoad/Unload in a try/catch block if an
UncaughtExceptionHandler is present, allowing users to handle the
exception without interupting the attach/detach sequence. If no handler
is present, we still throw the exception.

Testing:
=======
I wrote a unit test to verify this case.

Please review this at http://gwt-code-reviews.appspot.com/64815

Affected files:
   user/src/com/google/gwt/user/client/ui/Composite.java
   user/src/com/google/gwt/user/client/ui/Widget.java
   user/test/com/google/gwt/user/client/ui/WidgetTest.java



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to