In order for the new mozStorage module to handle importing correctly, the legacy module needs to throw if the master password was canceled. This allows the mozStorage module to gracefully fail, and prompt later.
Created attachment 332978 [details] [diff] [review] Patch v0.1 patch to storage-Legacy.js
Comment on attachment 332978 [details] [diff] [review] Patch v0.1 Yeah, I think there also needs to be a change to LoadSignons() in toolkit/components/passwordmgr/content/passwordManager.js... The call to getAllLogins() should be wrapped in a try/catch, and if an exception is thrown |signons| should end up as an empty array (as would have happened before this change).
Created attachment 332986 [details] [diff] [review] Patch v0.2 Updated to include the content fixes - the one mentioned above, and the other one we discussed
Comment on attachment 332986 [details] [diff] [review] Patch v0.2 >+ >+ // We want to throw in this case, so that LoginManagerStorage-mozStorage >+ // will halt importing. >+ if (userCanceled) >+ throw "User canceled Master Password entry"; > > // decrypt entries for caller. > [result, userCanceled] = this._decryptLogins(result); I think you probably want to add that *after* userCanceled is assigned a value. :) Also, no need for the comment.
Created attachment 333001 [details] [diff] [review] Patch v0.3 I'm not even sure how that happened...
Pushed changeset 29f2c16ef6e2.