lp:~chrisccoulson/unity-firefox-extension/lp1076350
- Get this branch:
- bzr branch lp:~chrisccoulson/unity-firefox-extension/lp1076350
Branch merges
- Maxim Ermilov (community): Approve
-
Diff: 54 lines (+17/-7)1 file modifiedunity-firefox-extension/content/unity-global-property-initializer.js (+17/-7)
Branch information
Recent revisions
- 351. By Chris Coulson
-
Only disconnect from the pagehide handler when the window is destroyed. This fixes a case where navigating to another window then back again, and then using the Unity API will prevent the context from being destroyed on the next page navigation or when the tab is destroyed
- 350. By Chris Coulson
-
UnityObject's are currently stored in a weak map, keyed by outer window (which comes from the "content-
document\ -global\ -created" notification). Outer window's are reused between page navigations across domains. Each UnityObject disconnects from the documents pagehide notification when a window navigates to another document the first time, so if a subsequent document uses the Unity API, it will never clean up the corresponding context when the tab is closed (and the outer window disappears). Instead, UnityObject's should be keyed by some object tied to the *inner* window (the inner window isn't directly accessible, but there are some objects that are tied to the inner window, such as window.navigator). Although, if UnityObject is tied to the lifetime of an inner window, I wonder why UnityObjectFactory exists at all....
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:unity-firefox-extension