浏览代码

Eschewing .slice()ing the arguments.

Only way the object is used in passing it along, reading .length and [0].
Therefore there is no need to actually copy it, it can be passed as-is.
Herbert Vojčík 10 年之前
父节点
当前提交
e43332a0cf
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      support/boot.js

+ 1 - 2
support/boot.js

@@ -211,8 +211,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 
 		function createHandler(selector) {
 			return function() {
-				var args = Array.prototype.slice.call(arguments);
-				return brikz.messageSend.messageNotUnderstood(this, selector, args);
+				return brikz.messageSend.messageNotUnderstood(this, selector, arguments);
 			};
 		}