Skip to content

Commit

Permalink
Bug 1082130 - Test if window closed before signing in the user in fxA…
Browse files Browse the repository at this point in the history
…ccounts. r=markh
  • Loading branch information
alexbardas committed Oct 14, 2014
1 parent ea6cb04 commit 39077d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions browser/base/content/aboutaccounts/aboutaccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ function openPrefs() {

function init() {
fxAccounts.getSignedInUser().then(user => {
// tests in particular might cause the window to start closing before
// getSignedInUser has returned.
if (window.closed) {
return;
}
// If the url contains an entrypoint query parameter, extract it into a variable
// to append it to the accounts URI resource.
// Works for the following cases:
Expand All @@ -301,11 +306,6 @@ function init() {
if (entryPointPos >= 0) {
entryPoint = window.location.href.substring(entryPointPos).split("&")[0];
}
// tests in particular might cause the window to start closing before
// getSignedInUser has returned.
if (window.closed) {
return;
}
if (window.location.href.contains("action=signin")) {
if (user) {
// asking to sign-in when already signed in just shows manage.
Expand Down

0 comments on commit 39077d7

Please sign in to comment.