Start replacing String(const char*) constructor with a String::fromLatin1(const char*) function
https://bugs.webkit.org/show_bug.cgi?id=238701
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
* API/JSValue.mm:
(createStructHandlerMap):
(handerForStructTag):
* API/JSWrapperMap.mm:
(allocateConstructorForCustomClass):
* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::name):
* API/glib/JSCContext.cpp:
(jsc_context_check_syntax):
* b3/air/testair.cpp:
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptCallArgumentHandler::appendArgument):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName const):
* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json):
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):
* inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::sendMessageToBackend):
* jit/ExecutableAllocator.cpp:
(JSC::dumpJITMemory):
* jsc.cpp:
(JSC_DEFINE_HOST_FUNCTION):
(runWithOptions):
(CommandLine::parseArguments):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
* parser/Parser.h:
(JSC::Parser::updateErrorMessage):
* parser/SourceProvider.h:
* runtime/BytecodeCacheError.cpp:
(JSC::BytecodeCacheError::StandardError::message const):
* runtime/IntlLocale.cpp:
(JSC::IntlLocale::keywordValue const):
(JSC::IntlLocale::numberingSystems):
* runtime/IntlObject.cpp:
(JSC::numberingSystemsForLocale):
* runtime/NumberPrototype.cpp:
(JSC::toStringWithRadix):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::numberToStringInternal):
(JSC::int52ToString):
* runtime/Options.cpp:
(JSC::Options::overrideAliasedOptionWithHeuristic):
(JSC::Options::setAliasedOption):
* runtime/RegExpPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::displayName):
* runtime/StringPrototype.cpp:
(JSC::toLocaleCase):
* testRegExp.cpp:
(parseArguments):
* tools/CompilerTimingScope.cpp:
* tools/FunctionAllowlist.cpp:
(JSC::FunctionAllowlist::FunctionAllowlist):
* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Source/WebCore:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
(WebCore::RTCStatsLogger::toJSONString const):
* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::toException):
(WebCore::toRTCError):
* Modules/webauthn/WebAuthenticationUtils.cpp:
(WebCore::buildAttestationMap):
* Modules/webauthn/cbor/CBORValue.cpp:
(cbor::CBORValue::CBORValue):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::getVersionFromDatabase):
(WebCore::Database::setVersionInDatabase):
* animation/KeyframeEffect.cpp:
(WebCore::processPropertyIndexedKeyframes):
* animation/KeyframeEffect.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getDomainList):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
* crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
* crypto/algorithms/CryptoAlgorithmECDSA.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
* css/DOMCSSCustomPropertyDescriptor.h:
* css/makeprop.pl:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::types const):
* dom/TextDecoder.cpp:
(WebCore::TextDecoder::encoding const):
* editing/ApplyStyleCommand.cpp:
(WebCore::styleSpanClassString):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isInterchangeNewlineNode):
(WebCore::isInterchangeConvertedSpaceSpan):
* editing/TextInsertionBaseCommand.cpp:
(WebCore::canAppendNewLineFeedToSelection):
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::appendFormData const):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::testPreloadScannerViewportSupport):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResource::responseReceived):
* loader/cache/CachedApplicationManifest.cpp:
(WebCore::CachedApplicationManifest::encoding const):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::didAddClient):
(WebCore::CachedCSSStyleSheet::encoding const):
(WebCore::CachedCSSStyleSheet::checkNotify):
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::encoding const):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::encoding const):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::encoding const):
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::threadInfos):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::read):
* platform/gamepad/GamepadConstants.cpp:
(WebCore::standardGamepadMappingString):
(WebCore::xrStandardGamepadMappingString):
* platform/graphics/FourCC.h:
(WTF::LogArgument<WebCore::FourCC>::toString):
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::initialize):
(WebCore::GraphicsContextGLANGLE::getString):
* platform/mac/ThreadCheck.mm:
(WebCoreReportThreadViolation):
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::hashStringWithSalt):
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::initializeVoiceList):
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::authorizerFunction):
* platform/text/cocoa/LocaleCocoa.mm:
(WebCore::LocaleCocoa::monthLabels):
(WebCore::LocaleCocoa::shortMonthLabels):
* testing/Internals.cpp:
(WebCore::Internals::testDictionaryLogging):
* xml/XPathValue.h:
(WebCore::XPath::Value::Value):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
(WebCore::docLoaderFunc):
(WebCore::XSLTProcessor::transformToString):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
Source/WebCore/PAL:
* pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.cpp:
(PAL::WebGPU::adapterName):
* pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::DeviceImpl::popErrorScope):
Source/WebGPU:
* WebGPU/APIConversions.h:
(WebGPU::fromAPI):
* WebGPU/Adapter.mm:
(WebGPU::Adapter::requestDevice):
* WebGPU/ComputePipeline.mm:
(WebGPU::createConstantValues):
(WebGPU::Device::createComputePipeline):
* WebGPU/ShaderModule.mm:
(WebGPU::earlyCompileShaderModule):
(WebGPU::Device::createShaderModule):
Source/WTF:
* wtf/Logger.h:
(WTF::LogArgument::toString):
* wtf/text/WTFString.cpp:
(string):
* wtf/text/WTFString.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@292487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
index d9311c2..bc118c0 100644
--- a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
+++ b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp
@@ -816,7 +816,7 @@
if (frameType == FrameType::C) {
auto demangled = WTF::StackTrace::demangle(const_cast<void*>(cCodePC));
if (demangled)
- return String(demangled->demangledName() ? demangled->demangledName() : demangled->mangledName());
+ return String::fromLatin1(demangled->demangledName() ? demangled->demangledName() : demangled->mangledName());
WTF::dataLog("couldn't get a name");
}
#endif