mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix(napi): gurantee -> guarantee (#683)
This commit is contained in:
@@ -420,7 +420,7 @@ extern "C" napi_status napi_set_named_property(napi_env env, napi_value object,
|
||||
// This is more efficient than using WTF::String::FromUTF8
|
||||
// it doesn't copy the string
|
||||
// but it's only safe to use if we are not setting a property
|
||||
// because we can't gurantee the lifetime of it
|
||||
// because we can't guarantee the lifetime of it
|
||||
#define PROPERTY_NAME_FROM_UTF8(identifierName) \
|
||||
size_t utf8Len = strlen(utf8name); \
|
||||
JSC::PropertyName identifierName = LIKELY(charactersAreAllASCII(reinterpret_cast<const LChar*>(utf8name), utf8Len)) ? JSC::PropertyName(JSC::Identifier::fromString(vm, WTF::String(WTF::StringImpl::createWithoutCopying(utf8name, utf8Len)))) : JSC::PropertyName(JSC::Identifier::fromString(vm, WTF::String::fromUTF8(utf8name)));
|
||||
@@ -1317,4 +1317,4 @@ extern "C" napi_status napi_get_property_names(napi_env env, napi_value object,
|
||||
*result = toNapi(value);
|
||||
|
||||
return napi_ok;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user