fix(napi): gurantee -> guarantee (#683)

This commit is contained in:
Ikko Ashimine
2022-07-14 06:32:46 +09:00
committed by GitHub
parent 6e4e5fa94c
commit 4b271ee430

View File

@@ -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;
}
}