mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1217318 - Remove for-each from uriloader/. r=bz
--HG-- extra : commitid : 7dTGwySR0Y3 extra : rebase_source : 9cfeded38b177a0034822fa501b78657ff089b0a
This commit is contained in:
parent
27c2238894
commit
7fa4ec0982
@ -219,7 +219,7 @@ HandlerService.prototype = {
|
||||
var schemes = {};
|
||||
|
||||
// read all the scheme prefs into a hash
|
||||
for each (var schemePrefName in schemePrefList) {
|
||||
for (var schemePrefName of schemePrefList) {
|
||||
|
||||
let [scheme, handlerNumber, attribute] = schemePrefName.split(".");
|
||||
|
||||
@ -259,8 +259,8 @@ HandlerService.prototype = {
|
||||
// cache the possible handlers to avoid extra xpconnect traversals.
|
||||
let possibleHandlers = protoInfo.possibleApplicationHandlers;
|
||||
|
||||
for each (var handlerPrefs in schemes[scheme]) {
|
||||
|
||||
for (let handlerNumber in schemes[scheme]) {
|
||||
let handlerPrefs = schemes[scheme][handlerNumber];
|
||||
let handlerApp = Cc["@mozilla.org/uriloader/web-handler-app;1"].
|
||||
createInstance(Ci.nsIWebHandlerApp);
|
||||
|
||||
@ -369,7 +369,7 @@ HandlerService.prototype = {
|
||||
// If the object represents a MIME type handler, then also retrieve
|
||||
// any file extensions.
|
||||
if (aHandlerInfo instanceof Ci.nsIMIMEInfo)
|
||||
for each (let fileExtension in this._retrieveFileExtensions(typeID))
|
||||
for (let fileExtension of this._retrieveFileExtensions(typeID))
|
||||
aHandlerInfo.appendExtension(fileExtension);
|
||||
},
|
||||
|
||||
@ -430,7 +430,7 @@ HandlerService.prototype = {
|
||||
|
||||
// Now that we've removed the info record, remove any possible handlers
|
||||
// that aren't referenced by other info records.
|
||||
for each (let possibleHandlerID in possibleHandlerIDs)
|
||||
for (let possibleHandlerID of possibleHandlerIDs)
|
||||
if (!this._existsResourceTarget(NC_POSSIBLE_APP, possibleHandlerID))
|
||||
this._removeAssertions(possibleHandlerID);
|
||||
|
||||
|
@ -229,7 +229,7 @@ function run_test() {
|
||||
|
||||
initChildTestEnv();
|
||||
|
||||
for each (set in tests)
|
||||
for (let set of tests)
|
||||
httpserver.registerPathHandler(set[0], set[1]);
|
||||
|
||||
runNextTest();
|
||||
|
Loading…
Reference in New Issue
Block a user