cleanup: Use rest parameters instead of arguments

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
Florian Müllner 2019-02-12 12:24:30 +01:00
parent 0b08ee54bb
commit fe83cd91bb
3 changed files with 11 additions and 10 deletions

View File

@ -611,8 +611,8 @@ function initEnvironment() {
// Monkey-patch in a "global" object that fakes some Shell utilities // Monkey-patch in a "global" object that fakes some Shell utilities
// that ExtensionUtils depends on. // that ExtensionUtils depends on.
window.global = { window.global = {
log() { log(...args) {
print([].join.call(arguments, ', ')); print(args.join(', '));
}, },
logError(s) { logError(s) {

View File

@ -57,8 +57,8 @@ function _patchLayoutClass(layoutClass, styleProps) {
}; };
} }
function _loggingFunc() { function _loggingFunc(...args) {
let fields = {'MESSAGE': [].join.call(arguments, ', ')}; let fields = {'MESSAGE': args.join(', ')};
let domain = "GNOME Shell"; let domain = "GNOME Shell";
// If the caller is an extension, add it as metadata // If the caller is an extension, add it as metadata

View File

@ -109,8 +109,9 @@ function isTweening(scope) {
return Tweener.getTweenCount(scope) != 0; return Tweener.getTweenCount(scope) != 0;
} }
function removeTweens(scope) { function removeTweens(...args) {
if (Tweener.removeTweens.apply(null, arguments)) { if (Tweener.removeTweens(args)) {
let [scope] = args;
// If we just removed the last active tween, clean up // If we just removed the last active tween, clean up
if (Tweener.getTweenCount(scope) == 0) if (Tweener.getTweenCount(scope) == 0)
_tweenCompleted(scope); _tweenCompleted(scope);
@ -119,12 +120,12 @@ function removeTweens(scope) {
return false; return false;
} }
function pauseTweens() { function pauseTweens(...args) {
return Tweener.pauseTweens.apply(null, arguments); return Tweener.pauseTweens(...args);
} }
function resumeTweens() { function resumeTweens(...args) {
return Tweener.resumeTweens.apply(null, arguments); return Tweener.resumeTweens(...args);
} }