benchmark: fix first call to URL in useWHATWG

PR-URL: https://github.com/nodejs/node/pull/11170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
Joyee Cheung 2017-02-05 03:57:11 +08:00
parent 6af0bfe1a0
commit c6b586de33

View File

@ -34,7 +34,7 @@ function useLegacy(n, input) {
}
function useWHATWG(n, input) {
var noDead = url.parse(input);
var noDead = new URL(input);
bench.start();
for (var i = 0; i < n; i += 1) {
noDead = new URL(input);