WebKit Bugzilla
Attachment 360243 Details for
Bug 192742
: Replace many uses of String::format with more type-safe alternatives
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192742-20190126112917.patch (text/plain), 131.51 KB, created by
Darin Adler
on 2019-01-26 11:29:18 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2019-01-26 11:29:18 PST
Size:
131.51 KB
patch
obsolete
>Subversion Revision: 240403 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 5a4c92f25b38de8a96363eff75a29d00161b2bb9..295bfbb094e8566d819842e067758d697e0c89bd 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ * inspector/InjectedScriptBase.cpp: >+ (Inspector::InjectedScriptBase::makeCall): Use makeString. >+ (Inspector::InjectedScriptBase::makeAsyncCall): Ditto. >+ * inspector/InspectorBackendDispatcher.cpp: >+ (Inspector::BackendDispatcher::getPropertyValue): Ditto. >+ * inspector/agents/InspectorConsoleAgent.cpp: >+ (Inspector::InspectorConsoleAgent::enable): Ditto. >+ * jsc.cpp: >+ (FunctionJSCStackFunctor::operator() const): Ditto. >+ >+ * runtime/IntlDateTimeFormat.cpp: >+ (JSC::IntlDateTimeFormat::initializeDateTimeFormat): Use string concatenation. >+ * runtime/IntlObject.cpp: >+ (JSC::canonicalizeLocaleList): Ditto. >+ > 2019-01-23 Mark Lam <mark.lam@apple.com> > > ARM64E should not ENABLE(SEPARATED_WX_HEAP). >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 96118d3eee2893517eaf14011d5692589905b793..6a8ca853e9845bde741c455fa8019f3b873cb2ee 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ * wtf/WorkQueue.cpp: >+ (WTF::WorkQueue::concurrentApply): Use makeString. >+ >+ * wtf/dtoa.cpp: >+ (WTF::dtoa): Use sprintf instead of String::format in the comments, >+ since these functions have nothing to do with WTF::String. >+ > 2019-01-23 Mark Lam <mark.lam@apple.com> > > ARM64E should not ENABLE(SEPARATED_WX_HEAP). >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 366e4bbfe4da0582be83234a9159bb81eba0a393..7979d1677d5dbc97213ea0c7ec155e6c3b8be979 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,183 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ A while back, String::format was more efficient than string concatenation, >+ but that is no longer true, and we should prefer String::number, makeString, >+ or concatenation with the "+" operator to String::format for new code. >+ >+ This is not as good for programmers who are fond of printf formatting >+ style, and in some cases it's a little harder to read the strings >+ interspersed with variables rather than a format string, but it's better >+ in a few ways: >+ >+ - more efficient (I didn't measure the difference, but it's definitely >+ slower to use String::Format which calls vsnprintf twice than to use >+ the WTF code) >+ - works in a type-safe way without a need to use a format specifier such >+ as "%" PRIu64 or "%tu" making it much easier to avoid problems due to >+ subtle differences between platforms >+ - allows us to use StringView in some cases to sidestep the need to >+ allocate temporary WTF::String objects >+ - does not require converting each WTF::String to a C string, allowing >+ us to remove many cases of ".utf8().data()" and similar expressions, >+ eliminating the allocation of temporary WTF::CString objects >+ >+ This patch covers a batch of easiest-to-convert call sites. >+ Later patches will allow us to deprecate or remove String::format. >+ >+ * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: >+ (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use makeString. >+ * Modules/indexeddb/shared/IDBCursorInfo.cpp: >+ (WebCore::IDBCursorInfo::loggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp: >+ (WebCore::IDBGetAllRecordsData::loggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBGetRecordData.cpp: >+ (WebCore::IDBGetRecordData::loggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBIndexInfo.cpp: >+ (WebCore::IDBIndexInfo::loggingString const): Ditto. >+ (WebCore::IDBIndexInfo::condensedLoggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBIterateCursorData.cpp: >+ (WebCore::IDBIterateCursorData::loggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: >+ (WebCore::IDBObjectStoreInfo::condensedLoggingString const): Ditto. >+ * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: >+ (WebCore::IDBResourceIdentifier::loggingString const): Ditto. >+ * Modules/webdatabase/Database.cpp: >+ (WebCore::formatErrorMessage): Ditto. >+ * Modules/webdatabase/SQLError.h: >+ (WebCore::SQLError::create): Ditto. >+ >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateImplementation): Use makeString. >+ >+ * bindings/scripts/test/JS/JSInterfaceName.cpp: >+ * bindings/scripts/test/JS/JSMapLike.cpp: >+ * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: >+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: >+ * bindings/scripts/test/JS/JSTestCEReactions.cpp: >+ * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: >+ * bindings/scripts/test/JS/JSTestCallTracer.cpp: >+ * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: >+ * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: >+ * bindings/scripts/test/JS/JSTestDOMJIT.cpp: >+ * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: >+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp: >+ * bindings/scripts/test/JS/JSTestEventTarget.cpp: >+ * bindings/scripts/test/JS/JSTestException.cpp: >+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: >+ * bindings/scripts/test/JS/JSTestGlobalObject.cpp: >+ * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: >+ * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestInterface.cpp: >+ * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: >+ * bindings/scripts/test/JS/JSTestIterable.cpp: >+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: >+ * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: >+ * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: >+ * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: >+ * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: >+ * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: >+ * bindings/scripts/test/JS/JSTestNode.cpp: >+ * bindings/scripts/test/JS/JSTestObj.cpp: >+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: >+ * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: >+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: >+ * bindings/scripts/test/JS/JSTestPluginInterface.cpp: >+ * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: >+ * bindings/scripts/test/JS/JSTestSerialization.cpp: >+ * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: >+ * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: >+ * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: >+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: >+ * bindings/scripts/test/JS/JSTestStringifier.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: >+ * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: >+ * bindings/scripts/test/JS/JSTestTypedefs.cpp: >+ Updated expected results. >+: >+ * css/parser/CSSPropertyParserHelpers.cpp: >+ (WebCore::CSSPropertyParserHelpers::parseHexColor): Use String::number >+ and makeString. >+ >+ * html/HTMLSelectElement.cpp: >+ (WebCore::HTMLSelectElement::setLength): Use makeString. >+ * html/ImageDocument.cpp: >+ (WebCore::ImageDocument::imageUpdated): Ditto. >+ * html/parser/XSSAuditor.cpp: >+ (WebCore::XSSAuditor::init): Ditto. >+ * inspector/InspectorFrontendClientLocal.cpp: >+ (WebCore::InspectorFrontendClientLocal::setDockingUnavailable): Ditto. >+ (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Ditto. >+ (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): Ditto. >+ (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): Ditto. >+ (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Ditto. >+ * inspector/agents/InspectorCSSAgent.cpp: Ditto. >+ * inspector/agents/InspectorIndexedDBAgent.cpp: Ditto. >+ * page/MemoryRelease.cpp: >+ (WebCore::logMemoryStatisticsAtTimeOfDeath): Ditto. >+ >+ * page/cocoa/ResourceUsageOverlayCocoa.mm: >+ (WebCore::formatByteNumber): Use String::number. >+ (WebCore::ResourceUsageOverlay::platformDraw): Use string concatenation. >+ >+ * page/cocoa/ResourceUsageThreadCocoa.mm: >+ (WebCore::logFootprintComparison): Use makeString. >+ * platform/animation/TimingFunction.cpp: >+ (WebCore::TimingFunction::cssText const): Ditto. >+ >+ * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: >+ (WebCore::AVTrackPrivateAVFObjCImpl::id const): Use AtomicString::number. >+ * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h: >+ (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC): Ditto. >+ >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::GraphicsLayerCA::setContentsToSolidColor): Use makeString. >+ (WebCore::GraphicsLayerCA::updateContentsImage): Ditto. >+ (WebCore::GraphicsLayerCA::updateContentsRects): Ditto. >+ (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): Ditto. >+ * platform/mock/MockRealtimeVideoSource.cpp: >+ (WebCore::MockRealtimeVideoSource::drawText): Ditto. >+ >+ * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Use String::number. >+ >+ * platform/network/ParsedContentRange.cpp: >+ (WebCore::ParsedContentRange::headerValue const): Use makeString. >+ >+ * platform/network/cf/NetworkStorageSessionCFNet.cpp: Removed some unnecessary >+ compiler conditionals and reorganized the start/stop of namespaces. >+ (WebCore::NetworkStorageSession::switchToNewTestingSession): Use makeString. >+ >+ * platform/sql/SQLiteDatabase.cpp: >+ (WebCore::unauthorizedSQLFunction): Use makeString. >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::logLayerInfo): Ditto. >+ * workers/service/server/RegistrationDatabase.cpp: >+ (WebCore::RegistrationDatabase::ensureValidRecordsTable): Ditto. >+ (WebCore::RegistrationDatabase::importRecords): Ditto. >+ > 2019-01-23 Benjamin Poulain <benjamin@webkit.org> > > <rdar://problem/27686430> Revert workaround AVPlayer.setMuted bug on macOS >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6c1b6f6b4fbaf7dd73c7c594046719ac8f21dd2e..66909153433836fb753e76e3cca5922d27f0e1f4 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ * Shared/WebMemorySampler.cpp: >+ (WebKit::WebMemorySampler::writeHeaders): Use makeString. >+ >+ * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: >+ (WebKit::LocalAuthenticator::makeCredential): Use string concatentation. >+ >+ * UIProcess/WebInspectorUtilities.cpp: >+ (WebKit::inspectorPageGroupIdentifierForPage): Use makeString. >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::processDidFinishLaunching): Ditto. >+ (WebKit::WebProcessPool::startMemorySampler): Ditto. >+ > 2019-01-23 Ross Kirsling <ross.kirsling@sony.com> > > [Curl] Unreviewed build fix for r240292 and friends. >diff --git a/Source/WebKitLegacy/ChangeLog b/Source/WebKitLegacy/ChangeLog >index c8e6dd9785c72e8a74ef786f2779329c4432bb80..5884b286134c09492e3a7e5a01ba2bf9152dc833 100644 >--- a/Source/WebKitLegacy/ChangeLog >+++ b/Source/WebKitLegacy/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-26 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ * Shared/WebMemorySampler.cpp: >+ (WebKit::WebMemorySampler::writeHeaders): Use makeString. >+ >+ * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: >+ (WebKit::LocalAuthenticator::makeCredential): Use string concatentation. >+ >+ * UIProcess/WebInspectorUtilities.cpp: >+ (WebKit::inspectorPageGroupIdentifierForPage): Use makeString. >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::processDidFinishLaunching): Ditto. >+ (WebKit::WebProcessPool::startMemorySampler): Ditto. >+ > 2019-01-23 Ross Kirsling <ross.kirsling@sony.com> > > [Curl] Unreviewed build fix for r240292 and friends. >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >index 91d0c7fb175001aec6fcf6579b080af4bb3a8468..fd8bbcf06f00b1877dfa66075e2d5a2811161cba 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >@@ -40,7 +40,7 @@ > #include "NativeStdFunctionCell.h" > #include "ScriptFunctionCall.h" > #include <wtf/JSONValues.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace Inspector { > >@@ -91,7 +91,7 @@ Ref<JSON::Value> InjectedScriptBase::makeCall(Deprecated::ScriptFunctionCall& fu > > RefPtr<JSON::Value> resultJSONValue = toInspectorValue(*m_injectedScriptObject.scriptState(), resultJSValue); > if (!resultJSONValue) >- return JSON::Value::create(String::format("Object has too long reference chain (must not be longer than %d)", JSON::Value::maxDepth)); >+ return JSON::Value::create(makeString("Object has too long reference chain (must not be longer than ", JSON::Value::maxDepth, ')')); > > return resultJSONValue.releaseNonNull(); > } >@@ -122,7 +122,7 @@ void InjectedScriptBase::makeAsyncCall(Deprecated::ScriptFunctionCall& function, > if (auto resultJSONValue = toInspectorValue(*exec, exec->argument(0))) > checkAsyncCallResult(resultJSONValue, callback); > else >- checkAsyncCallResult(JSON::Value::create(String::format("Object has too long reference chain (must not be longer than %d)", JSON::Value::maxDepth)), callback); >+ checkAsyncCallResult(JSON::Value::create(makeString("Object has too long reference chain (must not be longer than ", JSON::Value::maxDepth, ')')), callback); > return JSC::JSValue::encode(JSC::jsUndefined()); > }); > } >diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >index 5cbc0da9df474a13abae711179ae3d5de11c294c..fdefd42ceb37b0b72431205b8a1164d7408d07dd 100644 >--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >@@ -289,19 +289,19 @@ T BackendDispatcher::getPropertyValue(JSON::Object* object, const String& name, > > if (!object) { > if (!out_optionalValueFound) >- reportProtocolError(BackendDispatcher::InvalidParams, String::format("'params' object must contain required parameter '%s' with type '%s'.", name.utf8().data(), typeName)); >+ reportProtocolError(BackendDispatcher::InvalidParams, makeString("'params' object must contain required parameter '", name, "' with type '", typeName, "'.")); > return result; > } > > auto findResult = object->find(name); > if (findResult == object->end()) { > if (!out_optionalValueFound) >- reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' with type '%s' was not found.", name.utf8().data(), typeName)); >+ reportProtocolError(BackendDispatcher::InvalidParams, makeString("Parameter '", name, "' with type '", typeName, "' was not found.")); > return result; > } > > if (!asMethod(*findResult->value, result)) { >- reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' has wrong type. It must be '%s'.", name.utf8().data(), typeName)); >+ reportProtocolError(BackendDispatcher::InvalidParams, makeString("Parameter '", name, "' has wrong type. It must be '", typeName, "'.")); > return result; > } > >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >index 4cfed7c55f468db4eb1b50f50a824c3fdd7fea99..3fc5e992a950f2019f91648d0d1ae7d2736e42fc 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >@@ -35,7 +35,7 @@ > #include "ScriptCallStack.h" > #include "ScriptCallStackFactory.h" > #include "ScriptObject.h" >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace Inspector { > >@@ -79,7 +79,7 @@ void InspectorConsoleAgent::enable(ErrorString&) > m_enabled = true; > > if (m_expiredConsoleMessageCount) { >- ConsoleMessage expiredMessage(MessageSource::Other, MessageType::Log, MessageLevel::Warning, String::format("%d console messages are not shown.", m_expiredConsoleMessageCount)); >+ ConsoleMessage expiredMessage(MessageSource::Other, MessageType::Log, MessageLevel::Warning, makeString(m_expiredConsoleMessageCount, " console messages are not shown.")); > expiredMessage.addToFrontend(*m_frontendDispatcher, m_injectedScriptManager, false); > } > >diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp >index deba637f1213d943b24021f25402cd2fd985a91a..78840132dbf1b68c9fc7f9ad3463e4cfcb9b7eaf 100644 >--- a/Source/JavaScriptCore/jsc.cpp >+++ b/Source/JavaScriptCore/jsc.cpp >@@ -91,6 +91,7 @@ > #include <wtf/URL.h> > #include <wtf/WallTime.h> > #include <wtf/text/StringBuilder.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > #if OS(WINDOWS) > #include <direct.h> >@@ -1172,7 +1173,7 @@ public: > > StackVisitor::Status operator()(StackVisitor& visitor) const > { >- m_trace.append(String::format(" %zu %s\n", visitor->index(), visitor->toString().utf8().data())); >+ m_trace.append(makeString(" ", visitor->index(), " ", visitor->toString(), '\n')); > return StackVisitor::Continue; > } > >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >index ae3d680185300d4fb2c2a2207a73a3917de8f34a..1e8d9e3cb3c0261dcd58307358a0497b850463fc 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >@@ -504,7 +504,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > RETURN_IF_EXCEPTION(scope, void()); > tz = canonicalizeTimeZoneName(originalTz); > if (tz.isNull()) { >- throwRangeError(&exec, scope, String::format("invalid time zone: %s", originalTz.utf8().data())); >+ throwRangeError(&exec, scope, "invalid time zone: " + originalTz); > return; > } > } else >diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp >index 35c0b8822e191c91005c45ede669dcd67754cd75..e17493abf307ec21f948370d0e4514292e57a0d8 100644 >--- a/Source/JavaScriptCore/runtime/IntlObject.cpp >+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp >@@ -592,7 +592,7 @@ Vector<String> canonicalizeLocaleList(ExecState& state, JSValue locales) > > String canonicalizedTag = canonicalizeLanguageTag(tag->value(&state)); > if (canonicalizedTag.isNull()) { >- throwException(&state, scope, createRangeError(&state, String::format("invalid language tag: %s", tag->value(&state).utf8().data()))); >+ throwException(&state, scope, createRangeError(&state, "invalid language tag: " + tag->value(&state))); > return Vector<String>(); > } > >diff --git a/Source/WTF/wtf/WorkQueue.cpp b/Source/WTF/wtf/WorkQueue.cpp >index 441b12d34ea881f02bd38f6bd1023025f386e837..288c186280cf47bda290533728e025dd70eb52b3 100644 >--- a/Source/WTF/wtf/WorkQueue.cpp >+++ b/Source/WTF/wtf/WorkQueue.cpp >@@ -36,7 +36,7 @@ > #include <wtf/NumberOfCores.h> > #include <wtf/Ref.h> > #include <wtf/Threading.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WTF { > >diff --git a/Source/WTF/wtf/dtoa.cpp b/Source/WTF/wtf/dtoa.cpp >index 84655830e90fb7eb754ec7dd940b253eca5e4e52..683314ffd4e98a5fdc08586fc877881b2ab6cabf 100644 >--- a/Source/WTF/wtf/dtoa.cpp >+++ b/Source/WTF/wtf/dtoa.cpp >@@ -1272,7 +1272,7 @@ static inline const char* formatStringTruncatingTrailingZerosIfNeeded(NumberToSt > > const char* numberToFixedPrecisionString(double d, unsigned significantFigures, NumberToStringBuffer buffer, bool truncateTrailingZeros) > { >- // Mimic String::format("%.[precision]g", ...), but use dtoas rounding facilities. >+ // Mimic sprintf("%.[precision]g", ...), but use dtoas rounding facilities. > // "g": Signed value printed in f or e format, whichever is more compact for the given value and precision. > // The e format is used only when the exponent of the value is less than â4 or greater than or equal to the > // precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it. >@@ -1287,7 +1287,7 @@ const char* numberToFixedPrecisionString(double d, unsigned significantFigures, > > const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToStringBuffer buffer) > { >- // Mimic String::format("%.[precision]f", ...), but use dtoas rounding facilities. >+ // Mimic sprintf("%.[precision]f", ...), but use dtoas rounding facilities. > // "f": Signed value having the form [ â ]dddd.dddd, where dddd is one or more decimal digits. > // The number of digits before the decimal point depends on the magnitude of the number, and > // the number of digits after the decimal point depends on the requested precision. >diff --git a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >index 2178cc42a9b51143ce5d85f4d11f7ab260924ec7..3582c5873c5c933a33e5f3e7891c8be27e567f03 100644 >--- a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >@@ -55,6 +55,7 @@ > #include <JavaScriptCore/StrongInlines.h> > #include <JavaScriptCore/StructureInlines.h> > #include <wtf/NeverDestroyed.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > using namespace JSC; >@@ -1844,7 +1845,7 @@ IDBError SQLiteIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti > } > > // We don't already have a file for this blobURL, so commit our file as a unique filename >- String storedFilename = String::format("%" PRId64 ".blob", potentialFileNameInteger); >+ String storedFilename = makeString(potentialFileNameInteger, ".blob"); > { > auto* sql = cachedStatement(SQL::AddBlobFilename, "INSERT INTO BlobFiles VALUES (?, ?);"_s); > if (!sql >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp >index 0d3e3388f8f272b1dfc3556699a5bd88c9d46431..0e6d9cdeb1fe1b7d7909eec65c53e2836f244356 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp >@@ -31,6 +31,7 @@ > #include "IDBDatabase.h" > #include "IDBTransaction.h" > #include "IndexedDB.h" >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -100,13 +101,15 @@ IDBCursorInfo IDBCursorInfo::isolatedCopy() const > } > > #if !LOG_DISABLED >+ > String IDBCursorInfo::loggingString() const > { > if (m_source == IndexedDB::CursorSource::Index) >- return String::format("<Crsr: %s Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data()); >+ return makeString("<Crsr: ", m_cursorIdentifier.loggingString(), " Idx ", m_sourceIdentifier, ", OS ", m_objectStoreIdentifier, ", tx ", m_transactionIdentifier.loggingString(), '>'); > >- return String::format("<Crsr: %s OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data()); >+ return makeString("<Crsr: ", m_cursorIdentifier.loggingString(), " OS ", m_objectStoreIdentifier, ", tx ", m_transactionIdentifier.loggingString(), '>'); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp >index 92b6b923dc8fe92871f7dbbd9e70435032a59d1b..c985d746687f24421ffea1b2d4288df6cd757793 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp >@@ -38,12 +38,14 @@ IDBGetAllRecordsData IDBGetAllRecordsData::isolatedCopy() const > } > > #if !LOG_DISABLED >+ > String IDBGetAllRecordsData::loggingString() const > { > if (indexIdentifier) >- return String::format("<GetAllRecords: Idx %" PRIu64 ", OS %" PRIu64 ", %s, range %s>", indexIdentifier, objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data()); >- return String::format("<GetAllRecords: OS %" PRIu64 ", %s, range %s>", objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data()); >+ return makeString("<GetAllRecords: Idx ", indexIdentifier, ", OS ", objectStoreIdentifier, ", ", getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", ", range ", keyRangeData.loggingString(), '>'); >+ return makeString("<GetAllRecords: OS ", objectStoreIdentifier, ", ", getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", ", range ", keyRangeData.loggingString(), '>'); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp >index d789626047296ed3d18666cde38ddbedad7f8d78..46346dc34929bdccf0260646b0722fe55eec243a 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp >@@ -38,10 +38,12 @@ IDBGetRecordData IDBGetRecordData::isolatedCopy() const > } > > #if !LOG_DISABLED >+ > String IDBGetRecordData::loggingString() const > { >- return String::format("<GetRecord: %s %s>", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", keyRangeData.loggingString().utf8().data()); >+ return makeString("<GetRecord: ", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", ' ', keyRangeData.loggingString(), '>'); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp >index 27290f4a4a54d8ded9bf4b771e9959789d64abb0..12c5e6f2b5c9c72a62cf20cbe074f944aecd77e2 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp >@@ -28,6 +28,8 @@ > > #if ENABLE(INDEXED_DATABASE) > >+#include <wtf/text/StringConcatenateNumbers.h> >+ > namespace WebCore { > > IDBIndexInfo::IDBIndexInfo() >@@ -50,19 +52,20 @@ IDBIndexInfo IDBIndexInfo::isolatedCopy() const > } > > #if !LOG_DISABLED >+ > String IDBIndexInfo::loggingString(int indent) const > { > String indentString; > for (int i = 0; i < indent; ++i) > indentString.append(" "); >- >- return makeString(indentString, "Index: ", m_name, String::format(" (%" PRIu64 ") keyPath: %s\n", m_identifier, WebCore::loggingString(m_keyPath).utf8().data())); >+ return makeString(indentString, "Index: ", m_name, " (", m_identifier, ") keyPath: ", WebCore::loggingString(m_keyPath), '\n'); > } > > String IDBIndexInfo::condensedLoggingString() const > { >- return String::format("<Idx: %s (%" PRIu64 "), OS (%" PRIu64 ")>", m_name.utf8().data(), m_identifier, m_objectStoreIdentifier); >+ return makeString("<Idx: ", m_name, " (", m_identifier, "), OS (", m_objectStoreIdentifier, ")>"); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp >index faaeda9febe7404f46473349e01b030f95e79350..593e148d2452830e291f6e65b6bf896d0968022c 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp >@@ -36,10 +36,12 @@ IDBIterateCursorData IDBIterateCursorData::isolatedCopy() const > } > > #if !LOG_DISABLED >+ > String IDBIterateCursorData::loggingString() const > { >- return String::format("<Itr8Crsr: key %s, primaryKey %s, count %u>", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count); >+ return makeString("<Itr8Crsr: key ", keyData.loggingString(), ", primaryKey ", primaryKeyData.loggingString(), ", count ", count, '>'); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp >index 04ca90b785f4d2dd00f4f58c9547a57812850a74..2938e9306df1ae3db0643c36fe4532b9baf31e1a 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp >@@ -153,7 +153,7 @@ String IDBObjectStoreInfo::loggingString(int indent) const > > String IDBObjectStoreInfo::condensedLoggingString() const > { >- return String::format("<OS: %s (%" PRIu64 ")>", m_name.utf8().data(), m_identifier); >+ return makeString("<OS: ", m_name, " (", m_identifier, ")>"); > } > > #endif >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp >index f673b2dab3d534a59c86adf6d04d7d1b0e5d3486..616d54fadf1edf649c2c562e6b5c585314bf04f6 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp >@@ -99,11 +99,14 @@ bool IDBResourceIdentifier::isHashTableDeletedValue() const > } > > #if !LOG_DISABLED >+ > String IDBResourceIdentifier::loggingString() const > { >- return String::format("<%" PRIu64", %" PRIu64">", m_idbConnectionIdentifier, m_resourceNumber); >+ return makeString('<', m_idbConnectionIdentifier, ", ", m_resourceNumber, '>'); > } >+ > #endif >+ > } // namespace WebCore > > #endif // ENABLE(INDEXED_DATABASE) >diff --git a/Source/WebCore/Modules/webdatabase/Database.cpp b/Source/WebCore/Modules/webdatabase/Database.cpp >index c875f3bf458c9838ffefdf7cf7ac90f9e92dd6a2..7a53fec4998046ae16fb88886bd50ef205c84e6a 100644 >--- a/Source/WebCore/Modules/webdatabase/Database.cpp >+++ b/Source/WebCore/Modules/webdatabase/Database.cpp >@@ -107,7 +107,7 @@ static const char* fullyQualifiedInfoTableName() > > static String formatErrorMessage(const char* message, int sqliteErrorCode, const char* sqliteErrorMessage) > { >- return String::format("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMessage); >+ return makeString(message, " (", sqliteErrorCode, ' ', sqliteErrorMessage, ')'); > } > > static bool setTextValueInDatabase(SQLiteDatabase& db, const String& query, const String& value) >diff --git a/Source/WebCore/Modules/webdatabase/SQLError.h b/Source/WebCore/Modules/webdatabase/SQLError.h >index 4e276ca78fc95d759cad30dead07ad6a178e7326..6b072bbb427a89bbff3aa04003a9fe71ed82927a 100644 >--- a/Source/WebCore/Modules/webdatabase/SQLError.h >+++ b/Source/WebCore/Modules/webdatabase/SQLError.h >@@ -29,7 +29,7 @@ > #pragma once > > #include <wtf/ThreadSafeRefCounted.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -38,11 +38,11 @@ public: > static Ref<SQLError> create(unsigned code, const String& message) { return adoptRef(*new SQLError(code, message)); } > static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode) > { >- return create(code, String::format("%s (%d)", message, sqliteCode)); >+ return create(code, makeString(message, " (", sqliteCode, ')')); > } > static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode, const char* sqliteMessage) > { >- return create(code, String::format("%s (%d %s)", message, sqliteCode, sqliteMessage)); >+ return create(code, makeString(message, " (", sqliteCode, ' ', sqliteMessage, ')')); > } > > unsigned code() const { return m_code; } >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index f92ed2ded991842e233ffedf6c5f57404bac96b6..6af893d53a72e6487236b8e501d198a0313c926d 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -4572,7 +4572,7 @@ sub GenerateImplementation > push(@implContent, " auto* thisObject = jsCast<${className}*>(cell);\n"); > push(@implContent, " builder.setWrappedObjectForCell(cell, &thisObject->wrapped());\n"); > push(@implContent, " if (thisObject->scriptExecutionContext())\n"); >- push(@implContent, " builder.setLabelForCell(cell, String::format(\"url %s\", thisObject->scriptExecutionContext()->url().string().utf8().data()));\n"); >+ push(@implContent, " builder.setLabelForCell(cell, \"url \" + thisObject->scriptExecutionContext()->url().string());\n"); > push(@implContent, " Base::heapSnapshot(cell, builder);\n"); > push(@implContent, "}\n\n"); > } >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp b/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >index 6d9bd17b6d154e0bf0a6ff8b01b001d3356dfe6e..141eb8ee56904cf3772d96be6fb34e4782340fb1 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >@@ -176,7 +176,7 @@ void JSInterfaceName::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSInterfaceName*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp b/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >index 079c666294aeeca8274ae2bce5efe4ea77b16b4d..3567a72d07fd6c7ae1e48cb3b348849f208853df 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >@@ -345,7 +345,7 @@ void JSMapLike::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSMapLike*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp b/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >index 97d4f3ab4fa1602ae490ae86c96e0c38478bf934..ab281f059d6b317c2c9233d0c6809a1ff796cd30 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >@@ -294,7 +294,7 @@ void JSReadOnlyMapLike::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSReadOnlyMapLike*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >index 6cc23ad0131d112f22da8d8adf1205bbb1adb157..2b614176fc0809a85a4f0b69c7dbfdc9e9ac2bcd 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >@@ -255,7 +255,7 @@ void JSTestActiveDOMObject::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& buil > auto* thisObject = jsCast<JSTestActiveDOMObject*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >index 4a027936b9db99360bfdd78a97b6b35d64686cae..a1bdab10f5ea296880fa08822dadce3d1c08e6ac 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >@@ -435,7 +435,7 @@ void JSTestCEReactions::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestCEReactions*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >index 342a0df8d1e2835284bc36be61dbbbf27bb28d0c..580e2437393c5e0f89c9a2752e743ec894668128 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >@@ -264,7 +264,7 @@ void JSTestCEReactionsStringifier::heapSnapshot(JSCell* cell, HeapSnapshotBuilde > auto* thisObject = jsCast<JSTestCEReactionsStringifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >index 2e8de514bc437ec6b634b5c5220ff523355d0cc3..6b81bffe495e500bcba3451c7fd7b6bee7754250 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >@@ -528,7 +528,7 @@ void JSTestCallTracer::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestCallTracer*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >index 008b5e89768695f25c833ba34601d4be57d0e248..5c8c78558c59a2b1b2368b0bb6143c06d1ce0a3e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >@@ -168,7 +168,7 @@ void JSTestClassWithJSBuiltinConstructor::heapSnapshot(JSCell* cell, HeapSnapsho > auto* thisObject = jsCast<JSTestClassWithJSBuiltinConstructor*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >index 95d767047388e38c01004295d8cf13456bd44bde..83b0f7d9e4b5394c1dd40344a466e53d033dbee6 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >@@ -1266,7 +1266,7 @@ void JSTestDOMJIT::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestDOMJIT*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >index 660b9775bcfd4a21515f80c2fbe556498b8d6be3..4df8130ff5f822d241eca49aa8a9d8348109642a 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >@@ -307,7 +307,7 @@ void JSTestEnabledBySetting::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& bui > auto* thisObject = jsCast<JSTestEnabledBySetting*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >index 45dc1927049be2720552a98b7df235b0f5a15bd0..33e2f9d4a0fc381f966ab9fb8b1c9e7092f286c8 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >@@ -311,7 +311,7 @@ void JSTestEventConstructor::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& bui > auto* thisObject = jsCast<JSTestEventConstructor*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >index 0ec06408fefb3aedb5dcbc12281fd1db0c9385d1..5fc7cb6c555e745bcfbabca0643118c6d61f076f 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >@@ -254,7 +254,7 @@ void JSTestEventTarget::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestEventTarget*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >index d32c04cc50eedf269ed801d69123f6b505404721..36d62411a8d99e133e75ae2bb1200b993d5d0a14 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >@@ -185,7 +185,7 @@ void JSTestException::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestException*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >index b0d9d49fc92683f5e1d6fb8fd685df5d33b24be8..9f16b828c8b3d2e953e3558ea7f2e0583f293379 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >@@ -194,7 +194,7 @@ void JSTestGenerateIsReachable::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& > auto* thisObject = jsCast<JSTestGenerateIsReachable*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >index b20b83c7be9e5b37b9cc5758663e1785585e392c..cec371f68d4dc7dc9936733f47b559fa7f4f9157 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >@@ -614,7 +614,7 @@ void JSTestGlobalObject::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder > auto* thisObject = jsCast<JSTestGlobalObject*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >index 57892537be878324a5dde8f6d1c592c1b962b725..093adcba6e45698eb4d6ba295b49340ec1feab55 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >@@ -253,7 +253,7 @@ void JSTestIndexedSetterNoIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBui > auto* thisObject = jsCast<JSTestIndexedSetterNoIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >index 355adcd90aefcf595d07ed546e4caab20b3ee244..615802d96e77ecf61e6e67972d7b6ff96ec7793e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >@@ -253,7 +253,7 @@ void JSTestIndexedSetterThrowingException::heapSnapshot(JSCell* cell, HeapSnapsh > auto* thisObject = jsCast<JSTestIndexedSetterThrowingException*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >index 769673afbb4e6201d94c32a84cf249ee60388fe6..a871231879a9f0b64dd5ca995b401655024ae400 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >@@ -285,7 +285,7 @@ void JSTestIndexedSetterWithIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotB > auto* thisObject = jsCast<JSTestIndexedSetterWithIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >index 6ea3f9745b2ab48276c51ae3deaa4c1d5808a269..d6c41fb10c356d56d0ef9a7281e98b745cf0ee16 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >@@ -1022,7 +1022,7 @@ void JSTestInterface::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestInterface*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >index cff32ff0eb3adda77fe9463a2a4f99ce658b4970..c94182c2444473dd7c57aabaf30b5108a96fcb00 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >@@ -185,7 +185,7 @@ void JSTestInterfaceLeadingUnderscore::heapSnapshot(JSCell* cell, HeapSnapshotBu > auto* thisObject = jsCast<JSTestInterfaceLeadingUnderscore*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >index ac1e8e7f9ef829278e245845a66231a5fcbcab08..1a9237470c8fd6581bf046a040a1e6ea7c177a4c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >@@ -238,7 +238,7 @@ void JSTestIterable::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestIterable*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >index 00faf9f0573fd0075de8de5149e8eb50874c94fc..fa78d03cc5bc7cd9717934fb0268f7f467d590f7 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >@@ -194,7 +194,7 @@ void JSTestMediaQueryListListener::heapSnapshot(JSCell* cell, HeapSnapshotBuilde > auto* thisObject = jsCast<JSTestMediaQueryListListener*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >index 953120729560a53298c63063ba9ac2094633c266..35b77a74db67869f4da76726848ca3c633950c57 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >@@ -319,7 +319,7 @@ void JSTestNamedAndIndexedSetterNoIdentifier::heapSnapshot(JSCell* cell, HeapSna > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterNoIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >index 05954622f06db43454d3bbed2e0621a9316126e1..f1b1da1b54b4ba24c8794e921db565b991c9dc7f 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >@@ -319,7 +319,7 @@ void JSTestNamedAndIndexedSetterThrowingException::heapSnapshot(JSCell* cell, He > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterThrowingException*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >index 55b5af318a7c0d67ef6bc7508e446766991d7561..fb6089cbd41a5bfe3282737b227158d30817fe7a 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >@@ -373,7 +373,7 @@ void JSTestNamedAndIndexedSetterWithIdentifier::heapSnapshot(JSCell* cell, HeapS > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterWithIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >index f1a84a8bad9a5d605a10e49d9c5c4273d99287e1..022d3cdc3fe940c24eca85ab3bf8b184e06e78ef 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >@@ -205,7 +205,7 @@ void JSTestNamedConstructor::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& bui > auto* thisObject = jsCast<JSTestNamedConstructor*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >index 97d826a5910fad8088bf6557e9af7150ddb21ca2..e7d91f8c868c253d6b88012142553112c3f8d80e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >@@ -233,7 +233,7 @@ void JSTestNamedDeleterNoIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBuil > auto* thisObject = jsCast<JSTestNamedDeleterNoIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >index d1ef306b6a9cd0ff8268b0c767abf8f47bb7070f..a7d76ba7a3deb5845304be65c89d8e0da29daf7a 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >@@ -247,7 +247,7 @@ void JSTestNamedDeleterThrowingException::heapSnapshot(JSCell* cell, HeapSnapsho > auto* thisObject = jsCast<JSTestNamedDeleterThrowingException*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >index e4fa39130a3964d343cbef3df0c0f8c7a2e5940f..9edab591d948349650ad123919f6b36316d54d6b 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >@@ -264,7 +264,7 @@ void JSTestNamedDeleterWithIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBu > auto* thisObject = jsCast<JSTestNamedDeleterWithIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >index cf4640b2365ce48dfa140618e8f2a7296efbad32..2fb624a015b4ba7898d909250bd074c920ca6e3e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >@@ -250,7 +250,7 @@ void JSTestNamedDeleterWithIndexedGetter::heapSnapshot(JSCell* cell, HeapSnapsho > auto* thisObject = jsCast<JSTestNamedDeleterWithIndexedGetter*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >index 41a6283e34ef32a5340a28ef92b46468ebc14bb7..f5959690980573180e86246f1483be9d03090f2e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >@@ -212,7 +212,7 @@ void JSTestNamedGetterCallWith::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& > auto* thisObject = jsCast<JSTestNamedGetterCallWith*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >index 249fc8dc86b079854a9e97d35fa50736cd621596..fae104a834cd1db8a4b2a41a7c167c9b7bd1f8a5 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >@@ -212,7 +212,7 @@ void JSTestNamedGetterNoIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBuild > auto* thisObject = jsCast<JSTestNamedGetterNoIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >index ea02a42eef4d7f387dbcf969c44004b57fc307af..918b2d61ebd6d22f7062164f65dd241ca48b4814 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >@@ -240,7 +240,7 @@ void JSTestNamedGetterWithIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBui > auto* thisObject = jsCast<JSTestNamedGetterWithIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >index f431ade3197ef9ee98181900316b80526972e369..021ce1ea16742d3910eab1e9756e1655fbf757b1 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >@@ -274,7 +274,7 @@ void JSTestNamedSetterNoIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBuild > auto* thisObject = jsCast<JSTestNamedSetterNoIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >index 64437fcfdeb29e662f3d7c69068f6b11d28536bf..052a1a22825ab4d6099b8db6da18d5174d50ba01 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >@@ -274,7 +274,7 @@ void JSTestNamedSetterThrowingException::heapSnapshot(JSCell* cell, HeapSnapshot > auto* thisObject = jsCast<JSTestNamedSetterThrowingException*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >index e82d799d1af12482e01d507c0fce0190d4da1d6b..0b8f5de1cac641abdf0f690bd82dbb05d3f29a71 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >@@ -305,7 +305,7 @@ void JSTestNamedSetterWithIdentifier::heapSnapshot(JSCell* cell, HeapSnapshotBui > auto* thisObject = jsCast<JSTestNamedSetterWithIdentifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >index 65e3ed02e20be33f3b77ccbde4d365ccbe3604c3..090da163fc52093171cb4fdc04abd6beb8577850 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >@@ -347,7 +347,7 @@ void JSTestNamedSetterWithIndexedGetter::heapSnapshot(JSCell* cell, HeapSnapshot > auto* thisObject = jsCast<JSTestNamedSetterWithIndexedGetter*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >index a69d0d74bbb6c1769c4a8046aae17d1e4a3c6b8a..5d0ba23c476c9c6215b2ce7e115f3559839caf2c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >@@ -397,7 +397,7 @@ void JSTestNamedSetterWithIndexedGetterAndSetter::heapSnapshot(JSCell* cell, Hea > auto* thisObject = jsCast<JSTestNamedSetterWithIndexedGetterAndSetter*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >index 1d84e78489918d77d8130d69cd3ac0d57ce636ac..f27629c7bbb3a2b88bb556d09e754536eb7c400e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >@@ -261,7 +261,7 @@ void JSTestNamedSetterWithOverrideBuiltins::heapSnapshot(JSCell* cell, HeapSnaps > auto* thisObject = jsCast<JSTestNamedSetterWithOverrideBuiltins*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >index d0e854eea667edf906caaf5f3e3855e221e49bbc..d4d9738cdb01b8426b663c21fc8298f144ba2637 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >@@ -343,7 +343,7 @@ void JSTestNamedSetterWithUnforgableProperties::heapSnapshot(JSCell* cell, HeapS > auto* thisObject = jsCast<JSTestNamedSetterWithUnforgableProperties*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >index cbdbaa28f73dd0f61e66b839fd4f182c9b226e85..ce59e749c273e01c4409f6653af5dfa8d04d2a34 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >@@ -330,7 +330,7 @@ void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::heapSnapshot( > auto* thisObject = jsCast<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >index 35a2d623f89cf042eb02b55c56e8995930eee232..264bf961423acb7819bcebdc904f2730e88a8c1c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >@@ -429,7 +429,7 @@ void JSTestNode::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestNode*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >index 21c10c7cfaa36db715c2359caf3ba276274d06c5..eae2f29e5fb5c8fc6f38bfbb2050055c6ef7c344 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >@@ -8546,7 +8546,7 @@ void JSTestObj::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestObj*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >index 1adb70212f451cce85b08cda036fe478089c3978..7708eda3aadc73bd12ff15ed68e3188629714801 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >@@ -257,7 +257,7 @@ void JSTestOverloadedConstructors::heapSnapshot(JSCell* cell, HeapSnapshotBuilde > auto* thisObject = jsCast<JSTestOverloadedConstructors*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >index b055668596bc6f27c82c716fd234e5d80aa8a4c5..3831269640733ec635b7ecc46c833b73f550ac17 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >@@ -213,7 +213,7 @@ void JSTestOverloadedConstructorsWithSequence::heapSnapshot(JSCell* cell, HeapSn > auto* thisObject = jsCast<JSTestOverloadedConstructorsWithSequence*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >index 6c6c044efc5f1c71ea713c212b03952f6f94444a..9b5a0272316c7583af327c2bae97f52c79cc8399 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >@@ -243,7 +243,7 @@ void JSTestOverrideBuiltins::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& bui > auto* thisObject = jsCast<JSTestOverrideBuiltins*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >index bec57d5517d5b09c8d20a0ade4297cf0ae8dfced..c340edd757895eecb11b6ffc321d588c522472a2 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >@@ -216,7 +216,7 @@ void JSTestPluginInterface::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& buil > auto* thisObject = jsCast<JSTestPluginInterface*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >index 7a258986714630a3053bc7481a5de0fef1bd798f..c8da5dd06c8b14d5880fd1fceec94af600e0cd9d 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >@@ -293,7 +293,7 @@ void JSTestPromiseRejectionEvent::heapSnapshot(JSCell* cell, HeapSnapshotBuilder > auto* thisObject = jsCast<JSTestPromiseRejectionEvent*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >index 78d1c41c428c01e1f75f6e91a64aeb305c0a525f..eaf57f8a81372e01c3ff195abd524b7294d1709d 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >@@ -550,7 +550,7 @@ void JSTestSerialization::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builde > auto* thisObject = jsCast<JSTestSerialization*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >index 133eda02e640163fc9be65434820fb925f04c0a4..64920052284ae525b12c6e720d83de17f4ece6d3 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >@@ -154,7 +154,7 @@ void JSTestSerializationIndirectInheritance::heapSnapshot(JSCell* cell, HeapSnap > auto* thisObject = jsCast<JSTestSerializationIndirectInheritance*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >index ad531b20b74bc6d259569182eaefc5311cf8e092..4442f5139bec98be4b11a6b0d83c7348a8c44382 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >@@ -229,7 +229,7 @@ void JSTestSerializationInherit::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& > auto* thisObject = jsCast<JSTestSerializationInherit*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >index a1ac2d010e51c4837c0f0b546228034ad0db84e8..ba61bc52a84f70fd34301c38f73f970d4c9f0f4e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >@@ -263,7 +263,7 @@ void JSTestSerializationInheritFinal::heapSnapshot(JSCell* cell, HeapSnapshotBui > auto* thisObject = jsCast<JSTestSerializationInheritFinal*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >index df7dfb8f961d94fe8e24f01d241fb24f6a94faef..42b2836f9d2e791735945484643dca28f567ed5b 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >@@ -353,7 +353,7 @@ void JSTestSerializedScriptValueInterface::heapSnapshot(JSCell* cell, HeapSnapsh > auto* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >index 5242bb8baac6fc8ca1404060f150bb1dd7c015df..31392cb920b79fbbcb34edd29e14784eee2a36ae 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >@@ -187,7 +187,7 @@ void JSTestStringifier::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestStringifier*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >index 7cae2439ef627b6c26617394b91cc8b804ff055b..58cd0ff94092bce04c291fff32b0d6dae39d1bc2 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >@@ -187,7 +187,7 @@ void JSTestStringifierAnonymousOperation::heapSnapshot(JSCell* cell, HeapSnapsho > auto* thisObject = jsCast<JSTestStringifierAnonymousOperation*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >index 50a46f614f9848b769285e16389073c129157fd1..c9b25f0ad9d6bb83e760e42ac9411abae1ce9b6e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >@@ -202,7 +202,7 @@ void JSTestStringifierNamedOperation::heapSnapshot(JSCell* cell, HeapSnapshotBui > auto* thisObject = jsCast<JSTestStringifierNamedOperation*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >index 0a33af378a2b1219f29284dc89e16d38b724779d..35d863a85d62497480b1a5f84549bae4efd1f198 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >@@ -202,7 +202,7 @@ void JSTestStringifierOperationImplementedAs::heapSnapshot(JSCell* cell, HeapSna > auto* thisObject = jsCast<JSTestStringifierOperationImplementedAs*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >index 49049174e036f5f1806244c3f2ebd19e16962e44..6ba4cd1fd05810ea79d81fc8af0bb8c64c6261b9 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >@@ -187,7 +187,7 @@ void JSTestStringifierOperationNamedToString::heapSnapshot(JSCell* cell, HeapSna > auto* thisObject = jsCast<JSTestStringifierOperationNamedToString*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >index c9c52698b82d3fff27d2344fddb5543d092ca406..41523a5af2ac1e869a9ad10d384ef4d4d07848c3 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >@@ -209,7 +209,7 @@ void JSTestStringifierReadOnlyAttribute::heapSnapshot(JSCell* cell, HeapSnapshot > auto* thisObject = jsCast<JSTestStringifierReadOnlyAttribute*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >index 75ec38adb8fe8893046035346b56446d7b2b62f4..7cc60e80c8e32111647773a6c004359334f48d3c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >@@ -227,7 +227,7 @@ void JSTestStringifierReadWriteAttribute::heapSnapshot(JSCell* cell, HeapSnapsho > auto* thisObject = jsCast<JSTestStringifierReadWriteAttribute*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >index 0eb867e541b197223b95a563b43731e3eb7b1718..906b66de8fa22cd2735eb9b36f9ffee80a283b65 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >@@ -749,7 +749,7 @@ void JSTestTypedefs::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) > auto* thisObject = jsCast<JSTestTypedefs*>(cell); > builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); > if (thisObject->scriptExecutionContext()) >- builder.setLabelForCell(cell, String::format("url %s", thisObject->scriptExecutionContext()->url().string().utf8().data())); >+ builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); > Base::heapSnapshot(cell, builder); > } > >diff --git a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >index e6dbed7ab27fc93a25bd03dfa9e3b8e96a13a437..a52b1958b3fe95edad8a58ae2d56889c679bd269 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp >@@ -43,6 +43,7 @@ > #include "CSSValuePool.h" > #include "Pair.h" > #include "StyleColor.h" >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -721,9 +722,9 @@ static Color parseHexColor(CSSParserTokenRange& range, bool acceptQuirkyColors) > || token.numericValue() < 0. || token.numericValue() >= 1000000.) > return Color(); > if (token.type() == NumberToken) // e.g. 112233 >- color = String::format("%d", static_cast<int>(token.numericValue())); >+ color = String::number(static_cast<int>(token.numericValue())); > else // e.g. 0001FF >- color = String::number(static_cast<int>(token.numericValue())) + token.value().toString(); >+ color = makeString(static_cast<int>(token.numericValue()), token.value().toString()); > while (color.length() < 6) > color = "0" + color; > } else if (token.type() == IdentToken) { // e.g. FF0000 >diff --git a/Source/WebCore/html/HTMLSelectElement.cpp b/Source/WebCore/html/HTMLSelectElement.cpp >index 5de320e828ecd7eb0c39c535a59b4528ee70abfa..d499b91b80d014353b8f36ab1f08f7bb53dffd39 100644 >--- a/Source/WebCore/html/HTMLSelectElement.cpp >+++ b/Source/WebCore/html/HTMLSelectElement.cpp >@@ -55,6 +55,7 @@ > #include "Settings.h" > #include "SpatialNavigation.h" > #include <wtf/IsoMallocInlines.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -458,7 +459,7 @@ ExceptionOr<void> HTMLSelectElement::setItem(unsigned index, HTMLOptionElement* > ExceptionOr<void> HTMLSelectElement::setLength(unsigned newLength) > { > if (newLength > length() && newLength > maxSelectItems) { >- document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, String::format("Blocked attempt to expand the option list to %u items. The maximum number of items allowed is %u.", newLength, maxSelectItems)); >+ document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, makeString("Blocked attempt to expand the option list to ", newLength, " items. The maximum number of items allowed is ", maxSelectItems, '.')); > return { }; > } > >diff --git a/Source/WebCore/html/ImageDocument.cpp b/Source/WebCore/html/ImageDocument.cpp >index 8ecca709c10d1d3637fbd53ec3990bdc87be26af..f4292232e9dc22d729ab5950896ab8688380a2f8 100644 >--- a/Source/WebCore/html/ImageDocument.cpp >+++ b/Source/WebCore/html/ImageDocument.cpp >@@ -49,6 +49,7 @@ > #include "RenderElement.h" > #include "Settings.h" > #include <wtf/IsoMallocInlines.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -273,7 +274,7 @@ void ImageDocument::imageUpdated() > #if PLATFORM(IOS_FAMILY) > FloatSize screenSize = page()->chrome().screenSize(); > if (imageSize.width() > screenSize.width()) >- processViewport(String::format("width=%u,viewport-fit=cover", static_cast<unsigned>(imageSize.width().toInt())), ViewportArguments::ImageDocument); >+ processViewport(makeString("width=", imageSize.width().toInt(), ",viewport-fit=cover"), ViewportArguments::ImageDocument); > > if (page()) > page()->chrome().client().imageOrMediaDocumentSizeChanged(IntSize(imageSize.width(), imageSize.height())); >diff --git a/Source/WebCore/html/parser/XSSAuditor.cpp b/Source/WebCore/html/parser/XSSAuditor.cpp >index 5eedb440d2945e3d1a4e1212bc9c29baaf9cdbb6..da9c333f5479657035f74eadb2d3d50f61aa583d 100644 >--- a/Source/WebCore/html/parser/XSSAuditor.cpp >+++ b/Source/WebCore/html/parser/XSSAuditor.cpp >@@ -45,7 +45,7 @@ > #include <wtf/ASCIICType.h> > #include <wtf/MainThread.h> > #include <wtf/NeverDestroyed.h> >-#include <wtf/text/StringView.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -332,7 +332,7 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate) > } > } > if (m_xssProtection == XSSProtectionDisposition::Invalid) { >- document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Error parsing header X-XSS-Protection: " + headerValue + ": " + errorDetails + " at character position " + String::format("%u", errorPosition) + ". The default protections will be applied."); >+ document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, makeString("Error parsing header X-XSS-Protection: ", headerValue, ": ", errorDetails, " at character position ", errorPosition, ". The default protections will be applied.")); > m_xssProtection = XSSProtectionDisposition::Enabled; > } > >diff --git a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >index a0c3887a6efc2a051c3a353147d7136cf8ac8ab4..243d849c9bf1a1e59d8fa74874892b2652226e03 100644 >--- a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >+++ b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >@@ -205,7 +205,7 @@ bool InspectorFrontendClientLocal::canAttachWindow() > > void InspectorFrontendClientLocal::setDockingUnavailable(bool unavailable) > { >- evaluateOnLoad(String::format("[\"setDockingUnavailable\", %s]", unavailable ? "true" : "false")); >+ evaluateOnLoad(makeString("[\"setDockingUnavailable\", ", unavailable ? "true" : "false", ']')); > } > > void InspectorFrontendClientLocal::changeAttachedWindowHeight(unsigned height) >@@ -270,7 +270,7 @@ void InspectorFrontendClientLocal::setAttachedWindow(DockSide dockSide) > > m_dockSide = dockSide; > >- evaluateOnLoad(String::format("[\"setDockSide\", \"%s\"]", side)); >+ evaluateOnLoad(makeString("[\"setDockSide\", \"", side, "\"]")); > } > > void InspectorFrontendClientLocal::restoreAttachedWindowHeight() >@@ -294,7 +294,7 @@ bool InspectorFrontendClientLocal::isDebuggingEnabled() > > void InspectorFrontendClientLocal::setDebuggingEnabled(bool enabled) > { >- evaluateOnLoad(String::format("[\"setDebuggingEnabled\", %s]", enabled ? "true" : "false")); >+ evaluateOnLoad(makeString("[\"setDebuggingEnabled\", ", enabled ? "true" : "false", ']')); > } > > bool InspectorFrontendClientLocal::isTimelineProfilingEnabled() >@@ -306,7 +306,7 @@ bool InspectorFrontendClientLocal::isTimelineProfilingEnabled() > > void InspectorFrontendClientLocal::setTimelineProfilingEnabled(bool enabled) > { >- evaluateOnLoad(String::format("[\"setTimelineProfilingEnabled\", %s]", enabled ? "true" : "false")); >+ evaluateOnLoad(makeString("[\"setTimelineProfilingEnabled\", ", enabled ? "true" : "false", ']')); > } > > bool InspectorFrontendClientLocal::isProfilingJavaScript() >@@ -339,7 +339,7 @@ void InspectorFrontendClientLocal::showResources() > void InspectorFrontendClientLocal::showMainResourceForFrame(Frame* frame) > { > String frameId = m_inspectedPageController->pageAgent()->frameId(frame); >- evaluateOnLoad(String::format("[\"showMainResourceForFrame\", \"%s\"]", frameId.ascii().data())); >+ evaluateOnLoad(makeString("[\"showMainResourceForFrame\", \"", frameId, "\"]")); > } > > unsigned InspectorFrontendClientLocal::constrainedAttachedWindowHeight(unsigned preferredHeight, unsigned totalWindowHeight) >diff --git a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >index 4577652579af56497c52beb2d9dc125b45ed54d8..7f40e048d06d2fb223e83dc0789413801a78bfff 100644 >--- a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >@@ -157,7 +157,7 @@ private: > > String mergeId() final > { >- return String::format("SetStyleSheetText %s", m_styleSheet->id().utf8().data()); >+ return "SetStyleSheetText " + m_styleSheet->id(); > } > > void merge(std::unique_ptr<Action> action) override >@@ -198,7 +198,7 @@ public: > String mergeId() override > { > ASSERT(m_styleSheet->id() == m_cssId.styleSheetId()); >- return String::format("SetStyleText %s:%u", m_styleSheet->id().utf8().data(), m_cssId.ordinal()); >+ return makeString("SetStyleText ", m_styleSheet->id(), ':', m_cssId.ordinal()); > } > > void merge(std::unique_ptr<Action> action) override >diff --git a/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp b/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >index 96bc87ef8c1afd897bd26bf2269e4105594dea8a..6d5881ea0e664cbbce2a85f8d9de093fb43ccac0 100644 >--- a/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >@@ -68,6 +68,7 @@ > #include <wtf/JSONValues.h> > #include <wtf/NeverDestroyed.h> > #include <wtf/Vector.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > using JSON::ArrayOf; > using Inspector::Protocol::IndexedDB::DatabaseWithObjectStores; >@@ -711,7 +712,7 @@ public: > auto result = idbObjectStore->clear(*exec); > ASSERT(!result.hasException()); > if (result.hasException()) { >- m_requestCallback->sendFailure(String::format("Could not clear object store '%s': %d", m_objectStoreName.utf8().data(), result.releaseException().code())); >+ m_requestCallback->sendFailure(makeString("Could not clear object store '", m_objectStoreName, "': ", static_cast<int>(result.releaseException().code()))); > return; > } > idbRequest = result.releaseReturnValue(); >diff --git a/Source/WebCore/page/MemoryRelease.cpp b/Source/WebCore/page/MemoryRelease.cpp >index 08f04a46dcbcfd422d3983fb0a3b55f3837a093b..1f5f63308433eea0eec18b497567d963d11ce299 100644 >--- a/Source/WebCore/page/MemoryRelease.cpp >+++ b/Source/WebCore/page/MemoryRelease.cpp >@@ -169,7 +169,7 @@ void logMemoryStatisticsAtTimeOfDeath() > continue; > String tagName = displayNameForVMTag(i); > if (!tagName) >- tagName = String::format("Tag %u", i); >+ tagName = makeString("Tag ", i); > RELEASE_LOG(MemoryPressure, "%16s: %lu MB", tagName.latin1().data(), dirty / MB); > } > #endif >diff --git a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >index e03e06f51b625588202c0628a6cae0a0754f2d9d..0cb5c35327b1d297d048942a19faa500e6f74013 100644 >--- a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >+++ b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >@@ -431,7 +431,7 @@ static String formatByteNumber(size_t number) > return String::format("%.2f MB", static_cast<double>(number) / 1048576); > if (number >= 1024) > return String::format("%.1f kB", static_cast<double>(number) / 1024); >- return String::format("%lu", number); >+ return String::number(number); > } > > static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now) >@@ -469,9 +469,9 @@ void ResourceUsageOverlay::platformDraw(CGContextRef context) > > String label = String::format("% 11s: %s", category.name.ascii().data(), formatByteNumber(dirty).ascii().data()); > if (external) >- label = label + String::format(" + %s", formatByteNumber(external).ascii().data()); >+ label = label + makeString(" + ", formatByteNumber(external)); > if (reclaimable) >- label = label + String::format(" [%s]", formatByteNumber(reclaimable).ascii().data()); >+ label = label + makeString(" [", formatByteNumber(reclaimable), ']'); > > // FIXME: Show size/capacity of GC heap. > showText(context, 10, y, category.color.get(), label); >@@ -480,8 +480,8 @@ void ResourceUsageOverlay::platformDraw(CGContextRef context) > y -= 5; > > MonotonicTime now = MonotonicTime::now(); >- showText(context, 10, y + 10, colorForLabels, String::format(" Eden GC: %s", gcTimerString(data.timeOfNextEdenCollection, now).ascii().data())); >- showText(context, 10, y + 20, colorForLabels, String::format(" Full GC: %s", gcTimerString(data.timeOfNextFullCollection, now).ascii().data())); >+ showText(context, 10, y + 10, colorForLabels, " Eden GC: " + gcTimerString(data.timeOfNextEdenCollection, now)); >+ showText(context, 10, y + 20, colorForLabels, " Full GC: " + gcTimerString(data.timeOfNextFullCollection, now)); > > drawCpuHistory(context, viewBounds.size.width - 70, 0, viewBounds.size.height, data.cpu); > drawGCHistory(context, viewBounds.size.width - 140, 0, viewBounds.size.height, data.gcHeapSize, data.categories[MemoryCategory::GCHeap].dirtySize); >diff --git a/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm b/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >index 698fb8de64deb11f43dca5b31999a4ea1bedb348..9d0b6c54d8816d36cac69d0080aad613d978bd31 100644 >--- a/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >+++ b/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm >@@ -35,6 +35,7 @@ > #include <mach/vm_statistics.h> > #include <pal/spi/cocoa/MachVMSPI.h> > #include <wtf/MachSendRight.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -62,7 +63,7 @@ void logFootprintComparison(const std::array<TagInfo, 256>& before, const std::a > continue; > String tagName = displayNameForVMTag(i); > if (!tagName) >- tagName = String::format("Tag %u", i); >+ tagName = makeString("Tag ", i); > WTFLogAlways(" %02X %16s %10ld %10ld %10ld", > i, > tagName.ascii().data(), >diff --git a/Source/WebCore/platform/animation/TimingFunction.cpp b/Source/WebCore/platform/animation/TimingFunction.cpp >index cfd0b36027939d4b86afd6fe7e873e04fb86ff65..9407342065fe9fc528d54574446376a1d4d7d7dc 100644 >--- a/Source/WebCore/platform/animation/TimingFunction.cpp >+++ b/Source/WebCore/platform/animation/TimingFunction.cpp >@@ -30,6 +30,7 @@ > #include "SpringSolver.h" > #include "StyleProperties.h" > #include "UnitBezier.h" >+#include <wtf/text/StringConcatenateNumbers.h> > #include <wtf/text/TextStream.h> > > namespace WebCore { >@@ -181,7 +182,7 @@ String TimingFunction::cssText() const > if (m_type == TimingFunction::StepsFunction) { > auto& function = downcast<StepsTimingFunction>(*this); > if (!function.stepAtStart()) >- return String::format("steps(%d)", function.numberOfSteps()); >+ return makeString("steps(", function.numberOfSteps(), ')'); > } > > TextStream stream; >diff --git a/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm b/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm >index 6e48fdaf1859070a26934bcb606fe5a40cfbde2c..eb6988840a1307157831fe38aab23f0e85a8be74 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm >@@ -180,7 +180,7 @@ int AVTrackPrivateAVFObjCImpl::index() const > AtomicString AVTrackPrivateAVFObjCImpl::id() const > { > if (m_assetTrack) >- return String::format("%d", [m_assetTrack trackID]); >+ return AtomicString::number([m_assetTrack trackID]); > if (m_mediaSelectionOption) > return [[m_mediaSelectionOption->avMediaSelectionOption() optionID] stringValue]; > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h >index 60ee96f402433622f5854126ffb239510698ce31..966ccd5569f9e06b6f9a581997aa7b389d1dd230 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h >@@ -84,7 +84,7 @@ protected: > } > MediaSampleAVFObjC(CMSampleBufferRef sample, int trackID) > : m_sample(sample) >- , m_id(String::format("%d", trackID)) >+ , m_id(AtomicString::number(trackID)) > { > } > MediaSampleAVFObjC(CMSampleBufferRef sample, VideoRotation rotation, bool mirrored) >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index e4f67cd1ab39d8d96dbbd60e6b32d0022650f3f1..97788fa09349af2f12049bda0f324795170c7008 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -52,8 +52,8 @@ > #include <wtf/NeverDestroyed.h> > #include <wtf/SetForScope.h> > #include <wtf/SystemTracing.h> >+#include <wtf/text/StringConcatenateNumbers.h> > #include <wtf/text/TextStream.h> >-#include <wtf/text/WTFString.h> > > #if PLATFORM(IOS_FAMILY) > #include "SystemMemory.h" >@@ -1101,7 +1101,7 @@ void GraphicsLayerCA::setContentsToSolidColor(const Color& color) > m_contentsLayerPurpose = ContentsLayerPurpose::BackgroundColor; > m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this); > #if ENABLE(TREE_DEBUGGING) >- m_contentsLayer->setName(String::format("contents color %llu", m_contentsLayer->layerID())); >+ m_contentsLayer->setName(makeString("contents color ", m_contentsLayer->layerID())); > #else > m_contentsLayer->setName("contents color"); > #endif >@@ -2566,7 +2566,7 @@ void GraphicsLayerCA::updateContentsImage() > if (!m_contentsLayer.get()) { > m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this); > #if ENABLE(TREE_DEBUGGING) >- m_contentsLayer->setName(String::format("contents image %llu", m_contentsLayer->layerID())); >+ m_contentsLayer->setName(makeString("contents image ", m_contentsLayer->layerID())); > #else > m_contentsLayer->setName("contents image"); > #endif >@@ -2672,7 +2672,7 @@ void GraphicsLayerCA::updateContentsRects() > m_contentsClippingLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this); > m_contentsClippingLayer->setAnchorPoint(FloatPoint()); > #if ENABLE(TREE_DEBUGGING) >- m_contentsClippingLayer->setName(String::format("contents clipping %llu", m_contentsClippingLayer->layerID())); >+ m_contentsClippingLayer->setName(makeString("contents clipping ", m_contentsClippingLayer->layerID())); > #else > m_contentsClippingLayer->setName("contents clipping"); > #endif >@@ -3156,7 +3156,7 @@ bool GraphicsLayerCA::appendToUncommittedAnimations(const KeyframeValueList& val > for (int internalFilterPropertyIndex = 0; internalFilterPropertyIndex < numAnimatedProperties; ++internalFilterPropertyIndex) { > bool valuesOK; > RefPtr<PlatformCAAnimation> caAnimation; >- String keyPath = String::format("filters.filter_%d.%s", animationIndex, PlatformCAFilters::animatedFilterPropertyName(filterOp, internalFilterPropertyIndex)); >+ String keyPath = makeString("filters.filter_", animationIndex, '.', PlatformCAFilters::animatedFilterPropertyName(filterOp, internalFilterPropertyIndex)); > > if (isKeyframe) { > caAnimation = createKeyframeAnimation(animation, keyPath, false); >@@ -3914,7 +3914,7 @@ RefPtr<PlatformCALayer> GraphicsLayerCA::findOrMakeClone(CloneID cloneID, Platfo > } else { > resultLayer = cloneLayer(sourceLayer, cloneLevel); > #if ENABLE(TREE_DEBUGGING) >- resultLayer->setName(String::format("clone %d of %llu", cloneID[0U], sourceLayer->layerID())); >+ resultLayer->setName(makeString("clone ", cloneID[0U], " of ", sourceLayer->layerID())); > #else > resultLayer->setName("clone of " + m_name); > #endif >diff --git a/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp b/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >index 1ff6c30c7c4eae237afd3f72c326141062575fcb..a48e14fdf25df742ccf384bf2b054c921fb5bc64 100644 >--- a/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >+++ b/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >@@ -44,7 +44,7 @@ > #include "RealtimeMediaSourceSettings.h" > #include <math.h> > #include <wtf/UUID.h> >-#include <wtf/text/StringView.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -367,12 +367,12 @@ void MockRealtimeVideoSource::drawText(GraphicsContext& context) > > auto size = this->size(); > statsLocation.move(0, m_statsFontSize); >- string = String::format("Size: %u x %u", size.width(), size.height()); >+ string = makeString("Size: ", size.width(), " x ", size.height()); > context.drawText(statsFont, TextRun((StringView(string))), statsLocation); > > if (mockCamera()) { > statsLocation.move(0, m_statsFontSize); >- string = String::format("Preset size: %u x %u", captureSize.width(), captureSize.height()); >+ string = makeString("Preset size: ", captureSize.width(), " x ", captureSize.height()); > context.drawText(statsFont, TextRun((StringView(string))), statsLocation); > > const char* camera; >@@ -393,7 +393,7 @@ void MockRealtimeVideoSource::drawText(GraphicsContext& context) > camera = "Unknown"; > break; > } >- string = String::format("Camera: %s", camera); >+ string = makeString("Camera: ", camera); > statsLocation.move(0, m_statsFontSize); > context.drawText(statsFont, TextRun((StringView(string))), statsLocation); > } else if (!name().isNull()) { >diff --git a/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp b/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >index 9fbac0020478e9b350de7ff4d47c9fe359460e1e..ce273f17f1670bbee3e469b8f238540c97b9974a 100644 >--- a/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >+++ b/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >@@ -49,7 +49,7 @@ public: > private: > MockMediaSample(const MockSampleBox& box) > : m_box(box) >- , m_id(String::format("%d", box.trackID())) >+ , m_id(String::number(box.trackID())) > { > } > >diff --git a/Source/WebCore/platform/network/ParsedContentRange.cpp b/Source/WebCore/platform/network/ParsedContentRange.cpp >index 00b90c4853e8e20bb4e92857af0e17e9150df425..a3d4f044059dfd9a57b31929db8f112c15f62113 100644 >--- a/Source/WebCore/platform/network/ParsedContentRange.cpp >+++ b/Source/WebCore/platform/network/ParsedContentRange.cpp >@@ -27,7 +27,7 @@ > #include "ParsedContentRange.h" > > #include <wtf/StdLibExtras.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -127,8 +127,8 @@ String ParsedContentRange::headerValue() const > if (!m_isValid) > return String(); > if (m_instanceLength == UnknownLength) >- return String::format("bytes %" PRId64 "-%" PRId64 "/*", m_firstBytePosition, m_lastBytePosition); >- return String::format("bytes %" PRId64 "-%" PRId64 "/%" PRId64, m_firstBytePosition, m_lastBytePosition, m_instanceLength); >+ return makeString("bytes ", m_firstBytePosition, '-', m_lastBytePosition, "/*"); >+ return makeString("bytes ", m_firstBytePosition, '-', m_lastBytePosition, '/', m_instanceLength); > } > > } >diff --git a/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp b/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >index 09d86d0fecf09a66dd398494c79bbaf079e4bc60..b01a7e66bf0914961d63010741e22175f9efb9b8 100644 >--- a/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >+++ b/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp >@@ -30,6 +30,7 @@ > #include <wtf/NeverDestroyed.h> > #include <wtf/ProcessID.h> > #include <wtf/ProcessPrivilege.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > #if PLATFORM(COCOA) > #include "PublicSuffix.h" >diff --git a/Source/WebCore/platform/sql/SQLiteDatabase.cpp b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >index 663e0bc0b8567083aa97ef8115a5468c517e96c5..d7bc6132b42686de49e58da284d667d97ab73694 100644 >--- a/Source/WebCore/platform/sql/SQLiteDatabase.cpp >+++ b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >@@ -46,8 +46,7 @@ static const char notOpenErrorMessage[] = "database is not open"; > static void unauthorizedSQLFunction(sqlite3_context *context, int, sqlite3_value **) > { > const char* functionName = (const char*)sqlite3_user_data(context); >- String errorMessage = String::format("Function %s is unauthorized", functionName); >- sqlite3_result_error(context, errorMessage.utf8().data(), -1); >+ sqlite3_result_error(context, makeString("Function ", functionName, " is unauthorized").utf8().data(), -1); > } > > static void initializeSQLiteIfNecessary() >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 9a783dc16c451b3bd3d400349565072d0f81c8d5..41a8eabfb4af740399ccfe76894261d923dd439f 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -1278,7 +1278,7 @@ void RenderLayerCompositor::logLayerInfo(const RenderLayer& layer, const char* p > backing->backingStoreMemoryEstimate() / 1024)); > > if (!layer.renderer().style().hasAutoZIndex()) >- logString.append(String::format(" z-index: %d", layer.renderer().style().zIndex())); >+ logString.append(makeString(" z-index: ", layer.renderer().style().zIndex())); > > logString.appendLiteral(" ("); > logString.append(logReasonsForCompositing(layer)); >diff --git a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >index 60eeb8cc2c0f412ca2bced982ae927ffb1d6a468..6a2d6409eaa349a696beabad85c0324e20910dd0 100644 >--- a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >+++ b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >@@ -45,6 +45,7 @@ > #include <wtf/persistence/PersistentCoders.h> > #include <wtf/persistence/PersistentDecoder.h> > #include <wtf/persistence/PersistentEncoder.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -201,7 +202,7 @@ String RegistrationDatabase::ensureValidRecordsTable() > // If there is no Records table at all, create it and then bail. > if (sqliteResult == SQLITE_DONE) { > if (!m_database->executeCommand(recordsTableSchema())) >- return String::format("Could not create Records table in database (%i) - %s", m_database->lastError(), m_database->lastErrorMsg()); >+ return makeString("Could not create Records table in database (", m_database->lastError(), ") - ", m_database->lastErrorMsg()); > return { }; > } > >@@ -359,7 +360,7 @@ String RegistrationDatabase::importRecords() > > SQLiteStatement sql(*m_database, "SELECT * FROM Records;"_s); > if (sql.prepare() != SQLITE_OK) >- return String::format("Failed to prepare statement to retrieve registrations from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg()); >+ return makeString("Failed to prepare statement to retrieve registrations from records table (", m_database->lastError(), ") - ", m_database->lastErrorMsg()); > > int result = sql.step(); > >@@ -411,7 +412,7 @@ String RegistrationDatabase::importRecords() > } > > if (result != SQLITE_DONE) >- return String::format("Failed to import at least one registration from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg()); >+ return makeString("Failed to import at least one registration from records table (", m_database->lastError(), ") - ", m_database->lastErrorMsg()); > > return { }; > } >diff --git a/Source/WebKit/Shared/WebMemorySampler.cpp b/Source/WebKit/Shared/WebMemorySampler.cpp >index 2b85200dec9278c74dbaf62ae5330d9f8d37dc07..87e6eeb3a9431e5c5727fa525b71fd756ebceaa1 100644 >--- a/Source/WebKit/Shared/WebMemorySampler.cpp >+++ b/Source/WebKit/Shared/WebMemorySampler.cpp >@@ -32,6 +32,7 @@ > #include <wtf/ProcessID.h> > #include <wtf/text/CString.h> > #include <wtf/text/StringBuilder.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebKit { > using namespace WebCore; >@@ -142,7 +143,7 @@ void WebMemorySampler::initializeSandboxedLogFile(SandboxExtension::Handle&& sam > > void WebMemorySampler::writeHeaders() > { >- String processDetails = String::format("Process: %s Pid: %d\n", processName().utf8().data(), getCurrentProcessID()); >+ String processDetails = makeString("Process: ", processName(), " Pid: ", getCurrentProcessID(), '\n'); > > CString utf8String = processDetails.utf8(); > FileSystem::writeToFile(m_sampleLogFile, utf8String.data(), utf8String.length()); >diff --git a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm >index efc3e160b48bc6e3b7dae544a522347c978b9328..9c27727e87261741a203d70bc1ab21d7b51d517d 100644 >--- a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm >+++ b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm >@@ -152,7 +152,7 @@ void LocalAuthenticator::makeCredential() > weakThis->continueMakeCredentialAfterUserConsented(consent); > }; > m_connection->getUserConsent( >- String::format("Allow %s to create a public key credential for %s", requestData().creationOptions.rp.id.utf8().data(), requestData().creationOptions.user.name.utf8().data()), >+ "Allow " + requestData().creationOptions.rp.id + " to create a public key credential for " + requestData().creationOptions.user.name, > WTFMove(callback)); > #endif // !PLATFORM(IOS_FAMILY) > } >diff --git a/Source/WebKit/UIProcess/WebInspectorUtilities.cpp b/Source/WebKit/UIProcess/WebInspectorUtilities.cpp >index c5db401ee1c61958942d6a3b30cf30f13fa6b806..3b49ce034a9aab0323db14b33608deba64ffbf98 100644 >--- a/Source/WebKit/UIProcess/WebInspectorUtilities.cpp >+++ b/Source/WebKit/UIProcess/WebInspectorUtilities.cpp >@@ -33,6 +33,7 @@ > #include "WebProcessProxy.h" > #include <wtf/HashMap.h> > #include <wtf/NeverDestroyed.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebKit { > >@@ -57,7 +58,7 @@ unsigned inspectorLevelForPage(WebPageProxy* page) > > String inspectorPageGroupIdentifierForPage(WebPageProxy* page) > { >- return String::format("__WebInspectorPageGroupLevel%u__", inspectorLevelForPage(page)); >+ return makeString("__WebInspectorPageGroupLevel", inspectorLevelForPage(page), "__"); > } > > void trackInspectorPage(WebPageProxy* page) >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index be8479b36b662b9249501427bc35f55e264e86a8..b70f09b36a12294ce9d1b76e5fb0041bcc3b62a6 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -41,9 +41,6 @@ > #include "DownloadProxyMessages.h" > #include "GamepadData.h" > #include "HighPerformanceGraphicsUsageSampler.h" >-#if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) >-#include "LegacyCustomProtocolManagerMessages.h" >-#endif > #include "LogInitialization.h" > #include "Logging.h" > #include "NetworkProcessCreationParameters.h" >@@ -98,6 +95,11 @@ > #include <wtf/URLParser.h> > #include <wtf/WallTime.h> > #include <wtf/text/StringBuilder.h> >+#include <wtf/text/StringConcatenateNumbers.h> >+ >+#if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) >+#include "LegacyCustomProtocolManagerMessages.h" >+#endif > > #if ENABLE(SERVICE_CONTROLS) > #include "ServicesController.h" >@@ -1013,7 +1015,7 @@ void WebProcessPool::processDidFinishLaunching(WebProcessProxy* process) > if (m_memorySamplerEnabled) { > SandboxExtension::Handle sampleLogSandboxHandle; > WallTime now = WallTime::now(); >- String sampleLogFilePath = String::format("WebProcess%llupid%d", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()), process->processIdentifier()); >+ String sampleLogFilePath = makeString("WebProcess", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()), "pid", process->processIdentifier()); > sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::Type::ReadWrite, sampleLogSandboxHandle); > > process->send(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, m_memorySamplerInterval), 0); >@@ -1571,7 +1573,7 @@ void WebProcessPool::startMemorySampler(const double interval) > // For WebProcess > SandboxExtension::Handle sampleLogSandboxHandle; > WallTime now = WallTime::now(); >- String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds())); >+ String sampleLogFilePath = makeString("WebProcess", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds())); > sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::Type::ReadWrite, sampleLogSandboxHandle); > > sendToAllProcesses(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, interval)); >diff --git a/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp b/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp >index fdb1b2411e97c2e010a2e837131e2fc1940554a7..17ad1c72d113059d2a3cbf4043773808e3881d24 100644 >--- a/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp >+++ b/Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp >@@ -67,7 +67,7 @@ void NetworkStorageSessionMap::switchToNewTestingSession() > { > #if USE(CFURLCONNECTION) > // Session name should be short enough for shared memory region name to be under the limit, otehrwise sandbox rules won't work (see <rdar://problem/13642852>). >- String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID())); >+ String sessionName = makeString("WebKit Test-", getCurrentProcessID()); > > auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get())); > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index e15d028766030f666b07d2872d04c560ea5ebc2b..6c1b81249988ddf2ad6dee3cb19785413d2b712f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-15 Darin Adler <darin@apple.com> >+ >+ Replace many uses of String::format with more type-safe alternatives >+ https://bugs.webkit.org/show_bug.cgi?id=192742 >+ >+ Reviewed by Mark Lam. >+ >+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: >+ (WTR::cacheTestRunnerCallback): Use makeString. >+ * WebKitTestRunner/TestController.cpp: >+ (WTR::TestController::didReceiveAuthenticationChallenge): Use makeString. >+ (WTR::TestController::downloadDidFail): Use an ASCIILiteral via the _s syntax. >+ > 2019-01-23 David Kilzer <ddkilzer@apple.com> > > check-webkit-style should warn when using soft-linking macros in a header >diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >index d7a9d24829df8b74ad8bcd91ddd96094b2ce5850..ed331ded7a71190ee3be981f0f59ebed9342ca5d 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >@@ -55,6 +55,7 @@ > #include <wtf/StdLibExtras.h> > #include <wtf/text/CString.h> > #include <wtf/text/StringBuilder.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WTR { > >@@ -813,7 +814,7 @@ static void cacheTestRunnerCallback(unsigned index, JSValueRef callback) > return; > > if (callbackMap().contains(index)) { >- InjectedBundle::singleton().outputText(String::format("FAIL: Tried to install a second TestRunner callback for the same event (id %d)\n\n", index)); >+ InjectedBundle::singleton().outputText(makeString("FAIL: Tried to install a second TestRunner callback for the same event (id ", index, ")\n\n")); > return; > } > >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 7b662aa6000c6048b37f4eaa8f4019d120096252..0cff71956db9c428bb517b4d6cd3accb941be4d8 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -78,7 +78,7 @@ > #include <wtf/SetForScope.h> > #include <wtf/UUID.h> > #include <wtf/text/CString.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > #if PLATFORM(COCOA) > #include <WebKit/WKContextPrivateMac.h> >@@ -2073,11 +2073,11 @@ void TestController::didReceiveAuthenticationChallenge(WKPageRef page, WKAuthent > > std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get()); > int port = WKProtectionSpaceGetPort(protectionSpace); >- String message = String::format("%s:%d - didReceiveAuthenticationChallenge - %s - ", host.c_str(), port, toString(authenticationScheme)); >+ String message = makeString(host.c_str(), ':', port, " - didReceiveAuthenticationChallenge - ", toString(authenticationScheme), " - "); > if (!m_handlesAuthenticationChallenges) > message.append("Simulating cancelled authentication sheet\n"); > else >- message.append(String::format("Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data())); >+ message.append("Responding with " + m_authenticationUsername + ":" + m_authenticationPassword + "\n"); > m_currentInvocation->outputText(message); > > if (!m_handlesAuthenticationChallenges) { >@@ -2175,8 +2175,7 @@ void TestController::downloadDidReceiveServerRedirectToURL(WKContextRef, WKDownl > void TestController::downloadDidFail(WKContextRef, WKDownloadRef, WKErrorRef error) > { > if (m_shouldLogDownloadCallbacks) { >- String message = String::format("Download failed.\n"); >- m_currentInvocation->outputText(message); >+ m_currentInvocation->outputText("Download failed.\n"_s); > > WKRetainPtr<WKStringRef> errorDomain = adoptWK(WKErrorCopyDomain(error)); > WKRetainPtr<WKStringRef> errorDescription = adoptWK(WKErrorCopyLocalizedDescription(error));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192742
:
357404
|
357406
|
360243
|
360311