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

Unified Diff: templates/bootstrap.js.tmpl

Issue 29361133: Issue 4544 - Consider platformHTMLBindings.xml when detecting available keyboard shortcuts (Closed) Base URL: https://hg.adblockplus.org/buildtools
Patch Set: Created Oct. 31, 2016, 10:02 a.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 | « packagerGecko.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: templates/bootstrap.js.tmpl
===================================================================
--- a/templates/bootstrap.js.tmpl
+++ b/templates/bootstrap.js.tmpl
@@ -5,21 +5,17 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
let {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
Cu.importGlobalProperties(["atob", "btoa", "File", "URL",
- "TextDecoder", "TextEncoder"]);
-
-{%- if hasXMLHttpRequest %}
-Cu.importGlobalProperties(["XMLHttpRequest"]);
-{%- endif %}
+ "TextDecoder", "TextEncoder", "XMLHttpRequest"]);
Wladimir Palant 2016/10/31 10:06:42 For reference: originally there was no Cu.importGl
let addonData = null;
function startup(params, reason)
{
addonData = params;
{%- if hasChromeRequires %}
@@ -140,23 +136,21 @@ function require(module)
platformVersion: appInfo.platformVersion
};
}
else
{
{%- endif %}
let url = addonData.resourceURI.spec + "lib/" + module + ".js";
scopes[module] = {
- Cc, Ci, Cr, Cu, atob, btoa, File, URL, require,
+ Cc, Ci, Cr, Cu, atob, btoa, File, URL, TextDecoder, TextEncoder,
Wladimir Palant 2016/10/31 10:06:42 TextDecoder and TextEncoder globals weren't declar
+ XMLHttpRequest, require,
{% if hasShutdownHandlers %}
onShutdown,
{% endif %}
- {%- if hasXMLHttpRequest %}
- XMLHttpRequest,
- {% endif %}
exports: {}};
{%- if multicompartment %}
let principal = Cc["@mozilla.org/systemprincipal;1"].getService(Ci.nsIPrincipal);
scopes[module] = new Cu.Sandbox(principal, {
sandboxName: url,
sandboxPrototype: scopes[module],
wantXrays: false
});
« no previous file with comments | « packagerGecko.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld