Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.5.0-beta5
-
None
Description
osapi.container.GadgetHolder.dispose should take care of all cleanup. Today it will remove elements but it does not cleanup any OAHub config.
GadgetHolder.dispose should call osapi.container.GadgetHolder.removeOaaContainer_ if the holder was created via osapi.container.GadgetHolder.doOaaIframeHtml_.
If removeOaaContainer_ is not called we can get into situations where OpenAjax.hub.ManagedHub has a handle to an OpenAjax.hub.IframeContainer which references DOM elements that no longer exist.
I've noticed this issue most frequently when a gadget is doing requestNavigateTo calls in Apache Rave. GadgetHolder.doOaaIframeHtml_ will call GadgetHolder.removeOaaContainer_ with an iframeId for which OpenAjax.hub.ManagedHub still has an IframeContainer object, but which no longer exists in the DOM. This causes reference errors down the line in IframeContainer~finishDisconnect().