You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Dan Polivy <da...@cellartracker.com> on 2014/11/21 09:37:26 UTC

WP: Issue with fix for [CB-7028]

Hi folks,

I added a comment to the JIRA issue, but wanted to flag it here for discussion as well. I think I've uncovered a big issue with the fix that went in for this issue on Windows Phone:

https://issues.apache.org/jira/browse/CB-7028

I have a plugin that uses a Windows Phone Task (inherits from Microsoft.Phone.Tasks.ChooserBase<> -- more details<http://msdn.microsoft.com/en-us/library/windows/apps/ff769542(v=vs.105).aspx>); when it is invoked from script, it appears to result in the WebBrowser sending an Unloaded event. Due to the change for CB-7028, all callbacks are subsequently unregistered/removed. So, when my task chooser returns with data to send back to JavaScript, it can no longer find any callbacks because the ResultHandlers dictionary is now empty.

While the intent of the change looks reasonable, I wonder if there's perhaps a way to test whether the current command has any associated callbacks, and NOT wipe those out, while still potentially cleaning up others? However, I haven't yet done enough investigation to know whether those callbacks that get wiped out are properly re-created when the WebBrowser resumes control of the app - if not, this may be an even bigger issue.

Thoughts or suggestions? I'm not subscribed to the list, so please include me directly in any replies.

Thanks,
Dan