Bug 823736 - include.js must stringify objects going to userland js. r=benadida

This commit is contained in:
Jed Parsons (:jparsons) 2012-12-23 10:59:43 -05:00
parent 0c6c027935
commit bf807a48d5
2 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ function doInternalWatch() {
function doInternalRequest() {
log("doInternalRequest:", options && isLoaded);
if (options && isLoaded) {
var stringifiedOptions = JSON.stringify(options);
content.wrappedJSObject.BrowserID.internal.get(
options.origin,
function(assertion, internalParams) {
@ -110,7 +111,7 @@ function doInternalRequest() {
}
closeIdentityDialog();
},
options);
stringifiedOptions);
}
}

View File

@ -206,7 +206,7 @@ function test_options_pass_through() {
let randomMixedParams = {
loggedInUser: "juanita@mozilla.com",
forceAuthentication: true,
issuer: "https://foo.com",
forceIssuer: "foo.com",
someThing: {
name: "Pertelote",
legs: 4,