Optimize createPartialWrapper.

This commit is contained in:
John-David Dalton
2015-11-09 23:16:22 -08:00
parent 977438309b
commit 80d91b693a

View File

@@ -4161,8 +4161,6 @@
Ctor = createCtorWrapper(func);
function wrapper() {
// Avoid `arguments` object use disqualifying optimizations by
// converting it to an array before providing it `func`.
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
@@ -4176,7 +4174,7 @@
args[leftIndex++] = arguments[++argsIndex];
}
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, args);
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}