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: Rebased Created Dec. 16, 2015, 11 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 wantXrays: false 165 wantXrays: false
166 }); 166 });
167 {%- endif %} 167 {%- endif %}
168 Services.scriptloader.loadSubScript(url, scopes[module]); 168 Services.scriptloader.loadSubScript(url, scopes[module]);
169 {%- if 'info' in requires %} 169 {%- if 'info' in requires %}
170 } 170 }
171 {%- endif %} 171 {%- endif %}
172 } 172 }
173 return scopes[module].exports; 173 return scopes[module].exports;
174 } 174 }
175 require.scopes = {__proto__: null}; 175 require.scopes = Object.create(null);
176 176
177 {%- if hasChromeRequires %} 177 {%- if hasChromeRequires %}
178 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); 178 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
179 179
180 let RequireObserver = 180 let RequireObserver =
181 { 181 {
182 observe: function(subject, topic, data) 182 observe: function(subject, topic, data)
183 { 183 {
184 if (topic == "{{metadata.get('general', 'basename')}}-require") 184 if (topic == "{{metadata.get('general', 'basename')}}-require")
185 { 185 {
186 subject.wrappedJSObject.exports = require(data); 186 subject.wrappedJSObject.exports = require(data);
187 } 187 }
188 }, 188 },
189 189
190 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse rver]) 190 QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObse rver])
191 }; 191 };
192 {%- endif %} 192 {%- 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