Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/sendReport.js

Issue 29333147: Issue 3464 - Make variables accessed from XUL truly global in Issue Reporter (Closed)
Patch Set: Created Jan. 4, 2016, 5:40 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/sendReport.js
===================================================================
--- a/chrome/content/ui/sendReport.js
+++ b/chrome/content/ui/sendReport.js
@@ -100,17 +100,17 @@ function serializeReportData()
appendElement(element, "option", {id: "javascript"}, Services.prefs.getBoolPref("javascript.enabled"));
appendElement(element, "option", {id: "cookieBehavior"}, Services.prefs.getIntPref("network.cookie.cookieBehavior"));
};
//
// Data collectors
//
-let reportsListDataSource =
+var reportsListDataSource =
{
list: [],
collectData: function(wnd, windowURI, callback)
{
let data = Prefs.recentReports;
if (data && "length" in data)
{
@@ -179,17 +179,17 @@ let reportsListDataSource =
{
if (event.button != 0 || !event.target || !event.target.hasAttribute("url"))
return;
UI.loadInBrowser(event.target.getAttribute("url"));
}
};
-let requestsDataSource =
+var requestsDataSource =
{
requests: reportElement("requests"),
origRequests: [],
requestNotifier: null,
callback: null,
nodeByKey: Object.create(null),
collectData: function(wnd, windowURI, callback)
@@ -237,17 +237,17 @@ let requestsDataSource =
{
this.requestNotifier.shutdown();
this.requestNotifier = null;
this.callback();
}
}
};
-let filtersDataSource =
+var filtersDataSource =
{
origFilters: [],
collectData: function(wnd, windowURI, callback)
{
let outerWindowID = wnd.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.outerWindowID;
@@ -268,17 +268,17 @@ let filtersDataSource =
this.origFilters.push(filter);
}
}
callback();
});
}
};
-let subscriptionsDataSource =
+var subscriptionsDataSource =
{
subscriptionFilter: function(s)
{
if (s.disabled || !(s instanceof RegularSubscription))
return false;
if (s instanceof DownloadableSubscription && !/^(http|https|ftp):/i.test(s.url))
return false;
return true;
@@ -312,17 +312,17 @@ let subscriptionsDataSource =
subscriptionXML.setAttribute("hardExpiration", subscription.expires - now);
subscriptionXML.setAttribute("downloadStatus", subscription.downloadStatus);
}
}
callback();
}
};
-let screenshotDataSource =
+var screenshotDataSource =
{
imageOffset: 10,
// Fields used for color reduction
_mapping: [0x00, 0x55, 0xAA, 0xFF],
_i: null,
_max: null,
_pixelData: null,
@@ -565,17 +565,17 @@ let screenshotDataSource =
Math.min(op.anchorX, op.currentX),
Math.min(op.anchorY, op.currentY));
if (!this._undoQueue.length)
E("screenshotUndoButton").disabled = true;
}
};
-let framesDataSource =
+var framesDataSource =
{
site: null,
collectData: function(wnd, windowURI, callback)
{
try
{
this.site = windowURI.host;
@@ -614,17 +614,17 @@ let framesDataSource =
catch (e)
{
// Don't break if something goes wrong
Cu.reportError(e);
}
}
};
-let errorsDataSource =
+var errorsDataSource =
{
collectData: function(wnd, windowURI, callback)
{
let {addonID} = require("info");
addonID = addonID.replace(/[\{\}]/g, "");
// See https://bugzilla.mozilla.org/show_bug.cgi?id=664695 - starting with
// Gecko 19 this function returns the result, before that it wrote to a
@@ -687,17 +687,17 @@ let errorsDataSource =
sourceLine: sourceLine
});
}
callback();
}
};
-let extensionsDataSource =
+var extensionsDataSource =
{
data: reportData.createElement("extensions"),
collectData: function(wnd, windowURI, callback)
{
try
{
let AddonManager = Cu.import("resource://gre/modules/AddonManager.jsm", null).AddonManager;
@@ -729,17 +729,17 @@ let extensionsDataSource =
{
if (doExport)
reportData.documentElement.appendChild(this.data);
else if (this.data.parentNode)
this.data.parentNode.removeChild(this.data);
}
};
-let subscriptionUpdateDataSource =
+var subscriptionUpdateDataSource =
{
contentWnd: null,
type: null,
outdated: null,
needUpdate: null,
subscriptionFilter: function(s)
{
@@ -881,17 +881,17 @@ let subscriptionUpdateDataSource =
updateOutdated: function()
{
for (let i = 0; i < this.outdated.length; i++)
Synchronizer.execute(this.outdated[i], true);
}
}
-let issuesDataSource =
+var issuesDataSource =
{
contentWnd: null,
isEnabled: Prefs.enabled,
whitelistFilter: null,
disabledFilters: [],
disabledSubscriptions: [],
ownFilters: [],
numSubscriptions: 0,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld