mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
* 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>
22 lines
583 B
C++
22 lines
583 B
C++
#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;
|
|
}
|
|
} |