Skip to content

Commit cd38dac

Browse files
authored
Remove needless call to Array.prototype.slice.call. NFC (#17649)
1 parent e61054f commit cd38dac

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/library_exceptions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ var LibraryExceptions = {
353353
setTempRet0(0);
354354
return thrown;
355355
}
356-
var typeArray = Array.prototype.slice.call(arguments);
357356

358357
// can_catch receives a **, add indirection
359358
#if EXCEPTION_DEBUG
@@ -363,8 +362,8 @@ var LibraryExceptions = {
363362
// Due to inheritance, those types may not precisely match the
364363
// type of the thrown object. Find one which matches, and
365364
// return the type of the catch block which should be called.
366-
for (var i = 0; i < typeArray.length; i++) {
367-
var caughtType = typeArray[i];
365+
for (var i = 0; i < arguments.length; i++) {
366+
var caughtType = arguments[i];
368367
if (caughtType === 0 || caughtType === thrownType) {
369368
// Catch all clause matched or exactly the same type is caught
370369
break;

src/library_path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ mergeInto(LibraryManager.library, {
7373
return path.substr(lastSlash+1);
7474
},
7575
join: function() {
76-
var paths = Array.prototype.slice.call(arguments, 0);
76+
var paths = Array.prototype.slice.call(arguments);
7777
return PATH.normalize(paths.join('/'));
7878
},
7979
join2: (l, r) => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
31508
1+
31460
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
31608
1+
31560

0 commit comments

Comments
 (0)