Bug 1079656 - Make the Loop Account menu item work after a restart. r=jaws
This commit is contained in:
@@ -1605,11 +1605,21 @@ this.MozLoopService = {
|
||||
MozLoopServiceInternal.clearError("profile");
|
||||
}),
|
||||
|
||||
openFxASettings: function() {
|
||||
let url = new URL("/settings", gFxAOAuthClient.parameters.content_uri);
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.switchToTabHavingURI(url.toString(), true);
|
||||
},
|
||||
openFxASettings: Task.async(function() {
|
||||
try {
|
||||
let fxAOAuthClient = yield MozLoopServiceInternal.promiseFxAOAuthClient();
|
||||
if (!fxAOAuthClient) {
|
||||
log.error("Could not get the OAuth client");
|
||||
return;
|
||||
}
|
||||
|
||||
let url = new URL("/settings", fxAOAuthClient.parameters.content_uri);
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.switchToTabHavingURI(url.toString(), true);
|
||||
} catch (ex) {
|
||||
log.error("Error opening FxA settings", ex);
|
||||
}
|
||||
}),
|
||||
|
||||
/**
|
||||
* Performs a hawk based request to the loop server.
|
||||
|
||||
Reference in New Issue
Block a user