1
1
/**
2
- * @license r.js 2.2.0 Copyright jQuery Foundation and other contributors.
2
+ * @license r.js 2.2.0+ Tue, 12 Jul 2016 03:17:23 GMT Copyright jQuery Foundation and other contributors.
3
3
* Released under MIT license, http://github.com/requirejs/r.js/LICENSE
4
4
*/
5
5
@@ -19,7 +19,7 @@ var requirejs, require, define, xpcUtil;
19
19
(function (console, args, readFileFunc) {
20
20
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
21
21
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
22
- version = '2.2.0',
22
+ version = '2.2.0+ Tue, 12 Jul 2016 03:17:23 GMT ',
23
23
jsSuffixRegExp = /\.js$/,
24
24
commandOption = '',
25
25
useLibLoaded = {},
@@ -3569,7 +3569,11 @@ define('node/file', ['fs', 'path', 'prim'], function (fs, path, prim) {
3569
3569
} else if (stat.isDirectory() &&
3570
3570
(!file.exclusionRegExp || !file.exclusionRegExp.test(fileName))) {
3571
3571
dirFiles = this.getFilteredFileList(filePath, regExpFilters, makeUnixPaths);
3572
- files.push.apply(files, dirFiles);
3572
+ //Do not use push.apply for dir listings, can hit limit of max number
3573
+ //of arguments to a function call, #921.
3574
+ dirFiles.forEach(function (dirFile) {
3575
+ files.push(dirFile);
3576
+ });
3573
3577
}
3574
3578
}
3575
3579
}
@@ -3838,7 +3842,11 @@ define('rhino/file', ['prim'], function (prim) {
3838
3842
} else if (fileObj.isDirectory() &&
3839
3843
(!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.getName()))) {
3840
3844
dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true);
3841
- files.push.apply(files, dirFiles);
3845
+ //Do not use push.apply for dir listings, can hit limit of max number
3846
+ //of arguments to a function call, #921.
3847
+ dirFiles.forEach(function (dirFile) {
3848
+ files.push(dirFile);
3849
+ });
3842
3850
}
3843
3851
}
3844
3852
}
@@ -4145,7 +4153,11 @@ define('xpconnect/file', ['prim'], function (prim) {
4145
4153
} else if (fileObj.isDirectory() &&
4146
4154
(!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.leafName))) {
4147
4155
dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true);
4148
- files.push.apply(files, dirFiles);
4156
+ //Do not use push.apply for dir listings, can hit limit of max number
4157
+ //of arguments to a function call, #921.
4158
+ dirFiles.forEach(function (dirFile) {
4159
+ files.push(dirFile);
4160
+ });
4149
4161
}
4150
4162
}
4151
4163
}
0 commit comments