diff options
author | 2023-08-03 15:31:55 -0700 | |
---|---|---|
committer | 2023-08-03 15:31:55 -0700 | |
commit | 08cf0d562ae81b4fb30aa5e599ca76056582ac5f (patch) | |
tree | 8385fce04c9bf7b4138ae3c3545aa330f388f456 /src/bun.js/modules/UTF8ValidateModule.h | |
parent | 9a2c3dea88b22351ecc85126b0c225bfefea71bf (diff) | |
download | bun-08cf0d562ae81b4fb30aa5e599ca76056582ac5f.tar.gz bun-08cf0d562ae81b4fb30aa5e599ca76056582ac5f.tar.zst bun-08cf0d562ae81b4fb30aa5e599ca76056582ac5f.zip |
Bunch of fixes (#3516)
* Fix #3497
* Fix #3497
* Run prettier
* Fix package.json
* remove this too
* yeah
* Fix missing tests
* Use native for utf-8-validate
* Add module ID names to builtins
* Defer evaluation of ESM & CJS modules until link time
* Use builtin name for exports in plugins
* Add module IDs to builtins
* Update JSC build with new flag
* WebKit upgrade fixes
* Update WebKit
* prettier
* Upgrade WebKit
* bump
* Update once again
* Add visitAdditionalChildren, remove .fill() usage
* Update process.test.js
* Update fs.test.ts
---------
Co-authored-by: dave caruso <me@paperdave.net>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/modules/UTF8ValidateModule.h')
-rw-r--r-- | src/bun.js/modules/UTF8ValidateModule.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bun.js/modules/UTF8ValidateModule.h b/src/bun.js/modules/UTF8ValidateModule.h new file mode 100644 index 000000000..18f309e63 --- /dev/null +++ b/src/bun.js/modules/UTF8ValidateModule.h @@ -0,0 +1,20 @@ + +using namespace JSC; +using namespace WebCore; + +namespace Zig { +inline void +generateNativeModule_UTF8Validate(JSC::JSGlobalObject *globalObject, + JSC::Identifier moduleKey, + Vector<JSC::Identifier, 4> &exportNames, + JSC::MarkedArgumentBuffer &exportValues) { + auto &vm = globalObject->vm(); + + exportNames.append(vm.propertyNames->defaultKeyword); + exportValues.append(JSC::JSFunction::create( + vm, globalObject, 1, "utf8Validate"_s, jsBufferConstructorFunction_isUtf8, + ImplementationVisibility::Public, NoIntrinsic, + jsBufferConstructorFunction_isUtf8)); +} + +} // namespace Zig |