Avoid resolving substrings unnecessarily (#16090)

This commit is contained in:
Jarred Sumner
2024-12-31 17:06:49 -08:00
committed by GitHub
parent 1ae855223c
commit 02196cbf0e
25 changed files with 146 additions and 98 deletions

View File

@@ -522,7 +522,7 @@ JSC::EncodedJSValue INVALID_ARG_VALUE(JSC::ThrowScope& throwScope, JSC::JSGlobal
return {};
}
JSC::EncodedJSValue UNKNOWN_ENCODING(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::String& encoding)
JSC::EncodedJSValue UNKNOWN_ENCODING(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::StringView encoding)
{
auto message = makeString("Unknown encoding: "_s, encoding);
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_UNKNOWN_ENCODING, message));