-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update URL from WebKit * Set `ERR_MISSING_ARGS` code on all Error objects from C++ * Fix the `code` * [autofix.ci] apply automated fixes * Micro optimize URL * [autofix.ci] apply automated fixes * Update url.mjs * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1e20f61
commit f5c8914
Showing
9 changed files
with
291 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { bench, run } from "./runner.mjs"; | ||
|
||
bench(`new URL('https://example.com/')`, () => { | ||
const url = new URL("https://example.com/"); | ||
}); | ||
|
||
bench(`new URL('https://example.com')`, () => { | ||
const url = new URL("https://example.com"); | ||
}); | ||
|
||
bench(`new URL('https://www.example.com')`, () => { | ||
const url = new URL("https://www.example.com"); | ||
}); | ||
|
||
bench(`new URL('https://www.example.com/')`, () => { | ||
const url = new URL("https://www.example.com/"); | ||
}); | ||
|
||
await run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "root.h" | ||
|
||
#include "BunClientData.h" | ||
#include "JSDOMOperation.h" | ||
#include "BunBuiltinNames.h" | ||
|
||
#undef createNotEnoughArgumentsError | ||
|
||
namespace WebCore { | ||
|
||
JSC::JSObject* createNotEnoughArgumentsErrorBun(JSC::JSGlobalObject* globalObject) | ||
{ | ||
JSC::JSObject* error = JSC::createNotEnoughArgumentsError(globalObject); | ||
if (LIKELY(error)) { | ||
auto& vm = globalObject->vm(); | ||
const auto& names = WebCore::builtinNames(vm); | ||
error->putDirect(vm, names.codePublicName(), JSC::jsString(vm, WTF::String("ERR_MISSING_ARGS"_s)), 0); | ||
} | ||
|
||
return error; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.