GNOME Bugzilla – Bug 673270
e-web-app-utils: warn when cookies are unavailable
Last modified: 2012-05-26 22:28:19 UTC
Instead of silently going nuts in the console. Warn that we are unable to copy the cookies from the session. Notice that this is a extreme corner case. This would mean that WebKit has not needed a cookie jar so far, nor that our EphyEmbedPrefs code was able to attach a cookie jar to the default session.
Created attachment 211052 [details] [review] e-web-app-utils: warn when cookies are unavailable
Review of attachment 211052 [details] [review]: If there's reasonable cases where we should not have a cookie jar, this should just do silently do nothing. If there aren't, I think it should be an error (g_return_if_fail).
(In reply to comment #2) > Review of attachment 211052 [details] [review]: > > If there's reasonable cases where we should not have a cookie jar, this should > just do silently do nothing. If there aren't, I think it should be an error > (g_return_if_fail). The case would be that ephy_embed_prefs_init has not run and hence our cookie jar has not been connected to the WebKit session and WebKit has not yet created one of its own because it has not needed to.
I would not object to silently do nothing. The web-app can create its own cookie jar later. The current cookie jar is not that vital. Worst case the user will need to log in again.
(In reply to comment #4) > I would not object to silently do nothing. The web-app can create its own > cookie jar later. > > The current cookie jar is not that vital. Worst case the user will need to log > in again. As I said, it seems more reasonable to me to either accept this can happen (do nothing) or fail. If you think silent fail is better go for it.
I went for a simple silent return, considering that the situation is not the end of the world, as we discussed in the comments. Attachment 211052 [details] pushed as 737dfa9 - e-web-app-utils: warn when cookies are unavailable