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

Side by Side Diff: bootstrap.js.tmpl

Issue 5462707926990848: Issue 1434 - Removed remaining non-standard JavaScript code from buildtools (Closed)
Patch Set: Created April 1, 2015, 11:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/hooks.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 const Cc = Components.classes; 5 const Cc = Components.classes;
6 const Ci = Components.interfaces; 6 const Ci = Components.interfaces;
7 const Cr = Components.results; 7 const Cr = Components.results;
8 const Cu = Components.utils; 8 const Cu = Components.utils;
9 9
10 let {Services, atob, btoa, File, TextDecoder, TextEncoder} = Cu.import("resource ://gre/modules/Services.jsm", null); 10 let {Services, atob, btoa, File, TextDecoder, TextEncoder} = Cu.import("resource ://gre/modules/Services.jsm", null);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 wantXrays: false 162 wantXrays: false
163 }); 163 });
164 {%- endif %} 164 {%- endif %}
165 Services.scriptloader.loadSubScript(url, scopes[module]); 165 Services.scriptloader.loadSubScript(url, scopes[module]);
166 {%- if 'info' in requires %} 166 {%- if 'info' in requires %}
167 } 167 }
168 {%- endif %} 168 {%- endif %}
169 } 169 }
170 return scopes[module].exports; 170 return scopes[module].exports;
171 } 171 }
172 require.scopes = {__proto__: null}; 172 require.scopes = Object.create(null);
173 173
174 {%- if hasChromeRequires %} 174 {%- if hasChromeRequires %}
175 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); 175 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
176 176
177 let RequireObserver = 177 let RequireObserver =
178 { 178 {
179 observe: function(subject, topic, data) 179 observe: function(subject, topic, data)
180 { 180 {
181 if (topic == "{{metadata.get('general', 'basename')}}-require") 181 if (topic == "{{metadata.get('general', 'basename')}}-require")
182 { 182 {
183 subject.wrappedJSObject.exports = require(data); 183 subject.wrappedJSObject.exports = require(data);
184 } 184 }
185 }, 185 },
186 186
187 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse rver]) 187 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse rver])
188 }; 188 };
189 {%- endif %} 189 {%- endif %}
OLDNEW
« no previous file with comments | « no previous file | lib/hooks.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld