Bug 1015380 - Fix up UITour.jsm. r=gijs

This commit is contained in:
Bobby Holley 2014-05-28 11:14:27 -07:00
parent 06eeb8c149
commit 94e30da70f

View File

@ -635,17 +635,9 @@ this.UITour = {
},
sendPageCallback: function(aDocument, aCallbackID, aData = {}) {
let detail = Cu.createObjectIn(aDocument.defaultView);
detail.data = Cu.createObjectIn(detail);
for (let key of Object.keys(aData))
detail.data[key] = aData[key];
Cu.makeObjectPropsNormal(detail.data);
Cu.makeObjectPropsNormal(detail);
detail.callbackID = aCallbackID;
let detail = {data: aData, callbackID: aCallbackID};
detail = Cu.cloneInto(detail, aDocument.defaultView);
let event = new aDocument.defaultView.CustomEvent("mozUITourResponse", {
bubbles: true,
detail: detail