WebKit Bugzilla
Attachment 343319 Details for
Bug 186839
: [WTF] Add user-defined literal for ASCIILiteral
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186839-20180622211450.patch (text/plain), 1.95 MB, created by
Yusuke Suzuki
on 2018-06-22 05:14:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-06-22 05:14:52 PDT
Size:
1.95 MB
patch
obsolete
>Subversion Revision: 233075 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d27cc6974fe061d011a15aadd5294f963009190a..24803568e7783f8dd1235acc4daecbc456e2bb89 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,695 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/JSCallbackObjectFunctions.h: >+ (JSC::JSCallbackObject<Parent>::staticFunctionGetter): >+ (JSC::JSCallbackObject<Parent>::callbackGetter): >+ * API/JSObjectRef.cpp: >+ (JSObjectMakeFunctionWithCallback): >+ * API/JSTypedArray.cpp: >+ (JSObjectGetArrayBufferBytesPtr): >+ * API/JSValue.mm: >+ (valueToArray): >+ (valueToDictionary): >+ * API/ObjCCallbackFunction.mm: >+ (JSC::objCCallbackFunctionCallAsFunction): >+ (JSC::objCCallbackFunctionCallAsConstructor): >+ (JSC::ObjCCallbackFunctionImpl::call): >+ * API/glib/JSCCallbackFunction.cpp: >+ (JSC::JSCCallbackFunction::call): >+ (JSC::JSCCallbackFunction::construct): >+ * API/glib/JSCContext.cpp: >+ (jscContextJSValueToGValue): >+ * API/glib/JSCValue.cpp: >+ (jsc_value_object_define_property_accessor): >+ (jscValueFunctionCreate): >+ * builtins/BuiltinUtils.h: >+ * bytecode/CodeBlock.cpp: >+ (JSC::CodeBlock::nameForRegister): >+ * bytecompiler/BytecodeGenerator.cpp: >+ (JSC::BytecodeGenerator::emitEnumeration): >+ (JSC::BytecodeGenerator::emitIteratorNext): >+ (JSC::BytecodeGenerator::emitIteratorClose): >+ (JSC::BytecodeGenerator::emitDelegateYield): >+ * bytecompiler/NodesCodegen.cpp: >+ (JSC::FunctionCallValueNode::emitBytecode): >+ (JSC::PostfixNode::emitBytecode): >+ (JSC::PrefixNode::emitBytecode): >+ (JSC::AssignErrorNode::emitBytecode): >+ (JSC::ForInNode::emitBytecode): >+ (JSC::ForOfNode::emitBytecode): >+ (JSC::ClassExprNode::emitBytecode): >+ (JSC::ObjectPatternNode::bindValue const): >+ * dfg/DFGDriver.cpp: >+ (JSC::DFG::compileImpl): >+ * dfg/DFGOperations.cpp: >+ (JSC::DFG::newTypedArrayWithSize): >+ * dfg/DFGStrengthReductionPhase.cpp: >+ (JSC::DFG::StrengthReductionPhase::handleNode): >+ * inspector/ConsoleMessage.cpp: >+ (Inspector::ConsoleMessage::addToFrontend): >+ (Inspector::ConsoleMessage::clear): >+ * inspector/ContentSearchUtilities.cpp: >+ (Inspector::ContentSearchUtilities::findStylesheetSourceMapURL): >+ * inspector/InjectedScript.cpp: >+ (Inspector::InjectedScript::InjectedScript): >+ (Inspector::InjectedScript::evaluate): >+ (Inspector::InjectedScript::callFunctionOn): >+ (Inspector::InjectedScript::evaluateOnCallFrame): >+ (Inspector::InjectedScript::getFunctionDetails): >+ (Inspector::InjectedScript::functionDetails): >+ (Inspector::InjectedScript::getPreview): >+ (Inspector::InjectedScript::getProperties): >+ (Inspector::InjectedScript::getDisplayableProperties): >+ (Inspector::InjectedScript::getInternalProperties): >+ (Inspector::InjectedScript::getCollectionEntries): >+ (Inspector::InjectedScript::saveResult): >+ (Inspector::InjectedScript::wrapCallFrames const): >+ (Inspector::InjectedScript::wrapObject const): >+ (Inspector::InjectedScript::wrapJSONString const): >+ (Inspector::InjectedScript::wrapTable const): >+ (Inspector::InjectedScript::previewValue const): >+ (Inspector::InjectedScript::setExceptionValue): >+ (Inspector::InjectedScript::clearExceptionValue): >+ (Inspector::InjectedScript::findObjectById const): >+ (Inspector::InjectedScript::inspectObject): >+ (Inspector::InjectedScript::releaseObject): >+ (Inspector::InjectedScript::releaseObjectGroup): >+ * inspector/InjectedScriptBase.cpp: >+ (Inspector::InjectedScriptBase::makeEvalCall): >+ * inspector/InjectedScriptManager.cpp: >+ (Inspector::InjectedScriptManager::injectedScriptForObjectId): >+ * inspector/InjectedScriptModule.cpp: >+ (Inspector::InjectedScriptModule::ensureInjected): >+ * inspector/InspectorBackendDispatcher.cpp: >+ (Inspector::BackendDispatcher::dispatch): >+ (Inspector::BackendDispatcher::sendResponse): >+ (Inspector::BackendDispatcher::sendPendingErrors): >+ * inspector/JSGlobalObjectConsoleClient.cpp: >+ (Inspector::JSGlobalObjectConsoleClient::profile): >+ (Inspector::JSGlobalObjectConsoleClient::profileEnd): >+ (Inspector::JSGlobalObjectConsoleClient::timeStamp): >+ * inspector/JSGlobalObjectInspectorController.cpp: >+ (Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace): >+ * inspector/JSInjectedScriptHost.cpp: >+ (Inspector::JSInjectedScriptHost::evaluateWithScopeExtension): >+ (Inspector::JSInjectedScriptHost::subtype): >+ (Inspector::JSInjectedScriptHost::getInternalProperties): >+ * inspector/JSJavaScriptCallFrame.cpp: >+ (Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension): >+ (Inspector::JSJavaScriptCallFrame::type const): >+ * inspector/ScriptArguments.cpp: >+ (Inspector::ScriptArguments::getFirstArgumentAsString): >+ * inspector/ScriptCallStackFactory.cpp: >+ (Inspector::extractSourceInformationFromException): >+ * inspector/agents/InspectorAgent.cpp: >+ (Inspector::InspectorAgent::InspectorAgent): >+ * inspector/agents/InspectorConsoleAgent.cpp: >+ (Inspector::InspectorConsoleAgent::InspectorConsoleAgent): >+ (Inspector::InspectorConsoleAgent::clearMessages): >+ (Inspector::InspectorConsoleAgent::count): >+ (Inspector::InspectorConsoleAgent::setLoggingChannelLevel): >+ * inspector/agents/InspectorDebuggerAgent.cpp: >+ (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent): >+ (Inspector::InspectorDebuggerAgent::setAsyncStackTraceDepth): >+ (Inspector::buildObjectForBreakpointCookie): >+ (Inspector::InspectorDebuggerAgent::breakpointActionsFromProtocol): >+ (Inspector::parseLocation): >+ (Inspector::InspectorDebuggerAgent::setBreakpointByUrl): >+ (Inspector::InspectorDebuggerAgent::setBreakpoint): >+ (Inspector::InspectorDebuggerAgent::continueToLocation): >+ (Inspector::InspectorDebuggerAgent::searchInContent): >+ (Inspector::InspectorDebuggerAgent::getScriptSource): >+ (Inspector::InspectorDebuggerAgent::getFunctionDetails): >+ (Inspector::InspectorDebuggerAgent::resume): >+ (Inspector::InspectorDebuggerAgent::setPauseOnExceptions): >+ (Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): >+ (Inspector::InspectorDebuggerAgent::didParseSource): >+ (Inspector::InspectorDebuggerAgent::assertPaused): >+ * inspector/agents/InspectorHeapAgent.cpp: >+ (Inspector::InspectorHeapAgent::InspectorHeapAgent): >+ (Inspector::InspectorHeapAgent::nodeForHeapObjectIdentifier): >+ (Inspector::InspectorHeapAgent::getPreview): >+ (Inspector::InspectorHeapAgent::getRemoteObject): >+ * inspector/agents/InspectorRuntimeAgent.cpp: >+ (Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent): >+ (Inspector::InspectorRuntimeAgent::callFunctionOn): >+ (Inspector::InspectorRuntimeAgent::getPreview): >+ (Inspector::InspectorRuntimeAgent::getProperties): >+ (Inspector::InspectorRuntimeAgent::getDisplayableProperties): >+ (Inspector::InspectorRuntimeAgent::getCollectionEntries): >+ (Inspector::InspectorRuntimeAgent::saveResult): >+ (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): >+ (Inspector::InspectorRuntimeAgent::getBasicBlocks): >+ * inspector/agents/InspectorScriptProfilerAgent.cpp: >+ (Inspector::InspectorScriptProfilerAgent::InspectorScriptProfilerAgent): >+ * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: >+ (Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval): >+ * inspector/agents/JSGlobalObjectRuntimeAgent.cpp: >+ (Inspector::JSGlobalObjectRuntimeAgent::injectedScriptForEval): >+ * inspector/scripts/codegen/cpp_generator_templates.py: >+ * inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py: >+ (CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain): >+ (CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command): >+ * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py: >+ (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event): >+ * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: >+ * inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py: >+ (CppProtocolTypesImplementationGenerator): >+ * inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py: >+ (ObjCBackendDispatcherImplementationGenerator._generate_success_block_for_command): >+ (ObjCBackendDispatcherImplementationGenerator._generate_conversions_for_command): >+ * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py: >+ (ObjCFrontendDispatcherImplementationGenerator._generate_event): >+ (ObjCFrontendDispatcherImplementationGenerator._generate_event_out_parameters): >+ * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py: >+ (ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_objc_to_protocol_string): >+ * inspector/scripts/codegen/objc_generator_templates.py: >+ * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: >+ * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: >+ * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: >+ * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result: >+ * inspector/scripts/tests/generic/expected/domain-availability.json-result: >+ * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: >+ * inspector/scripts/tests/generic/expected/enum-values.json-result: >+ * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result: >+ * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: >+ * inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result: >+ * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result: >+ * inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result: >+ * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result: >+ * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result: >+ * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result: >+ * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result: >+ * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result: >+ * inspector/scripts/tests/generic/expected/worker-supported-domains.json-result: >+ * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result: >+ * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: >+ * interpreter/CallFrame.cpp: >+ (JSC::CallFrame::friendlyFunctionName): >+ * interpreter/Interpreter.cpp: >+ (JSC::Interpreter::execute): >+ * interpreter/StackVisitor.cpp: >+ (JSC::StackVisitor::Frame::functionName const): >+ (JSC::StackVisitor::Frame::sourceURL const): >+ * jit/JIT.cpp: >+ (JSC::JIT::doMainThreadPreparationBeforeCompile): >+ * jit/JITOperations.cpp: >+ * jsc.cpp: >+ (resolvePath): >+ (GlobalObject::moduleLoaderImportModule): >+ (GlobalObject::moduleLoaderResolve): >+ (functionDescribeArray): >+ (functionRun): >+ (functionLoad): >+ (functionCheckSyntax): >+ (functionDollarEvalScript): >+ (functionDollarAgentStart): >+ (functionDollarAgentReceiveBroadcast): >+ (functionDollarAgentBroadcast): >+ (functionTransferArrayBuffer): >+ (functionLoadModule): >+ (functionSamplingProfilerStackTraces): >+ (functionAsyncTestStart): >+ (functionWebAssemblyMemoryMode): >+ (runWithOptions): >+ * parser/Lexer.cpp: >+ (JSC::Lexer<T>::invalidCharacterMessage const): >+ (JSC::Lexer<T>::parseString): >+ (JSC::Lexer<T>::parseComplexEscape): >+ (JSC::Lexer<T>::parseStringSlowCase): >+ (JSC::Lexer<T>::parseTemplateLiteral): >+ (JSC::Lexer<T>::lex): >+ * parser/Parser.cpp: >+ (JSC::Parser<LexerType>::parseInner): >+ * parser/Parser.h: >+ (JSC::Parser::setErrorMessage): >+ * runtime/AbstractModuleRecord.cpp: >+ (JSC::AbstractModuleRecord::finishCreation): >+ * runtime/ArrayBuffer.cpp: >+ (JSC::errorMesasgeForTransfer): >+ * runtime/ArrayBufferSharingMode.h: >+ (JSC::arrayBufferSharingModeName): >+ * runtime/ArrayConstructor.cpp: >+ (JSC::constructArrayWithSizeQuirk): >+ (JSC::isArraySlowInline): >+ * runtime/ArrayPrototype.cpp: >+ (JSC::setLength): >+ (JSC::shift): >+ (JSC::unshift): >+ (JSC::arrayProtoFuncPop): >+ (JSC::arrayProtoFuncReverse): >+ (JSC::arrayProtoFuncUnShift): >+ * runtime/AtomicsObject.cpp: >+ (JSC::atomicsFuncWait): >+ (JSC::atomicsFuncWake): >+ * runtime/BigIntConstructor.cpp: >+ (JSC::BigIntConstructor::finishCreation): >+ (JSC::toBigInt): >+ (JSC::callBigIntConstructor): >+ * runtime/BigIntObject.cpp: >+ (JSC::BigIntObject::toStringName): >+ * runtime/BigIntPrototype.cpp: >+ (JSC::bigIntProtoFuncToString): >+ (JSC::bigIntProtoFuncValueOf): >+ * runtime/CommonSlowPaths.cpp: >+ (JSC::SLOW_PATH_DECL): >+ * runtime/ConsoleClient.cpp: >+ (JSC::ConsoleClient::printConsoleMessageWithArguments): >+ * runtime/ConsoleObject.cpp: >+ (JSC::valueOrDefaultLabelString): >+ (JSC::consoleProtoFuncTime): >+ (JSC::consoleProtoFuncTimeEnd): >+ * runtime/DatePrototype.cpp: >+ (JSC::formatLocaleDate): >+ (JSC::formateDateInstance): >+ (JSC::DatePrototype::finishCreation): >+ (JSC::dateProtoFuncToISOString): >+ (JSC::dateProtoFuncToJSON): >+ * runtime/Error.cpp: >+ (JSC::createNotEnoughArgumentsError): >+ (JSC::throwSyntaxError): >+ (JSC::createTypeError): >+ (JSC::createOutOfMemoryError): >+ * runtime/Error.h: >+ (JSC::throwVMError): >+ * runtime/ErrorConstructor.cpp: >+ (JSC::ErrorConstructor::finishCreation): >+ * runtime/ErrorInstance.cpp: >+ (JSC::ErrorInstance::sanitizedToString): >+ * runtime/ErrorPrototype.cpp: >+ (JSC::ErrorPrototype::finishCreation): >+ (JSC::errorProtoFuncToString): >+ * runtime/ExceptionFuzz.cpp: >+ (JSC::doExceptionFuzzing): >+ * runtime/ExceptionHelpers.cpp: >+ (JSC::TerminatedExecutionError::defaultValue): >+ (JSC::createStackOverflowError): >+ (JSC::createNotAConstructorError): >+ (JSC::createNotAFunctionError): >+ (JSC::createNotAnObjectError): >+ * runtime/GetterSetter.cpp: >+ (JSC::callSetter): >+ * runtime/IntlCollator.cpp: >+ (JSC::sortLocaleData): >+ (JSC::searchLocaleData): >+ (JSC::IntlCollator::initializeCollator): >+ (JSC::IntlCollator::compareStrings): >+ (JSC::IntlCollator::usageString): >+ (JSC::IntlCollator::sensitivityString): >+ (JSC::IntlCollator::caseFirstString): >+ (JSC::IntlCollator::resolvedOptions): >+ * runtime/IntlCollator.h: >+ * runtime/IntlCollatorConstructor.cpp: >+ (JSC::IntlCollatorConstructor::finishCreation): >+ * runtime/IntlCollatorPrototype.cpp: >+ (JSC::IntlCollatorPrototypeGetterCompare): >+ (JSC::IntlCollatorPrototypeFuncResolvedOptions): >+ * runtime/IntlDateTimeFormat.cpp: >+ (JSC::defaultTimeZone): >+ (JSC::canonicalizeTimeZoneName): >+ (JSC::IntlDTFInternal::localeData): >+ (JSC::IntlDTFInternal::toDateTimeOptionsAnyDate): >+ (JSC::IntlDateTimeFormat::initializeDateTimeFormat): >+ (JSC::IntlDateTimeFormat::weekdayString): >+ (JSC::IntlDateTimeFormat::eraString): >+ (JSC::IntlDateTimeFormat::yearString): >+ (JSC::IntlDateTimeFormat::monthString): >+ (JSC::IntlDateTimeFormat::dayString): >+ (JSC::IntlDateTimeFormat::hourString): >+ (JSC::IntlDateTimeFormat::minuteString): >+ (JSC::IntlDateTimeFormat::secondString): >+ (JSC::IntlDateTimeFormat::timeZoneNameString): >+ (JSC::IntlDateTimeFormat::resolvedOptions): >+ (JSC::IntlDateTimeFormat::format): >+ (JSC::IntlDateTimeFormat::partTypeString): >+ (JSC::IntlDateTimeFormat::formatToParts): >+ * runtime/IntlDateTimeFormat.h: >+ * runtime/IntlDateTimeFormatConstructor.cpp: >+ (JSC::IntlDateTimeFormatConstructor::finishCreation): >+ * runtime/IntlDateTimeFormatPrototype.cpp: >+ (JSC::IntlDateTimeFormatPrototypeGetterFormat): >+ (JSC::IntlDateTimeFormatPrototypeFuncFormatToParts): >+ (JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions): >+ * runtime/IntlNumberFormat.cpp: >+ (JSC::IntlNumberFormat::initializeNumberFormat): >+ (JSC::IntlNumberFormat::formatNumber): >+ (JSC::IntlNumberFormat::styleString): >+ (JSC::IntlNumberFormat::currencyDisplayString): >+ (JSC::IntlNumberFormat::resolvedOptions): >+ (JSC::IntlNumberFormat::partTypeString): >+ (JSC::IntlNumberFormat::formatToParts): >+ * runtime/IntlNumberFormat.h: >+ * runtime/IntlNumberFormatConstructor.cpp: >+ (JSC::IntlNumberFormatConstructor::finishCreation): >+ * runtime/IntlNumberFormatPrototype.cpp: >+ (JSC::IntlNumberFormatPrototypeGetterFormat): >+ (JSC::IntlNumberFormatPrototypeFuncFormatToParts): >+ (JSC::IntlNumberFormatPrototypeFuncResolvedOptions): >+ * runtime/IntlObject.cpp: >+ (JSC::grandfatheredLangTag): >+ (JSC::canonicalizeLocaleList): >+ (JSC::resolveLocale): >+ (JSC::supportedLocales): >+ * runtime/IntlPluralRules.cpp: >+ (JSC::IntlPluralRules::initializePluralRules): >+ (JSC::IntlPluralRules::resolvedOptions): >+ (JSC::IntlPluralRules::select): >+ * runtime/IntlPluralRulesConstructor.cpp: >+ (JSC::IntlPluralRulesConstructor::finishCreation): >+ * runtime/IntlPluralRulesPrototype.cpp: >+ (JSC::IntlPluralRulesPrototypeFuncSelect): >+ (JSC::IntlPluralRulesPrototypeFuncResolvedOptions): >+ * runtime/IteratorOperations.cpp: >+ (JSC::iteratorNext): >+ (JSC::iteratorClose): >+ (JSC::hasIteratorMethod): >+ (JSC::iteratorMethod): >+ * runtime/JSArray.cpp: >+ (JSC::JSArray::tryCreateUninitializedRestricted): >+ (JSC::JSArray::defineOwnProperty): >+ (JSC::JSArray::put): >+ (JSC::JSArray::setLengthWithArrayStorage): >+ (JSC::JSArray::appendMemcpy): >+ (JSC::JSArray::pop): >+ * runtime/JSArray.h: >+ * runtime/JSArrayBufferConstructor.cpp: >+ (JSC::JSArrayBufferConstructor::finishCreation): >+ * runtime/JSArrayBufferPrototype.cpp: >+ (JSC::arrayBufferProtoFuncSlice): >+ (JSC::arrayBufferProtoGetterFuncByteLength): >+ (JSC::sharedArrayBufferProtoGetterFuncByteLength): >+ * runtime/JSArrayBufferView.cpp: >+ (JSC::JSArrayBufferView::toStringName): >+ * runtime/JSArrayInlines.h: >+ (JSC::JSArray::pushInline): >+ * runtime/JSBigInt.cpp: >+ (JSC::JSBigInt::divide): >+ (JSC::JSBigInt::remainder): >+ (JSC::JSBigInt::toNumber const): >+ * runtime/JSCJSValue.cpp: >+ (JSC::JSValue::putToPrimitive): >+ (JSC::JSValue::putToPrimitiveByIndex): >+ (JSC::JSValue::toStringSlowCase const): >+ * runtime/JSCJSValueInlines.h: >+ (JSC::toPreferredPrimitiveType): >+ * runtime/JSDataView.cpp: >+ (JSC::JSDataView::create): >+ (JSC::JSDataView::put): >+ (JSC::JSDataView::defineOwnProperty): >+ * runtime/JSDataViewPrototype.cpp: >+ (JSC::getData): >+ (JSC::setData): >+ * runtime/JSFunction.cpp: >+ (JSC::JSFunction::callerGetter): >+ (JSC::JSFunction::put): >+ (JSC::JSFunction::defineOwnProperty): >+ * runtime/JSGenericTypedArrayView.h: >+ * runtime/JSGenericTypedArrayViewConstructorInlines.h: >+ (JSC::constructGenericTypedArrayViewWithArguments): >+ (JSC::constructGenericTypedArrayView): >+ * runtime/JSGenericTypedArrayViewInlines.h: >+ (JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty): >+ * runtime/JSGenericTypedArrayViewPrototypeFunctions.h: >+ (JSC::speciesConstruct): >+ (JSC::genericTypedArrayViewProtoFuncSet): >+ (JSC::genericTypedArrayViewProtoFuncIndexOf): >+ (JSC::genericTypedArrayViewProtoFuncLastIndexOf): >+ (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate): >+ * runtime/JSGlobalObject.cpp: >+ (JSC::JSGlobalObject::init): >+ * runtime/JSGlobalObjectDebuggable.cpp: >+ (JSC::JSGlobalObjectDebuggable::name const): >+ * runtime/JSGlobalObjectFunctions.cpp: >+ (JSC::encode): >+ (JSC::decode): >+ (JSC::globalFuncProtoSetter): >+ * runtime/JSGlobalObjectFunctions.h: >+ * runtime/JSMap.cpp: >+ (JSC::JSMap::toStringName): >+ * runtime/JSModuleEnvironment.cpp: >+ (JSC::JSModuleEnvironment::put): >+ * runtime/JSModuleNamespaceObject.cpp: >+ (JSC::JSModuleNamespaceObject::put): >+ (JSC::JSModuleNamespaceObject::putByIndex): >+ (JSC::JSModuleNamespaceObject::defineOwnProperty): >+ * runtime/JSONObject.cpp: >+ (JSC::Stringifier::appendStringifiedValue): >+ (JSC::JSONProtoFuncParse): >+ (JSC::JSONProtoFuncStringify): >+ * runtime/JSObject.cpp: >+ (JSC::getClassPropertyNames): >+ (JSC::JSObject::calculatedClassName): >+ (JSC::ordinarySetSlow): >+ (JSC::JSObject::putInlineSlow): >+ (JSC::JSObject::setPrototypeWithCycleCheck): >+ (JSC::callToPrimitiveFunction): >+ (JSC::JSObject::ordinaryToPrimitive const): >+ (JSC::JSObject::defaultHasInstance): >+ (JSC::JSObject::defineOwnIndexedProperty): >+ (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage): >+ (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): >+ (JSC::validateAndApplyPropertyDescriptor): >+ * runtime/JSObject.h: >+ * runtime/JSObjectInlines.h: >+ (JSC::JSObject::putInlineForJSObject): >+ * runtime/JSPromiseConstructor.cpp: >+ (JSC::JSPromiseConstructor::finishCreation): >+ * runtime/JSSet.cpp: >+ (JSC::JSSet::toStringName): >+ * runtime/JSSymbolTableObject.h: >+ (JSC::symbolTablePut): >+ * runtime/JSTypedArrayViewConstructor.cpp: >+ (JSC::constructTypedArrayView): >+ * runtime/JSTypedArrayViewPrototype.cpp: >+ (JSC::typedArrayViewPrivateFuncLength): >+ (JSC::typedArrayViewProtoFuncSet): >+ (JSC::typedArrayViewProtoFuncCopyWithin): >+ (JSC::typedArrayViewProtoFuncLastIndexOf): >+ (JSC::typedArrayViewProtoFuncIndexOf): >+ (JSC::typedArrayViewProtoFuncJoin): >+ (JSC::typedArrayViewProtoGetterFuncBuffer): >+ (JSC::typedArrayViewProtoGetterFuncLength): >+ (JSC::typedArrayViewProtoGetterFuncByteLength): >+ (JSC::typedArrayViewProtoGetterFuncByteOffset): >+ (JSC::typedArrayViewProtoFuncReverse): >+ (JSC::typedArrayViewPrivateFuncSubarrayCreate): >+ (JSC::typedArrayViewProtoFuncSlice): >+ (JSC::JSTypedArrayViewPrototype::finishCreation): >+ * runtime/JSWeakMap.cpp: >+ (JSC::JSWeakMap::toStringName): >+ * runtime/JSWeakSet.cpp: >+ (JSC::JSWeakSet::toStringName): >+ * runtime/LiteralParser.cpp: >+ (JSC::LiteralParser<CharType>::Lexer::lex): >+ (JSC::LiteralParser<CharType>::Lexer::lexStringSlow): >+ (JSC::LiteralParser<CharType>::Lexer::lexNumber): >+ (JSC::LiteralParser<CharType>::parse): >+ * runtime/LiteralParser.h: >+ (JSC::LiteralParser::getErrorMessage): >+ * runtime/Lookup.cpp: >+ (JSC::reifyStaticAccessor): >+ * runtime/Lookup.h: >+ (JSC::putEntry): >+ * runtime/MapPrototype.cpp: >+ (JSC::getMap): >+ * runtime/NullSetterFunction.cpp: >+ (JSC::NullSetterFunctionInternal::callReturnUndefined): >+ * runtime/NumberPrototype.cpp: >+ (JSC::numberProtoFuncToExponential): >+ (JSC::numberProtoFuncToFixed): >+ (JSC::numberProtoFuncToPrecision): >+ (JSC::extractToStringRadixArgument): >+ * runtime/ObjectConstructor.cpp: >+ (JSC::objectConstructorSetPrototypeOf): >+ (JSC::objectConstructorAssign): >+ (JSC::objectConstructorValues): >+ (JSC::toPropertyDescriptor): >+ (JSC::objectConstructorDefineProperty): >+ (JSC::objectConstructorDefineProperties): >+ (JSC::objectConstructorCreate): >+ (JSC::objectConstructorSeal): >+ (JSC::objectConstructorFreeze): >+ * runtime/ObjectPrototype.cpp: >+ (JSC::objectProtoFuncDefineGetter): >+ (JSC::objectProtoFuncDefineSetter): >+ * runtime/Operations.cpp: >+ (JSC::jsAddSlowCase): >+ * runtime/Operations.h: >+ (JSC::jsSub): >+ (JSC::jsMul): >+ * runtime/ProgramExecutable.cpp: >+ (JSC::ProgramExecutable::initializeGlobalProperties): >+ * runtime/ProxyConstructor.cpp: >+ (JSC::makeRevocableProxy): >+ (JSC::proxyRevocableConstructorThrowError): >+ (JSC::ProxyConstructor::finishCreation): >+ (JSC::constructProxyObject): >+ * runtime/ProxyObject.cpp: >+ (JSC::ProxyObject::toStringName): >+ (JSC::ProxyObject::finishCreation): >+ (JSC::performProxyGet): >+ (JSC::ProxyObject::performInternalMethodGetOwnProperty): >+ (JSC::ProxyObject::performHasProperty): >+ (JSC::ProxyObject::performPut): >+ (JSC::performProxyCall): >+ (JSC::performProxyConstruct): >+ (JSC::ProxyObject::performDelete): >+ (JSC::ProxyObject::performPreventExtensions): >+ (JSC::ProxyObject::performIsExtensible): >+ (JSC::ProxyObject::performDefineOwnProperty): >+ (JSC::ProxyObject::performGetOwnPropertyNames): >+ (JSC::ProxyObject::performSetPrototype): >+ (JSC::ProxyObject::performGetPrototype): >+ * runtime/ReflectObject.cpp: >+ (JSC::reflectObjectConstruct): >+ (JSC::reflectObjectDefineProperty): >+ (JSC::reflectObjectGet): >+ (JSC::reflectObjectGetOwnPropertyDescriptor): >+ (JSC::reflectObjectGetPrototypeOf): >+ (JSC::reflectObjectIsExtensible): >+ (JSC::reflectObjectOwnKeys): >+ (JSC::reflectObjectPreventExtensions): >+ (JSC::reflectObjectSet): >+ (JSC::reflectObjectSetPrototypeOf): >+ * runtime/RegExpConstructor.cpp: >+ (JSC::RegExpConstructor::finishCreation): >+ (JSC::toFlags): >+ * runtime/RegExpObject.cpp: >+ (JSC::RegExpObject::defineOwnProperty): >+ * runtime/RegExpObject.h: >+ * runtime/RegExpPrototype.cpp: >+ (JSC::regExpProtoFuncCompile): >+ (JSC::regExpProtoGetterGlobal): >+ (JSC::regExpProtoGetterIgnoreCase): >+ (JSC::regExpProtoGetterMultiline): >+ (JSC::regExpProtoGetterDotAll): >+ (JSC::regExpProtoGetterSticky): >+ (JSC::regExpProtoGetterUnicode): >+ (JSC::regExpProtoGetterFlags): >+ (JSC::regExpProtoGetterSourceInternal): >+ (JSC::regExpProtoGetterSource): >+ * runtime/RuntimeType.cpp: >+ (JSC::runtimeTypeAsString): >+ * runtime/SamplingProfiler.cpp: >+ (JSC::SamplingProfiler::StackFrame::displayName): >+ (JSC::SamplingProfiler::StackFrame::displayNameForJSONTests): >+ * runtime/ScriptExecutable.cpp: >+ (JSC::ScriptExecutable::prepareForExecutionImpl): >+ * runtime/SetPrototype.cpp: >+ (JSC::getSet): >+ * runtime/SparseArrayValueMap.cpp: >+ (JSC::SparseArrayValueMap::putEntry): >+ (JSC::SparseArrayValueMap::putDirect): >+ (JSC::SparseArrayEntry::put): >+ * runtime/StackFrame.cpp: >+ (JSC::StackFrame::sourceURL const): >+ (JSC::StackFrame::functionName const): >+ * runtime/StringConstructor.cpp: >+ (JSC::stringFromCodePoint): >+ * runtime/StringObject.cpp: >+ (JSC::StringObject::put): >+ (JSC::StringObject::putByIndex): >+ * runtime/StringPrototype.cpp: >+ (JSC::StringPrototype::finishCreation): >+ (JSC::toLocaleCase): >+ (JSC::stringProtoFuncNormalize): >+ * runtime/Symbol.cpp: >+ (JSC::Symbol::toNumber const): >+ * runtime/SymbolConstructor.cpp: >+ (JSC::symbolConstructorKeyFor): >+ * runtime/SymbolObject.cpp: >+ (JSC::SymbolObject::toStringName): >+ * runtime/SymbolPrototype.cpp: >+ (JSC::SymbolPrototype::finishCreation): >+ * runtime/TypeSet.cpp: >+ (JSC::TypeSet::dumpTypes const): >+ (JSC::TypeSet::displayName const): >+ (JSC::StructureShape::leastCommonAncestor): >+ * runtime/TypeSet.h: >+ (JSC::StructureShape::setConstructorName): >+ * runtime/VM.cpp: >+ (JSC::VM::dumpTypeProfilerData): >+ * runtime/WeakMapPrototype.cpp: >+ (JSC::getWeakMap): >+ (JSC::protoFuncWeakMapSet): >+ * runtime/WeakSetPrototype.cpp: >+ (JSC::getWeakSet): >+ (JSC::protoFuncWeakSetAdd): >+ * tools/JSDollarVM.cpp: >+ (WTF::DOMJITGetterComplex::DOMJITAttribute::slowCall): >+ (WTF::DOMJITGetterComplex::customGetter): >+ (JSC::functionSetImpureGetterDelegate): >+ (JSC::functionCreateElement): >+ (JSC::functionGetHiddenValue): >+ (JSC::functionSetHiddenValue): >+ (JSC::functionFindTypeForExpression): >+ (JSC::functionReturnTypeFor): >+ (JSC::functionLoadGetterFromGetterSetter): >+ * wasm/WasmB3IRGenerator.cpp: >+ (JSC::Wasm::B3IRGenerator::fail const): >+ * wasm/WasmIndexOrName.cpp: >+ (JSC::Wasm::makeString): >+ * wasm/WasmParser.h: >+ (JSC::Wasm::FailureHelper::makeString): >+ (JSC::Wasm::Parser::fail const): >+ * wasm/WasmPlan.cpp: >+ (JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast): >+ * wasm/WasmValidate.cpp: >+ (JSC::Wasm::Validate::fail const): >+ * wasm/js/JSWebAssemblyCodeBlock.cpp: >+ (JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock): >+ * wasm/js/JSWebAssemblyHelpers.h: >+ (JSC::toNonWrappingUint32): >+ (JSC::getWasmBufferFromValue): >+ * wasm/js/JSWebAssemblyInstance.cpp: >+ (JSC::JSWebAssemblyInstance::create): >+ * wasm/js/JSWebAssemblyMemory.cpp: >+ (JSC::JSWebAssemblyMemory::grow): >+ * wasm/js/WasmToJS.cpp: >+ (JSC::Wasm::handleBadI64Use): >+ * wasm/js/WebAssemblyCompileErrorConstructor.cpp: >+ (JSC::WebAssemblyCompileErrorConstructor::finishCreation): >+ * wasm/js/WebAssemblyInstanceConstructor.cpp: >+ (JSC::constructJSWebAssemblyInstance): >+ (JSC::WebAssemblyInstanceConstructor::finishCreation): >+ * wasm/js/WebAssemblyInstancePrototype.cpp: >+ (JSC::getInstance): >+ * wasm/js/WebAssemblyLinkErrorConstructor.cpp: >+ (JSC::WebAssemblyLinkErrorConstructor::finishCreation): >+ * wasm/js/WebAssemblyMemoryConstructor.cpp: >+ (JSC::constructJSWebAssemblyMemory): >+ (JSC::WebAssemblyMemoryConstructor::finishCreation): >+ * wasm/js/WebAssemblyMemoryPrototype.cpp: >+ (JSC::getMemory): >+ * wasm/js/WebAssemblyModuleConstructor.cpp: >+ (JSC::webAssemblyModuleCustomSections): >+ (JSC::webAssemblyModuleImports): >+ (JSC::webAssemblyModuleExports): >+ (JSC::WebAssemblyModuleConstructor::finishCreation): >+ * wasm/js/WebAssemblyModuleRecord.cpp: >+ (JSC::WebAssemblyModuleRecord::link): >+ (JSC::dataSegmentFail): >+ (JSC::WebAssemblyModuleRecord::evaluate): >+ * wasm/js/WebAssemblyPrototype.cpp: >+ (JSC::resolve): >+ (JSC::webAssemblyInstantiateFunc): >+ (JSC::webAssemblyInstantiateStreamingInternal): >+ * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: >+ (JSC::WebAssemblyRuntimeErrorConstructor::finishCreation): >+ * wasm/js/WebAssemblyTableConstructor.cpp: >+ (JSC::constructJSWebAssemblyTable): >+ (JSC::WebAssemblyTableConstructor::finishCreation): >+ * wasm/js/WebAssemblyTablePrototype.cpp: >+ (JSC::getTable): >+ (JSC::webAssemblyTableProtoFuncGrow): >+ (JSC::webAssemblyTableProtoFuncGet): >+ (JSC::webAssemblyTableProtoFuncSet): >+ > 2018-06-21 Mark Lam <mark.lam@apple.com> > > WebKit (JavaScriptCore) compilation error with Clang ⥠6. >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 42022b3c7f11cac66dac1d1766527bc2b986d184..3a08d9b20ad76a90408ae94db1c21e40d92ec8ad 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,43 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch adds user-defined literal for ASCIILiteral. We can create ASCIILiteral in the form of `"Hello World"_s`. >+ And we remove public ASCIILiteral constructor. This change ensures that ASCIILiteral is created from literal. >+ >+ * WTF.xcodeproj/project.pbxproj: >+ * wtf/CMakeLists.txt: >+ * wtf/Indenter.h: >+ (WTF::Indenter::Indenter): >+ * wtf/Logger.h: >+ (WTF::LogArgument::toString): >+ * wtf/MediaTime.cpp: >+ (WTF::toJSONStringInternal): >+ (WTF::MediaTimeRange::toJSONString const): >+ * wtf/linux/MemoryFootprintLinux.cpp: >+ (WTF::memoryFootprint): >+ * wtf/text/ASCIILiteral.cpp: Copied from Source/WebCore/css/CSSUnsetValue.cpp. >+ (WTF::ASCIILiteral::dump const): >+ * wtf/text/ASCIILiteral.h: Copied from Source/WTF/wtf/Indenter.h. >+ (WTF::ASCIILiteral::operator const char* const): >+ (WTF::ASCIILiteral::fromLiteralUnsafe): >+ (WTF::ASCIILiteral::null): >+ (WTF::ASCIILiteral::characters const): >+ (WTF::ASCIILiteral::ASCIILiteral): >+ (WTF::string_literals::operator _s): >+ * wtf/text/WTFString.cpp: >+ (asciiDebug): >+ * wtf/text/WTFString.h: >+ (WTF::operator==): >+ (WTF::operator!=): >+ (WTF::ASCIILiteral::ASCIILiteral): Deleted. >+ (WTF::ASCIILiteral::operator const char*): Deleted. >+ * wtf/unix/LanguageUnix.cpp: >+ (WTF::platformLanguage): >+ > 2018-06-21 Carlos Garcia Campos <cgarcia@igalia.com> > > [GLIB] improve get_type() fast path in WEBKIT_DEFINE_TYPE >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 25497b0f6ad2c8bae0f72111ec7124f3cbd9450c..d2a1e089b8aef090584458ac07dd6ad4747eab81 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,1439 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No behavior change. >+ >+ * Modules/applicationmanifest/ApplicationManifestParser.cpp: >+ (WebCore::ApplicationManifestParser::parseManifest): >+ (WebCore::ApplicationManifestParser::logDeveloperWarning): >+ (WebCore::ApplicationManifestParser::parseStartURL): >+ (WebCore::ApplicationManifestParser::parseDisplay): >+ (WebCore::ApplicationManifestParser::parseName): >+ (WebCore::ApplicationManifestParser::parseDescription): >+ (WebCore::ApplicationManifestParser::parseShortName): >+ (WebCore::ApplicationManifestParser::parseScope): >+ * Modules/beacon/NavigatorBeacon.cpp: >+ (WebCore::NavigatorBeacon::logError): >+ (WebCore::NavigatorBeacon::sendBeacon): >+ * Modules/cache/DOMCache.cpp: >+ (WebCore::DOMCache::requestFromInfo): >+ (WebCore::DOMCache::addAll): >+ (WebCore::DOMCache::put): >+ * Modules/cache/DOMCacheEngine.cpp: >+ (WebCore::DOMCacheEngine::errorToException): >+ * Modules/credentialmanagement/BasicCredential.cpp: >+ (WebCore::BasicCredential::type const): >+ * Modules/credentialmanagement/CredentialsContainer.cpp: >+ (WebCore::CredentialsContainer::get): >+ (WebCore::CredentialsContainer::store): >+ (WebCore::CredentialsContainer::isCreate): >+ (WebCore::CredentialsContainer::preventSilentAccess const): >+ * Modules/entriesapi/DOMFileSystem.cpp: >+ (WebCore::DOMFileSystem::root): >+ (WebCore::validatePathIsExpectedType): >+ (WebCore::resolveRelativeVirtualPath): >+ (WebCore::DOMFileSystem::getEntry): >+ * Modules/entriesapi/FileSystemDirectoryEntry.cpp: >+ (WebCore::FileSystemDirectoryEntry::getEntry): >+ * Modules/entriesapi/FileSystemDirectoryReader.cpp: >+ (WebCore::FileSystemDirectoryReader::readEntries): >+ * Modules/fetch/FetchBody.cpp: >+ (WebCore::FetchBody::consumeAsStream): >+ * Modules/fetch/FetchBodyConsumer.cpp: >+ (WebCore::FetchBodyConsumer::loadingFailed): >+ * Modules/fetch/FetchBodyOwner.cpp: >+ (WebCore::FetchBodyOwner::arrayBuffer): >+ (WebCore::FetchBodyOwner::blob): >+ (WebCore::FetchBodyOwner::consumeOnceLoadingFinished): >+ (WebCore::FetchBodyOwner::formData): >+ (WebCore::FetchBodyOwner::json): >+ (WebCore::FetchBodyOwner::text): >+ (WebCore::FetchBodyOwner::blobLoadingFailed): >+ (WebCore::FetchBodyOwner::consumeBodyAsStream): >+ * Modules/fetch/FetchHeaders.cpp: >+ (WebCore::canWriteHeader): >+ * Modules/fetch/FetchLoader.cpp: >+ (WebCore::FetchLoader::startLoadingBlobURL): >+ (WebCore::FetchLoader::start): >+ * Modules/fetch/FetchRequest.cpp: >+ (WebCore::setMethod): >+ (WebCore::computeReferrer): >+ (WebCore::buildOptions): >+ (WebCore::FetchRequest::initializeOptions): >+ (WebCore::FetchRequest::initializeWith): >+ (WebCore::FetchRequest::setBody): >+ (WebCore::FetchRequest::referrer const): >+ (WebCore::FetchRequest::clone): >+ * Modules/fetch/FetchResponse.cpp: >+ (WebCore::FetchResponse::create): >+ (WebCore::FetchResponse::redirect): >+ (WebCore::FetchResponse::clone): >+ (WebCore::FetchResponse::BodyLoader::didFail): >+ * Modules/fetch/FetchResponse.h: >+ * Modules/geolocation/GeoNotifier.cpp: >+ (WebCore::GeoNotifier::timerFired): >+ * Modules/geolocation/Geolocation.cpp: >+ (WebCore::Geolocation::startRequest): >+ (WebCore::Geolocation::requestUsesCachedPosition): >+ (WebCore::Geolocation::makeCachedPositionCallbacks): >+ (WebCore::Geolocation::setIsAllowed): >+ (WebCore::Geolocation::cancelRequests): >+ (WebCore::Geolocation::handlePendingPermissionNotifiers): >+ * Modules/indexeddb/IDBCursor.cpp: >+ (WebCore::IDBCursor::update): >+ (WebCore::IDBCursor::advance): >+ (WebCore::IDBCursor::continuePrimaryKey): >+ (WebCore::IDBCursor::continueFunction): >+ (WebCore::IDBCursor::deleteFunction): >+ * Modules/indexeddb/IDBDatabase.cpp: >+ (WebCore::IDBDatabase::createObjectStore): >+ (WebCore::IDBDatabase::transaction): >+ (WebCore::IDBDatabase::deleteObjectStore): >+ * Modules/indexeddb/IDBFactory.cpp: >+ (WebCore::IDBFactory::open): >+ (WebCore::IDBFactory::openInternal): >+ (WebCore::IDBFactory::deleteDatabase): >+ (WebCore::IDBFactory::cmp): >+ * Modules/indexeddb/IDBIndex.cpp: >+ (WebCore::IDBIndex::setName): >+ (WebCore::IDBIndex::openCursor): >+ (WebCore::IDBIndex::openKeyCursor): >+ (WebCore::IDBIndex::count): >+ (WebCore::IDBIndex::doCount): >+ (WebCore::IDBIndex::get): >+ (WebCore::IDBIndex::doGet): >+ (WebCore::IDBIndex::getKey): >+ (WebCore::IDBIndex::doGetKey): >+ (WebCore::IDBIndex::getAll): >+ (WebCore::IDBIndex::getAllKeys): >+ * Modules/indexeddb/IDBKeyData.cpp: >+ (WebCore::IDBKeyData::loggingString const): >+ * Modules/indexeddb/IDBKeyRangeData.cpp: >+ (WebCore::IDBKeyRangeData::loggingString const): >+ * Modules/indexeddb/IDBObjectStore.cpp: >+ (WebCore::IDBObjectStore::setName): >+ (WebCore::IDBObjectStore::openCursor): >+ (WebCore::IDBObjectStore::openKeyCursor): >+ (WebCore::IDBObjectStore::get): >+ (WebCore::IDBObjectStore::getKey): >+ (WebCore::IDBObjectStore::putOrAdd): >+ (WebCore::IDBObjectStore::doDelete): >+ (WebCore::IDBObjectStore::deleteFunction): >+ (WebCore::IDBObjectStore::clear): >+ (WebCore::IDBObjectStore::createIndex): >+ (WebCore::IDBObjectStore::index): >+ (WebCore::IDBObjectStore::deleteIndex): >+ (WebCore::IDBObjectStore::count): >+ (WebCore::IDBObjectStore::doCount): >+ (WebCore::IDBObjectStore::getAll): >+ (WebCore::IDBObjectStore::getAllKeys): >+ * Modules/indexeddb/IDBRequest.cpp: >+ (WebCore::IDBRequest::result const): >+ (WebCore:: const): >+ (WebCore::IDBRequest::uncaughtExceptionInEventHandler): >+ * Modules/indexeddb/IDBTransaction.cpp: >+ (WebCore::IDBTransaction::objectStore): >+ (WebCore::IDBTransaction::abort): >+ (WebCore::IDBTransaction::putOrAddOnServer): >+ * Modules/indexeddb/server/IDBServer.cpp: >+ (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): >+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: >+ (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange): >+ (WebCore::IDBServer::MemoryIDBBackingStore::addRecord): >+ (WebCore::IDBServer::MemoryIDBBackingStore::getRecord): >+ (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords): >+ (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord): >+ (WebCore::IDBServer::MemoryIDBBackingStore::getCount): >+ (WebCore::IDBServer::MemoryIDBBackingStore::openCursor): >+ (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor): >+ * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: >+ (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromEncodedFilename): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::getCount): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor): >+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore): >+ * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: >+ (WebCore::IDBServer::SQLiteIDBTransaction::begin): >+ (WebCore::IDBServer::SQLiteIDBTransaction::commit): >+ (WebCore::IDBServer::SQLiteIDBTransaction::abort): >+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp: >+ (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore): >+ (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex): >+ (WebCore::IDBServer::UniqueIDBDatabase::renameIndex): >+ (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): >+ (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): >+ (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): >+ * Modules/indexeddb/shared/IDBError.h: >+ (WebCore::IDBError::userDeleteError): >+ * Modules/indexeddb/shared/IDBTransactionInfo.cpp: >+ (WebCore::IDBTransactionInfo::loggingString const): >+ * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: >+ (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): >+ * Modules/mediastream/PeerConnectionBackend.cpp: >+ (WebCore::PeerConnectionBackend::addIceCandidate): >+ * Modules/mediastream/UserMediaRequest.cpp: >+ (WebCore::UserMediaRequest::deny): >+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: >+ (WebCore::LibWebRTCMediaEndpoint::doSetLocalDescription): >+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: >+ (WebCore::LibWebRTCPeerConnectionBackend::doAddIceCandidate): >+ * Modules/paymentrequest/PaymentRequest.cpp: >+ (WebCore::checkAndCanonicalizeTotal): >+ (WebCore::PaymentRequest::create): >+ * Modules/quota/DOMWindowQuota.cpp: >+ (WebCore::DOMWindowQuota::webkitStorageInfo const): >+ * Modules/webaudio/AudioBufferSourceNode.cpp: >+ (WebCore::AudioBufferSourceNode::looping): >+ (WebCore::AudioBufferSourceNode::setLooping): >+ * Modules/webaudio/AudioNode.cpp: >+ (WebCore::AudioNode::channelCountMode): >+ (WebCore::AudioNode::channelInterpretation): >+ * Modules/webaudio/MediaStreamAudioSource.cpp: >+ (WebCore::MediaStreamAudioSource::MediaStreamAudioSource): >+ * Modules/webauthn/AuthenticatorManager.cpp: >+ (WebCore::AuthenticatorManagerInternal::produceClientDataJson): >+ (WebCore::AuthenticatorManagerInternal::initTimeoutTimer): >+ (WebCore::AuthenticatorManager::create const): >+ (WebCore::AuthenticatorManager::discoverFromExternalSource const): >+ (WebCore::AuthenticatorManager::isUserVerifyingPlatformAuthenticatorAvailable const): >+ * Modules/webauthn/cocoa/LocalAuthenticator.mm: >+ (WebCore::LocalAuthenticator::makeCredential): >+ (WebCore::LocalAuthenticator::getAssertion): >+ * Modules/webdatabase/DatabaseTracker.cpp: >+ (WebCore::DatabaseTracker::usage): >+ * Modules/websockets/WebSocket.cpp: >+ (WebCore::WebSocket::connect): >+ (WebCore::WebSocket::close): >+ (WebCore::WebSocket::binaryType const): >+ * Modules/websockets/WebSocketHandshake.cpp: >+ (WebCore::WebSocketHandshake::readStatusLine): >+ (WebCore::WebSocketHandshake::readHTTPHeaders): >+ (WebCore::WebSocketHandshake::checkResponseHeaders): >+ * Modules/webvr/VRDisplay.cpp: >+ (WebCore::VRDisplay::requestPresent): >+ (WebCore::VRDisplay::exitPresent): >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole): >+ (WebCore::AccessibilityObject::invalidStatus const): >+ * accessibility/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::textUnderElement const): >+ * bindings/js/JSCustomElementInterface.cpp: >+ (WebCore::constructCustomElementSynchronously): >+ * bindings/js/JSCustomElementRegistryCustom.cpp: >+ (WebCore::getCustomElementCallback): >+ (WebCore::validateCustomElementNameAndThrowIfNeeded): >+ (WebCore::JSCustomElementRegistry::define): >+ * bindings/js/JSCustomXPathNSResolver.cpp: >+ (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): >+ * bindings/js/JSDOMConstructorBase.cpp: >+ (WebCore::callThrowTypeError): >+ * bindings/js/JSDOMConstructorBase.h: >+ (WebCore::JSDOMConstructorBase::className): >+ * bindings/js/JSDOMConstructorNotConstructable.h: >+ (WebCore::JSDOMConstructorNotConstructable::callThrowTypeError): >+ * bindings/js/JSDOMExceptionHandling.cpp: >+ (WebCore::createDOMException): >+ (WebCore::throwSequenceTypeError): >+ (WebCore::throwNonFiniteTypeError): >+ * bindings/js/JSDOMIterator.h: >+ (WebCore::iteratorForEach): >+ (WebCore::IteratorTraits>::next): >+ * bindings/js/JSDOMWindowBase.cpp: >+ (WebCore::isResponseCorrect): >+ (WebCore::handleResponseOnStreamingAction): >+ (WebCore::JSDOMWindowBase::compileStreaming): >+ (WebCore::JSDOMWindowBase::instantiateStreaming): >+ * bindings/js/JSDOMWindowCustom.cpp: >+ (WebCore::JSDOMWindow::preventExtensions): >+ (WebCore::JSDOMWindow::toStringName): >+ * bindings/js/JSHTMLElementCustom.cpp: >+ (WebCore::constructJSHTMLElement): >+ * bindings/js/JSLocationCustom.cpp: >+ (WebCore::JSLocation::preventExtensions): >+ (WebCore::JSLocation::toStringName): >+ * bindings/js/JSReadableStreamPrivateConstructors.cpp: >+ (WebCore::constructJSReadableStreamDefaultController): >+ (WebCore::constructJSReadableByteStreamController): >+ (WebCore::constructJSReadableStreamBYOBRequest): >+ * bindings/js/JSRemoteDOMWindowCustom.cpp: >+ (WebCore::JSRemoteDOMWindow::preventExtensions): >+ (WebCore::JSRemoteDOMWindow::toStringName): >+ * bindings/js/ReadableStreamDefaultController.cpp: >+ (WebCore::ReadableStreamDefaultController::invoke): >+ * bindings/js/ScriptModuleLoader.cpp: >+ (WebCore::resolveModuleSpecifier): >+ (WebCore::ScriptModuleLoader::resolve): >+ (WebCore::ScriptModuleLoader::fetch): >+ (WebCore::ScriptModuleLoader::evaluate): >+ (WebCore::ScriptModuleLoader::importModule): >+ (WebCore::ScriptModuleLoader::notifyFinished): >+ * bindings/js/SerializedScriptValue.cpp: >+ (WebCore::maybeThrowExceptionIfSerializationFailed): >+ * bindings/js/WorkerScriptController.cpp: >+ (WebCore::WorkerScriptController::evaluate): >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateDefaultValue): >+ (GenerateConstructorHelperMethods): >+ (GenerateCallTracer): >+ * bindings/scripts/test/JS/JSInterfaceName.cpp: >+ (WebCore::JSInterfaceNameConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSMapLike.cpp: >+ (WebCore::JSMapLikeConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: >+ (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: >+ (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestCEReactions.cpp: >+ (WebCore::JSTestCEReactionsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: >+ (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestCallTracer.cpp: >+ (WebCore::JSTestCallTracerConstructor::initializeProperties): >+ (WebCore::jsTestCallTracerTestAttributeInterfaceGetter): >+ (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter): >+ (WebCore::jsTestCallTracerTestAttributeSpecifiedGetter): >+ (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter): >+ (WebCore::jsTestCallTracerTestAttributeWithVariantGetter): >+ (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody): >+ (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody): >+ * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: >+ (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: >+ (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: >+ (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestDOMJIT.cpp: >+ (WebCore::JSTestDOMJITConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: >+ (WebCore::JSTestEnabledBySettingConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp: >+ (WebCore::JSTestEventConstructorConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestEventTarget.cpp: >+ (WebCore::JSTestEventTargetConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestException.cpp: >+ (WebCore::JSTestExceptionConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: >+ (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestGlobalObject.cpp: >+ (WebCore::JSTestGlobalObjectConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: >+ (WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: >+ (WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: >+ (WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestInterface.cpp: >+ (WebCore::JSTestInterfaceConstructor::construct): >+ (WebCore::JSTestInterfaceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: >+ (WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestIterable.cpp: >+ (WebCore::JSTestIterableConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: >+ (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: >+ (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: >+ (WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: >+ (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: >+ (WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: >+ (WebCore::JSTestNamedConstructorConstructor::initializeProperties): >+ (WebCore::JSTestNamedConstructorNamedConstructor::construct): >+ (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: >+ (WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: >+ (WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: >+ (WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: >+ (WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: >+ (WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: >+ (WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: >+ (WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: >+ (WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: >+ (WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: >+ (WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: >+ (WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: >+ (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: >+ (WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: >+ (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: >+ (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestNode.cpp: >+ (WebCore::JSTestNodeConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestObj.cpp: >+ (WebCore::convertDictionary<TestObj::Dictionary>): >+ (WebCore::JSTestObjConstructor::initializeProperties): >+ (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody): >+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: >+ (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: >+ (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: >+ (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestPluginInterface.cpp: >+ (WebCore::JSTestPluginInterfaceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: >+ (WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestSerialization.cpp: >+ (WebCore::JSTestSerializationConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: >+ (WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: >+ (WebCore::JSTestSerializationInheritConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: >+ (WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: >+ (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifier.cpp: >+ (WebCore::JSTestStringifierConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: >+ (WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: >+ (WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: >+ (WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: >+ (WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: >+ (WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: >+ (WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties): >+ * bindings/scripts/test/JS/JSTestTypedefs.cpp: >+ (WebCore::JSTestTypedefsConstructor::initializeProperties): >+ * bridge/c/c_instance.cpp: >+ (JSC::Bindings::CInstance::invokeMethod): >+ (JSC::Bindings::CInstance::invokeDefaultMethod): >+ (JSC::Bindings::CInstance::invokeConstruct): >+ (JSC::Bindings::CInstance::stringValue const): >+ (JSC::Bindings::CInstance::toJSPrimitive const): >+ * bridge/objc/objc_instance.mm: >+ (ObjcInstance::invokeMethod): >+ * bridge/objc/objc_runtime.mm: >+ (JSC::Bindings::ObjcArray::setValueAt const): >+ * contentextensions/ContentExtensionsBackend.cpp: >+ (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad): >+ * crypto/SubtleCrypto.cpp: >+ (WebCore::rejectWithException): >+ (WebCore::SubtleCrypto::encrypt): >+ (WebCore::SubtleCrypto::decrypt): >+ (WebCore::SubtleCrypto::sign): >+ (WebCore::SubtleCrypto::verify): >+ (WebCore::SubtleCrypto::deriveKey): >+ (WebCore::SubtleCrypto::deriveBits): >+ (WebCore::SubtleCrypto::exportKey): >+ (WebCore::SubtleCrypto::wrapKey): >+ (WebCore::SubtleCrypto::unwrapKey): >+ * crypto/keys/CryptoKeyEC.cpp: >+ (WebCore::CryptoKeyEC::algorithm const): >+ * css/CSSInheritedValue.cpp: >+ (WebCore::CSSInheritedValue::customCSSText const): >+ * css/CSSInitialValue.cpp: >+ (WebCore::CSSInitialValue::customCSSText const): >+ * css/CSSKeyframesRule.cpp: >+ (WebCore::CSSKeyframesRule::insertRule): >+ * css/CSSRevertValue.cpp: >+ (WebCore::CSSRevertValue::customCSSText const): >+ * css/CSSStyleSheet.h: >+ * css/CSSUnsetValue.cpp: >+ (WebCore::CSSUnsetValue::customCSSText const): >+ * css/CSSValueList.cpp: >+ (WebCore::CSSValueList::customCSSText const): >+ * css/DOMMatrixReadOnly.cpp: >+ (WebCore::DOMMatrixReadOnly::validateAndFixup): >+ (WebCore::DOMMatrixReadOnly::toFloat32Array const): >+ (WebCore::DOMMatrixReadOnly::toFloat64Array const): >+ (WebCore::DOMMatrixReadOnly::toString const): >+ * css/DeprecatedCSSOMValueList.cpp: >+ (WebCore::DeprecatedCSSOMValueList::cssText const): >+ * css/FontFace.cpp: >+ (WebCore::FontFace::create): >+ (WebCore::FontFace::unicodeRange const): >+ (WebCore::FontFace::featureSettings const): >+ * css/MediaQuery.cpp: >+ (WebCore::MediaQuery::serialize const): >+ * css/PropertySetCSSStyleDeclaration.cpp: >+ (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority): >+ * css/WebKitCSSMatrix.cpp: >+ (WebCore::WebKitCSSMatrix::toString const): >+ * css/parser/MediaQueryParser.cpp: >+ (WebCore::MediaQueryParser::commitMediaQuery): >+ * dom/CDATASection.cpp: >+ (WebCore::CDATASection::nodeName const): >+ * dom/Comment.cpp: >+ (WebCore::Comment::nodeName const): >+ * dom/DOMException.cpp: >+ (WebCore::DOMException::description const): >+ (WebCore::DOMException::create): >+ * dom/DOMException.h: >+ (WebCore::DOMException::name): >+ (WebCore::DOMException::message): >+ * dom/DOMImplementation.cpp: >+ (WebCore::DOMImplementation::createHTMLDocument): >+ * dom/DataTransfer.cpp: >+ (WebCore::DataTransfer::DataTransfer): >+ (WebCore::DataTransfer::types const): >+ (WebCore::DataTransfer::createForInputEvent): >+ (WebCore::DataTransfer::dropEffect const): >+ (WebCore::DataTransfer::effectAllowed const): >+ * dom/DataTransferItem.cpp: >+ (WebCore::DataTransferItem::kind const): >+ * dom/Document.cpp: >+ (WebCore::Document::suggestedMIMEType const): >+ (WebCore::Document::contentType const): >+ (WebCore::Document::nodeName const): >+ (WebCore::Document::writeln): >+ (WebCore::Document::canNavigate): >+ (WebCore::Document::designMode const): >+ (WebCore::Document::requestFullScreenForElement): >+ * dom/DocumentFragment.cpp: >+ (WebCore::DocumentFragment::nodeName const): >+ * dom/InlineStyleSheetOwner.cpp: >+ (WebCore::InlineStyleSheetOwner::createSheet): >+ * dom/MouseEvent.cpp: >+ (WebCore::MouseEvent::initMouseEventQuirk): >+ * dom/ScriptElement.cpp: >+ (WebCore::ScriptElement::requestModuleScript): >+ * dom/ScriptElementCachedScriptFetcher.cpp: >+ (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript const): >+ * dom/ScriptExecutionContext.cpp: >+ (WebCore::ScriptExecutionContext::dispatchErrorEvent): >+ * dom/ScriptedAnimationController.cpp: >+ (WebCore::throttlingReasonsToString): >+ * dom/Text.cpp: >+ (WebCore::Text::nodeName const): >+ * dom/TextEncoder.cpp: >+ (WebCore::TextEncoder::encoding const): >+ * dom/Traversal.cpp: >+ (WebCore::NodeIteratorBase::acceptNode): >+ * editing/EditCommand.cpp: >+ (WebCore::inputTypeNameForEditingAction): >+ * editing/Editing.cpp: >+ (WebCore::createTabSpanElement): >+ * editing/Editor.cpp: >+ (WebCore::createDataTransferForClipboardEvent): >+ * editing/EditorCommand.cpp: >+ (WebCore::executeInsertBacktab): >+ (WebCore::executeInsertLineBreak): >+ (WebCore::executeInsertNewline): >+ (WebCore::executeInsertTab): >+ (WebCore::executeJustifyCenter): >+ (WebCore::executeJustifyFull): >+ (WebCore::executeJustifyLeft): >+ (WebCore::executeJustifyRight): >+ (WebCore::executeStrikethrough): >+ (WebCore::executeSubscript): >+ (WebCore::executeSuperscript): >+ (WebCore::executeToggleBold): >+ (WebCore::executeToggleItalic): >+ (WebCore::executeUnderline): >+ (WebCore::executeUnscript): >+ (WebCore::stateBold): >+ (WebCore::stateItalic): >+ (WebCore::stateStrikethrough): >+ (WebCore::stateSubscript): >+ (WebCore::stateSuperscript): >+ (WebCore::stateUnderline): >+ (WebCore::stateJustifyCenter): >+ (WebCore::stateJustifyFull): >+ (WebCore::stateJustifyLeft): >+ (WebCore::stateJustifyRight): >+ (WebCore::Editor::Command::value const): >+ * editing/SmartReplace.cpp: >+ (WebCore::getSmartSet): >+ * fileapi/FileCocoa.mm: >+ (WebCore::File::computeNameAndContentTypeForReplacedFile): >+ * html/BaseCheckableInputType.cpp: >+ (WebCore::BaseCheckableInputType::saveFormControlState const): >+ * html/BaseChooserOnlyDateAndTimeInputType.cpp: >+ (WebCore::BaseChooserOnlyDateAndTimeInputType::updateInnerTextValue): >+ * html/ColorInputType.cpp: >+ (WebCore::ColorInputType::fallbackValue const): >+ * html/DOMFormData.cpp: >+ (WebCore::DOMFormData::createFileEntry): >+ * html/FTPDirectoryDocument.cpp: >+ (WebCore::processFilesizeString): >+ (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): >+ * html/HTMLAnchorElement.cpp: >+ (WebCore::HTMLAnchorElement::relList const): >+ (WebCore::HTMLAnchorElement::isSystemPreviewLink const): >+ * html/HTMLAppletElement.cpp: >+ (WebCore::HTMLAppletElement::HTMLAppletElement): >+ (WebCore::HTMLAppletElement::updateWidget): >+ * html/HTMLCanvasElement.cpp: >+ (WebCore::toEncodingMimeType): >+ (WebCore::HTMLCanvasElement::toDataURL): >+ (WebCore::HTMLCanvasElement::captureStream): >+ * html/HTMLElement.cpp: >+ (WebCore::HTMLElement::contentEditable const): >+ * html/HTMLFormControlElement.cpp: >+ (WebCore::shouldAutofocus): >+ * html/HTMLHtmlElement.cpp: >+ (WebCore::HTMLHtmlElement::insertedByParser): >+ * html/HTMLKeygenElement.cpp: >+ (WebCore::HTMLKeygenElement::keytype const): >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::canPlayType const): >+ (WebCore::stringForNetworkState): >+ (WebCore::HTMLMediaElement::preload const): >+ (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): >+ * html/HTMLObjectElement.cpp: >+ (WebCore::mapDataParamToSrc): >+ * html/HTMLPlugInElement.cpp: >+ (WebCore::HTMLPlugInElement::setReplacement): >+ * html/ImageData.cpp: >+ (WebCore::ImageData::create): >+ * html/ImageDocument.cpp: >+ (WebCore::ImageDocument::createDocumentStructure): >+ * html/ImageInputType.cpp: >+ (WebCore::ImageInputType::appendFormData const): >+ * html/PluginDocument.cpp: >+ (WebCore::PluginDocumentParser::createDocumentStructure): >+ * html/canvas/WebGL2RenderingContext.cpp: >+ (WebCore::WebGL2RenderingContext::getExtension): >+ (WebCore::WebGL2RenderingContext::getSupportedExtensions): >+ (WebCore::WebGL2RenderingContext::getParameter): >+ * html/canvas/WebGLCompressedTextureASTC.cpp: >+ (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC): >+ (WebCore::WebGLCompressedTextureASTC::getSupportedProfiles): >+ (WebCore::WebGLCompressedTextureASTC::supported): >+ (WebCore::m_isLDRSupported): Deleted. >+ * html/canvas/WebGLRenderingContext.cpp: >+ (WebCore::WebGLRenderingContext::getExtension): >+ (WebCore::WebGLRenderingContext::getSupportedExtensions): >+ (WebCore::WebGLRenderingContext::getParameter): >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::WebGLRenderingContextBase::create): >+ (WebCore::WebGLRenderingContextBase::enableSupportedExtension): >+ * html/canvas/WebGLRenderingContextBase.h: >+ * html/canvas/WebGPUEnums.cpp: >+ (WebCore::web3DCompareFunctionName): >+ * html/parser/HTMLParserIdioms.cpp: >+ (WebCore::parseCORSSettingsAttribute): >+ * html/parser/HTMLPreloadScanner.cpp: >+ (WebCore::TokenPreloadScanner::initiatorFor): >+ * html/parser/HTMLResourcePreloader.cpp: >+ (WebCore::PreloadRequest::resourceRequest): >+ * html/parser/HTMLTreeBuilder.cpp: >+ (WebCore::HTMLTreeBuilder::insertPhoneNumberLink): >+ * html/track/DataCue.cpp: >+ (WebCore::DataCue::toJSONString const): >+ * html/track/InbandGenericTextTrack.cpp: >+ (WebCore::InbandGenericTextTrack::updateCueFromCueData): >+ * html/track/TextTrackCue.cpp: >+ (WebCore::TextTrackCue::toJSON const): >+ * html/track/TextTrackCueGeneric.cpp: >+ (WebCore::TextTrackCueGeneric::toJSONString const): >+ * html/track/TrackBase.cpp: >+ (WebCore::TrackBase::setLanguage): >+ * html/track/VTTCue.cpp: >+ (WebCore::VTTCue::toJSON const): >+ * inspector/CommandLineAPIModule.cpp: >+ (WebCore::CommandLineAPIModule::CommandLineAPIModule): >+ * inspector/InspectorCanvas.cpp: >+ (WebCore::InspectorCanvas::getCanvasContentAsDataURL): >+ (WebCore::InspectorCanvas::indexForData): >+ (WebCore::InspectorCanvas::buildInitialState): >+ (WebCore::InspectorCanvas::buildArrayForCanvasGradient): >+ (WebCore::InspectorCanvas::buildArrayForCanvasPattern): >+ * inspector/InspectorFrontendClient.h: >+ (WebCore::InspectorFrontendClient::debuggableType): >+ * inspector/InspectorFrontendClientLocal.cpp: >+ (WebCore::InspectorFrontendClientLocal::openInNewTab): >+ * inspector/InspectorFrontendHost.cpp: >+ (WebCore::InspectorFrontendHost::userInterfaceLayoutDirection): >+ (WebCore::InspectorFrontendHost::platform): >+ (WebCore::InspectorFrontendHost::port): >+ * inspector/InspectorOverlay.cpp: >+ (WebCore::InspectorOverlay::setIndicating): >+ (WebCore::InspectorOverlay::drawPaintRects): >+ (WebCore::InspectorOverlay::drawRulers): >+ (WebCore::appendPathSegment): >+ * inspector/InspectorStyleSheet.h: >+ (WebCore::InspectorCSSId::InspectorCSSId): >+ * inspector/TimelineRecordFactory.cpp: >+ (WebCore::TimelineRecordFactory::createGenericRecord): >+ (WebCore::TimelineRecordFactory::createFunctionCallData): >+ (WebCore::TimelineRecordFactory::createConsoleProfileData): >+ (WebCore::TimelineRecordFactory::createProbeSampleData): >+ (WebCore::TimelineRecordFactory::createEventDispatchData): >+ (WebCore::TimelineRecordFactory::createGenericTimerData): >+ (WebCore::TimelineRecordFactory::createTimerInstallData): >+ (WebCore::TimelineRecordFactory::createEvaluateScriptData): >+ (WebCore::TimelineRecordFactory::createTimeStampData): >+ (WebCore::TimelineRecordFactory::createAnimationFrameData): >+ (WebCore::TimelineRecordFactory::createPaintData): >+ (WebCore::TimelineRecordFactory::appendLayoutRoot): >+ * inspector/WebInjectedScriptHost.cpp: >+ (WebCore::WebInjectedScriptHost::subtype): >+ (WebCore::jsStringForPaymentRequestState): >+ (WebCore::WebInjectedScriptHost::getInternalProperties): >+ * inspector/agents/InspectorApplicationCacheAgent.cpp: >+ (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): >+ * inspector/agents/InspectorCSSAgent.cpp: >+ (WebCore::InspectorCSSAgent::InspectorCSSAgent): >+ (WebCore::InspectorCSSAgent::getMatchedStylesForNode): >+ (WebCore::InspectorCSSAgent::createStyleSheet): >+ (WebCore::InspectorCSSAgent::addRule): >+ (WebCore::InspectorCSSAgent::elementForId): >+ (WebCore::InspectorCSSAgent::assertStyleSheetForId): >+ * inspector/agents/InspectorCanvasAgent.cpp: >+ (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): >+ (WebCore::InspectorCanvasAgent::requestNode): >+ (WebCore::InspectorCanvasAgent::requestContent): >+ (WebCore::InspectorCanvasAgent::resolveCanvasContext): >+ (WebCore::InspectorCanvasAgent::startRecording): >+ (WebCore::InspectorCanvasAgent::stopRecording): >+ (WebCore::InspectorCanvasAgent::requestShaderSource): >+ (WebCore::InspectorCanvasAgent::updateShader): >+ (WebCore::InspectorCanvasAgent::setShaderProgramDisabled): >+ (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted): >+ (WebCore::InspectorCanvasAgent::assertInspectorCanvas): >+ (WebCore::InspectorCanvasAgent::assertInspectorProgram): >+ * inspector/agents/InspectorDOMAgent.cpp: >+ (WebCore::InspectorDOMAgent::InspectorDOMAgent): >+ (WebCore::InspectorDOMAgent::assertNode): >+ (WebCore::InspectorDOMAgent::assertDocument): >+ (WebCore::InspectorDOMAgent::assertElement): >+ (WebCore::InspectorDOMAgent::assertEditableNode): >+ (WebCore::InspectorDOMAgent::assertEditableElement): >+ (WebCore::InspectorDOMAgent::getDocument): >+ (WebCore::InspectorDOMAgent::pushNodeToFrontend): >+ (WebCore::InspectorDOMAgent::requestChildNodes): >+ (WebCore::InspectorDOMAgent::querySelector): >+ (WebCore::InspectorDOMAgent::querySelectorAll): >+ (WebCore::InspectorDOMAgent::releaseBackendNodeIds): >+ (WebCore::InspectorDOMAgent::setAttributesAsText): >+ (WebCore::InspectorDOMAgent::removeNode): >+ (WebCore::InspectorDOMAgent::setOuterHTML): >+ (WebCore::InspectorDOMAgent::insertAdjacentHTML): >+ (WebCore::InspectorDOMAgent::setNodeValue): >+ (WebCore::InspectorDOMAgent::setEventListenerDisabled): >+ (WebCore::InspectorDOMAgent::performSearch): >+ (WebCore::InspectorDOMAgent::getSearchResults): >+ (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): >+ (WebCore::InspectorDOMAgent::highlightQuad): >+ (WebCore::InspectorDOMAgent::highlightSelector): >+ (WebCore::InspectorDOMAgent::highlightNode): >+ (WebCore::InspectorDOMAgent::highlightNodeList): >+ (WebCore::InspectorDOMAgent::moveTo): >+ (WebCore::InspectorDOMAgent::focus): >+ (WebCore::InspectorDOMAgent::setInspectedNode): >+ (WebCore::InspectorDOMAgent::resolveNode): >+ (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend): >+ (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend): >+ * inspector/agents/InspectorDOMDebuggerAgent.cpp: >+ (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent): >+ (WebCore::InspectorDOMDebuggerAgent::setBreakpoint): >+ (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint): >+ (WebCore::domTypeName): >+ (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded): >+ * inspector/agents/InspectorDOMStorageAgent.cpp: >+ (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): >+ (WebCore::InspectorDOMStorageAgent::getDOMStorageItems): >+ (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): >+ (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): >+ (WebCore::InspectorDOMStorageAgent::findStorageArea): >+ * inspector/agents/InspectorDatabaseAgent.cpp: >+ (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): >+ (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): >+ * inspector/agents/InspectorIndexedDBAgent.cpp: >+ (WebCore::Inspector::idbKeyRangeFromKeyRange): >+ (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent): >+ (WebCore::InspectorIndexedDBAgent::requestData): >+ * inspector/agents/InspectorLayerTreeAgent.cpp: >+ (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): >+ (WebCore::InspectorLayerTreeAgent::layersForNode): >+ (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): >+ * inspector/agents/InspectorMemoryAgent.cpp: >+ (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): >+ * inspector/agents/InspectorNetworkAgent.cpp: >+ (WebCore::InspectorNetworkAgent::InspectorNetworkAgent): >+ (WebCore::InspectorNetworkAgent::getResponseBody): >+ (WebCore::InspectorNetworkAgent::loadResource): >+ (WebCore::InspectorNetworkAgent::resolveWebSocket): >+ (WebCore::InspectorNetworkAgent::createTextDecoder): >+ (WebCore::InspectorNetworkAgent::searchInRequest): >+ * inspector/agents/InspectorPageAgent.cpp: >+ (WebCore::InspectorPageAgent::resourceContent): >+ (WebCore::InspectorPageAgent::InspectorPageAgent): >+ (WebCore::InspectorPageAgent::navigate): >+ (WebCore::InspectorPageAgent::assertFrame): >+ (WebCore::InspectorPageAgent::assertDocumentLoader): >+ (WebCore::InspectorPageAgent::snapshotNode): >+ (WebCore::InspectorPageAgent::snapshotRect): >+ (WebCore::InspectorPageAgent::archive): >+ * inspector/agents/InspectorTimelineAgent.cpp: >+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): >+ (WebCore::InspectorTimelineAgent::setInstruments): >+ (WebCore::InspectorTimelineAgent::startFromConsole): >+ (WebCore::InspectorTimelineAgent::stopFromConsole): >+ (WebCore::InspectorTimelineAgent::didCompleteRecordEntry): >+ * inspector/agents/InspectorWorkerAgent.cpp: >+ (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): >+ (WebCore::InspectorWorkerAgent::initialized): >+ (WebCore::InspectorWorkerAgent::sendMessageToWorker): >+ * inspector/agents/WebConsoleAgent.cpp: >+ (WebCore::WebConsoleAgent::setLoggingChannelLevel): >+ * inspector/agents/page/PageDebuggerAgent.cpp: >+ (WebCore::PageDebuggerAgent::injectedScriptForEval): >+ * inspector/agents/page/PageNetworkAgent.cpp: >+ (WebCore::PageNetworkAgent::scriptExecutionContext): >+ * inspector/agents/page/PageRuntimeAgent.cpp: >+ (WebCore::PageRuntimeAgent::injectedScriptForEval): >+ * inspector/agents/worker/ServiceWorkerAgent.cpp: >+ (WebCore::ServiceWorkerAgent::ServiceWorkerAgent): >+ * inspector/agents/worker/WorkerDebuggerAgent.cpp: >+ (WebCore::WorkerDebuggerAgent::injectedScriptForEval): >+ * inspector/agents/worker/WorkerRuntimeAgent.cpp: >+ (WebCore::WorkerRuntimeAgent::injectedScriptForEval): >+ * loader/ContentFilter.cpp: >+ (WebCore::ContentFilter::handleProvisionalLoadFailure): >+ * loader/CrossOriginAccessControl.cpp: >+ (WebCore::passesAccessControlCheck): >+ (WebCore::validatePreflightResponse): >+ * loader/CrossOriginPreflightChecker.cpp: >+ (WebCore::CrossOriginPreflightChecker::notifyFinished): >+ (WebCore::CrossOriginPreflightChecker::doPreflight): >+ * loader/DocumentLoader.cpp: >+ (WebCore::isRemoteWebArchive): >+ (WebCore::DocumentLoader::startIconLoading): >+ * loader/DocumentThreadableLoader.cpp: >+ (WebCore::DocumentThreadableLoader::reportRedirectionWithBadScheme): >+ (WebCore::DocumentThreadableLoader::reportContentSecurityPolicyError): >+ (WebCore::DocumentThreadableLoader::reportCrossOriginResourceSharingError): >+ (WebCore::DocumentThreadableLoader::reportIntegrityMetadataError): >+ * loader/FormSubmission.cpp: >+ (WebCore::FormSubmission::Attributes::parseEncodingType): >+ * loader/FormSubmission.h: >+ (WebCore::FormSubmission::Attributes::methodString): >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::initForSynthesizedDocument): >+ (WebCore::FrameLoader::loadURLIntoChildFrame): >+ (WebCore::FrameLoader::defaultSubstituteDataForURL): >+ (WebCore::FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded): >+ (WebCore::FrameLoader::dispatchBeforeUnloadEvent): >+ * loader/LinkLoader.cpp: >+ (WebCore::LinkLoader::preconnectIfNeeded): >+ * loader/NavigationScheduler.cpp: >+ (WebCore::NavigationScheduler::scheduleLocationChange): >+ * loader/PingLoader.cpp: >+ (WebCore::PingLoader::sendViolationReport): >+ * loader/ResourceLoadStatistics.cpp: >+ (WebCore::ResourceLoadStatistics::primaryDomain): >+ (WebCore::ResourceLoadStatistics::areDomainsAssociated): >+ * loader/ResourceLoader.cpp: >+ (WebCore::ResourceLoader::loadDataURL): >+ (WebCore::ResourceLoader::didBlockAuthenticationChallenge): >+ * loader/SubresourceLoader.cpp: >+ (WebCore::SubresourceLoader::willSendRequestInternal): >+ (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): >+ * loader/ThreadableLoader.cpp: >+ (WebCore::ThreadableLoader::logError): >+ * loader/appcache/ApplicationCacheGroup.cpp: >+ (WebCore::ApplicationCacheGroup::abort): >+ (WebCore::ApplicationCacheGroup::didFinishLoadingEntry): >+ (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): >+ (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): >+ * loader/appcache/ApplicationCacheHost.cpp: >+ (WebCore::ApplicationCacheHost::createFileURL): >+ * loader/appcache/ManifestParser.cpp: >+ (WebCore::parseManifest): >+ * loader/archive/ArchiveFactory.cpp: >+ (WebCore::createArchiveMIMETypesMap): >+ * loader/cache/CachedResource.cpp: >+ (WebCore::CachedResource::load): >+ * loader/cache/CachedResourceLoader.cpp: >+ (WebCore::CachedResourceLoader::canRequest): >+ (WebCore::CachedResourceLoader::requestResource): >+ * loader/cache/CachedResourceRequest.cpp: >+ (WebCore::acceptHeaderValueFromType): >+ (WebCore::CachedResourceRequest::updateAcceptEncodingHeader): >+ * loader/cache/CachedScript.cpp: >+ (WebCore::CachedScript::CachedScript): >+ * loader/cache/MemoryCache.cpp: >+ (WebCore::MemoryCache::getOriginsWithCache): >+ * loader/soup/ResourceLoaderSoup.cpp: >+ (WebCore::ResourceLoader::loadGResource): >+ * page/DOMSelection.cpp: >+ (WebCore::DOMSelection::type const): >+ * page/DOMWindow.cpp: >+ (WebCore::DOMWindow::close): >+ (WebCore::DOMWindow::addEventListener): >+ (WebCore::DOMWindow::createWindow): >+ * page/DebugPageOverlays.cpp: >+ (WebCore::touchEventRegionColors): >+ * page/DiagnosticLoggingKeys.cpp: >+ (WebCore::DiagnosticLoggingKeys::mediaLoadedKey): >+ (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey): >+ (WebCore::DiagnosticLoggingKeys::memoryCacheEntryDecisionKey): >+ (WebCore::DiagnosticLoggingKeys::memoryCacheUsageKey): >+ (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey): >+ (WebCore::DiagnosticLoggingKeys::pluginLoadedKey): >+ (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey): >+ (WebCore::DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey): >+ (WebCore::DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey): >+ (WebCore::DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey): >+ (WebCore::DiagnosticLoggingKeys::postPageLoadCPUUsageKey): >+ (WebCore::DiagnosticLoggingKeys::postPageLoadMemoryUsageKey): >+ (WebCore::DiagnosticLoggingKeys::provisionalLoadKey): >+ (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey): >+ (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey): >+ (WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey): >+ (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey): >+ (WebCore::DiagnosticLoggingKeys::pageLoadedKey): >+ (WebCore::DiagnosticLoggingKeys::playedKey): >+ (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey): >+ (WebCore::DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey): >+ (WebCore::DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey): >+ (WebCore::DiagnosticLoggingKeys::navigationKey): >+ (WebCore::DiagnosticLoggingKeys::needsRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::networkCacheKey): >+ (WebCore::DiagnosticLoggingKeys::networkCacheFailureReasonKey): >+ (WebCore::DiagnosticLoggingKeys::networkCacheUnusedReasonKey): >+ (WebCore::DiagnosticLoggingKeys::networkCacheReuseFailureKey): >+ (WebCore::DiagnosticLoggingKeys::networkKey): >+ (WebCore::DiagnosticLoggingKeys::networkProcessCrashedKey): >+ (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey): >+ (WebCore::DiagnosticLoggingKeys::noKey): >+ (WebCore::DiagnosticLoggingKeys::noCacheKey): >+ (WebCore::DiagnosticLoggingKeys::noStoreKey): >+ (WebCore::DiagnosticLoggingKeys::nonVisibleStateKey): >+ (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey): >+ (WebCore::DiagnosticLoggingKeys::pageCacheKey): >+ (WebCore::DiagnosticLoggingKeys::pageCacheFailureKey): >+ (WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey): >+ (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey): >+ (WebCore::DiagnosticLoggingKeys::otherKey): >+ (WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey): >+ (WebCore::DiagnosticLoggingKeys::mainResourceKey): >+ (WebCore::DiagnosticLoggingKeys::isErrorPageKey): >+ (WebCore::DiagnosticLoggingKeys::isExpiredKey): >+ (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey): >+ (WebCore::DiagnosticLoggingKeys::loadingKey): >+ (WebCore::DiagnosticLoggingKeys::hasPluginsKey): >+ (WebCore::DiagnosticLoggingKeys::httpsNoStoreKey): >+ (WebCore::DiagnosticLoggingKeys::imageKey): >+ (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey): >+ (WebCore::DiagnosticLoggingKeys::inactiveKey): >+ (WebCore::DiagnosticLoggingKeys::internalErrorKey): >+ (WebCore::DiagnosticLoggingKeys::invalidSessionIDKey): >+ (WebCore::DiagnosticLoggingKeys::isAttachmentKey): >+ (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey): >+ (WebCore::DiagnosticLoggingKeys::isDisabledKey): >+ (WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey): >+ (WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey): >+ (WebCore::DiagnosticLoggingKeys::rawKey): >+ (WebCore::DiagnosticLoggingKeys::redirectKey): >+ (WebCore::DiagnosticLoggingKeys::isLoadingKey): >+ (WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey): >+ (WebCore::DiagnosticLoggingKeys::domainCausingCrashKey): >+ (WebCore::DiagnosticLoggingKeys::domainCausingEnergyDrainKey): >+ (WebCore::DiagnosticLoggingKeys::domainCausingJetsamKey): >+ (WebCore::DiagnosticLoggingKeys::simulatedPageCrashKey): >+ (WebCore::DiagnosticLoggingKeys::exceededActiveMemoryLimitKey): >+ (WebCore::DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey): >+ (WebCore::DiagnosticLoggingKeys::exceededBackgroundCPULimitKey): >+ (WebCore::DiagnosticLoggingKeys::domainVisitedKey): >+ (WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey): >+ (WebCore::DiagnosticLoggingKeys::cpuUsageKey): >+ (WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey): >+ (WebCore::DiagnosticLoggingKeys::activeInForegroundTabKey): >+ (WebCore::DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey): >+ (WebCore::DiagnosticLoggingKeys::applicationCacheKey): >+ (WebCore::DiagnosticLoggingKeys::applicationManifestKey): >+ (WebCore::DiagnosticLoggingKeys::audioKey): >+ (WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey): >+ (WebCore::DiagnosticLoggingKeys::canCacheKey): >+ (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey): >+ (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationReasonKey): >+ (WebCore::DiagnosticLoggingKeys::deniedByClientKey): >+ (WebCore::DiagnosticLoggingKeys::deviceMotionKey): >+ (WebCore::DiagnosticLoggingKeys::deviceOrientationKey): >+ (WebCore::DiagnosticLoggingKeys::diskCacheKey): >+ (WebCore::DiagnosticLoggingKeys::diskCacheAfterValidationKey): >+ (WebCore::DiagnosticLoggingKeys::reloadKey): >+ (WebCore::DiagnosticLoggingKeys::replaceKey): >+ (WebCore::DiagnosticLoggingKeys::retrievalRequestKey): >+ (WebCore::DiagnosticLoggingKeys::resourceLoadedKey): >+ (WebCore::DiagnosticLoggingKeys::resourceResponseSourceKey): >+ (WebCore::DiagnosticLoggingKeys::retrievalKey): >+ (WebCore::DiagnosticLoggingKeys::revalidatingKey): >+ (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): >+ (WebCore::DiagnosticLoggingKeys::reloadRevalidatingExpiredKey): >+ (WebCore::DiagnosticLoggingKeys::sameLoadKey): >+ (WebCore::DiagnosticLoggingKeys::scriptKey): >+ (WebCore::DiagnosticLoggingKeys::serviceWorkerKey): >+ (WebCore::DiagnosticLoggingKeys::streamingMedia): >+ (WebCore::DiagnosticLoggingKeys::styleSheetKey): >+ (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::svgDocumentKey): >+ (WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey): >+ (WebCore::DiagnosticLoggingKeys::telemetryPageLoadKey): >+ (WebCore::DiagnosticLoggingKeys::timedOutKey): >+ (WebCore::DiagnosticLoggingKeys::canceledLessThan2SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::canceledLessThan5SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::canceledLessThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::canceledMoreThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::failedLessThan2SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::failedLessThan5SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::failedLessThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::failedMoreThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::occurredKey): >+ (WebCore::DiagnosticLoggingKeys::succeededLessThan2SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::succeededLessThan5SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::succeededLessThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::succeededMoreThan20SecondsKey): >+ (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey): >+ (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey): >+ (WebCore::DiagnosticLoggingKeys::unknownEntryRequestKey): >+ (WebCore::DiagnosticLoggingKeys::unlikelyToReuseKey): >+ (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey): >+ (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey): >+ (WebCore::DiagnosticLoggingKeys::unusedKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey): >+ (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey): >+ (WebCore::DiagnosticLoggingKeys::usedKey): >+ (WebCore::DiagnosticLoggingKeys::userZoomActionKey): >+ (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey): >+ (WebCore::DiagnosticLoggingKeys::videoKey): >+ (WebCore::DiagnosticLoggingKeys::visibleNonActiveStateKey): >+ (WebCore::DiagnosticLoggingKeys::visibleAndActiveStateKey): >+ (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey): >+ (WebCore::DiagnosticLoggingKeys::webViewKey): >+ (WebCore::DiagnosticLoggingKeys::yesKey): >+ (WebCore::DiagnosticLoggingKeys::expiredKey): >+ (WebCore::DiagnosticLoggingKeys::fontKey): >+ (WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey): >+ (WebCore::DiagnosticLoggingKeys::prunedDueToMaxSizeReached): >+ (WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended): >+ (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey): >+ (WebCore::WebCore::DiagnosticLoggingKeys::webGLStateKey): >+ (WebCore::DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey): >+ (WebCore::DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey): >+ (WebCore::DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey): >+ (WebCore::DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey): >+ * page/DisabledAdaptations.cpp: >+ (WebCore::watchAdaptationName): >+ * page/EventHandler.cpp: >+ (WebCore::EventHandler::handlePasteGlobalSelection): >+ (WebCore::convertDragOperationToDropZoneOperation): >+ * page/EventSource.cpp: >+ (WebCore::EventSource::EventSource): >+ * page/History.cpp: >+ (WebCore::History::stateObjectAdded): >+ * page/NavigatorBase.cpp: >+ (WebCore::NavigatorBase::appName): >+ (WebCore::NavigatorBase::appCodeName): >+ * page/Page.cpp: >+ (WebCore::Page::logNavigation): >+ * page/PageDebuggable.cpp: >+ (WebCore::PageDebuggable::url const): >+ * page/PageSerializer.cpp: >+ (WebCore::PageSerializer::serializeCSSStyleSheet): >+ * page/PerformanceMark.h: >+ * page/PerformanceMeasure.h: >+ * page/PerformanceObserver.cpp: >+ (WebCore::PerformanceObserver::observe): >+ * page/PerformanceResourceTiming.cpp: >+ (WebCore::PerformanceResourceTiming::PerformanceResourceTiming): >+ * page/PerformanceUserTiming.cpp: >+ (WebCore::restrictedMarkFunction): >+ * page/PointerLockController.cpp: >+ (WebCore::PointerLockController::requestPointerLock): >+ * page/PrintContext.cpp: >+ (WebCore::PrintContext::pageProperty): >+ * page/SecurityOrigin.cpp: >+ (WebCore::SecurityOrigin::toString const): >+ * page/SecurityOriginData.cpp: >+ (WebCore::SecurityOriginData::toString const): >+ (WebCore::SecurityOriginData::databaseIdentifier const): >+ * page/cocoa/ResourceUsageOverlayCocoa.mm: >+ (WebCore::gcTimerString): >+ * page/csp/ContentSecurityPolicy.cpp: >+ (WebCore::ContentSecurityPolicy::reportViolation const): >+ (WebCore::ContentSecurityPolicy::reportUnsupportedDirective const): >+ * page/linux/ResourceUsageOverlayLinux.cpp: >+ (WebCore::cpuUsageString): >+ (WebCore::gcTimerString): >+ * platform/ContentType.cpp: >+ (WebCore::ContentType::codecsParameter): >+ (WebCore::ContentType::profilesParameter): >+ * platform/Decimal.cpp: >+ (WebCore::Decimal::toString const): >+ * platform/MIMETypeRegistry.cpp: >+ (WebCore::initializeSupportedImageMIMETypes): >+ (WebCore::typesForCommonExtension): >+ (WebCore::initializeUnsupportedTextMIMETypes): >+ (WebCore::MIMETypeRegistry::getNormalizedMIMEType): >+ * platform/SchemeRegistry.cpp: >+ (WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme): >+ * platform/URL.cpp: >+ (WebCore::mimeTypeFromDataURL): >+ * platform/UserAgentQuirks.cpp: >+ (WebCore::UserAgentQuirks::stringForQuirk): >+ * platform/cocoa/KeyEventCocoa.mm: >+ (WebCore::keyForCharCode): >+ * platform/cocoa/NetworkExtensionContentFilter.mm: >+ (WebCore::NetworkExtensionContentFilter::unblockHandler const): >+ * platform/cocoa/ParentalControlsContentFilter.mm: >+ (WebCore::ParentalControlsContentFilter::unblockHandler const): >+ * platform/cocoa/PasteboardCocoa.mm: >+ (WebCore::Pasteboard::fileContentState): >+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm: >+ (WebCore::MacApplication::isSafari): >+ (WebCore::MacApplication::isAppleMail): >+ (WebCore::MacApplication::isIBooks): >+ (WebCore::MacApplication::isITunes): >+ (WebCore::MacApplication::isMicrosoftMessenger): >+ (WebCore::MacApplication::isAdobeInstaller): >+ (WebCore::MacApplication::isAOLInstantMessenger): >+ (WebCore::MacApplication::isMicrosoftMyDay): >+ (WebCore::MacApplication::isMicrosoftOutlook): >+ (WebCore::MacApplication::isQuickenEssentials): >+ (WebCore::MacApplication::isAperture): >+ (WebCore::MacApplication::isVersions): >+ (WebCore::MacApplication::isHRBlock): >+ (WebCore::MacApplication::isIAdProducer): >+ (WebCore::MacApplication::isSolidStateNetworksDownloader): >+ (WebCore::IOSApplication::isMobileMail): >+ (WebCore::IOSApplication::isMobileSafari): >+ (WebCore::IOSApplication::isWebBookmarksD): >+ (WebCore::IOSApplication::isDumpRenderTree): >+ (WebCore::IOSApplication::isMobileStore): >+ (WebCore::IOSApplication::isSpringBoard): >+ (WebCore::IOSApplication::isWebApp): >+ (WebCore::IOSApplication::isIBooks): >+ (WebCore::IOSApplication::isIBooksStorytime): >+ (WebCore::IOSApplication::isTheSecretSocietyHiddenMystery): >+ (WebCore::IOSApplication::isCardiogram): >+ (WebCore::IOSApplication::isNike): >+ * platform/cocoa/UserAgentCocoa.mm: >+ (WebCore::userAgentBundleVersion): >+ * platform/gamepad/cocoa/GameControllerGamepad.mm: >+ (WebCore::GameControllerGamepad::setupAsExtendedGamepad): >+ (WebCore::GameControllerGamepad::setupAsGamepad): >+ * platform/graphics/InbandTextTrackPrivateClient.h: >+ (WebCore::GenericCueData::toJSONString const): >+ * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: >+ (WebCore::CDMFactoryFairPlayStreaming::supportsKeySystem): >+ * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: >+ (WebCore::isEqual): >+ (WebCore::CDMInstanceFairPlayStreamingAVFObjC::updateLicense): >+ (WebCore::CDMInstanceFairPlayStreamingAVFObjC::keySystem const): >+ * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: >+ (WebCore::CDMSessionAVContentKeySession::generateKeyRequest): >+ * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: >+ (WebCore::CDMSessionAVStreamSession::generateKeyRequest): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::propertyIdToString): >+ * platform/graphics/ca/TileController.cpp: >+ (WebCore::TileController::tileGridContainerLayerName): >+ (WebCore::TileController::zoomedOutTileGridContainerLayerName): >+ * platform/graphics/cg/ImageBufferCG.cpp: >+ (WebCore::ImageBuffer::toDataURL const): >+ (WebCore::dataURL): >+ * platform/graphics/cv/VideoTextureCopierCV.cpp: >+ (WebCore::VideoTextureCopierCV::initializeContextObjects): >+ (WebCore::VideoTextureCopierCV::initializeUVContextObjects): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: >+ (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): >+ (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered): >+ * platform/graphics/iso/ISOVTTCue.cpp: >+ (WebCore::ISOWebVTTCue::toJSONString const): >+ * platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp: >+ (Nicosia::PaintingEngineThreaded::PaintingEngineThreaded): >+ * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: >+ (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): >+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: >+ (WebCore::GraphicsContext3D::getUnmangledInfoLog): >+ * platform/graphics/texmap/TextureMapperContextAttributes.cpp: >+ (WebCore::TextureMapperContextAttributes::get): >+ * platform/graphics/win/ImageBufferDirect2D.cpp: >+ (WebCore::ImageBuffer::toDataURL const): >+ (WebCore::ImageDataToDataURL): >+ * platform/gtk/PasteboardGtk.cpp: >+ (WebCore::Pasteboard::typesForLegacyUnsafeBindings): >+ * platform/gtk/PasteboardHelper.cpp: >+ * platform/gtk/PlatformKeyboardEventGtk.cpp: >+ (WebCore::PlatformKeyboardEvent::keyValueForGdkKeyCode): >+ (WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode): >+ * platform/image-decoders/bmp/BMPImageDecoder.h: >+ * platform/image-decoders/gif/GIFImageDecoder.h: >+ * platform/image-decoders/ico/ICOImageDecoder.h: >+ * platform/image-decoders/jpeg/JPEGImageDecoder.h: >+ * platform/image-decoders/png/PNGImageDecoder.h: >+ * platform/image-decoders/webp/WEBPImageDecoder.h: >+ * platform/ios/Device.cpp: >+ (WebCore::deviceName): >+ * platform/ios/PasteboardIOS.mm: >+ (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): >+ * platform/ios/PlatformEventFactoryIOS.mm: >+ (WebCore::keyForKeyEvent): >+ (WebCore::codeForKeyEvent): >+ * platform/ios/PlatformPasteboardIOS.mm: >+ (WebCore::safeTypeForDOMToReadAndWriteForPlatformType): >+ * platform/mac/PasteboardMac.mm: >+ (WebCore::Pasteboard::read): >+ (WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): >+ * platform/mac/PlatformEventFactoryMac.mm: >+ (WebCore::keyForKeyEvent): >+ (WebCore::codeForKeyEvent): >+ * platform/mac/PlatformPasteboardMac.mm: >+ (WebCore::safeTypeForDOMToReadAndWriteForPlatformType): >+ * platform/mediastream/MediaConstraints.cpp: >+ (WebCore::addDefaultVideoConstraints): >+ * platform/mediastream/PeerMediaDescription.h: >+ * platform/mediastream/RealtimeMediaSource.cpp: >+ (WebCore::RealtimeMediaSource::applyConstraints): >+ * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp: >+ (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): >+ * platform/mock/MockRealtimeMediaSource.cpp: >+ (WebCore::deviceMap): >+ (WebCore::MockRealtimeMediaSource::audioDevices): >+ (WebCore::MockRealtimeMediaSource::videoDevices): >+ (WebCore::MockRealtimeMediaSource::displayDevices): >+ * platform/mock/MockRealtimeVideoSource.cpp: >+ (WebCore::MockRealtimeVideoSource::drawText): >+ * platform/network/BlobRegistryImpl.cpp: >+ (WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles): >+ * platform/network/DataURLDecoder.cpp: >+ (WebCore::DataURLDecoder::parseMediaType): >+ * platform/network/FormData.cpp: >+ (WebCore::FormData::appendMultiPartFileValue): >+ * platform/network/HTTPParsers.cpp: >+ (WebCore::parseHTTPRequestLine): >+ (WebCore::parseHTTPHeader): >+ (WebCore::normalizeHTTPMethod): >+ * platform/network/ResourceRequestBase.cpp: >+ (WebCore::ResourceRequestBase::redirectedRequest const): >+ * platform/network/ResourceRequestBase.h: >+ (WebCore::ResourceRequestBase::ResourceRequestBase): >+ * platform/network/curl/ResourceHandleCurl.cpp: >+ (WebCore::ResourceHandle::handleDataURL): >+ * platform/network/curl/SynchronousLoaderClientCurl.cpp: >+ (WebCore::SynchronousLoaderClient::platformBadResponseError): >+ * platform/network/win/DownloadBundleWin.cpp: >+ (WebCore::DownloadBundle::fileExtension): >+ * platform/sql/SQLiteDatabase.cpp: >+ (WebCore::SQLiteDatabase::open): >+ (WebCore::SQLiteDatabase::setFullsync): >+ (WebCore::SQLiteDatabase::maximumSize): >+ (WebCore::SQLiteDatabase::pageSize): >+ (WebCore::SQLiteDatabase::freeSpaceSize): >+ (WebCore::SQLiteDatabase::totalSize): >+ (WebCore::SQLiteDatabase::clearAllTables): >+ (WebCore::SQLiteDatabase::runVacuumCommand): >+ (WebCore::SQLiteDatabase::runIncrementalVacuumCommand): >+ (WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum): >+ * platform/sql/SQLiteFileSystem.cpp: >+ (WebCore::SQLiteFileSystem::deleteDatabaseFile): >+ * platform/text/LocaleICU.cpp: >+ (WebCore::LocaleICU::dateFormat): >+ (WebCore::getFormatForSkeleton): >+ * platform/text/LocaleNone.cpp: >+ (WebCore::LocaleNone::dateFormat): >+ (WebCore::LocaleNone::monthFormat): >+ (WebCore::LocaleNone::shortMonthFormat): >+ (WebCore::LocaleNone::timeFormat): >+ (WebCore::LocaleNone::shortTimeFormat): >+ (WebCore::LocaleNone::dateTimeFormatWithSeconds): >+ (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): >+ * platform/text/LocaleToScriptMappingDefault.cpp: >+ (WebCore::scriptNameToCode): >+ (WebCore::localeToScriptCodeForFontSelection): >+ * platform/text/TextEncodingRegistry.cpp: >+ (WebCore::defaultTextEncodingNameForSystemLanguage): >+ * platform/win/FileSystemWin.cpp: >+ (WebCore::FileSystem::bundleName): >+ * platform/wpe/RenderThemeWPE.cpp: >+ (WebCore::RenderThemeWPE::mediaControlsStyleSheet): >+ * rendering/RenderMenuList.cpp: >+ (RenderMenuList::setText): >+ * rendering/RenderThemeIOS.mm: >+ (WebCore::RenderThemeIOS::extraDefaultStyleSheet): >+ * svg/SVGComponentTransferFunctionElement.h: >+ (WebCore::SVGPropertyTraits<ComponentTransferType>::toString): >+ * svg/SVGFEColorMatrixElement.h: >+ (WebCore::SVGPropertyTraits<ColorMatrixType>::toString): >+ * svg/SVGFECompositeElement.h: >+ (WebCore::SVGPropertyTraits<CompositeOperationType>::toString): >+ * svg/SVGFEConvolveMatrixElement.h: >+ (WebCore::SVGPropertyTraits<EdgeModeType>::toString): >+ * svg/SVGFEDisplacementMapElement.h: >+ (WebCore::SVGPropertyTraits<ChannelSelectorType>::toString): >+ * svg/SVGFEMorphologyElement.h: >+ (WebCore::SVGPropertyTraits<MorphologyOperatorType>::toString): >+ * svg/SVGFETurbulenceElement.h: >+ (WebCore::SVGPropertyTraits<SVGStitchOptions>::toString): >+ (WebCore::SVGPropertyTraits<TurbulenceType>::toString): >+ * svg/SVGGradientElement.h: >+ (WebCore::SVGPropertyTraits<SVGSpreadMethodType>::toString): >+ * svg/SVGLocatable.cpp: >+ (WebCore::SVGLocatable::getTransformToElement): >+ * svg/SVGMarkerTypes.h: >+ (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString): >+ * svg/SVGMatrixValue.h: >+ * svg/SVGSVGElement.cpp: >+ (WebCore::SVGSVGElement::SVGSVGElement): >+ (WebCore::SVGSVGElement::parseAttribute): >+ * svg/SVGTextContentElement.h: >+ (WebCore::SVGPropertyTraits<SVGLengthAdjustType>::toString): >+ * svg/SVGTextPathElement.h: >+ (WebCore::SVGPropertyTraits<SVGTextPathMethodType>::toString): >+ (WebCore::SVGPropertyTraits<SVGTextPathSpacingType>::toString): >+ * svg/SVGToOTFFontConversion.cpp: >+ (WebCore::SVGToOTFFontConverter::appendCFFTable): >+ * svg/SVGUnitTypes.h: >+ (WebCore::SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::toString): >+ * svg/SVGUseElement.cpp: >+ (WebCore::SVGUseElement::toClipPath): >+ * svg/graphics/SVGImage.cpp: >+ (WebCore::SVGImage::filenameExtension const): >+ * testing/InternalSettings.cpp: >+ (WebCore::InternalSettings::userInterfaceDirectionPolicy): >+ (WebCore::InternalSettings::systemLayoutDirection): >+ * testing/Internals.cpp: >+ (WebCore::Internals::areSVGAnimationsPaused const): >+ (WebCore::Internals::accessKeyModifiers const): >+ (WebCore::Internals::setMediaDeviceState): >+ (WebCore::Internals::audioSessionCategory const): >+ (WebCore::Internals::systemPreviewRelType): >+ * testing/MockCDMFactory.cpp: >+ (WebCore::MockCDM::sanitizeResponse const): >+ (WebCore::MockCDMInstance::updateLicense): >+ * testing/MockContentFilter.cpp: >+ (WebCore::MockContentFilter::unblockRequestDeniedScript const): >+ * testing/MockCredentialsMessenger.cpp: >+ (WebCore::MockCredentialsMessenger::~MockCredentialsMessenger): >+ (WebCore::MockCredentialsMessenger::makeCredential): >+ (WebCore::MockCredentialsMessenger::getAssertion): >+ * testing/MockPaymentCoordinator.cpp: >+ (WebCore::MockPaymentCoordinator::showPaymentUI): >+ * workers/WorkerRunLoop.cpp: >+ (WebCore::WorkerRunLoop::debuggerMode): >+ * workers/WorkerScriptLoader.cpp: >+ (WebCore::WorkerScriptLoader::loadSynchronously): >+ (WebCore::WorkerScriptLoader::createResourceRequest): >+ (WebCore::WorkerScriptLoader::didReceiveData): >+ * workers/service/ExtendableEvent.cpp: >+ (WebCore::ExtendableEvent::waitUntil): >+ * workers/service/FetchEvent.cpp: >+ (WebCore::FetchEvent::~FetchEvent): >+ (WebCore::FetchEvent::respondWith): >+ (WebCore::FetchEvent::promiseIsSettled): >+ * workers/service/SWClientConnection.cpp: >+ (WebCore::SWClientConnection::clearPendingJobs): >+ * workers/service/ServiceWorker.cpp: >+ (WebCore::ServiceWorker::postMessage): >+ * workers/service/ServiceWorkerClients.cpp: >+ (WebCore::ServiceWorkerClients::openWindow): >+ (WebCore::ServiceWorkerClients::claim): >+ * workers/service/ServiceWorkerContainer.cpp: >+ (WebCore::ServiceWorkerContainer::addRegistration): >+ (WebCore::ServiceWorkerContainer::getRegistration): >+ (WebCore::ServiceWorkerContainer::startScriptFetchForJob): >+ * workers/service/ServiceWorkerJob.cpp: >+ (WebCore::ServiceWorkerJob::fetchScriptWithContext): >+ (WebCore::ServiceWorkerJob::didReceiveResponse): >+ * workers/service/ServiceWorkerRegistration.cpp: >+ (WebCore::ServiceWorkerRegistration::update): >+ * workers/service/ServiceWorkerWindowClient.cpp: >+ (WebCore::ServiceWorkerWindowClient::focus): >+ (WebCore::ServiceWorkerWindowClient::navigate): >+ * workers/service/context/ServiceWorkerDebuggable.h: >+ * workers/service/context/ServiceWorkerFetch.cpp: >+ (WebCore::ServiceWorkerFetch::dispatchFetchEvent): >+ * workers/service/server/RegistrationDatabase.cpp: >+ (WebCore::RegistrationDatabase::doPushChanges): >+ (WebCore::RegistrationDatabase::importRecords): >+ * workers/service/server/SWServerJobQueue.cpp: >+ (WebCore::SWServerJobQueue::runRegisterJob): >+ (WebCore::SWServerJobQueue::runUnregisterJob): >+ (WebCore::SWServerJobQueue::runUpdateJob): >+ * xml/XMLErrors.cpp: >+ (WebCore::createXHTMLParserErrorHeader): >+ (WebCore::XMLErrors::insertErrorMessageBlock): >+ * xml/XMLHttpRequest.cpp: >+ (WebCore::XMLHttpRequest::send): >+ (WebCore::XMLHttpRequest::responseMIMEType const): >+ * xml/XMLTreeViewer.cpp: >+ (WebCore::XMLTreeViewer::transformDocumentToTreeView): >+ * xml/XPathPredicate.cpp: >+ (WebCore::XPath::evaluatePredicate): >+ * xml/XPathValue.cpp: >+ (WebCore::XPath::Value::toString const): >+ * xml/parser/CharacterReferenceParserInlines.h: >+ (WebCore::consumeCharacterReference): >+ > 2018-06-22 Miguel Gomez <magomez@igalia.com> > > [WPE][ThreadedRendering] WPE crashes rendering some pieces of text when using ThreadedRendering >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 84b85a8e978d02afdd67ceb931662895a2a57363..910a985050aa262100208e677da01698e2d29d73 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,13 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pal/unix/LoggingUnix.cpp: >+ (PAL::logLevelString): >+ > 2018-06-21 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed attempt to fix the build after r233052. >diff --git a/Source/WebDriver/ChangeLog b/Source/WebDriver/ChangeLog >index 3fb27dc398be12f358203f0d58485b54574d2880..ffa30895b8289a391e3515ab59525f0d266bec10 100644 >--- a/Source/WebDriver/ChangeLog >+++ b/Source/WebDriver/ChangeLog >@@ -1,3 +1,115 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * CommandResult.cpp: >+ (WebDriver::CommandResult::errorString const): >+ * Session.cpp: >+ (WebDriver::Session::webElementIdentifier): >+ (WebDriver::Session::getTimeouts): >+ (WebDriver::Session::createTopLevelBrowsingContext): >+ (WebDriver::Session::handleUserPrompts): >+ (WebDriver::Session::reportUnexpectedAlertOpen): >+ (WebDriver::Session::go): >+ (WebDriver::Session::getCurrentURL): >+ (WebDriver::Session::back): >+ (WebDriver::Session::forward): >+ (WebDriver::Session::refresh): >+ (WebDriver::Session::getTitle): >+ (WebDriver::Session::getWindowHandle): >+ (WebDriver::Session::closeTopLevelBrowsingContext): >+ (WebDriver::Session::switchToWindow): >+ (WebDriver::Session::getWindowHandles): >+ (WebDriver::Session::switchToFrame): >+ (WebDriver::Session::switchToParentFrame): >+ (WebDriver::Session::getToplevelBrowsingContextRect): >+ (WebDriver::Session::setWindowRect): >+ (WebDriver::Session::maximizeWindow): >+ (WebDriver::Session::minimizeWindow): >+ (WebDriver::Session::fullscreenWindow): >+ (WebDriver::Session::computeElementLayout): >+ (WebDriver::Session::findElements): >+ (WebDriver::Session::getActiveElement): >+ (WebDriver::Session::isElementSelected): >+ (WebDriver::Session::getElementText): >+ (WebDriver::Session::getElementTagName): >+ (WebDriver::Session::getElementRect): >+ (WebDriver::Session::isElementEnabled): >+ (WebDriver::Session::isElementDisplayed): >+ (WebDriver::Session::getElementAttribute): >+ (WebDriver::Session::getElementProperty): >+ (WebDriver::Session::getElementCSSValue): >+ (WebDriver::Session::waitForNavigationToComplete): >+ (WebDriver::Session::selectOptionElement): >+ (WebDriver::Session::elementClear): >+ (WebDriver::Session::virtualKeyForKeySequence): >+ (WebDriver::Session::elementSendKeys): >+ (WebDriver::Session::executeScript): >+ (WebDriver::mouseButtonForAutomation): >+ (WebDriver::Session::performMouseInteraction): >+ (WebDriver::Session::performKeyboardInteractions): >+ (WebDriver::parseAutomationCookie): >+ (WebDriver::builtAutomationCookie): >+ (WebDriver::serializeCookie): >+ (WebDriver::Session::getAllCookies): >+ (WebDriver::Session::getNamedCookie): >+ (WebDriver::Session::addCookie): >+ (WebDriver::Session::deleteCookie): >+ (WebDriver::Session::deleteAllCookies): >+ (WebDriver::Session::performActions): >+ (WebDriver::Session::releaseActions): >+ (WebDriver::Session::dismissAlert): >+ (WebDriver::Session::acceptAlert): >+ (WebDriver::Session::getAlertText): >+ (WebDriver::Session::sendAlertText): >+ (WebDriver::Session::takeScreenshot): >+ * SessionHost.cpp: >+ (WebDriver::SessionHost::dispatchMessage): >+ * WebDriverService.cpp: >+ (WebDriver::WebDriverService::sendResponse const): >+ (WebDriver::WebDriverService::parseCapabilities const): >+ (WebDriver::WebDriverService::findSessionOrCompleteWithError): >+ (WebDriver::WebDriverService::matchCapabilities const): >+ (WebDriver::WebDriverService::processCapabilities const): >+ (WebDriver::WebDriverService::createSession): >+ (WebDriver::WebDriverService::deleteSession): >+ (WebDriver::WebDriverService::status): >+ (WebDriver::WebDriverService::go): >+ (WebDriver::WebDriverService::setWindowRect): >+ (WebDriver::WebDriverService::switchToWindow): >+ (WebDriver::WebDriverService::switchToFrame): >+ (WebDriver::findElementOrCompleteWithError): >+ (WebDriver::findStrategyAndSelectorOrCompleteWithError): >+ (WebDriver::WebDriverService::getElementAttribute): >+ (WebDriver::WebDriverService::getElementProperty): >+ (WebDriver::WebDriverService::getElementCSSValue): >+ (WebDriver::WebDriverService::elementSendKeys): >+ (WebDriver::findScriptAndArgumentsOrCompleteWithError): >+ (WebDriver::WebDriverService::getNamedCookie): >+ (WebDriver::deserializeCookie): >+ (WebDriver::WebDriverService::addCookie): >+ (WebDriver::WebDriverService::deleteCookie): >+ (WebDriver::processPauseAction): >+ (WebDriver::processNullAction): >+ (WebDriver::processKeyAction): >+ (WebDriver::processPointerAction): >+ (WebDriver::processPointerParameters): >+ (WebDriver::processInputActionSequence): >+ (WebDriver::WebDriverService::performActions): >+ (WebDriver::WebDriverService::sendAlertText): >+ (WebDriver::WebDriverService::takeElementScreenshot): >+ * glib/SessionHostGlib.cpp: >+ (WebDriver::SessionHost::sendMessageToBackend): >+ * gtk/WebDriverServiceGtk.cpp: >+ (WebDriver::WebDriverService::platformValidateCapability const): >+ (WebDriver::WebDriverService::platformParseCapabilities const): >+ * wpe/WebDriverServiceWPE.cpp: >+ (WebDriver::WebDriverService::platformValidateCapability const): >+ (WebDriver::WebDriverService::platformParseCapabilities const): >+ > 2018-06-21 Zan Dobersek <zdobersek@igalia.com> > > [GTK] WebDriver: allow applying host-specific TLS certificates for automated sessions >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 02a8eef5f3c7331e09e0e2fc07ff98b021be720c..6809d2688e286de8b101287cabee6da7eb582356 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,173 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/NetworkCORSPreflightChecker.cpp: >+ (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection): >+ (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge): >+ (WebKit::NetworkCORSPreflightChecker::wasBlocked): >+ (WebKit::NetworkCORSPreflightChecker::cannotShowURL): >+ * NetworkProcess/NetworkDataTaskBlob.cpp: >+ (WebKit::NetworkDataTaskBlob::suggestedFilename const): >+ * NetworkProcess/NetworkLoadChecker.cpp: >+ (WebKit::NetworkLoadChecker::checkRedirection): >+ (WebKit::NetworkLoadChecker::checkRequest): >+ * NetworkProcess/NetworkResourceLoader.cpp: >+ (WebKit::NetworkResourceLoader::continueWillSendRequest): >+ * NetworkProcess/PingLoad.cpp: >+ (WebKit::PingLoad::willPerformHTTPRedirection): >+ (WebKit::PingLoad::didReceiveChallenge): >+ (WebKit::PingLoad::timeoutTimerFired): >+ * NetworkProcess/PreconnectTask.cpp: >+ (WebKit::PreconnectTask::PreconnectTask): >+ * NetworkProcess/cache/CacheStorageEngine.cpp: >+ (WebKit::CacheStorage::Engine::initialize): >+ * NetworkProcess/cache/CacheStorageEngineCache.cpp: >+ (WebKit::CacheStorage::Cache::toRecordInformation): >+ * NetworkProcess/cache/CacheStorageEngineCaches.cpp: >+ (WebKit::CacheStorage::cachesListFilename): >+ (WebKit::CacheStorage::cachesOriginFilename): >+ * NetworkProcess/cache/NetworkCacheStatistics.cpp: >+ (WebKit::NetworkCache::Statistics::initialize): >+ (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache): >+ (WebKit::NetworkCache::Statistics::queryWasEverRequested): >+ (WebKit::NetworkCache::Statistics::clear): >+ (WebKit::NetworkCache::Statistics::addHashesToDatabase): >+ (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase): >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: >+ (WebKit::XPCServiceInitializer): >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: >+ (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData): >+ * Shared/Plugins/Netscape/PluginInformation.cpp: >+ (WebKit::pluginInformationBundleIdentifierKey): >+ (WebKit::pluginInformationBundleVersionKey): >+ (WebKit::pluginInformationBundleShortVersionKey): >+ (WebKit::pluginInformationPathKey): >+ (WebKit::pluginInformationDisplayNameKey): >+ (WebKit::pluginInformationDefaultLoadPolicyKey): >+ (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey): >+ (WebKit::pluginInformationHasSandboxProfileKey): >+ (WebKit::pluginInformationFrameURLKey): >+ (WebKit::pluginInformationMIMETypeKey): >+ (WebKit::pluginInformationPageURLKey): >+ (WebKit::pluginInformationPluginspageAttributeURLKey): >+ (WebKit::pluginInformationPluginURLKey): >+ (WebKit::plugInInformationReplacementObscuredKey): >+ * Shared/ios/WebIOSEventFactory.mm: >+ (WebIOSEventFactory::createWebKeyboardEvent): >+ * Shared/linux/WebMemorySamplerLinux.cpp: >+ (WebKit::WebMemorySampler::sampleWebKit const): >+ * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: >+ (debuggableTypeString): >+ * UIProcess/API/glib/WebKitWebContext.cpp: >+ (webkit_web_context_set_preferred_languages): >+ * UIProcess/Automation/WebAutomationSession.cpp: >+ (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): >+ (WebKit::WebAutomationSession::addSingleCookie): >+ (WebKit::WebAutomationSession::setSessionPermissions): >+ (WebKit::WebAutomationSession::performMouseInteraction): >+ (WebKit::WebAutomationSession::performKeyboardInteractions): >+ (WebKit::WebAutomationSession::performInteractionSequence): >+ * UIProcess/Automation/WebAutomationSession.h: >+ * UIProcess/ChildProcessProxy.cpp: >+ (WebKit::ChildProcessProxy::getLaunchOptions): >+ * UIProcess/Cocoa/DownloadClient.mm: >+ (WebKit::DownloadClient::didStart): >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::selectorExceptionMap): >+ * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: >+ (WebKit::WebCredentialsMessengerProxy::makeCredential): >+ (WebKit::WebCredentialsMessengerProxy::getAssertion): >+ * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: >+ (WebKit::PluginInfoStore::pluginsDirectories): >+ * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp: >+ (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): >+ * UIProcess/ServiceWorkerProcessProxy.cpp: >+ (WebKit::ServiceWorkerProcessProxy::getLaunchOptions): >+ (WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge): >+ * UIProcess/UserMediaProcessManager.cpp: >+ (WebKit::UserMediaProcessManager::willCreateMediaStream): >+ (WebKit::UserMediaProcessManager::endedCaptureSession): >+ * UIProcess/WebBackForwardList.cpp: >+ (WebKit::WebBackForwardList::goToItem): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::loadFile): >+ (WebKit::WebPageProxy::loadHTMLString): >+ (WebKit::WebPageProxy::loadPlainTextString): >+ (WebKit::WebPageProxy::loadWebArchiveData): >+ (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder): >+ * UIProcess/WebProcessProxy.cpp: >+ (WebKit::WebProcessProxy::getLaunchOptions): >+ * UIProcess/WebResourceLoadStatisticsStore.cpp: >+ (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): >+ * UIProcess/WebResourceLoadStatisticsTelemetry.cpp: >+ (WebKit::notifyPages): >+ (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit): >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView copyForWebView:]): >+ (-[WKContentView cutForWebView:]): >+ (-[WKContentView pasteForWebView:]): >+ (-[WKContentView selectAllForWebView:]): >+ (-[WKContentView deleteBackward]): >+ (-[WKContentView _interpretKeyEvent:isCharEvent:]): >+ * UIProcess/ios/WKLegacyPDFView.mm: >+ (-[WKLegacyPDFView _URLForLinkAnnotation:]): >+ * WebProcess/Automation/WebAutomationSessionProxy.cpp: >+ (WebKit::WebAutomationSessionProxy::elementForNodeHandle): >+ (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): >+ (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): >+ * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: >+ (WebKit::WebIDBConnectionToServer::connectionToServerLost): >+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: >+ (webkit_dom_document_get_ready_state): >+ * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: >+ (WebKit::uniqueWorldName): >+ * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: >+ (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): >+ * WebProcess/Plugins/PDF/PDFPlugin.mm: >+ (WebKit::PDFPlugin::pluginInfo): >+ * WebProcess/Storage/ServiceWorkerClientFetch.cpp: >+ (WebKit::ServiceWorkerClientFetch::validateResponse): >+ (WebKit::ServiceWorkerClientFetch::didReceiveResponse): >+ * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: >+ (WebKit::WebContextMenuClient::searchWithGoogle): >+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp: >+ (WebKit::WebInspectorClient::showPaintRect): >+ * WebProcess/WebPage/RemoteWebInspectorUI.cpp: >+ (WebKit::RemoteWebInspectorUI::initialize): >+ (WebKit::RemoteWebInspectorUI::didSave): >+ (WebKit::RemoteWebInspectorUI::didAppend): >+ (WebKit::RemoteWebInspectorUI::frontendLoaded): >+ * WebProcess/WebPage/WebInspector.cpp: >+ (WebKit::WebInspector::openInNewTab): >+ * WebProcess/WebPage/WebInspectorUI.cpp: >+ (WebKit::WebInspectorUI::setDockSide): >+ (WebKit::WebInspectorUI::setDockingUnavailable): >+ (WebKit::WebInspectorUI::setIsVisible): >+ (WebKit::WebInspectorUI::showConsole): >+ (WebKit::WebInspectorUI::showResources): >+ (WebKit::WebInspectorUI::showTimelines): >+ (WebKit::WebInspectorUI::showMainResourceForFrame): >+ (WebKit::WebInspectorUI::startPageProfiling): >+ (WebKit::WebInspectorUI::stopPageProfiling): >+ (WebKit::WebInspectorUI::startElementSelection): >+ (WebKit::WebInspectorUI::stopElementSelection): >+ (WebKit::WebInspectorUI::didSave): >+ (WebKit::WebInspectorUI::didAppend): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::loadStringImpl): >+ (WebKit::WebPage::loadAlternateHTMLString): >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::computeAutocorrectionContext): >+ * WebProcess/WebProcess.cpp: >+ (WebKit::getWebCoreMemoryCacheStatistics): >+ (WebKit::WebProcess::getWebCoreStatistics): >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::initializeProcessName): >+ > 2018-06-21 Chris Dumez <cdumez@apple.com> > > Unreviewed, rolling out r232995. >diff --git a/Source/WebKitLegacy/ChangeLog b/Source/WebKitLegacy/ChangeLog >index 58724819fe2b3cf348fbdc08c0f1ff121e6b8219..0a64477afe4f1f05049653dcf7bd735257bf701b 100644 >--- a/Source/WebKitLegacy/ChangeLog >+++ b/Source/WebKitLegacy/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Storage/StorageTracker.cpp: >+ (WebKit::StorageTracker::syncFileSystemAndTrackerDatabase): >+ * WebCoreSupport/PingHandle.h: >+ > 2018-06-09 Dan Bernstein <mitz@apple.com> > > Added missing file references to the Configuration group. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index bf9618b5d4c142cbf585982f3d94c944d2f18554..8344e32123df50447fc6108a9550898c3298d511 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Plugins/Hosted/ProxyInstance.mm: >+ (WebKit::ProxyInstance::invokeMethod): >+ * Storage/WebDatabaseProvider.mm: >+ (WebDatabaseProvider::indexedDatabaseDirectoryPath): >+ > 2018-06-12 Darin Adler <darin@apple.com> > > [Cocoa] Make some RetainPtr refinements to get more ready for ARC >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index 7de836b58684167bc34e59918cca0e93d9b7f63e..da332618846e7c90e3a01fd2bf968e0c4de097bc 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Plugins/PluginStream.cpp: >+ (WebCore::PluginStream::startStream): >+ * WebCoreSupport/WebContextMenuClient.cpp: >+ (WebContextMenuClient::searchWithGoogle): >+ > 2018-06-14 Basuke Suzuki <Basuke.Suzuki@sony.com> > > [Win] Fix build break after r232815 (SupportedPluginIdentifier) >diff --git a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h >index f933a99e7b939c6cd1b5d9e2b004583b513a5539..4a059027c7c42c9841e00d598f302e2087ae890d 100644 >--- a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h >+++ b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h >@@ -662,7 +662,7 @@ EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, E > } > } > >- return JSValue::encode(throwException(exec, scope, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback.")))); >+ return JSValue::encode(throwException(exec, scope, createReferenceError(exec, "Static function property defined with NULL callAsFunction callback."_s))); > } > > template <class Parent> >@@ -697,7 +697,7 @@ EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, Encoded > } > } > >- return JSValue::encode(throwException(exec, scope, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist.")))); >+ return JSValue::encode(throwException(exec, scope, createReferenceError(exec, "hasProperty callback returned true for a property that doesn't exist."_s))); > } > > } // namespace JSC >diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp >index d80a070b7ab698fb48a710de5a763395bb49b207..e2a4e2a88a1afd99966dddc73f99d00dd06a7f2c 100644 >--- a/Source/JavaScriptCore/API/JSObjectRef.cpp >+++ b/Source/JavaScriptCore/API/JSObjectRef.cpp >@@ -111,7 +111,7 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, > ExecState* exec = toJS(ctx); > VM& vm = exec->vm(); > JSLockHolder locker(vm); >- return toRef(JSCallbackFunction::create(vm, exec->lexicalGlobalObject(), callAsFunction, name ? name->string() : ASCIILiteral("anonymous"))); >+ return toRef(JSCallbackFunction::create(vm, exec->lexicalGlobalObject(), callAsFunction, name ? name->string() : "anonymous"_s)); > } > > JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor) >diff --git a/Source/JavaScriptCore/API/JSTypedArray.cpp b/Source/JavaScriptCore/API/JSTypedArray.cpp >index 45c47abc8c164bf59be8a9a104efeeaf751a4bc6..4adc769e6e6a69018490042a332110cecad8f3a8 100644 >--- a/Source/JavaScriptCore/API/JSTypedArray.cpp >+++ b/Source/JavaScriptCore/API/JSTypedArray.cpp >@@ -335,7 +335,7 @@ void* JSObjectGetArrayBufferBytesPtr(JSContextRef ctx, JSObjectRef objectRef, JS > if (JSArrayBuffer* jsBuffer = jsDynamicCast<JSArrayBuffer*>(vm, object)) { > ArrayBuffer* buffer = jsBuffer->impl(); > if (buffer->isWasmMemory()) { >- setException(exec, exception, createTypeError(exec, ASCIILiteral("Cannot get the backing buffer for a WebAssembly.Memory"))); >+ setException(exec, exception, createTypeError(exec, "Cannot get the backing buffer for a WebAssembly.Memory"_s)); > return nullptr; > } > >diff --git a/Source/JavaScriptCore/API/JSValue.mm b/Source/JavaScriptCore/API/JSValue.mm >index c8f497a0c14b048a114d2e740ceb199b633c3abc..5c3c05689d46a7514586efad288ab4e7c3215566 100644 >--- a/Source/JavaScriptCore/API/JSValue.mm >+++ b/Source/JavaScriptCore/API/JSValue.mm >@@ -826,7 +826,7 @@ id valueToArray(JSGlobalContextRef context, JSValueRef value, JSValueRef* except > > JSC::JSLockHolder locker(toJS(context)); > if (!(JSValueIsNull(context, value) || JSValueIsUndefined(context, value))) { >- JSC::JSObject* exceptionObject = JSC::createTypeError(toJS(context), ASCIILiteral("Cannot convert primitive to NSArray")); >+ JSC::JSObject* exceptionObject = JSC::createTypeError(toJS(context), "Cannot convert primitive to NSArray"_s); > *exception = toRef(exceptionObject); > #if ENABLE(REMOTE_INSPECTOR) > reportExceptionToInspector(context, exceptionObject); >@@ -848,7 +848,7 @@ id valueToDictionary(JSGlobalContextRef context, JSValueRef value, JSValueRef* e > > JSC::JSLockHolder locker(toJS(context)); > if (!(JSValueIsNull(context, value) || JSValueIsUndefined(context, value))) { >- JSC::JSObject* exceptionObject = JSC::createTypeError(toJS(context), ASCIILiteral("Cannot convert primitive to NSDictionary")); >+ JSC::JSObject* exceptionObject = JSC::createTypeError(toJS(context), "Cannot convert primitive to NSDictionary"_s); > *exception = toRef(exceptionObject); > #if ENABLE(REMOTE_INSPECTOR) > reportExceptionToInspector(context, exceptionObject); >diff --git a/Source/JavaScriptCore/API/ObjCCallbackFunction.mm b/Source/JavaScriptCore/API/ObjCCallbackFunction.mm >index a88a2705d7318274fe17988a39d0dec62bf23ab0..8886fe039fd9b455c34b359c1ee7d14acd84648e 100644 >--- a/Source/JavaScriptCore/API/ObjCCallbackFunction.mm >+++ b/Source/JavaScriptCore/API/ObjCCallbackFunction.mm >@@ -121,7 +121,7 @@ private: > return; > } > >- *exception = toRef(JSC::createTypeError(toJS(contextRef), ASCIILiteral("Argument does not match Objective-C Class"))); >+ *exception = toRef(JSC::createTypeError(toJS(contextRef), "Argument does not match Objective-C Class"_s)); > } > > RetainPtr<Class> m_class; >@@ -458,7 +458,7 @@ static JSValueRef objCCallbackFunctionCallAsFunction(JSContextRef callerContext, > > if (impl->type() == CallbackInitMethod) { > JSGlobalContextRef contextRef = [context JSGlobalContextRef]; >- *exception = toRef(JSC::createTypeError(toJS(contextRef), ASCIILiteral("Cannot call a class constructor without |new|"))); >+ *exception = toRef(JSC::createTypeError(toJS(contextRef), "Cannot call a class constructor without |new|"_s)); > return JSValueMakeUndefined(contextRef); > } > >@@ -497,7 +497,7 @@ static JSObjectRef objCCallbackFunctionCallAsConstructor(JSContextRef callerCont > return nullptr; > > if (!JSValueIsObject(contextRef, result)) { >- *exception = toRef(JSC::createTypeError(toJS(contextRef), ASCIILiteral("Objective-C blocks called as constructors must return an object."))); >+ *exception = toRef(JSC::createTypeError(toJS(contextRef), "Objective-C blocks called as constructors must return an object."_s)); > return nullptr; > } > return const_cast<JSObjectRef>(result); >@@ -548,7 +548,7 @@ JSValueRef ObjCCallbackFunctionImpl::call(JSContext *context, JSObjectRef thisOb > RELEASE_ASSERT(!thisObject); > target = [m_instanceClass alloc]; > if (!target || ![target isKindOfClass:m_instanceClass.get()]) { >- *exception = toRef(JSC::createTypeError(toJS(contextRef), ASCIILiteral("self type check failed for Objective-C instance method"))); >+ *exception = toRef(JSC::createTypeError(toJS(contextRef), "self type check failed for Objective-C instance method"_s)); > return JSValueMakeUndefined(contextRef); > } > [m_invocation setTarget:target]; >@@ -558,7 +558,7 @@ JSValueRef ObjCCallbackFunctionImpl::call(JSContext *context, JSObjectRef thisOb > case CallbackInstanceMethod: { > target = tryUnwrapObjcObject(contextRef, thisObject); > if (!target || ![target isKindOfClass:m_instanceClass.get()]) { >- *exception = toRef(JSC::createTypeError(toJS(contextRef), ASCIILiteral("self type check failed for Objective-C instance method"))); >+ *exception = toRef(JSC::createTypeError(toJS(contextRef), "self type check failed for Objective-C instance method"_s)); > return JSValueMakeUndefined(contextRef); > } > [m_invocation setTarget:target]; >diff --git a/Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp b/Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp >index 0971c891755c256158211b24dc2221e1dd1533ac..343d8d96d4d0142c619f58c36f8d4a75409b7f88 100644 >--- a/Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp >+++ b/Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp >@@ -83,7 +83,7 @@ JSValueRef JSCCallbackFunction::call(JSContextRef callerContext, JSObjectRef thi > auto* jsContext = jscContextGetJSContext(context.get()); > > if (m_type == Type::Constructor) { >- *exception = toRef(JSC::createTypeError(toJS(jsContext), ASCIILiteral("cannot call a class constructor without |new|"))); >+ *exception = toRef(JSC::createTypeError(toJS(jsContext), "cannot call a class constructor without |new|"_s)); > return JSValueMakeUndefined(jsContext); > } > >@@ -91,7 +91,7 @@ JSValueRef JSCCallbackFunction::call(JSContextRef callerContext, JSObjectRef thi > if (m_type == Type::Method) { > instance = jscContextWrappedObject(context.get(), thisObject); > if (!instance) { >- *exception = toRef(JSC::createTypeError(toJS(jsContext), ASCIILiteral("invalid instance type in method"))); >+ *exception = toRef(JSC::createTypeError(toJS(jsContext), "invalid instance type in method"_s)); > return JSValueMakeUndefined(jsContext); > } > } >@@ -146,7 +146,7 @@ JSObjectRef JSCCallbackFunction::construct(JSContextRef callerContext, size_t ar > auto* jsContext = jscContextGetJSContext(context.get()); > > if (m_returnType == G_TYPE_NONE) { >- *exception = toRef(JSC::createTypeError(toJS(jsContext), ASCIILiteral("constructors cannot be void"))); >+ *exception = toRef(JSC::createTypeError(toJS(jsContext), "constructors cannot be void"_s)); > return nullptr; > } > >@@ -194,7 +194,7 @@ JSObjectRef JSCCallbackFunction::construct(JSContextRef callerContext, size_t ar > g_value_unset(&returnValue); > return toRef(retval); > } >- *exception = toRef(JSC::createTypeError(toJS(jsContext), ASCIILiteral("constructor returned null"))); >+ *exception = toRef(JSC::createTypeError(toJS(jsContext), "constructor returned null"_s)); > break; > default: > *exception = toRef(JSC::createTypeError(toJS(jsContext), makeString("invalid type ", g_type_name(G_VALUE_TYPE(&returnValue)), " returned by constructor"))); >diff --git a/Source/JavaScriptCore/API/glib/JSCContext.cpp b/Source/JavaScriptCore/API/glib/JSCContext.cpp >index 2966c0f50a47313acfd77a86cf1b6672f10ea9f7..296fbdd0bfbd90e32b7a52fda3bf9ec51beefb42 100644 >--- a/Source/JavaScriptCore/API/glib/JSCContext.cpp >+++ b/Source/JavaScriptCore/API/glib/JSCContext.cpp >@@ -463,7 +463,7 @@ void jscContextJSValueToGValue(JSCContext* context, JSValueRef jsValue, GType ty > return; > } > >- *exception = toRef(JSC::createTypeError(toJS(priv->jsContext.get()), ASCIILiteral("invalid pointer type"))); >+ *exception = toRef(JSC::createTypeError(toJS(priv->jsContext.get()), "invalid pointer type"_s)); > return; > } > } >@@ -474,7 +474,7 @@ void jscContextJSValueToGValue(JSCContext* context, JSValueRef jsValue, GType ty > else if (G_IS_OBJECT(wrappedObject)) > g_value_set_object(value, wrappedObject); > else >- *exception = toRef(JSC::createTypeError(toJS(priv->jsContext.get()), ASCIILiteral("wrapped object is not a GObject"))); >+ *exception = toRef(JSC::createTypeError(toJS(priv->jsContext.get()), "wrapped object is not a GObject"_s)); > break; > } > case G_TYPE_LONG: >diff --git a/Source/JavaScriptCore/API/glib/JSCValue.cpp b/Source/JavaScriptCore/API/glib/JSCValue.cpp >index 4ba9d3e8b86c3f4c4c02c7a71cc36a9cda2b1d2d..fb6e109b98f112406389cbde88b6a68939e5fc70 100644 >--- a/Source/JavaScriptCore/API/glib/JSCValue.cpp >+++ b/Source/JavaScriptCore/API/glib/JSCValue.cpp >@@ -1063,14 +1063,14 @@ void jsc_value_object_define_property_accessor(JSCValue* value, const char* prop > JSC::JSLockHolder locker(vm); > if (getter) { > GRefPtr<GClosure> closure = adoptGRef(g_cclosure_new(getter, userData, reinterpret_cast<GClosureNotify>(reinterpret_cast<GCallback>(destroyNotify)))); >- auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), ASCIILiteral("get"), >+ auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), "get"_s, > JSC::JSCCallbackFunction::Type::Method, nullptr, WTFMove(closure), propertyType, { })); > GRefPtr<JSCValue> function = jscContextGetOrCreateValue(priv->context.get(), functionObject); > jsc_value_object_set_property(descriptor.get(), "get", function.get()); > } > if (setter) { > GRefPtr<GClosure> closure = adoptGRef(g_cclosure_new(setter, userData, getter ? nullptr : reinterpret_cast<GClosureNotify>(reinterpret_cast<GCallback>(destroyNotify)))); >- auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), ASCIILiteral("set"), >+ auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), "set"_s, > JSC::JSCCallbackFunction::Type::Method, nullptr, WTFMove(closure), G_TYPE_NONE, { propertyType })); > GRefPtr<JSCValue> function = jscContextGetOrCreateValue(priv->context.get(), functionObject); > jsc_value_object_set_property(descriptor.get(), "set", function.get()); >@@ -1086,7 +1086,7 @@ static GRefPtr<JSCValue> jscValueFunctionCreate(JSCContext* context, const char* > JSC::ExecState* exec = toJS(jscContextGetJSContext(context)); > JSC::VM& vm = exec->vm(); > JSC::JSLockHolder locker(vm); >- auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), name ? String::fromUTF8(name) : ASCIILiteral("anonymous"), >+ auto* functionObject = toRef(JSC::JSCCallbackFunction::create(vm, exec->lexicalGlobalObject(), name ? String::fromUTF8(name) : "anonymous"_s, > JSC::JSCCallbackFunction::Type::Function, nullptr, WTFMove(closure), returnType, WTFMove(parameters))); > return jscContextGetOrCreateValue(context, functionObject); > } >diff --git a/Source/JavaScriptCore/builtins/BuiltinUtils.h b/Source/JavaScriptCore/builtins/BuiltinUtils.h >index b21ce7e06802d964d771cd906b2cf45ac8a40708..941e529ff1fa8c39c278a320c98b99ac5a98c2f4 100644 >--- a/Source/JavaScriptCore/builtins/BuiltinUtils.h >+++ b/Source/JavaScriptCore/builtins/BuiltinUtils.h >@@ -30,7 +30,7 @@ > > namespace JSC { > >-#define INITIALIZE_BUILTIN_NAMES(name) , m_##name(JSC::Identifier::fromString(vm, #name)), m_##name##PrivateName(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, ASCIILiteral("PrivateSymbol." #name)))) >+#define INITIALIZE_BUILTIN_NAMES(name) , m_##name(JSC::Identifier::fromString(vm, #name)), m_##name##PrivateName(JSC::Identifier::fromUid(JSC::PrivateName(JSC::PrivateName::PrivateSymbol, "PrivateSymbol." #name ""_s))) > #define DECLARE_BUILTIN_NAMES(name) const JSC::Identifier m_##name; const JSC::Identifier m_##name##PrivateName; > #define DECLARE_BUILTIN_IDENTIFIER_ACCESSOR(name) \ > const JSC::Identifier& name##PublicName() const { return m_##name; } \ >diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp >index 98ef06f47a33611351c74cba411ac2f31b864a8f..cdfd3ec9db16fc028044544cfdf7768ebe0fa1ae 100644 >--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp >+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp >@@ -2794,7 +2794,7 @@ String CodeBlock::nameForRegister(VirtualRegister virtualRegister) > } > } > if (virtualRegister == thisRegister()) >- return ASCIILiteral("this"); >+ return "this"_s; > if (virtualRegister.isArgument()) > return String::format("arguments[%3d]", virtualRegister.toArgument()); > >diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp >index eb7da976afb118bc086c842fd6833bc4b484550d..55f5ea10bbddd8e5410140bcaf712fcb6b450e73 100644 >--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp >+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp >@@ -4370,7 +4370,7 @@ void BytecodeGenerator::emitEnumeration(ThrowableExpressionData* node, Expressio > emitAwait(value.get()); > > emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), finallyDone.get()); >- emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); >+ emitThrowTypeError("Iterator result interface is not an object."_s); > > emitLabel(finallyDone.get()); > emitFinallyCompletion(*finallyContext, completionTypeRegister(), endCatchLabel.get()); >@@ -4588,7 +4588,7 @@ RegisterID* BytecodeGenerator::emitIteratorNext(RegisterID* dst, RegisterID* nex > { > Ref<Label> typeIsObject = newLabel(); > emitJumpIfTrue(emitIsObject(newTemporary(), dst), typeIsObject.get()); >- emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); >+ emitThrowTypeError("Iterator result interface is not an object."_s); > emitLabel(typeIsObject.get()); > } > return dst; >@@ -4621,7 +4621,7 @@ void BytecodeGenerator::emitIteratorClose(RegisterID* iterator, const ThrowableE > emitAwait(value.get()); > > emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), done.get()); >- emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); >+ emitThrowTypeError("Iterator result interface is not an object."_s); > emitLabel(done.get()); > } > >@@ -4973,7 +4973,7 @@ RegisterID* BytecodeGenerator::emitDelegateYield(RegisterID* argument, Throwable > EmitAwait emitAwaitInIteratorClose = parseMode() == SourceParseMode::AsyncGeneratorBodyMode ? EmitAwait::Yes : EmitAwait::No; > emitIteratorClose(iterator.get(), node, emitAwaitInIteratorClose); > >- emitThrowTypeError(ASCIILiteral("Delegated generator does not have a 'throw' method.")); >+ emitThrowTypeError("Delegated generator does not have a 'throw' method."_s); > > emitLabel(throwMethodFound.get()); > CallArguments throwArguments(*this, nullptr, 1); >@@ -5007,7 +5007,7 @@ RegisterID* BytecodeGenerator::emitDelegateYield(RegisterID* argument, Throwable > > Ref<Label> returnIteratorResultIsObject = newLabel(); > emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), returnIteratorResultIsObject.get()); >- emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); >+ emitThrowTypeError("Iterator result interface is not an object."_s); > > emitLabel(returnIteratorResultIsObject.get()); > >@@ -5041,7 +5041,7 @@ RegisterID* BytecodeGenerator::emitDelegateYield(RegisterID* argument, Throwable > > Ref<Label> iteratorValueIsObject = newLabel(); > emitJumpIfTrue(emitIsObject(newTemporary(), value.get()), iteratorValueIsObject.get()); >- emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); >+ emitThrowTypeError("Iterator result interface is not an object."_s); > emitLabel(iteratorValueIsObject.get()); > > emitJumpIfTrue(emitGetById(newTemporary(), value.get(), propertyNames().done), loopDone.get()); >diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >index 21e1499b29e40fca8cc20e7632abf2c5d16c2560..0c909d0771d62f7586f4f0cd6457c9637e26444a 100644 >--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >@@ -884,7 +884,7 @@ RegisterID* FunctionCallValueNode::emitBytecode(BytecodeGenerator& generator, Re > > Ref<Label> thisIsEmptyLabel = generator.newLabel(); > generator.emitJumpIfTrue(generator.emitIsEmpty(generator.newTemporary(), generator.thisRegister()), thisIsEmptyLabel.get()); >- generator.emitThrowReferenceError(ASCIILiteral("'super()' can't be called more than once in a constructor.")); >+ generator.emitThrowReferenceError("'super()' can't be called more than once in a constructor."_s); > generator.emitLabel(thisIsEmptyLabel.get()); > > generator.move(generator.thisRegister(), ret); >@@ -1653,8 +1653,8 @@ RegisterID* PostfixNode::emitBytecode(BytecodeGenerator& generator, RegisterID* > return emitDot(generator, dst); > > return emitThrowReferenceError(generator, m_operator == OpPlusPlus >- ? ASCIILiteral("Postfix ++ operator applied to value that is not a reference.") >- : ASCIILiteral("Postfix -- operator applied to value that is not a reference.")); >+ ? "Postfix ++ operator applied to value that is not a reference."_s >+ : "Postfix -- operator applied to value that is not a reference."_s); > } > > // ------------------------------ DeleteResolveNode ----------------------------------- >@@ -1868,8 +1868,8 @@ RegisterID* PrefixNode::emitBytecode(BytecodeGenerator& generator, RegisterID* d > return emitDot(generator, dst); > > return emitThrowReferenceError(generator, m_operator == OpPlusPlus >- ? ASCIILiteral("Prefix ++ operator applied to value that is not a reference.") >- : ASCIILiteral("Prefix -- operator applied to value that is not a reference.")); >+ ? "Prefix ++ operator applied to value that is not a reference."_s >+ : "Prefix -- operator applied to value that is not a reference."_s); > } > > // ------------------------------ Unary Operation Nodes ----------------------------------- >@@ -2592,7 +2592,7 @@ RegisterID* ReadModifyDotNode::emitBytecode(BytecodeGenerator& generator, Regist > > RegisterID* AssignErrorNode::emitBytecode(BytecodeGenerator& generator, RegisterID*) > { >- return emitThrowReferenceError(generator, ASCIILiteral("Left side of assignment is not a reference.")); >+ return emitThrowReferenceError(generator, "Left side of assignment is not a reference."_s); > } > > // ------------------------------ AssignBracketNode ----------------------------------- >@@ -3044,7 +3044,7 @@ void ForInNode::emitLoopHeader(BytecodeGenerator& generator, RegisterID* propert > void ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) > { > if (!m_lexpr->isAssignResolveNode() && !m_lexpr->isAssignmentLocation()) { >- emitThrowReferenceError(generator, ASCIILiteral("Left side of for-in statement is not a reference.")); >+ emitThrowReferenceError(generator, "Left side of for-in statement is not a reference."_s); > return; > } > >@@ -3206,7 +3206,7 @@ void ForInNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) > void ForOfNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) > { > if (!m_lexpr->isAssignmentLocation()) { >- emitThrowReferenceError(generator, ASCIILiteral("Left side of for-of statement is not a reference.")); >+ emitThrowReferenceError(generator, "Left side of for-of statement is not a reference."_s); > return; > } > >@@ -4023,14 +4023,14 @@ RegisterID* ClassExprNode::emitBytecode(BytecodeGenerator& generator, RegisterID > Ref<Label> superclassIsObjectLabel = generator.newLabel(); > generator.emitJumpIfTrue(generator.emitIsObject(tempRegister.get(), superclass.get()), superclassIsObjectLabel.get()); > generator.emitLabel(superclassIsUndefinedLabel.get()); >- generator.emitThrowTypeError(ASCIILiteral("The superclass is not an object.")); >+ generator.emitThrowTypeError("The superclass is not an object."_s); > generator.emitLabel(superclassIsObjectLabel.get()); > generator.emitGetById(protoParent.get(), superclass.get(), generator.propertyNames().prototype); > > Ref<Label> protoParentIsObjectOrNullLabel = generator.newLabel(); > generator.emitJumpIfTrue(generator.emitUnaryOp(op_is_object_or_null, tempRegister.get(), protoParent.get()), protoParentIsObjectOrNullLabel.get()); > generator.emitJumpIfTrue(generator.emitUnaryOp(op_is_function, tempRegister.get(), protoParent.get()), protoParentIsObjectOrNullLabel.get()); >- generator.emitThrowTypeError(ASCIILiteral("The value of the superclass's prototype property is not an object.")); >+ generator.emitThrowTypeError("The value of the superclass's prototype property is not an object."_s); > generator.emitLabel(protoParentIsObjectOrNullLabel.get()); > > generator.emitDirectPutById(constructor.get(), generator.propertyNames().underscoreProto, superclass.get(), PropertyNode::Unknown); >@@ -4298,7 +4298,7 @@ void ObjectPatternNode::toString(StringBuilder& builder) const > > void ObjectPatternNode::bindValue(BytecodeGenerator& generator, RegisterID* rhs) const > { >- generator.emitRequireObjectCoercible(rhs, ASCIILiteral("Right side of assignment cannot be destructured")); >+ generator.emitRequireObjectCoercible(rhs, "Right side of assignment cannot be destructured"_s); > > RefPtr<RegisterID> excludedList; > IdentifierSet excludedSet; >diff --git a/Source/JavaScriptCore/dfg/DFGDriver.cpp b/Source/JavaScriptCore/dfg/DFGDriver.cpp >index 2ec0b5aac81fdf7367ce9d80d101315a75e7437d..0f6e0a4b60be9a033da0edc3d6a5e01cf3267e06 100644 >--- a/Source/JavaScriptCore/dfg/DFGDriver.cpp >+++ b/Source/JavaScriptCore/dfg/DFGDriver.cpp >@@ -97,7 +97,7 @@ static CompilationResult compileImpl( > vm.getCTIStub(linkPolymorphicCallThunkGenerator); > > if (vm.typeProfiler()) >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("Preparing for DFG compilation.")); >+ vm.typeProfilerLog()->processLogEntries("Preparing for DFG compilation."_s); > > Ref<Plan> plan = adoptRef( > *new Plan(codeBlock, profiledDFGCodeBlock, mode, osrEntryBytecodeIndex, mustHandleValues)); >diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp >index 7c9e70b6bd78b9993fd6dd4ae1e00614dd2a61ae..8ebaab2fb2aff309ad7e5c893d036bdcc46a0003 100644 >--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp >+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp >@@ -191,7 +191,7 @@ char* newTypedArrayWithSize(ExecState* exec, Structure* structure, int32_t size, > auto scope = DECLARE_THROW_SCOPE(vm); > > if (size < 0) { >- throwException(exec, scope, createRangeError(exec, ASCIILiteral("Requested length is negative"))); >+ throwException(exec, scope, createRangeError(exec, "Requested length is negative"_s)); > return 0; > } > >@@ -257,7 +257,7 @@ JSCell* JIT_OPERATION operationObjectCreate(ExecState* exec, EncodedJSValue enco > JSValue prototype = JSValue::decode(encodedPrototype); > > if (!prototype.isObject() && !prototype.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Object prototype may only be an Object or null.")); >+ throwVMTypeError(exec, scope, "Object prototype may only be an Object or null."_s); > return nullptr; > } > >@@ -1508,7 +1508,7 @@ char* JIT_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayS > auto scope = DECLARE_THROW_SCOPE(vm); > > if (UNLIKELY(size < 0)) >- return bitwise_cast<char*>(throwException(exec, scope, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer.")))); >+ return bitwise_cast<char*>(throwException(exec, scope, createRangeError(exec, "Array size is not a small enough positive integer."_s))); > > JSArray* result; > if (butterfly) >@@ -1525,7 +1525,7 @@ char* JIT_OPERATION operationNewArrayWithSizeAndHint(ExecState* exec, Structure* > auto scope = DECLARE_THROW_SCOPE(vm); > > if (UNLIKELY(size < 0)) >- return bitwise_cast<char*>(throwException(exec, scope, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer.")))); >+ return bitwise_cast<char*>(throwException(exec, scope, createRangeError(exec, "Array size is not a small enough positive integer."_s))); > > JSArray* result; > if (butterfly) >@@ -2051,7 +2051,7 @@ char* JIT_OPERATION operationInt32ToString(ExecState* exec, int32_t value, int32 > auto scope = DECLARE_THROW_SCOPE(vm); > > if (radix < 2 || radix > 36) { >- throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toString() radix argument must be between 2 and 36"))); >+ throwVMError(exec, scope, createRangeError(exec, "toString() radix argument must be between 2 and 36"_s)); > return nullptr; > } > >@@ -2066,7 +2066,7 @@ char* JIT_OPERATION operationInt52ToString(ExecState* exec, int64_t value, int32 > auto scope = DECLARE_THROW_SCOPE(vm); > > if (radix < 2 || radix > 36) { >- throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toString() radix argument must be between 2 and 36"))); >+ throwVMError(exec, scope, createRangeError(exec, "toString() radix argument must be between 2 and 36"_s)); > return nullptr; > } > >@@ -2081,7 +2081,7 @@ char* JIT_OPERATION operationDoubleToString(ExecState* exec, double value, int32 > auto scope = DECLARE_THROW_SCOPE(vm); > > if (radix < 2 || radix > 36) { >- throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toString() radix argument must be between 2 and 36"))); >+ throwVMError(exec, scope, createRangeError(exec, "toString() radix argument must be between 2 and 36"_s)); > return nullptr; > } > >@@ -2647,7 +2647,7 @@ void JIT_OPERATION operationProcessTypeProfilerLogDFG(ExecState* exec) > VM& vm = exec->vm(); > NativeCallFrameTracer tracer(&vm, exec); > >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("Log Full, called from inside DFG.")); >+ vm.typeProfilerLog()->processLogEntries("Log Full, called from inside DFG."_s); > } > > EncodedJSValue JIT_OPERATION operationResolveScopeForHoistingFuncDeclInEval(ExecState* exec, JSScope* scope, UniquedStringImpl* impl) >diff --git a/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp b/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp >index 2e98b82d84e2f07042b2f13fae705881516b5e92..0b66754638cefa56d1e7c518c57ad3504ca3f353 100644 >--- a/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp >+++ b/Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp >@@ -343,11 +343,11 @@ class StrengthReductionPhase : public Phase { > if (value.isNumber()) > return String::numberToStringECMAScript(value.asNumber()); > if (value.isBoolean()) >- return value.asBoolean() ? ASCIILiteral("true") : ASCIILiteral("false"); >+ return value.asBoolean() ? "true"_s : "false"_s; > if (value.isNull()) >- return ASCIILiteral("null"); >+ return "null"_s; > if (value.isUndefined()) >- return ASCIILiteral("undefined"); >+ return "undefined"_s; > return String(); > }; > >diff --git a/Source/JavaScriptCore/inspector/ConsoleMessage.cpp b/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >index f045f2400603f7064730a6aa2f4702e7d4ffbc28..a5de065cbdc5a17de9a7314aecf6f234c712732b 100644 >--- a/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >+++ b/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >@@ -239,10 +239,10 @@ void ConsoleMessage::addToFrontend(ConsoleFrontendDispatcher& consoleFrontendDis > } > argumentsObject->addItem(WTFMove(inspectorValue)); > if (m_arguments->argumentCount() > 1) >- argumentsObject->addItem(injectedScript.wrapObject(columns, ASCIILiteral("console"), true)); >+ argumentsObject->addItem(injectedScript.wrapObject(columns, "console"_s, true)); > } else { > for (unsigned i = 0; i < m_arguments->argumentCount(); ++i) { >- auto inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), ASCIILiteral("console"), generatePreview); >+ auto inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console"_s, generatePreview); > if (!inspectorValue) { > ASSERT_NOT_REACHED(); > return; >@@ -256,7 +256,7 @@ void ConsoleMessage::addToFrontend(ConsoleFrontendDispatcher& consoleFrontendDis > for (auto& message : m_jsonLogValues) { > if (message.value.isEmpty()) > continue; >- auto inspectorValue = injectedScript.wrapJSONString(message.value, ASCIILiteral("console"), generatePreview); >+ auto inspectorValue = injectedScript.wrapJSONString(message.value, "console"_s, generatePreview); > if (!inspectorValue) > continue; > >@@ -316,7 +316,7 @@ bool ConsoleMessage::isEqual(ConsoleMessage* msg) const > void ConsoleMessage::clear() > { > if (!m_message) >- m_message = ASCIILiteral("<message collected>"); >+ m_message = "<message collected>"_s; > > if (m_arguments) > m_arguments = nullptr; >diff --git a/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp b/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp >index aaa81e2862e16598e325d648cbe6cabc62020dbd..dd878ffce05facee09f7e33c18cdcc1dc2dd027b 100644 >--- a/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp >+++ b/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp >@@ -186,7 +186,7 @@ static String findMagicComment(const String& content, const String& patternStrin > String findStylesheetSourceMapURL(const String& content) > { > // "/*# <name>=<value> */" and deprecated "/*@" >- return findMagicComment(content, ASCIILiteral { "/\\*[#@][\040\t]sourceMappingURL=[\040\t]*([^\\s\'\"]*)[\040\t]*\\*/" }); >+ return findMagicComment(content, "/\\*[#@][\040\t]sourceMappingURL=[\040\t]*([^\\s\'\"]*)[\040\t]*\\*/"_s); > } > > } // namespace ContentSearchUtilities >diff --git a/Source/JavaScriptCore/inspector/InjectedScript.cpp b/Source/JavaScriptCore/inspector/InjectedScript.cpp >index fa828d005a83fa2609245815806529095652834d..2c9a4b2f4c31f8d2ca82eda8a6588fc63e619016 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScript.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScript.cpp >@@ -41,12 +41,12 @@ > namespace Inspector { > > InjectedScript::InjectedScript() >- : InjectedScriptBase(ASCIILiteral("InjectedScript")) >+ : InjectedScriptBase("InjectedScript"_s) > { > } > > InjectedScript::InjectedScript(Deprecated::ScriptObject injectedScriptObject, InspectorEnvironment* environment) >- : InjectedScriptBase(ASCIILiteral("InjectedScript"), injectedScriptObject, environment) >+ : InjectedScriptBase("InjectedScript"_s, injectedScriptObject, environment) > { > } > >@@ -56,7 +56,7 @@ InjectedScript::~InjectedScript() > > void InjectedScript::evaluate(ErrorString& errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, bool& wasThrown, std::optional<int>& savedResultIndex) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("evaluate"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluate"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(expression); > function.appendArgument(objectGroup); > function.appendArgument(includeCommandLineAPI); >@@ -68,7 +68,7 @@ void InjectedScript::evaluate(ErrorString& errorString, const String& expression > > void InjectedScript::callFunctionOn(ErrorString& errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>& result, bool& wasThrown) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("callFunctionOn"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > function.appendArgument(expression); > function.appendArgument(arguments); >@@ -81,7 +81,7 @@ void InjectedScript::callFunctionOn(ErrorString& errorString, const String& obje > > void InjectedScript::evaluateOnCallFrame(ErrorString& errorString, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, bool& wasThrown, std::optional<int>& savedResultIndex) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("evaluateOnCallFrame"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(callFrames); > function.appendArgument(callFrameId); > function.appendArgument(expression); >@@ -95,13 +95,13 @@ void InjectedScript::evaluateOnCallFrame(ErrorString& errorString, JSC::JSValue > > void InjectedScript::getFunctionDetails(ErrorString& errorString, const String& functionId, RefPtr<Protocol::Debugger::FunctionDetails>& result) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getFunctionDetails"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getFunctionDetails"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(functionId); > > RefPtr<JSON::Value> resultValue = makeCall(function); > if (!resultValue || resultValue->type() != JSON::Value::Type::Object) { > if (!resultValue->asString(errorString)) >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -110,13 +110,13 @@ void InjectedScript::getFunctionDetails(ErrorString& errorString, const String& > > void InjectedScript::functionDetails(ErrorString& errorString, JSC::JSValue value, RefPtr<Protocol::Debugger::FunctionDetails>& result) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("functionDetails"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "functionDetails"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(value); > > RefPtr<JSON::Value> resultValue = makeCall(function); > if (!resultValue || resultValue->type() != JSON::Value::Type::Object) { > if (!resultValue->asString(errorString)) >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -125,13 +125,13 @@ void InjectedScript::functionDetails(ErrorString& errorString, JSC::JSValue valu > > void InjectedScript::getPreview(ErrorString& errorString, const String& objectId, RefPtr<Protocol::Runtime::ObjectPreview>& result) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getPreview"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getPreview"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > > RefPtr<JSON::Value> resultValue = makeCall(function); > if (!resultValue || resultValue->type() != JSON::Value::Type::Object) { > if (!resultValue->asString(errorString)) >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -140,14 +140,14 @@ void InjectedScript::getPreview(ErrorString& errorString, const String& objectId > > void InjectedScript::getProperties(ErrorString& errorString, const String& objectId, bool ownProperties, bool generatePreview, RefPtr<JSON::ArrayOf<Protocol::Runtime::PropertyDescriptor>>& properties) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getProperties"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getProperties"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > function.appendArgument(ownProperties); > function.appendArgument(generatePreview); > > RefPtr<JSON::Value> result = makeCall(function); > if (!result || result->type() != JSON::Value::Type::Array) { >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -156,13 +156,13 @@ void InjectedScript::getProperties(ErrorString& errorString, const String& objec > > void InjectedScript::getDisplayableProperties(ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<JSON::ArrayOf<Protocol::Runtime::PropertyDescriptor>>& properties) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getDisplayableProperties"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getDisplayableProperties"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > function.appendArgument(generatePreview); > > RefPtr<JSON::Value> result = makeCall(function); > if (!result || result->type() != JSON::Value::Type::Array) { >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -171,13 +171,13 @@ void InjectedScript::getDisplayableProperties(ErrorString& errorString, const St > > void InjectedScript::getInternalProperties(ErrorString& errorString, const String& objectId, bool generatePreview, RefPtr<JSON::ArrayOf<Protocol::Runtime::InternalPropertyDescriptor>>& properties) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getInternalProperties"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getInternalProperties"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > function.appendArgument(generatePreview); > > RefPtr<JSON::Value> result = makeCall(function); > if (!result || result->type() != JSON::Value::Type::Array) { >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -187,7 +187,7 @@ void InjectedScript::getInternalProperties(ErrorString& errorString, const Strin > > void InjectedScript::getCollectionEntries(ErrorString& errorString, const String& objectId, const String& objectGroup, int startIndex, int numberToFetch, RefPtr<JSON::ArrayOf<Protocol::Runtime::CollectionEntry>>& entries) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("getCollectionEntries"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getCollectionEntries"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > function.appendArgument(objectGroup); > function.appendArgument(startIndex); >@@ -195,7 +195,7 @@ void InjectedScript::getCollectionEntries(ErrorString& errorString, const String > > RefPtr<JSON::Value> result = makeCall(function); > if (!result || result->type() != JSON::Value::Type::Array) { >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -204,12 +204,12 @@ void InjectedScript::getCollectionEntries(ErrorString& errorString, const String > > void InjectedScript::saveResult(ErrorString& errorString, const String& callArgumentJSON, std::optional<int>& savedResultIndex) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("saveResult"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "saveResult"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(callArgumentJSON); > > RefPtr<JSON::Value> result = makeCall(function); > if (!result || result->type() != JSON::Value::Type::Integer) { >- errorString = ASCIILiteral("Internal error"); >+ errorString = "Internal error"_s; > return; > } > >@@ -221,7 +221,7 @@ void InjectedScript::saveResult(ErrorString& errorString, const String& callArgu > Ref<JSON::ArrayOf<Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames(JSC::JSValue callFrames) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("wrapCallFrames"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(callFrames); > > bool hadException = false; >@@ -239,7 +239,7 @@ Ref<JSON::ArrayOf<Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames > RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapObject(JSC::JSValue value, const String& groupName, bool generatePreview) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("wrapObject"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject"_s, inspectorEnvironment()->functionCallHandler()); > wrapFunction.appendArgument(value); > wrapFunction.appendArgument(groupName); > wrapFunction.appendArgument(hasAccessToInspectedScriptState()); >@@ -260,7 +260,7 @@ RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapObject(JSC::JSValue > RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapJSONString(const String& json, const String& groupName, bool generatePreview) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("wrapJSONString"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapJSONString"_s, inspectorEnvironment()->functionCallHandler()); > wrapFunction.appendArgument(json); > wrapFunction.appendArgument(groupName); > wrapFunction.appendArgument(generatePreview); >@@ -283,7 +283,7 @@ RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapJSONString(const Str > RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapTable(JSC::JSValue table, JSC::JSValue columns) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("wrapTable"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapTable"_s, inspectorEnvironment()->functionCallHandler()); > wrapFunction.appendArgument(hasAccessToInspectedScriptState()); > wrapFunction.appendArgument(table); > if (!columns) >@@ -306,7 +306,7 @@ RefPtr<Protocol::Runtime::RemoteObject> InjectedScript::wrapTable(JSC::JSValue t > RefPtr<Protocol::Runtime::ObjectPreview> InjectedScript::previewValue(JSC::JSValue value) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("previewValue"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "previewValue"_s, inspectorEnvironment()->functionCallHandler()); > wrapFunction.appendArgument(value); > > bool hadException = false; >@@ -324,7 +324,7 @@ RefPtr<Protocol::Runtime::ObjectPreview> InjectedScript::previewValue(JSC::JSVal > void InjectedScript::setExceptionValue(JSC::JSValue value) > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("setExceptionValue"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "setExceptionValue"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(value); > makeCall(function); > } >@@ -332,14 +332,14 @@ void InjectedScript::setExceptionValue(JSC::JSValue value) > void InjectedScript::clearExceptionValue() > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("clearExceptionValue"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "clearExceptionValue"_s, inspectorEnvironment()->functionCallHandler()); > makeCall(function); > } > > JSC::JSValue InjectedScript::findObjectById(const String& objectId) const > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("findObjectById"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "findObjectById"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > > bool hadException = false; >@@ -352,14 +352,14 @@ JSC::JSValue InjectedScript::findObjectById(const String& objectId) const > void InjectedScript::inspectObject(JSC::JSValue value) > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("inspectObject"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "inspectObject"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(value); > makeCall(function); > } > > void InjectedScript::releaseObject(const String& objectId) > { >- Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("releaseObject"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "releaseObject"_s, inspectorEnvironment()->functionCallHandler()); > function.appendArgument(objectId); > makeCall(function); > } >@@ -367,7 +367,7 @@ void InjectedScript::releaseObject(const String& objectId) > void InjectedScript::releaseObjectGroup(const String& objectGroup) > { > ASSERT(!hasNoValue()); >- Deprecated::ScriptFunctionCall releaseFunction(injectedScriptObject(), ASCIILiteral("releaseObjectGroup"), inspectorEnvironment()->functionCallHandler()); >+ Deprecated::ScriptFunctionCall releaseFunction(injectedScriptObject(), "releaseObjectGroup"_s, inspectorEnvironment()->functionCallHandler()); > releaseFunction.appendArgument(objectGroup); > > bool hadException = false; >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >index 6ba0272fe754775d61029f7f71deacbf66a80c7c..c5dbc73237891efe9c87351ac7213e96e744889a 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp >@@ -97,7 +97,7 @@ void InjectedScriptBase::makeEvalCall(ErrorString& errorString, Deprecated::Scri > { > RefPtr<JSON::Value> result = makeCall(function); > if (!result) { >- errorString = ASCIILiteral("Internal error: result value is empty"); >+ errorString = "Internal error: result value is empty"_s; > return; > } > >@@ -109,19 +109,19 @@ void InjectedScriptBase::makeEvalCall(ErrorString& errorString, Deprecated::Scri > > RefPtr<JSON::Object> resultTuple; > if (!result->asObject(resultTuple)) { >- errorString = ASCIILiteral("Internal error: result is not an Object"); >+ errorString = "Internal error: result is not an Object"_s; > return; > } > > RefPtr<JSON::Object> resultObject; >- if (!resultTuple->getObject(ASCIILiteral("result"), resultObject)) { >- errorString = ASCIILiteral("Internal error: result is not a pair of value and wasThrown flag"); >+ if (!resultTuple->getObject("result"_s, resultObject)) { >+ errorString = "Internal error: result is not a pair of value and wasThrown flag"_s; > return; > } > > bool wasThrown = false; >- if (!resultTuple->getBoolean(ASCIILiteral("wasThrown"), wasThrown)) { >- errorString = ASCIILiteral("Internal error: result is not a pair of value and wasThrown flag"); >+ if (!resultTuple->getBoolean("wasThrown"_s, wasThrown)) { >+ errorString = "Internal error: result is not a pair of value and wasThrown flag"_s; > return; > } > >@@ -129,7 +129,7 @@ void InjectedScriptBase::makeEvalCall(ErrorString& errorString, Deprecated::Scri > out_wasThrown = wasThrown; > > int savedResultIndex; >- if (resultTuple->getInteger(ASCIILiteral("savedResultIndex"), savedResultIndex)) >+ if (resultTuple->getInteger("savedResultIndex"_s, savedResultIndex)) > out_savedResultIndex = savedResultIndex; > } > >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp b/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp >index f5ac4de08cf39f3149402482526bf519d89428f1..b4c6c18e433c16f0c0c03490d441e1f60644ac86 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScriptManager.cpp >@@ -110,7 +110,7 @@ InjectedScript InjectedScriptManager::injectedScriptForObjectId(const String& ob > return InjectedScript(); > > long injectedScriptId = 0; >- if (!resultObject->getInteger(ASCIILiteral("injectedScriptId"), injectedScriptId)) >+ if (!resultObject->getInteger("injectedScriptId"_s, injectedScriptId)) > return InjectedScript(); > > return m_idToInjectedScript.get(injectedScriptId); >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp b/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp >index 7e05fc90b468a7dc21e5a695f941671aedf12d16..403f6712c6b3694bd1638e5fdada722409f04143 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp >@@ -62,13 +62,13 @@ void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptM > > // FIXME: Make the InjectedScript a module itself. > JSC::JSLockHolder locker(injectedScript.scriptState()); >- Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), ASCIILiteral("module"), injectedScriptManager->inspectorEnvironment().functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), "module"_s, injectedScriptManager->inspectorEnvironment().functionCallHandler()); > function.appendArgument(name()); > bool hadException = false; > auto resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException); > ASSERT(!hadException); > if (hadException || !resultValue || !resultValue.isObject()) { >- Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), ASCIILiteral("injectModule"), injectedScriptManager->inspectorEnvironment().functionCallHandler()); >+ Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), "injectModule"_s, injectedScriptManager->inspectorEnvironment().functionCallHandler()); > function.appendArgument(name()); > function.appendArgument(source()); > function.appendArgument(host(injectedScriptManager, injectedScript.scriptState())); >diff --git a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >index 064a362aa01b0a4ddff29609f6197b10892d641c..99ec27a03f8dd048117392b72c668dbb5ebcfe9b 100644 >--- a/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >+++ b/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp >@@ -118,26 +118,26 @@ void BackendDispatcher::dispatch(const String& message) > > RefPtr<JSON::Value> parsedMessage; > if (!JSON::Value::parseJSON(message, parsedMessage)) { >- reportProtocolError(ParseError, ASCIILiteral("Message must be in JSON format")); >+ reportProtocolError(ParseError, "Message must be in JSON format"_s); > sendPendingErrors(); > return; > } > > if (!parsedMessage->asObject(messageObject)) { >- reportProtocolError(InvalidRequest, ASCIILiteral("Message must be a JSONified object")); >+ reportProtocolError(InvalidRequest, "Message must be a JSONified object"_s); > sendPendingErrors(); > return; > } > > RefPtr<JSON::Value> requestIdValue; >- if (!messageObject->getValue(ASCIILiteral("id"), requestIdValue)) { >- reportProtocolError(InvalidRequest, ASCIILiteral("'id' property was not found")); >+ if (!messageObject->getValue("id"_s, requestIdValue)) { >+ reportProtocolError(InvalidRequest, "'id' property was not found"_s); > sendPendingErrors(); > return; > } > > if (!requestIdValue->asInteger(requestId)) { >- reportProtocolError(InvalidRequest, ASCIILiteral("The type of 'id' property must be integer")); >+ reportProtocolError(InvalidRequest, "The type of 'id' property must be integer"_s); > sendPendingErrors(); > return; > } >@@ -148,15 +148,15 @@ void BackendDispatcher::dispatch(const String& message) > SetForScope<std::optional<long>> scopedRequestId(m_currentRequestId, requestId); > > RefPtr<JSON::Value> methodValue; >- if (!messageObject->getValue(ASCIILiteral("method"), methodValue)) { >- reportProtocolError(InvalidRequest, ASCIILiteral("'method' property wasn't found")); >+ if (!messageObject->getValue("method"_s, methodValue)) { >+ reportProtocolError(InvalidRequest, "'method' property wasn't found"_s); > sendPendingErrors(); > return; > } > > String methodString; > if (!methodValue->asString(methodString)) { >- reportProtocolError(InvalidRequest, ASCIILiteral("The type of 'method' property must be string")); >+ reportProtocolError(InvalidRequest, "The type of 'method' property must be string"_s); > sendPendingErrors(); > return; > } >@@ -164,7 +164,7 @@ void BackendDispatcher::dispatch(const String& message) > Vector<String> domainAndMethod; > methodString.split('.', true, domainAndMethod); > if (domainAndMethod.size() != 2 || !domainAndMethod[0].length() || !domainAndMethod[1].length()) { >- reportProtocolError(InvalidRequest, ASCIILiteral("The 'method' property was formatted incorrectly. It should be 'Domain.method'")); >+ reportProtocolError(InvalidRequest, "The 'method' property was formatted incorrectly. It should be 'Domain.method'"_s); > sendPendingErrors(); > return; > } >@@ -198,8 +198,8 @@ void BackendDispatcher::sendResponse(long requestId, RefPtr<JSON::Object>&& resu > // The JSON-RPC 2.0 specification requires that the "error" member have the value 'null' > // if no error occurred during an invocation, but we do not include it at all. > Ref<JSON::Object> responseMessage = JSON::Object::create(); >- responseMessage->setObject(ASCIILiteral("result"), WTFMove(result)); >- responseMessage->setInteger(ASCIILiteral("id"), requestId); >+ responseMessage->setObject("result"_s, WTFMove(result)); >+ responseMessage->setInteger("id"_s, requestId); > m_frontendRouter->sendResponse(responseMessage->toJSONString()); > } > >@@ -230,23 +230,23 @@ void BackendDispatcher::sendPendingErrors() > ASSERT_ARG(errorCode, errorCodes[errorCode]); > > Ref<JSON::Object> error = JSON::Object::create(); >- error->setInteger(ASCIILiteral("code"), errorCodes[errorCode]); >- error->setString(ASCIILiteral("message"), errorMessage); >+ error->setInteger("code"_s, errorCodes[errorCode]); >+ error->setString("message"_s, errorMessage); > payload->pushObject(WTFMove(error)); > } > > Ref<JSON::Object> topLevelError = JSON::Object::create(); >- topLevelError->setInteger(ASCIILiteral("code"), errorCodes[errorCode]); >- topLevelError->setString(ASCIILiteral("message"), errorMessage); >- topLevelError->setArray(ASCIILiteral("data"), WTFMove(payload)); >+ topLevelError->setInteger("code"_s, errorCodes[errorCode]); >+ topLevelError->setString("message"_s, errorMessage); >+ topLevelError->setArray("data"_s, WTFMove(payload)); > > Ref<JSON::Object> message = JSON::Object::create(); >- message->setObject(ASCIILiteral("error"), WTFMove(topLevelError)); >+ message->setObject("error"_s, WTFMove(topLevelError)); > if (m_currentRequestId) >- message->setInteger(ASCIILiteral("id"), m_currentRequestId.value()); >+ message->setInteger("id"_s, m_currentRequestId.value()); > else { > // The 'null' value for an unknown id is specified in JSON-RPC 2.0, Section 5. >- message->setValue(ASCIILiteral("id"), JSON::Value::null()); >+ message->setValue("id"_s, JSON::Value::null()); > } > > m_frontendRouter->sendResponse(message->toJSONString()); >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp >index 7c49dd35d60393bcac825bba8a5168f4047595b7..096b9b7b7f0edccbec279bf161b53cfdb3a1c2fa 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp >@@ -87,7 +87,7 @@ void JSGlobalObjectConsoleClient::profile(JSC::ExecState*, const String& title) > for (auto& existingTitle : m_profiles) { > if (existingTitle == title) { > // FIXME: Send an enum to the frontend for localization? >- String warning = title.isEmpty() ? ASCIILiteral("Unnamed Profile already exists") : makeString("Profile \"", title, "\" already exists"); >+ String warning = title.isEmpty() ? "Unnamed Profile already exists"_s : makeString("Profile \"", title, "\" already exists"); > m_consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Profile, MessageLevel::Warning, warning)); > return; > } >@@ -115,7 +115,7 @@ void JSGlobalObjectConsoleClient::profileEnd(JSC::ExecState*, const String& titl > } > > // FIXME: Send an enum to the frontend for localization? >- String warning = title.isEmpty() ? ASCIILiteral("No profiles exist") : makeString("Profile \"", title, "\" does not exist"); >+ String warning = title.isEmpty() ? "No profiles exist"_s : makeString("Profile \"", title, "\" does not exist"); > m_consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::ProfileEnd, MessageLevel::Warning, warning)); > } > >@@ -162,7 +162,7 @@ void JSGlobalObjectConsoleClient::timeEnd(ExecState* exec, const String& title) > void JSGlobalObjectConsoleClient::timeStamp(ExecState*, Ref<ScriptArguments>&&) > { > // FIXME: JSContext inspection needs a timeline. >- warnUnimplemented(ASCIILiteral("console.timeStamp")); >+ warnUnimplemented("console.timeStamp"_s); > } > > void JSGlobalObjectConsoleClient::record(ExecState*, Ref<ScriptArguments>&&) { } >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >index f17a1e0a8d7657f246643faae0a7e8059e44fe3b..b4305b78729fdbce25fad67a62d13ff7ec2ababb 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >@@ -193,9 +193,9 @@ void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack& call > for (int i = 0; i < size; ++i) { > auto demangled = StackTrace::demangle(stack[i]); > if (demangled) >- callStack.append(ScriptCallFrame(demangled->demangledName() ? demangled->demangledName() : demangled->mangledName(), ASCIILiteral("[native code]"), noSourceID, 0, 0)); >+ callStack.append(ScriptCallFrame(demangled->demangledName() ? demangled->demangledName() : demangled->mangledName(), "[native code]"_s, noSourceID, 0, 0)); > else >- callStack.append(ScriptCallFrame(ASCIILiteral("?"), ASCIILiteral("[native code]"), noSourceID, 0, 0)); >+ callStack.append(ScriptCallFrame("?"_s, "[native code]"_s, noSourceID, 0, 0)); > } > #else > UNUSED_PARAM(callStack); >diff --git a/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp b/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >index 3d5c17a352c84c31871e73b7e1d8f7f0465ae8ed..71d7c406550db7c99f67c78e9fe33a3cc99b1870 100644 >--- a/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >+++ b/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp >@@ -101,7 +101,7 @@ JSValue JSInjectedScriptHost::evaluateWithScopeExtension(ExecState* exec) > > JSValue scriptValue = exec->argument(0); > if (!scriptValue.isString()) >- return throwTypeError(exec, scope, ASCIILiteral("InjectedScriptHost.evaluateWithScopeExtension first argument must be a string.")); >+ return throwTypeError(exec, scope, "InjectedScriptHost.evaluateWithScopeExtension first argument must be a string."_s); > > String program = asString(scriptValue)->value(exec); > RETURN_IF_EXCEPTION(scope, JSValue()); >@@ -152,41 +152,41 @@ JSValue JSInjectedScriptHost::subtype(ExecState* exec) > > if (auto* object = jsDynamicCast<JSObject*>(vm, value)) { > if (object->isErrorInstance()) >- return jsNontrivialString(exec, ASCIILiteral("error")); >+ return jsNontrivialString(exec, "error"_s); > > // Consider class constructor functions class objects. > JSFunction* function = jsDynamicCast<JSFunction*>(vm, value); > if (function && function->isClassConstructorFunction()) >- return jsNontrivialString(exec, ASCIILiteral("class")); >+ return jsNontrivialString(exec, "class"_s); > > if (object->inherits<JSArray>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("array")); >+ return jsNontrivialString(exec, "array"_s); > if (object->inherits<DirectArguments>(vm) || object->inherits<ScopedArguments>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("array")); >+ return jsNontrivialString(exec, "array"_s); > > if (object->inherits<DateInstance>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("date")); >+ return jsNontrivialString(exec, "date"_s); > if (object->inherits<RegExpObject>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("regexp")); >+ return jsNontrivialString(exec, "regexp"_s); > if (object->inherits<ProxyObject>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("proxy")); >+ return jsNontrivialString(exec, "proxy"_s); > > if (object->inherits<JSMap>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("map")); >+ return jsNontrivialString(exec, "map"_s); > if (object->inherits<JSSet>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("set")); >+ return jsNontrivialString(exec, "set"_s); > if (object->inherits<JSWeakMap>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("weakmap")); >+ return jsNontrivialString(exec, "weakmap"_s); > if (object->inherits<JSWeakSet>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("weakset")); >+ return jsNontrivialString(exec, "weakset"_s); > > if (object->inherits<JSStringIterator>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("iterator")); >+ return jsNontrivialString(exec, "iterator"_s); > > if (object->getDirect(vm, vm.propertyNames->builtinNames().arrayIteratorNextIndexPrivateName()) > || object->getDirect(vm, vm.propertyNames->builtinNames().mapBucketPrivateName()) > || object->getDirect(vm, vm.propertyNames->builtinNames().setBucketPrivateName())) >- return jsNontrivialString(exec, ASCIILiteral("iterator")); >+ return jsNontrivialString(exec, "iterator"_s); > > if (object->inherits<JSInt8Array>(vm) > || object->inherits<JSInt16Array>(vm) >@@ -197,7 +197,7 @@ JSValue JSInjectedScriptHost::subtype(ExecState* exec) > || object->inherits<JSUint32Array>(vm) > || object->inherits<JSFloat32Array>(vm) > || object->inherits<JSFloat64Array>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("array")); >+ return jsNontrivialString(exec, "array"_s); > } > > return impl().subtype(exec, value); >@@ -279,19 +279,19 @@ JSValue JSInjectedScriptHost::getInternalProperties(ExecState* exec) > switch (promise->status(vm)) { > case JSPromise::Status::Pending: > scope.release(); >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("status"), jsNontrivialString(exec, ASCIILiteral("pending")))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "status"_s, jsNontrivialString(exec, "pending"_s))); > return array; > case JSPromise::Status::Fulfilled: >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("status"), jsNontrivialString(exec, ASCIILiteral("resolved")))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "status"_s, jsNontrivialString(exec, "resolved"_s))); > RETURN_IF_EXCEPTION(scope, JSValue()); > scope.release(); >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("result"), promise->result(vm))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "result"_s, promise->result(vm))); > return array; > case JSPromise::Status::Rejected: >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("status"), jsNontrivialString(exec, ASCIILiteral("rejected")))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "status"_s, jsNontrivialString(exec, "rejected"_s))); > RETURN_IF_EXCEPTION(scope, JSValue()); > scope.release(); >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("result"), promise->result(vm))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "result"_s, promise->result(vm))); > return array; > } > // FIXME: <https://webkit.org/b/141664> Web Inspector: ES6: Improved Support for Promises - Promise Reactions >@@ -318,10 +318,10 @@ JSValue JSInjectedScriptHost::getInternalProperties(ExecState* exec) > unsigned index = 0; > JSArray* array = constructEmptyArray(exec, nullptr, 2); > RETURN_IF_EXCEPTION(scope, JSValue()); >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("target"), proxy->target())); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "target"_s, proxy->target())); > RETURN_IF_EXCEPTION(scope, JSValue()); > scope.release(); >- array->putDirectIndex(exec, index++, constructInternalProperty(exec, ASCIILiteral("handler"), proxy->handler())); >+ array->putDirectIndex(exec, index++, constructInternalProperty(exec, "handler"_s, proxy->handler())); > return array; > } > >@@ -345,13 +345,13 @@ JSValue JSInjectedScriptHost::getInternalProperties(ExecState* exec) > String kind; > switch (static_cast<IterationKind>(iteratorObject->getDirect(vm, vm.propertyNames->builtinNames().mapIteratorKindPrivateName()).asInt32())) { > case IterateKey: >- kind = ASCIILiteral("key"); >+ kind = "key"_s; > break; > case IterateValue: >- kind = ASCIILiteral("value"); >+ kind = "value"_s; > break; > case IterateKeyValue: >- kind = ASCIILiteral("key+value"); >+ kind = "key+value"_s; > break; > } > unsigned index = 0; >@@ -369,13 +369,13 @@ JSValue JSInjectedScriptHost::getInternalProperties(ExecState* exec) > String kind; > switch (static_cast<IterationKind>(iteratorObject->getDirect(vm, vm.propertyNames->builtinNames().setIteratorKindPrivateName()).asInt32())) { > case IterateKey: >- kind = ASCIILiteral("key"); >+ kind = "key"_s; > break; > case IterateValue: >- kind = ASCIILiteral("value"); >+ kind = "value"_s; > break; > case IterateKeyValue: >- kind = ASCIILiteral("key+value"); >+ kind = "key+value"_s; > break; > } > unsigned index = 0; >diff --git a/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp b/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp >index a400425b851c787a18c6357d115937b718e9b933..bf976a617cdfcb020349dcb53361a3e88a5d3e8e 100644 >--- a/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp >+++ b/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp >@@ -80,7 +80,7 @@ JSValue JSJavaScriptCallFrame::evaluateWithScopeExtension(ExecState* exec) > > JSValue scriptValue = exec->argument(0); > if (!scriptValue.isString()) >- return throwTypeError(exec, scope, ASCIILiteral("JSJavaScriptCallFrame.evaluateWithScopeExtension first argument must be a string.")); >+ return throwTypeError(exec, scope, "JSJavaScriptCallFrame.evaluateWithScopeExtension first argument must be a string."_s); > > String script = asString(scriptValue)->value(exec); > RETURN_IF_EXCEPTION(scope, JSValue()); >@@ -220,9 +220,9 @@ JSValue JSJavaScriptCallFrame::type(ExecState* exec) const > { > switch (impl().type()) { > case DebuggerCallFrame::FunctionType: >- return jsNontrivialString(exec, ASCIILiteral("function")); >+ return jsNontrivialString(exec, "function"_s); > case DebuggerCallFrame::ProgramType: >- return jsNontrivialString(exec, ASCIILiteral("program")); >+ return jsNontrivialString(exec, "program"_s); > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/JavaScriptCore/inspector/ScriptArguments.cpp b/Source/JavaScriptCore/inspector/ScriptArguments.cpp >index 6caf5ab275afc3d5b3678b1df30415a7824322fa..cf49d96d44f46d3645f4efed8a7098cb0b979b34 100644 >--- a/Source/JavaScriptCore/inspector/ScriptArguments.cpp >+++ b/Source/JavaScriptCore/inspector/ScriptArguments.cpp >@@ -78,7 +78,7 @@ bool ScriptArguments::getFirstArgumentAsString(String& result) > > auto value = argumentAt(0); > if (JSC::jsDynamicCast<JSC::ProxyObject*>(state->vm(), value)) { >- result = ASCIILiteral("[object Proxy]"); >+ result = "[object Proxy]"_s; > return true; > } > >diff --git a/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp b/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp >index f9c6238f288f18df907fdcf0c73a812a63583522..bae72812ca13768e17378ded94463016579c053c 100644 >--- a/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp >+++ b/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp >@@ -148,7 +148,7 @@ static bool extractSourceInformationFromException(JSC::ExecState* exec, JSObject > } > > if (sourceURL->isEmpty()) >- *sourceURL = ASCIILiteral("undefined"); >+ *sourceURL = "undefined"_s; > > scope.clearException(); > return result; >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp >index c876b95abdae54643b6248a70690719b5a9b007a..f0a0f836b8193008674a9d26bd9d6b7bd4c7115f 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp >@@ -38,7 +38,7 @@ > namespace Inspector { > > InspectorAgent::InspectorAgent(AgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Inspector")) >+ : InspectorAgentBase("Inspector"_s) > , m_environment(context.environment) > , m_frontendDispatcher(std::make_unique<InspectorFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(InspectorBackendDispatcher::create(context.backendDispatcher, this)) >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >index fb1aa6a9e684fa391af19b83942d58b02cc0c247..4cfed7c55f468db4eb1b50f50a824c3fdd7fea99 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >@@ -43,7 +43,7 @@ static const unsigned maximumConsoleMessages = 100; > static const int expireConsoleMessagesStep = 10; > > InspectorConsoleAgent::InspectorConsoleAgent(AgentContext& context, InspectorHeapAgent* heapAgent) >- : InspectorAgentBase(ASCIILiteral("Console")) >+ : InspectorAgentBase("Console"_s) > , m_injectedScriptManager(context.injectedScriptManager) > , m_frontendDispatcher(std::make_unique<ConsoleFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(ConsoleBackendDispatcher::create(context.backendDispatcher, this)) >@@ -103,7 +103,7 @@ void InspectorConsoleAgent::clearMessages(ErrorString&) > m_consoleMessages.clear(); > m_expiredConsoleMessageCount = 0; > >- m_injectedScriptManager.releaseObjectGroup(ASCIILiteral("console")); >+ m_injectedScriptManager.releaseObjectGroup("console"_s); > > if (m_enabled) > m_frontendDispatcher->messagesCleared(); >@@ -189,7 +189,7 @@ void InspectorConsoleAgent::count(JSC::ExecState* state, Ref<ScriptArguments>&& > String identifier; > if (!arguments->argumentCount()) { > // '@' prefix for engine generated labels. >- title = ASCIILiteral("Global"); >+ title = "Global"_s; > identifier = makeString('@', title); > } else { > // '#' prefix for user labels. >@@ -246,7 +246,7 @@ void InspectorConsoleAgent::getLoggingChannels(ErrorString&, RefPtr<JSON::ArrayO > > void InspectorConsoleAgent::setLoggingChannelLevel(ErrorString& errorString, const String&, const String&) > { >- errorString = ASCIILiteral("No such channel to enable"); >+ errorString = "No such channel to enable"_s; > } > > } // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >index 20e4ecb22653c388378c3d337f520c1bbf2fd00e..f36b55bd8c0a74c1d3e57ea4e864e7eb567fd1c6 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >@@ -61,7 +61,7 @@ static String objectGroupForBreakpointAction(const ScriptBreakpointAction& actio > } > > InspectorDebuggerAgent::InspectorDebuggerAgent(AgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Debugger")) >+ : InspectorAgentBase("Debugger"_s) > , m_injectedScriptManager(context.injectedScriptManager) > , m_frontendDispatcher(std::make_unique<DebuggerFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(DebuggerBackendDispatcher::create(context.backendDispatcher, this)) >@@ -143,7 +143,7 @@ void InspectorDebuggerAgent::setAsyncStackTraceDepth(ErrorString& errorString, i > return; > > if (depth < 0) { >- errorString = ASCIILiteral("depth must be a positive number."); >+ errorString = "depth must be a positive number."_s; > return; > } > >@@ -317,16 +317,16 @@ void InspectorDebuggerAgent::didDispatchAsyncCall() > static Ref<JSON::Object> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, RefPtr<JSON::Array>& actions, bool isRegex, bool autoContinue, unsigned ignoreCount) > { > Ref<JSON::Object> breakpointObject = JSON::Object::create(); >- breakpointObject->setString(ASCIILiteral("url"), url); >- breakpointObject->setInteger(ASCIILiteral("lineNumber"), lineNumber); >- breakpointObject->setInteger(ASCIILiteral("columnNumber"), columnNumber); >- breakpointObject->setString(ASCIILiteral("condition"), condition); >- breakpointObject->setBoolean(ASCIILiteral("isRegex"), isRegex); >- breakpointObject->setBoolean(ASCIILiteral("autoContinue"), autoContinue); >- breakpointObject->setInteger(ASCIILiteral("ignoreCount"), ignoreCount); >+ breakpointObject->setString("url"_s, url); >+ breakpointObject->setInteger("lineNumber"_s, lineNumber); >+ breakpointObject->setInteger("columnNumber"_s, columnNumber); >+ breakpointObject->setString("condition"_s, condition); >+ breakpointObject->setBoolean("isRegex"_s, isRegex); >+ breakpointObject->setBoolean("autoContinue"_s, autoContinue); >+ breakpointObject->setInteger("ignoreCount"_s, ignoreCount); > > if (actions) >- breakpointObject->setArray(ASCIILiteral("actions"), actions); >+ breakpointObject->setArray("actions"_s, actions); > > return breakpointObject; > } >@@ -376,29 +376,29 @@ bool InspectorDebuggerAgent::breakpointActionsFromProtocol(ErrorString& errorStr > RefPtr<JSON::Value> value = actions->get(i); > RefPtr<JSON::Object> object; > if (!value->asObject(object)) { >- errorString = ASCIILiteral("BreakpointAction of incorrect type, expected object"); >+ errorString = "BreakpointAction of incorrect type, expected object"_s; > return false; > } > > String typeString; >- if (!object->getString(ASCIILiteral("type"), typeString)) { >- errorString = ASCIILiteral("BreakpointAction had type missing"); >+ if (!object->getString("type"_s, typeString)) { >+ errorString = "BreakpointAction had type missing"_s; > return false; > } > > ScriptBreakpointActionType type; > if (!breakpointActionTypeForString(typeString, &type)) { >- errorString = ASCIILiteral("BreakpointAction had unknown type"); >+ errorString = "BreakpointAction had unknown type"_s; > return false; > } > > // Specifying an identifier is optional. They are used to correlate probe samples > // in the frontend across multiple backend probe actions and segregate object groups. > int identifier = 0; >- object->getInteger(ASCIILiteral("id"), identifier); >+ object->getInteger("id"_s, identifier); > > String data; >- object->getString(ASCIILiteral("data"), data); >+ object->getString("data"_s, data); > > result->append(ScriptBreakpointAction(type, identifier, data)); > } >@@ -422,15 +422,15 @@ static RefPtr<Protocol::Debugger::Location> buildDebuggerLocation(const JSC::Bre > static bool parseLocation(ErrorString& errorString, const JSON::Object& location, JSC::SourceID& sourceID, unsigned& lineNumber, unsigned& columnNumber) > { > String scriptIDStr; >- if (!location.getString(ASCIILiteral("scriptId"), scriptIDStr) || !location.getInteger(ASCIILiteral("lineNumber"), lineNumber)) { >+ if (!location.getString("scriptId"_s, scriptIDStr) || !location.getInteger("lineNumber"_s, lineNumber)) { > sourceID = JSC::noSourceID; >- errorString = ASCIILiteral("scriptId and lineNumber are required."); >+ errorString = "scriptId and lineNumber are required."_s; > return false; > } > > sourceID = scriptIDStr.toIntPtr(); > columnNumber = 0; >- location.getInteger(ASCIILiteral("columnNumber"), columnNumber); >+ location.getInteger("columnNumber"_s, columnNumber); > return true; > } > >@@ -438,7 +438,7 @@ void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString& errorString, int li > { > locations = JSON::ArrayOf<Protocol::Debugger::Location>::create(); > if (!optionalURL == !optionalURLRegex) { >- errorString = ASCIILiteral("Either url or urlRegex must be specified."); >+ errorString = "Either url or urlRegex must be specified."_s; > return; > } > >@@ -448,7 +448,7 @@ void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString& errorString, int li > > String breakpointIdentifier = (isRegex ? "/" + url + "/" : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber); > if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) { >- errorString = ASCIILiteral("Breakpoint at specified location already exists."); >+ errorString = "Breakpoint at specified location already exists."_s; > return; > } > >@@ -457,10 +457,10 @@ void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString& errorString, int li > unsigned ignoreCount = 0; > RefPtr<JSON::Array> actions; > if (options) { >- options->getString(ASCIILiteral("condition"), condition); >- options->getBoolean(ASCIILiteral("autoContinue"), autoContinue); >- options->getArray(ASCIILiteral("actions"), actions); >- options->getInteger(ASCIILiteral("ignoreCount"), ignoreCount); >+ options->getString("condition"_s, condition); >+ options->getBoolean("autoContinue"_s, autoContinue); >+ options->getArray("actions"_s, actions); >+ options->getInteger("ignoreCount"_s, ignoreCount); > } > > BreakpointActions breakpointActions; >@@ -508,10 +508,10 @@ void InspectorDebuggerAgent::setBreakpoint(ErrorString& errorString, const JSON: > unsigned ignoreCount = 0; > RefPtr<JSON::Array> actions; > if (options) { >- options->getString(ASCIILiteral("condition"), condition); >- options->getBoolean(ASCIILiteral("autoContinue"), autoContinue); >- options->getArray(ASCIILiteral("actions"), actions); >- options->getInteger(ASCIILiteral("ignoreCount"), ignoreCount); >+ options->getString("condition"_s, condition); >+ options->getBoolean("autoContinue"_s, autoContinue); >+ options->getArray("actions"_s, actions); >+ options->getInteger("ignoreCount"_s, ignoreCount); > } > > BreakpointActions breakpointActions; >@@ -520,7 +520,7 @@ void InspectorDebuggerAgent::setBreakpoint(ErrorString& errorString, const JSON: > > auto scriptIterator = m_scripts.find(sourceID); > if (scriptIterator == m_scripts.end()) { >- errorString = ASCIILiteral("No script for id: ") + String::number(sourceID); >+ errorString = "No script for id: "_s + String::number(sourceID); > return; > } > >@@ -528,14 +528,14 @@ void InspectorDebuggerAgent::setBreakpoint(ErrorString& errorString, const JSON: > JSC::Breakpoint breakpoint(sourceID, lineNumber, columnNumber, condition, autoContinue, ignoreCount); > resolveBreakpoint(script, breakpoint); > if (!breakpoint.resolved) { >- errorString = ASCIILiteral("Could not resolve breakpoint"); >+ errorString = "Could not resolve breakpoint"_s; > return; > } > > bool existing; > setBreakpoint(breakpoint, existing); > if (existing) { >- errorString = ASCIILiteral("Breakpoint at specified location already exists"); >+ errorString = "Breakpoint at specified location already exists"_s; > return; > } > >@@ -623,7 +623,7 @@ void InspectorDebuggerAgent::continueToLocation(ErrorString& errorString, const > if (scriptIterator == m_scripts.end()) { > m_scriptDebugServer.continueProgram(); > m_frontendDispatcher->resumed(); >- errorString = ASCIILiteral("No script for id: ") + String::number(sourceID); >+ errorString = "No script for id: "_s + String::number(sourceID); > return; > } > >@@ -636,7 +636,7 @@ void InspectorDebuggerAgent::continueToLocation(ErrorString& errorString, const > if (!breakpoint.resolved) { > m_scriptDebugServer.continueProgram(); > m_frontendDispatcher->resumed(); >- errorString = ASCIILiteral("Could not resolve breakpoint"); >+ errorString = "Could not resolve breakpoint"_s; > return; > } > >@@ -664,7 +664,7 @@ void InspectorDebuggerAgent::searchInContent(ErrorString& error, const String& s > JSC::SourceID sourceID = scriptIDStr.toIntPtr(); > auto it = m_scripts.find(sourceID); > if (it == m_scripts.end()) { >- error = ASCIILiteral("No script for id: ") + scriptIDStr; >+ error = "No script for id: "_s + scriptIDStr; > return; > } > >@@ -680,14 +680,14 @@ void InspectorDebuggerAgent::getScriptSource(ErrorString& error, const String& s > if (it != m_scripts.end()) > *scriptSource = it->value.source; > else >- error = ASCIILiteral("No script for id: ") + scriptIDStr; >+ error = "No script for id: "_s + scriptIDStr; > } > > void InspectorDebuggerAgent::getFunctionDetails(ErrorString& errorString, const String& functionId, RefPtr<Protocol::Debugger::FunctionDetails>& details) > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(functionId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Function object id is obsolete"); >+ errorString = "Function object id is obsolete"_s; > return; > } > >@@ -728,7 +728,7 @@ void InspectorDebuggerAgent::pause(ErrorString&) > void InspectorDebuggerAgent::resume(ErrorString& errorString) > { > if (!m_pausedScriptState && !m_javaScriptPauseScheduled) { >- errorString = ASCIILiteral("Was not paused or waiting to pause"); >+ errorString = "Was not paused or waiting to pause"_s; > return; > } > >@@ -812,13 +812,13 @@ void InspectorDebuggerAgent::setPauseOnExceptions(ErrorString& errorString, cons > else if (stringPauseState == "uncaught") > pauseState = JSC::Debugger::PauseOnUncaughtExceptions; > else { >- errorString = ASCIILiteral("Unknown pause on exceptions mode: ") + stringPauseState; >+ errorString = "Unknown pause on exceptions mode: "_s + stringPauseState; > return; > } > > m_scriptDebugServer.setPauseOnExceptionsState(static_cast<JSC::Debugger::PauseOnExceptionsState>(pauseState)); > if (m_scriptDebugServer.pauseOnExceptionsState() != pauseState) >- errorString = ASCIILiteral("Internal error. Could not change pause on exceptions state"); >+ errorString = "Internal error. Could not change pause on exceptions state"_s; > } > > void InspectorDebuggerAgent::setPauseOnAssertions(ErrorString&, bool enabled) >@@ -829,13 +829,13 @@ void InspectorDebuggerAgent::setPauseOnAssertions(ErrorString&, bool enabled) > void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString& errorString, const String& callFrameId, const String& expression, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const bool* returnByValue, const bool* generatePreview, const bool* saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, std::optional<bool>& outWasThrown, std::optional<int>& savedResultIndex) > { > if (!m_currentCallStack) { >- errorString = ASCIILiteral("Not paused"); >+ errorString = "Not paused"_s; > return; > } > > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(callFrameId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for callFrameId"); >+ errorString = "Could not find InjectedScript for callFrameId"_s; > return; > } > >@@ -916,20 +916,20 @@ void InspectorDebuggerAgent::didParseSource(JSC::SourceID sourceID, const Script > > bool isRegex; > String url; >- breakpointObject->getBoolean(ASCIILiteral("isRegex"), isRegex); >- breakpointObject->getString(ASCIILiteral("url"), url); >+ breakpointObject->getBoolean("isRegex"_s, isRegex); >+ breakpointObject->getString("url"_s, url); > if (!matches(scriptURLForBreakpoints, url, isRegex)) > continue; > > ScriptBreakpoint scriptBreakpoint; >- breakpointObject->getInteger(ASCIILiteral("lineNumber"), scriptBreakpoint.lineNumber); >- breakpointObject->getInteger(ASCIILiteral("columnNumber"), scriptBreakpoint.columnNumber); >- breakpointObject->getString(ASCIILiteral("condition"), scriptBreakpoint.condition); >- breakpointObject->getBoolean(ASCIILiteral("autoContinue"), scriptBreakpoint.autoContinue); >- breakpointObject->getInteger(ASCIILiteral("ignoreCount"), scriptBreakpoint.ignoreCount); >+ breakpointObject->getInteger("lineNumber"_s, scriptBreakpoint.lineNumber); >+ breakpointObject->getInteger("columnNumber"_s, scriptBreakpoint.columnNumber); >+ breakpointObject->getString("condition"_s, scriptBreakpoint.condition); >+ breakpointObject->getBoolean("autoContinue"_s, scriptBreakpoint.autoContinue); >+ breakpointObject->getInteger("ignoreCount"_s, scriptBreakpoint.ignoreCount); > ErrorString errorString; > RefPtr<JSON::Array> actions; >- breakpointObject->getArray(ASCIILiteral("actions"), actions); >+ breakpointObject->getArray("actions"_s, actions); > if (!breakpointActionsFromProtocol(errorString, actions, &scriptBreakpoint.actions)) { > ASSERT_NOT_REACHED(); > continue; >@@ -1121,7 +1121,7 @@ void InspectorDebuggerAgent::didClearGlobalObject() > bool InspectorDebuggerAgent::assertPaused(ErrorString& errorString) > { > if (!m_pausedScriptState) { >- errorString = ASCIILiteral("Can only perform operation while paused."); >+ errorString = "Can only perform operation while paused."_s; > return false; > } > >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp >index 2fb8b7ecd7fb56b691c7d5923025796812617464..dd23fa07779050c786d96203d01f97bb80e6f432 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp >@@ -40,7 +40,7 @@ using namespace JSC; > namespace Inspector { > > InspectorHeapAgent::InspectorHeapAgent(AgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Heap")) >+ : InspectorAgentBase("Heap"_s) > , m_injectedScriptManager(context.injectedScriptManager) > , m_frontendDispatcher(std::make_unique<HeapFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(HeapBackendDispatcher::create(context.backendDispatcher, this)) >@@ -147,19 +147,19 @@ std::optional<HeapSnapshotNode> InspectorHeapAgent::nodeForHeapObjectIdentifier( > { > HeapProfiler* heapProfiler = m_environment.vm().heapProfiler(); > if (!heapProfiler) { >- errorString = ASCIILiteral("No heap snapshot"); >+ errorString = "No heap snapshot"_s; > return std::nullopt; > } > > HeapSnapshot* snapshot = heapProfiler->mostRecentSnapshot(); > if (!snapshot) { >- errorString = ASCIILiteral("No heap snapshot"); >+ errorString = "No heap snapshot"_s; > return std::nullopt; > } > > const std::optional<HeapSnapshotNode> optionalNode = snapshot->nodeForObjectIdentifier(heapObjectIdentifier); > if (!optionalNode) { >- errorString = ASCIILiteral("No object for identifier, it may have been collected"); >+ errorString = "No object for identifier, it may have been collected"_s; > return std::nullopt; > } > >@@ -189,19 +189,19 @@ void InspectorHeapAgent::getPreview(ErrorString& errorString, int heapObjectId, > > Structure* structure = cell->structure(vm); > if (!structure) { >- errorString = ASCIILiteral("Unable to get object details - Structure"); >+ errorString = "Unable to get object details - Structure"_s; > return; > } > > JSGlobalObject* globalObject = structure->globalObject(); > if (!globalObject) { >- errorString = ASCIILiteral("Unable to get object details - GlobalObject"); >+ errorString = "Unable to get object details - GlobalObject"_s; > return; > } > > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(globalObject->globalExec()); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Unable to get object details - InjectedScript"); >+ errorString = "Unable to get object details - InjectedScript"_s; > return; > } > >@@ -230,19 +230,19 @@ void InspectorHeapAgent::getRemoteObject(ErrorString& errorString, int heapObjec > JSCell* cell = optionalNode->cell; > Structure* structure = cell->structure(vm); > if (!structure) { >- errorString = ASCIILiteral("Unable to get object details"); >+ errorString = "Unable to get object details"_s; > return; > } > > JSGlobalObject* globalObject = structure->globalObject(); > if (!globalObject) { >- errorString = ASCIILiteral("Unable to get object details"); >+ errorString = "Unable to get object details"_s; > return; > } > > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(globalObject->globalExec()); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Unable to get object details - InjectedScript"); >+ errorString = "Unable to get object details - InjectedScript"_s; > return; > } > >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp >index 0e3c3bea62c86368a028ca3a9ac13133aac1c0e1..9f730dee9f641f513c8a3bf57c6892fa745d4e9f 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp >@@ -56,7 +56,7 @@ static bool asBool(const bool* b) > } > > InspectorRuntimeAgent::InspectorRuntimeAgent(AgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Runtime")) >+ : InspectorAgentBase("Runtime"_s) > , m_injectedScriptManager(context.injectedScriptManager) > , m_scriptDebugServer(context.environment.scriptDebugServer()) > , m_vm(context.environment.vm()) >@@ -137,7 +137,7 @@ void InspectorRuntimeAgent::callFunctionOn(ErrorString& errorString, const Strin > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > >@@ -167,7 +167,7 @@ void InspectorRuntimeAgent::getPreview(ErrorString& errorString, const String& o > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > >@@ -184,7 +184,7 @@ void InspectorRuntimeAgent::getProperties(ErrorString& errorString, const String > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > >@@ -202,7 +202,7 @@ void InspectorRuntimeAgent::getDisplayableProperties(ErrorString& errorString, c > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > >@@ -220,7 +220,7 @@ void InspectorRuntimeAgent::getCollectionEntries(ErrorString& errorString, const > { > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > >@@ -235,10 +235,10 @@ void InspectorRuntimeAgent::saveResult(ErrorString& errorString, const JSON::Obj > InjectedScript injectedScript; > > String objectId; >- if (callArgument.getString(ASCIILiteral("objectId"), objectId)) { >+ if (callArgument.getString("objectId"_s, objectId)) { > injectedScript = m_injectedScriptManager.injectedScriptForObjectId(objectId); > if (injectedScript.hasNoValue()) { >- errorString = ASCIILiteral("Could not find InjectedScript for objectId"); >+ errorString = "Could not find InjectedScript for objectId"_s; > return; > } > } else { >@@ -268,27 +268,27 @@ void InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets(ErrorString& er > > typeDescriptions = JSON::ArrayOf<Protocol::Runtime::TypeDescription>::create(); > if (!m_vm.typeProfiler()) { >- errorString = ASCIILiteral("The VM does not currently have Type Information."); >+ errorString = "The VM does not currently have Type Information."_s; > return; > } > > MonotonicTime start = MonotonicTime::now(); >- m_vm.typeProfilerLog()->processLogEntries(ASCIILiteral("User Query")); >+ m_vm.typeProfilerLog()->processLogEntries("User Query"_s); > > for (size_t i = 0; i < locations.length(); i++) { > RefPtr<JSON::Value> value = locations.get(i); > RefPtr<JSON::Object> location; > if (!value->asObject(location)) { >- errorString = ASCIILiteral("Array of TypeLocation objects has an object that does not have type of TypeLocation."); >+ errorString = "Array of TypeLocation objects has an object that does not have type of TypeLocation."_s; > return; > } > > int descriptor; > String sourceIDAsString; > int divot; >- location->getInteger(ASCIILiteral("typeInformationDescriptor"), descriptor); >- location->getString(ASCIILiteral("sourceID"), sourceIDAsString); >- location->getInteger(ASCIILiteral("divot"), divot); >+ location->getInteger("typeInformationDescriptor"_s, descriptor); >+ location->getString("sourceID"_s, sourceIDAsString); >+ location->getInteger("divot"_s, divot); > > bool okay; > TypeLocation* typeLocation = m_vm.typeProfiler()->findLocation(divot, sourceIDAsString.toIntPtrStrict(&okay), static_cast<TypeProfilerSearchDescriptor>(descriptor), m_vm); >@@ -380,7 +380,7 @@ void InspectorRuntimeAgent::setControlFlowProfilerEnabledState(bool isControlFlo > void InspectorRuntimeAgent::getBasicBlocks(ErrorString& errorString, const String& sourceIDAsString, RefPtr<JSON::ArrayOf<Protocol::Runtime::BasicBlock>>& basicBlocks) > { > if (!m_vm.controlFlowProfiler()) { >- errorString = ASCIILiteral("The VM does not currently have a Control Flow Profiler."); >+ errorString = "The VM does not currently have a Control Flow Profiler."_s; > return; > } > >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp >index a2bc3dae8601dc3308924f969c1817b2817fbcfe..22512e91000cc6f446651d50be5e339df57bf7ec 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp >@@ -38,7 +38,7 @@ using namespace JSC; > namespace Inspector { > > InspectorScriptProfilerAgent::InspectorScriptProfilerAgent(AgentContext& context) >- : InspectorAgentBase(ASCIILiteral("ScriptProfiler")) >+ : InspectorAgentBase("ScriptProfiler"_s) > , m_frontendDispatcher(std::make_unique<ScriptProfilerFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(ScriptProfilerBackendDispatcher::create(context.backendDispatcher, this)) > , m_environment(context.environment) >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp >index 229a5ed3bf7e274317c49bacf79a31e76d1835ba..e329a3b43cd60965d9f7785a4822011ab366fa53 100644 >--- a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp >@@ -48,7 +48,7 @@ JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent(JSAgentContext& context > InjectedScript JSGlobalObjectDebuggerAgent::injectedScriptForEval(ErrorString& error, const int* executionContextId) > { > if (executionContextId) { >- error = ASCIILiteral("Execution context id is not supported for JSContext inspection as there is only one execution context."); >+ error = "Execution context id is not supported for JSContext inspection as there is only one execution context."_s; > return InjectedScript(); > } > >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp >index b748eeb0aa6a056c204c801ba0018ab89106f2be..3fdc9af6c3a6e5b86de8a5e728a1a985b677fee3 100644 >--- a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp >@@ -53,7 +53,7 @@ InjectedScript JSGlobalObjectRuntimeAgent::injectedScriptForEval(ErrorString& er > JSC::ExecState* scriptState = m_globalObject.globalExec(); > InjectedScript injectedScript = injectedScriptManager().injectedScriptFor(scriptState); > if (injectedScript.hasNoValue()) >- errorString = ASCIILiteral("Internal error: main world execution context not found."); >+ errorString = "Internal error: main world execution context not found."_s; > > return injectedScript; > } >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py b/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py >index 6fa122639243ca2b6584cb379a214fb733016f0f..fe4fb2c67d7ca88f957d27c98e653362c7492fe6 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py >@@ -124,7 +124,7 @@ class AlternateBackendDispatcher { > Ref<${domainName}BackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > ${dispatchCases} > else >@@ -137,7 +137,7 @@ class AlternateBackendDispatcher { > Ref<${domainName}BackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > typedef void (${domainName}BackendDispatcher::*CallHandler)(long requestId, RefPtr<JSON::Object>&& message); > typedef HashMap<String, CallHandler> DispatchMap; >@@ -173,13 +173,13 @@ class AlternateBackendDispatcher { > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("${domainName}"), this); >+ m_backendDispatcher->registerDispatcherForDomain("${domainName}"_s, this); > }""") > > BackendDispatcherImplementationPrepareCommandArguments = ( > """${inParameterDeclarations} > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method \'${domainName}.${commandName}\' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method \'${domainName}.${commandName}\' can't be processed"_s); > return; > } > """) >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py >index aaca392672707b2d707b1cedf9f1a46c702a882d..c558ed4edb022cceb929f2be6496b4aa46b1cb82 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py >@@ -164,14 +164,14 @@ def _generate_async_dispatcher_class_for_domain(self, command, domain): > if parameter.is_optional: > if CppGenerator.should_use_wrapper_for_return_type(parameter.type): > out_parameter_assignments.append(' if (%(parameterName)s.has_value())' % param_args) >- out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), *%(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s("%(parameterKey)s"_s, *%(parameterName)s);' % param_args) > else: > out_parameter_assignments.append(' if (%(parameterName)s)' % param_args) >- out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), %(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s("%(parameterKey)s"_s, %(parameterName)s);' % param_args) > elif parameter.type.is_enum(): >- out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(%(parameterName)s));' % param_args) >+ out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s("%(parameterKey)s"_s, Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(%(parameterName)s));' % param_args) > else: >- out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), %(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' jsonMessage->%(keyedSetMethod)s("%(parameterKey)s"_s, %(parameterName)s);' % param_args) > > async_args = { > 'domainName': domain.domain_name, >@@ -224,7 +224,7 @@ def _generate_dispatcher_implementation_for_command(self, command, domain): > 'successOutParam': out_success_argument > } > >- in_parameter_declarations.append(' %(parameterType)s %(parameterName)s = m_backendDispatcher->%(keyedGetMethod)s(parameters.get(), ASCIILiteral("%(parameterKey)s"), %(successOutParam)s);' % param_args) >+ in_parameter_declarations.append(' %(parameterType)s %(parameterName)s = m_backendDispatcher->%(keyedGetMethod)s(parameters.get(), "%(parameterKey)s"_s, %(successOutParam)s);' % param_args) > > if parameter.is_optional: > optional_in_parameter_string = '%(parameterName)s_valueFound ? %(parameterExpression)s : nullptr' % param_args >@@ -259,14 +259,14 @@ def _generate_dispatcher_implementation_for_command(self, command, domain): > if parameter.is_optional: > if CppGenerator.should_use_wrapper_for_return_type(parameter.type): > out_parameter_assignments.append(' if (out_%(parameterName)s.has_value())' % param_args) >- out_parameter_assignments.append(' result->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), *out_%(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' result->%(keyedSetMethod)s("%(parameterKey)s"_s, *out_%(parameterName)s);' % param_args) > else: > out_parameter_assignments.append(' if (out_%(parameterName)s)' % param_args) >- out_parameter_assignments.append(' result->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), out_%(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' result->%(keyedSetMethod)s("%(parameterKey)s"_s, out_%(parameterName)s);' % param_args) > elif parameter.type.is_enum(): >- out_parameter_assignments.append(' result->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(out_%(parameterName)s));' % param_args) >+ out_parameter_assignments.append(' result->%(keyedSetMethod)s("%(parameterKey)s"_s, Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(out_%(parameterName)s));' % param_args) > else: >- out_parameter_assignments.append(' result->%(keyedSetMethod)s(ASCIILiteral("%(parameterKey)s"), out_%(parameterName)s);' % param_args) >+ out_parameter_assignments.append(' result->%(keyedSetMethod)s("%(parameterKey)s"_s, out_%(parameterName)s);' % param_args) > > if CppGenerator.should_pass_by_copy_for_return_type(parameter.type) or parameter.is_optional and CppGenerator.should_use_wrapper_for_return_type(parameter.type): > method_parameters.append('out_' + parameter.parameter_name) >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py >index 8331cf36203cbc24508b30e1851756d6c55f58b2..b6965f57f3bff9b372c273c3ebe9c7a5a6e8d953 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py >@@ -100,9 +100,9 @@ def _generate_dispatcher_implementation_for_event(self, event, domain): > > if parameter.is_optional: > parameter_assignments.append(' if (%(parameterName)s)' % parameter_args) >- parameter_assignments.append(' paramsObject->%(keyedSetMethod)s(ASCIILiteral("%(parameterName)s"), %(parameterValue)s);' % parameter_args) >+ parameter_assignments.append(' paramsObject->%(keyedSetMethod)s("%(parameterName)s"_s, %(parameterValue)s);' % parameter_args) > else: >- parameter_assignments.append(' paramsObject->%(keyedSetMethod)s(ASCIILiteral("%(parameterName)s"), %(parameterValue)s);' % parameter_args) >+ parameter_assignments.append(' paramsObject->%(keyedSetMethod)s("%(parameterName)s"_s, %(parameterValue)s);' % parameter_args) > > formal_parameters.append('%s %s' % (CppGenerator.cpp_type_for_checked_formal_event_parameter(parameter), parameter.parameter_name)) > >@@ -115,12 +115,12 @@ def _generate_dispatcher_implementation_for_event(self, event, domain): > lines.append('void %(domainName)sFrontendDispatcher::%(eventName)s(%(formalParameters)s)' % event_args) > lines.append('{') > lines.append(' Ref<JSON::Object> jsonMessage = JSON::Object::create();') >- lines.append(' jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("%(domainName)s.%(eventName)s"));' % event_args) >+ lines.append(' jsonMessage->setString("method"_s, "%(domainName)s.%(eventName)s"_s);' % event_args) > > if len(parameter_assignments) > 0: > lines.append(' Ref<JSON::Object> paramsObject = JSON::Object::create();') > lines.extend(parameter_assignments) >- lines.append(' jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));') >+ lines.append(' jsonMessage->setObject("params"_s, WTFMove(paramsObject));') > > lines.append('') > lines.append(' m_frontendRouter.sendEvent(jsonMessage->toJSONString());') >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py >index 938e2ee77b6a6f1c5f1b7ad1c2eb3a36f1f322f0..a418e511833bd5789c7985f9187ae3b725a140c2 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py >@@ -308,9 +308,9 @@ def _generate_builder_setter_for_member(self, type_member, domain): > lines.append(' COMPILE_ASSERT(!(STATE & %(camelName)sSet), property_%(name)s_already_set);' % setter_args) > > if isinstance(type_member.type, EnumType): >- lines.append(' m_result->%(keyedSet)s(ASCIILiteral("%(name)s"), Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(value));' % setter_args) >+ lines.append(' m_result->%(keyedSet)s("%(name)s"_s, Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(value));' % setter_args) > else: >- lines.append(' m_result->%(keyedSet)s(ASCIILiteral("%(name)s"), value);' % setter_args) >+ lines.append(' m_result->%(keyedSet)s("%(name)s"_s, value);' % setter_args) > lines.append(' return castState<%(camelName)sSet>();' % setter_args) > lines.append(' }') > return '\n'.join(lines) >@@ -329,11 +329,11 @@ def _generate_unchecked_setter_for_member(self, type_member, domain): > lines.append(' void set%(camelName)s(%(parameterType)s value)' % setter_args) > lines.append(' {') > if isinstance(type_member.type, EnumType): >- lines.append(' JSON::ObjectBase::%(keyedSet)s(ASCIILiteral("%(name)s"), Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(value));' % setter_args) >+ lines.append(' JSON::ObjectBase::%(keyedSet)s("%(name)s"_s, Inspector::Protocol::%(helpersNamespace)s::getEnumConstantValue(value));' % setter_args) > elif CppGenerator.should_use_references_for_type(type_member.type): >- lines.append(' JSON::ObjectBase::%(keyedSet)s(ASCIILiteral("%(name)s"), WTFMove(value));' % setter_args) >+ lines.append(' JSON::ObjectBase::%(keyedSet)s("%(name)s"_s, WTFMove(value));' % setter_args) > else: >- lines.append(' JSON::ObjectBase::%(keyedSet)s(ASCIILiteral("%(name)s"), value);' % setter_args) >+ lines.append(' JSON::ObjectBase::%(keyedSet)s("%(name)s"_s, value);' % setter_args) > lines.append(' }') > return '\n'.join(lines) > >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py >index f7a932e3dec62fe1e2715f367e98e5c3da3307a0..5e7aec23ae6e247271e8dc10d29d770c63a9ec27 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py >@@ -221,7 +221,7 @@ def _generate_assertion_for_object_declaration(self, object_declaration): > } > > lines.append(""" { >- auto %(memberName)sPos = object->find(ASCIILiteral("%(memberName)s")); >+ auto %(memberName)sPos = object->find("%(memberName)s"_s); > ASSERT(%(memberName)sPos != object->end()); > %(assertMethod)s(%(memberName)sPos->value.get()); > }""" % args) >@@ -237,7 +237,7 @@ def _generate_assertion_for_object_declaration(self, object_declaration): > } > > lines.append(""" { >- auto %(memberName)sPos = object->find(ASCIILiteral("%(memberName)s")); >+ auto %(memberName)sPos = object->find("%(memberName)s"_s); > if (%(memberName)sPos != object->end()) { > %(assertMethod)s(%(memberName)sPos->value.get());""" % args) > >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py >index 2a24718ee3a6d509abf7dda3240d605fffad6f6d..ad5616516bb5d258d7ee46f79a7fef97cda6d4a2 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py >@@ -136,10 +136,10 @@ def _generate_success_block_for_command(self, domain, command): > var_expression = '*%s' % var_name if parameter.is_optional else var_name > export_expression = self.objc_protocol_export_expression_for_variable(parameter.type, var_expression) > if not parameter.is_optional: >- lines.append(' resultObject->%s(ASCIILiteral("%s"), %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) >+ lines.append(' resultObject->%s("%s"_s, %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) > else: > lines.append(' if (%s)' % var_name) >- lines.append(' resultObject->%s(ASCIILiteral("%s"), %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) >+ lines.append(' resultObject->%s("%s"_s, %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) > lines.append(' backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false);') > else: > lines.append(' backendDispatcher()->sendResponse(requestId, JSON::Object::create(), false);') >@@ -177,7 +177,7 @@ def in_param_expression(param_name, parameter): > > if isinstance(parameter.type, EnumType): > lines.append(' if (!%s) {' % objc_in_param_name) >- lines.append(' backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Parameter \'%s\' of method \'%s.%s\' cannot be processed" });' % (parameter.parameter_name, domain.domain_name, command.command_name)) >+ lines.append(' backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, "Parameter \'%s\' of method \'%s.%s\' cannot be processed"_s);' % (parameter.parameter_name, domain.domain_name, command.command_name)) > lines.append(' return;') > lines.append(' }') > >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py >index be37efad12737c6d7da1cb555599c9a1de9adc41..654f9b4bf8a4406ff53a0b3db170fda4d406751d 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py >@@ -120,7 +120,7 @@ def _generate_event(self, domain, event): > lines.append('') > > lines.append(' Ref<JSON::Object> jsonMessage = JSON::Object::create();') >- lines.append(' jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("%s.%s"));' % (domain.domain_name, event.event_name)) >+ lines.append(' jsonMessage->setString("method"_s, "%s.%s"_s);' % (domain.domain_name, event.event_name)) > if event.event_parameters: > lines.extend(self._generate_event_out_parameters(domain, event)) > lines.append(' router.sendEvent(jsonMessage->toJSONString());') >@@ -146,9 +146,9 @@ def _generate_event_out_parameters(self, domain, event): > safe_var_name = '(*%s)' % var_name if parameter.is_optional else var_name > export_expression = self.objc_protocol_export_expression_for_variable(parameter.type, safe_var_name) > if not parameter.is_optional: >- lines.append(' paramsObject->%s(ASCIILiteral("%s"), %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) >+ lines.append(' paramsObject->%s("%s"_s, %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) > else: > lines.append(' if (%s)' % (parameter.parameter_name)) >- lines.append(' paramsObject->%s(ASCIILiteral("%s"), %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) >- lines.append(' jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject));') >+ lines.append(' paramsObject->%s("%s"_s, %s);' % (keyed_set_method, parameter.parameter_name, export_expression)) >+ lines.append(' jsonMessage->setObject("params"_s, WTFMove(paramsObject));') > return lines >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py >index ea9e6e2d77418b91bd684f091b56eba5f77c807b..84cbdda177312c6c69333e7a0ed1a6ae54ff9c4d 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py >@@ -147,7 +147,7 @@ def _generate_enum_objc_to_protocol_string(self, objc_enum_name, enum_values): > lines.append(' switch(value) {') > for enum_value in enum_values: > lines.append(' case %s%s:' % (objc_enum_name, Generator.stylized_name_for_enum_value(enum_value))) >- lines.append(' return ASCIILiteral("%s");' % enum_value) >+ lines.append(' return "%s"_s;' % enum_value) > lines.append(' }') > lines.append('}') > return '\n'.join(lines) >diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py b/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py >index 1c30c40d48654013e2d57634b5b6cb49869d591b..6fc2b1d3633d1f1ddeca39415f8f51c09baf8910 100755 >--- a/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py >+++ b/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py >@@ -137,7 +137,7 @@ class ObjCGeneratorTemplates: > _${variableNamePrefix}Handler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspector${domainName}BackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<${domainName}BackendDispatcher, Alternate${domainName}BackendDispatcher>>(ASCIILiteral("${domainName}"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<${domainName}BackendDispatcher, Alternate${domainName}BackendDispatcher>>("${domainName}"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result b/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result >index 9a63823cb46ae6a81155547e76acdba42d3c76ce..6fa66bb952475848e82e04278f87a414d6192d12 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result >@@ -225,7 +225,7 @@ NetworkBackendDispatcher::NetworkBackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Network"_s, this); > } > > void NetworkBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -233,7 +233,7 @@ void NetworkBackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<NetworkBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "loadResource") > loadResource(requestId, WTFMove(parameters)); >@@ -358,7 +358,7 @@ namespace Inspector { > void NetworkFrontendDispatcher::resourceLoaded() > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network.resourceLoaded"_s); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -449,14 +449,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -768,7 +768,7 @@ using namespace Inspector; > _networkHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorNetworkBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<NetworkBackendDispatcher, AlternateNetworkBackendDispatcher>>(ASCIILiteral("Network"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<NetworkBackendDispatcher, AlternateNetworkBackendDispatcher>>("Network"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -847,7 +847,7 @@ using namespace Inspector; > const FrontendRouter& router = _controller->frontendRouter(); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network.resourceLoaded"_s); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -1012,13 +1012,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result >index 824b606e94d7a6290aa5056f377eabe4d789138e..b417e67b8cc6f4187a794c0cf84e3961ad31aa5d 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result >@@ -254,7 +254,7 @@ DatabaseBackendDispatcher::DatabaseBackendDispatcher(BackendDispatcher& backendD > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Database"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Database"_s, this); > } > > void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -262,7 +262,7 @@ void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, R > Ref<DatabaseBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "executeSQLSyncOptionalReturnValues") > executeSQLSyncOptionalReturnValues(requestId, WTFMove(parameters)); >@@ -278,10 +278,10 @@ void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, R > > void DatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues(long requestId, RefPtr<JSON::Object>&& parameters) > { >- int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr); >- String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr); >+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, nullptr); >+ String in_query = m_backendDispatcher->getString(parameters.get(), "query"_s, nullptr); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeSQLSyncOptionalReturnValues' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeSQLSyncOptionalReturnValues' can't be processed"_s); > return; > } > >@@ -308,25 +308,25 @@ void DatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues(long requestI > > if (!error.length()) { > if (out_columnNames) >- result->setArray(ASCIILiteral("columnNames"), out_columnNames); >+ result->setArray("columnNames"_s, out_columnNames); > if (out_notes.has_value()) >- result->setString(ASCIILiteral("notes"), *out_notes); >+ result->setString("notes"_s, *out_notes); > if (out_timestamp.has_value()) >- result->setDouble(ASCIILiteral("timestamp"), *out_timestamp); >+ result->setDouble("timestamp"_s, *out_timestamp); > if (out_values.has_value()) >- result->setObject(ASCIILiteral("values"), *out_values); >+ result->setObject("values"_s, *out_values); > if (out_payload.has_value()) >- result->setValue(ASCIILiteral("payload"), *out_payload); >+ result->setValue("payload"_s, *out_payload); > if (out_databaseId.has_value()) >- result->setInteger(ASCIILiteral("databaseId"), *out_databaseId); >+ result->setInteger("databaseId"_s, *out_databaseId); > if (out_sqlError) >- result->setObject(ASCIILiteral("sqlError"), out_sqlError); >+ result->setObject("sqlError"_s, out_sqlError); > if (out_screenColor.has_value()) >- result->setString(ASCIILiteral("screenColor"), *out_screenColor); >+ result->setString("screenColor"_s, *out_screenColor); > if (out_alternateColors) >- result->setArray(ASCIILiteral("alternateColors"), out_alternateColors); >+ result->setArray("alternateColors"_s, out_alternateColors); > if (out_printColor.has_value()) >- result->setString(ASCIILiteral("printColor"), *out_printColor); >+ result->setString("printColor"_s, *out_printColor); > } > if (!error.length()) > m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); >@@ -340,34 +340,34 @@ void DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallba > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); > if (columnNames) >- jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames); >+ jsonMessage->setArray("columnNames"_s, columnNames); > if (notes.has_value()) >- jsonMessage->setString(ASCIILiteral("notes"), *notes); >+ jsonMessage->setString("notes"_s, *notes); > if (timestamp.has_value()) >- jsonMessage->setDouble(ASCIILiteral("timestamp"), *timestamp); >+ jsonMessage->setDouble("timestamp"_s, *timestamp); > if (values.has_value()) >- jsonMessage->setObject(ASCIILiteral("values"), *values); >+ jsonMessage->setObject("values"_s, *values); > if (payload.has_value()) >- jsonMessage->setValue(ASCIILiteral("payload"), *payload); >+ jsonMessage->setValue("payload"_s, *payload); > if (databaseId.has_value()) >- jsonMessage->setInteger(ASCIILiteral("databaseId"), *databaseId); >+ jsonMessage->setInteger("databaseId"_s, *databaseId); > if (sqlError) >- jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError); >+ jsonMessage->setObject("sqlError"_s, sqlError); > if (screenColor.has_value()) >- jsonMessage->setString(ASCIILiteral("screenColor"), *screenColor); >+ jsonMessage->setString("screenColor"_s, *screenColor); > if (alternateColors) >- jsonMessage->setArray(ASCIILiteral("alternateColors"), alternateColors); >+ jsonMessage->setArray("alternateColors"_s, alternateColors); > if (printColor.has_value()) >- jsonMessage->setString(ASCIILiteral("printColor"), *printColor); >+ jsonMessage->setString("printColor"_s, *printColor); > CallbackBase::sendSuccess(WTFMove(jsonMessage)); > } > > void DatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues(long requestId, RefPtr<JSON::Object>&& parameters) > { >- int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr); >- String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr); >+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, nullptr); >+ String in_query = m_backendDispatcher->getString(parameters.get(), "query"_s, nullptr); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeSQLAsyncOptionalReturnValues' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeSQLAsyncOptionalReturnValues' can't be processed"_s); > return; > } > >@@ -385,10 +385,10 @@ void DatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues(long request > > void DatabaseBackendDispatcher::executeSQLSync(long requestId, RefPtr<JSON::Object>&& parameters) > { >- int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr); >- String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr); >+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, nullptr); >+ String in_query = m_backendDispatcher->getString(parameters.get(), "query"_s, nullptr); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeSQLSync' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeSQLSync' can't be processed"_s); > return; > } > >@@ -414,16 +414,16 @@ void DatabaseBackendDispatcher::executeSQLSync(long requestId, RefPtr<JSON::Obje > m_agent->executeSQLSync(error, in_databaseId, in_query, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, out_alternateColors, &out_screenColor, &out_printColor); > > if (!error.length()) { >- result->setArray(ASCIILiteral("columnNames"), out_columnNames); >- result->setString(ASCIILiteral("notes"), out_notes); >- result->setDouble(ASCIILiteral("timestamp"), out_timestamp); >- result->setObject(ASCIILiteral("values"), out_values); >- result->setValue(ASCIILiteral("payload"), out_payload); >- result->setInteger(ASCIILiteral("databaseId"), out_databaseId); >- result->setObject(ASCIILiteral("sqlError"), out_sqlError); >- result->setArray(ASCIILiteral("alternateColors"), out_alternateColors); >- result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor)); >- result->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor)); >+ result->setArray("columnNames"_s, out_columnNames); >+ result->setString("notes"_s, out_notes); >+ result->setDouble("timestamp"_s, out_timestamp); >+ result->setObject("values"_s, out_values); >+ result->setValue("payload"_s, out_payload); >+ result->setInteger("databaseId"_s, out_databaseId); >+ result->setObject("sqlError"_s, out_sqlError); >+ result->setArray("alternateColors"_s, out_alternateColors); >+ result->setString("screenColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor)); >+ result->setString("printColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor)); > } > if (!error.length()) > m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); >@@ -436,25 +436,25 @@ DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback::ExecuteSQLAsyncCallba > void DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback::sendSuccess(RefPtr<JSON::ArrayOf<String>>&& columnNames, const String& notes, double timestamp, JSON::Object values, JSON::Value payload, int databaseId, RefPtr<Inspector::Protocol::Database::Error>&& sqlError, const String& screenColor, RefPtr<Inspector::Protocol::Database::ColorList>&& alternateColors, const String& printColor) > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setArray(ASCIILiteral("columnNames"), columnNames); >- jsonMessage->setString(ASCIILiteral("notes"), notes); >- jsonMessage->setDouble(ASCIILiteral("timestamp"), timestamp); >- jsonMessage->setObject(ASCIILiteral("values"), values); >- jsonMessage->setValue(ASCIILiteral("payload"), payload); >- jsonMessage->setInteger(ASCIILiteral("databaseId"), databaseId); >- jsonMessage->setObject(ASCIILiteral("sqlError"), sqlError); >- jsonMessage->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(screenColor)); >- jsonMessage->setArray(ASCIILiteral("alternateColors"), alternateColors); >- jsonMessage->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(printColor)); >+ jsonMessage->setArray("columnNames"_s, columnNames); >+ jsonMessage->setString("notes"_s, notes); >+ jsonMessage->setDouble("timestamp"_s, timestamp); >+ jsonMessage->setObject("values"_s, values); >+ jsonMessage->setValue("payload"_s, payload); >+ jsonMessage->setInteger("databaseId"_s, databaseId); >+ jsonMessage->setObject("sqlError"_s, sqlError); >+ jsonMessage->setString("screenColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(screenColor)); >+ jsonMessage->setArray("alternateColors"_s, alternateColors); >+ jsonMessage->setString("printColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(printColor)); > CallbackBase::sendSuccess(WTFMove(jsonMessage)); > } > > void DatabaseBackendDispatcher::executeSQLAsync(long requestId, RefPtr<JSON::Object>&& parameters) > { >- int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr); >- String in_query = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("query"), nullptr); >+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, nullptr); >+ String in_query = m_backendDispatcher->getString(parameters.get(), "query"_s, nullptr); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeSQLAsync' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeSQLAsync' can't be processed"_s); > return; > } > >@@ -668,14 +668,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -916,25 +916,25 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLSyncOptionalReturnValues( > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); > if (columnNames) >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(*columnNames)); > if (notes) >- resultObject->setString(ASCIILiteral("notes"), *notes); >+ resultObject->setString("notes"_s, *notes); > if (timestamp) >- resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); >+ resultObject->setDouble("timestamp"_s, *timestamp); > if (values) >- resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); >+ resultObject->setObject("values"_s, [*values toJSONObject]); > if (payload) >- resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); >+ resultObject->setValue("payload"_s, [*payload toJSONObject]); > if (databaseId) >- resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); >+ resultObject->setInteger("databaseId"_s, *databaseId); > if (sqlError) >- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); >+ resultObject->setObject("sqlError"_s, [*sqlError toJSONObject]); > if (screenColor) >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); >+ resultObject->setString("screenColor"_s, toProtocolString(*screenColor)); > if (alternateColors) >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(*alternateColors)); > if (printColor) >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); >+ resultObject->setString("printColor"_s, toProtocolString(*printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -960,25 +960,25 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsyncOptionalReturnValues > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); > if (columnNames) >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(*columnNames)); > if (notes) >- resultObject->setString(ASCIILiteral("notes"), *notes); >+ resultObject->setString("notes"_s, *notes); > if (timestamp) >- resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); >+ resultObject->setDouble("timestamp"_s, *timestamp); > if (values) >- resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); >+ resultObject->setObject("values"_s, [*values toJSONObject]); > if (payload) >- resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); >+ resultObject->setValue("payload"_s, [*payload toJSONObject]); > if (databaseId) >- resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); >+ resultObject->setInteger("databaseId"_s, *databaseId); > if (sqlError) >- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); >+ resultObject->setObject("sqlError"_s, [*sqlError toJSONObject]); > if (screenColor) >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); >+ resultObject->setString("screenColor"_s, toProtocolString(*screenColor)); > if (alternateColors) >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(*alternateColors)); > if (printColor) >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); >+ resultObject->setString("printColor"_s, toProtocolString(*printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -1003,16 +1003,16 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLSync(long requestId, int > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); >- resultObject->setString(ASCIILiteral("notes"), notes); >- resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); >- resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); >- resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); >- resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); >- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(columnNames)); >+ resultObject->setString("notes"_s, notes); >+ resultObject->setDouble("timestamp"_s, timestamp); >+ resultObject->setObject("values"_s, [values toJSONObject]); >+ resultObject->setValue("payload"_s, [payload toJSONObject]); >+ resultObject->setInteger("databaseId"_s, databaseId); >+ resultObject->setObject("sqlError"_s, [sqlError toJSONObject]); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(alternateColors)); >+ resultObject->setString("screenColor"_s, toProtocolString(screenColor)); >+ resultObject->setString("printColor"_s, toProtocolString(printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -1037,16 +1037,16 @@ void ObjCInspectorDatabaseBackendDispatcher::executeSQLAsync(long requestId, int > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); >- resultObject->setString(ASCIILiteral("notes"), notes); >- resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); >- resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); >- resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); >- resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); >- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(columnNames)); >+ resultObject->setString("notes"_s, notes); >+ resultObject->setDouble("timestamp"_s, timestamp); >+ resultObject->setObject("values"_s, [values toJSONObject]); >+ resultObject->setValue("payload"_s, [payload toJSONObject]); >+ resultObject->setInteger("databaseId"_s, databaseId); >+ resultObject->setObject("sqlError"_s, [sqlError toJSONObject]); >+ resultObject->setString("screenColor"_s, toProtocolString(screenColor)); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(alternateColors)); >+ resultObject->setString("printColor"_s, toProtocolString(printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -1175,7 +1175,7 @@ using namespace Inspector; > _databaseHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>("Database"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1417,13 +1417,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -1446,11 +1446,11 @@ inline String toProtocolString(TestProtocolDatabasePrimaryColors value) > { > switch(value) { > case TestProtocolDatabasePrimaryColorsRed: >- return ASCIILiteral("red"); >+ return "red"_s; > case TestProtocolDatabasePrimaryColorsGreen: >- return ASCIILiteral("green"); >+ return "green"_s; > case TestProtocolDatabasePrimaryColorsBlue: >- return ASCIILiteral("blue"); >+ return "blue"_s; > } > } > >@@ -1470,13 +1470,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteSQLSyncOptionalReturnV > { > switch(value) { > case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1498,13 +1498,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteSQLAsyncOptionalReturn > { > switch(value) { > case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1526,13 +1526,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteSQLSyncPrintColor valu > { > switch(value) { > case TestProtocolDatabaseExecuteSQLSyncPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteSQLSyncPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteSQLSyncPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteSQLSyncPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1554,13 +1554,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteSQLAsyncPrintColor val > { > switch(value) { > case TestProtocolDatabaseExecuteSQLAsyncPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteSQLAsyncPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteSQLAsyncPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteSQLAsyncPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result >index 9c64f28ff469a4992da6f0f4ef2510a01de68206..7cc80151bcdb37323304252ffd82bbe30b3d9802 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result >@@ -235,7 +235,7 @@ DatabaseBackendDispatcher::DatabaseBackendDispatcher(BackendDispatcher& backendD > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Database"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Database"_s, this); > } > > void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -243,7 +243,7 @@ void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, R > Ref<DatabaseBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "executeAllOptionalParameters") > executeAllOptionalParameters(requestId, WTFMove(parameters)); >@@ -256,27 +256,27 @@ void DatabaseBackendDispatcher::dispatch(long requestId, const String& method, R > void DatabaseBackendDispatcher::executeAllOptionalParameters(long requestId, RefPtr<JSON::Object>&& parameters) > { > bool opt_in_columnNames_valueFound = false; >- RefPtr<JSON::Array> opt_in_columnNames = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("columnNames"), &opt_in_columnNames_valueFound); >+ RefPtr<JSON::Array> opt_in_columnNames = m_backendDispatcher->getArray(parameters.get(), "columnNames"_s, &opt_in_columnNames_valueFound); > bool opt_in_notes_valueFound = false; >- String opt_in_notes = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("notes"), &opt_in_notes_valueFound); >+ String opt_in_notes = m_backendDispatcher->getString(parameters.get(), "notes"_s, &opt_in_notes_valueFound); > bool opt_in_timestamp_valueFound = false; >- std::optional<double> opt_in_timestamp = m_backendDispatcher->getDouble(parameters.get(), ASCIILiteral("timestamp"), &opt_in_timestamp_valueFound); >+ std::optional<double> opt_in_timestamp = m_backendDispatcher->getDouble(parameters.get(), "timestamp"_s, &opt_in_timestamp_valueFound); > bool opt_in_values_valueFound = false; >- RefPtr<JSON::Object> opt_in_values = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("values"), &opt_in_values_valueFound); >+ RefPtr<JSON::Object> opt_in_values = m_backendDispatcher->getObject(parameters.get(), "values"_s, &opt_in_values_valueFound); > bool opt_in_payload_valueFound = false; >- RefPtr<JSON::Value> opt_in_payload = m_backendDispatcher->getValue(parameters.get(), ASCIILiteral("payload"), &opt_in_payload_valueFound); >+ RefPtr<JSON::Value> opt_in_payload = m_backendDispatcher->getValue(parameters.get(), "payload"_s, &opt_in_payload_valueFound); > bool opt_in_databaseId_valueFound = false; >- int opt_in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), &opt_in_databaseId_valueFound); >+ int opt_in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, &opt_in_databaseId_valueFound); > bool opt_in_sqlError_valueFound = false; >- RefPtr<JSON::Object> opt_in_sqlError = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("sqlError"), &opt_in_sqlError_valueFound); >+ RefPtr<JSON::Object> opt_in_sqlError = m_backendDispatcher->getObject(parameters.get(), "sqlError"_s, &opt_in_sqlError_valueFound); > bool opt_in_screenColor_valueFound = false; >- String opt_in_screenColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("screenColor"), &opt_in_screenColor_valueFound); >+ String opt_in_screenColor = m_backendDispatcher->getString(parameters.get(), "screenColor"_s, &opt_in_screenColor_valueFound); > bool opt_in_alternateColors_valueFound = false; >- RefPtr<JSON::Array> opt_in_alternateColors = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("alternateColors"), &opt_in_alternateColors_valueFound); >+ RefPtr<JSON::Array> opt_in_alternateColors = m_backendDispatcher->getArray(parameters.get(), "alternateColors"_s, &opt_in_alternateColors_valueFound); > bool opt_in_printColor_valueFound = false; >- String opt_in_printColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("printColor"), &opt_in_printColor_valueFound); >+ String opt_in_printColor = m_backendDispatcher->getString(parameters.get(), "printColor"_s, &opt_in_printColor_valueFound); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeAllOptionalParameters' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeAllOptionalParameters' can't be processed"_s); > return; > } > >@@ -303,25 +303,25 @@ void DatabaseBackendDispatcher::executeAllOptionalParameters(long requestId, Ref > > if (!error.length()) { > if (out_columnNames) >- result->setArray(ASCIILiteral("columnNames"), out_columnNames); >+ result->setArray("columnNames"_s, out_columnNames); > if (out_notes.has_value()) >- result->setString(ASCIILiteral("notes"), *out_notes); >+ result->setString("notes"_s, *out_notes); > if (out_timestamp.has_value()) >- result->setDouble(ASCIILiteral("timestamp"), *out_timestamp); >+ result->setDouble("timestamp"_s, *out_timestamp); > if (out_values.has_value()) >- result->setObject(ASCIILiteral("values"), *out_values); >+ result->setObject("values"_s, *out_values); > if (out_payload.has_value()) >- result->setValue(ASCIILiteral("payload"), *out_payload); >+ result->setValue("payload"_s, *out_payload); > if (out_databaseId.has_value()) >- result->setInteger(ASCIILiteral("databaseId"), *out_databaseId); >+ result->setInteger("databaseId"_s, *out_databaseId); > if (out_sqlError) >- result->setObject(ASCIILiteral("sqlError"), out_sqlError); >+ result->setObject("sqlError"_s, out_sqlError); > if (out_screenColor.has_value()) >- result->setString(ASCIILiteral("screenColor"), *out_screenColor); >+ result->setString("screenColor"_s, *out_screenColor); > if (out_alternateColors) >- result->setArray(ASCIILiteral("alternateColors"), out_alternateColors); >+ result->setArray("alternateColors"_s, out_alternateColors); > if (out_printColor.has_value()) >- result->setString(ASCIILiteral("printColor"), *out_printColor); >+ result->setString("printColor"_s, *out_printColor); > } > if (!error.length()) > m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); >@@ -331,18 +331,18 @@ void DatabaseBackendDispatcher::executeAllOptionalParameters(long requestId, Ref > > void DatabaseBackendDispatcher::executeNoOptionalParameters(long requestId, RefPtr<JSON::Object>&& parameters) > { >- RefPtr<JSON::Array> in_columnNames = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("columnNames"), nullptr); >- String in_notes = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("notes"), nullptr); >- double in_timestamp = m_backendDispatcher->getDouble(parameters.get(), ASCIILiteral("timestamp"), nullptr); >- RefPtr<JSON::Object> in_values = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("values"), nullptr); >- RefPtr<JSON::Value> in_payload = m_backendDispatcher->getValue(parameters.get(), ASCIILiteral("payload"), nullptr); >- int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), ASCIILiteral("databaseId"), nullptr); >- RefPtr<JSON::Object> in_sqlError = m_backendDispatcher->getObject(parameters.get(), ASCIILiteral("sqlError"), nullptr); >- String in_screenColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("screenColor"), nullptr); >- RefPtr<JSON::Array> in_alternateColors = m_backendDispatcher->getArray(parameters.get(), ASCIILiteral("alternateColors"), nullptr); >- String in_printColor = m_backendDispatcher->getString(parameters.get(), ASCIILiteral("printColor"), nullptr); >+ RefPtr<JSON::Array> in_columnNames = m_backendDispatcher->getArray(parameters.get(), "columnNames"_s, nullptr); >+ String in_notes = m_backendDispatcher->getString(parameters.get(), "notes"_s, nullptr); >+ double in_timestamp = m_backendDispatcher->getDouble(parameters.get(), "timestamp"_s, nullptr); >+ RefPtr<JSON::Object> in_values = m_backendDispatcher->getObject(parameters.get(), "values"_s, nullptr); >+ RefPtr<JSON::Value> in_payload = m_backendDispatcher->getValue(parameters.get(), "payload"_s, nullptr); >+ int in_databaseId = m_backendDispatcher->getInteger(parameters.get(), "databaseId"_s, nullptr); >+ RefPtr<JSON::Object> in_sqlError = m_backendDispatcher->getObject(parameters.get(), "sqlError"_s, nullptr); >+ String in_screenColor = m_backendDispatcher->getString(parameters.get(), "screenColor"_s, nullptr); >+ RefPtr<JSON::Array> in_alternateColors = m_backendDispatcher->getArray(parameters.get(), "alternateColors"_s, nullptr); >+ String in_printColor = m_backendDispatcher->getString(parameters.get(), "printColor"_s, nullptr); > if (m_backendDispatcher->hasProtocolErrors()) { >- m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Some arguments of method 'Database.executeNoOptionalParameters' can't be processed" }); >+ m_backendDispatcher->reportProtocolError(BackendDispatcher::InvalidParams, "Some arguments of method 'Database.executeNoOptionalParameters' can't be processed"_s); > return; > } > >@@ -368,16 +368,16 @@ void DatabaseBackendDispatcher::executeNoOptionalParameters(long requestId, RefP > m_agent->executeNoOptionalParameters(error, *in_columnNames, in_notes, in_timestamp, *in_values, *in_payload, in_databaseId, *in_sqlError, in_screenColor, *in_alternateColors, in_printColor, out_columnNames, &out_notes, &out_timestamp, out_values, &out_payload, &out_databaseId, out_sqlError, &out_screenColor, out_alternateColors, &out_printColor); > > if (!error.length()) { >- result->setArray(ASCIILiteral("columnNames"), out_columnNames); >- result->setString(ASCIILiteral("notes"), out_notes); >- result->setDouble(ASCIILiteral("timestamp"), out_timestamp); >- result->setObject(ASCIILiteral("values"), out_values); >- result->setValue(ASCIILiteral("payload"), out_payload); >- result->setInteger(ASCIILiteral("databaseId"), out_databaseId); >- result->setObject(ASCIILiteral("sqlError"), out_sqlError); >- result->setString(ASCIILiteral("screenColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor)); >- result->setArray(ASCIILiteral("alternateColors"), out_alternateColors); >- result->setString(ASCIILiteral("printColor"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor)); >+ result->setArray("columnNames"_s, out_columnNames); >+ result->setString("notes"_s, out_notes); >+ result->setDouble("timestamp"_s, out_timestamp); >+ result->setObject("values"_s, out_values); >+ result->setValue("payload"_s, out_payload); >+ result->setInteger("databaseId"_s, out_databaseId); >+ result->setObject("sqlError"_s, out_sqlError); >+ result->setString("screenColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(out_screenColor)); >+ result->setArray("alternateColors"_s, out_alternateColors); >+ result->setString("printColor"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(out_printColor)); > } > if (!error.length()) > m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); >@@ -583,14 +583,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -829,25 +829,25 @@ void ObjCInspectorDatabaseBackendDispatcher::executeAllOptionalParameters(long r > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors"); > if (columnNames) >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(*columnNames)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(*columnNames)); > if (notes) >- resultObject->setString(ASCIILiteral("notes"), *notes); >+ resultObject->setString("notes"_s, *notes); > if (timestamp) >- resultObject->setDouble(ASCIILiteral("timestamp"), *timestamp); >+ resultObject->setDouble("timestamp"_s, *timestamp); > if (values) >- resultObject->setObject(ASCIILiteral("values"), [*values toJSONObject]); >+ resultObject->setObject("values"_s, [*values toJSONObject]); > if (payload) >- resultObject->setValue(ASCIILiteral("payload"), [*payload toJSONObject]); >+ resultObject->setValue("payload"_s, [*payload toJSONObject]); > if (databaseId) >- resultObject->setInteger(ASCIILiteral("databaseId"), *databaseId); >+ resultObject->setInteger("databaseId"_s, *databaseId); > if (sqlError) >- resultObject->setObject(ASCIILiteral("sqlError"), [*sqlError toJSONObject]); >+ resultObject->setObject("sqlError"_s, [*sqlError toJSONObject]); > if (screenColor) >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(*screenColor)); >+ resultObject->setString("screenColor"_s, toProtocolString(*screenColor)); > if (alternateColors) >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(*alternateColors)); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(*alternateColors)); > if (printColor) >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(*printColor)); >+ resultObject->setString("printColor"_s, toProtocolString(*printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -900,16 +900,16 @@ void ObjCInspectorDatabaseBackendDispatcher::executeNoOptionalParameters(long re > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError"); > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors"); >- resultObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); >- resultObject->setString(ASCIILiteral("notes"), notes); >- resultObject->setDouble(ASCIILiteral("timestamp"), timestamp); >- resultObject->setObject(ASCIILiteral("values"), [values toJSONObject]); >- resultObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); >- resultObject->setInteger(ASCIILiteral("databaseId"), databaseId); >- resultObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); >- resultObject->setString(ASCIILiteral("screenColor"), toProtocolString(screenColor)); >- resultObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); >- resultObject->setString(ASCIILiteral("printColor"), toProtocolString(printColor)); >+ resultObject->setArray("columnNames"_s, toJSONStringArray(columnNames)); >+ resultObject->setString("notes"_s, notes); >+ resultObject->setDouble("timestamp"_s, timestamp); >+ resultObject->setObject("values"_s, [values toJSONObject]); >+ resultObject->setValue("payload"_s, [payload toJSONObject]); >+ resultObject->setInteger("databaseId"_s, databaseId); >+ resultObject->setObject("sqlError"_s, [sqlError toJSONObject]); >+ resultObject->setString("screenColor"_s, toProtocolString(screenColor)); >+ resultObject->setArray("alternateColors"_s, toJSONStringArray(alternateColors)); >+ resultObject->setString("printColor"_s, toProtocolString(printColor)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -922,13 +922,13 @@ void ObjCInspectorDatabaseBackendDispatcher::executeNoOptionalParameters(long re > TestProtocolDatabaseError *o_in_sqlError = [[[TestProtocolDatabaseError alloc] initWithJSONObject:&in_sqlError] autorelease]; > std::optional<TestProtocolDatabasePrimaryColors> o_in_screenColor = fromProtocolString<TestProtocolDatabasePrimaryColors>(in_screenColor); > if (!o_in_screenColor) { >- backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Parameter 'screenColor' of method 'Database.executeNoOptionalParameters' cannot be processed" }); >+ backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, "Parameter 'screenColor' of method 'Database.executeNoOptionalParameters' cannot be processed"_s); > return; > } > NSArray/*<NSString>*/ *o_in_alternateColors = toObjCStringArray(&in_alternateColors); > std::optional<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor> o_in_printColor = fromProtocolString<TestProtocolDatabaseExecuteNoOptionalParametersPrintColor>(in_printColor); > if (!o_in_printColor) { >- backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, ASCIILiteral { "Parameter 'printColor' of method 'Database.executeNoOptionalParameters' cannot be processed" }); >+ backendDispatcher()->reportProtocolError(BackendDispatcher::InvalidParams, "Parameter 'printColor' of method 'Database.executeNoOptionalParameters' cannot be processed"_s); > return; > } > >@@ -1054,7 +1054,7 @@ using namespace Inspector; > _databaseHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>("Database"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1294,13 +1294,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -1323,11 +1323,11 @@ inline String toProtocolString(TestProtocolDatabasePrimaryColors value) > { > switch(value) { > case TestProtocolDatabasePrimaryColorsRed: >- return ASCIILiteral("red"); >+ return "red"_s; > case TestProtocolDatabasePrimaryColorsGreen: >- return ASCIILiteral("green"); >+ return "green"_s; > case TestProtocolDatabasePrimaryColorsBlue: >- return ASCIILiteral("blue"); >+ return "blue"_s; > } > } > >@@ -1347,13 +1347,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteAllOptionalParametersP > { > switch(value) { > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1375,13 +1375,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteAllOptionalParametersP > { > switch(value) { > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteAllOptionalParametersPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1403,13 +1403,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteNoOptionalParametersPr > { > switch(value) { > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >@@ -1431,13 +1431,13 @@ inline String toProtocolString(TestProtocolDatabaseExecuteNoOptionalParametersPr > { > switch(value) { > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan: >- return ASCIILiteral("cyan"); >+ return "cyan"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorMagenta: >- return ASCIILiteral("magenta"); >+ return "magenta"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorYellow: >- return ASCIILiteral("yellow"); >+ return "yellow"_s; > case TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack: >- return ASCIILiteral("black"); >+ return "black"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result >index ba6c59621dd0f5a25c2a90ad859546e647fa056e..bc579b4a5d6bc8a91af8fc4db2ce406d2eaab9c1 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result >@@ -748,13 +748,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result >index 8a824fc4764334641cc4a669fa1bc3a425e7084c..827f61bbbfd0b34c6f42e4544dda6a33e2a2cd3c 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result >@@ -258,7 +258,7 @@ DomainABackendDispatcher::DomainABackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("DomainA"), this); >+ m_backendDispatcher->registerDispatcherForDomain("DomainA"_s, this); > } > > void DomainABackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -266,7 +266,7 @@ void DomainABackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<DomainABackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "enable") > enable(requestId, WTFMove(parameters)); >@@ -302,7 +302,7 @@ DomainBBackendDispatcher::DomainBBackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("DomainB"), this); >+ m_backendDispatcher->registerDispatcherForDomain("DomainB"_s, this); > } > > void DomainBBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -310,7 +310,7 @@ void DomainBBackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<DomainBBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "enable") > enable(requestId, WTFMove(parameters)); >@@ -781,7 +781,7 @@ using namespace Inspector; > _domainAHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDomainABackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainABackendDispatcher, AlternateDomainABackendDispatcher>>(ASCIILiteral("DomainA"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainABackendDispatcher, AlternateDomainABackendDispatcher>>("DomainA"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -799,7 +799,7 @@ using namespace Inspector; > _domainBHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDomainBBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainBBackendDispatcher, AlternateDomainBBackendDispatcher>>(ASCIILiteral("DomainB"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainBBackendDispatcher, AlternateDomainBBackendDispatcher>>("DomainB"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1002,13 +1002,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result >index 349c903be75981ef77f0cdaa1956421f0c581e23..2d5c1c16597077ba941bc438957fd7423836b673 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result >@@ -282,7 +282,7 @@ Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendD > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network1"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Network1"_s, this); > } > > void Network1BackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -290,7 +290,7 @@ void Network1BackendDispatcher::dispatch(long requestId, const String& method, R > Ref<Network1BackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "loadResource1") > loadResource1(requestId, WTFMove(parameters)); >@@ -326,7 +326,7 @@ Network3BackendDispatcher::Network3BackendDispatcher(BackendDispatcher& backendD > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network3"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Network3"_s, this); > } > > void Network3BackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -334,7 +334,7 @@ void Network3BackendDispatcher::dispatch(long requestId, const String& method, R > Ref<Network3BackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > typedef void (Network3BackendDispatcher::*CallHandler)(long requestId, RefPtr<JSON::Object>&& message); > typedef HashMap<String, CallHandler> DispatchMap; >@@ -1038,7 +1038,7 @@ using namespace Inspector; > _network1Handler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>("Network1"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1056,7 +1056,7 @@ using namespace Inspector; > _network3Handler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork3BackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>(ASCIILiteral("Network3"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>("Network3"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1265,13 +1265,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result >index 2aedb73745c00b5d80f7569cde938de31ce1e2f1..6f6b2c6397f6cb76fc4053542cbecfeea0412884 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result >@@ -240,7 +240,7 @@ CommandDomainBackendDispatcher::CommandDomainBackendDispatcher(BackendDispatcher > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("CommandDomain"), this); >+ m_backendDispatcher->registerDispatcherForDomain("CommandDomain"_s, this); > } > > void CommandDomainBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -248,7 +248,7 @@ void CommandDomainBackendDispatcher::dispatch(long requestId, const String& meth > Ref<CommandDomainBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "commandWithEnumReturnValue") > commandWithEnumReturnValue(requestId, WTFMove(parameters)); >@@ -271,7 +271,7 @@ void CommandDomainBackendDispatcher::commandWithEnumReturnValue(long requestId, > m_agent->commandWithEnumReturnValue(error, &out_returnValue); > > if (!error.length()) >- result->setString(ASCIILiteral("returnValue"), Inspector::Protocol::TestHelpers::getEnumConstantValue(out_returnValue)); >+ result->setString("returnValue"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(out_returnValue)); > > if (!error.length()) > m_backendDispatcher->sendResponse(requestId, WTFMove(result), false); >@@ -383,10 +383,10 @@ namespace Inspector { > void EventDomainFrontendDispatcher::eventWithEnumParameter(Parameter parameter) > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter")); >+ jsonMessage->setString("method"_s, "EventDomain.eventWithEnumParameter"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); >- paramsObject->setString(ASCIILiteral("parameter"), Inspector::Protocol::TestHelpers::getEnumConstantValue(parameter)); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setString("parameter"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(parameter)); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -672,7 +672,7 @@ void ObjCInspectorCommandDomainBackendDispatcher::commandWithEnumReturnValue(lon > > id successCallback = ^(TestProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue) { > Ref<JSON::Object> resultObject = JSON::Object::create(); >- resultObject->setString(ASCIILiteral("returnValue"), toProtocolString(returnValue)); >+ resultObject->setString("returnValue"_s, toProtocolString(returnValue)); > backendDispatcher()->sendResponse(requestId, WTFMove(resultObject), false); > }; > >@@ -801,7 +801,7 @@ using namespace Inspector; > _commandDomainHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorCommandDomainBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>(ASCIILiteral("CommandDomain"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>("CommandDomain"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -880,10 +880,10 @@ using namespace Inspector; > const FrontendRouter& router = _controller->frontendRouter(); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter")); >+ jsonMessage->setString("method"_s, "EventDomain.eventWithEnumParameter"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); >- paramsObject->setString(ASCIILiteral("parameter"), toProtocolString(parameter)); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setString("parameter"_s, toProtocolString(parameter)); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -1046,13 +1046,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -1075,13 +1075,13 @@ inline String toProtocolString(TestProtocolTypeDomainEnum value) > { > switch(value) { > case TestProtocolTypeDomainEnumShared: >- return ASCIILiteral("shared"); >+ return "shared"_s; > case TestProtocolTypeDomainEnumRed: >- return ASCIILiteral("red"); >+ return "red"_s; > case TestProtocolTypeDomainEnumGreen: >- return ASCIILiteral("green"); >+ return "green"_s; > case TestProtocolTypeDomainEnumBlue: >- return ASCIILiteral("blue"); >+ return "blue"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result >index 478637cc6692de6c03290def19677fe476002e64..ebf6428104ca696925912b77cc89faf463c006c9 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result >@@ -285,27 +285,27 @@ namespace Inspector { > void DatabaseFrontendDispatcher::didExecuteOptionalParameters(RefPtr<JSON::ArrayOf<String>> columnNames, const String* notes, const double* timestamp, RefPtr<JSON::Object> values, RefPtr<JSON::Value> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const String* screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* printColor) > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters")); >+ jsonMessage->setString("method"_s, "Database.didExecuteOptionalParameters"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); > if (columnNames) >- paramsObject->setArray(ASCIILiteral("columnNames"), columnNames); >+ paramsObject->setArray("columnNames"_s, columnNames); > if (notes) >- paramsObject->setString(ASCIILiteral("notes"), *notes); >+ paramsObject->setString("notes"_s, *notes); > if (timestamp) >- paramsObject->setDouble(ASCIILiteral("timestamp"), *timestamp); >+ paramsObject->setDouble("timestamp"_s, *timestamp); > if (values) >- paramsObject->setObject(ASCIILiteral("values"), values); >+ paramsObject->setObject("values"_s, values); > if (payload) >- paramsObject->setValue(ASCIILiteral("payload"), *payload); >+ paramsObject->setValue("payload"_s, *payload); > if (sqlError) >- paramsObject->setObject(ASCIILiteral("sqlError"), sqlError); >+ paramsObject->setObject("sqlError"_s, sqlError); > if (screenColor) >- paramsObject->setString(ASCIILiteral("screenColor"), *screenColor); >+ paramsObject->setString("screenColor"_s, *screenColor); > if (alternateColors) >- paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors); >+ paramsObject->setArray("alternateColors"_s, alternateColors); > if (printColor) >- paramsObject->setString(ASCIILiteral("printColor"), *printColor); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setString("printColor"_s, *printColor); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -313,18 +313,18 @@ void DatabaseFrontendDispatcher::didExecuteOptionalParameters(RefPtr<JSON::Array > void DatabaseFrontendDispatcher::didExecuteNoOptionalParameters(RefPtr<JSON::ArrayOf<String>> columnNames, const String& notes, double timestamp, RefPtr<JSON::Object> values, RefPtr<JSON::Value> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const String& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor) > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters")); >+ jsonMessage->setString("method"_s, "Database.didExecuteNoOptionalParameters"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); >- paramsObject->setArray(ASCIILiteral("columnNames"), columnNames); >- paramsObject->setString(ASCIILiteral("notes"), notes); >- paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp); >- paramsObject->setObject(ASCIILiteral("values"), values); >- paramsObject->setValue(ASCIILiteral("payload"), payload); >- paramsObject->setObject(ASCIILiteral("sqlError"), sqlError); >- paramsObject->setString(ASCIILiteral("screenColor"), screenColor); >- paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors); >- paramsObject->setString(ASCIILiteral("printColor"), printColor); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setArray("columnNames"_s, columnNames); >+ paramsObject->setString("notes"_s, notes); >+ paramsObject->setDouble("timestamp"_s, timestamp); >+ paramsObject->setObject("values"_s, values); >+ paramsObject->setValue("payload"_s, payload); >+ paramsObject->setObject("sqlError"_s, sqlError); >+ paramsObject->setString("screenColor"_s, screenColor); >+ paramsObject->setArray("alternateColors"_s, alternateColors); >+ paramsObject->setString("printColor"_s, printColor); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -423,14 +423,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -786,27 +786,27 @@ using namespace Inspector; > THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(printColor, @"printColor"); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters")); >+ jsonMessage->setString("method"_s, "Database.didExecuteOptionalParameters"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); > if (columnNames) >- paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray((*columnNames))); >+ paramsObject->setArray("columnNames"_s, toJSONStringArray((*columnNames))); > if (notes) >- paramsObject->setString(ASCIILiteral("notes"), (*notes)); >+ paramsObject->setString("notes"_s, (*notes)); > if (timestamp) >- paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp)); >+ paramsObject->setDouble("timestamp"_s, (*timestamp)); > if (values) >- paramsObject->setObject(ASCIILiteral("values"), [(*values) toJSONObject]); >+ paramsObject->setObject("values"_s, [(*values) toJSONObject]); > if (payload) >- paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toJSONObject]); >+ paramsObject->setValue("payload"_s, [(*payload) toJSONObject]); > if (sqlError) >- paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toJSONObject]); >+ paramsObject->setObject("sqlError"_s, [(*sqlError) toJSONObject]); > if (screenColor) >- paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor)); >+ paramsObject->setString("screenColor"_s, (*screenColor)); > if (alternateColors) >- paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray((*alternateColors))); >+ paramsObject->setArray("alternateColors"_s, toJSONStringArray((*alternateColors))); > if (printColor) >- paramsObject->setString(ASCIILiteral("printColor"), (*printColor)); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setString("printColor"_s, (*printColor)); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -824,18 +824,18 @@ using namespace Inspector; > THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(printColor, @"printColor"); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters")); >+ jsonMessage->setString("method"_s, "Database.didExecuteNoOptionalParameters"_s); > Ref<JSON::Object> paramsObject = JSON::Object::create(); >- paramsObject->setArray(ASCIILiteral("columnNames"), toJSONStringArray(columnNames)); >- paramsObject->setString(ASCIILiteral("notes"), notes); >- paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp); >- paramsObject->setObject(ASCIILiteral("values"), [values toJSONObject]); >- paramsObject->setValue(ASCIILiteral("payload"), [payload toJSONObject]); >- paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toJSONObject]); >- paramsObject->setString(ASCIILiteral("screenColor"), screenColor); >- paramsObject->setArray(ASCIILiteral("alternateColors"), toJSONStringArray(alternateColors)); >- paramsObject->setString(ASCIILiteral("printColor"), printColor); >- jsonMessage->setObject(ASCIILiteral("params"), WTFMove(paramsObject)); >+ paramsObject->setArray("columnNames"_s, toJSONStringArray(columnNames)); >+ paramsObject->setString("notes"_s, notes); >+ paramsObject->setDouble("timestamp"_s, timestamp); >+ paramsObject->setObject("values"_s, [values toJSONObject]); >+ paramsObject->setValue("payload"_s, [payload toJSONObject]); >+ paramsObject->setObject("sqlError"_s, [sqlError toJSONObject]); >+ paramsObject->setString("screenColor"_s, screenColor); >+ paramsObject->setArray("alternateColors"_s, toJSONStringArray(alternateColors)); >+ paramsObject->setString("printColor"_s, printColor); >+ jsonMessage->setObject("params"_s, WTFMove(paramsObject)); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -998,13 +998,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result >index e43723343d760f5f992cde55e2b124f6f6865c0e..b06c272e6800e47d10f6096e75b1cb52ab5f02b9 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result >@@ -239,7 +239,7 @@ Network1BackendDispatcher::Network1BackendDispatcher(BackendDispatcher& backendD > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network1"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Network1"_s, this); > } > > void Network1BackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -247,7 +247,7 @@ void Network1BackendDispatcher::dispatch(long requestId, const String& method, R > Ref<Network1BackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "loadResource") > loadResource(requestId, WTFMove(parameters)); >@@ -376,7 +376,7 @@ namespace Inspector { > void Network3FrontendDispatcher::resourceLoaded() > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network3.resourceLoaded"_s); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -471,14 +471,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -795,7 +795,7 @@ using namespace Inspector; > _network1Handler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>("Network1"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -874,7 +874,7 @@ using namespace Inspector; > const FrontendRouter& router = _controller->frontendRouter(); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network3.resourceLoaded"_s); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -1039,13 +1039,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result >index 4415e94562ba406d1e1412572acc021cb9e84cfd..5d4f91cbace25d5ba3bf9d7221ecf032168463b7 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result >@@ -758,13 +758,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result >index 2823e76b4c58ef9a98c1ee5c03551f02ec21a78e..f52537bfb1ab95db317b1673c74c3a52331f7de4 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result >@@ -370,7 +370,7 @@ public: > Builder<STATE | TypeSet>& setType(Type value) > { > COMPILE_ASSERT(!(STATE & TypeSet), property_type_already_set); >- m_result->setString(ASCIILiteral("type"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); >+ m_result->setString("type"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); > return castState<TypeSet>(); > } > >@@ -397,12 +397,12 @@ public: > > void setString(const String& value) > { >- JSON::ObjectBase::setString(ASCIILiteral("string"), value); >+ JSON::ObjectBase::setString("string"_s, value); > } > > void setArray(RefPtr<JSON::ArrayOf<String>> value) > { >- JSON::ObjectBase::setArray(ASCIILiteral("array"), WTFMove(value)); >+ JSON::ObjectBase::setArray("array"_s, WTFMove(value)); > } > }; > >@@ -895,13 +895,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -924,11 +924,11 @@ inline String toProtocolString(TestProtocolRuntimeKeyPathType value) > { > switch(value) { > case TestProtocolRuntimeKeyPathTypeNull: >- return ASCIILiteral("null"); >+ return "null"_s; > case TestProtocolRuntimeKeyPathTypeString: >- return ASCIILiteral("string"); >+ return "string"_s; > case TestProtocolRuntimeKeyPathTypeArray: >- return ASCIILiteral("array"); >+ return "array"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result >index 517a0c81b68cdc7c949dc3fd0b072fcec7142bea..0ca420254899bb8a0e050e41f79170825f1afbdb 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result >@@ -753,13 +753,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result >index cd8dc49fced5e7783a53c03b913aaab63c61d8bd..0f4c310836202e3137ff49b91f5502912dd4855e 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result >@@ -837,13 +837,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -866,11 +866,11 @@ inline String toProtocolString(TestProtocolDebuggerReason value) > { > switch(value) { > case TestProtocolDebuggerReasonDied: >- return ASCIILiteral("Died"); >+ return "Died"_s; > case TestProtocolDebuggerReasonFainted: >- return ASCIILiteral("Fainted"); >+ return "Fainted"_s; > case TestProtocolDebuggerReasonHungry: >- return ASCIILiteral("Hungry"); >+ return "Hungry"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result >index 70eea5920fb83af25919c6b356c6fdc513799057..6cca53741ade1898a2929656c0e33d37b5d70e1f 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result >@@ -865,13 +865,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -894,13 +894,13 @@ inline String toProtocolString(TestProtocolRuntimeFarmAnimals value) > { > switch(value) { > case TestProtocolRuntimeFarmAnimalsPigs: >- return ASCIILiteral("Pigs"); >+ return "Pigs"_s; > case TestProtocolRuntimeFarmAnimalsCows: >- return ASCIILiteral("Cows"); >+ return "Cows"_s; > case TestProtocolRuntimeFarmAnimalsCats: >- return ASCIILiteral("Cats"); >+ return "Cats"_s; > case TestProtocolRuntimeFarmAnimalsHens: >- return ASCIILiteral("Hens"); >+ return "Hens"_s; > } > } > >@@ -922,13 +922,13 @@ inline String toProtocolString(TestProtocolRuntimeTwoLeggedAnimals value) > { > switch(value) { > case TestProtocolRuntimeTwoLeggedAnimalsDucks: >- return ASCIILiteral("Ducks"); >+ return "Ducks"_s; > case TestProtocolRuntimeTwoLeggedAnimalsHens: >- return ASCIILiteral("Hens"); >+ return "Hens"_s; > case TestProtocolRuntimeTwoLeggedAnimalsCrows: >- return ASCIILiteral("Crows"); >+ return "Crows"_s; > case TestProtocolRuntimeTwoLeggedAnimalsFlamingos: >- return ASCIILiteral("Flamingos"); >+ return "Flamingos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result >index d46c7c3c4517a645ac4427f98210a6341a06c5f6..7ed5ad89ef21cdf9e20a436d4476bc8d83a8fe8e 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result >@@ -384,14 +384,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -477,47 +477,47 @@ public: > > void setColumnNames(RefPtr<JSON::ArrayOf<String>> value) > { >- JSON::ObjectBase::setArray(ASCIILiteral("columnNames"), WTFMove(value)); >+ JSON::ObjectBase::setArray("columnNames"_s, WTFMove(value)); > } > > void setButtons(RefPtr<JSON::ArrayOf<Inspector::Protocol::Database::MouseButton>> value) > { >- JSON::ObjectBase::setArray(ASCIILiteral("buttons"), WTFMove(value)); >+ JSON::ObjectBase::setArray("buttons"_s, WTFMove(value)); > } > > void setDirectionality(Directionality value) > { >- JSON::ObjectBase::setString(ASCIILiteral("directionality"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); >+ JSON::ObjectBase::setString("directionality"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); > } > > void setNotes(const String& value) > { >- JSON::ObjectBase::setString(ASCIILiteral("notes"), value); >+ JSON::ObjectBase::setString("notes"_s, value); > } > > void setTimestamp(double value) > { >- JSON::ObjectBase::setDouble(ASCIILiteral("timestamp"), value); >+ JSON::ObjectBase::setDouble("timestamp"_s, value); > } > > void setValues(RefPtr<JSON::Object> value) > { >- JSON::ObjectBase::setObject(ASCIILiteral("values"), WTFMove(value)); >+ JSON::ObjectBase::setObject("values"_s, WTFMove(value)); > } > > void setPayload(RefPtr<JSON::Value> value) > { >- JSON::ObjectBase::setValue(ASCIILiteral("payload"), WTFMove(value)); >+ JSON::ObjectBase::setValue("payload"_s, WTFMove(value)); > } > > void setError(RefPtr<Inspector::Protocol::Database::Error> value) > { >- JSON::ObjectBase::setObject(ASCIILiteral("error"), WTFMove(value)); >+ JSON::ObjectBase::setObject("error"_s, WTFMove(value)); > } > > void setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value) > { >- JSON::ObjectBase::setArray(ASCIILiteral("errorList"), WTFMove(value)); >+ JSON::ObjectBase::setArray("errorList"_s, WTFMove(value)); > } > }; > >@@ -563,63 +563,63 @@ public: > Builder<STATE | ColumnNamesSet>& setColumnNames(RefPtr<JSON::ArrayOf<String>> value) > { > COMPILE_ASSERT(!(STATE & ColumnNamesSet), property_columnNames_already_set); >- m_result->setArray(ASCIILiteral("columnNames"), value); >+ m_result->setArray("columnNames"_s, value); > return castState<ColumnNamesSet>(); > } > > Builder<STATE | ButtonsSet>& setButtons(RefPtr<JSON::ArrayOf<Inspector::Protocol::Database::MouseButton>> value) > { > COMPILE_ASSERT(!(STATE & ButtonsSet), property_buttons_already_set); >- m_result->setArray(ASCIILiteral("buttons"), value); >+ m_result->setArray("buttons"_s, value); > return castState<ButtonsSet>(); > } > > Builder<STATE | DirectionalitySet>& setDirectionality(Directionality value) > { > COMPILE_ASSERT(!(STATE & DirectionalitySet), property_directionality_already_set); >- m_result->setString(ASCIILiteral("directionality"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); >+ m_result->setString("directionality"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); > return castState<DirectionalitySet>(); > } > > Builder<STATE | NotesSet>& setNotes(const String& value) > { > COMPILE_ASSERT(!(STATE & NotesSet), property_notes_already_set); >- m_result->setString(ASCIILiteral("notes"), value); >+ m_result->setString("notes"_s, value); > return castState<NotesSet>(); > } > > Builder<STATE | TimestampSet>& setTimestamp(double value) > { > COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set); >- m_result->setDouble(ASCIILiteral("timestamp"), value); >+ m_result->setDouble("timestamp"_s, value); > return castState<TimestampSet>(); > } > > Builder<STATE | ValuesSet>& setValues(RefPtr<JSON::Object> value) > { > COMPILE_ASSERT(!(STATE & ValuesSet), property_values_already_set); >- m_result->setObject(ASCIILiteral("values"), value); >+ m_result->setObject("values"_s, value); > return castState<ValuesSet>(); > } > > Builder<STATE | PayloadSet>& setPayload(RefPtr<JSON::Value> value) > { > COMPILE_ASSERT(!(STATE & PayloadSet), property_payload_already_set); >- m_result->setValue(ASCIILiteral("payload"), value); >+ m_result->setValue("payload"_s, value); > return castState<PayloadSet>(); > } > > Builder<STATE | ErrorSet>& setError(RefPtr<Inspector::Protocol::Database::Error> value) > { > COMPILE_ASSERT(!(STATE & ErrorSet), property_error_already_set); >- m_result->setObject(ASCIILiteral("error"), value); >+ m_result->setObject("error"_s, value); > return castState<ErrorSet>(); > } > > Builder<STATE | ErrorListSet>& setErrorList(RefPtr<Inspector::Protocol::Database::ErrorList> value) > { > COMPILE_ASSERT(!(STATE & ErrorListSet), property_errorList_already_set); >- m_result->setArray(ASCIILiteral("errorList"), value); >+ m_result->setArray("errorList"_s, value); > return castState<ErrorListSet>(); > } > >@@ -687,35 +687,35 @@ public: > Builder<STATE | IntegerSet>& setInteger(const String& value) > { > COMPILE_ASSERT(!(STATE & IntegerSet), property_integer_already_set); >- m_result->setString(ASCIILiteral("integer"), value); >+ m_result->setString("integer"_s, value); > return castState<IntegerSet>(); > } > > Builder<STATE | ArraySet>& setArray(const String& value) > { > COMPILE_ASSERT(!(STATE & ArraySet), property_array_already_set); >- m_result->setString(ASCIILiteral("array"), value); >+ m_result->setString("array"_s, value); > return castState<ArraySet>(); > } > > Builder<STATE | StringSet>& setString(const String& value) > { > COMPILE_ASSERT(!(STATE & StringSet), property_string_already_set); >- m_result->setString(ASCIILiteral("string"), value); >+ m_result->setString("string"_s, value); > return castState<StringSet>(); > } > > Builder<STATE | ValueSet>& setValue(const String& value) > { > COMPILE_ASSERT(!(STATE & ValueSet), property_value_already_set); >- m_result->setString(ASCIILiteral("value"), value); >+ m_result->setString("value"_s, value); > return castState<ValueSet>(); > } > > Builder<STATE | ObjectSet>& setObject(const String& value) > { > COMPILE_ASSERT(!(STATE & ObjectSet), property_object_already_set); >- m_result->setString(ASCIILiteral("object"), value); >+ m_result->setString("object"_s, value); > return castState<ObjectSet>(); > } > >@@ -789,56 +789,56 @@ public: > Builder<STATE | DirectionalitySet>& setDirectionality(Directionality value) > { > COMPILE_ASSERT(!(STATE & DirectionalitySet), property_directionality_already_set); >- m_result->setString(ASCIILiteral("directionality"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); >+ m_result->setString("directionality"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); > return castState<DirectionalitySet>(); > } > > Builder<STATE | ButtonsSet>& setButtons(RefPtr<JSON::ArrayOf<Inspector::Protocol::Database::MouseButton>> value) > { > COMPILE_ASSERT(!(STATE & ButtonsSet), property_buttons_already_set); >- m_result->setArray(ASCIILiteral("buttons"), value); >+ m_result->setArray("buttons"_s, value); > return castState<ButtonsSet>(); > } > > Builder<STATE | ColumnNamesSet>& setColumnNames(RefPtr<JSON::ArrayOf<String>> value) > { > COMPILE_ASSERT(!(STATE & ColumnNamesSet), property_columnNames_already_set); >- m_result->setArray(ASCIILiteral("columnNames"), value); >+ m_result->setArray("columnNames"_s, value); > return castState<ColumnNamesSet>(); > } > > Builder<STATE | NotesSet>& setNotes(const String& value) > { > COMPILE_ASSERT(!(STATE & NotesSet), property_notes_already_set); >- m_result->setString(ASCIILiteral("notes"), value); >+ m_result->setString("notes"_s, value); > return castState<NotesSet>(); > } > > Builder<STATE | TimestampSet>& setTimestamp(double value) > { > COMPILE_ASSERT(!(STATE & TimestampSet), property_timestamp_already_set); >- m_result->setDouble(ASCIILiteral("timestamp"), value); >+ m_result->setDouble("timestamp"_s, value); > return castState<TimestampSet>(); > } > > Builder<STATE | ValuesSet>& setValues(RefPtr<JSON::Object> value) > { > COMPILE_ASSERT(!(STATE & ValuesSet), property_values_already_set); >- m_result->setObject(ASCIILiteral("values"), value); >+ m_result->setObject("values"_s, value); > return castState<ValuesSet>(); > } > > Builder<STATE | PayloadSet>& setPayload(RefPtr<JSON::Value> value) > { > COMPILE_ASSERT(!(STATE & PayloadSet), property_payload_already_set); >- m_result->setValue(ASCIILiteral("payload"), value); >+ m_result->setValue("payload"_s, value); > return castState<PayloadSet>(); > } > > Builder<STATE | ErrorSet>& setError(RefPtr<Inspector::Protocol::Database::Error> value) > { > COMPILE_ASSERT(!(STATE & ErrorSet), property_error_already_set); >- m_result->setObject(ASCIILiteral("error"), value); >+ m_result->setObject("error"_s, value); > return castState<ErrorSet>(); > } > >@@ -1500,13 +1500,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -1529,13 +1529,13 @@ inline String toProtocolString(TestProtocolDatabaseMouseButton value) > { > switch(value) { > case TestProtocolDatabaseMouseButtonNone: >- return ASCIILiteral("None"); >+ return "None"_s; > case TestProtocolDatabaseMouseButtonLeft: >- return ASCIILiteral("Left"); >+ return "Left"_s; > case TestProtocolDatabaseMouseButtonMiddle: >- return ASCIILiteral("Middle"); >+ return "Middle"_s; > case TestProtocolDatabaseMouseButtonRight: >- return ASCIILiteral("Right"); >+ return "Right"_s; > } > } > >@@ -1557,9 +1557,9 @@ inline String toProtocolString(TestProtocolDatabaseOptionalParameterBundleDirect > { > switch(value) { > case TestProtocolDatabaseOptionalParameterBundleDirectionalityLTR: >- return ASCIILiteral("LTR"); >+ return "LTR"_s; > case TestProtocolDatabaseOptionalParameterBundleDirectionalityRTL: >- return ASCIILiteral("RTL"); >+ return "RTL"_s; > } > } > >@@ -1577,9 +1577,9 @@ inline String toProtocolString(TestProtocolDatabaseParameterBundleDirectionality > { > switch(value) { > case TestProtocolDatabaseParameterBundleDirectionalityLTR: >- return ASCIILiteral("LTR"); >+ return "LTR"_s; > case TestProtocolDatabaseParameterBundleDirectionalityRTL: >- return ASCIILiteral("RTL"); >+ return "RTL"_s; > } > } > >@@ -1598,9 +1598,9 @@ inline String toProtocolString(TestProtocolTestParameterBundleDirectionality val > { > switch(value) { > case TestProtocolTestParameterBundleDirectionalityLTR: >- return ASCIILiteral("LTR"); >+ return "LTR"_s; > case TestProtocolTestParameterBundleDirectionalityRTL: >- return ASCIILiteral("RTL"); >+ return "RTL"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result >index 9de85118b0b943e79cf60bbeb0bb84df760b38a0..c5789230820da1d0b132f2bb6ce32cca793078a9 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result >@@ -382,35 +382,35 @@ public: > Builder<STATE | StringSet>& setString(const String& value) > { > COMPILE_ASSERT(!(STATE & StringSet), property_string_already_set); >- m_result->setString(ASCIILiteral("string"), value); >+ m_result->setString("string"_s, value); > return castState<StringSet>(); > } > > Builder<STATE | NumberSet>& setNumber(int value) > { > COMPILE_ASSERT(!(STATE & NumberSet), property_number_already_set); >- m_result->setInteger(ASCIILiteral("number"), value); >+ m_result->setInteger("number"_s, value); > return castState<NumberSet>(); > } > > Builder<STATE | AnimalsSet>& setAnimals(Inspector::Protocol::Test::CastedAnimals value) > { > COMPILE_ASSERT(!(STATE & AnimalsSet), property_animals_already_set); >- m_result->setString(ASCIILiteral("animals"), Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); >+ m_result->setString("animals"_s, Inspector::Protocol::TestHelpers::getEnumConstantValue(value)); > return castState<AnimalsSet>(); > } > > Builder<STATE | IdSet>& setId(int value) > { > COMPILE_ASSERT(!(STATE & IdSet), property_id_already_set); >- m_result->setInteger(ASCIILiteral("id"), value); >+ m_result->setInteger("id"_s, value); > return castState<IdSet>(); > } > > Builder<STATE | TreeSet>& setTree(RefPtr<Inspector::Protocol::Test::RecursiveObject1> value) > { > COMPILE_ASSERT(!(STATE & TreeSet), property_tree_already_set); >- m_result->setObject(ASCIILiteral("tree"), value); >+ m_result->setObject("tree"_s, value); > return castState<TreeSet>(); > } > >@@ -501,7 +501,7 @@ public: > > void setObj(RefPtr<Inspector::Protocol::Test::RecursiveObject2> value) > { >- JSON::ObjectBase::setObject(ASCIILiteral("obj"), WTFMove(value)); >+ JSON::ObjectBase::setObject("obj"_s, WTFMove(value)); > } > }; > >@@ -552,7 +552,7 @@ public: > > void setObj(RefPtr<Inspector::Protocol::Test::RecursiveObject1> value) > { >- JSON::ObjectBase::setObject(ASCIILiteral("obj"), WTFMove(value)); >+ JSON::ObjectBase::setObject("obj"_s, WTFMove(value)); > } > }; > >@@ -708,27 +708,27 @@ void BindingTraits<Inspector::Protocol::Test::TypeNeedingCast>::assertValueHasEx > bool castSucceeded = value->asObject(object); > ASSERT_UNUSED(castSucceeded, castSucceeded); > { >- auto stringPos = object->find(ASCIILiteral("string")); >+ auto stringPos = object->find("string"_s); > ASSERT(stringPos != object->end()); > BindingTraits<String>::assertValueHasExpectedType(stringPos->value.get()); > } > { >- auto numberPos = object->find(ASCIILiteral("number")); >+ auto numberPos = object->find("number"_s); > ASSERT(numberPos != object->end()); > BindingTraits<int>::assertValueHasExpectedType(numberPos->value.get()); > } > { >- auto animalsPos = object->find(ASCIILiteral("animals")); >+ auto animalsPos = object->find("animals"_s); > ASSERT(animalsPos != object->end()); > BindingTraits<Inspector::Protocol::Test::CastedAnimals>::assertValueHasExpectedType(animalsPos->value.get()); > } > { >- auto idPos = object->find(ASCIILiteral("id")); >+ auto idPos = object->find("id"_s); > ASSERT(idPos != object->end()); > BindingTraits<int>::assertValueHasExpectedType(idPos->value.get()); > } > { >- auto treePos = object->find(ASCIILiteral("tree")); >+ auto treePos = object->find("tree"_s); > ASSERT(treePos != object->end()); > BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasExpectedType(treePos->value.get()); > } >@@ -762,7 +762,7 @@ void BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasE > > int foundPropertiesCount = 0; > { >- auto objPos = object->find(ASCIILiteral("obj")); >+ auto objPos = object->find("obj"_s); > if (objPos != object->end()) { > BindingTraits<Inspector::Protocol::Test::RecursiveObject2>::assertValueHasExpectedType(objPos->value.get()); > ++foundPropertiesCount; >@@ -785,7 +785,7 @@ void BindingTraits<Inspector::Protocol::Test::RecursiveObject2>::assertValueHasE > > int foundPropertiesCount = 0; > { >- auto objPos = object->find(ASCIILiteral("obj")); >+ auto objPos = object->find("obj"_s); > if (objPos != object->end()) { > BindingTraits<Inspector::Protocol::Test::RecursiveObject1>::assertValueHasExpectedType(objPos->value.get()); > ++foundPropertiesCount; >@@ -1217,13 +1217,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >@@ -1246,13 +1246,13 @@ inline String toProtocolString(TestProtocolTestUncastedAnimals value) > { > switch(value) { > case TestProtocolTestUncastedAnimalsPigs: >- return ASCIILiteral("Pigs"); >+ return "Pigs"_s; > case TestProtocolTestUncastedAnimalsCows: >- return ASCIILiteral("Cows"); >+ return "Cows"_s; > case TestProtocolTestUncastedAnimalsCats: >- return ASCIILiteral("Cats"); >+ return "Cats"_s; > case TestProtocolTestUncastedAnimalsHens: >- return ASCIILiteral("Hens"); >+ return "Hens"_s; > } > } > >@@ -1274,13 +1274,13 @@ inline String toProtocolString(TestProtocolTestCastedAnimals value) > { > switch(value) { > case TestProtocolTestCastedAnimalsDucks: >- return ASCIILiteral("Ducks"); >+ return "Ducks"_s; > case TestProtocolTestCastedAnimalsHens: >- return ASCIILiteral("Hens"); >+ return "Hens"_s; > case TestProtocolTestCastedAnimalsCrows: >- return ASCIILiteral("Crows"); >+ return "Crows"_s; > case TestProtocolTestCastedAnimalsFlamingos: >- return ASCIILiteral("Flamingos"); >+ return "Flamingos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result >index 4e9b47598e2fb9d80c76cd6aa4a9a323fdc0dbd8..e5f5d1e49797abfe57899c287caeea2a08a40b09 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result >@@ -354,14 +354,14 @@ public: > Builder<STATE | OneSet>& setOne(double value) > { > COMPILE_ASSERT(!(STATE & OneSet), property_one_already_set); >- m_result->setDouble(ASCIILiteral("one"), value); >+ m_result->setDouble("one"_s, value); > return castState<OneSet>(); > } > > Builder<STATE | TwoSet>& setTwo(double value) > { > COMPILE_ASSERT(!(STATE & TwoSet), property_two_already_set); >- m_result->setDouble(ASCIILiteral("two"), value); >+ m_result->setDouble("two"_s, value); > return castState<TwoSet>(); > } > >@@ -418,14 +418,14 @@ public: > Builder<STATE | AlphaSet>& setAlpha(double value) > { > COMPILE_ASSERT(!(STATE & AlphaSet), property_alpha_already_set); >- m_result->setDouble(ASCIILiteral("alpha"), value); >+ m_result->setDouble("alpha"_s, value); > return castState<AlphaSet>(); > } > > Builder<STATE | BetaSet>& setBeta(double value) > { > COMPILE_ASSERT(!(STATE & BetaSet), property_beta_already_set); >- m_result->setDouble(ASCIILiteral("beta"), value); >+ m_result->setDouble("beta"_s, value); > return castState<BetaSet>(); > } > >@@ -906,13 +906,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result >index 071b8704cfbf93a60bd101cdd874891c7340db16..217c2bb85cfc4124c0395b9542dd5bcf7ad11023 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result >@@ -259,7 +259,7 @@ DomainABackendDispatcher::DomainABackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("DomainA"), this); >+ m_backendDispatcher->registerDispatcherForDomain("DomainA"_s, this); > } > > void DomainABackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -267,7 +267,7 @@ void DomainABackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<DomainABackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "enable") > enable(requestId, WTFMove(parameters)); >@@ -303,7 +303,7 @@ DomainBBackendDispatcher::DomainBBackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("DomainB"), this); >+ m_backendDispatcher->registerDispatcherForDomain("DomainB"_s, this); > } > > void DomainBBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -311,7 +311,7 @@ void DomainBBackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<DomainBBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "enable") > enable(requestId, WTFMove(parameters)); >@@ -782,7 +782,7 @@ using namespace Inspector; > _domainAHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDomainABackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainABackendDispatcher, AlternateDomainABackendDispatcher>>(ASCIILiteral("DomainA"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainABackendDispatcher, AlternateDomainABackendDispatcher>>("DomainA"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -800,7 +800,7 @@ using namespace Inspector; > _domainBHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorDomainBBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainBBackendDispatcher, AlternateDomainBBackendDispatcher>>(ASCIILiteral("DomainB"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DomainBBackendDispatcher, AlternateDomainBBackendDispatcher>>("DomainB"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -1003,13 +1003,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result b/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result >index ba6c59621dd0f5a25c2a90ad859546e647fa056e..bc579b4a5d6bc8a91af8fc4db2ce406d2eaab9c1 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result >@@ -748,13 +748,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result b/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result >index 9a63823cb46ae6a81155547e76acdba42d3c76ce..6fa66bb952475848e82e04278f87a414d6192d12 100644 >--- a/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result >+++ b/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result >@@ -225,7 +225,7 @@ NetworkBackendDispatcher::NetworkBackendDispatcher(BackendDispatcher& backendDis > : SupplementalBackendDispatcher(backendDispatcher) > , m_agent(agent) > { >- m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("Network"), this); >+ m_backendDispatcher->registerDispatcherForDomain("Network"_s, this); > } > > void NetworkBackendDispatcher::dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) >@@ -233,7 +233,7 @@ void NetworkBackendDispatcher::dispatch(long requestId, const String& method, Re > Ref<NetworkBackendDispatcher> protect(*this); > > RefPtr<JSON::Object> parameters; >- message->getObject(ASCIILiteral("params"), parameters); >+ message->getObject("params"_s, parameters); > > if (method == "loadResource") > loadResource(requestId, WTFMove(parameters)); >@@ -358,7 +358,7 @@ namespace Inspector { > void NetworkFrontendDispatcher::resourceLoaded() > { > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network.resourceLoaded"_s); > > m_frontendRouter.sendEvent(jsonMessage->toJSONString()); > } >@@ -449,14 +449,14 @@ public: > Builder<STATE | MessageSet>& setMessage(const String& value) > { > COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set); >- m_result->setString(ASCIILiteral("message"), value); >+ m_result->setString("message"_s, value); > return castState<MessageSet>(); > } > > Builder<STATE | CodeSet>& setCode(int value) > { > COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set); >- m_result->setInteger(ASCIILiteral("code"), value); >+ m_result->setInteger("code"_s, value); > return castState<CodeSet>(); > } > >@@ -768,7 +768,7 @@ using namespace Inspector; > _networkHandler = [handler retain]; > > auto alternateDispatcher = std::make_unique<ObjCInspectorNetworkBackendDispatcher>(handler); >- auto alternateAgent = std::make_unique<AlternateDispatchableAgent<NetworkBackendDispatcher, AlternateNetworkBackendDispatcher>>(ASCIILiteral("Network"), *_controller, WTFMove(alternateDispatcher)); >+ auto alternateAgent = std::make_unique<AlternateDispatchableAgent<NetworkBackendDispatcher, AlternateNetworkBackendDispatcher>>("Network"_s, *_controller, WTFMove(alternateDispatcher)); > _controller->appendExtraAgent(WTFMove(alternateAgent)); > } > >@@ -847,7 +847,7 @@ using namespace Inspector; > const FrontendRouter& router = _controller->frontendRouter(); > > Ref<JSON::Object> jsonMessage = JSON::Object::create(); >- jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network.resourceLoaded")); >+ jsonMessage->setString("method"_s, "Network.resourceLoaded"_s); > router.sendEvent(jsonMessage->toJSONString()); > } > >@@ -1012,13 +1012,13 @@ inline String toProtocolString(TestProtocolPlatform value) > { > switch(value) { > case TestProtocolPlatformAll: >- return ASCIILiteral("all"); >+ return "all"_s; > case TestProtocolPlatformGeneric: >- return ASCIILiteral("generic"); >+ return "generic"_s; > case TestProtocolPlatformIOS: >- return ASCIILiteral("ios"); >+ return "ios"_s; > case TestProtocolPlatformMacOS: >- return ASCIILiteral("macos"); >+ return "macos"_s; > } > } > >diff --git a/Source/JavaScriptCore/interpreter/CallFrame.cpp b/Source/JavaScriptCore/interpreter/CallFrame.cpp >index 2b631e205f63ad6d8d352d4af25f601e3aeb54fa..6325dc27c51f62e01420e54bd8774f7b56386dbd 100644 >--- a/Source/JavaScriptCore/interpreter/CallFrame.cpp >+++ b/Source/JavaScriptCore/interpreter/CallFrame.cpp >@@ -312,11 +312,11 @@ String CallFrame::friendlyFunctionName() > > switch (codeBlock->codeType()) { > case EvalCode: >- return ASCIILiteral("eval code"); >+ return "eval code"_s; > case ModuleCode: >- return ASCIILiteral("module code"); >+ return "module code"_s; > case GlobalCode: >- return ASCIILiteral("global code"); >+ return "global code"_s; > case FunctionCode: > if (jsCallee()) > return getCalculatedDisplayName(vm(), jsCallee()); >diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp >index a96b75618a2019dcde6595b650664666057a802c..2c983f2a82edea19e260ed31e4bb8d09b0ada59c 100644 >--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp >+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp >@@ -1211,7 +1211,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue > if (!hasProperty) { > PutPropertySlot slot(variableObject); > if (!variableObject->isExtensible(callFrame)) >- return checkedReturn(throwTypeError(callFrame, throwScope, ASCIILiteral(NonExtensibleObjectPropertyDefineError))); >+ return checkedReturn(throwTypeError(callFrame, throwScope, NonExtensibleObjectPropertyDefineError)); > variableObject->methodTable(vm)->put(variableObject, callFrame, ident, jsUndefined(), slot); > RETURN_IF_EXCEPTION(throwScope, checkedReturn(throwScope.exception())); > } >diff --git a/Source/JavaScriptCore/interpreter/StackVisitor.cpp b/Source/JavaScriptCore/interpreter/StackVisitor.cpp >index 1d1ff73dfdf938a5857aa3e9390b0c5e8c8ceb14..134f42f12f53915034daa81069910bba507d0871 100644 >--- a/Source/JavaScriptCore/interpreter/StackVisitor.cpp >+++ b/Source/JavaScriptCore/interpreter/StackVisitor.cpp >@@ -282,10 +282,10 @@ String StackVisitor::Frame::functionName() const > traceLine = makeString(m_wasmFunctionIndexOrName); > break; > case CodeType::Eval: >- traceLine = ASCIILiteral("eval code"); >+ traceLine = "eval code"_s; > break; > case CodeType::Module: >- traceLine = ASCIILiteral("module code"); >+ traceLine = "module code"_s; > break; > case CodeType::Native: { > JSCell* callee = this->callee().asCell(); >@@ -297,7 +297,7 @@ String StackVisitor::Frame::functionName() const > traceLine = getCalculatedDisplayName(callFrame()->vm(), jsCast<JSObject*>(this->callee().asCell())).impl(); > break; > case CodeType::Global: >- traceLine = ASCIILiteral("global code"); >+ traceLine = "global code"_s; > break; > } > return traceLine.isNull() ? emptyString() : traceLine; >@@ -318,10 +318,10 @@ String StackVisitor::Frame::sourceURL() const > break; > } > case CodeType::Native: >- traceLine = ASCIILiteral("[native code]"); >+ traceLine = "[native code]"_s; > break; > case CodeType::Wasm: >- traceLine = ASCIILiteral("[wasm code]"); >+ traceLine = "[wasm code]"_s; > break; > } > return traceLine.isNull() ? emptyString() : traceLine; >diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp >index d9db0629a438c129d57bfa3831669eb8af156998..c94fad9d6581bf3f1fd4c3d3bbbd3befcc35901c 100644 >--- a/Source/JavaScriptCore/jit/JIT.cpp >+++ b/Source/JavaScriptCore/jit/JIT.cpp >@@ -972,7 +972,7 @@ void JIT::doMainThreadPreparationBeforeCompile() > { > // This ensures that we have the most up to date type information when performing typecheck optimizations for op_profile_type. > if (m_vm->typeProfiler()) >- m_vm->typeProfilerLog()->processLogEntries(ASCIILiteral("Preparing for JIT compilation.")); >+ m_vm->typeProfilerLog()->processLogEntries("Preparing for JIT compilation."_s); > } > > unsigned JIT::frameRegisterCountFor(CodeBlock* codeBlock) >diff --git a/Source/JavaScriptCore/jit/JITOperations.cpp b/Source/JavaScriptCore/jit/JITOperations.cpp >index 5381dd6d04e69a9240ace66db2ee4e3bfaf36bbc..9916a95483dcee8cfcf685e49f40f621253b8af5 100644 >--- a/Source/JavaScriptCore/jit/JITOperations.cpp >+++ b/Source/JavaScriptCore/jit/JITOperations.cpp >@@ -125,7 +125,7 @@ void JIT_OPERATION operationThrowDivideError(ExecState* exec) > > NativeCallFrameTracerWithRestore tracer(vm, entryFrame, callerFrame); > ErrorHandlingScope errorScope(*vm); >- throwException(callerFrame, scope, createError(callerFrame, ASCIILiteral("Division by zero or division overflow."))); >+ throwException(callerFrame, scope, createError(callerFrame, "Division by zero or division overflow."_s)); > } > > void JIT_OPERATION operationThrowOutOfBoundsAccessError(ExecState* exec) >@@ -138,7 +138,7 @@ void JIT_OPERATION operationThrowOutOfBoundsAccessError(ExecState* exec) > > NativeCallFrameTracerWithRestore tracer(vm, entryFrame, callerFrame); > ErrorHandlingScope errorScope(*vm); >- throwException(callerFrame, scope, createError(callerFrame, ASCIILiteral("Out-of-bounds access."))); >+ throwException(callerFrame, scope, createError(callerFrame, "Out-of-bounds access."_s)); > } > #endif > >@@ -2130,7 +2130,7 @@ size_t JIT_OPERATION operationDeleteById(ExecState* exec, EncodedJSValue encoded > bool couldDelete = baseObj->methodTable(vm)->deleteProperty(baseObj, exec, Identifier::fromUid(&vm, uid)); > RETURN_IF_EXCEPTION(scope, false); > if (!couldDelete && exec->codeBlock()->isStrictMode()) >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return couldDelete; > } > >@@ -2162,7 +2162,7 @@ size_t JIT_OPERATION operationDeleteByVal(ExecState* exec, EncodedJSValue encode > } > RETURN_IF_EXCEPTION(scope, false); > if (!couldDelete && exec->codeBlock()->isStrictMode()) >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return couldDelete; > } > >@@ -2914,7 +2914,7 @@ void JIT_OPERATION operationProcessTypeProfilerLog(ExecState* exec) > { > VM& vm = exec->vm(); > NativeCallFrameTracer tracer(&vm, exec); >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("Log Full, called from inside baseline JIT")); >+ vm.typeProfilerLog()->processLogEntries("Log Full, called from inside baseline JIT"_s); > } > > void JIT_OPERATION operationProcessShadowChickenLog(ExecState* exec) >diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp >index 4cbbb3d88ab84afe0a3f01d3e026f7f8cdeb9804..a7a110b5bcd96d5bc1dbe128a5c03bb1ce955de3 100644 >--- a/Source/JavaScriptCore/jsc.cpp >+++ b/Source/JavaScriptCore/jsc.cpp >@@ -758,10 +758,10 @@ static String resolvePath(const DirectoryName& directoryName, const ModuleName& > directoryPieces.clear(); > > for (const auto& query : moduleName.queries) { >- if (query == String(ASCIILiteral(".."))) { >+ if (query == String(".."_s)) { > if (!directoryPieces.isEmpty()) > directoryPieces.removeLast(); >- } else if (!query.isEmpty() && query != String(ASCIILiteral("."))) >+ } else if (!query.isEmpty() && query != String("."_s)) > directoryPieces.append(query); > } > >@@ -793,7 +793,7 @@ JSInternalPromise* GlobalObject::moduleLoaderImportModule(JSGlobalObject* global > }; > > if (sourceOrigin.isNull()) >- return rejectPromise(createError(exec, ASCIILiteral("Could not resolve the module specifier."))); >+ return rejectPromise(createError(exec, "Could not resolve the module specifier."_s)); > > auto referrer = sourceOrigin.string(); > auto moduleName = moduleNameValue->value(exec); >@@ -827,7 +827,7 @@ Identifier GlobalObject::moduleLoaderResolve(JSGlobalObject* globalObject, ExecS > if (referrerValue.isUndefined()) { > auto directoryName = currentWorkingDirectory(); > if (!directoryName) { >- throwException(exec, scope, createError(exec, ASCIILiteral("Could not resolve the current working directory."))); >+ throwException(exec, scope, createError(exec, "Could not resolve the current working directory."_s)); > return { }; > } > return Identifier::fromString(&vm, resolvePath(directoryName.value(), ModuleName(key.impl()))); >@@ -839,7 +839,7 @@ Identifier GlobalObject::moduleLoaderResolve(JSGlobalObject* globalObject, ExecS > if (referrer.isSymbol()) { > auto directoryName = currentWorkingDirectory(); > if (!directoryName) { >- throwException(exec, scope, createError(exec, ASCIILiteral("Could not resolve the current working directory."))); >+ throwException(exec, scope, createError(exec, "Could not resolve the current working directory."_s)); > return { }; > } > return Identifier::fromString(&vm, resolvePath(directoryName.value(), ModuleName(key.impl()))); >@@ -1090,7 +1090,7 @@ EncodedJSValue JSC_HOST_CALL functionDescribeArray(ExecState* exec) > VM& vm = exec->vm(); > JSObject* object = jsDynamicCast<JSObject*>(vm, exec->argument(0)); > if (!object) >- return JSValue::encode(jsNontrivialString(exec, ASCIILiteral("<not object>"))); >+ return JSValue::encode(jsNontrivialString(exec, "<not object>"_s)); > return JSValue::encode(jsNontrivialString(exec, toString("<Butterfly: ", RawPointer(object->butterfly()), "; public length: ", object->getArrayLength(), "; vector length: ", object->getVectorLength(), ">"))); > } > >@@ -1205,7 +1205,7 @@ EncodedJSValue JSC_HOST_CALL functionRun(ExecState* exec) > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > Vector<char> script; > if (!fetchScriptFromLocalFileSystem(fileName, script)) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Could not open file.")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Could not open file."_s))); > > GlobalObject* globalObject = GlobalObject::create(vm, GlobalObject::createStructure(vm, jsNull()), Vector<String>()); > >@@ -1271,7 +1271,7 @@ EncodedJSValue JSC_HOST_CALL functionLoad(ExecState* exec) > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > Vector<char> script; > if (!fetchScriptFromLocalFileSystem(fileName, script)) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Could not open file.")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Could not open file."_s))); > > JSGlobalObject* globalObject = exec->lexicalGlobalObject(); > >@@ -1338,7 +1338,7 @@ EncodedJSValue JSC_HOST_CALL functionCheckSyntax(ExecState* exec) > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > Vector<char> script; > if (!fetchScriptFromLocalFileSystem(fileName, script)) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Could not open file.")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Could not open file."_s))); > > JSGlobalObject* globalObject = exec->lexicalGlobalObject(); > >@@ -1599,7 +1599,7 @@ EncodedJSValue JSC_HOST_CALL functionDollarEvalScript(ExecState* exec) > exec->thisValue().get(exec, Identifier::fromString(exec, "global"))); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (!globalObject) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Expected global to point to a global object")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Expected global to point to a global object"_s))); > > NakedPtr<Exception> evaluationException; > JSValue result = evaluate(globalObject->globalExec(), makeSource(sourceCode, exec->callerSourceOrigin()), JSValue(), evaluationException); >@@ -1637,7 +1637,7 @@ EncodedJSValue JSC_HOST_CALL functionDollarAgentStart(ExecState* exec) > > NakedPtr<Exception> evaluationException; > JSValue result; >- result = evaluate(globalObject->globalExec(), makeSource(sourceCode, SourceOrigin(ASCIILiteral("worker"))), JSValue(), evaluationException); >+ result = evaluate(globalObject->globalExec(), makeSource(sourceCode, SourceOrigin("worker"_s)), JSValue(), evaluationException); > if (evaluationException) > result = evaluationException->value(); > checkException(globalObject->globalExec(), globalObject, true, evaluationException, result, commandLine, success); >@@ -1664,7 +1664,7 @@ EncodedJSValue JSC_HOST_CALL functionDollarAgentReceiveBroadcast(ExecState* exec > CallData callData; > CallType callType = getCallData(vm, callback, callData); > if (callType == CallType::None) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Expected callback")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Expected callback"_s))); > > RefPtr<Message> message; > { >@@ -1718,7 +1718,7 @@ EncodedJSValue JSC_HOST_CALL functionDollarAgentBroadcast(ExecState* exec) > > JSArrayBuffer* jsBuffer = jsDynamicCast<JSArrayBuffer*>(vm, exec->argument(0)); > if (!jsBuffer || !jsBuffer->isShared()) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Expected SharedArrayBuffer")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Expected SharedArrayBuffer"_s))); > > int32_t index = exec->argument(1).toInt32(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -1858,11 +1858,11 @@ EncodedJSValue JSC_HOST_CALL functionTransferArrayBuffer(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (exec->argumentCount() < 1) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Not enough arguments")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Not enough arguments"_s))); > > JSArrayBuffer* buffer = jsDynamicCast<JSArrayBuffer*>(vm, exec->argument(0)); > if (!buffer) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Expected an array buffer")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Expected an array buffer"_s))); > > ArrayBufferContents dummyContents; > buffer->impl()->transferTo(vm, dummyContents); >@@ -1968,7 +1968,7 @@ EncodedJSValue JSC_HOST_CALL functionLoadModule(ExecState* exec) > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > Vector<char> script; > if (!fetchScriptFromLocalFileSystem(fileName, script)) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Could not open file.")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Could not open file."_s))); > > JSInternalPromise* promise = loadAndEvaluateModule(exec, fileName, jsUndefined(), jsUndefined()); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -2070,7 +2070,7 @@ EncodedJSValue JSC_HOST_CALL functionSamplingProfilerStackTraces(ExecState* exec > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!vm.samplingProfiler()) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Sampling profiler was never started")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Sampling profiler was never started"_s))); > > String jsonString = vm.samplingProfiler()->stackTracesAsJSON(); > EncodedJSValue result = JSValue::encode(JSONParse(exec, jsonString)); >@@ -2091,7 +2091,7 @@ EncodedJSValue JSC_HOST_CALL functionAsyncTestStart(ExecState* exec) > > JSValue numberOfAsyncPasses = exec->argument(0); > if (!numberOfAsyncPasses.isUInt32()) >- return throwVMError(exec, scope, ASCIILiteral("Expected first argument to a uint32")); >+ return throwVMError(exec, scope, "Expected first argument to a uint32"_s); > > asyncTestExpectedPasses += numberOfAsyncPasses.asUInt32(); > return encodedJSUndefined(); >@@ -2111,7 +2111,7 @@ static EncodedJSValue JSC_HOST_CALL functionWebAssemblyMemoryMode(ExecState* exe > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!Options::useWebAssembly()) >- return throwVMTypeError(exec, scope, ASCIILiteral("WebAssemblyMemoryMode should only be called if the useWebAssembly option is set")); >+ return throwVMTypeError(exec, scope, "WebAssemblyMemoryMode should only be called if the useWebAssembly option is set"_s); > > if (JSObject* object = exec->argument(0).getObject()) { > if (auto* memory = jsDynamicCast<JSWebAssemblyMemory*>(vm, object)) >@@ -2120,7 +2120,7 @@ static EncodedJSValue JSC_HOST_CALL functionWebAssemblyMemoryMode(ExecState* exe > return JSValue::encode(jsString(&vm, makeString(instance->memoryMode()))); > } > >- return throwVMTypeError(exec, scope, ASCIILiteral("WebAssemblyMemoryMode expects either a WebAssembly.Memory or WebAssembly.Instance")); >+ return throwVMTypeError(exec, scope, "WebAssemblyMemoryMode expects either a WebAssembly.Memory or WebAssembly.Instance"_s); > } > > #endif // ENABLE(WEBASSEBLY) >@@ -2351,7 +2351,7 @@ static void runWithOptions(GlobalObject* globalObject, CommandLine& options, boo > size_t commandLineLength = strlen(scripts[i].argument); > scriptBuffer.resize(commandLineLength); > std::copy(scripts[i].argument, scripts[i].argument + commandLineLength, scriptBuffer.begin()); >- fileName = ASCIILiteral("[Command Line]"); >+ fileName = "[Command Line]"_s; > } > > bool isLastFile = i == scripts.size() - 1; >diff --git a/Source/JavaScriptCore/parser/Lexer.cpp b/Source/JavaScriptCore/parser/Lexer.cpp >index 2400679c3e90aee6ba9c5ad652da15025d02648f..dacd7f25086c16d0a4d43a64a73e6deb86ad51f0 100644 >--- a/Source/JavaScriptCore/parser/Lexer.cpp >+++ b/Source/JavaScriptCore/parser/Lexer.cpp >@@ -512,19 +512,19 @@ String Lexer<T>::invalidCharacterMessage() const > { > switch (m_current) { > case 0: >- return ASCIILiteral("Invalid character: '\\0'"); >+ return "Invalid character: '\\0'"_s; > case 10: >- return ASCIILiteral("Invalid character: '\\n'"); >+ return "Invalid character: '\\n'"_s; > case 11: >- return ASCIILiteral("Invalid character: '\\v'"); >+ return "Invalid character: '\\v'"_s; > case 13: >- return ASCIILiteral("Invalid character: '\\r'"); >+ return "Invalid character: '\\r'"_s; > case 35: >- return ASCIILiteral("Invalid character: '#'"); >+ return "Invalid character: '#'"_s; > case 64: >- return ASCIILiteral("Invalid character: '@'"); >+ return "Invalid character: '@'"_s; > case 96: >- return ASCIILiteral("Invalid character: '`'"); >+ return "Invalid character: '`'"_s; > default: > return String::format("Invalid character '\\u%04x'", static_cast<unsigned>(m_current)); > } >@@ -1178,7 +1178,7 @@ template <bool shouldBuildStrings> ALWAYS_INLINE typename Lexer<T>::StringParseR > else if (m_current == 'x') { > shift(); > if (!isASCIIHexDigit(m_current) || !isASCIIHexDigit(peek(1))) { >- m_lexErrorMessage = ASCIILiteral("\\x can only be followed by a hex character sequence"); >+ m_lexErrorMessage = "\\x can only be followed by a hex character sequence"_s; > return (atEnd() || (isASCIIHexDigit(m_current) && (m_code + 1 == m_codeEnd))) ? StringUnterminated : StringCannotBeParsed; > } > T prev = m_current; >@@ -1232,7 +1232,7 @@ template <bool shouldBuildStrings, LexerEscapeParseMode escapeParseMode> ALWAYS_ > shift(); > ASSERT(!isASCIIHexDigit(m_current)); > >- m_lexErrorMessage = ASCIILiteral("\\x can only be followed by a hex character sequence"); >+ m_lexErrorMessage = "\\x can only be followed by a hex character sequence"_s; > return atEnd() ? StringUnterminated : StringCannotBeParsed; > } > >@@ -1261,7 +1261,7 @@ template <bool shouldBuildStrings, LexerEscapeParseMode escapeParseMode> ALWAYS_ > return StringParsedSuccessfully; > } > >- m_lexErrorMessage = ASCIILiteral("\\u can only be followed by a Unicode character sequence"); >+ m_lexErrorMessage = "\\u can only be followed by a Unicode character sequence"_s; > return atEnd() ? StringUnterminated : StringCannotBeParsed; > } > >@@ -1279,7 +1279,7 @@ template <bool shouldBuildStrings, LexerEscapeParseMode escapeParseMode> ALWAYS_ > if (character1 == '0') > shift(); > >- m_lexErrorMessage = ASCIILiteral("The only valid numeric escape in strict mode is '\\0'"); >+ m_lexErrorMessage = "The only valid numeric escape in strict mode is '\\0'"_s; > return atEnd() ? StringUnterminated : StringCannotBeParsed; > } > if (shouldBuildStrings) >@@ -1318,7 +1318,7 @@ template <bool shouldBuildStrings, LexerEscapeParseMode escapeParseMode> ALWAYS_ > return StringParsedSuccessfully; > } > >- m_lexErrorMessage = ASCIILiteral("Unterminated string constant"); >+ m_lexErrorMessage = "Unterminated string constant"_s; > return StringUnterminated; > } > >@@ -1360,7 +1360,7 @@ template <bool shouldBuildStrings> auto Lexer<T>::parseStringSlowCase(JSTokenDat > if (UNLIKELY(m_current < 0xE)) { > // New-line or end of input is not allowed > if (atEnd() || m_current == '\r' || m_current == '\n') { >- m_lexErrorMessage = ASCIILiteral("Unexpected EOF"); >+ m_lexErrorMessage = "Unexpected EOF"_s; > return atEnd() ? StringUnterminated : StringCannotBeParsed; > } > // Anything else is just a normal character >@@ -1437,7 +1437,7 @@ typename Lexer<T>::StringParseResult Lexer<T>::parseTemplateLiteral(JSTokenData* > // End of input is not allowed. > // Unlike String, line terminator is allowed. > if (atEnd()) { >- m_lexErrorMessage = ASCIILiteral("Unexpected EOF"); >+ m_lexErrorMessage = "Unexpected EOF"_s; > return StringUnterminated; > } > >@@ -1972,7 +1972,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > shift(); > if (parseMultilineComment()) > goto start; >- m_lexErrorMessage = ASCIILiteral("Multiline comment was not closed properly"); >+ m_lexErrorMessage = "Multiline comment was not closed properly"_s; > token = UNTERMINATED_MULTILINE_COMMENT_ERRORTOK; > goto returnError; > } >@@ -2104,7 +2104,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > token = DOUBLE; > if (isASCIIAlphaCaselessEqual(m_current, 'e')) { > if (!parseNumberAfterExponentIndicator()) { >- m_lexErrorMessage = ASCIILiteral("Non-number found after exponent indicator"); >+ m_lexErrorMessage = "Non-number found after exponent indicator"_s; > token = atEnd() ? UNTERMINATED_NUMERIC_LITERAL_ERRORTOK : INVALID_NUMERIC_LITERAL_ERRORTOK; > goto returnError; > } >@@ -2115,7 +2115,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > token = tokenTypeForIntegerLikeToken(tokenData->doubleValue); > > if (UNLIKELY(isIdentStart(m_current))) { >- m_lexErrorMessage = ASCIILiteral("No identifiers allowed directly after numeric literal"); >+ m_lexErrorMessage = "No identifiers allowed directly after numeric literal"_s; > token = atEnd() ? UNTERMINATED_NUMERIC_LITERAL_ERRORTOK : INVALID_NUMERIC_LITERAL_ERRORTOK; > goto returnError; > } >@@ -2125,7 +2125,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > shift(); > if (isASCIIAlphaCaselessEqual(m_current, 'x')) { > if (!isASCIIHexDigit(peek(1))) { >- m_lexErrorMessage = ASCIILiteral("No hexadecimal digits after '0x'"); >+ m_lexErrorMessage = "No hexadecimal digits after '0x'"_s; > token = UNTERMINATED_HEX_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2144,7 +2144,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > > if (isIdentStart(m_current)) { >- m_lexErrorMessage = ASCIILiteral("No space between hexadecimal literal and identifier"); >+ m_lexErrorMessage = "No space between hexadecimal literal and identifier"_s; > token = UNTERMINATED_HEX_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2155,7 +2155,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > if (isASCIIAlphaCaselessEqual(m_current, 'b')) { > if (!isASCIIBinaryDigit(peek(1))) { >- m_lexErrorMessage = ASCIILiteral("No binary digits after '0b'"); >+ m_lexErrorMessage = "No binary digits after '0b'"_s; > token = UNTERMINATED_BINARY_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2176,7 +2176,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > > if (isIdentStart(m_current)) { >- m_lexErrorMessage = ASCIILiteral("No space between binary literal and identifier"); >+ m_lexErrorMessage = "No space between binary literal and identifier"_s; > token = UNTERMINATED_BINARY_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2188,7 +2188,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > > if (isASCIIAlphaCaselessEqual(m_current, 'o')) { > if (!isASCIIOctalDigit(peek(1))) { >- m_lexErrorMessage = ASCIILiteral("No octal digits after '0o'"); >+ m_lexErrorMessage = "No octal digits after '0o'"_s; > token = UNTERMINATED_OCTAL_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2209,7 +2209,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > > if (isIdentStart(m_current)) { >- m_lexErrorMessage = ASCIILiteral("No space between octal literal and identifier"); >+ m_lexErrorMessage = "No space between octal literal and identifier"_s; > token = UNTERMINATED_OCTAL_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2221,7 +2221,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > > record8('0'); > if (strictMode && isASCIIDigit(m_current)) { >- m_lexErrorMessage = ASCIILiteral("Decimal integer literals with a leading zero are forbidden in strict mode"); >+ m_lexErrorMessage = "Decimal integer literals with a leading zero are forbidden in strict mode"_s; > token = UNTERMINATED_OCTAL_NUMBER_ERRORTOK; > goto returnError; > } >@@ -2255,7 +2255,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > if (isASCIIAlphaCaselessEqual(m_current, 'e')) { > if (!parseNumberAfterExponentIndicator()) { >- m_lexErrorMessage = ASCIILiteral("Non-number found after exponent indicator"); >+ m_lexErrorMessage = "Non-number found after exponent indicator"_s; > token = atEnd() ? UNTERMINATED_NUMERIC_LITERAL_ERRORTOK : INVALID_NUMERIC_LITERAL_ERRORTOK; > goto returnError; > } >@@ -2269,7 +2269,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > } > > if (UNLIKELY(isIdentStart(m_current))) { >- m_lexErrorMessage = ASCIILiteral("No identifiers allowed directly after numeric literal"); >+ m_lexErrorMessage = "No identifiers allowed directly after numeric literal"_s; > token = atEnd() ? UNTERMINATED_NUMERIC_LITERAL_ERRORTOK : INVALID_NUMERIC_LITERAL_ERRORTOK; > goto returnError; > } >@@ -2318,7 +2318,7 @@ JSTokenType Lexer<T>::lex(JSToken* tokenRecord, unsigned lexerFlags, bool strict > goto returnError; > default: > RELEASE_ASSERT_NOT_REACHED(); >- m_lexErrorMessage = ASCIILiteral("Internal Error"); >+ m_lexErrorMessage = "Internal Error"_s; > token = ERRORTOK; > goto returnError; > } >diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp >index 6e6fd4953594e273e820112114e32d85a6bccc63..9707268be21d0589e4d29984e28c1ad9ea25b476 100644 >--- a/Source/JavaScriptCore/parser/Parser.cpp >+++ b/Source/JavaScriptCore/parser/Parser.cpp >@@ -248,7 +248,7 @@ String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMo > if (hasError()) > parseError = m_errorMessage; > else >- parseError = ASCIILiteral("Parser error"); >+ parseError = "Parser error"_s; > } > > IdentifierSet capturedVariables; >diff --git a/Source/JavaScriptCore/parser/Parser.h b/Source/JavaScriptCore/parser/Parser.h >index ab0e74d40a5ebe0cc7b2fc797f024d66e67c683c..32a1c1e9192fc1d999b89c7a351e09bafe12ad6c 100644 >--- a/Source/JavaScriptCore/parser/Parser.h >+++ b/Source/JavaScriptCore/parser/Parser.h >@@ -1419,7 +1419,7 @@ class Parser { > ASSERT_WITH_MESSAGE(!message.isEmpty(), "Attempted to set the empty string as an error message. Likely caused by invalid UTF8 used when creating the message."); > m_errorMessage = message; > if (m_errorMessage.isEmpty()) >- m_errorMessage = ASCIILiteral("Unparseable script"); >+ m_errorMessage = "Unparseable script"_s; > } > > NEVER_INLINE void logError(bool); >diff --git a/Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp b/Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp >index ee89101c339787ae5b5b7e88d58eee47075e2849..fc03e43362bd02eba97c7df712f82f270d108174 100644 >--- a/Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp >+++ b/Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp >@@ -64,7 +64,7 @@ void AbstractModuleRecord::finishCreation(ExecState* exec, VM& vm) > JSMap* map = JSMap::create(exec, vm, globalObject(vm)->mapStructure()); > scope.releaseAssertNoException(); > m_dependenciesMap.set(vm, this, map); >- putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("dependenciesMap")), m_dependenciesMap.get()); >+ putDirect(vm, Identifier::fromString(&vm, "dependenciesMap"_s), m_dependenciesMap.get()); > } > > void AbstractModuleRecord::visitChildren(JSCell* cell, SlotVisitor& visitor) >diff --git a/Source/JavaScriptCore/runtime/ArrayBuffer.cpp b/Source/JavaScriptCore/runtime/ArrayBuffer.cpp >index 4171f2e1ea4b7eef53920519ae2d6201beb89804..726d664d23f419aa1e86f8fbccbb01a9b5de66d8 100644 >--- a/Source/JavaScriptCore/runtime/ArrayBuffer.cpp >+++ b/Source/JavaScriptCore/runtime/ArrayBuffer.cpp >@@ -369,10 +369,10 @@ ASCIILiteral errorMesasgeForTransfer(ArrayBuffer* buffer) > { > ASSERT(buffer->isLocked()); > if (buffer->isShared()) >- return ASCIILiteral("Cannot transfer a SharedArrayBuffer"); >+ return "Cannot transfer a SharedArrayBuffer"_s; > if (buffer->isWasmMemory()) >- return ASCIILiteral("Cannot transfer a WebAssembly.Memory"); >- return ASCIILiteral("Cannot transfer an ArrayBuffer whose backing store has been accessed by the JavaScriptCore C API"); >+ return "Cannot transfer a WebAssembly.Memory"_s; >+ return "Cannot transfer an ArrayBuffer whose backing store has been accessed by the JavaScriptCore C API"_s; > } > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h b/Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h >index 0dd14c29bf3a8f24259403aba80ac08365b06ecf..630ed3dd42fc8e9c08f6628f896dd8426b751cb1 100644 >--- a/Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h >+++ b/Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h >@@ -26,6 +26,7 @@ > #pragma once > > #include <wtf/PrintStream.h> >+#include <wtf/text/ASCIILiteral.h> > > namespace JSC { > >@@ -34,16 +35,16 @@ enum class ArrayBufferSharingMode { > Shared > }; > >-inline const char* arrayBufferSharingModeName(ArrayBufferSharingMode sharingMode) >+inline ASCIILiteral arrayBufferSharingModeName(ArrayBufferSharingMode sharingMode) > { > switch (sharingMode) { > case ArrayBufferSharingMode::Default: >- return "ArrayBuffer"; >+ return "ArrayBuffer"_s; > case ArrayBufferSharingMode::Shared: >- return "SharedArrayBuffer"; >+ return "SharedArrayBuffer"_s; > } > RELEASE_ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp >index 2ef591882a4dea571e5baaf27f0a9d9773bb15db..7525f5fc6bc20e9c1626446ef040cdbd0a56819a 100644 >--- a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp >@@ -80,7 +80,7 @@ JSArray* constructArrayWithSizeQuirk(ExecState* exec, ArrayAllocationProfile* pr > > uint32_t n = length.toUInt32(exec); > if (n != length.toNumber(exec)) { >- throwException(exec, scope, createRangeError(exec, ASCIILiteral("Array size is not a small enough positive integer."))); >+ throwException(exec, scope, createRangeError(exec, "Array size is not a small enough positive integer."_s)); > return nullptr; > } > scope.release(); >@@ -119,7 +119,7 @@ static ALWAYS_INLINE bool isArraySlowInline(ExecState* exec, ProxyObject* proxy) > > while (true) { > if (proxy->isRevoked()) { >- throwTypeError(exec, scope, ASCIILiteral("Array.isArray cannot be called on a Proxy that has been revoked")); >+ throwTypeError(exec, scope, "Array.isArray cannot be called on a Proxy that has been revoked"_s); > return false; > } > JSObject* argument = proxy->target(); >diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp >index 241f240e01e414475ba1723f6ad4ad8cb34fba3b..cc69f8b63c794283e2ace48d70f226a1a60bc11f 100644 >--- a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp >@@ -190,7 +190,7 @@ static ALWAYS_INLINE void setLength(ExecState* exec, VM& vm, JSObject* obj, unsi > bool success = putLength(exec, vm, obj, jsNumber(value)); > RETURN_IF_EXCEPTION(scope, void()); > if (UNLIKELY(!success)) >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > } > > ALWAYS_INLINE bool speciesWatchpointIsValid(ExecState* exec, JSObject* thisObject) >@@ -324,7 +324,7 @@ void shift(ExecState* exec, JSObject* thisObj, unsigned header, unsigned current > bool success = thisObj->methodTable(vm)->deletePropertyByIndex(thisObj, exec, to); > RETURN_IF_EXCEPTION(scope, void()); > if (!success) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return; > } > } >@@ -333,7 +333,7 @@ void shift(ExecState* exec, JSObject* thisObj, unsigned header, unsigned current > bool success = thisObj->methodTable(vm)->deletePropertyByIndex(thisObj, exec, k - 1); > RETURN_IF_EXCEPTION(scope, void()); > if (!success) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return; > } > } >@@ -379,7 +379,7 @@ void unshift(ExecState* exec, JSObject* thisObj, unsigned header, unsigned curre > bool success = thisObj->methodTable(vm)->deletePropertyByIndex(thisObj, exec, to); > RETURN_IF_EXCEPTION(scope, void()); > if (UNLIKELY(!success)) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return; > } > } >@@ -796,7 +796,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPop(ExecState* exec) > bool success = thisObj->methodTable(vm)->deletePropertyByIndex(thisObj, exec, length - 1); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (UNLIKELY(!success)) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return encodedJSValue(); > } > scope.release(); >@@ -918,7 +918,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec) > bool success = thisObject->methodTable(vm)->deletePropertyByIndex(thisObject, exec, lower); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (UNLIKELY(!success)) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return encodedJSValue(); > } > } >@@ -930,7 +930,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec) > bool success = thisObject->methodTable(vm)->deletePropertyByIndex(thisObject, exec, upper); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (UNLIKELY(!success)) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return encodedJSValue(); > } > } >@@ -1134,7 +1134,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec) > unsigned nrArgs = exec->argumentCount(); > if (nrArgs) { > if (UNLIKELY(doubleLength + static_cast<double>(nrArgs) > maxSafeInteger())) >- return throwVMTypeError(exec, scope, ASCIILiteral("Cannot shift to offset greater than (2 ** 53) - 1")); >+ return throwVMTypeError(exec, scope, "Cannot shift to offset greater than (2 ** 53) - 1"_s); > unshift<JSArray::ShiftCountForShift>(exec, thisObj, 0, 0, nrArgs, length); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > } >diff --git a/Source/JavaScriptCore/runtime/AtomicsObject.cpp b/Source/JavaScriptCore/runtime/AtomicsObject.cpp >index 0f90a6a6b8eba7dfdfc546ecf916b6ddc50b6b26..057d2ff51adc800789242ac2e7e96d0062507ed0 100644 >--- a/Source/JavaScriptCore/runtime/AtomicsObject.cpp >+++ b/Source/JavaScriptCore/runtime/AtomicsObject.cpp >@@ -114,7 +114,7 @@ unsigned validatedAccessIndex(VM& vm, ExecState* exec, JSValue accessIndexValue, > else { > accessIndexValue = jsNumber(accessIndexDouble); > if (!accessIndexValue.isInt32()) { >- throwRangeError(exec, scope, ASCIILiteral("Access index is not an integer.")); >+ throwRangeError(exec, scope, "Access index is not an integer."_s); > return 0; > } > } >@@ -123,7 +123,7 @@ unsigned validatedAccessIndex(VM& vm, ExecState* exec, JSValue accessIndexValue, > > ASSERT(typedArrayView->length() <= static_cast<unsigned>(INT_MAX)); > if (static_cast<unsigned>(accessIndex) >= typedArrayView->length()) { >- throwRangeError(exec, scope, ASCIILiteral("Access index out of bounds for atomic access.")); >+ throwRangeError(exec, scope, "Access index out of bounds for atomic access."_s); > return 0; > } > >@@ -137,7 +137,7 @@ EncodedJSValue atomicOperationWithArgs(VM& vm, ExecState* exec, const JSValue* a > > JSValue typedArrayValue = args[0]; > if (!typedArrayValue.isCell()) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array argument must be a cell.")); >+ throwTypeError(exec, scope, "Typed array argument must be a cell."_s); > return JSValue::encode(jsUndefined()); > } > >@@ -153,13 +153,13 @@ EncodedJSValue atomicOperationWithArgs(VM& vm, ExecState* exec, const JSValue* a > case Uint32ArrayType: > break; > default: >- throwTypeError(exec, scope, ASCIILiteral("Typed array argument must be an Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, or Uint32Array.")); >+ throwTypeError(exec, scope, "Typed array argument must be an Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, or Uint32Array."_s); > return JSValue::encode(jsUndefined()); > } > > JSArrayBufferView* typedArrayView = jsCast<JSArrayBufferView*>(typedArrayCell); > if (!typedArrayView->isShared()) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array argument must wrap a SharedArrayBuffer.")); >+ throwTypeError(exec, scope, "Typed array argument must wrap a SharedArrayBuffer."_s); > return JSValue::encode(jsUndefined()); > } > >@@ -365,12 +365,12 @@ EncodedJSValue JSC_HOST_CALL atomicsFuncWait(ExecState* exec) > > JSInt32Array* typedArray = jsDynamicCast<JSInt32Array*>(vm, exec->argument(0)); > if (!typedArray) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array for wait/wake must be an Int32Array.")); >+ throwTypeError(exec, scope, "Typed array for wait/wake must be an Int32Array."_s); > return JSValue::encode(jsUndefined()); > } > > if (!typedArray->isShared()) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array for wait/wake must wrap a SharedArrayBuffer.")); >+ throwTypeError(exec, scope, "Typed array for wait/wake must wrap a SharedArrayBuffer."_s); > return JSValue::encode(jsUndefined()); > } > >@@ -386,7 +386,7 @@ EncodedJSValue JSC_HOST_CALL atomicsFuncWait(ExecState* exec) > RETURN_IF_EXCEPTION(scope, JSValue::encode(jsUndefined())); > > if (!vm.m_typedArrayController->isAtomicsWaitAllowedOnCurrentThread()) { >- throwTypeError(exec, scope, ASCIILiteral("Atomics.wait cannot be called from the current thread.")); >+ throwTypeError(exec, scope, "Atomics.wait cannot be called from the current thread."_s); > return JSValue::encode(jsUndefined()); > } > >@@ -425,7 +425,7 @@ EncodedJSValue JSC_HOST_CALL atomicsFuncWait(ExecState* exec) > resultString = "timed-out"; > else > resultString = "ok"; >- return JSValue::encode(jsString(exec, ASCIILiteral(resultString))); >+ return JSValue::encode(jsString(exec, resultString)); > } > > EncodedJSValue JSC_HOST_CALL atomicsFuncWake(ExecState* exec) >@@ -435,12 +435,12 @@ EncodedJSValue JSC_HOST_CALL atomicsFuncWake(ExecState* exec) > > JSInt32Array* typedArray = jsDynamicCast<JSInt32Array*>(vm, exec->argument(0)); > if (!typedArray) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array for wait/wake must be an Int32Array.")); >+ throwTypeError(exec, scope, "Typed array for wait/wake must be an Int32Array."_s); > return JSValue::encode(jsUndefined()); > } > > if (!typedArray->isShared()) { >- throwTypeError(exec, scope, ASCIILiteral("Typed array for wait/wake must wrap a SharedArrayBuffer.")); >+ throwTypeError(exec, scope, "Typed array for wait/wake must wrap a SharedArrayBuffer."_s); > return JSValue::encode(jsUndefined()); > } > >diff --git a/Source/JavaScriptCore/runtime/BigIntConstructor.cpp b/Source/JavaScriptCore/runtime/BigIntConstructor.cpp >index fc30e0aae8fb2494d370e7a80465aa2279eb6471..6aa95ea3e3ff0cae2d75c003b139d020edee0d16 100644 >--- a/Source/JavaScriptCore/runtime/BigIntConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/BigIntConstructor.cpp >@@ -71,7 +71,7 @@ void BigIntConstructor::finishCreation(VM& vm, BigIntPrototype* bigIntPrototype) > > putDirectWithoutTransition(vm, vm.propertyNames->prototype, bigIntPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("BigInt"))), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("BigInt"_s)), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); > } > > // ------------------------------ Functions --------------------------- >@@ -104,7 +104,7 @@ static EncodedJSValue toBigInt(ExecState& state, JSValue argument) > } > > if (argument.isUndefinedOrNull() || argument.isNumber() || argument.isSymbol()) >- return throwVMTypeError(&state, scope, ASCIILiteral("Invalid argument type in ToBigInt operation")); >+ return throwVMTypeError(&state, scope, "Invalid argument type in ToBigInt operation"_s); > > ASSERT(argument.isString()); > >@@ -125,7 +125,7 @@ static EncodedJSValue JSC_HOST_CALL callBigIntConstructor(ExecState* state) > > if (primitive.isNumber()) { > if (!isSafeInteger(primitive)) >- return throwVMError(state, scope, createRangeError(state, ASCIILiteral("Not safe integer"))); >+ return throwVMError(state, scope, createRangeError(state, "Not safe integer"_s)); > > scope.release(); > if (primitive.isInt32()) >diff --git a/Source/JavaScriptCore/runtime/BigIntObject.cpp b/Source/JavaScriptCore/runtime/BigIntObject.cpp >index 9357074b7f4375d813a4eae431ee66a1454916cd..1f04547ba0a7f4aefaa11c3cb0450d4014cc625d 100644 >--- a/Source/JavaScriptCore/runtime/BigIntObject.cpp >+++ b/Source/JavaScriptCore/runtime/BigIntObject.cpp >@@ -58,7 +58,7 @@ void BigIntObject::finishCreation(VM& vm, JSBigInt* bigInt) > > String BigIntObject::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > JSValue BigIntObject::defaultValue(const JSObject* object, ExecState*, PreferredPrimitiveType) >diff --git a/Source/JavaScriptCore/runtime/BigIntPrototype.cpp b/Source/JavaScriptCore/runtime/BigIntPrototype.cpp >index 32d9d1487ee5543e1a33a29a37968dd38841379a..7e15288585e5f4a739762389a6844b38fc70a9a0 100644 >--- a/Source/JavaScriptCore/runtime/BigIntPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/BigIntPrototype.cpp >@@ -96,7 +96,7 @@ EncodedJSValue JSC_HOST_CALL bigIntProtoFuncToString(ExecState* state) > > JSBigInt* value = toThisBigIntValue(vm, state->thisValue()); > if (!value) >- return throwVMTypeError(state, scope, ASCIILiteral("'this' value must be a BigInt or BigIntObject")); >+ return throwVMTypeError(state, scope, "'this' value must be a BigInt or BigIntObject"_s); > > ASSERT(value); > >@@ -124,7 +124,7 @@ EncodedJSValue JSC_HOST_CALL bigIntProtoFuncValueOf(ExecState* state) > return JSValue::encode(value); > > auto scope = DECLARE_THROW_SCOPE(vm); >- return throwVMTypeError(state, scope, ASCIILiteral("'this' value must be a BigInt or BigIntObject")); >+ return throwVMTypeError(state, scope, "'this' value must be a BigInt or BigIntObject"_s); > } > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >index dabd9c037af1d395d4405b6f83b1b2c0ead4798f..24ead4cb97758f91932e374d7cbfc54715490313 100644 >--- a/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >+++ b/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp >@@ -289,7 +289,7 @@ SLOW_PATH_DECL(slow_path_check_tdz) > SLOW_PATH_DECL(slow_path_throw_strict_mode_readonly_property_write_error) > { > BEGIN(); >- THROW(createTypeError(exec, ASCIILiteral(ReadonlyPropertyWriteError))); >+ THROW(createTypeError(exec, ReadonlyPropertyWriteError)); > } > > SLOW_PATH_DECL(slow_path_not) >@@ -863,7 +863,7 @@ SLOW_PATH_DECL(slow_path_to_index_string) > SLOW_PATH_DECL(slow_path_profile_type_clear_log) > { > BEGIN(); >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("LLInt log full.")); >+ vm.typeProfilerLog()->processLogEntries("LLInt log full."_s); > END(); > } > >diff --git a/Source/JavaScriptCore/runtime/ConsoleClient.cpp b/Source/JavaScriptCore/runtime/ConsoleClient.cpp >index 2917d7681d59790bc7b1601931b1f08cf0297f99..60e31291795018a6aa271299ba7c10b03965d9f6 100644 >--- a/Source/JavaScriptCore/runtime/ConsoleClient.cpp >+++ b/Source/JavaScriptCore/runtime/ConsoleClient.cpp >@@ -177,7 +177,7 @@ void ConsoleClient::printConsoleMessageWithArguments(MessageSource source, Messa > const ScriptCallFrame& callFrame = callStack->at(i); > String functionName = String(callFrame.functionName()); > if (functionName.isEmpty()) >- functionName = ASCIILiteral("(unknown)"); >+ functionName = "(unknown)"_s; > > StringBuilder callFrameBuilder; > callFrameBuilder.appendNumber(i); >diff --git a/Source/JavaScriptCore/runtime/ConsoleObject.cpp b/Source/JavaScriptCore/runtime/ConsoleObject.cpp >index 8a029d0f0acd25c768f4406731c14834ddd3f9c5..417d6404fa81f814a7f779ce72048bb5f85ccf76 100644 >--- a/Source/JavaScriptCore/runtime/ConsoleObject.cpp >+++ b/Source/JavaScriptCore/runtime/ConsoleObject.cpp >@@ -287,7 +287,7 @@ static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState* > static String valueOrDefaultLabelString(ExecState* exec, JSValue value) > { > if (value.isUndefined()) >- return ASCIILiteral("default"); >+ return "default"_s; > return value.toWTFString(exec); > } > >@@ -301,7 +301,7 @@ static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState* exec) > > String title; > if (exec->argumentCount() < 1) >- title = ASCIILiteral("default"); >+ title = "default"_s; > else { > title = valueOrDefaultLabelString(exec, exec->argument(0)); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -321,7 +321,7 @@ static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState* exec) > > String title; > if (exec->argumentCount() < 1) >- title = ASCIILiteral("default"); >+ title = "default"_s; > else { > title = valueOrDefaultLabelString(exec, exec->argument(0)); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >diff --git a/Source/JavaScriptCore/runtime/DatePrototype.cpp b/Source/JavaScriptCore/runtime/DatePrototype.cpp >index bfb01b29df3a6ecbd29b7afbc1af5186fedcb038..5ead37694ef073273c7610c0d3046a76ff7f9680 100644 >--- a/Source/JavaScriptCore/runtime/DatePrototype.cpp >+++ b/Source/JavaScriptCore/runtime/DatePrototype.cpp >@@ -311,7 +311,7 @@ static JSCell* formatLocaleDate(ExecState* exec, DateInstance* dateObject, doubl > { > const GregorianDateTime* gregorianDateTime = dateObject->gregorianDateTime(exec); > if (!gregorianDateTime) >- return jsNontrivialString(exec, ASCIILiteral("Invalid Date")); >+ return jsNontrivialString(exec, "Invalid Date"_s); > return formatLocaleDate(exec, *gregorianDateTime, format); > } > >@@ -330,7 +330,7 @@ static EncodedJSValue formateDateInstance(ExecState* exec, DateTimeFormat format > ? thisDateObj->gregorianDateTimeUTC(exec) > : thisDateObj->gregorianDateTime(exec); > if (!gregorianDateTime) >- return JSValue::encode(jsNontrivialString(exec, String(ASCIILiteral("Invalid Date")))); >+ return JSValue::encode(jsNontrivialString(exec, String("Invalid Date"_s))); > > return JSValue::encode(jsNontrivialString(exec, formatDateTime(*gregorianDateTime, format, asUTCVariant))); > } >@@ -502,10 +502,10 @@ void DatePrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) > Base::finishCreation(vm); > ASSERT(inherits(vm, info())); > >- Identifier toUTCStringName = Identifier::fromString(&vm, ASCIILiteral("toUTCString")); >+ Identifier toUTCStringName = Identifier::fromString(&vm, "toUTCString"_s); > JSFunction* toUTCStringFunction = JSFunction::create(vm, globalObject, 0, toUTCStringName.string(), dateProtoFuncToUTCString); > putDirectWithoutTransition(vm, toUTCStringName, toUTCStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); >- putDirectWithoutTransition(vm, Identifier::fromString(&vm, ASCIILiteral("toGMTString")), toUTCStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); >+ putDirectWithoutTransition(vm, Identifier::fromString(&vm, "toGMTString"_s), toUTCStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > > #if ENABLE(INTL) > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", datePrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); >@@ -513,7 +513,7 @@ void DatePrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleTimeString", datePrototypeToLocaleTimeStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > #endif > >- JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, ASCIILiteral("[Symbol.toPrimitive]"), dateProtoFuncToPrimitiveSymbol, NoIntrinsic); >+ JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, "[Symbol.toPrimitive]"_s, dateProtoFuncToPrimitiveSymbol, NoIntrinsic); > putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); > > // The constructor will be added later, after DateConstructor has been built. >@@ -543,11 +543,11 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec) > return throwVMTypeError(exec, scope); > > if (!std::isfinite(thisDateObj->internalNumber())) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("Invalid Date"))); >+ return throwVMError(exec, scope, createRangeError(exec, "Invalid Date"_s)); > > const GregorianDateTime* gregorianDateTime = thisDateObj->gregorianDateTimeUTC(exec); > if (!gregorianDateTime) >- return JSValue::encode(jsNontrivialString(exec, String(ASCIILiteral("Invalid Date")))); >+ return JSValue::encode(jsNontrivialString(exec, String("Invalid Date"_s))); > // Maximum amount of space we need in buffer: 7 (max. digits in year) + 2 * 5 (2 characters each for month, day, hour, minute, second) + 4 (. + 3 digits for milliseconds) > // 6 for formatting and one for null termination = 28. We add one extra character to allow us to force null termination. > char buffer[28]; >@@ -1167,12 +1167,12 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToJSON(ExecState* exec) > CallData callData; > CallType callType = getCallData(vm, toISOValue, callData); > if (callType == CallType::None) >- return throwVMTypeError(exec, scope, ASCIILiteral("toISOString is not a function")); >+ return throwVMTypeError(exec, scope, "toISOString is not a function"_s); > > JSValue result = call(exec, asObject(toISOValue), callType, callData, object, *vm.emptyList); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (result.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("toISOString did not return a primitive value")); >+ return throwVMTypeError(exec, scope, "toISOString did not return a primitive value"_s); > return JSValue::encode(result); > } > >diff --git a/Source/JavaScriptCore/runtime/Error.cpp b/Source/JavaScriptCore/runtime/Error.cpp >index 82991b59f97e4afe3d99763325c823009a53bfc5..89cd2dbd83947ab0d29b8a958251b57a65aa275a 100644 >--- a/Source/JavaScriptCore/runtime/Error.cpp >+++ b/Source/JavaScriptCore/runtime/Error.cpp >@@ -91,7 +91,7 @@ JSObject* createTypeError(ExecState* exec, const String& message, ErrorInstance: > > JSObject* createNotEnoughArgumentsError(ExecState* exec, ErrorInstance::SourceAppender appender) > { >- return createTypeError(exec, ASCIILiteral("Not enough arguments"), appender, TypeNothing); >+ return createTypeError(exec, "Not enough arguments"_s, appender, TypeNothing); > } > > JSObject* createURIError(ExecState* exec, const String& message, ErrorInstance::SourceAppender appender) >@@ -283,7 +283,7 @@ JSObject* throwTypeError(ExecState* exec, ThrowScope& scope, const String& messa > > JSObject* throwSyntaxError(ExecState* exec, ThrowScope& scope) > { >- return throwException(exec, scope, createSyntaxError(exec, ASCIILiteral("Syntax error"))); >+ return throwException(exec, scope, createSyntaxError(exec, "Syntax error"_s)); > } > > JSObject* throwSyntaxError(ExecState* exec, ThrowScope& scope, const String& message) >@@ -328,7 +328,7 @@ JSObject* createSyntaxError(ExecState* exec, const String& message) > > JSObject* createTypeError(ExecState* exec) > { >- return createTypeError(exec, ASCIILiteral("Type error")); >+ return createTypeError(exec, "Type error"_s); > } > > JSObject* createTypeError(ExecState* exec, const String& message) >@@ -348,7 +348,7 @@ JSObject* createURIError(ExecState* exec, const String& message) > > JSObject* createOutOfMemoryError(ExecState* exec) > { >- auto* error = createError(exec, ASCIILiteral("Out of memory"), nullptr); >+ auto* error = createError(exec, "Out of memory"_s, nullptr); > jsCast<ErrorInstance*>(error)->setOutOfMemoryError(); > return error; > } >diff --git a/Source/JavaScriptCore/runtime/Error.h b/Source/JavaScriptCore/runtime/Error.h >index 773cd274c29417ded9bd622edad6785ff232ae7e..0d0a0b5cf6d82d428ea87463f165232f2c1691ef 100644 >--- a/Source/JavaScriptCore/runtime/Error.h >+++ b/Source/JavaScriptCore/runtime/Error.h >@@ -97,7 +97,7 @@ JS_EXPORT_PRIVATE JSValue throwDOMAttributeGetterTypeError(ExecState*, ThrowScop > // Convenience wrappers, wrap result as an EncodedJSValue. > inline void throwVMError(ExecState* exec, ThrowScope& scope, Exception* exception) { throwException(exec, scope, exception); } > inline EncodedJSValue throwVMError(ExecState* exec, ThrowScope& scope, JSValue error) { return JSValue::encode(throwException(exec, scope, error)); } >-inline EncodedJSValue throwVMError(ExecState* exec, ThrowScope& scope, const char* errorMessage) { return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral(errorMessage)))); } >+inline EncodedJSValue throwVMError(ExecState* exec, ThrowScope& scope, const char* errorMessage) { return JSValue::encode(throwException(exec, scope, createError(exec, errorMessage))); } > inline EncodedJSValue throwVMTypeError(ExecState* exec, ThrowScope& scope) { return JSValue::encode(throwTypeError(exec, scope)); } > inline EncodedJSValue throwVMTypeError(ExecState* exec, ThrowScope& scope, ASCIILiteral errorMessage) { return JSValue::encode(throwTypeError(exec, scope, errorMessage)); } > inline EncodedJSValue throwVMTypeError(ExecState* exec, ThrowScope& scope, const String& errorMessage) { return JSValue::encode(throwTypeError(exec, scope, errorMessage)); } >diff --git a/Source/JavaScriptCore/runtime/ErrorConstructor.cpp b/Source/JavaScriptCore/runtime/ErrorConstructor.cpp >index a0eb358781cb2e1dea91a0da8eeddd7841918fb0..02b1b86ac94d487b13dc2392e22d5047c05dbe17 100644 >--- a/Source/JavaScriptCore/runtime/ErrorConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/ErrorConstructor.cpp >@@ -40,7 +40,7 @@ ErrorConstructor::ErrorConstructor(VM& vm, Structure* structure) > > void ErrorConstructor::finishCreation(VM& vm, ErrorPrototype* errorPrototype) > { >- Base::finishCreation(vm, ASCIILiteral("Error")); >+ Base::finishCreation(vm, "Error"_s); > // ECMA 15.11.3.1 Error.prototype > putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); >diff --git a/Source/JavaScriptCore/runtime/ErrorInstance.cpp b/Source/JavaScriptCore/runtime/ErrorInstance.cpp >index a6158b37c03d3049ddcd94f9dfd6322b13939541..76faae8a3d00c4a4474a724be1e7f837f2cc5210 100644 >--- a/Source/JavaScriptCore/runtime/ErrorInstance.cpp >+++ b/Source/JavaScriptCore/runtime/ErrorInstance.cpp >@@ -169,7 +169,7 @@ String ErrorInstance::sanitizedToString(ExecState* exec) > > String nameString; > if (!nameValue) >- nameString = ASCIILiteral("Error"); >+ nameString = "Error"_s; > else { > nameString = nameValue.toWTFString(exec); > RETURN_IF_EXCEPTION(scope, String()); >diff --git a/Source/JavaScriptCore/runtime/ErrorPrototype.cpp b/Source/JavaScriptCore/runtime/ErrorPrototype.cpp >index 50abe3886474291ae77a8820fd7560f11692e208..06f0c2012b3594ec7c80f6b4225b681248937d45 100644 >--- a/Source/JavaScriptCore/runtime/ErrorPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/ErrorPrototype.cpp >@@ -57,7 +57,7 @@ void ErrorPrototype::finishCreation(VM& vm) > { > Base::finishCreation(vm); > ASSERT(inherits(vm, info())); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), static_cast<unsigned>(PropertyAttribute::DontEnum)); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("Error"_s)), static_cast<unsigned>(PropertyAttribute::DontEnum)); > putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), static_cast<unsigned>(PropertyAttribute::DontEnum)); > } > >@@ -90,7 +90,7 @@ EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState* exec) > // 4. If name is undefined, then let name be "Error"; else let name be ToString(name). > String nameString; > if (name.isUndefined()) >- nameString = ASCIILiteral("Error"); >+ nameString = "Error"_s; > else { > nameString = name.toWTFString(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >diff --git a/Source/JavaScriptCore/runtime/ExceptionFuzz.cpp b/Source/JavaScriptCore/runtime/ExceptionFuzz.cpp >index 67c49d0468010ef26dbff6a57af56f05f8d9604f..238d5b5d370745b00c71c5b27d1e6d59d1c193b8 100644 >--- a/Source/JavaScriptCore/runtime/ExceptionFuzz.cpp >+++ b/Source/JavaScriptCore/runtime/ExceptionFuzz.cpp >@@ -58,7 +58,7 @@ void doExceptionFuzzing(ExecState* exec, ThrowScope& scope, const char* where, v > // to placate the exception check verifier here. > EXCEPTION_ASSERT(scope.exception() || !scope.exception()); > >- throwException(exec, scope, createError(exec, ASCIILiteral("Exception Fuzz"))); >+ throwException(exec, scope, createError(exec, "Exception Fuzz"_s)); > } > } > >diff --git a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >index 63653b3f8b2d7da4b5c74ce34c8c0c7e2342ad8d..5d63970a627c5d5b3cacbb211869fd557faba444 100644 >--- a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >+++ b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp >@@ -51,7 +51,7 @@ const ClassInfo TerminatedExecutionError::s_info = { "TerminatedExecutionError", > JSValue TerminatedExecutionError::defaultValue(const JSObject*, ExecState* exec, PreferredPrimitiveType hint) > { > if (hint == PreferString) >- return jsNontrivialString(exec, String(ASCIILiteral("JavaScript execution terminated."))); >+ return jsNontrivialString(exec, String("JavaScript execution terminated."_s)); > return JSValue(PNaN); > } > >@@ -75,7 +75,7 @@ JSObject* createStackOverflowError(ExecState* exec) > > JSObject* createStackOverflowError(ExecState* exec, JSGlobalObject* globalObject) > { >- auto* error = createRangeError(exec, globalObject, ASCIILiteral("Maximum call stack size exceeded.")); >+ auto* error = createRangeError(exec, globalObject, "Maximum call stack size exceeded."_s); > jsCast<ErrorInstance*>(error)->setStackOverflowError(); > return error; > } >@@ -301,17 +301,17 @@ JSObject* createInvalidInstanceofParameterErrorHasInstanceValueNotFunction(ExecS > > JSObject* createNotAConstructorError(ExecState* exec, JSValue value) > { >- return createError(exec, value, ASCIILiteral("is not a constructor"), defaultSourceAppender); >+ return createError(exec, value, "is not a constructor"_s, defaultSourceAppender); > } > > JSObject* createNotAFunctionError(ExecState* exec, JSValue value) > { >- return createError(exec, value, ASCIILiteral("is not a function"), notAFunctionSourceAppender); >+ return createError(exec, value, "is not a function"_s, notAFunctionSourceAppender); > } > > JSObject* createNotAnObjectError(ExecState* exec, JSValue value) > { >- return createError(exec, value, ASCIILiteral("is not an object"), defaultSourceAppender); >+ return createError(exec, value, "is not an object"_s, defaultSourceAppender); > } > > JSObject* createErrorForInvalidGlobalAssignment(ExecState* exec, const String& propertyName) >diff --git a/Source/JavaScriptCore/runtime/GetterSetter.cpp b/Source/JavaScriptCore/runtime/GetterSetter.cpp >index 0415c84a57046cb0a143c92c4af9ef5550b6012d..499c039a7b3bd4ed4cbb6e9db93be927101bd615 100644 >--- a/Source/JavaScriptCore/runtime/GetterSetter.cpp >+++ b/Source/JavaScriptCore/runtime/GetterSetter.cpp >@@ -69,7 +69,7 @@ bool callSetter(ExecState* exec, JSValue base, JSValue getterSetter, JSValue val > GetterSetter* getterSetterObj = jsCast<GetterSetter*>(getterSetter); > > if (getterSetterObj->isSetterNull()) >- return typeError(exec, scope, ecmaMode == StrictMode, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, ecmaMode == StrictMode, ReadonlyPropertyWriteError); > > JSObject* setter = getterSetterObj->setter(); > >diff --git a/Source/JavaScriptCore/runtime/IntlCollator.cpp b/Source/JavaScriptCore/runtime/IntlCollator.cpp >index 28eb9e6be136ebf8fa5b2865be52cb2892936f8d..144f76183f2e347645d2528fcadc299709043a80 100644 >--- a/Source/JavaScriptCore/runtime/IntlCollator.cpp >+++ b/Source/JavaScriptCore/runtime/IntlCollator.cpp >@@ -131,14 +131,14 @@ static Vector<String> sortLocaleData(const String& locale, size_t keyIndex) > } > case indexOfExtensionKeyKn: > keyLocaleData.reserveInitialCapacity(2); >- keyLocaleData.uncheckedAppend(ASCIILiteral("false")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("true")); >+ keyLocaleData.uncheckedAppend("false"_s); >+ keyLocaleData.uncheckedAppend("true"_s); > break; > case indexOfExtensionKeyKf: > keyLocaleData.reserveInitialCapacity(3); >- keyLocaleData.uncheckedAppend(ASCIILiteral("false")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("lower")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("upper")); >+ keyLocaleData.uncheckedAppend("false"_s); >+ keyLocaleData.uncheckedAppend("lower"_s); >+ keyLocaleData.uncheckedAppend("upper"_s); > break; > default: > ASSERT_NOT_REACHED(); >@@ -158,14 +158,14 @@ static Vector<String> searchLocaleData(const String&, size_t keyIndex) > break; > case indexOfExtensionKeyKn: > keyLocaleData.reserveInitialCapacity(2); >- keyLocaleData.uncheckedAppend(ASCIILiteral("false")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("true")); >+ keyLocaleData.uncheckedAppend("false"_s); >+ keyLocaleData.uncheckedAppend("true"_s); > break; > case indexOfExtensionKeyKf: > keyLocaleData.reserveInitialCapacity(3); >- keyLocaleData.uncheckedAppend(ASCIILiteral("false")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("lower")); >- keyLocaleData.uncheckedAppend(ASCIILiteral("upper")); >+ keyLocaleData.uncheckedAppend("false"_s); >+ keyLocaleData.uncheckedAppend("lower"_s); >+ keyLocaleData.uncheckedAppend("upper"_s); > break; > default: > ASSERT_NOT_REACHED(); >@@ -207,7 +207,7 @@ void IntlCollator::initializeCollator(ExecState& state, JSValue locales, JSValue > > String matcher = intlStringOption(state, options, vm.propertyNames->localeMatcher, { "lookup", "best fit" }, "localeMatcher must be either \"lookup\" or \"best fit\"", "best fit"); > RETURN_IF_EXCEPTION(scope, void()); >- opt.add(ASCIILiteral("localeMatcher"), matcher); >+ opt.add("localeMatcher"_s, matcher); > > { > String numericString; >@@ -215,29 +215,29 @@ void IntlCollator::initializeCollator(ExecState& state, JSValue locales, JSValue > bool numeric = intlBooleanOption(state, options, vm.propertyNames->numeric, usesFallback); > RETURN_IF_EXCEPTION(scope, void()); > if (!usesFallback) >- numericString = ASCIILiteral(numeric ? "true" : "false"); >- opt.add(ASCIILiteral("kn"), numericString); >+ numericString = numeric ? "true"_s : "false"_s; >+ opt.add("kn"_s, numericString); > } > { > String caseFirst = intlStringOption(state, options, vm.propertyNames->caseFirst, { "upper", "lower", "false" }, "caseFirst must be either \"upper\", \"lower\", or \"false\"", nullptr); > RETURN_IF_EXCEPTION(scope, void()); >- opt.add(ASCIILiteral("kf"), caseFirst); >+ opt.add("kf"_s, caseFirst); > } > > auto& availableLocales = state.jsCallee()->globalObject(vm)->intlCollatorAvailableLocales(); > auto result = resolveLocale(state, availableLocales, requestedLocales, opt, relevantCollatorExtensionKeys, WTF_ARRAY_LENGTH(relevantCollatorExtensionKeys), localeData); > >- m_locale = result.get(ASCIILiteral("locale")); >+ m_locale = result.get("locale"_s); > if (m_locale.isEmpty()) { >- throwTypeError(&state, scope, ASCIILiteral("failed to initialize Collator due to invalid locale")); >+ throwTypeError(&state, scope, "failed to initialize Collator due to invalid locale"_s); > return; > } > >- const String& collation = result.get(ASCIILiteral("co")); >- m_collation = collation.isNull() ? ASCIILiteral("default") : collation; >- m_numeric = result.get(ASCIILiteral("kn")) == "true"; >+ const String& collation = result.get("co"_s); >+ m_collation = collation.isNull() ? "default"_s : collation; >+ m_numeric = result.get("kn"_s) == "true"; > >- const String& caseFirst = result.get(ASCIILiteral("kf")); >+ const String& caseFirst = result.get("kf"_s); > if (caseFirst == "lower") > m_caseFirst = CaseFirst::Lower; > else if (caseFirst == "upper") >@@ -336,7 +336,7 @@ JSValue IntlCollator::compareStrings(ExecState& state, StringView x, StringView > if (!m_collator) { > createCollator(state); > if (!m_collator) >- return throwException(&state, scope, createError(&state, ASCIILiteral("Failed to compare strings."))); >+ return throwException(&state, scope, createError(&state, "Failed to compare strings."_s)); > } > > UErrorCode status = U_ZERO_ERROR; >@@ -344,50 +344,50 @@ JSValue IntlCollator::compareStrings(ExecState& state, StringView x, StringView > UCharIterator iteratorY = createIterator(y); > auto result = ucol_strcollIter(m_collator.get(), &iteratorX, &iteratorY, &status); > if (U_FAILURE(status)) >- return throwException(&state, scope, createError(&state, ASCIILiteral("Failed to compare strings."))); >+ return throwException(&state, scope, createError(&state, "Failed to compare strings."_s)); > return jsNumber(result); > } > >-const char* IntlCollator::usageString(Usage usage) >+ASCIILiteral IntlCollator::usageString(Usage usage) > { > switch (usage) { > case Usage::Sort: >- return "sort"; >+ return "sort"_s; > case Usage::Search: >- return "search"; >+ return "search"_s; > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlCollator::sensitivityString(Sensitivity sensitivity) >+ASCIILiteral IntlCollator::sensitivityString(Sensitivity sensitivity) > { > switch (sensitivity) { > case Sensitivity::Base: >- return "base"; >+ return "base"_s; > case Sensitivity::Accent: >- return "accent"; >+ return "accent"_s; > case Sensitivity::Case: >- return "case"; >+ return "case"_s; > case Sensitivity::Variant: >- return "variant"; >+ return "variant"_s; > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlCollator::caseFirstString(CaseFirst caseFirst) >+ASCIILiteral IntlCollator::caseFirstString(CaseFirst caseFirst) > { > switch (caseFirst) { > case CaseFirst::False: >- return "false"; >+ return "false"_s; > case CaseFirst::Lower: >- return "lower"; >+ return "lower"_s; > case CaseFirst::Upper: >- return "upper"; >+ return "upper"_s; > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > > JSObject* IntlCollator::resolvedOptions(ExecState& state) >@@ -411,12 +411,12 @@ JSObject* IntlCollator::resolvedOptions(ExecState& state) > > JSObject* options = constructEmptyObject(&state); > options->putDirect(vm, vm.propertyNames->locale, jsString(&state, m_locale)); >- options->putDirect(vm, vm.propertyNames->usage, jsNontrivialString(&state, ASCIILiteral(usageString(m_usage)))); >- options->putDirect(vm, vm.propertyNames->sensitivity, jsNontrivialString(&state, ASCIILiteral(sensitivityString(m_sensitivity)))); >+ options->putDirect(vm, vm.propertyNames->usage, jsNontrivialString(&state, usageString(m_usage))); >+ options->putDirect(vm, vm.propertyNames->sensitivity, jsNontrivialString(&state, sensitivityString(m_sensitivity))); > options->putDirect(vm, vm.propertyNames->ignorePunctuation, jsBoolean(m_ignorePunctuation)); > options->putDirect(vm, vm.propertyNames->collation, jsString(&state, m_collation)); > options->putDirect(vm, vm.propertyNames->numeric, jsBoolean(m_numeric)); >- options->putDirect(vm, vm.propertyNames->caseFirst, jsNontrivialString(&state, ASCIILiteral(caseFirstString(m_caseFirst)))); >+ options->putDirect(vm, vm.propertyNames->caseFirst, jsNontrivialString(&state, caseFirstString(m_caseFirst))); > return options; > } > >diff --git a/Source/JavaScriptCore/runtime/IntlCollator.h b/Source/JavaScriptCore/runtime/IntlCollator.h >index 33a44bd9b571dc63aa748b4e5a114c6818abe6c7..7c603405f98305a0c673a3a11eb480ce0380c8e0 100644 >--- a/Source/JavaScriptCore/runtime/IntlCollator.h >+++ b/Source/JavaScriptCore/runtime/IntlCollator.h >@@ -68,9 +68,9 @@ class IntlCollator final : public JSDestructibleObject { > }; > > void createCollator(ExecState&); >- static const char* usageString(Usage); >- static const char* sensitivityString(Sensitivity); >- static const char* caseFirstString(CaseFirst); >+ static ASCIILiteral usageString(Usage); >+ static ASCIILiteral sensitivityString(Sensitivity); >+ static ASCIILiteral caseFirstString(CaseFirst); > > Usage m_usage; > String m_locale; >diff --git a/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp b/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp >index ccb56509dbde3e9419e5bb98bcc4eee6ba898d2c..cdbc87506f7747c0fe9bf0450ad8b9c0955bf21b 100644 >--- a/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp >@@ -79,7 +79,7 @@ IntlCollatorConstructor::IntlCollatorConstructor(VM& vm, Structure* structure) > > void IntlCollatorConstructor::finishCreation(VM& vm, IntlCollatorPrototype* collatorPrototype, Structure* collatorStructure) > { >- Base::finishCreation(vm, ASCIILiteral("Collator")); >+ Base::finishCreation(vm, "Collator"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, collatorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > collatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum)); >diff --git a/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp b/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp >index 996722db2b67640e3e320c9314a748868a1aee80..90bfefe03c24f7fda2fa3af9eea31922465cd54b 100644 >--- a/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp >@@ -117,7 +117,7 @@ EncodedJSValue JSC_HOST_CALL IntlCollatorPrototypeGetterCompare(ExecState* state > // 1. Let collator be this Collator object. > IntlCollator* collator = jsDynamicCast<IntlCollator*>(vm, state->thisValue()); > if (!collator) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.Collator.prototype.compare called on value that's not an object initialized as a Collator"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.Collator.prototype.compare called on value that's not an object initialized as a Collator"_s)); > > JSBoundFunction* boundCompare = collator->boundCompare(); > // 2. If collator.[[boundCompare]] is undefined, >@@ -125,10 +125,10 @@ EncodedJSValue JSC_HOST_CALL IntlCollatorPrototypeGetterCompare(ExecState* state > JSGlobalObject* globalObject = collator->globalObject(vm); > // a. Let F be a new built-in function object as defined in 11.3.4. > // b. The value of Fâs length property is 2. >- JSFunction* targetObject = JSFunction::create(vm, globalObject, 2, ASCIILiteral("compare"), IntlCollatorFuncCompare, NoIntrinsic); >+ JSFunction* targetObject = JSFunction::create(vm, globalObject, 2, "compare"_s, IntlCollatorFuncCompare, NoIntrinsic); > > // c. Let bc be BoundFunctionCreate(F, «this value»). >- boundCompare = JSBoundFunction::create(vm, state, globalObject, targetObject, collator, nullptr, 2, ASCIILiteral("compare")); >+ boundCompare = JSBoundFunction::create(vm, state, globalObject, targetObject, collator, nullptr, 2, "compare"_s); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > // d. Set collator.[[boundCompare]] to bc. > collator->setBoundCompare(vm, boundCompare); >@@ -145,7 +145,7 @@ EncodedJSValue JSC_HOST_CALL IntlCollatorPrototypeFuncResolvedOptions(ExecState* > // 10.3.5 Intl.Collator.prototype.resolvedOptions() (ECMA-402 2.0) > IntlCollator* collator = jsDynamicCast<IntlCollator*>(vm, state->thisValue()); > if (!collator) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.Collator.prototype.resolvedOptions called on value that's not an object initialized as a Collator"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.Collator.prototype.resolvedOptions called on value that's not an object initialized as a Collator"_s)); > > scope.release(); > return JSValue::encode(collator->resolvedOptions(*state)); >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >index 3aa779faafc857e39e41e3a37d8dea67b9c8fd66..29764556150c2a468e110a958e151b24da95d3c5 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp >@@ -139,7 +139,7 @@ static String defaultTimeZone() > return String(canonicalBuffer.data(), canonicalLength); > } > >- return ASCIILiteral("UTC"); >+ return "UTC"_s; > } > > static String canonicalizeTimeZoneName(const String& timeZoneName) >@@ -186,7 +186,7 @@ static String canonicalizeTimeZoneName(const String& timeZoneName) > > // 3. If ianaTimeZone is "Etc/UTC" or "Etc/GMT", then return "UTC". > if (canonical == "Etc/UTC" || canonical == "Etc/GMT") >- canonical = ASCIILiteral("UTC"); >+ canonical = "UTC"_s; > > // 4. Return ianaTimeZone. > return canonical; >@@ -209,11 +209,11 @@ static Vector<String> localeData(const String& locale, size_t keyIndex) > keyLocaleData.append(calendar); > // Ensure aliases used in language tag are allowed. > if (calendar == "gregorian") >- keyLocaleData.append(ASCIILiteral("gregory")); >+ keyLocaleData.append("gregory"_s); > else if (calendar == "islamic-civil") >- keyLocaleData.append(ASCIILiteral("islamicc")); >+ keyLocaleData.append("islamicc"_s); > else if (calendar == "ethiopic-amete-alem") >- keyLocaleData.append(ASCIILiteral("ethioaa")); >+ keyLocaleData.append("ethioaa"_s); > } > uenum_close(calendars); > break; >@@ -305,7 +305,7 @@ static JSObject* toDateTimeOptionsAnyDate(ExecState& exec, JSValue originalOptio > // a. For each of the property names "year", "month", "day": > // i. Let status be CreateDatePropertyOrThrow(options, prop, "numeric"). > // ii. ReturnIfAbrupt(status). >- JSString* numeric = jsNontrivialString(&exec, ASCIILiteral("numeric")); >+ JSString* numeric = jsNontrivialString(&exec, "numeric"_s); > > options->putDirect(vm, vm.propertyNames->year, numeric); > RETURN_IF_EXCEPTION(scope, nullptr); >@@ -460,22 +460,22 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > // 13. Set dateTimeFormat.[[locale]] to the value of r.[[locale]]. > m_locale = resolved.get(vm.propertyNames->locale.string()); > if (m_locale.isEmpty()) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize DateTimeFormat due to invalid locale")); >+ throwTypeError(&exec, scope, "failed to initialize DateTimeFormat due to invalid locale"_s); > return; > } > // 14. Set dateTimeFormat.[[calendar]] to the value of r.[[ca]]. >- m_calendar = resolved.get(ASCIILiteral("ca")); >+ m_calendar = resolved.get("ca"_s); > // Switch to preferred aliases. > if (m_calendar == "gregory") >- m_calendar = ASCIILiteral("gregorian"); >+ m_calendar = "gregorian"_s; > else if (m_calendar == "islamicc") >- m_calendar = ASCIILiteral("islamic-civil"); >+ m_calendar = "islamic-civil"_s; > else if (m_calendar == "ethioaa") >- m_calendar = ASCIILiteral("ethiopic-amete-alem"); >+ m_calendar = "ethiopic-amete-alem"_s; > // 15. Set dateTimeFormat.[[numberingSystem]] to the value of r.[[nu]]. >- m_numberingSystem = resolved.get(ASCIILiteral("nu")); >+ m_numberingSystem = resolved.get("nu"_s); > // 16. Let dataLocale be the value of r.[[dataLocale]]. >- String dataLocale = resolved.get(ASCIILiteral("dataLocale")); >+ String dataLocale = resolved.get("dataLocale"_s); > > // 17. Let tz be Get(options, "timeZone"). > JSValue tzValue = options->get(&exec, vm.propertyNames->timeZone); >@@ -642,7 +642,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > UErrorCode status = U_ZERO_ERROR; > UDateTimePatternGenerator* generator = udatpg_open(dataLocale.utf8().data(), &status); > if (U_FAILURE(status)) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize DateTimeFormat")); >+ throwTypeError(&exec, scope, "failed to initialize DateTimeFormat"_s); > return; > } > >@@ -658,7 +658,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > } > udatpg_close(generator); > if (U_FAILURE(status)) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize DateTimeFormat")); >+ throwTypeError(&exec, scope, "failed to initialize DateTimeFormat"_s); > return; > } > >@@ -669,7 +669,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > StringView timeZoneView(m_timeZone); > m_dateFormat = std::unique_ptr<UDateFormat, UDateFormatDeleter>(udat_open(UDAT_PATTERN, UDAT_PATTERN, m_locale.utf8().data(), timeZoneView.upconvertedCharacters(), timeZoneView.length(), pattern.upconvertedCharacters(), pattern.length(), &status)); > if (U_FAILURE(status)) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize DateTimeFormat")); >+ throwTypeError(&exec, scope, "failed to initialize DateTimeFormat"_s); > return; > } > >@@ -682,149 +682,149 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local > // 39. Return dateTimeFormat. > } > >-const char* IntlDateTimeFormat::weekdayString(Weekday weekday) >+ASCIILiteral IntlDateTimeFormat::weekdayString(Weekday weekday) > { > switch (weekday) { > case Weekday::Narrow: >- return "narrow"; >+ return "narrow"_s; > case Weekday::Short: >- return "short"; >+ return "short"_s; > case Weekday::Long: >- return "long"; >+ return "long"_s; > case Weekday::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::eraString(Era era) >+ASCIILiteral IntlDateTimeFormat::eraString(Era era) > { > switch (era) { > case Era::Narrow: >- return "narrow"; >+ return "narrow"_s; > case Era::Short: >- return "short"; >+ return "short"_s; > case Era::Long: >- return "long"; >+ return "long"_s; > case Era::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::yearString(Year year) >+ASCIILiteral IntlDateTimeFormat::yearString(Year year) > { > switch (year) { > case Year::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Year::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Year::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::monthString(Month month) >+ASCIILiteral IntlDateTimeFormat::monthString(Month month) > { > switch (month) { > case Month::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Month::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Month::Narrow: >- return "narrow"; >+ return "narrow"_s; > case Month::Short: >- return "short"; >+ return "short"_s; > case Month::Long: >- return "long"; >+ return "long"_s; > case Month::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::dayString(Day day) >+ASCIILiteral IntlDateTimeFormat::dayString(Day day) > { > switch (day) { > case Day::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Day::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Day::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::hourString(Hour hour) >+ASCIILiteral IntlDateTimeFormat::hourString(Hour hour) > { > switch (hour) { > case Hour::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Hour::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Hour::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::minuteString(Minute minute) >+ASCIILiteral IntlDateTimeFormat::minuteString(Minute minute) > { > switch (minute) { > case Minute::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Minute::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Minute::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::secondString(Second second) >+ASCIILiteral IntlDateTimeFormat::secondString(Second second) > { > switch (second) { > case Second::TwoDigit: >- return "2-digit"; >+ return "2-digit"_s; > case Second::Numeric: >- return "numeric"; >+ return "numeric"_s; > case Second::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlDateTimeFormat::timeZoneNameString(TimeZoneName timeZoneName) >+ASCIILiteral IntlDateTimeFormat::timeZoneNameString(TimeZoneName timeZoneName) > { > switch (timeZoneName) { > case TimeZoneName::Short: >- return "short"; >+ return "short"_s; > case TimeZoneName::Long: >- return "long"; >+ return "long"_s; > case TimeZoneName::None: > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > > JSObject* IntlDateTimeFormat::resolvedOptions(ExecState& exec) >@@ -847,33 +847,33 @@ JSObject* IntlDateTimeFormat::resolvedOptions(ExecState& exec) > options->putDirect(vm, vm.propertyNames->timeZone, jsNontrivialString(&exec, m_timeZone)); > > if (m_weekday != Weekday::None) >- options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(&exec, ASCIILiteral(weekdayString(m_weekday)))); >+ options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(&exec, weekdayString(m_weekday))); > > if (m_era != Era::None) >- options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(&exec, ASCIILiteral(eraString(m_era)))); >+ options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(&exec, eraString(m_era))); > > if (m_year != Year::None) >- options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(&exec, ASCIILiteral(yearString(m_year)))); >+ options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(&exec, yearString(m_year))); > > if (m_month != Month::None) >- options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(&exec, ASCIILiteral(monthString(m_month)))); >+ options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(&exec, monthString(m_month))); > > if (m_day != Day::None) >- options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(&exec, ASCIILiteral(dayString(m_day)))); >+ options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(&exec, dayString(m_day))); > > if (m_hour != Hour::None) { >- options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(&exec, ASCIILiteral(hourString(m_hour)))); >+ options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(&exec, hourString(m_hour))); > options->putDirect(vm, vm.propertyNames->hour12, jsBoolean(m_hour12)); > } > > if (m_minute != Minute::None) >- options->putDirect(vm, vm.propertyNames->minute, jsNontrivialString(&exec, ASCIILiteral(minuteString(m_minute)))); >+ options->putDirect(vm, vm.propertyNames->minute, jsNontrivialString(&exec, minuteString(m_minute))); > > if (m_second != Second::None) >- options->putDirect(vm, vm.propertyNames->second, jsNontrivialString(&exec, ASCIILiteral(secondString(m_second)))); >+ options->putDirect(vm, vm.propertyNames->second, jsNontrivialString(&exec, secondString(m_second))); > > if (m_timeZoneName != TimeZoneName::None) >- options->putDirect(vm, vm.propertyNames->timeZoneName, jsNontrivialString(&exec, ASCIILiteral(timeZoneNameString(m_timeZoneName)))); >+ options->putDirect(vm, vm.propertyNames->timeZoneName, jsNontrivialString(&exec, timeZoneNameString(m_timeZoneName))); > > return options; > } >@@ -891,7 +891,7 @@ JSValue IntlDateTimeFormat::format(ExecState& exec, double value) > > // 1. If x is not a finite Number, then throw a RangeError exception. > if (!std::isfinite(value)) >- return throwRangeError(&exec, scope, ASCIILiteral("date value is not finite in DateTimeFormat format()")); >+ return throwRangeError(&exec, scope, "date value is not finite in DateTimeFormat format()"_s); > > // Delegate remaining steps to ICU. > UErrorCode status = U_ZERO_ERROR; >@@ -903,46 +903,46 @@ JSValue IntlDateTimeFormat::format(ExecState& exec, double value) > udat_format(m_dateFormat.get(), value, result.data(), resultLength, nullptr, &status); > } > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to format date value")); >+ return throwTypeError(&exec, scope, "failed to format date value"_s); > > return jsString(&exec, String(result.data(), resultLength)); > } > > #if JSC_ICU_HAS_UFIELDPOSITER >-const char* IntlDateTimeFormat::partTypeString(UDateFormatField field) >+ASCIILiteral IntlDateTimeFormat::partTypeString(UDateFormatField field) > { > switch (field) { > case UDAT_ERA_FIELD: >- return "era"; >+ return "era"_s; > case UDAT_YEAR_FIELD: > case UDAT_YEAR_NAME_FIELD: > case UDAT_EXTENDED_YEAR_FIELD: >- return "year"; >+ return "year"_s; > case UDAT_MONTH_FIELD: > case UDAT_STANDALONE_MONTH_FIELD: >- return "month"; >+ return "month"_s; > case UDAT_DATE_FIELD: >- return "day"; >+ return "day"_s; > case UDAT_HOUR_OF_DAY1_FIELD: > case UDAT_HOUR_OF_DAY0_FIELD: > case UDAT_HOUR1_FIELD: > case UDAT_HOUR0_FIELD: >- return "hour"; >+ return "hour"_s; > case UDAT_MINUTE_FIELD: >- return "minute"; >+ return "minute"_s; > case UDAT_SECOND_FIELD: > case UDAT_FRACTIONAL_SECOND_FIELD: >- return "second"; >+ return "second"_s; > case UDAT_DAY_OF_WEEK_FIELD: > case UDAT_DOW_LOCAL_FIELD: > case UDAT_STANDALONE_DAY_FIELD: >- return "weekday"; >+ return "weekday"_s; > case UDAT_AM_PM_FIELD: > #if U_ICU_VERSION_MAJOR_NUM >= 57 > case UDAT_AM_PM_MIDNIGHT_NOON_FIELD: > case UDAT_FLEXIBLE_DAY_PERIOD_FIELD: > #endif >- return "dayPeriod"; >+ return "dayPeriod"_s; > case UDAT_TIMEZONE_FIELD: > case UDAT_TIMEZONE_RFC_FIELD: > case UDAT_TIMEZONE_GENERIC_FIELD: >@@ -950,7 +950,7 @@ const char* IntlDateTimeFormat::partTypeString(UDateFormatField field) > case UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD: > case UDAT_TIMEZONE_ISO_FIELD: > case UDAT_TIMEZONE_ISO_LOCAL_FIELD: >- return "timeZoneName"; >+ return "timeZoneName"_s; > // These should not show up because there is no way to specify them in DateTimeFormat options. > // If they do, they don't fit well into any of known part types, so consider it a "literal". > case UDAT_DAY_OF_YEAR_FIELD: >@@ -967,10 +967,10 @@ const char* IntlDateTimeFormat::partTypeString(UDateFormatField field) > #if U_ICU_VERSION_MAJOR_NUM < 58 || !defined(U_HIDE_DEPRECATED_API) > case UDAT_FIELD_COUNT: > #endif >- return "literal"; >+ return "literal"_s; > } > // Any newer additions to the UDateFormatField enum should just be considered a "literal" part. >- return "literal"; >+ return "literal"_s; > } > > >@@ -983,12 +983,12 @@ JSValue IntlDateTimeFormat::formatToParts(ExecState& exec, double value) > // https://tc39.github.io/ecma402/#sec-formatdatetimetoparts > > if (!std::isfinite(value)) >- return throwRangeError(&exec, scope, ASCIILiteral("date value is not finite in DateTimeFormat formatToParts()")); >+ return throwRangeError(&exec, scope, "date value is not finite in DateTimeFormat formatToParts()"_s); > > UErrorCode status = U_ZERO_ERROR; > auto fields = std::unique_ptr<UFieldPositionIterator, UFieldPositionIteratorDeleter>(ufieldpositer_open(&status)); > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to open field position iterator")); >+ return throwTypeError(&exec, scope, "failed to open field position iterator"_s); > > status = U_ZERO_ERROR; > Vector<UChar, 32> result(32); >@@ -999,7 +999,7 @@ JSValue IntlDateTimeFormat::formatToParts(ExecState& exec, double value) > udat_formatForFields(m_dateFormat.get(), value, result.data(), resultLength, fields.get(), &status); > } > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to format date value")); >+ return throwTypeError(&exec, scope, "failed to format date value"_s); > > JSGlobalObject* globalObject = exec.jsCallee()->globalObject(vm); > JSArray* parts = JSArray::tryCreate(vm, globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous), 0); >@@ -1008,7 +1008,7 @@ JSValue IntlDateTimeFormat::formatToParts(ExecState& exec, double value) > > auto resultString = String(result.data(), resultLength); > auto typePropertyName = Identifier::fromString(&vm, "type"); >- auto literalString = jsString(&exec, ASCIILiteral("literal")); >+ auto literalString = jsString(&exec, "literal"_s); > > int32_t previousEndIndex = 0; > int32_t beginIndex = 0; >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h >index d81e87513f172264421e6fdf1085c441202a3090..e2dcd0f6df7472d69b1dbc729035f29e8cbdf500 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h >@@ -79,15 +79,15 @@ class IntlDateTimeFormat final : public JSDestructibleObject { > }; > > void setFormatsFromPattern(const StringView&); >- static const char* weekdayString(Weekday); >- static const char* eraString(Era); >- static const char* yearString(Year); >- static const char* monthString(Month); >- static const char* dayString(Day); >- static const char* hourString(Hour); >- static const char* minuteString(Minute); >- static const char* secondString(Second); >- static const char* timeZoneNameString(TimeZoneName); >+ static ASCIILiteral weekdayString(Weekday); >+ static ASCIILiteral eraString(Era); >+ static ASCIILiteral yearString(Year); >+ static ASCIILiteral monthString(Month); >+ static ASCIILiteral dayString(Day); >+ static ASCIILiteral hourString(Hour); >+ static ASCIILiteral minuteString(Minute); >+ static ASCIILiteral secondString(Second); >+ static ASCIILiteral timeZoneNameString(TimeZoneName); > > bool m_initializedDateTimeFormat { false }; > WriteBarrier<JSBoundFunction> m_boundFormat; >@@ -113,7 +113,7 @@ class IntlDateTimeFormat final : public JSDestructibleObject { > void operator()(UFieldPositionIterator*) const; > }; > >- static const char* partTypeString(UDateFormatField); >+ static ASCIILiteral partTypeString(UDateFormatField); > #endif > }; > >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp >index 32cec7e620b40df8c9b9d5953515f8bbc9bc9894..55a74f7a6e489533eee59d85cad1e8a91f2bc1b4 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp >@@ -79,7 +79,7 @@ IntlDateTimeFormatConstructor::IntlDateTimeFormatConstructor(VM& vm, Structure* > > void IntlDateTimeFormatConstructor::finishCreation(VM& vm, IntlDateTimeFormatPrototype* dateTimeFormatPrototype, Structure* dateTimeFormatStructure) > { >- Base::finishCreation(vm, ASCIILiteral("DateTimeFormat")); >+ Base::finishCreation(vm, "DateTimeFormat"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, dateTimeFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > dateTimeFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum)); >diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp >index 4f189669ababd6a07eae755a98aedca880a55a42..3647dac0b96a91d8c236ca80ac3d4962470efa7a 100644 >--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp >@@ -134,7 +134,7 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeGetterFormat(ExecState* > > // 2. ReturnIfAbrupt(dtf). > if (!dtf) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.DateTimeFormat.prototype.format called on value that's not an object initialized as a DateTimeFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.DateTimeFormat.prototype.format called on value that's not an object initialized as a DateTimeFormat"_s)); > > JSBoundFunction* boundFormat = dtf->boundFormat(); > // 3. If the [[boundFormat]] internal slot of this DateTimeFormat object is undefined, >@@ -142,9 +142,9 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeGetterFormat(ExecState* > JSGlobalObject* globalObject = dtf->globalObject(vm); > // a. Let F be a new built-in function object as defined in 12.3.4. > // b. The value of Fâs length property is 1. (Note: Fâs length property was 0 in ECMA-402 1.0) >- JSFunction* targetObject = JSFunction::create(vm, globalObject, 1, ASCIILiteral("format"), IntlDateTimeFormatFuncFormatDateTime, NoIntrinsic); >+ JSFunction* targetObject = JSFunction::create(vm, globalObject, 1, "format"_s, IntlDateTimeFormatFuncFormatDateTime, NoIntrinsic); > // c. Let bf be BoundFunctionCreate(F, «this value»). >- boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, dtf, nullptr, 1, ASCIILiteral("format")); >+ boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, dtf, nullptr, 1, "format"_s); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > // d. Set dtf.[[boundFormat]] to bf. > dtf->setBoundFormat(vm, boundFormat); >@@ -164,7 +164,7 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeFuncFormatToParts(ExecSt > > IntlDateTimeFormat* dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(vm, state->thisValue()); > if (!dateTimeFormat) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.DateTimeFormat.prototype.formatToParts called on value that's not an object initialized as a DateTimeFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.DateTimeFormat.prototype.formatToParts called on value that's not an object initialized as a DateTimeFormat"_s)); > > JSValue date = state->argument(0); > double value; >@@ -198,7 +198,7 @@ EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeFuncResolvedOptions(Exec > } > > if (!dateTimeFormat) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat"_s)); > > scope.release(); > return JSValue::encode(dateTimeFormat->resolvedOptions(*state)); >diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp >index b76328b55fa9eeb0d1d1e0a3e50967bb6f50471e..1e40cc85f134cf768305eccfbb21aca063cc336f 100644 >--- a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp >+++ b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp >@@ -182,18 +182,18 @@ void IntlNumberFormat::initializeNumberFormat(ExecState& state, JSValue locales, > > String matcher = intlStringOption(state, options, vm.propertyNames->localeMatcher, { "lookup", "best fit" }, "localeMatcher must be either \"lookup\" or \"best fit\"", "best fit"); > RETURN_IF_EXCEPTION(scope, void()); >- opt.add(ASCIILiteral("localeMatcher"), matcher); >+ opt.add("localeMatcher"_s, matcher); > > auto& availableLocales = state.jsCallee()->globalObject(vm)->intlNumberFormatAvailableLocales(); > auto result = resolveLocale(state, availableLocales, requestedLocales, opt, relevantNumberExtensionKeys, WTF_ARRAY_LENGTH(relevantNumberExtensionKeys), IntlNFInternal::localeData); > >- m_locale = result.get(ASCIILiteral("locale")); >+ m_locale = result.get("locale"_s); > if (m_locale.isEmpty()) { >- throwTypeError(&state, scope, ASCIILiteral("failed to initialize NumberFormat due to invalid locale")); >+ throwTypeError(&state, scope, "failed to initialize NumberFormat due to invalid locale"_s); > return; > } > >- m_numberingSystem = result.get(ASCIILiteral("nu")); >+ m_numberingSystem = result.get("nu"_s); > > String styleString = intlStringOption(state, options, Identifier::fromString(&vm, "style"), { "decimal", "percent", "currency" }, "style must be either \"decimal\", \"percent\", or \"currency\"", "decimal"); > RETURN_IF_EXCEPTION(scope, void()); >@@ -210,7 +210,7 @@ void IntlNumberFormat::initializeNumberFormat(ExecState& state, JSValue locales, > RETURN_IF_EXCEPTION(scope, void()); > if (!currency.isNull()) { > if (currency.length() != 3 || !currency.isAllSpecialCharacters<isASCIIAlpha>()) { >- throwException(&state, scope, createRangeError(&state, ASCIILiteral("currency is not a well-formed currency code"))); >+ throwException(&state, scope, createRangeError(&state, "currency is not a well-formed currency code"_s)); > return; > } > } >@@ -218,7 +218,7 @@ void IntlNumberFormat::initializeNumberFormat(ExecState& state, JSValue locales, > unsigned currencyDigits = 0; > if (m_style == Style::Currency) { > if (currency.isNull()) { >- throwTypeError(&state, scope, ASCIILiteral("currency must be a string")); >+ throwTypeError(&state, scope, "currency must be a string"_s); > return; > } > >@@ -359,7 +359,7 @@ JSValue IntlNumberFormat::formatNumber(ExecState& state, double number) > if (!m_numberFormat) { > createNumberFormat(state); > if (!m_numberFormat) >- return throwException(&state, scope, createError(&state, ASCIILiteral("Failed to format a number."))); >+ return throwException(&state, scope, createError(&state, "Failed to format a number."_s)); > } > > // Map negative zero to positive zero. >@@ -375,37 +375,37 @@ JSValue IntlNumberFormat::formatNumber(ExecState& state, double number) > unum_formatDouble(m_numberFormat.get(), number, buffer.data(), length, nullptr, &status); > } > if (U_FAILURE(status)) >- return throwException(&state, scope, createError(&state, ASCIILiteral("Failed to format a number."))); >+ return throwException(&state, scope, createError(&state, "Failed to format a number."_s)); > > return jsString(&state, String(buffer.data(), length)); > } > >-const char* IntlNumberFormat::styleString(Style style) >+ASCIILiteral IntlNumberFormat::styleString(Style style) > { > switch (style) { > case Style::Decimal: >- return "decimal"; >+ return "decimal"_s; > case Style::Percent: >- return "percent"; >+ return "percent"_s; > case Style::Currency: >- return "currency"; >+ return "currency"_s; > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > >-const char* IntlNumberFormat::currencyDisplayString(CurrencyDisplay currencyDisplay) >+ASCIILiteral IntlNumberFormat::currencyDisplayString(CurrencyDisplay currencyDisplay) > { > switch (currencyDisplay) { > case CurrencyDisplay::Code: >- return "code"; >+ return "code"_s; > case CurrencyDisplay::Symbol: >- return "symbol"; >+ return "symbol"_s; > case CurrencyDisplay::Name: >- return "name"; >+ return "name"_s; > } > ASSERT_NOT_REACHED(); >- return nullptr; >+ return ASCIILiteral::null(); > } > > JSObject* IntlNumberFormat::resolvedOptions(ExecState& state) >@@ -430,10 +430,10 @@ JSObject* IntlNumberFormat::resolvedOptions(ExecState& state) > JSObject* options = constructEmptyObject(&state); > options->putDirect(vm, vm.propertyNames->locale, jsString(&state, m_locale)); > options->putDirect(vm, Identifier::fromString(&vm, "numberingSystem"), jsString(&state, m_numberingSystem)); >- options->putDirect(vm, Identifier::fromString(&vm, "style"), jsNontrivialString(&state, ASCIILiteral(styleString(m_style)))); >+ options->putDirect(vm, Identifier::fromString(&vm, "style"), jsNontrivialString(&state, styleString(m_style))); > if (m_style == Style::Currency) { > options->putDirect(vm, Identifier::fromString(&vm, "currency"), jsNontrivialString(&state, m_currency)); >- options->putDirect(vm, Identifier::fromString(&vm, "currencyDisplay"), jsNontrivialString(&state, ASCIILiteral(currencyDisplayString(m_currencyDisplay)))); >+ options->putDirect(vm, Identifier::fromString(&vm, "currencyDisplay"), jsNontrivialString(&state, currencyDisplayString(m_currencyDisplay))); > } > options->putDirect(vm, Identifier::fromString(&vm, "minimumIntegerDigits"), jsNumber(m_minimumIntegerDigits)); > options->putDirect(vm, Identifier::fromString(&vm, "minimumFractionDigits"), jsNumber(m_minimumFractionDigits)); >@@ -459,27 +459,27 @@ void IntlNumberFormat::UFieldPositionIteratorDeleter::operator()(UFieldPositionI > ufieldpositer_close(iterator); > } > >-const char* IntlNumberFormat::partTypeString(UNumberFormatFields field, double value) >+ASCIILiteral IntlNumberFormat::partTypeString(UNumberFormatFields field, double value) > { > switch (field) { > case UNUM_INTEGER_FIELD: > if (std::isnan(value)) >- return "nan"; >+ return "nan"_s; > if (!std::isfinite(value)) >- return "infinity"; >- return "integer"; >+ return "infinity"_s; >+ return "integer"_s; > case UNUM_FRACTION_FIELD: >- return "fraction"; >+ return "fraction"_s; > case UNUM_DECIMAL_SEPARATOR_FIELD: >- return "decimal"; >+ return "decimal"_s; > case UNUM_GROUPING_SEPARATOR_FIELD: >- return "group"; >+ return "group"_s; > case UNUM_CURRENCY_FIELD: >- return "currency"; >+ return "currency"_s; > case UNUM_PERCENT_FIELD: >- return "percentSign"; >+ return "percentSign"_s; > case UNUM_SIGN_FIELD: >- return value < 0 ? "minusSign" : "plusSign"; >+ return value < 0 ? "minusSign"_s : "plusSign"_s; > // These should not show up because there is no way to specify them in NumberFormat options. > // If they do, they don't fit well into any of known part types, so consider it a "literal". > case UNUM_PERMILL_FIELD: >@@ -489,10 +489,10 @@ const char* IntlNumberFormat::partTypeString(UNumberFormatFields field, double v > #if !defined(U_HIDE_DEPRECATED_API) > case UNUM_FIELD_COUNT: > #endif >- return "literal"; >+ return "literal"_s; > } > // Any newer additions to the UNumberFormatFields enum should just be considered a "literal" part. >- return "literal"; >+ return "literal"_s; > } > > JSValue IntlNumberFormat::formatToParts(ExecState& exec, double value) >@@ -507,12 +507,12 @@ JSValue IntlNumberFormat::formatToParts(ExecState& exec, double value) > if (!m_numberFormat) > createNumberFormat(exec); > if (!m_initializedNumberFormat || !m_numberFormat) >- return throwTypeError(&exec, scope, ASCIILiteral("Intl.NumberFormat.prototype.formatToParts called on value that's not an object initialized as a NumberFormat")); >+ return throwTypeError(&exec, scope, "Intl.NumberFormat.prototype.formatToParts called on value that's not an object initialized as a NumberFormat"_s); > > UErrorCode status = U_ZERO_ERROR; > auto fieldItr = std::unique_ptr<UFieldPositionIterator, UFieldPositionIteratorDeleter>(ufieldpositer_open(&status)); > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to open field position iterator")); >+ return throwTypeError(&exec, scope, "failed to open field position iterator"_s); > > status = U_ZERO_ERROR; > Vector<UChar, 32> result(32); >@@ -523,7 +523,7 @@ JSValue IntlNumberFormat::formatToParts(ExecState& exec, double value) > unum_formatDoubleForFields(m_numberFormat.get(), value, result.data(), resultLength, fieldItr.get(), &status); > } > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to format a number.")); >+ return throwTypeError(&exec, scope, "failed to format a number."_s); > > Vector<IntlNumberFormatField> fields; > int32_t beginIndex = 0; >@@ -546,7 +546,7 @@ JSValue IntlNumberFormat::formatToParts(ExecState& exec, double value) > > auto resultString = String(result.data(), resultLength); > auto typePropertyName = Identifier::fromString(&vm, "type"); >- auto literalString = jsString(&exec, ASCIILiteral("literal")); >+ auto literalString = jsString(&exec, "literal"_s); > > // FIXME: <http://webkit.org/b/185557> This is O(N^2) and could be done in O(N log N). > int32_t currentIndex = 0; >diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormat.h b/Source/JavaScriptCore/runtime/IntlNumberFormat.h >index c36bd727433b2067111698f619cc47297ede8e82..062fb045a1309c7b74e6bc518873dec57c32a9f8 100644 >--- a/Source/JavaScriptCore/runtime/IntlNumberFormat.h >+++ b/Source/JavaScriptCore/runtime/IntlNumberFormat.h >@@ -72,8 +72,8 @@ class IntlNumberFormat final : public JSDestructibleObject { > }; > > void createNumberFormat(ExecState&); >- static const char* styleString(Style); >- static const char* currencyDisplayString(CurrencyDisplay); >+ static ASCIILiteral styleString(Style); >+ static ASCIILiteral currencyDisplayString(CurrencyDisplay); > > String m_locale; > String m_numberingSystem; >@@ -105,7 +105,7 @@ class IntlNumberFormat final : public JSDestructibleObject { > }; > }; > >- static const char* partTypeString(UNumberFormatFields, double); >+ static ASCIILiteral partTypeString(UNumberFormatFields, double); > #endif > }; > >diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp >index bf7624932962f01cf9955f1778bcca7aab78ee9a..49f64b8fa90f9776aeeb7a32044fbbefa6e8a81f 100644 >--- a/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp >@@ -79,7 +79,7 @@ IntlNumberFormatConstructor::IntlNumberFormatConstructor(VM& vm, Structure* stru > > void IntlNumberFormatConstructor::finishCreation(VM& vm, IntlNumberFormatPrototype* numberFormatPrototype, Structure* numberFormatStructure) > { >- Base::finishCreation(vm, ASCIILiteral("NumberFormat")); >+ Base::finishCreation(vm, "NumberFormat"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > numberFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum)); >diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >index f9568af1ee7cb862063a139dd7596c67a7ee890c..1d52aa4d8591f73a00c9095bcc2845bc95ce6987 100644 >--- a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >@@ -128,7 +128,7 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeGetterFormat(ExecState* st > } > > if (!nf) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.NumberFormat.prototype.format called on value that's not an object initialized as a NumberFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.NumberFormat.prototype.format called on value that's not an object initialized as a NumberFormat"_s)); > > JSBoundFunction* boundFormat = nf->boundFormat(); > // 2. If nf.[[boundFormat]] is undefined, >@@ -136,9 +136,9 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeGetterFormat(ExecState* st > JSGlobalObject* globalObject = nf->globalObject(vm); > // a. Let F be a new built-in function object as defined in 11.3.4. > // b. The value of Fâs length property is 1. >- JSFunction* targetObject = JSFunction::create(vm, globalObject, 1, ASCIILiteral("format"), IntlNumberFormatFuncFormatNumber, NoIntrinsic); >+ JSFunction* targetObject = JSFunction::create(vm, globalObject, 1, "format"_s, IntlNumberFormatFuncFormatNumber, NoIntrinsic); > // c. Let bf be BoundFunctionCreate(F, «this value»). >- boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, nf, nullptr, 1, ASCIILiteral("format")); >+ boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, nf, nullptr, 1, "format"_s); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > // d. Set nf.[[boundFormat]] to bf. > nf->setBoundFormat(vm, boundFormat); >@@ -158,7 +158,7 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeFuncFormatToParts(ExecStat > > IntlNumberFormat* numberFormat = jsDynamicCast<IntlNumberFormat*>(vm, state->thisValue()); > if (!numberFormat) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.NumberFormat.prototype.formatToParts called on value that's not an object initialized as a NumberFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.NumberFormat.prototype.formatToParts called on value that's not an object initialized as a NumberFormat"_s)); > > double value = state->argument(0).toNumber(state); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -185,7 +185,7 @@ EncodedJSValue JSC_HOST_CALL IntlNumberFormatPrototypeFuncResolvedOptions(ExecSt > } > > if (!numberFormat) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.NumberFormat.prototype.resolvedOptions called on value that's not an object initialized as a NumberFormat"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.NumberFormat.prototype.resolvedOptions called on value that's not an object initialized as a NumberFormat"_s)); > > scope.release(); > return JSValue::encode(numberFormat->resolvedOptions(*state)); >diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp >index fb78e461b3151cde8ac387e5c902bac11f4ee92f..f2e92e79f775f67e0e36a12d66e0597cf1d40f82 100644 >--- a/Source/JavaScriptCore/runtime/IntlObject.cpp >+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp >@@ -428,33 +428,33 @@ static String grandfatheredLangTag(const String& locale) > // FIXME: convert to a compile time hash table if this is causing performance issues. > HashMap<String, String> tagMap = { > // Irregular. >- { ASCIILiteral("en-gb-oed"), ASCIILiteral("en-GB-oed") }, >- { ASCIILiteral("i-ami"), ASCIILiteral("ami") }, >- { ASCIILiteral("i-bnn"), ASCIILiteral("bnn") }, >- { ASCIILiteral("i-default"), ASCIILiteral("i-default") }, >- { ASCIILiteral("i-enochian"), ASCIILiteral("i-enochian") }, >- { ASCIILiteral("i-hak"), ASCIILiteral("hak") }, >- { ASCIILiteral("i-klingon"), ASCIILiteral("tlh") }, >- { ASCIILiteral("i-lux"), ASCIILiteral("lb") }, >- { ASCIILiteral("i-mingo"), ASCIILiteral("i-mingo") }, >- { ASCIILiteral("i-navajo"), ASCIILiteral("nv") }, >- { ASCIILiteral("i-pwn"), ASCIILiteral("pwn") }, >- { ASCIILiteral("i-tao"), ASCIILiteral("tao") }, >- { ASCIILiteral("i-tay"), ASCIILiteral("tay") }, >- { ASCIILiteral("i-tsu"), ASCIILiteral("tsu") }, >- { ASCIILiteral("sgn-be-fr"), ASCIILiteral("sfb") }, >- { ASCIILiteral("sgn-be-nl"), ASCIILiteral("vgt") }, >- { ASCIILiteral("sgn-ch-de"), ASCIILiteral("sgg") }, >+ { "en-gb-oed"_s, "en-GB-oed"_s }, >+ { "i-ami"_s, "ami"_s }, >+ { "i-bnn"_s, "bnn"_s }, >+ { "i-default"_s, "i-default"_s }, >+ { "i-enochian"_s, "i-enochian"_s }, >+ { "i-hak"_s, "hak"_s }, >+ { "i-klingon"_s, "tlh"_s }, >+ { "i-lux"_s, "lb"_s }, >+ { "i-mingo"_s, "i-mingo"_s }, >+ { "i-navajo"_s, "nv"_s }, >+ { "i-pwn"_s, "pwn"_s }, >+ { "i-tao"_s, "tao"_s }, >+ { "i-tay"_s, "tay"_s }, >+ { "i-tsu"_s, "tsu"_s }, >+ { "sgn-be-fr"_s, "sfb"_s }, >+ { "sgn-be-nl"_s, "vgt"_s }, >+ { "sgn-ch-de"_s, "sgg"_s }, > // Regular. >- { ASCIILiteral("art-lojban"), ASCIILiteral("jbo") }, >- { ASCIILiteral("cel-gaulish"), ASCIILiteral("cel-gaulish") }, >- { ASCIILiteral("no-bok"), ASCIILiteral("nb") }, >- { ASCIILiteral("no-nyn"), ASCIILiteral("nn") }, >- { ASCIILiteral("zh-guoyu"), ASCIILiteral("cmn") }, >- { ASCIILiteral("zh-hakka"), ASCIILiteral("hak") }, >- { ASCIILiteral("zh-min"), ASCIILiteral("zh-min") }, >- { ASCIILiteral("zh-min-nan"), ASCIILiteral("nan") }, >- { ASCIILiteral("zh-xiang"), ASCIILiteral("hsn") } >+ { "art-lojban"_s, "jbo"_s }, >+ { "cel-gaulish"_s, "cel-gaulish"_s }, >+ { "no-bok"_s, "nb"_s }, >+ { "no-nyn"_s, "nn"_s }, >+ { "zh-guoyu"_s, "cmn"_s }, >+ { "zh-hakka"_s, "hak"_s }, >+ { "zh-min"_s, "zh-min"_s }, >+ { "zh-min-nan"_s, "nan"_s }, >+ { "zh-xiang"_s, "hsn"_s } > }; > > return tagMap.get(locale.convertToASCIILowercase()); >@@ -536,7 +536,7 @@ Vector<String> canonicalizeLocaleList(ExecState& state, JSValue locales) > RETURN_IF_EXCEPTION(scope, Vector<String>()); > > if (!kValue.isString() && !kValue.isObject()) { >- throwTypeError(&state, scope, ASCIILiteral("locale value must be a string or object")); >+ throwTypeError(&state, scope, "locale value must be a string or object"_s); > return Vector<String>(); > } > >@@ -722,7 +722,7 @@ HashMap<String, String> resolveLocale(ExecState& state, const HashSet<String>& a > // ResolveLocale (availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) > // https://tc39.github.io/ecma402/#sec-resolvelocale > >- const String& matcher = options.get(ASCIILiteral("localeMatcher")); >+ const String& matcher = options.get("localeMatcher"_s); > MatcherResult matcherResult = (matcher == "lookup") > ? lookupMatcher(state, availableLocales, requestedLocales) > : bestFitMatcher(state, availableLocales, requestedLocales); >@@ -734,9 +734,9 @@ HashMap<String, String> resolveLocale(ExecState& state, const HashSet<String>& a > unicodeExtensionSubTags(matcherResult.extension, extensionSubtags); > > HashMap<String, String> result; >- result.add(ASCIILiteral("dataLocale"), foundLocale); >+ result.add("dataLocale"_s, foundLocale); > >- String supportedExtension = ASCIILiteral("-u"); >+ String supportedExtension = "-u"_s; > for (size_t keyIndex = 0; keyIndex < relevantExtensionKeyCount; ++keyIndex) { > const char* key = relevantExtensionKeys[keyIndex]; > Vector<String> keyLocaleData = localeData(foundLocale, keyIndex); >@@ -754,8 +754,8 @@ HashMap<String, String> resolveLocale(ExecState& state, const HashSet<String>& a > value = requestedValue; > supportedExtensionAddition = makeString('-', key, '-', value); > } >- } else if (keyLocaleData.contains(static_cast<String>(ASCIILiteral("true")))) { >- value = ASCIILiteral("true"); >+ } else if (keyLocaleData.contains(static_cast<String>("true"_s))) { >+ value = "true"_s; > } > } > } >@@ -780,7 +780,7 @@ HashMap<String, String> resolveLocale(ExecState& state, const HashSet<String>& a > foundLocale = preExtension + supportedExtension + postExtension; > } > >- result.add(ASCIILiteral("locale"), foundLocale); >+ result.add("locale"_s, foundLocale); > return result; > } > >@@ -836,7 +836,7 @@ JSValue supportedLocales(ExecState& state, const HashSet<String>& availableLocal > matcher = intlStringOption(state, options, vm.propertyNames->localeMatcher, { "lookup", "best fit" }, "localeMatcher must be either \"lookup\" or \"best fit\"", "best fit"); > RETURN_IF_EXCEPTION(scope, JSValue()); > } else >- matcher = ASCIILiteral("best fit"); >+ matcher = "best fit"_s; > > JSArray* supportedLocales = (matcher == "best fit") > ? bestFitSupportedLocales(state, availableLocales, requestedLocales) >diff --git a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp >index adf155042a863f5770b19e6906a9987b6ad3f058..8122f584407e33b1ab0a268c89aa5a7dad085851 100644 >--- a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp >+++ b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp >@@ -129,7 +129,7 @@ void IntlPluralRules::initializePluralRules(ExecState& exec, JSValue locales, JS > HashMap<String, String> resolved = resolveLocale(exec, availableLocales, requestedLocales, localeOpt, nullptr, 0, IntlPRInternal::localeData); > m_locale = resolved.get(vm.propertyNames->locale.string()); > if (m_locale.isEmpty()) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize PluralRules due to invalid locale")); >+ throwTypeError(&exec, scope, "failed to initialize PluralRules due to invalid locale"_s); > return; > } > >@@ -169,7 +169,7 @@ void IntlPluralRules::initializePluralRules(ExecState& exec, JSValue locales, JS > UErrorCode status = U_ZERO_ERROR; > m_numberFormat = std::unique_ptr<UNumberFormat, UNumberFormatDeleter>(unum_open(UNUM_DECIMAL, nullptr, 0, m_locale.utf8().data(), nullptr, &status)); > if (U_FAILURE(status)) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize PluralRules")); >+ throwTypeError(&exec, scope, "failed to initialize PluralRules"_s); > return; > } > >@@ -186,7 +186,7 @@ void IntlPluralRules::initializePluralRules(ExecState& exec, JSValue locales, JS > status = U_ZERO_ERROR; > m_pluralRules = std::unique_ptr<UPluralRules, UPluralRulesDeleter>(uplrules_openForType(m_locale.utf8().data(), m_type, &status)); > if (U_FAILURE(status)) { >- throwTypeError(&exec, scope, ASCIILiteral("failed to initialize PluralRules")); >+ throwTypeError(&exec, scope, "failed to initialize PluralRules"_s); > return; > } > >@@ -201,11 +201,11 @@ JSObject* IntlPluralRules::resolvedOptions(ExecState& exec) > // 13.4.4 Intl.PluralRules.prototype.resolvedOptions () > // https://tc39.github.io/ecma402/#sec-intl.pluralrules.prototype.resolvedoptions > if (!m_initializedPluralRules) >- return throwTypeError(&exec, scope, ASCIILiteral("Intl.PluralRules.prototype.resolvedOptions called on value that's not an object initialized as a PluralRules")); >+ return throwTypeError(&exec, scope, "Intl.PluralRules.prototype.resolvedOptions called on value that's not an object initialized as a PluralRules"_s); > > JSObject* options = constructEmptyObject(&exec); > options->putDirect(vm, vm.propertyNames->locale, jsNontrivialString(&exec, m_locale)); >- options->putDirect(vm, Identifier::fromString(&vm, "type"), jsNontrivialString(&exec, ASCIILiteral(m_type == UPLURAL_TYPE_ORDINAL ? "ordinal" : "cardinal"))); >+ options->putDirect(vm, Identifier::fromString(&vm, "type"), jsNontrivialString(&exec, m_type == UPLURAL_TYPE_ORDINAL ? "ordinal"_s : "cardinal"_s)); > options->putDirect(vm, Identifier::fromString(&vm, "minimumIntegerDigits"), jsNumber(m_minimumIntegerDigits)); > options->putDirect(vm, Identifier::fromString(&vm, "minimumFractionDigits"), jsNumber(m_minimumFractionDigits)); > options->putDirect(vm, Identifier::fromString(&vm, "maximumFractionDigits"), jsNumber(m_maximumFractionDigits)); >@@ -247,17 +247,17 @@ JSValue IntlPluralRules::select(ExecState& exec, double value) > // 13.1.4 ResolvePlural (pluralRules, n) > // https://tc39.github.io/ecma402/#sec-resolveplural > if (!m_initializedPluralRules) >- return throwTypeError(&exec, scope, ASCIILiteral("Intl.PluralRules.prototype.select called on value that's not an object initialized as a PluralRules")); >+ return throwTypeError(&exec, scope, "Intl.PluralRules.prototype.select called on value that's not an object initialized as a PluralRules"_s); > > if (!std::isfinite(value)) >- return jsNontrivialString(&exec, ASCIILiteral("other")); >+ return jsNontrivialString(&exec, "other"_s); > > #if JSC_ICU_HAS_PLURALRULES_WITH_FORMAT > UErrorCode status = U_ZERO_ERROR; > Vector<UChar, 8> result(8); > auto length = uplrules_selectWithFormat(m_pluralRules.get(), value, m_numberFormat.get(), result.data(), result.size(), &status); > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to select plural value")); >+ return throwTypeError(&exec, scope, "failed to select plural value"_s); > #else > UErrorCode status = U_ZERO_ERROR; > Vector<UChar, 32> buffer(32); >@@ -268,18 +268,18 @@ JSValue IntlPluralRules::select(ExecState& exec, double value) > unum_formatDouble(m_numberFormat.get(), value, buffer.data(), length, nullptr, &status); > } > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to select plural value")); >+ return throwTypeError(&exec, scope, "failed to select plural value"_s); > > double formatted = unum_parseDouble(m_numberFormat.get(), buffer.data(), length, nullptr, &status); > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to select plural value")); >+ return throwTypeError(&exec, scope, "failed to select plural value"_s); > > // Can only be 'zero', 'one', 'two', 'few', 'many' or 'other' > status = U_ZERO_ERROR; > Vector<UChar, 8> result(8); > length = uplrules_select(m_pluralRules.get(), formatted, result.data(), result.size(), &status); > if (U_FAILURE(status)) >- return throwTypeError(&exec, scope, ASCIILiteral("failed to select plural value")); >+ return throwTypeError(&exec, scope, "failed to select plural value"_s); > #endif > > return jsString(&exec, String(result.data(), length)); >diff --git a/Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.cpp b/Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.cpp >index 7af69c5ea7d35be5f5228ae5cc63cfc1d5bab08d..9707a8dbb1fccc9efabe376da2a467fd4b70e432 100644 >--- a/Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.cpp >@@ -77,7 +77,7 @@ IntlPluralRulesConstructor::IntlPluralRulesConstructor(VM& vm, Structure* struct > > void IntlPluralRulesConstructor::finishCreation(VM& vm, IntlPluralRulesPrototype* pluralRulesPrototype, Structure* pluralRulesStructure) > { >- Base::finishCreation(vm, ASCIILiteral("PluralRules")); >+ Base::finishCreation(vm, "PluralRules"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, pluralRulesPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > pluralRulesPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum)); >diff --git a/Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp b/Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp >index d6912b9eb95a3118e8cf50cdd1a393c478e07a58..0cc95d7ffb719f94355e529a0241b68b0f30615d 100644 >--- a/Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp >@@ -87,7 +87,7 @@ EncodedJSValue JSC_HOST_CALL IntlPluralRulesPrototypeFuncSelect(ExecState* state > IntlPluralRules* pluralRules = jsDynamicCast<IntlPluralRules*>(vm, state->thisValue()); > > if (!pluralRules) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.PluralRules.prototype.select called on value that's not an object initialized as a PluralRules"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.PluralRules.prototype.select called on value that's not an object initialized as a PluralRules"_s)); > > double value = state->argument(0).toNumber(state); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -106,7 +106,7 @@ EncodedJSValue JSC_HOST_CALL IntlPluralRulesPrototypeFuncResolvedOptions(ExecSta > IntlPluralRules* pluralRules = jsDynamicCast<IntlPluralRules*>(vm, state->thisValue()); > > if (!pluralRules) >- return JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Intl.PluralRules.prototype.resolvedOptions called on value that's not an object initialized as a PluralRules"))); >+ return JSValue::encode(throwTypeError(state, scope, "Intl.PluralRules.prototype.resolvedOptions called on value that's not an object initialized as a PluralRules"_s)); > > scope.release(); > return JSValue::encode(pluralRules->resolvedOptions(*state)); >diff --git a/Source/JavaScriptCore/runtime/IteratorOperations.cpp b/Source/JavaScriptCore/runtime/IteratorOperations.cpp >index 6910f01bdae0881f89862f146ece53dbe83d337e..ff1ccf67bf82093a64207325737ee778127d1006 100644 >--- a/Source/JavaScriptCore/runtime/IteratorOperations.cpp >+++ b/Source/JavaScriptCore/runtime/IteratorOperations.cpp >@@ -57,7 +57,7 @@ JSValue iteratorNext(ExecState* exec, IterationRecord iterationRecord, JSValue a > RETURN_IF_EXCEPTION(scope, JSValue()); > > if (!result.isObject()) >- return throwTypeError(exec, scope, ASCIILiteral("Iterator result interface is not an object.")); >+ return throwTypeError(exec, scope, "Iterator result interface is not an object."_s); > > return result; > } >@@ -129,7 +129,7 @@ void iteratorClose(ExecState* exec, IterationRecord iterationRecord) > RETURN_IF_EXCEPTION(throwScope, void()); > > if (!innerResult.isObject()) { >- throwTypeError(exec, throwScope, ASCIILiteral("Iterator result interface is not an object.")); >+ throwTypeError(exec, throwScope, "Iterator result interface is not an object."_s); > return; > } > } >@@ -168,7 +168,7 @@ bool hasIteratorMethod(ExecState& state, JSValue value) > JSObject* object = asObject(value); > CallData callData; > CallType callType; >- JSValue applyMethod = object->getMethod(&state, callData, callType, vm.propertyNames->iteratorSymbol, ASCIILiteral("Symbol.iterator property should be callable")); >+ JSValue applyMethod = object->getMethod(&state, callData, callType, vm.propertyNames->iteratorSymbol, "Symbol.iterator property should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > > return !applyMethod.isUndefined(); >@@ -181,7 +181,7 @@ JSValue iteratorMethod(ExecState& state, JSObject* object) > > CallData callData; > CallType callType; >- JSValue method = object->getMethod(&state, callData, callType, vm.propertyNames->iteratorSymbol, ASCIILiteral("Symbol.iterator property should be callable")); >+ JSValue method = object->getMethod(&state, callData, callType, vm.propertyNames->iteratorSymbol, "Symbol.iterator property should be callable"_s); > RETURN_IF_EXCEPTION(scope, jsUndefined()); > > return method; >diff --git a/Source/JavaScriptCore/runtime/JSArray.cpp b/Source/JavaScriptCore/runtime/JSArray.cpp >index 83b5145f2ab0176af43db9a58f4275a33710270c..95bf23d0a2dea20b0fac6b40f7ef0755c477b3c7 100644 >--- a/Source/JavaScriptCore/runtime/JSArray.cpp >+++ b/Source/JavaScriptCore/runtime/JSArray.cpp >@@ -37,7 +37,7 @@ > > namespace JSC { > >-const char* const LengthExceededTheMaximumArrayLengthError = "Length exceeded the maximum array length"; >+const ASCIILiteral LengthExceededTheMaximumArrayLengthError { "Length exceeded the maximum array length"_s }; > > STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSArray); > >@@ -129,18 +129,18 @@ bool JSArray::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName > // All paths through length definition call the default [[DefineOwnProperty]], hence: > // from ES5.1 8.12.9 7.a. > if (descriptor.configurablePresent() && descriptor.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeConfigurabilityError); > // from ES5.1 8.12.9 7.b. > if (descriptor.enumerablePresent() && descriptor.enumerable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeEnumerabilityError); > > // a. If the [[Value]] field of Desc is absent, then > // a.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", Desc, and Throw as arguments. > if (descriptor.isAccessorDescriptor()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeAccessMechanismError); > // from ES5.1 8.12.9 10.a. > if (!array->isLengthWritable() && descriptor.writablePresent() && descriptor.writable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeWritabilityError); > // This descriptor is either just making length read-only, or changing nothing! > if (!descriptor.value()) { > if (descriptor.writablePresent()) >@@ -156,7 +156,7 @@ bool JSArray::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName > double valueAsNumber = descriptor.value().toNumber(exec); > RETURN_IF_EXCEPTION(scope, false); > if (newLen != valueAsNumber) { >- JSC::throwException(exec, scope, createRangeError(exec, ASCIILiteral("Invalid array length"))); >+ JSC::throwException(exec, scope, createRangeError(exec, "Invalid array length"_s)); > return false; > } > >@@ -173,7 +173,7 @@ bool JSArray::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName > // f.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing "length", newLenDesc, and Throw as arguments. > // g. Reject if oldLenDesc.[[Writable]] is false. > if (!array->isLengthWritable()) >- return typeError(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError)); >+ return typeError(exec, scope, throwException, ReadonlyPropertyChangeError); > > // h. If newLenDesc.[[Writable]] is absent or has the value true, let newWritable be true. > // i. Else, >@@ -215,7 +215,7 @@ bool JSArray::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName > uint32_t index = optionalIndex.value(); > // FIXME: Nothing prevents this from being called on a RuntimeArray, and the length function will always return 0 in that case. > if (index >= array->length() && !array->isLengthWritable()) >- return typeError(exec, scope, throwException, ASCIILiteral("Attempting to define numeric property on array with non-writable length property.")); >+ return typeError(exec, scope, throwException, "Attempting to define numeric property on array with non-writable length property."_s); > // c. Let succeeded be the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing P, Desc, and false as arguments. > // d. Reject if succeeded is false. > // e. If index >= oldLen >@@ -267,7 +267,7 @@ bool JSArray::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSVa > double valueAsNumber = value.toNumber(exec); > RETURN_IF_EXCEPTION(scope, false); > if (valueAsNumber != static_cast<double>(newLength)) { >- throwException(exec, scope, createRangeError(exec, ASCIILiteral("Invalid array length"))); >+ throwException(exec, scope, createRangeError(exec, "Invalid array length"_s)); > return false; > } > scope.release(); >@@ -429,7 +429,7 @@ bool JSArray::setLengthWithArrayStorage(ExecState* exec, unsigned newLength, boo > if (SparseArrayValueMap* map = storage->m_sparseMap.get()) { > // Fail if the length is not writable. > if (map->lengthIsReadOnly()) >- return typeError(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, throwException, ReadonlyPropertyWriteError); > > if (newLength < length) { > // Copy any keys we might be interested in into a vector. >@@ -454,7 +454,7 @@ bool JSArray::setLengthWithArrayStorage(ExecState* exec, unsigned newLength, boo > ASSERT(it != map->notFound()); > if (it->value.attributes & PropertyAttribute::DontDelete) { > storage->setLength(index + 1); >- return typeError(exec, scope, throwException, ASCIILiteral(UnableToDeletePropertyError)); >+ return typeError(exec, scope, throwException, UnableToDeletePropertyError); > } > map->remove(it); > } >@@ -513,7 +513,7 @@ bool JSArray::appendMemcpy(ExecState* exec, VM& vm, unsigned startIndex, JSC::JS > > unsigned newLength; > if (checkedNewLength.safeGet(newLength) == CheckedState::DidOverflow) { >- throwException(exec, scope, createRangeError(exec, ASCIILiteral(LengthExceededTheMaximumArrayLengthError))); >+ throwException(exec, scope, createRangeError(exec, LengthExceededTheMaximumArrayLengthError)); > return false; > } > >@@ -683,7 +683,7 @@ JSValue JSArray::pop(ExecState* exec) > unsigned length = storage->length(); > if (!length) { > if (!isLengthWritable()) >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > return jsUndefined(); > } > >@@ -716,7 +716,7 @@ JSValue JSArray::pop(ExecState* exec) > bool success = deletePropertyByIndex(this, exec, index); > RETURN_IF_EXCEPTION(scope, JSValue()); > if (!success) { >- throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError)); >+ throwTypeError(exec, scope, UnableToDeletePropertyError); > return jsUndefined(); > } > // Call the [[Put]] internal method of O with arguments "length", indx, and true. >diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h >index 8ae0f4edec8a3ed6ed06902738267a6bc0245828..8ec8f642117704ca768191dc49a913d5f5ced756 100644 >--- a/Source/JavaScriptCore/runtime/JSArray.h >+++ b/Source/JavaScriptCore/runtime/JSArray.h >@@ -31,7 +31,7 @@ namespace JSC { > class JSArray; > class LLIntOffsetsExtractor; > >-extern const char* const LengthExceededTheMaximumArrayLengthError; >+extern const ASCIILiteral LengthExceededTheMaximumArrayLengthError; > > class JSArray : public JSNonFinalObject { > friend class LLIntOffsetsExtractor; >diff --git a/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp b/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp >index ff45b3eee866357a6ba86c592f2ef6fb3953241f..9d7422f84b963b29822452868c6f2dd5028b380b 100644 >--- a/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp >@@ -55,7 +55,7 @@ JSArrayBufferConstructor::JSArrayBufferConstructor(VM& vm, Structure* structure, > > void JSArrayBufferConstructor::finishCreation(VM& vm, JSArrayBufferPrototype* prototype, GetterSetter* speciesSymbol) > { >- Base::finishCreation(vm, ASCIILiteral(arrayBufferSharingModeName(m_sharingMode))); >+ Base::finishCreation(vm, arrayBufferSharingModeName(m_sharingMode)); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); > putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); >diff --git a/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp b/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp >index 603b208ba3eed5583333855d58cfcd3cfefa3cc1..a3ac968ac2561497fb77737bf7cd5d163c05d451 100644 >--- a/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp >@@ -44,10 +44,10 @@ static EncodedJSValue JSC_HOST_CALL arrayBufferProtoFuncSlice(ExecState* exec) > > JSArrayBuffer* thisObject = jsDynamicCast<JSArrayBuffer*>(vm, exec->thisValue()); > if (!thisObject) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver of slice must be an array buffer.")); >+ return throwVMTypeError(exec, scope, "Receiver of slice must be an array buffer."_s); > > if (!exec->argumentCount()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Slice requires at least one argument.")); >+ return throwVMTypeError(exec, scope, "Slice requires at least one argument."_s); > > int32_t begin = exec->argument(0).toInt32(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -77,13 +77,13 @@ static EncodedJSValue JSC_HOST_CALL arrayBufferProtoGetterFuncByteLength(ExecSta > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be an array buffer but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be an array buffer but was not an object"_s); > > auto* thisObject = jsDynamicCast<JSArrayBuffer*>(vm, thisValue); > if (!thisObject) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be an array buffer")); >+ return throwVMTypeError(exec, scope, "Receiver should be an array buffer"_s); > if (thisObject->isShared()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should not be a shared array buffer")); >+ return throwVMTypeError(exec, scope, "Receiver should not be a shared array buffer"_s); > > scope.release(); > >@@ -97,13 +97,13 @@ static EncodedJSValue JSC_HOST_CALL sharedArrayBufferProtoGetterFuncByteLength(E > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be an array buffer but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be an array buffer but was not an object"_s); > > auto* thisObject = jsDynamicCast<JSArrayBuffer*>(vm, thisValue); > if (!thisObject) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be an array buffer")); >+ return throwVMTypeError(exec, scope, "Receiver should be an array buffer"_s); > if (!thisObject->isShared()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a shared array buffer")); >+ return throwVMTypeError(exec, scope, "Receiver should be a shared array buffer"_s); > > scope.release(); > >diff --git a/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp b/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp >index 730eefdd240d46b917aabda89c5f2bc039c99976..57943d7e2fd28b3125b6ba4eca5b87c992b359ce 100644 >--- a/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp >+++ b/Source/JavaScriptCore/runtime/JSArrayBufferView.cpp >@@ -40,7 +40,7 @@ const ClassInfo JSArrayBufferView::s_info = { > > String JSArrayBufferView::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > JSArrayBufferView::ConstructionContext::ConstructionContext( >diff --git a/Source/JavaScriptCore/runtime/JSArrayInlines.h b/Source/JavaScriptCore/runtime/JSArrayInlines.h >index 39338d047a473036bf9e1403cd86cfa968fbb71f..1cf09618529f991a31fcc10ff00b9263e8335a3a 100644 >--- a/Source/JavaScriptCore/runtime/JSArrayInlines.h >+++ b/Source/JavaScriptCore/runtime/JSArrayInlines.h >@@ -123,7 +123,7 @@ ALWAYS_INLINE void JSArray::pushInline(ExecState* exec, JSValue value) > if (UNLIKELY(length > MAX_ARRAY_INDEX)) { > methodTable(vm)->putByIndex(this, exec, length, value, true); > if (!scope.exception()) >- throwException(exec, scope, createRangeError(exec, ASCIILiteral(LengthExceededTheMaximumArrayLengthError))); >+ throwException(exec, scope, createRangeError(exec, LengthExceededTheMaximumArrayLengthError)); > return; > } > >@@ -144,7 +144,7 @@ ALWAYS_INLINE void JSArray::pushInline(ExecState* exec, JSValue value) > if (UNLIKELY(length > MAX_ARRAY_INDEX)) { > methodTable(vm)->putByIndex(this, exec, length, value, true); > if (!scope.exception()) >- throwException(exec, scope, createRangeError(exec, ASCIILiteral(LengthExceededTheMaximumArrayLengthError))); >+ throwException(exec, scope, createRangeError(exec, LengthExceededTheMaximumArrayLengthError)); > return; > } > >@@ -179,7 +179,7 @@ ALWAYS_INLINE void JSArray::pushInline(ExecState* exec, JSValue value) > if (UNLIKELY(length > MAX_ARRAY_INDEX)) { > methodTable(vm)->putByIndex(this, exec, length, value, true); > if (!scope.exception()) >- throwException(exec, scope, createRangeError(exec, ASCIILiteral(LengthExceededTheMaximumArrayLengthError))); >+ throwException(exec, scope, createRangeError(exec, LengthExceededTheMaximumArrayLengthError)); > return; > } > >@@ -218,7 +218,7 @@ ALWAYS_INLINE void JSArray::pushInline(ExecState* exec, JSValue value) > methodTable(vm)->putByIndex(this, exec, storage->length(), value, true); > // Per ES5.1 15.4.4.7 step 6 & 15.4.5.1 step 3.d. > if (!scope.exception()) >- throwException(exec, scope, createRangeError(exec, ASCIILiteral(LengthExceededTheMaximumArrayLengthError))); >+ throwException(exec, scope, createRangeError(exec, LengthExceededTheMaximumArrayLengthError)); > return; > } > >diff --git a/Source/JavaScriptCore/runtime/JSBigInt.cpp b/Source/JavaScriptCore/runtime/JSBigInt.cpp >index 0fde648ea4877c1f3692e86fa8b4f1306f74686c..27df1f41dcacb99c627ec2ef62431cf7fdcaae0d 100644 >--- a/Source/JavaScriptCore/runtime/JSBigInt.cpp >+++ b/Source/JavaScriptCore/runtime/JSBigInt.cpp >@@ -264,7 +264,7 @@ JSBigInt* JSBigInt::divide(ExecState* exec, JSBigInt* x, JSBigInt* y) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (y->isZero()) { >- throwRangeError(exec, scope, ASCIILiteral("0 is an invalid divisor value.")); >+ throwRangeError(exec, scope, "0 is an invalid divisor value."_s); > return nullptr; > } > >@@ -317,7 +317,7 @@ JSBigInt* JSBigInt::remainder(ExecState* exec, JSBigInt* x, JSBigInt* y) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (y->isZero()) { >- throwRangeError(exec, scope, ASCIILiteral("0 is an invalid divisor value.")); >+ throwRangeError(exec, scope, "0 is an invalid divisor value."_s); > return nullptr; > } > >@@ -1192,7 +1192,7 @@ double JSBigInt::toNumber(ExecState* exec) const > { > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- throwTypeError(exec, scope, ASCIILiteral("Conversion from 'BigInt' to 'number' is not allowed.")); >+ throwTypeError(exec, scope, "Conversion from 'BigInt' to 'number' is not allowed."_s); > return 0.0; > } > >diff --git a/Source/JavaScriptCore/runtime/JSCJSValue.cpp b/Source/JavaScriptCore/runtime/JSCJSValue.cpp >index 8a181f74d063d9ddf62a80d26e7d19e376e3124a..1a6748aaa42e2379609598c1fbdeaa07c408a515 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValue.cpp >+++ b/Source/JavaScriptCore/runtime/JSCJSValue.cpp >@@ -169,7 +169,7 @@ bool JSValue::putToPrimitive(ExecState* exec, PropertyName propertyName, JSValue > RETURN_IF_EXCEPTION(scope, false); > > if (prototype.isNull()) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > } > >@@ -178,7 +178,7 @@ bool JSValue::putToPrimitive(ExecState* exec, PropertyName propertyName, JSValue > PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes); > if (offset != invalidOffset) { > if (attributes & PropertyAttribute::ReadOnly) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > > JSValue gs = obj->getDirect(offset); > if (gs.isGetterSetter()) { >@@ -200,7 +200,7 @@ bool JSValue::putToPrimitive(ExecState* exec, PropertyName propertyName, JSValue > break; > } > >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > > bool JSValue::putToPrimitiveByIndex(ExecState* exec, unsigned propertyName, JSValue value, bool shouldThrow) >@@ -223,7 +223,7 @@ bool JSValue::putToPrimitiveByIndex(ExecState* exec, unsigned propertyName, JSVa > if (success) > return putResult; > >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > } > > void JSValue::dump(PrintStream& out) const >@@ -375,7 +375,7 @@ JSString* JSValue::toStringSlowCase(ExecState* exec, bool returnEmptyStringOnErr > if (isUndefined()) > return vm.smallStrings.undefinedString(); > if (isSymbol()) { >- throwTypeError(exec, scope, ASCIILiteral("Cannot convert a symbol to a string")); >+ throwTypeError(exec, scope, "Cannot convert a symbol to a string"_s); > return errorValue(); > } > if (isBigInt()) { >diff --git a/Source/JavaScriptCore/runtime/JSCJSValueInlines.h b/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >index 4ba9d507deb5fb5c566ee675b2cf11b10df49c11..ae34afd5d9b12a325ec0acc1a1db46f2d85d0b9b 100644 >--- a/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >+++ b/Source/JavaScriptCore/runtime/JSCJSValueInlines.h >@@ -673,7 +673,7 @@ inline PreferredPrimitiveType toPreferredPrimitiveType(ExecState* exec, JSValue > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!value.isString()) { >- throwTypeError(exec, scope, ASCIILiteral("Primitive hint is not a string.")); >+ throwTypeError(exec, scope, "Primitive hint is not a string."_s); > return NoPreference; > } > >@@ -687,7 +687,7 @@ inline PreferredPrimitiveType toPreferredPrimitiveType(ExecState* exec, JSValue > if (WTF::equal(hintString, "string")) > return PreferString; > >- throwTypeError(exec, scope, ASCIILiteral("Expected primitive hint to match one of 'default', 'number', 'string'.")); >+ throwTypeError(exec, scope, "Expected primitive hint to match one of 'default', 'number', 'string'."_s); > return NoPreference; > } > >diff --git a/Source/JavaScriptCore/runtime/JSDataView.cpp b/Source/JavaScriptCore/runtime/JSDataView.cpp >index 610dc87b971ace18467804e88b476b4f817294a2..6be56e924e967318627fb1243ec8d213364941b6 100644 >--- a/Source/JavaScriptCore/runtime/JSDataView.cpp >+++ b/Source/JavaScriptCore/runtime/JSDataView.cpp >@@ -52,11 +52,11 @@ JSDataView* JSDataView::create( > > ASSERT(buffer); > if (!ArrayBufferView::verifySubRangeLength(*buffer, byteOffset, byteLength, sizeof(uint8_t))) { >- throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("Length out of range of buffer"))); >+ throwVMError(exec, scope, createRangeError(exec, "Length out of range of buffer"_s)); > return nullptr; > } > if (!ArrayBufferView::verifyByteOffsetAlignment(byteOffset, sizeof(uint8_t))) { >- throwException(exec, scope, createRangeError(exec, ASCIILiteral("Byte offset is not aligned"))); >+ throwException(exec, scope, createRangeError(exec, "Byte offset is not aligned"_s)); > return nullptr; > } > ConstructionContext context( >@@ -134,7 +134,7 @@ bool JSDataView::put( > > if (propertyName == vm.propertyNames->byteLength > || propertyName == vm.propertyNames->byteOffset) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral("Attempting to write to read-only typed array property.")); >+ return typeError(exec, scope, slot.isStrictMode(), "Attempting to write to read-only typed array property."_s); > > scope.release(); > return Base::put(thisObject, exec, propertyName, value, slot); >@@ -149,7 +149,7 @@ bool JSDataView::defineOwnProperty( > JSDataView* thisObject = jsCast<JSDataView*>(object); > if (propertyName == vm.propertyNames->byteLength > || propertyName == vm.propertyNames->byteOffset) >- return typeError(exec, scope, shouldThrow, ASCIILiteral("Attempting to define read-only typed array property.")); >+ return typeError(exec, scope, shouldThrow, "Attempting to define read-only typed array property."_s); > > return Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow); > } >diff --git a/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp b/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >index 92fc13e4edd699047b41717a55a485d31516d5fa..a0629449940aebc6dfc2fb4e67c439c4f95a87c9 100644 >--- a/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp >@@ -127,7 +127,7 @@ EncodedJSValue getData(ExecState* exec) > > JSDataView* dataView = jsDynamicCast<JSDataView*>(vm, exec->thisValue()); > if (!dataView) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver of DataView method must be a DataView")); >+ return throwVMTypeError(exec, scope, "Receiver of DataView method must be a DataView"_s); > > unsigned byteOffset = exec->argument(0).toIndex(exec, "byteOffset"); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -141,7 +141,7 @@ EncodedJSValue getData(ExecState* exec) > > unsigned byteLength = dataView->length(); > if (elementSize > byteLength || byteOffset > byteLength - elementSize) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("Out of bounds access"))); >+ return throwVMError(exec, scope, createRangeError(exec, "Out of bounds access"_s)); > > const unsigned dataSize = sizeof(typename Adaptor::Type); > union { >@@ -170,7 +170,7 @@ EncodedJSValue setData(ExecState* exec) > > JSDataView* dataView = jsDynamicCast<JSDataView*>(vm, exec->thisValue()); > if (!dataView) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver of DataView method must be a DataView")); >+ return throwVMTypeError(exec, scope, "Receiver of DataView method must be a DataView"_s); > > unsigned byteOffset = exec->argument(0).toIndex(exec, "byteOffset"); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -193,7 +193,7 @@ EncodedJSValue setData(ExecState* exec) > > unsigned byteLength = dataView->length(); > if (elementSize > byteLength || byteOffset > byteLength - elementSize) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("Out of bounds access"))); >+ return throwVMError(exec, scope, createRangeError(exec, "Out of bounds access"_s)); > > uint8_t* dataPtr = static_cast<uint8_t*>(dataView->vector()) + byteOffset; > >diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp >index 59a58bb7a157d2c80f7bc409ed477f5409845ace..7444eb338a56e9b9b87e9a22f7f6854541870f04 100644 >--- a/Source/JavaScriptCore/runtime/JSFunction.cpp >+++ b/Source/JavaScriptCore/runtime/JSFunction.cpp >@@ -364,10 +364,10 @@ EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue thisValu > switch (parseMode) { > case SourceParseMode::GeneratorBodyMode: > case SourceParseMode::AsyncGeneratorBodyMode: >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Function.caller used to retrieve generator body"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Function.caller used to retrieve generator body"_s)); > case SourceParseMode::AsyncFunctionBodyMode: > case SourceParseMode::AsyncArrowFunctionBodyMode: >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Function.caller used to retrieve async function body"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Function.caller used to retrieve async function body"_s)); > case SourceParseMode::NormalFunctionMode: > case SourceParseMode::GeneratorWrapperFunctionMode: > case SourceParseMode::GetterMode: >@@ -385,7 +385,7 @@ EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue thisValu > case SourceParseMode::GeneratorWrapperMethodMode: > if (!function->jsExecutable()->isStrictMode()) > return JSValue::encode(caller); >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Function.caller used to retrieve strict caller"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Function.caller used to retrieve strict caller"_s)); > } > RELEASE_ASSERT_NOT_REACHED(); > } >@@ -517,7 +517,7 @@ bool JSFunction::put(JSCell* cell, ExecState* exec, PropertyName propertyName, J > return Base::put(thisObject, exec, propertyName, value, slot); > } > slot.disableCaching(); >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > PropertyStatus propertyType = thisObject->reifyLazyPropertyIfNeeded(vm, exec, propertyName); > if (isLazy(propertyType)) >@@ -591,15 +591,15 @@ bool JSFunction::defineOwnProperty(JSObject* object, ExecState* exec, PropertyNa > } > > if (descriptor.configurablePresent() && descriptor.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeConfigurabilityError); > if (descriptor.enumerablePresent() && descriptor.enumerable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeEnumerabilityError); > if (descriptor.isAccessorDescriptor()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeAccessMechanismError); > if (descriptor.writablePresent() && descriptor.writable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeWritabilityError); > if (!valueCheck) >- return typeError(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError)); >+ return typeError(exec, scope, throwException, ReadonlyPropertyChangeError); > return true; > } > >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h >index 7604ce439d72646f4daaed459ce2305664af01b3..f35553c55545c14895ac8183d689831e4dc9bfce 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h >@@ -88,7 +88,7 @@ enum class CopyType { > Unobservable, > }; > >-static const char* const typedArrayBufferHasBeenDetachedErrorMessage = "Underlying ArrayBuffer has been detached from the view"; >+static const ASCIILiteral typedArrayBufferHasBeenDetachedErrorMessage { "Underlying ArrayBuffer has been detached from the view"_s }; > > template<typename Adaptor> > class JSGenericTypedArrayView final : public JSArrayBufferView { >@@ -176,7 +176,7 @@ class JSGenericTypedArrayView final : public JSArrayBufferView { > RETURN_IF_EXCEPTION(scope, false); > > if (isNeutered()) { >- throwTypeError(exec, scope, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage)); >+ throwTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage); > return false; > } > >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h >index d04acee773c02ceb888ac7e384c394b8040cab06..279a781cafa15519f2514e478ea01fea1a7e4cc7 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h >@@ -129,7 +129,7 @@ inline JSObject* constructGenericTypedArrayViewWithArguments(ExecState* exec, St > length = lengthOpt.value(); > else { > if ((buffer->byteLength() - offset) % ViewClass::elementSize) >- return throwRangeError(exec, scope, ASCIILiteral("ArrayBuffer length minus the byteOffset is not a multiple of the element size")); >+ return throwRangeError(exec, scope, "ArrayBuffer length minus the byteOffset is not a multiple of the element size"_s); > length = (buffer->byteLength() - offset) / ViewClass::elementSize; > } > >@@ -139,7 +139,7 @@ inline JSObject* constructGenericTypedArrayViewWithArguments(ExecState* exec, St > ASSERT(!offset && !lengthOpt); > > if (ViewClass::TypedArrayStorageType == TypeDataView) >- return throwTypeError(exec, scope, ASCIILiteral("Expected ArrayBuffer for the first argument.")); >+ return throwTypeError(exec, scope, "Expected ArrayBuffer for the first argument."_s); > > // For everything but DataView, we allow construction with any of: > // - Another array. This creates a copy of the of that array. >@@ -219,7 +219,7 @@ EncodedJSValue JSC_HOST_CALL constructGenericTypedArrayView(ExecState* exec) > > if (!argCount) { > if (ViewClass::TypedArrayStorageType == TypeDataView) >- return throwVMTypeError(exec, scope, ASCIILiteral("DataView constructor requires at least one argument.")); >+ return throwVMTypeError(exec, scope, "DataView constructor requires at least one argument."_s); > > scope.release(); > return JSValue::encode(ViewClass::create(exec, structure, 0)); >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >index 3e3f36cd377ad1664880296f4d91141ce6fa6406..b5d710da72993cd294640079c7f453e39729754f 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >@@ -431,7 +431,7 @@ bool JSGenericTypedArrayView<Adaptor>::deleteProperty( > JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(cell); > > if (thisObject->isNeutered()) >- return typeError(exec, scope, true, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage)); >+ return typeError(exec, scope, true, typedArrayBufferHasBeenDetachedErrorMessage); > > if (parseIndex(propertyName)) > return false; >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h >index 9abc983527cdbef1a16c73fab58f1795fecb5d92..7c9e6ce96fa384e2f1bbf0e8e7beacdf61b1e764 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h >@@ -56,7 +56,7 @@ inline JSArrayBufferView* speciesConstruct(ExecState* exec, JSObject* exemplar, > return defaultConstructor(); > } > if (!constructor.isObject()) { >- throwTypeError(exec, scope, ASCIILiteral("constructor Property should not be null")); >+ throwTypeError(exec, scope, "constructor Property should not be null"_s); > return nullptr; > } > >@@ -75,11 +75,11 @@ inline JSArrayBufferView* speciesConstruct(ExecState* exec, JSObject* exemplar, > if (!view->isNeutered()) > return view; > >- throwTypeError(exec, scope, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage)); >+ throwTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage); > return nullptr; > } > >- throwTypeError(exec, scope, ASCIILiteral("species constructor did not return a TypedArray View")); >+ throwTypeError(exec, scope, "species constructor did not return a TypedArray View"_s); > return nullptr; > } > >@@ -106,7 +106,7 @@ EncodedJSValue JSC_HOST_CALL genericTypedArrayViewProtoFuncSet(VM& vm, ExecState > ViewClass* thisObject = jsCast<ViewClass*>(exec->thisValue()); > > if (UNLIKELY(!exec->argumentCount())) >- return throwVMTypeError(exec, scope, ASCIILiteral("Expected at least one argument")); >+ return throwVMTypeError(exec, scope, "Expected at least one argument"_s); > > unsigned offset; > if (exec->argumentCount() >= 2) { >@@ -123,7 +123,7 @@ EncodedJSValue JSC_HOST_CALL genericTypedArrayViewProtoFuncSet(VM& vm, ExecState > > JSObject* sourceArray = jsDynamicCast<JSObject*>(vm, exec->uncheckedArgument(0)); > if (UNLIKELY(!sourceArray)) >- return throwVMTypeError(exec, scope, ASCIILiteral("First argument should be an object")); >+ return throwVMTypeError(exec, scope, "First argument should be an object"_s); > > unsigned length; > if (isTypedView(sourceArray->classInfo(vm)->typedArrayStorageType)) { >@@ -233,7 +233,7 @@ EncodedJSValue JSC_HOST_CALL genericTypedArrayViewProtoFuncIndexOf(VM& vm, ExecS > return throwVMTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage); > > if (!exec->argumentCount()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Expected at least one argument")); >+ return throwVMTypeError(exec, scope, "Expected at least one argument"_s); > > unsigned length = thisObject->length(); > >@@ -310,7 +310,7 @@ EncodedJSValue JSC_HOST_CALL genericTypedArrayViewProtoFuncLastIndexOf(VM& vm, E > return throwVMTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage); > > if (!exec->argumentCount()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Expected at least one argument")); >+ return throwVMTypeError(exec, scope, "Expected at least one argument"_s); > > unsigned length = thisObject->length(); > >@@ -572,7 +572,7 @@ EncodedJSValue JSC_HOST_CALL genericTypedArrayViewPrivateFuncSubarrayCreate(VM&v > if (jsDynamicCast<JSArrayBufferView*>(vm, result)) > return JSValue::encode(result); > >- throwTypeError(exec, scope, ASCIILiteral("species constructor did not return a TypedArray View")); >+ throwTypeError(exec, scope, "species constructor did not return a TypedArray View"_s); > return JSValue::encode(JSValue()); > } > >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >index b4045e29360f354d675deb83581c0e12be080ce9..5e4ed5c71830791c3171974515c6459507606640 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >@@ -509,7 +509,7 @@ void JSGlobalObject::init(VM& vm) > [] (LazyClassStructure::Initializer& init) { \ > init.setPrototype(JS ## type ## ArrayPrototype::create(init.vm, init.global, JS ## type ## ArrayPrototype::createStructure(init.vm, init.global, init.global->m_typedArrayProto.get(init.global)))); \ > init.setStructure(JS ## type ## Array::createStructure(init.vm, init.global, init.prototype)); \ >- init.setConstructor(JS ## type ## ArrayConstructor::create(init.vm, init.global, JS ## type ## ArrayConstructor::createStructure(init.vm, init.global, init.global->m_typedArraySuperConstructor.get(init.global)), init.prototype, ASCIILiteral(#type "Array"), typedArrayConstructorAllocate ## type ## ArrayCodeGenerator(init.vm))); \ >+ init.setConstructor(JS ## type ## ArrayConstructor::create(init.vm, init.global, JS ## type ## ArrayConstructor::createStructure(init.vm, init.global, init.global->m_typedArraySuperConstructor.get(init.global)), init.prototype, #type "Array"_s, typedArrayConstructorAllocate ## type ## ArrayCodeGenerator(init.vm))); \ > init.global->putDirectWithoutTransition(init.vm, init.vm.propertyNames->builtinNames().type ## ArrayPrivateName(), init.constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \ > }); > FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW(INIT_TYPED_ARRAY_LATER) >@@ -519,7 +519,7 @@ void JSGlobalObject::init(VM& vm) > [] (LazyClassStructure::Initializer& init) { > init.setPrototype(JSDataViewPrototype::create(init.vm, JSDataViewPrototype::createStructure(init.vm, init.global, init.global->m_objectPrototype.get()))); > init.setStructure(JSDataView::createStructure(init.vm, init.global, init.prototype)); >- init.setConstructor(JSDataViewConstructor::create(init.vm, init.global, JSDataViewConstructor::createStructure(init.vm, init.global, init.global->m_functionPrototype.get()), init.prototype, ASCIILiteral("DataView"), nullptr)); >+ init.setConstructor(JSDataViewConstructor::create(init.vm, init.global, JSDataViewConstructor::createStructure(init.vm, init.global, init.global->m_functionPrototype.get()), init.prototype, "DataView"_s, nullptr)); > }); > > m_lexicalEnvironmentStructure.set(vm, this, JSLexicalEnvironment::createStructure(vm, this)); >@@ -695,21 +695,21 @@ m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->c > m_nativeErrorStructure.set(vm, this, NativeErrorConstructor::createStructure(vm, this, errorConstructor)); > m_evalErrorConstructor.initLater( > [] (const Initializer<NativeErrorConstructor>& init) { >- init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), ASCIILiteral("EvalError"))); >+ init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), "EvalError"_s)); > }); >- m_rangeErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, m_nativeErrorStructure.get(), m_nativeErrorPrototypeStructure.get(), ASCIILiteral("RangeError"))); >+ m_rangeErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, m_nativeErrorStructure.get(), m_nativeErrorPrototypeStructure.get(), "RangeError"_s)); > m_referenceErrorConstructor.initLater( > [] (const Initializer<NativeErrorConstructor>& init) { >- init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), ASCIILiteral("ReferenceError"))); >+ init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), "ReferenceError"_s)); > }); > m_syntaxErrorConstructor.initLater( > [] (const Initializer<NativeErrorConstructor>& init) { >- init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), ASCIILiteral("SyntaxError"))); >+ init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), "SyntaxError"_s)); > }); >- m_typeErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, m_nativeErrorStructure.get(), m_nativeErrorPrototypeStructure.get(), ASCIILiteral("TypeError"))); >+ m_typeErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, m_nativeErrorStructure.get(), m_nativeErrorPrototypeStructure.get(), "TypeError"_s)); > m_URIErrorConstructor.initLater( > [] (const Initializer<NativeErrorConstructor>& init) { >- init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), ASCIILiteral("URIError"))); >+ init.set(NativeErrorConstructor::create(init.vm, init.owner, init.owner->m_nativeErrorStructure.get(), init.owner->m_nativeErrorPrototypeStructure.get(), "URIError"_s)); > }); > > m_generatorFunctionPrototype.set(vm, this, GeneratorFunctionPrototype::create(vm, GeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get()))); >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp b/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp >index b7ea51d6a5731e30b6a02aca187f239546766737..f05360c1f6d57b3472b82ae7c9dd7d9b4c207208 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp >@@ -47,7 +47,7 @@ JSGlobalObjectDebuggable::JSGlobalObjectDebuggable(JSGlobalObject& globalObject) > String JSGlobalObjectDebuggable::name() const > { > String name = m_globalObject.name(); >- return name.isEmpty() ? ASCIILiteral("JSContext") : name; >+ return name.isEmpty() ? "JSContext"_s : name; > } > > void JSGlobalObjectDebuggable::connect(FrontendChannel* frontendChannel, bool automaticInspection, bool immediatelyPause) >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp >index 4d9da0ef0f5dabd339d1b786409ba379b3f916e3..882af97f2c0556ed38c4999584f800b0e7c25028 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp >@@ -62,7 +62,7 @@ using namespace Unicode; > > namespace JSC { > >-const char* const ObjectProtoCalledOnNullOrUndefinedError = "Object.prototype.__proto__ called on null or undefined"; >+const ASCIILiteral ObjectProtoCalledOnNullOrUndefinedError { "Object.prototype.__proto__ called on null or undefined"_s }; > > template<unsigned charactersCount> > static Bitmap<256> makeCharacterBitmap(const char (&characters)[charactersCount]) >@@ -84,7 +84,7 @@ static JSValue encode(ExecState* exec, const Bitmap<256>& doNotEscape, const Cha > // https://tc39.github.io/ecma262/#sec-encode > > auto throwException = [&scope, exec] { >- return JSC::throwException(exec, scope, createURIError(exec, ASCIILiteral("String contained an illegal UTF-16 sequence."))); >+ return JSC::throwException(exec, scope, createURIError(exec, "String contained an illegal UTF-16 sequence."_s)); > }; > > StringBuilder builder; >@@ -210,7 +210,7 @@ static JSValue decode(ExecState* exec, const CharType* characters, int length, c > } > if (charLen == 0) { > if (strict) >- return throwException(exec, scope, createURIError(exec, ASCIILiteral("URI error"))); >+ return throwException(exec, scope, createURIError(exec, "URI error"_s)); > // The only case where we don't use "strict" mode is the "unescape" function. > // For that, it's good to support the wonky "%u" syntax for compatibility with WinIE. > if (k <= length - 6 && p[1] == 'u' >@@ -725,7 +725,7 @@ EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState* exec) > > JSValue thisValue = exec->thisValue().toThis(exec, StrictMode); > if (thisValue.isUndefinedOrNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral(ObjectProtoCalledOnNullOrUndefinedError)); >+ return throwVMTypeError(exec, scope, ObjectProtoCalledOnNullOrUndefinedError); > > JSValue value = exec->argument(0); > >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h >index f7696dc24cf2a4de47acf2344ac683815bed292f..c23eb9be47c6819b78b5cb09a1ba5414737fc7c1 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h >@@ -35,7 +35,7 @@ class JSObject; > // FIXME: These functions should really be in JSGlobalObject.cpp, but putting them there > // is a 0.5% reduction. > >-extern const char* const ObjectProtoCalledOnNullOrUndefinedError; >+extern const ASCIILiteral ObjectProtoCalledOnNullOrUndefinedError; > > EncodedJSValue JSC_HOST_CALL globalFuncEval(ExecState*); > EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState*); >diff --git a/Source/JavaScriptCore/runtime/JSMap.cpp b/Source/JavaScriptCore/runtime/JSMap.cpp >index be96198c665049493951a4db0696eac2b313f7e8..45f4414d6d302493acefc0438275afc053eebf32 100644 >--- a/Source/JavaScriptCore/runtime/JSMap.cpp >+++ b/Source/JavaScriptCore/runtime/JSMap.cpp >@@ -35,7 +35,7 @@ const ClassInfo JSMap::s_info = { "Map", &Base::s_info, nullptr, nullptr, CREATE > > String JSMap::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > JSMap* JSMap::clone(ExecState* exec, VM& vm, Structure* structure) >diff --git a/Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp b/Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp >index d9b9e5738de5f9be65ab2b8bf8c75f0cee262e8e..505063497a22b200e993b0cfeabd363cce8e47da 100644 >--- a/Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp >+++ b/Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp >@@ -120,7 +120,7 @@ bool JSModuleEnvironment::put(JSCell* cell, ExecState* exec, PropertyName proper > AbstractModuleRecord::Resolution resolution = thisObject->moduleRecord()->resolveImport(exec, Identifier::fromUid(exec, propertyName.uid())); > RETURN_IF_EXCEPTION(scope, false); > if (resolution.type == AbstractModuleRecord::Resolution::Type::Resolved) { >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > return false; > } > scope.release(); >diff --git a/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp b/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp >index 095b81187f269f3e547a418c2d734776dd1a10b3..5be5c8c1f4d939a07e780c89e18380d14b5c3d99 100644 >--- a/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp >@@ -184,7 +184,7 @@ bool JSModuleNamespaceObject::put(JSCell*, ExecState* exec, PropertyName, JSValu > > // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-set-p-v-receiver > if (slot.isStrictMode()) >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > return false; > } > >@@ -194,7 +194,7 @@ bool JSModuleNamespaceObject::putByIndex(JSCell*, ExecState* exec, unsigned, JSV > auto scope = DECLARE_THROW_SCOPE(vm); > > if (shouldThrow) >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > return false; > } > >@@ -224,7 +224,7 @@ bool JSModuleNamespaceObject::defineOwnProperty(JSObject*, ExecState* exec, Prop > > // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-defineownproperty-p-desc > if (shouldThrow) >- throwTypeError(exec, scope, ASCIILiteral(NonExtensibleObjectPropertyDefineError)); >+ throwTypeError(exec, scope, NonExtensibleObjectPropertyDefineError); > return false; > } > >diff --git a/Source/JavaScriptCore/runtime/JSONObject.cpp b/Source/JavaScriptCore/runtime/JSONObject.cpp >index ddcfc18e9dc0aabdb82457d3b44924f2cc5994f7..dc78588728d9f86b8839886fd358d6409d1ad04a 100644 >--- a/Source/JavaScriptCore/runtime/JSONObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSONObject.cpp >@@ -391,7 +391,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(StringBuilder& > // Handle cycle detection, and put the holder on the stack. > for (unsigned i = 0; i < m_holderStack.size(); i++) { > if (m_holderStack[i].object() == object) { >- throwTypeError(m_exec, scope, ASCIILiteral("JSON.stringify cannot serialize cyclic structures.")); >+ throwTypeError(m_exec, scope, "JSON.stringify cannot serialize cyclic structures."_s); > return StringifyFailed; > } > } >@@ -790,7 +790,7 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncParse(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!exec->argumentCount()) >- return throwVMError(exec, scope, createError(exec, ASCIILiteral("JSON.parse requires at least one parameter"))); >+ return throwVMError(exec, scope, createError(exec, "JSON.parse requires at least one parameter"_s)); > auto viewWithString = exec->uncheckedArgument(0).toString(exec)->viewWithUnderlyingString(exec); > RETURN_IF_EXCEPTION(scope, { }); > StringView view = viewWithString.view; >@@ -834,7 +834,7 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncStringify(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!exec->argumentCount()) >- return throwVMError(exec, scope, createError(exec, ASCIILiteral("No input to stringify"))); >+ return throwVMError(exec, scope, createError(exec, "No input to stringify"_s)); > Stringifier stringifier(exec, exec->argument(1), exec->argument(2)); > RETURN_IF_EXCEPTION(scope, { }); > scope.release(); >diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp >index 84c078ee8656944bcc7817fbd33723016e960284..c7ce13199884596d7c60589d94ee521c394ec4ee 100644 >--- a/Source/JavaScriptCore/runtime/JSObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSObject.cpp >@@ -61,14 +61,14 @@ static unsigned lastArraySize = 0; > STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSObject); > STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSFinalObject); > >-const char* const NonExtensibleObjectPropertyDefineError = "Attempting to define property on object that is not extensible."; >-const char* const ReadonlyPropertyWriteError = "Attempted to assign to readonly property."; >-const char* const ReadonlyPropertyChangeError = "Attempting to change value of a readonly property."; >-const char* const UnableToDeletePropertyError = "Unable to delete property."; >-const char* const UnconfigurablePropertyChangeAccessMechanismError = "Attempting to change access mechanism for an unconfigurable property."; >-const char* const UnconfigurablePropertyChangeConfigurabilityError = "Attempting to change configurable attribute of unconfigurable property."; >-const char* const UnconfigurablePropertyChangeEnumerabilityError = "Attempting to change enumerable attribute of unconfigurable property."; >-const char* const UnconfigurablePropertyChangeWritabilityError = "Attempting to change writable attribute of unconfigurable property."; >+const ASCIILiteral NonExtensibleObjectPropertyDefineError { "Attempting to define property on object that is not extensible."_s }; >+const ASCIILiteral ReadonlyPropertyWriteError { "Attempted to assign to readonly property."_s }; >+const ASCIILiteral ReadonlyPropertyChangeError { "Attempting to change value of a readonly property."_s }; >+const ASCIILiteral UnableToDeletePropertyError { "Unable to delete property."_s }; >+const ASCIILiteral UnconfigurablePropertyChangeAccessMechanismError { "Attempting to change access mechanism for an unconfigurable property."_s }; >+const ASCIILiteral UnconfigurablePropertyChangeConfigurabilityError { "Attempting to change configurable attribute of unconfigurable property."_s }; >+const ASCIILiteral UnconfigurablePropertyChangeEnumerabilityError { "Attempting to change enumerable attribute of unconfigurable property."_s }; >+const ASCIILiteral UnconfigurablePropertyChangeWritabilityError { "Attempting to change writable attribute of unconfigurable property."_s }; > > const ClassInfo JSObject::s_info = { "Object", nullptr, nullptr, nullptr, CREATE_METHOD_TABLE(JSObject) }; > >@@ -561,7 +561,7 @@ String JSObject::calculatedClassName(JSObject* object) > return classInfoName; > > if (prototypeFunctionName.isNull()) >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > return prototypeFunctionName; >@@ -685,11 +685,11 @@ bool ordinarySetSlow(ExecState* exec, JSObject* object, PropertyName propertyNam > if (ownDescriptor.isDataDescriptor()) { > // 9.1.9.1-4-a If ownDesc.[[Writable]] is false, return false. > if (!ownDescriptor.writable()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > // 9.1.9.1-4-b If Type(Receiver) is not Object, return false. > if (!receiver.isObject()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > // In OrdinarySet, the receiver may not be the same to the object. > // So, we perform [[GetOwnProperty]] onto the receiver while we already perform [[GetOwnProperty]] onto the object. >@@ -704,11 +704,11 @@ bool ordinarySetSlow(ExecState* exec, JSObject* object, PropertyName propertyNam > if (existingDescriptorFound) { > // 9.1.9.1-4-d-i If IsAccessorDescriptor(existingDescriptor) is true, return false. > if (existingDescriptor.isAccessorDescriptor()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > // 9.1.9.1-4-d-ii If existingDescriptor.[[Writable]] is false, return false. > if (!existingDescriptor.writable()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > // 9.1.9.1-4-d-iii Let valueDesc be the PropertyDescriptor{[[Value]]: V}. > PropertyDescriptor valueDescriptor; >@@ -732,7 +732,7 @@ bool ordinarySetSlow(ExecState* exec, JSObject* object, PropertyName propertyNam > // 9.1.9.1-7 If setter is undefined, return false. > JSValue setter = ownDescriptor.setter(); > if (!setter.isObject()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > // 9.1.9.1-8 Perform ? Call(setter, Receiver, << V >>). > JSObject* setterObject = asObject(setter); >@@ -769,7 +769,7 @@ bool JSObject::putInlineSlow(ExecState* exec, PropertyName propertyName, JSValue > if (isValidOffset(offset)) { > if (attributes & PropertyAttribute::ReadOnly) { > ASSERT(this->prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this); >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > > JSValue gs = obj->getDirect(offset); >@@ -823,7 +823,7 @@ bool JSObject::putInlineSlow(ExecState* exec, PropertyName propertyName, JSValue > } > > if (!putDirectInternal<PutModePut>(vm, propertyName, value, 0, slot)) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > return true; > } > >@@ -1737,7 +1737,7 @@ bool JSObject::setPrototypeWithCycleCheck(VM& vm, ExecState* exec, JSValue proto > if (this->getPrototype(vm, exec) == prototype) > return true; > >- return typeError(exec, scope, shouldThrowIfCantSet, ASCIILiteral("Cannot set prototype of immutable prototype object")); >+ return typeError(exec, scope, shouldThrowIfCantSet, "Cannot set prototype of immutable prototype object"_s); > } > > ASSERT(methodTable(vm)->toThis(this, exec, NotStrictMode) == this); >@@ -1749,12 +1749,12 @@ bool JSObject::setPrototypeWithCycleCheck(VM& vm, ExecState* exec, JSValue proto > RETURN_IF_EXCEPTION(scope, false); > > if (!isExtensible) >- return typeError(exec, scope, shouldThrowIfCantSet, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrowIfCantSet, ReadonlyPropertyWriteError); > > JSValue nextPrototype = prototype; > while (nextPrototype && nextPrototype.isObject()) { > if (nextPrototype == this) >- return typeError(exec, scope, shouldThrowIfCantSet, ASCIILiteral("cyclic __proto__ value")); >+ return typeError(exec, scope, shouldThrowIfCantSet, "cyclic __proto__ value"_s); > // FIXME: The specification currently says we should check if the [[GetPrototypeOf]] internal method of nextPrototype > // is not the ordinary object internal method. However, we currently restrict this to Proxy objects as it would allow > // for cycles with certain HTML objects (WindowProxy, Location) otherwise. >@@ -2007,7 +2007,7 @@ static ALWAYS_INLINE JSValue callToPrimitiveFunction(ExecState* exec, const JSOb > CallType callType = getCallData(vm, function, callData); > if (callType == CallType::None) { > if (mode == TypeHintMode::TakesHint) >- throwTypeError(exec, scope, ASCIILiteral("Symbol.toPrimitive is not a function, undefined, or null")); >+ throwTypeError(exec, scope, "Symbol.toPrimitive is not a function, undefined, or null"_s); > return scope.exception(); > } > >@@ -2033,7 +2033,7 @@ static ALWAYS_INLINE JSValue callToPrimitiveFunction(ExecState* exec, const JSOb > RETURN_IF_EXCEPTION(scope, scope.exception()); > ASSERT(!result.isGetterSetter()); > if (result.isObject()) >- return mode == TypeHintMode::DoesNotTakeHint ? JSValue() : throwTypeError(exec, scope, ASCIILiteral("Symbol.toPrimitive returned an object")); >+ return mode == TypeHintMode::DoesNotTakeHint ? JSValue() : throwTypeError(exec, scope, "Symbol.toPrimitive returned an object"_s); > return result; > } > >@@ -2071,7 +2071,7 @@ JSValue JSObject::ordinaryToPrimitive(ExecState* exec, PreferredPrimitiveType hi > > scope.assertNoException(); > >- return throwTypeError(exec, scope, ASCIILiteral("No default value")); >+ return throwTypeError(exec, scope, "No default value"_s); > } > > JSValue JSObject::defaultValue(const JSObject* object, ExecState* exec, PreferredPrimitiveType hint) >@@ -2183,7 +2183,7 @@ bool JSObject::defaultHasInstance(ExecState* exec, JSValue value, JSValue proto) > return false; > > if (!proto.isObject()) { >- throwTypeError(exec, scope, ASCIILiteral("instanceof called on an object with an invalid prototype property.")); >+ throwTypeError(exec, scope, "instanceof called on an object with an invalid prototype property."_s); > return false; > } > >@@ -2522,7 +2522,7 @@ bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const P > if (result.isNewEntry) { > if (!isStructureExtensible(vm)) { > map->remove(result.iterator); >- return typeError(exec, scope, throwException, ASCIILiteral(NonExtensibleObjectPropertyDefineError)); >+ return typeError(exec, scope, throwException, NonExtensibleObjectPropertyDefineError); > } > > // 4.a. If IsGenericDescriptor(Desc) or IsDataDescriptor(Desc) is true, then create an own data property >@@ -2560,10 +2560,10 @@ bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const P > if (!current.configurable()) { > // 7.a. Reject, if the [[Configurable]] field of Desc is true. > if (descriptor.configurablePresent() && descriptor.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeConfigurabilityError); > // 7.b. Reject, if the [[Enumerable]] field of Desc is present and the [[Enumerable]] fields of current and Desc are the Boolean negation of each other. > if (descriptor.enumerablePresent() && current.enumerable() != descriptor.enumerable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeEnumerabilityError); > } > > // 8. If IsGenericDescriptor(Desc) is true, then no further validation is required. >@@ -2572,7 +2572,7 @@ bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const P > if (current.isDataDescriptor() != descriptor.isDataDescriptor()) { > // 9.a. Reject, if the [[Configurable]] field of current is false. > if (!current.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeAccessMechanismError); > // 9.b. If IsDataDescriptor(current) is true, then convert the property named P of object O from a > // data property to an accessor property. Preserve the existing values of the converted property's > // [[Configurable]] and [[Enumerable]] attributes and set the rest of the property's attributes to >@@ -2586,11 +2586,11 @@ bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const P > if (!current.configurable() && !current.writable()) { > // 10.a.i. Reject, if the [[Writable]] field of current is false and the [[Writable]] field of Desc is true. > if (descriptor.writable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeWritabilityError); > // 10.a.ii. If the [[Writable]] field of current is false, then > // 10.a.ii.1. Reject, if the [[Value]] field of Desc is present and SameValue(Desc.[[Value]], current.[[Value]]) is false. > if (descriptor.value() && !sameValue(exec, descriptor.value(), current.value())) >- return typeError(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError)); >+ return typeError(exec, scope, throwException, ReadonlyPropertyChangeError); > } > // 10.b. else, the [[Configurable]] field of current is true, so any change is acceptable. > } else { >@@ -2599,10 +2599,10 @@ bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const P > if (!current.configurable()) { > // 11.i. Reject, if the [[Set]] field of Desc is present and SameValue(Desc.[[Set]], current.[[Set]]) is false. > if (descriptor.setterPresent() && descriptor.setter() != current.setter()) >- return typeError(exec, scope, throwException, ASCIILiteral("Attempting to change the setter of an unconfigurable property.")); >+ return typeError(exec, scope, throwException, "Attempting to change the setter of an unconfigurable property."_s); > // 11.ii. Reject, if the [[Get]] field of Desc is present and SameValue(Desc.[[Get]], current.[[Get]]) is false. > if (descriptor.getterPresent() && descriptor.getter() != current.getter()) >- return typeError(exec, scope, throwException, ASCIILiteral("Attempting to change the getter of an unconfigurable property.")); >+ return typeError(exec, scope, throwException, "Attempting to change the getter of an unconfigurable property."_s); > } > } > } >@@ -2774,7 +2774,7 @@ bool JSObject::putByIndexBeyondVectorLengthWithArrayStorage(ExecState* exec, uns > if (i >= length) { > // Prohibit growing the array if length is not writable. > if (map->lengthIsReadOnly() || !isStructureExtensible(vm)) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > length = i + 1; > storage->setLength(length); > } >@@ -2916,9 +2916,9 @@ bool JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage(ExecState* exec, > if (mode != PutDirectIndexLikePutDirect) { > // Prohibit growing the array if length is not writable. > if (map->lengthIsReadOnly()) >- return typeError(exec, scope, mode == PutDirectIndexShouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, mode == PutDirectIndexShouldThrow, ReadonlyPropertyWriteError); > if (!isStructureExtensible(vm)) >- return typeError(exec, scope, mode == PutDirectIndexShouldThrow, ASCIILiteral(NonExtensibleObjectPropertyDefineError)); >+ return typeError(exec, scope, mode == PutDirectIndexShouldThrow, NonExtensibleObjectPropertyDefineError); > } > length = i + 1; > storage->setLength(length); >@@ -3455,7 +3455,7 @@ bool validateAndApplyPropertyDescriptor(ExecState* exec, JSObject* object, Prope > // unless extensions are prevented! > // Step 2.a > if (!isExtensible) >- return typeError(exec, scope, throwException, ASCIILiteral(NonExtensibleObjectPropertyDefineError)); >+ return typeError(exec, scope, throwException, NonExtensibleObjectPropertyDefineError); > if (!object) > return true; > // Step 2.c/d >@@ -3477,9 +3477,9 @@ bool validateAndApplyPropertyDescriptor(ExecState* exec, JSObject* object, Prope > // Filter out invalid changes > if (!current.configurable()) { > if (descriptor.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeConfigurabilityError); > if (descriptor.enumerablePresent() && descriptor.enumerable() != current.enumerable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeEnumerabilityError); > } > > // Step 6. >@@ -3497,7 +3497,7 @@ bool validateAndApplyPropertyDescriptor(ExecState* exec, JSObject* object, Prope > // Changing between a normal property or an accessor property > if (descriptor.isDataDescriptor() != current.isDataDescriptor()) { > if (!current.configurable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeAccessMechanismError); > > if (!object) > return true; >@@ -3512,10 +3512,10 @@ bool validateAndApplyPropertyDescriptor(ExecState* exec, JSObject* object, Prope > if (descriptor.isDataDescriptor()) { > if (!current.configurable()) { > if (!current.writable() && descriptor.writable()) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeWritabilityError); > if (!current.writable()) { > if (descriptor.value() && !sameValue(exec, current.value(), descriptor.value())) >- return typeError(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError)); >+ return typeError(exec, scope, throwException, ReadonlyPropertyChangeError); > } > } > if (current.attributesEqual(descriptor) && !descriptor.value()) >@@ -3532,11 +3532,11 @@ bool validateAndApplyPropertyDescriptor(ExecState* exec, JSObject* object, Prope > ASSERT(descriptor.isAccessorDescriptor()); > if (!current.configurable()) { > if (descriptor.setterPresent() && !(current.setterPresent() && JSValue::strictEqual(exec, current.setter(), descriptor.setter()))) >- return typeError(exec, scope, throwException, ASCIILiteral("Attempting to change the setter of an unconfigurable property.")); >+ return typeError(exec, scope, throwException, "Attempting to change the setter of an unconfigurable property."_s); > if (descriptor.getterPresent() && !(current.getterPresent() && JSValue::strictEqual(exec, current.getter(), descriptor.getter()))) >- return typeError(exec, scope, throwException, ASCIILiteral("Attempting to change the getter of an unconfigurable property.")); >+ return typeError(exec, scope, throwException, "Attempting to change the getter of an unconfigurable property."_s); > if (current.attributes() & PropertyAttribute::CustomAccessor) >- return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, throwException, UnconfigurablePropertyChangeAccessMechanismError); > } > > // Step 10/11. >diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h >index 88bb6e0b3efd2f5652b8d605c0559b9c4294adb7..6d9fa4524a361d87e93666ebfd836e9b34500078 100644 >--- a/Source/JavaScriptCore/runtime/JSObject.h >+++ b/Source/JavaScriptCore/runtime/JSObject.h >@@ -71,14 +71,14 @@ struct HashTable; > struct HashTableValue; > > JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, ThrowScope&, const String&); >-extern JS_EXPORT_PRIVATE const char* const NonExtensibleObjectPropertyDefineError; >-extern JS_EXPORT_PRIVATE const char* const ReadonlyPropertyWriteError; >-extern JS_EXPORT_PRIVATE const char* const ReadonlyPropertyChangeError; >-extern JS_EXPORT_PRIVATE const char* const UnableToDeletePropertyError; >-extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeAccessMechanismError; >-extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeConfigurabilityError; >-extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeEnumerabilityError; >-extern JS_EXPORT_PRIVATE const char* const UnconfigurablePropertyChangeWritabilityError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral NonExtensibleObjectPropertyDefineError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral ReadonlyPropertyWriteError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral ReadonlyPropertyChangeError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral UnableToDeletePropertyError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral UnconfigurablePropertyChangeAccessMechanismError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral UnconfigurablePropertyChangeConfigurabilityError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral UnconfigurablePropertyChangeEnumerabilityError; >+extern JS_EXPORT_PRIVATE const ASCIILiteral UnconfigurablePropertyChangeWritabilityError; > > COMPILE_ASSERT(PropertyAttribute::None < FirstInternalAttribute, None_is_below_FirstInternalAttribute); > COMPILE_ASSERT(PropertyAttribute::ReadOnly < FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute); >diff --git a/Source/JavaScriptCore/runtime/JSObjectInlines.h b/Source/JavaScriptCore/runtime/JSObjectInlines.h >index 5e93e26d42184c4ad2341aed96d265fda0a5d93e..c2299a12f82242eb996275116461e4bc92dae9c6 100644 >--- a/Source/JavaScriptCore/runtime/JSObjectInlines.h >+++ b/Source/JavaScriptCore/runtime/JSObjectInlines.h >@@ -237,7 +237,7 @@ ALWAYS_INLINE bool JSObject::putInlineForJSObject(JSCell* cell, ExecState* exec, > if (thisObject->canPerformFastPutInline(vm, propertyName)) { > ASSERT(!thisObject->prototypeChainMayInterceptStoreTo(vm, propertyName)); > if (!thisObject->putDirectInternal<PutModePut>(vm, propertyName, value, 0, slot)) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > return true; > } > >diff --git a/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp b/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >index c5c512bd5d229222417193464d5e1e3a82ef3982..250fc6873cb31883c662ad13751df86cfd74b9d4 100644 >--- a/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >@@ -89,7 +89,7 @@ JSPromiseConstructor::JSPromiseConstructor(VM& vm, Structure* structure, NativeF > > void JSPromiseConstructor::finishCreation(VM& vm, JSPromisePrototype* promisePrototype, GetterSetter* speciesSymbol) > { >- Base::finishCreation(vm, ASCIILiteral("Promise")); >+ Base::finishCreation(vm, "Promise"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); > putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); >diff --git a/Source/JavaScriptCore/runtime/JSSet.cpp b/Source/JavaScriptCore/runtime/JSSet.cpp >index 72cf5cb54de0982bc9d1120842906e5b7e0936ee..d44cc230318858a3af50d856e82bca083741b8b5 100644 >--- a/Source/JavaScriptCore/runtime/JSSet.cpp >+++ b/Source/JavaScriptCore/runtime/JSSet.cpp >@@ -35,7 +35,7 @@ const ClassInfo JSSet::s_info = { "Set", &Base::s_info, nullptr, nullptr, CREATE > > String JSSet::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > JSSet* JSSet::clone(ExecState* exec, VM& vm, Structure* structure) >diff --git a/Source/JavaScriptCore/runtime/JSSymbolTableObject.h b/Source/JavaScriptCore/runtime/JSSymbolTableObject.h >index 5e7ae788d90508b8f83f4d5b051716bf99ea9fc5..0e8644eaea236c98d7e85de8ddaecea5b2321396 100644 >--- a/Source/JavaScriptCore/runtime/JSSymbolTableObject.h >+++ b/Source/JavaScriptCore/runtime/JSSymbolTableObject.h >@@ -183,7 +183,7 @@ inline bool symbolTablePut(SymbolTableObjectType* object, ExecState* exec, Prope > ASSERT(!fastEntry.isNull()); > if (fastEntry.isReadOnly() && !ignoreReadOnlyErrors) { > if (shouldThrowReadOnlyError) >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > putResult = false; > return true; > } >diff --git a/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp b/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp >index 2c805f5e4d6f22b278f8847186c90a09ed1d4638..86a41893363be389f1406764ceb5f2440bc2d091 100644 >--- a/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp >@@ -69,7 +69,7 @@ static EncodedJSValue JSC_HOST_CALL constructTypedArrayView(ExecState* exec) > { > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- return throwVMTypeError(exec, scope, ASCIILiteral("%TypedArray% should not be called directly")); >+ return throwVMTypeError(exec, scope, "%TypedArray% should not be called directly"_s); > } > > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp b/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp >index d7aa2cb8dd42fba7cfc1925c2ccaeafe3891dfe3..9dd874413e24a8cbb3bf27d55594294eca901f53 100644 >--- a/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp >@@ -60,7 +60,7 @@ namespace JSC { > case NotTypedArray: \ > case TypeDataView: \ > return throwVMTypeError(exec, scope, \ >- ASCIILiteral("Receiver should be a typed array view")); \ >+ "Receiver should be a typed array view"_s); \ > } \ > RELEASE_ASSERT_NOT_REACHED(); \ > } while (false) >@@ -77,12 +77,12 @@ EncodedJSValue JSC_HOST_CALL typedArrayViewPrivateFuncLength(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue argument = exec->argument(0); > if (!argument.isCell() || !isTypedView(argument.asCell()->classInfo(vm)->typedArrayStorageType)) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view"_s); > > JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(argument); > > if (thisObject->isNeutered()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Underlying ArrayBuffer has been detached from the view")); >+ return throwVMTypeError(exec, scope, "Underlying ArrayBuffer has been detached from the view"_s); > > return JSValue::encode(jsNumber(thisObject->length())); > } >@@ -111,7 +111,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncSet(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (UNLIKELY(!thisValue.isObject())) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncSet); > } >@@ -122,7 +122,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncCopyWithin(ExecState* > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncCopyWithin); > } >@@ -144,7 +144,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncLastIndexOf(ExecState > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncLastIndexOf); > } >@@ -155,7 +155,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncIndexOf(ExecState* ex > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncIndexOf); > } >@@ -166,7 +166,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncJoin(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncJoin); > } >@@ -177,7 +177,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoGetterFuncBuffer(ExecStat > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncBuffer); > } >@@ -188,7 +188,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoGetterFuncLength(ExecStat > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncLength); > } >@@ -199,7 +199,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoGetterFuncByteLength(Exec > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncByteLength); > } >@@ -210,7 +210,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoGetterFuncByteOffset(Exec > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncByteOffset); > } >@@ -221,7 +221,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncReverse(ExecState* ex > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncReverse); > } >@@ -232,7 +232,7 @@ EncodedJSValue JSC_HOST_CALL typedArrayViewPrivateFuncSubarrayCreate(ExecState* > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewPrivateFuncSubarrayCreate); > } >@@ -243,7 +243,7 @@ static EncodedJSValue JSC_HOST_CALL typedArrayViewProtoFuncSlice(ExecState* exec > auto scope = DECLARE_THROW_SCOPE(vm); > JSValue thisValue = exec->thisValue(); > if (!thisValue.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Receiver should be a typed array view but was not an object")); >+ return throwVMTypeError(exec, scope, "Receiver should be a typed array view but was not an object"_s); > scope.release(); > CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncSlice); > } >@@ -325,7 +325,7 @@ void JSTypedArrayViewPrototype::finishCreation(VM& vm, JSGlobalObject* globalObj > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->subarray, typedArrayPrototypeSubarrayCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum)); > >- JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("get [Symbol.toStringTag]"), typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic); >+ JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, "get [Symbol.toStringTag]"_s, typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic); > GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject, toStringTagFunction, nullptr); > putDirectNonIndexAccessor(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::Accessor); > >diff --git a/Source/JavaScriptCore/runtime/JSWeakMap.cpp b/Source/JavaScriptCore/runtime/JSWeakMap.cpp >index 576a2fe8eaec962bd626769c7808140708e63a6b..52336ad80860de91dd1c58bedd1b4059079c00dd 100644 >--- a/Source/JavaScriptCore/runtime/JSWeakMap.cpp >+++ b/Source/JavaScriptCore/runtime/JSWeakMap.cpp >@@ -34,7 +34,7 @@ const ClassInfo JSWeakMap::s_info = { "WeakMap", &Base::s_info, nullptr, nullptr > > String JSWeakMap::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > } >diff --git a/Source/JavaScriptCore/runtime/JSWeakSet.cpp b/Source/JavaScriptCore/runtime/JSWeakSet.cpp >index af71db0d6fdbe54ad51f11e4c9fd257b566dc162..67d44b0c51aa845c2385568a05d4be2893b4029c 100644 >--- a/Source/JavaScriptCore/runtime/JSWeakSet.cpp >+++ b/Source/JavaScriptCore/runtime/JSWeakSet.cpp >@@ -34,7 +34,7 @@ const ClassInfo JSWeakSet::s_info = { "WeakSet", &Base::s_info, nullptr, nullptr > > String JSWeakSet::toStringName(const JSC::JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > } >diff --git a/Source/JavaScriptCore/runtime/LiteralParser.cpp b/Source/JavaScriptCore/runtime/LiteralParser.cpp >index dd02aab84417a56a91cfeca808554abdffb3f72e..f57a2b628a393bba2fa6617dc2e26784ef067ed9 100644 >--- a/Source/JavaScriptCore/runtime/LiteralParser.cpp >+++ b/Source/JavaScriptCore/runtime/LiteralParser.cpp >@@ -457,7 +457,7 @@ ALWAYS_INLINE TokenType LiteralParser<CharType>::Lexer::lex(LiteralParserToken<C > switch (tokenType) { > case TokString: > if (character == '\'' && m_mode == StrictJSON) { >- m_lexErrorMessage = ASCIILiteral("Single quotes (\') are not allowed in JSON"); >+ m_lexErrorMessage = "Single quotes (\') are not allowed in JSON"_s; > return TokError; > } > return lexString(token, character); >@@ -629,7 +629,7 @@ TokenType LiteralParser<CharType>::Lexer::lexStringSlow(LiteralParserToken<CharT > m_builder.append(runStart, m_ptr - runStart); > ++m_ptr; > if (m_ptr >= m_end) { >- m_lexErrorMessage = ASCIILiteral("Unterminated string"); >+ m_lexErrorMessage = "Unterminated string"_s; > return TokError; > } > switch (*m_ptr) { >@@ -668,7 +668,7 @@ TokenType LiteralParser<CharType>::Lexer::lexStringSlow(LiteralParserToken<CharT > > case 'u': > if ((m_end - m_ptr) < 5) { >- m_lexErrorMessage = ASCIILiteral("\\u must be followed by 4 hex digits"); >+ m_lexErrorMessage = "\\u must be followed by 4 hex digits"_s; > return TokError; > } // uNNNN == 5 characters > for (int i = 1; i < 5; i++) { >@@ -694,7 +694,7 @@ TokenType LiteralParser<CharType>::Lexer::lexStringSlow(LiteralParserToken<CharT > } while ((m_mode != NonStrictJSON) && m_ptr != runStart && (m_ptr < m_end) && *m_ptr != terminator); > > if (m_ptr >= m_end || *m_ptr != terminator) { >- m_lexErrorMessage = ASCIILiteral("Unterminated string"); >+ m_lexErrorMessage = "Unterminated string"_s; > return TokError; > } > >@@ -745,7 +745,7 @@ TokenType LiteralParser<CharType>::Lexer::lexNumber(LiteralParserToken<CharType> > while (m_ptr < m_end && isASCIIDigit(*m_ptr)) > ++m_ptr; > } else { >- m_lexErrorMessage = ASCIILiteral("Invalid number"); >+ m_lexErrorMessage = "Invalid number"_s; > return TokError; > } > >@@ -755,7 +755,7 @@ TokenType LiteralParser<CharType>::Lexer::lexNumber(LiteralParserToken<CharType> > ++m_ptr; > // [0-9]+ > if (m_ptr >= m_end || !isASCIIDigit(*m_ptr)) { >- m_lexErrorMessage = ASCIILiteral("Invalid digits after decimal point"); >+ m_lexErrorMessage = "Invalid digits after decimal point"_s; > return TokError; > } > >@@ -798,7 +798,7 @@ TokenType LiteralParser<CharType>::Lexer::lexNumber(LiteralParserToken<CharType> > > // [0-9]+ > if (m_ptr >= m_end || !isASCIIDigit(*m_ptr)) { >- m_lexErrorMessage = ASCIILiteral("Exponent symbols should be followed by an optional '+' or '-' and then by at least one number"); >+ m_lexErrorMessage = "Exponent symbols should be followed by an optional '+' or '-' and then by at least one number"_s; > return TokError; > } > >@@ -839,7 +839,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > TokenType lastToken = m_lexer.currentToken()->type; > if (m_lexer.next() == TokRBracket) { > if (lastToken == TokComma) { >- m_parseErrorMessage = ASCIILiteral("Unexpected comma at the end of array expression"); >+ m_parseErrorMessage = "Unexpected comma at the end of array expression"_s; > return JSValue(); > } > m_lexer.next(); >@@ -859,7 +859,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > goto doParseArrayStartExpression; > > if (m_lexer.currentToken()->type != TokRBracket) { >- m_parseErrorMessage = ASCIILiteral("Expected ']'"); >+ m_parseErrorMessage = "Expected ']'"_s; > return JSValue(); > } > >@@ -882,7 +882,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > > // Check for colon > if (m_lexer.next() != TokColon) { >- m_parseErrorMessage = ASCIILiteral("Expected ':' before value in object property definition"); >+ m_parseErrorMessage = "Expected ':' before value in object property definition"_s; > return JSValue(); > } > >@@ -891,7 +891,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > goto startParseExpression; > } > if (type != TokRBrace) { >- m_parseErrorMessage = ASCIILiteral("Expected '}'"); >+ m_parseErrorMessage = "Expected '}'"_s; > return JSValue(); > } > m_lexer.next(); >@@ -902,7 +902,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > case DoParseObjectStartExpression: { > TokenType type = m_lexer.next(); > if (type != TokString && (m_mode == StrictJSON || type != TokIdentifier)) { >- m_parseErrorMessage = ASCIILiteral("Property name must be a string literal"); >+ m_parseErrorMessage = "Property name must be a string literal"_s; > return JSValue(); > } > typename Lexer::LiteralParserTokenPtr identifierToken = m_lexer.currentToken(); >@@ -913,7 +913,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > > // Check for colon > if (m_lexer.next() != TokColon) { >- m_parseErrorMessage = ASCIILiteral("Expected ':'"); >+ m_parseErrorMessage = "Expected ':'"_s; > return JSValue(); > } > >@@ -927,7 +927,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > Identifier ident = identifierStack.takeLast(); > if (m_mode != StrictJSON && ident == vm.propertyNames->underscoreProto) { > if (!visitedUnderscoreProto.add(object).isNewEntry) { >- m_parseErrorMessage = ASCIILiteral("Attempted to redefine __proto__ property"); >+ m_parseErrorMessage = "Attempted to redefine __proto__ property"_s; > return JSValue(); > } > CodeBlock* codeBlock = m_exec->codeBlock(); >@@ -943,7 +943,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > if (m_lexer.currentToken()->type == TokComma) > goto doParseObjectStartExpression; > if (m_lexer.currentToken()->type != TokRBrace) { >- m_parseErrorMessage = ASCIILiteral("Expected '}'"); >+ m_parseErrorMessage = "Expected '}'"_s; > return JSValue(); > } > m_lexer.next(); >@@ -987,10 +987,10 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > lastValue = jsBoolean(false); > break; > case TokRBracket: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ']'"); >+ m_parseErrorMessage = "Unexpected token ']'"_s; > return JSValue(); > case TokRBrace: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '}'"); >+ m_parseErrorMessage = "Unexpected token '}'"_s; > return JSValue(); > case TokIdentifier: { > typename Lexer::LiteralParserTokenPtr token = m_lexer.currentToken(); >@@ -1001,33 +1001,33 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > return JSValue(); > } > case TokColon: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ':'"); >+ m_parseErrorMessage = "Unexpected token ':'"_s; > return JSValue(); > case TokLParen: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '('"); >+ m_parseErrorMessage = "Unexpected token '('"_s; > return JSValue(); > case TokRParen: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ')'"); >+ m_parseErrorMessage = "Unexpected token ')'"_s; > return JSValue(); > case TokComma: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ','"); >+ m_parseErrorMessage = "Unexpected token ','"_s; > return JSValue(); > case TokDot: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '.'"); >+ m_parseErrorMessage = "Unexpected token '.'"_s; > return JSValue(); > case TokAssign: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '='"); >+ m_parseErrorMessage = "Unexpected token '='"_s; > return JSValue(); > case TokSemi: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ';'"); >+ m_parseErrorMessage = "Unexpected token ';'"_s; > return JSValue(); > case TokEnd: >- m_parseErrorMessage = ASCIILiteral("Unexpected EOF"); >+ m_parseErrorMessage = "Unexpected EOF"_s; > return JSValue(); > case TokError: > default: > // Error >- m_parseErrorMessage = ASCIILiteral("Could not parse value expression"); >+ m_parseErrorMessage = "Could not parse value expression"_s; > return JSValue(); > } > break; >@@ -1045,50 +1045,50 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > goto startParseExpression; > } > case TokRBracket: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ']'"); >+ m_parseErrorMessage = "Unexpected token ']'"_s; > return JSValue(); > case TokLBrace: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '{'"); >+ m_parseErrorMessage = "Unexpected token '{'"_s; > return JSValue(); > case TokRBrace: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '}'"); >+ m_parseErrorMessage = "Unexpected token '}'"_s; > return JSValue(); > case TokIdentifier: >- m_parseErrorMessage = ASCIILiteral("Unexpected identifier"); >+ m_parseErrorMessage = "Unexpected identifier"_s; > return JSValue(); > case TokColon: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ':'"); >+ m_parseErrorMessage = "Unexpected token ':'"_s; > return JSValue(); > case TokRParen: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ')'"); >+ m_parseErrorMessage = "Unexpected token ')'"_s; > return JSValue(); > case TokComma: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ','"); >+ m_parseErrorMessage = "Unexpected token ','"_s; > return JSValue(); > case TokTrue: >- m_parseErrorMessage = ASCIILiteral("Unexpected token 'true'"); >+ m_parseErrorMessage = "Unexpected token 'true'"_s; > return JSValue(); > case TokFalse: >- m_parseErrorMessage = ASCIILiteral("Unexpected token 'false'"); >+ m_parseErrorMessage = "Unexpected token 'false'"_s; > return JSValue(); > case TokNull: >- m_parseErrorMessage = ASCIILiteral("Unexpected token 'null'"); >+ m_parseErrorMessage = "Unexpected token 'null'"_s; > return JSValue(); > case TokEnd: >- m_parseErrorMessage = ASCIILiteral("Unexpected EOF"); >+ m_parseErrorMessage = "Unexpected EOF"_s; > return JSValue(); > case TokDot: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '.'"); >+ m_parseErrorMessage = "Unexpected token '.'"_s; > return JSValue(); > case TokAssign: >- m_parseErrorMessage = ASCIILiteral("Unexpected token '='"); >+ m_parseErrorMessage = "Unexpected token '='"_s; > return JSValue(); > case TokSemi: >- m_parseErrorMessage = ASCIILiteral("Unexpected token ';'"); >+ m_parseErrorMessage = "Unexpected token ';'"_s; > return JSValue(); > case TokError: > default: >- m_parseErrorMessage = ASCIILiteral("Could not parse statement"); >+ m_parseErrorMessage = "Could not parse statement"_s; > return JSValue(); > } > } >@@ -1098,7 +1098,7 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState) > return JSValue(); > if (m_lexer.next() == TokEnd) > return lastValue; >- m_parseErrorMessage = ASCIILiteral("Unexpected content at end of JSON literal"); >+ m_parseErrorMessage = "Unexpected content at end of JSON literal"_s; > return JSValue(); > } > default: >diff --git a/Source/JavaScriptCore/runtime/LiteralParser.h b/Source/JavaScriptCore/runtime/LiteralParser.h >index 1f0fbaf1fe46a5fa332079ce194e9f8124b40cf9..7c9a6d548c40fbd4d38876a3979ebafe46f5f675 100644 >--- a/Source/JavaScriptCore/runtime/LiteralParser.h >+++ b/Source/JavaScriptCore/runtime/LiteralParser.h >@@ -105,7 +105,7 @@ class LiteralParser { > return String::format("JSON Parse error: %s", m_lexer.getErrorMessage().ascii().data()); > if (!m_parseErrorMessage.isEmpty()) > return String::format("JSON Parse error: %s", m_parseErrorMessage.ascii().data()); >- return ASCIILiteral("JSON Parse error: Unable to parse JSON string"); >+ return "JSON Parse error: Unable to parse JSON string"_s; > } > > JSValue tryLiteralParse() >diff --git a/Source/JavaScriptCore/runtime/Lookup.cpp b/Source/JavaScriptCore/runtime/Lookup.cpp >index 305f34ea0bc63162593e5d527812b68e9890d977..b655c53c9ca4c3714643efd1ca645f01a7e16ea7 100644 >--- a/Source/JavaScriptCore/runtime/Lookup.cpp >+++ b/Source/JavaScriptCore/runtime/Lookup.cpp >@@ -34,7 +34,7 @@ void reifyStaticAccessor(VM& vm, const HashTableValue& value, JSObject& thisObje > if (value.attributes() & PropertyAttribute::Builtin) > getter = JSFunction::create(vm, value.builtinAccessorGetterGenerator()(vm), globalObject); > else { >- String getterName = tryMakeString(ASCIILiteral("get "), String(*propertyName.publicName())); >+ String getterName = tryMakeString("get "_s, String(*propertyName.publicName())); > if (!getterName) > return; > getter = JSFunction::create(vm, globalObject, 0, getterName, value.accessorGetter()); >diff --git a/Source/JavaScriptCore/runtime/Lookup.h b/Source/JavaScriptCore/runtime/Lookup.h >index 890a16b92d75e840ef989ba8daeaddc9a3b173d3..c4903fab5ca79ce822c9a5ce27b1581685206720 100644 >--- a/Source/JavaScriptCore/runtime/Lookup.h >+++ b/Source/JavaScriptCore/runtime/Lookup.h >@@ -279,11 +279,11 @@ inline bool putEntry(ExecState* exec, const ClassInfo*, const HashTableValue* en > thisObject->putDirect(vm, propertyName, value); > return true; > } >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > > if (entry->attributes() & PropertyAttribute::Accessor) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > > if (!(entry->attributes() & PropertyAttribute::ReadOnly)) { > ASSERT_WITH_MESSAGE(!(entry->attributes() & PropertyAttribute::DOMJITAttribute), "DOMJITAttribute supports readonly attributes currently."); >@@ -300,7 +300,7 @@ inline bool putEntry(ExecState* exec, const ClassInfo*, const HashTableValue* en > return result; > } > >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > } > > /** >diff --git a/Source/JavaScriptCore/runtime/MapPrototype.cpp b/Source/JavaScriptCore/runtime/MapPrototype.cpp >index 53568b7a3aae4b126cce339d32d0470eea76a183..8bf05a5618a4b925ab678b609f8fe7615514824b 100644 >--- a/Source/JavaScriptCore/runtime/MapPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/MapPrototype.cpp >@@ -92,7 +92,7 @@ ALWAYS_INLINE static JSMap* getMap(CallFrame* callFrame, JSValue thisValue) > auto* map = jsDynamicCast<JSMap*>(vm, thisValue.asCell()); > if (LIKELY(map)) > return map; >- throwTypeError(callFrame, scope, ASCIILiteral("Map operation called on non-Map object")); >+ throwTypeError(callFrame, scope, "Map operation called on non-Map object"_s); > return nullptr; > } > >diff --git a/Source/JavaScriptCore/runtime/NullSetterFunction.cpp b/Source/JavaScriptCore/runtime/NullSetterFunction.cpp >index cdd112ebbf1eb5a5918c9657317cd7dbda746c47..56d53cc4aa676bf73dfc1e0ee6f4f3a627187033 100644 >--- a/Source/JavaScriptCore/runtime/NullSetterFunction.cpp >+++ b/Source/JavaScriptCore/runtime/NullSetterFunction.cpp >@@ -77,7 +77,7 @@ static EncodedJSValue JSC_HOST_CALL callReturnUndefined(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (callerIsStrict(exec)) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Setting a property that has only a getter"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Setting a property that has only a getter"_s)); > return JSValue::encode(jsUndefined()); > } > } >diff --git a/Source/JavaScriptCore/runtime/NumberPrototype.cpp b/Source/JavaScriptCore/runtime/NumberPrototype.cpp >index 696668c8e561ced586158d94e602b105667b98f3..b46f8ac7ea32097d914620bbd6014df0d1b19e07 100644 >--- a/Source/JavaScriptCore/runtime/NumberPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/NumberPrototype.cpp >@@ -421,7 +421,7 @@ EncodedJSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec) > return JSValue::encode(jsNontrivialString(exec, String::numberToStringECMAScript(x))); > > if (!inRange) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toExponential() argument must be between 0 and 20"))); >+ return throwVMError(exec, scope, createRangeError(exec, "toExponential() argument must be between 0 and 20"_s)); > > // Round if the argument is not undefined, always format as exponential. > char buffer[WTF::NumberToStringBufferLength]; >@@ -453,7 +453,7 @@ EncodedJSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec) > bool inRange = getIntegerArgumentInRange(exec, 0, 20, decimalPlaces, isUndefined); > RETURN_IF_EXCEPTION(scope, { }); > if (!inRange) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toFixed() argument must be between 0 and 20"))); >+ return throwVMError(exec, scope, createRangeError(exec, "toFixed() argument must be between 0 and 20"_s)); > > // 15.7.4.5.7 states "If x >= 10^21, then let m = ToString(x)" > // This also covers Ininity, and structure the check so that NaN >@@ -500,7 +500,7 @@ EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec) > return JSValue::encode(jsNontrivialString(exec, String::numberToStringECMAScript(x))); > > if (!inRange) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("toPrecision() argument must be between 1 and 21"))); >+ return throwVMError(exec, scope, createRangeError(exec, "toPrecision() argument must be between 1 and 21"_s)); > > NumberToStringBuffer buffer; > return JSValue::encode(jsString(exec, String(numberToFixedPrecisionString(x, significantFigures, buffer)))); >@@ -629,7 +629,7 @@ int32_t extractToStringRadixArgument(ExecState* state, JSValue radixValue, Throw > return static_cast<int32_t>(radixDouble); > } > >- throwRangeError(state, throwScope, ASCIILiteral("toString() radix argument must be between 2 and 36")); >+ throwRangeError(state, throwScope, "toString() radix argument must be between 2 and 36"_s); > return 0; > } > >diff --git a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >index f55dc296e9acae5b8083f19eadaff636144153e4..cc085420624a05689b7432d4d44aaff47683469a 100644 >--- a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp >@@ -169,11 +169,11 @@ EncodedJSValue JSC_HOST_CALL objectConstructorSetPrototypeOf(ExecState* exec) > > JSValue objectValue = exec->argument(0); > if (objectValue.isUndefinedOrNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Cannot set prototype of undefined or null")); >+ return throwVMTypeError(exec, scope, "Cannot set prototype of undefined or null"_s); > > JSValue protoValue = exec->argument(1); > if (!protoValue.isObject() && !protoValue.isNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Prototype value can only be an object or null")); >+ return throwVMTypeError(exec, scope, "Prototype value can only be an object or null"_s); > > JSObject* object = objectValue.toObject(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -296,7 +296,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorAssign(ExecState* exec) > > JSValue targetValue = exec->argument(0); > if (targetValue.isUndefinedOrNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Object.assign requires that input parameter not be null or undefined")); >+ return throwVMTypeError(exec, scope, "Object.assign requires that input parameter not be null or undefined"_s); > JSObject* target = targetValue.toObject(exec); > RETURN_IF_EXCEPTION(scope, { }); > >@@ -423,7 +423,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorValues(ExecState* exec) > > JSValue targetValue = exec->argument(0); > if (targetValue.isUndefinedOrNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Object.values requires that input parameter not be null or undefined")); >+ return throwVMTypeError(exec, scope, "Object.values requires that input parameter not be null or undefined"_s); > JSObject* target = targetValue.toObject(exec); > RETURN_IF_EXCEPTION(scope, { }); > >@@ -475,7 +475,7 @@ bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!in.isObject()) { >- throwTypeError(exec, scope, ASCIILiteral("Property description must be an object.")); >+ throwTypeError(exec, scope, "Property description must be an object."_s); > return false; > } > JSObject* description = asObject(in); >@@ -525,7 +525,7 @@ bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc) > if (!get.isUndefined()) { > CallData callData; > if (getCallData(vm, get, callData) == CallType::None) { >- throwTypeError(exec, scope, ASCIILiteral("Getter must be a function.")); >+ throwTypeError(exec, scope, "Getter must be a function."_s); > return false; > } > } >@@ -541,7 +541,7 @@ bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc) > if (!set.isUndefined()) { > CallData callData; > if (getCallData(vm, set, callData) == CallType::None) { >- throwTypeError(exec, scope, ASCIILiteral("Setter must be a function.")); >+ throwTypeError(exec, scope, "Setter must be a function."_s); > return false; > } > } >@@ -553,12 +553,12 @@ bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc) > return true; > > if (desc.value()) { >- throwTypeError(exec, scope, ASCIILiteral("Invalid property. 'value' present on property with getter or setter.")); >+ throwTypeError(exec, scope, "Invalid property. 'value' present on property with getter or setter."_s); > return false; > } > > if (desc.writablePresent()) { >- throwTypeError(exec, scope, ASCIILiteral("Invalid property. 'writable' present on property with getter or setter.")); >+ throwTypeError(exec, scope, "Invalid property. 'writable' present on property with getter or setter."_s); > return false; > } > return true; >@@ -570,7 +570,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!exec->argument(0).isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Properties can only be defined on Objects.")); >+ return throwVMTypeError(exec, scope, "Properties can only be defined on Objects."_s); > JSObject* obj = asObject(exec->argument(0)); > auto propertyName = exec->argument(1).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -635,7 +635,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState* exec) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!exec->argument(0).isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Properties can only be defined on Objects.")); >+ return throwVMTypeError(exec, scope, "Properties can only be defined on Objects."_s); > JSObject* targetObj = asObject(exec->argument(0)); > JSObject* props = exec->argument(1).toObject(exec); > EXCEPTION_ASSERT(!!scope.exception() == !props); >@@ -652,14 +652,14 @@ EncodedJSValue JSC_HOST_CALL objectConstructorCreate(ExecState* exec) > > JSValue proto = exec->argument(0); > if (!proto.isObject() && !proto.isNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Object prototype may only be an Object or null.")); >+ return throwVMTypeError(exec, scope, "Object prototype may only be an Object or null."_s); > JSObject* newObject = proto.isObject() > ? constructEmptyObject(exec, asObject(proto)) > : constructEmptyObject(exec, exec->lexicalGlobalObject()->nullPrototypeObjectStructure()); > if (exec->argument(1).isUndefined()) > return JSValue::encode(newObject); > if (!exec->argument(1).isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Property descriptor list must be an Object.")); >+ return throwVMTypeError(exec, scope, "Property descriptor list must be an Object."_s); > scope.release(); > return JSValue::encode(defineProperties(exec, newObject, asObject(exec->argument(1)))); > } >@@ -778,7 +778,7 @@ EncodedJSValue JSC_HOST_CALL objectConstructorSeal(ExecState* exec) > bool success = setIntegrityLevel<IntegrityLevel::Sealed>(exec, vm, object); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (UNLIKELY(!success)) { >- throwTypeError(exec, scope, ASCIILiteral("Unable to prevent extension in Object.seal")); >+ throwTypeError(exec, scope, "Unable to prevent extension in Object.seal"_s); > return encodedJSValue(); > } > >@@ -798,7 +798,7 @@ JSObject* objectConstructorFreeze(ExecState* exec, JSObject* object) > bool success = setIntegrityLevel<IntegrityLevel::Frozen>(exec, vm, object); > RETURN_IF_EXCEPTION(scope, nullptr); > if (!success) >- return throwTypeError(exec, scope, ASCIILiteral("Unable to prevent extension in Object.freeze")); >+ return throwTypeError(exec, scope, "Unable to prevent extension in Object.freeze"_s); > return object; > } > >diff --git a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >index 08a3a05dd0dc5a3dc6b4aa4a7116949e50aa901f..18779f282fdb2e7d249e4f2b507ab3c6411e3d2a 100644 >--- a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp >@@ -155,7 +155,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineGetter(ExecState* exec) > JSValue get = exec->argument(1); > CallData callData; > if (getCallData(vm, get, callData) == CallType::None) >- return throwVMTypeError(exec, scope, ASCIILiteral("invalid getter usage")); >+ return throwVMTypeError(exec, scope, "invalid getter usage"_s); > > auto propertyName = exec->argument(0).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -183,7 +183,7 @@ EncodedJSValue JSC_HOST_CALL objectProtoFuncDefineSetter(ExecState* exec) > JSValue set = exec->argument(1); > CallData callData; > if (getCallData(vm, set, callData) == CallType::None) >- return throwVMTypeError(exec, scope, ASCIILiteral("invalid setter usage")); >+ return throwVMTypeError(exec, scope, "invalid setter usage"_s); > > auto propertyName = exec->argument(0).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >diff --git a/Source/JavaScriptCore/runtime/Operations.cpp b/Source/JavaScriptCore/runtime/Operations.cpp >index 03856fa721ab0278a9b073f27f7f5877cb66e463..1bc8101f01c55dee392ff20a1df49529c1d85a1a 100644 >--- a/Source/JavaScriptCore/runtime/Operations.cpp >+++ b/Source/JavaScriptCore/runtime/Operations.cpp >@@ -74,7 +74,7 @@ NEVER_INLINE JSValue jsAddSlowCase(CallFrame* callFrame, JSValue v1, JSValue v2) > if (WTF::holds_alternative<JSBigInt*>(leftNumeric) && WTF::holds_alternative<JSBigInt*>(rightNumeric)) > return JSBigInt::add(vm, WTF::get<JSBigInt*>(leftNumeric), WTF::get<JSBigInt*>(rightNumeric)); > >- return throwTypeError(callFrame, scope, ASCIILiteral("Invalid mix of BigInt and other type in addition.")); >+ return throwTypeError(callFrame, scope, "Invalid mix of BigInt and other type in addition."_s); > } > > return jsNumber(WTF::get<double>(leftNumeric) + WTF::get<double>(rightNumeric)); >diff --git a/Source/JavaScriptCore/runtime/Operations.h b/Source/JavaScriptCore/runtime/Operations.h >index 9263f6771f74b708a5dfc4b84292631b867b8356..0012b267c684df5fa34506d5faffc4fdc7a4e7fe 100644 >--- a/Source/JavaScriptCore/runtime/Operations.h >+++ b/Source/JavaScriptCore/runtime/Operations.h >@@ -362,7 +362,7 @@ ALWAYS_INLINE JSValue jsSub(ExecState* exec, JSValue v1, JSValue v2) > if (WTF::holds_alternative<JSBigInt*>(leftNumeric) && WTF::holds_alternative<JSBigInt*>(rightNumeric)) > return JSBigInt::sub(vm, WTF::get<JSBigInt*>(leftNumeric), WTF::get<JSBigInt*>(rightNumeric)); > >- return throwTypeError(exec, scope, ASCIILiteral("Invalid mix of BigInt and other type in subtraction.")); >+ return throwTypeError(exec, scope, "Invalid mix of BigInt and other type in subtraction."_s); > } > > return jsNumber(WTF::get<double>(leftNumeric) - WTF::get<double>(rightNumeric)); >@@ -382,7 +382,7 @@ ALWAYS_INLINE JSValue jsMul(ExecState* state, JSValue v1, JSValue v2) > if (WTF::holds_alternative<JSBigInt*>(leftNumeric) && WTF::holds_alternative<JSBigInt*>(rightNumeric)) > return JSBigInt::multiply(state, WTF::get<JSBigInt*>(leftNumeric), WTF::get<JSBigInt*>(rightNumeric)); > >- throwTypeError(state, scope, ASCIILiteral("Invalid mix of BigInt and other type in multiplication.")); >+ throwTypeError(state, scope, "Invalid mix of BigInt and other type in multiplication."_s); > return { }; > } > >diff --git a/Source/JavaScriptCore/runtime/ProgramExecutable.cpp b/Source/JavaScriptCore/runtime/ProgramExecutable.cpp >index 53a24615a17338bacf0276a638c341d11bab7476..925d94e43c320b03a524f0887a09e173cc102536 100644 >--- a/Source/JavaScriptCore/runtime/ProgramExecutable.cpp >+++ b/Source/JavaScriptCore/runtime/ProgramExecutable.cpp >@@ -108,7 +108,7 @@ JSObject* ProgramExecutable::initializeGlobalProperties(VM& vm, CallFrame* callF > while (nextPrototype && nextPrototype.isObject()) { > if (UNLIKELY(asObject(nextPrototype)->type() == ProxyObjectType)) { > ExecState* exec = globalObject->globalExec(); >- return createTypeError(exec, ASCIILiteral("Proxy is not allowed in the global prototype chain.")); >+ return createTypeError(exec, "Proxy is not allowed in the global prototype chain."_s); > } > nextPrototype = asObject(nextPrototype)->getPrototypeDirect(vm); > } >diff --git a/Source/JavaScriptCore/runtime/ProxyConstructor.cpp b/Source/JavaScriptCore/runtime/ProxyConstructor.cpp >index 58e12426a42b51611e832158e530168aba37df18..a27b978ccfbbe5065a42e369376a1ab093b821ab 100644 >--- a/Source/JavaScriptCore/runtime/ProxyConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/ProxyConstructor.cpp >@@ -61,7 +61,7 @@ static EncodedJSValue JSC_HOST_CALL makeRevocableProxy(ExecState* exec) > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > if (exec->argumentCount() < 2) >- return throwVMTypeError(exec, scope, ASCIILiteral("Proxy.revocable needs to be called with two arguments: the target and the handler")); >+ return throwVMTypeError(exec, scope, "Proxy.revocable needs to be called with two arguments: the target and the handler"_s); > > ArgList args(exec); > JSValue target = args.at(0); >@@ -82,7 +82,7 @@ static EncodedJSValue JSC_HOST_CALL makeRevocableProxy(ExecState* exec) > static EncodedJSValue JSC_HOST_CALL proxyRevocableConstructorThrowError(ExecState* exec) > { > auto scope = DECLARE_THROW_SCOPE(exec->vm()); >- return throwVMTypeError(exec, scope, ASCIILiteral("Proxy.revocable cannot be constructed. It can only be called")); >+ return throwVMTypeError(exec, scope, "Proxy.revocable cannot be constructed. It can only be called"_s); > } > > void ProxyConstructor::finishCreation(VM& vm, const char* name, JSGlobalObject* globalObject) >@@ -90,14 +90,14 @@ void ProxyConstructor::finishCreation(VM& vm, const char* name, JSGlobalObject* > Base::finishCreation(vm, name); > > putDirect(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); >- putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, ASCIILiteral("revocable"), makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError)); >+ putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, "revocable"_s, makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError)); > } > > static EncodedJSValue JSC_HOST_CALL constructProxyObject(ExecState* exec) > { > auto scope = DECLARE_THROW_SCOPE(exec->vm()); > if (exec->newTarget().isUndefined()) >- return throwVMTypeError(exec, scope, ASCIILiteral("new.target of Proxy construct should not be undefined")); >+ return throwVMTypeError(exec, scope, "new.target of Proxy construct should not be undefined"_s); > > ArgList args(exec); > JSValue target = args.at(0); >diff --git a/Source/JavaScriptCore/runtime/ProxyObject.cpp b/Source/JavaScriptCore/runtime/ProxyObject.cpp >index 5c3ee5eb85fcde790303afe0f0b13206c74b46d2..20c45c7a1ebe1b5fe1c303cfb9972c680dcc57b7 100644 >--- a/Source/JavaScriptCore/runtime/ProxyObject.cpp >+++ b/Source/JavaScriptCore/runtime/ProxyObject.cpp >@@ -68,7 +68,7 @@ String ProxyObject::toStringName(const JSObject* object, ExecState* exec) > > proxy = jsDynamicCast<const ProxyObject*>(vm, target); > } >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > Structure* ProxyObject::structureForTarget(JSGlobalObject* globalObject, JSValue target) >@@ -89,17 +89,17 @@ void ProxyObject::finishCreation(VM& vm, ExecState* exec, JSValue target, JSValu > Base::finishCreation(vm); > ASSERT(type() == ProxyObjectType); > if (!target.isObject()) { >- throwTypeError(exec, scope, ASCIILiteral("A Proxy's 'target' should be an Object")); >+ throwTypeError(exec, scope, "A Proxy's 'target' should be an Object"_s); > return; > } > if (ProxyObject* targetAsProxy = jsDynamicCast<ProxyObject*>(vm, target)) { > if (targetAsProxy->handler().isNull()) { >- throwTypeError(exec, scope, ASCIILiteral("If a Proxy's handler is another Proxy object, the other Proxy should not have been revoked")); >+ throwTypeError(exec, scope, "If a Proxy's handler is another Proxy object, the other Proxy should not have been revoked"_s); > return; > } > } > if (!handler.isObject()) { >- throwTypeError(exec, scope, ASCIILiteral("A Proxy's 'handler' should be an Object")); >+ throwTypeError(exec, scope, "A Proxy's 'handler' should be an Object"_s); > return; > } > >@@ -119,7 +119,7 @@ void ProxyObject::finishCreation(VM& vm, ExecState* exec, JSValue target, JSValu > m_handler.set(vm, this, handler); > } > >-static const char* s_proxyAlreadyRevokedErrorMessage = "Proxy has already been revoked. No more operations are allowed to be performed on it"; >+static const ASCIILiteral s_proxyAlreadyRevokedErrorMessage { "Proxy has already been revoked. No more operations are allowed to be performed on it"_s }; > > static JSValue performProxyGet(ExecState* exec, ProxyObject* proxyObject, JSValue receiver, PropertyName propertyName) > { >@@ -151,12 +151,12 @@ static JSValue performProxyGet(ExecState* exec, ProxyObject* proxyObject, JSValu > > JSValue handlerValue = proxyObject->handler(); > if (handlerValue.isNull()) >- return throwTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ return throwTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue getHandler = handler->getMethod(exec, callData, callType, vm.propertyNames->get, ASCIILiteral("'get' property of a Proxy's handler object should be callable")); >+ JSValue getHandler = handler->getMethod(exec, callData, callType, vm.propertyNames->get, "'get' property of a Proxy's handler object should be callable"_s); > RETURN_IF_EXCEPTION(scope, { }); > > if (getHandler.isUndefined()) >@@ -174,10 +174,10 @@ static JSValue performProxyGet(ExecState* exec, ProxyObject* proxyObject, JSValu > if (target->getOwnPropertyDescriptor(exec, propertyName, descriptor)) { > if (descriptor.isDataDescriptor() && !descriptor.configurable() && !descriptor.writable()) { > if (!sameValue(exec, descriptor.value(), trapResult)) >- return throwTypeError(exec, scope, ASCIILiteral("Proxy handler's 'get' result of a non-configurable and non-writable property should be the same value as the target's property")); >+ return throwTypeError(exec, scope, "Proxy handler's 'get' result of a non-configurable and non-writable property should be the same value as the target's property"_s); > } else if (descriptor.isAccessorDescriptor() && !descriptor.configurable() && descriptor.getter().isUndefined()) { > if (!trapResult.isUndefined()) >- return throwTypeError(exec, scope, ASCIILiteral("Proxy handler's 'get' result of a non-configurable accessor property without a getter should be undefined")); >+ return throwTypeError(exec, scope, "Proxy handler's 'get' result of a non-configurable accessor property without a getter should be undefined"_s); > } > } > >@@ -222,14 +222,14 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue getOwnPropertyDescriptorMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "getOwnPropertyDescriptor"), ASCIILiteral("'getOwnPropertyDescriptor' property of a Proxy's handler should be callable")); >+ JSValue getOwnPropertyDescriptorMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "getOwnPropertyDescriptor"), "'getOwnPropertyDescriptor' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > if (getOwnPropertyDescriptorMethod.isUndefined()) { > scope.release(); >@@ -244,7 +244,7 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN > RETURN_IF_EXCEPTION(scope, false); > > if (!trapResult.isUndefined() && !trapResult.isObject()) { >- throwVMTypeError(exec, scope, ASCIILiteral("result of 'getOwnPropertyDescriptor' call should either be an Object or undefined")); >+ throwVMTypeError(exec, scope, "result of 'getOwnPropertyDescriptor' call should either be an Object or undefined"_s); > return false; > } > >@@ -256,7 +256,7 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN > if (!isTargetPropertyDescriptorDefined) > return false; > if (!targetPropertyDescriptor.configurable()) { >- throwVMTypeError(exec, scope, ASCIILiteral("When the result of 'getOwnPropertyDescriptor' is undefined the target must be configurable")); >+ throwVMTypeError(exec, scope, "When the result of 'getOwnPropertyDescriptor' is undefined the target must be configurable"_s); > return false; > } > // FIXME: this doesn't work if 'target' is another Proxy. We don't have isExtensible implemented in a way that fits w/ Proxys. >@@ -267,7 +267,7 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN > // FIXME: Come up with a test for this error. I'm not sure how to because > // Object.seal(o) will make all fields [[Configurable]] false. > // https://bugs.webkit.org/show_bug.cgi?id=154376 >- throwVMTypeError(exec, scope, ASCIILiteral("When 'getOwnPropertyDescriptor' returns undefined, the 'target' of a Proxy should be extensible")); >+ throwVMTypeError(exec, scope, "When 'getOwnPropertyDescriptor' returns undefined, the 'target' of a Proxy should be extensible"_s); > return false; > } > >@@ -284,13 +284,13 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN > trapResultAsDescriptor, isTargetPropertyDescriptorDefined, targetPropertyDescriptor, throwException); > RETURN_IF_EXCEPTION(scope, false); > if (!valid) { >- throwVMTypeError(exec, scope, ASCIILiteral("Result from 'getOwnPropertyDescriptor' fails the IsCompatiblePropertyDescriptor test")); >+ throwVMTypeError(exec, scope, "Result from 'getOwnPropertyDescriptor' fails the IsCompatiblePropertyDescriptor test"_s); > return false; > } > > if (!trapResultAsDescriptor.configurable()) { > if (!isTargetPropertyDescriptorDefined || targetPropertyDescriptor.configurable()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Result from 'getOwnPropertyDescriptor' can't be non-configurable when the 'target' doesn't have it as an own property or if it is a configurable own property on 'target'")); >+ throwVMTypeError(exec, scope, "Result from 'getOwnPropertyDescriptor' can't be non-configurable when the 'target' doesn't have it as an own property or if it is a configurable own property on 'target'"_s); > return false; > } > } >@@ -331,14 +331,14 @@ bool ProxyObject::performHasProperty(ExecState* exec, PropertyName propertyName, > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue hasMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->has, ASCIILiteral("'has' property of a Proxy's handler should be callable")); >+ JSValue hasMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->has, "'has' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > if (hasMethod.isUndefined()) { > scope.release(); >@@ -361,13 +361,13 @@ bool ProxyObject::performHasProperty(ExecState* exec, PropertyName propertyName, > RETURN_IF_EXCEPTION(scope, false); > if (isPropertyDescriptorDefined) { > if (!descriptor.configurable()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy 'has' must return 'true' for non-configurable properties")); >+ throwVMTypeError(exec, scope, "Proxy 'has' must return 'true' for non-configurable properties"_s); > return false; > } > bool isExtensible = target->isExtensible(exec); > RETURN_IF_EXCEPTION(scope, false); > if (!isExtensible) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy 'has' must return 'true' for a non-extensible 'target' object with a configurable property")); >+ throwVMTypeError(exec, scope, "Proxy 'has' must return 'true' for a non-extensible 'target' object with a configurable property"_s); > return false; > } > } >@@ -436,14 +436,14 @@ bool ProxyObject::performPut(ExecState* exec, JSValue putValue, JSValue thisValu > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue setMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->set, ASCIILiteral("'set' property of a Proxy's handler should be callable")); >+ JSValue setMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->set, "'set' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > JSObject* target = this->target(); > if (setMethod.isUndefined()) { >@@ -470,11 +470,11 @@ bool ProxyObject::performPut(ExecState* exec, JSValue putValue, JSValue thisValu > if (hasProperty) { > if (descriptor.isDataDescriptor() && !descriptor.configurable() && !descriptor.writable()) { > if (!sameValue(exec, descriptor.value(), putValue)) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy handler's 'set' on a non-configurable and non-writable property on 'target' should either return false or be the same value already on the 'target'")); >+ throwVMTypeError(exec, scope, "Proxy handler's 'set' on a non-configurable and non-writable property on 'target' should either return false or be the same value already on the 'target'"_s); > return false; > } > } else if (descriptor.isAccessorDescriptor() && !descriptor.configurable() && descriptor.setter().isUndefined()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy handler's 'set' method on a non-configurable accessor property without a setter should return false")); >+ throwVMTypeError(exec, scope, "Proxy handler's 'set' method on a non-configurable accessor property without a setter should return false"_s); > return false; > } > } >@@ -529,12 +529,12 @@ static EncodedJSValue JSC_HOST_CALL performProxyCall(ExecState* exec) > ProxyObject* proxy = jsCast<ProxyObject*>(exec->jsCallee()); > JSValue handlerValue = proxy->handler(); > if (handlerValue.isNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ return throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue applyMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "apply"), ASCIILiteral("'apply' property of a Proxy's handler should be callable")); >+ JSValue applyMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "apply"), "'apply' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > JSObject* target = proxy->target(); > if (applyMethod.isUndefined()) { >@@ -582,12 +582,12 @@ static EncodedJSValue JSC_HOST_CALL performProxyConstruct(ExecState* exec) > ProxyObject* proxy = jsCast<ProxyObject*>(exec->jsCallee()); > JSValue handlerValue = proxy->handler(); > if (handlerValue.isNull()) >- return throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ return throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue constructMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "construct"), ASCIILiteral("'construct' property of a Proxy's handler should be constructible")); >+ JSValue constructMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "construct"), "'construct' property of a Proxy's handler should be constructible"_s); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > JSObject* target = proxy->target(); > if (constructMethod.isUndefined()) { >@@ -608,7 +608,7 @@ static EncodedJSValue JSC_HOST_CALL performProxyConstruct(ExecState* exec) > JSValue result = call(exec, constructMethod, callType, callData, handler, arguments); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (!result.isObject()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Result from Proxy handler's 'construct' method should be an object")); >+ return throwVMTypeError(exec, scope, "Result from Proxy handler's 'construct' method should be an object"_s); > return JSValue::encode(result); > } > >@@ -644,14 +644,14 @@ bool ProxyObject::performDelete(ExecState* exec, PropertyName propertyName, Defa > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue deletePropertyMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "deleteProperty"), ASCIILiteral("'deleteProperty' property of a Proxy's handler should be callable")); >+ JSValue deletePropertyMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "deleteProperty"), "'deleteProperty' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > JSObject* target = this->target(); > if (deletePropertyMethod.isUndefined()) { >@@ -675,7 +675,7 @@ bool ProxyObject::performDelete(ExecState* exec, PropertyName propertyName, Defa > PropertyDescriptor descriptor; > if (target->getOwnPropertyDescriptor(exec, propertyName, descriptor)) { > if (!descriptor.configurable()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy handler's 'deleteProperty' method should return false when the target's property is not configurable")); >+ throwVMTypeError(exec, scope, "Proxy handler's 'deleteProperty' method should return false when the target's property is not configurable"_s); > return false; > } > } >@@ -719,14 +719,14 @@ bool ProxyObject::performPreventExtensions(ExecState* exec) > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue preventExtensionsMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "preventExtensions"), ASCIILiteral("'preventExtensions' property of a Proxy's handler should be callable")); >+ JSValue preventExtensionsMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "preventExtensions"), "'preventExtensions' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > JSObject* target = this->target(); > if (preventExtensionsMethod.isUndefined()) { >@@ -747,7 +747,7 @@ bool ProxyObject::performPreventExtensions(ExecState* exec) > bool targetIsExtensible = target->isExtensible(exec); > RETURN_IF_EXCEPTION(scope, false); > if (targetIsExtensible) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'preventExtensions' trap returned true even though its target is extensible. It should have returned false")); >+ throwVMTypeError(exec, scope, "Proxy's 'preventExtensions' trap returned true even though its target is extensible. It should have returned false"_s); > return false; > } > } >@@ -773,14 +773,14 @@ bool ProxyObject::performIsExtensible(ExecState* exec) > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue isExtensibleMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "isExtensible"), ASCIILiteral("'isExtensible' property of a Proxy's handler should be callable")); >+ JSValue isExtensibleMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "isExtensible"), "'isExtensible' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > > JSObject* target = this->target(); >@@ -804,11 +804,11 @@ bool ProxyObject::performIsExtensible(ExecState* exec) > if (trapResultAsBool != isTargetExtensible) { > if (isTargetExtensible) { > ASSERT(!trapResultAsBool); >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy object's 'isExtensible' trap returned false when the target is extensible. It should have returned true")); >+ throwVMTypeError(exec, scope, "Proxy object's 'isExtensible' trap returned false when the target is extensible. It should have returned true"_s); > } else { > ASSERT(!isTargetExtensible); > ASSERT(trapResultAsBool); >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy object's 'isExtensible' trap returned true when the target is non-extensible. It should have returned false")); >+ throwVMTypeError(exec, scope, "Proxy object's 'isExtensible' trap returned true when the target is non-extensible. It should have returned false"_s); > } > } > >@@ -842,14 +842,14 @@ bool ProxyObject::performDefineOwnProperty(ExecState* exec, PropertyName propert > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue definePropertyMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->defineProperty, ASCIILiteral("'defineProperty' property of a Proxy's handler should be callable")); >+ JSValue definePropertyMethod = handler->getMethod(exec, callData, callType, vm.propertyNames->defineProperty, "'defineProperty' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > > if (definePropertyMethod.isUndefined()) >@@ -882,11 +882,11 @@ bool ProxyObject::performDefineOwnProperty(ExecState* exec, PropertyName propert > > if (!isTargetDescriptorDefined) { > if (!targetIsExtensible) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'defineProperty' trap returned true even though getOwnPropertyDescriptor of the Proxy's target returned undefined and the target is non-extensible")); >+ throwVMTypeError(exec, scope, "Proxy's 'defineProperty' trap returned true even though getOwnPropertyDescriptor of the Proxy's target returned undefined and the target is non-extensible"_s); > return false; > } > if (settingConfigurableToFalse) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'defineProperty' trap returned true for a non-configurable field even though getOwnPropertyDescriptor of the Proxy's target returned undefined")); >+ throwVMTypeError(exec, scope, "Proxy's 'defineProperty' trap returned true for a non-configurable field even though getOwnPropertyDescriptor of the Proxy's target returned undefined"_s); > return false; > } > >@@ -900,11 +900,11 @@ bool ProxyObject::performDefineOwnProperty(ExecState* exec, PropertyName propert > bool isCompatibleDescriptor = validateAndApplyPropertyDescriptor(exec, nullptr, propertyName, targetIsExtensible, descriptor, isCurrentDefined, current, throwException); > RETURN_IF_EXCEPTION(scope, false); > if (!isCompatibleDescriptor) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'defineProperty' trap did not define a property on its target that is compatible with the trap's input descriptor")); >+ throwVMTypeError(exec, scope, "Proxy's 'defineProperty' trap did not define a property on its target that is compatible with the trap's input descriptor"_s); > return false; > } > if (settingConfigurableToFalse && targetDescriptor.configurable()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'defineProperty' trap did not define a non-configurable property on its target even though the input descriptor to the trap said it must do so")); >+ throwVMTypeError(exec, scope, "Proxy's 'defineProperty' trap did not define a non-configurable property on its target even though the input descriptor to the trap said it must do so"_s); > return false; > } > >@@ -929,14 +929,14 @@ void ProxyObject::performGetOwnPropertyNames(ExecState* exec, PropertyNameArray& > } > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue ownKeysMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "ownKeys"), ASCIILiteral("'ownKeys' property of a Proxy's handler should be callable")); >+ JSValue ownKeysMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "ownKeys"), "'ownKeys' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, void()); > JSObject* target = this->target(); > if (ownKeysMethod.isUndefined()) { >@@ -983,7 +983,7 @@ void ProxyObject::performGetOwnPropertyNames(ExecState* exec, PropertyNameArray& > return dontExitEarly; > }; > >- createListFromArrayLike(exec, arrayLikeObject, dontThrowAnExceptionTypeFilter, ASCIILiteral("Proxy handler's 'ownKeys' method must return an array-like object containing only Strings and Symbols"), addPropName); >+ createListFromArrayLike(exec, arrayLikeObject, dontThrowAnExceptionTypeFilter, "Proxy handler's 'ownKeys' method must return an array-like object containing only Strings and Symbols"_s, addPropName); > RETURN_IF_EXCEPTION(scope, void()); > > bool targetIsExensible = target->isExtensible(exec); >@@ -1032,7 +1032,7 @@ void ProxyObject::performGetOwnPropertyNames(ExecState* exec, PropertyNameArray& > } > > if (uncheckedResultKeys.size()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy handler's 'ownKeys' method returned a key that was not present in its non-extensible target")); >+ throwVMTypeError(exec, scope, "Proxy handler's 'ownKeys' method returned a key that was not present in its non-extensible target"_s); > return; > } > } >@@ -1080,14 +1080,14 @@ bool ProxyObject::performSetPrototype(ExecState* exec, JSValue prototype, bool s > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return false; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue setPrototypeOfMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "setPrototypeOf"), ASCIILiteral("'setPrototypeOf' property of a Proxy's handler should be callable")); >+ JSValue setPrototypeOfMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "setPrototypeOf"), "'setPrototypeOf' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, false); > > JSObject* target = this->target(); >@@ -1108,7 +1108,7 @@ bool ProxyObject::performSetPrototype(ExecState* exec, JSValue prototype, bool s > > if (!trapResultAsBool) { > if (shouldThrowIfCantSet) >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy 'setPrototypeOf' returned false indicating it could not set the prototype value. The operation was expected to succeed")); >+ throwVMTypeError(exec, scope, "Proxy 'setPrototypeOf' returned false indicating it could not set the prototype value. The operation was expected to succeed"_s); > return false; > } > >@@ -1120,7 +1120,7 @@ bool ProxyObject::performSetPrototype(ExecState* exec, JSValue prototype, bool s > JSValue targetPrototype = target->getPrototype(vm, exec); > RETURN_IF_EXCEPTION(scope, false); > if (!sameValue(exec, prototype, targetPrototype)) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy 'setPrototypeOf' trap returned true when its target is non-extensible and the new prototype value is not the same as the current prototype value. It should have returned false")); >+ throwVMTypeError(exec, scope, "Proxy 'setPrototypeOf' trap returned true when its target is non-extensible and the new prototype value is not the same as the current prototype value. It should have returned false"_s); > return false; > } > >@@ -1145,14 +1145,14 @@ JSValue ProxyObject::performGetPrototype(ExecState* exec) > > JSValue handlerValue = this->handler(); > if (handlerValue.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral(s_proxyAlreadyRevokedErrorMessage)); >+ throwVMTypeError(exec, scope, s_proxyAlreadyRevokedErrorMessage); > return { }; > } > > JSObject* handler = jsCast<JSObject*>(handlerValue); > CallData callData; > CallType callType; >- JSValue getPrototypeOfMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "getPrototypeOf"), ASCIILiteral("'getPrototypeOf' property of a Proxy's handler should be callable")); >+ JSValue getPrototypeOfMethod = handler->getMethod(exec, callData, callType, makeIdentifier(vm, "getPrototypeOf"), "'getPrototypeOf' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, { }); > > JSObject* target = this->target(); >@@ -1168,7 +1168,7 @@ JSValue ProxyObject::performGetPrototype(ExecState* exec) > RETURN_IF_EXCEPTION(scope, { }); > > if (!trapResult.isObject() && !trapResult.isNull()) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy handler's 'getPrototypeOf' trap should either return an object or null")); >+ throwVMTypeError(exec, scope, "Proxy handler's 'getPrototypeOf' trap should either return an object or null"_s); > return { }; > } > >@@ -1180,7 +1180,7 @@ JSValue ProxyObject::performGetPrototype(ExecState* exec) > JSValue targetPrototype = target->getPrototype(vm, exec); > RETURN_IF_EXCEPTION(scope, { }); > if (!sameValue(exec, targetPrototype, trapResult)) { >- throwVMTypeError(exec, scope, ASCIILiteral("Proxy's 'getPrototypeOf' trap for a non-extensible target should return the same value as the target's prototype")); >+ throwVMTypeError(exec, scope, "Proxy's 'getPrototypeOf' trap for a non-extensible target should return the same value as the target's prototype"_s); > return { }; > } > >diff --git a/Source/JavaScriptCore/runtime/ReflectObject.cpp b/Source/JavaScriptCore/runtime/ReflectObject.cpp >index 3d5e165569586a0b698a84632bebb49fd707b9dc..a433f6de5133a81dcea58b6f5cbf607d37a5816b 100644 >--- a/Source/JavaScriptCore/runtime/ReflectObject.cpp >+++ b/Source/JavaScriptCore/runtime/ReflectObject.cpp >@@ -97,26 +97,26 @@ EncodedJSValue JSC_HOST_CALL reflectObjectConstruct(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.construct requires the first argument be a constructor"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.construct requires the first argument be a constructor"_s)); > > ConstructData constructData; > ConstructType constructType; > if (!target.isConstructor(constructType, constructData)) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.construct requires the first argument be a constructor"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.construct requires the first argument be a constructor"_s)); > > JSValue newTarget = target; > if (exec->argumentCount() >= 3) { > newTarget = exec->argument(2); > if (!newTarget.isConstructor()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.construct requires the third argument be a constructor if present"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.construct requires the third argument be a constructor if present"_s)); > } > > MarkedArgumentBuffer arguments; > JSObject* argumentsObject = jsDynamicCast<JSObject*>(vm, exec->argument(1)); > if (!argumentsObject) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.construct requires the second argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.construct requires the second argument be an object"_s)); > >- createListFromArrayLike(exec, argumentsObject, RuntimeTypeMaskAllTypes, ASCIILiteral("This error must not be raised"), [&] (JSValue value, RuntimeType) -> bool { >+ createListFromArrayLike(exec, argumentsObject, RuntimeTypeMaskAllTypes, "This error must not be raised"_s, [&] (JSValue value, RuntimeType) -> bool { > arguments.append(value); > return false; > }); >@@ -138,7 +138,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectDefineProperty(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.defineProperty requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.defineProperty requires the first argument be an object"_s)); > auto propertyName = exec->argument(1).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > >@@ -165,7 +165,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectGet(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.get requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.get requires the first argument be an object"_s)); > > const Identifier propertyName = exec->argument(1).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -187,7 +187,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectGetOwnPropertyDescriptor(ExecState* ex > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.getOwnPropertyDescriptor requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.getOwnPropertyDescriptor requires the first argument be an object"_s)); > > auto key = exec->argument(1).toPropertyKey(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -204,7 +204,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectGetPrototypeOf(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.getPrototypeOf requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.getPrototypeOf requires the first argument be an object"_s)); > scope.release(); > return JSValue::encode(asObject(target)->getPrototype(vm, exec)); > } >@@ -217,7 +217,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectIsExtensible(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.isExtensible requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.isExtensible requires the first argument be an object"_s)); > > bool isExtensible = asObject(target)->isExtensible(exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -232,7 +232,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectOwnKeys(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.ownKeys requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.ownKeys requires the first argument be an object"_s)); > scope.release(); > return JSValue::encode(ownPropertyKeys(exec, jsCast<JSObject*>(target), PropertyNameMode::StringsAndSymbols, DontEnumPropertiesMode::Include)); > } >@@ -245,7 +245,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectPreventExtensions(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.preventExtensions requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.preventExtensions requires the first argument be an object"_s)); > JSObject* object = asObject(target); > bool result = object->methodTable(vm)->preventExtensions(object, exec); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -260,7 +260,7 @@ EncodedJSValue JSC_HOST_CALL reflectObjectSet(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.set requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.set requires the first argument be an object"_s)); > JSObject* targetObject = asObject(target); > > auto propertyName = exec->argument(1).toPropertyKey(exec); >@@ -285,10 +285,10 @@ EncodedJSValue JSC_HOST_CALL reflectObjectSetPrototypeOf(ExecState* exec) > > JSValue target = exec->argument(0); > if (!target.isObject()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.setPrototypeOf requires the first argument be an object"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.setPrototypeOf requires the first argument be an object"_s)); > JSValue proto = exec->argument(1); > if (!proto.isObject() && !proto.isNull()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral("Reflect.setPrototypeOf requires the second argument be either an object or null"))); >+ return JSValue::encode(throwTypeError(exec, scope, "Reflect.setPrototypeOf requires the second argument be either an object or null"_s)); > > JSObject* object = asObject(target); > >diff --git a/Source/JavaScriptCore/runtime/RegExpConstructor.cpp b/Source/JavaScriptCore/runtime/RegExpConstructor.cpp >index 04d1a58748724da51e3b6323fce8aec13803c5c8..85524691c68321c73b5e4d15e873035956a16a56 100644 >--- a/Source/JavaScriptCore/runtime/RegExpConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/RegExpConstructor.cpp >@@ -89,7 +89,7 @@ RegExpConstructor::RegExpConstructor(VM& vm, Structure* structure, RegExpPrototy > > void RegExpConstructor::finishCreation(VM& vm, RegExpPrototype* regExpPrototype, GetterSetter* speciesSymbol) > { >- Base::finishCreation(vm, ASCIILiteral("RegExp")); >+ Base::finishCreation(vm, "RegExp"_s); > ASSERT(inherits(vm, info())); > > putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); >@@ -224,7 +224,7 @@ inline RegExpFlags toFlags(ExecState* exec, JSValue flags) > RegExpFlags result = regExpFlags(flagsString->value(exec)); > RETURN_IF_EXCEPTION(scope, InvalidFlags); > if (result == InvalidFlags) >- throwSyntaxError(exec, scope, ASCIILiteral("Invalid flags supplied to RegExp constructor.")); >+ throwSyntaxError(exec, scope, "Invalid flags supplied to RegExp constructor."_s); > return result; > } > >diff --git a/Source/JavaScriptCore/runtime/RegExpObject.cpp b/Source/JavaScriptCore/runtime/RegExpObject.cpp >index 3a5cf37a8d5d64b03a2bef61b27ccecf6970f5e8..a33c0230d26ea257958fc9934b929f6c88a3aa20 100644 >--- a/Source/JavaScriptCore/runtime/RegExpObject.cpp >+++ b/Source/JavaScriptCore/runtime/RegExpObject.cpp >@@ -113,16 +113,16 @@ bool RegExpObject::defineOwnProperty(JSObject* object, ExecState* exec, Property > if (propertyName == vm.propertyNames->lastIndex) { > RegExpObject* regExp = jsCast<RegExpObject*>(object); > if (descriptor.configurablePresent() && descriptor.configurable()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError)); >+ return typeError(exec, scope, shouldThrow, UnconfigurablePropertyChangeConfigurabilityError); > if (descriptor.enumerablePresent() && descriptor.enumerable()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError)); >+ return typeError(exec, scope, shouldThrow, UnconfigurablePropertyChangeEnumerabilityError); > if (descriptor.isAccessorDescriptor()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); >+ return typeError(exec, scope, shouldThrow, UnconfigurablePropertyChangeAccessMechanismError); > if (!regExp->m_lastIndexIsWritable) { > if (descriptor.writablePresent() && descriptor.writable()) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError)); >+ return typeError(exec, scope, shouldThrow, UnconfigurablePropertyChangeWritabilityError); > if (descriptor.value() && !sameValue(exec, regExp->getLastIndex(), descriptor.value())) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyChangeError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyChangeError); > return true; > } > if (descriptor.value()) { >diff --git a/Source/JavaScriptCore/runtime/RegExpObject.h b/Source/JavaScriptCore/runtime/RegExpObject.h >index a316cba2b682476f93c1092104968f70053f18ff..1de53c6fd1807a9eabee2b67acd0abf7d7ef263b 100644 >--- a/Source/JavaScriptCore/runtime/RegExpObject.h >+++ b/Source/JavaScriptCore/runtime/RegExpObject.h >@@ -58,7 +58,7 @@ class RegExpObject final : public JSNonFinalObject { > m_lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex)); > return true; > } >- throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError)); >+ throwTypeError(exec, scope, ReadonlyPropertyWriteError); > return false; > } > bool setLastIndex(ExecState* exec, JSValue lastIndex, bool shouldThrow) >@@ -71,7 +71,7 @@ class RegExpObject final : public JSNonFinalObject { > return true; > } > >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > } > JSValue getLastIndex() const > { >diff --git a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp >index a7d9539f708b3e3d07bb85276648bd61a4e786ef..5685f3307976e8fa85398d2539115b83f88ccbce 100644 >--- a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp >@@ -157,7 +157,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) > > if (auto* regExpObject = jsDynamicCast<RegExpObject*>(vm, arg0)) { > if (!arg1.isUndefined()) >- return throwVMTypeError(exec, scope, ASCIILiteral("Cannot supply flags when constructing one RegExp from another.")); >+ return throwVMTypeError(exec, scope, "Cannot supply flags when constructing one RegExp from another."_s); > regExp = regExpObject->regExp(); > } else { > String pattern = arg0.isUndefined() ? emptyString() : arg0.toWTFString(exec); >@@ -168,7 +168,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) > flags = regExpFlags(arg1.toWTFString(exec)); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); > if (flags == InvalidFlags) >- return throwVMError(exec, scope, createSyntaxError(exec, ASCIILiteral("Invalid flags supplied to RegExp constructor."))); >+ return throwVMError(exec, scope, createSyntaxError(exec, "Invalid flags supplied to RegExp constructor."_s)); > } > regExp = RegExp::create(vm, pattern, flags); > } >@@ -263,7 +263,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterGlobal(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.global getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.global getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->global())); >@@ -279,7 +279,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterIgnoreCase(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.ignoreCase getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.ignoreCase getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->ignoreCase())); >@@ -295,7 +295,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterMultiline(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.multiline getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.multiline getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->multiline())); >@@ -311,7 +311,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterDotAll(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.dotAll getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.dotAll getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->dotAll())); >@@ -327,7 +327,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterSticky(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.sticky getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.sticky getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->sticky())); >@@ -343,7 +343,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterUnicode(ExecState* exec) > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) > return JSValue::encode(jsUndefined()); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.unicode getter can only be called on a RegExp object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.unicode getter can only be called on a RegExp object"_s); > } > > return JSValue::encode(jsBoolean(regexp->regExp()->unicode())); >@@ -356,7 +356,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterFlags(ExecState* exec) > > JSValue thisValue = exec->thisValue(); > if (UNLIKELY(!thisValue.isObject())) >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.flags getter can only be called on an object")); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.flags getter can only be called on an object"_s); > > auto flags = flagsString(exec, asObject(thisValue)); > RETURN_IF_EXCEPTION(scope, encodedJSValue()); >@@ -402,7 +402,7 @@ static inline JSValue regExpProtoGetterSourceInternal(ExecState* exec, const Str > // source cannot ever validly be "". If the source is empty, return a different Pattern > // that would match the same thing. > if (!length) >- return jsNontrivialString(exec, ASCIILiteral("(?:)")); >+ return jsNontrivialString(exec, "(?:)"_s); > > // early return for strings that don't contain a forwards slash and LineTerminator > for (unsigned i = 0; i < length; ++i) { >@@ -479,8 +479,8 @@ EncodedJSValue JSC_HOST_CALL regExpProtoGetterSource(ExecState* exec) > auto* regexp = jsDynamicCast<RegExpObject*>(vm, thisValue); > if (UNLIKELY(!regexp)) { > if (thisValue.inherits<RegExpPrototype>(vm)) >- return JSValue::encode(jsString(exec, ASCIILiteral("(?:)"))); >- return throwVMTypeError(exec, scope, ASCIILiteral("The RegExp.prototype.source getter can only be called on a RegExp object")); >+ return JSValue::encode(jsString(exec, "(?:)"_s)); >+ return throwVMTypeError(exec, scope, "The RegExp.prototype.source getter can only be called on a RegExp object"_s); > } > > String pattern = regexp->regExp()->pattern(); >diff --git a/Source/JavaScriptCore/runtime/RuntimeType.cpp b/Source/JavaScriptCore/runtime/RuntimeType.cpp >index 2f94f10f529e5613506b8f5b203e4aac753370ff..1d68a9de06ff750492f1552e34c2968158de7443 100644 >--- a/Source/JavaScriptCore/runtime/RuntimeType.cpp >+++ b/Source/JavaScriptCore/runtime/RuntimeType.cpp >@@ -62,23 +62,23 @@ RuntimeType runtimeTypeForValue(VM& vm, JSValue value) > String runtimeTypeAsString(RuntimeType type) > { > if (type == TypeUndefined) >- return ASCIILiteral("Undefined"); >+ return "Undefined"_s; > if (type == TypeNull) >- return ASCIILiteral("Null"); >+ return "Null"_s; > if (type == TypeAnyInt) >- return ASCIILiteral("Integer"); >+ return "Integer"_s; > if (type == TypeNumber) >- return ASCIILiteral("Number"); >+ return "Number"_s; > if (type == TypeString) >- return ASCIILiteral("String"); >+ return "String"_s; > if (type == TypeObject) >- return ASCIILiteral("Object"); >+ return "Object"_s; > if (type == TypeBoolean) >- return ASCIILiteral("Boolean"); >+ return "Boolean"_s; > if (type == TypeFunction) >- return ASCIILiteral("Function"); >+ return "Function"_s; > if (type == TypeNothing) >- return ASCIILiteral("(Nothing)"); >+ return "(Nothing)"_s; > > RELEASE_ASSERT_NOT_REACHED(); > return emptyString(); >diff --git a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >index 5dad640feea387805746653b1df31f436c196d14..67fbbbc57400eb5536d688614354a487f4779c57 100644 >--- a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >+++ b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >@@ -756,10 +756,10 @@ String SamplingProfiler::StackFrame::displayName(VM& vm) > WTF::dataLog("couldn't get a name"); > } > #endif >- return ASCIILiteral("(unknown)"); >+ return "(unknown)"_s; > } > if (frameType == FrameType::Host) >- return ASCIILiteral("(host)"); >+ return "(host)"_s; > > if (executable->isHostFunction()) > return static_cast<NativeExecutable*>(executable)->name(); >@@ -767,9 +767,9 @@ String SamplingProfiler::StackFrame::displayName(VM& vm) > if (executable->isFunctionExecutable()) > return static_cast<FunctionExecutable*>(executable)->inferredName().string(); > if (executable->isProgramExecutable() || executable->isEvalExecutable()) >- return ASCIILiteral("(program)"); >+ return "(program)"_s; > if (executable->isModuleProgramExecutable()) >- return ASCIILiteral("(module)"); >+ return "(module)"_s; > > RELEASE_ASSERT_NOT_REACHED(); > return String(); >@@ -784,9 +784,9 @@ String SamplingProfiler::StackFrame::displayNameForJSONTests(VM& vm) > } > > if (frameType == FrameType::Unknown || frameType == FrameType::C) >- return ASCIILiteral("(unknown)"); >+ return "(unknown)"_s; > if (frameType == FrameType::Host) >- return ASCIILiteral("(host)"); >+ return "(host)"_s; > > if (executable->isHostFunction()) > return static_cast<NativeExecutable*>(executable)->name(); >@@ -794,15 +794,15 @@ String SamplingProfiler::StackFrame::displayNameForJSONTests(VM& vm) > if (executable->isFunctionExecutable()) { > String result = static_cast<FunctionExecutable*>(executable)->inferredName().string(); > if (result.isEmpty()) >- return ASCIILiteral("(anonymous function)"); >+ return "(anonymous function)"_s; > return result; > } > if (executable->isEvalExecutable()) >- return ASCIILiteral("(eval)"); >+ return "(eval)"_s; > if (executable->isProgramExecutable()) >- return ASCIILiteral("(program)"); >+ return "(program)"_s; > if (executable->isModuleProgramExecutable()) >- return ASCIILiteral("(module)"); >+ return "(module)"_s; > > RELEASE_ASSERT_NOT_REACHED(); > return String(); >diff --git a/Source/JavaScriptCore/runtime/ScriptExecutable.cpp b/Source/JavaScriptCore/runtime/ScriptExecutable.cpp >index ca23df908ce6cb92f75a6e9d9ef817c491263721..61e106c2a245461ac7e3d5b4fe7dc0fe950c8410 100644 >--- a/Source/JavaScriptCore/runtime/ScriptExecutable.cpp >+++ b/Source/JavaScriptCore/runtime/ScriptExecutable.cpp >@@ -346,7 +346,7 @@ JSObject* ScriptExecutable::prepareForExecutionImpl( > > if (vm.getAndClearFailNextNewCodeBlock()) { > auto& state = *scope->globalObject(vm)->globalExec(); >- return throwException(&state, throwScope, createError(&state, ASCIILiteral("Forced Failure"))); >+ return throwException(&state, throwScope, createError(&state, "Forced Failure"_s)); > } > > JSObject* exception = nullptr; >diff --git a/Source/JavaScriptCore/runtime/SetPrototype.cpp b/Source/JavaScriptCore/runtime/SetPrototype.cpp >index 2934396087e68bf38c918731804f6f6e70b07d6c..e4ecdef0d88ad8cb7b19ac9b35761a496a77cf71 100644 >--- a/Source/JavaScriptCore/runtime/SetPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/SetPrototype.cpp >@@ -89,7 +89,7 @@ ALWAYS_INLINE static JSSet* getSet(CallFrame* callFrame, JSValue thisValue) > auto* set = jsDynamicCast<JSSet*>(vm, thisValue.asCell()); > if (LIKELY(set)) > return set; >- throwTypeError(callFrame, scope, ASCIILiteral("Set operation called on non-Set object")); >+ throwTypeError(callFrame, scope, "Set operation called on non-Set object"_s); > return nullptr; > } > >diff --git a/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp b/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp >index a6882395bafad018482c689d40dc24566bd9a824..a786dcb0041401b938eeae5a19cfdcea1519401e 100644 >--- a/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp >+++ b/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp >@@ -119,7 +119,7 @@ bool SparseArrayValueMap::putEntry(ExecState* exec, JSObject* array, unsigned i, > // extensible, this is not the right thing to have done - so remove again. > if (result.isNewEntry && !array->isStructureExtensible(vm)) { > remove(result.iterator); >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > } > > scope.release(); >@@ -142,11 +142,11 @@ bool SparseArrayValueMap::putDirect(ExecState* exec, JSObject* array, unsigned i > // extensible, this is not the right thing to have done - so remove again. > if (mode != PutDirectIndexLikePutDirect && result.isNewEntry && !array->isStructureExtensible(vm)) { > remove(result.iterator); >- return typeError(exec, scope, shouldThrow, ASCIILiteral(NonExtensibleObjectPropertyDefineError)); >+ return typeError(exec, scope, shouldThrow, NonExtensibleObjectPropertyDefineError); > } > > if (entry.attributes & PropertyAttribute::ReadOnly) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > entry.attributes = attributes; > entry.set(vm, this, value); >@@ -178,7 +178,7 @@ bool SparseArrayEntry::put(ExecState* exec, JSValue thisValue, SparseArrayValueM > > if (!(attributes & PropertyAttribute::Accessor)) { > if (attributes & PropertyAttribute::ReadOnly) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > > set(vm, map, value); > return true; >diff --git a/Source/JavaScriptCore/runtime/StackFrame.cpp b/Source/JavaScriptCore/runtime/StackFrame.cpp >index 9f2d60d36afe45bd3ba740eeb5685e3b16fa88af..01b85b9e7624309842a7b8f21bbe98937088d931 100644 >--- a/Source/JavaScriptCore/runtime/StackFrame.cpp >+++ b/Source/JavaScriptCore/runtime/StackFrame.cpp >@@ -61,10 +61,10 @@ intptr_t StackFrame::sourceID() const > String StackFrame::sourceURL() const > { > if (m_isWasmFrame) >- return ASCIILiteral("[wasm code]"); >+ return "[wasm code]"_s; > > if (!m_codeBlock) { >- return ASCIILiteral("[native code]"); >+ return "[native code]"_s; > } > > String sourceURL = m_codeBlock->ownerScriptExecutable()->sourceURL(); >@@ -81,13 +81,13 @@ String StackFrame::functionName(VM& vm) const > if (m_codeBlock) { > switch (m_codeBlock->codeType()) { > case EvalCode: >- return ASCIILiteral("eval code"); >+ return "eval code"_s; > case ModuleCode: >- return ASCIILiteral("module code"); >+ return "module code"_s; > case FunctionCode: > break; > case GlobalCode: >- return ASCIILiteral("global code"); >+ return "global code"_s; > default: > ASSERT_NOT_REACHED(); > } >diff --git a/Source/JavaScriptCore/runtime/StringConstructor.cpp b/Source/JavaScriptCore/runtime/StringConstructor.cpp >index da63200d4454a887c79e1e17c80ef088b30ffdd9..adf4fe2ec9f3f44d6094973f6ba2589242d5ea27 100644 >--- a/Source/JavaScriptCore/runtime/StringConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/StringConstructor.cpp >@@ -114,7 +114,7 @@ static EncodedJSValue JSC_HOST_CALL stringFromCodePoint(ExecState* exec) > uint32_t codePoint = static_cast<uint32_t>(codePointAsDouble); > > if (codePoint != codePointAsDouble || codePoint > UCHAR_MAX_VALUE) >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("Arguments contain a value that is out of range of code points"))); >+ return throwVMError(exec, scope, createRangeError(exec, "Arguments contain a value that is out of range of code points"_s)); > > if (U_IS_BMP(codePoint)) > builder.append(static_cast<UChar>(codePoint)); >diff --git a/Source/JavaScriptCore/runtime/StringObject.cpp b/Source/JavaScriptCore/runtime/StringObject.cpp >index 6332c11cc6e3e485eed626920336e960b75ce9b5..c34daced4781829dfb0fc97650710d59792c3718 100644 >--- a/Source/JavaScriptCore/runtime/StringObject.cpp >+++ b/Source/JavaScriptCore/runtime/StringObject.cpp >@@ -73,7 +73,7 @@ bool StringObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, > } > > if (propertyName == vm.propertyNames->length) >- return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, slot.isStrictMode(), ReadonlyPropertyWriteError); > if (std::optional<uint32_t> index = parseIndex(propertyName)) { > scope.release(); > return putByIndex(cell, exec, index.value(), value, slot.isStrictMode()); >@@ -89,7 +89,7 @@ bool StringObject::putByIndex(JSCell* cell, ExecState* exec, unsigned propertyNa > > StringObject* thisObject = jsCast<StringObject*>(cell); > if (thisObject->internalValue()->canGetIndex(propertyName)) >- return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); >+ return typeError(exec, scope, shouldThrow, ReadonlyPropertyWriteError); > scope.release(); > return JSObject::putByIndex(cell, exec, propertyName, value, shouldThrow); > } >diff --git a/Source/JavaScriptCore/runtime/StringPrototype.cpp b/Source/JavaScriptCore/runtime/StringPrototype.cpp >index 6bf91bd32e26e6acff588325341727496e26f2dd..a0abe61c431a2ca8bea0c0eb056434b5f11d53af 100644 >--- a/Source/JavaScriptCore/runtime/StringPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/StringPrototype.cpp >@@ -161,14 +161,14 @@ void StringPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, JSStr > JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("normalize", stringProtoFuncNormalize, static_cast<unsigned>(PropertyAttribute::DontEnum), 0); > JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().charCodeAtPrivateName(), stringProtoFuncCharCodeAt, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, CharCodeAtIntrinsic); > >- JSFunction* trimStartFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("trimStart"), stringProtoFuncTrimStart, NoIntrinsic); >- JSFunction* trimEndFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("trimEnd"), stringProtoFuncTrimEnd, NoIntrinsic); >+ JSFunction* trimStartFunction = JSFunction::create(vm, globalObject, 0, "trimStart"_s, stringProtoFuncTrimStart, NoIntrinsic); >+ JSFunction* trimEndFunction = JSFunction::create(vm, globalObject, 0, "trimEnd"_s, stringProtoFuncTrimEnd, NoIntrinsic); > putDirectWithoutTransition(vm, Identifier::fromString(&vm, "trimStart"), trimStartFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > putDirectWithoutTransition(vm, Identifier::fromString(&vm, "trimLeft"), trimStartFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > putDirectWithoutTransition(vm, Identifier::fromString(&vm, "trimEnd"), trimEndFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > putDirectWithoutTransition(vm, Identifier::fromString(&vm, "trimRight"), trimEndFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > >- JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("[Symbol.iterator]"), stringProtoFuncIterator, NoIntrinsic); >+ JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, "[Symbol.iterator]"_s, stringProtoFuncIterator, NoIntrinsic); > putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, static_cast<unsigned>(PropertyAttribute::DontEnum)); > > // The constructor will be added later, after StringConstructor has been built >@@ -1550,14 +1550,14 @@ static EncodedJSValue toLocaleCase(ExecState* state, int32_t (*convertCase)(UCha > > // 10. Let availableLocales be a List with the language tags of the languages for which the Unicode character database contains language sensitive case mappings. > // Note 1: As of Unicode 5.1, the availableLocales list contains the elements "az", "lt", and "tr". >- const HashSet<String> availableLocales({ ASCIILiteral("az"), ASCIILiteral("lt"), ASCIILiteral("tr") }); >+ const HashSet<String> availableLocales({ "az"_s, "lt"_s, "tr"_s }); > > // 11. Let locale be BestAvailableLocale(availableLocales, noExtensionsLocale). > String locale = bestAvailableLocale(availableLocales, noExtensionsLocale); > > // 12. If locale is undefined, let locale be "und". > if (locale.isNull()) >- locale = ASCIILiteral("und"); >+ locale = "und"_s; > > CString utf8LocaleBuffer = locale.utf8(); > const StringView view(s); >@@ -1897,7 +1897,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncNormalize(ExecState* exec) > else if (formString == "NFKD") > form = NormalizationForm::CompatibilityDecomposition; > else >- return throwVMError(exec, scope, createRangeError(exec, ASCIILiteral("argument does not match any normalization form"))); >+ return throwVMError(exec, scope, createRangeError(exec, "argument does not match any normalization form"_s)); > } > > scope.release(); >diff --git a/Source/JavaScriptCore/runtime/Symbol.cpp b/Source/JavaScriptCore/runtime/Symbol.cpp >index d3e465ae80d09536045148e95ee0f33b0ed18441..44b0dfacf497ed857450099eff17b79eb6d91fe2 100644 >--- a/Source/JavaScriptCore/runtime/Symbol.cpp >+++ b/Source/JavaScriptCore/runtime/Symbol.cpp >@@ -89,7 +89,7 @@ double Symbol::toNumber(ExecState* exec) const > { > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- throwTypeError(exec, scope, ASCIILiteral("Cannot convert a symbol to a number")); >+ throwTypeError(exec, scope, "Cannot convert a symbol to a number"_s); > return 0.0; > } > >diff --git a/Source/JavaScriptCore/runtime/SymbolConstructor.cpp b/Source/JavaScriptCore/runtime/SymbolConstructor.cpp >index b515259211c4205475d00f34bbc30f557d921acf..ac6fe851f5154f5f0d1ad8009054cd64fdad2a90 100644 >--- a/Source/JavaScriptCore/runtime/SymbolConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/SymbolConstructor.cpp >@@ -98,7 +98,7 @@ EncodedJSValue JSC_HOST_CALL symbolConstructorFor(ExecState* exec) > return JSValue::encode(Symbol::create(exec->vm(), exec->vm().symbolRegistry().symbolForKey(string))); > } > >-const char* const SymbolKeyForTypeError = "Symbol.keyFor requires that the first argument be a symbol"; >+const ASCIILiteral SymbolKeyForTypeError { "Symbol.keyFor requires that the first argument be a symbol"_s }; > > EncodedJSValue JSC_HOST_CALL symbolConstructorKeyFor(ExecState* exec) > { >@@ -107,7 +107,7 @@ EncodedJSValue JSC_HOST_CALL symbolConstructorKeyFor(ExecState* exec) > > JSValue symbolValue = exec->argument(0); > if (!symbolValue.isSymbol()) >- return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral(SymbolKeyForTypeError))); >+ return JSValue::encode(throwTypeError(exec, scope, SymbolKeyForTypeError)); > > SymbolImpl& uid = asSymbol(symbolValue)->privateName().uid(); > if (!uid.symbolRegistry()) >diff --git a/Source/JavaScriptCore/runtime/SymbolObject.cpp b/Source/JavaScriptCore/runtime/SymbolObject.cpp >index a56ec9bcde8b50bd9a78186f3e7c58bb2d3abec9..767bf65aa4d5f29bafd3a6364fc7e5a83efd0454 100644 >--- a/Source/JavaScriptCore/runtime/SymbolObject.cpp >+++ b/Source/JavaScriptCore/runtime/SymbolObject.cpp >@@ -49,7 +49,7 @@ void SymbolObject::finishCreation(VM& vm, Symbol* symbol) > > String SymbolObject::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > JSValue SymbolObject::defaultValue(const JSObject* object, ExecState*, PreferredPrimitiveType) >diff --git a/Source/JavaScriptCore/runtime/SymbolPrototype.cpp b/Source/JavaScriptCore/runtime/SymbolPrototype.cpp >index d8d372af99f8f9623ce8219592e76219519f8a73..458a6338ee9861bb8c3622b579a6b7d9abfff791 100644 >--- a/Source/JavaScriptCore/runtime/SymbolPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/SymbolPrototype.cpp >@@ -65,15 +65,15 @@ void SymbolPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) > putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Symbol"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); > ASSERT(inherits(vm, info())); > >- JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, ASCIILiteral("[Symbol.toPrimitive]"), symbolProtoFuncValueOf, NoIntrinsic); >+ JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, "[Symbol.toPrimitive]"_s, symbolProtoFuncValueOf, NoIntrinsic); > putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); > } > > // ------------------------------ Functions --------------------------- > >-static const char* SymbolDescriptionTypeError = "Symbol.prototype.description requires that |this| be a symbol or a symbol object"; >-static const char* SymbolToStringTypeError = "Symbol.prototype.toString requires that |this| be a symbol or a symbol object"; >-static const char* SymbolValueOfTypeError = "Symbol.prototype.valueOf requires that |this| be a symbol or a symbol object"; >+static const ASCIILiteral SymbolDescriptionTypeError { "Symbol.prototype.description requires that |this| be a symbol or a symbol object"_s }; >+static const ASCIILiteral SymbolToStringTypeError { "Symbol.prototype.toString requires that |this| be a symbol or a symbol object"_s }; >+static const ASCIILiteral SymbolValueOfTypeError { "Symbol.prototype.valueOf requires that |this| be a symbol or a symbol object"_s }; > > inline Symbol* tryExtractSymbol(VM& vm, JSValue thisValue) > { >diff --git a/Source/JavaScriptCore/runtime/TypeSet.cpp b/Source/JavaScriptCore/runtime/TypeSet.cpp >index 7a412e609559bd19d219b91c0314513f716db9e3..ae3102ed0524b8a136eed6869f3b283c0d454483 100644 >--- a/Source/JavaScriptCore/runtime/TypeSet.cpp >+++ b/Source/JavaScriptCore/runtime/TypeSet.cpp >@@ -89,7 +89,7 @@ void TypeSet::invalidateCache() > String TypeSet::dumpTypes() const > { > if (m_seenTypes == TypeNothing) >- return ASCIILiteral("(Unreached Statement)"); >+ return "(Unreached Statement)"_s; > > StringBuilder seen; > >@@ -172,44 +172,44 @@ String TypeSet::displayName() const > // Therefore, more specific types must be checked first. > > if (doesTypeConformTo(TypeFunction)) >- return ASCIILiteral("Function"); >+ return "Function"_s; > if (doesTypeConformTo(TypeUndefined)) >- return ASCIILiteral("Undefined"); >+ return "Undefined"_s; > if (doesTypeConformTo(TypeNull)) >- return ASCIILiteral("Null"); >+ return "Null"_s; > if (doesTypeConformTo(TypeBoolean)) >- return ASCIILiteral("Boolean"); >+ return "Boolean"_s; > if (doesTypeConformTo(TypeAnyInt)) >- return ASCIILiteral("Integer"); >+ return "Integer"_s; > if (doesTypeConformTo(TypeNumber | TypeAnyInt)) >- return ASCIILiteral("Number"); >+ return "Number"_s; > if (doesTypeConformTo(TypeString)) >- return ASCIILiteral("String"); >+ return "String"_s; > if (doesTypeConformTo(TypeSymbol)) >- return ASCIILiteral("Symbol"); >+ return "Symbol"_s; > > if (doesTypeConformTo(TypeNull | TypeUndefined)) >- return ASCIILiteral("(?)"); >+ return "(?)"_s; > > if (doesTypeConformTo(TypeFunction | TypeNull | TypeUndefined)) >- return ASCIILiteral("Function?"); >+ return "Function?"_s; > if (doesTypeConformTo(TypeBoolean | TypeNull | TypeUndefined)) >- return ASCIILiteral("Boolean?"); >+ return "Boolean?"_s; > if (doesTypeConformTo(TypeAnyInt | TypeNull | TypeUndefined)) >- return ASCIILiteral("Integer?"); >+ return "Integer?"_s; > if (doesTypeConformTo(TypeNumber | TypeAnyInt | TypeNull | TypeUndefined)) >- return ASCIILiteral("Number?"); >+ return "Number?"_s; > if (doesTypeConformTo(TypeString | TypeNull | TypeUndefined)) >- return ASCIILiteral("String?"); >+ return "String?"_s; > if (doesTypeConformTo(TypeSymbol | TypeNull | TypeUndefined)) >- return ASCIILiteral("Symbol?"); >+ return "Symbol?"_s; > > if (doesTypeConformTo(TypeObject | TypeFunction | TypeString)) >- return ASCIILiteral("Object"); >+ return "Object"_s; > if (doesTypeConformTo(TypeObject | TypeFunction | TypeString | TypeNull | TypeUndefined)) >- return ASCIILiteral("Object?"); >+ return "Object?"_s; > >- return ASCIILiteral("(many)"); >+ return "(many)"_s; > } > > String TypeSet::leastCommonAncestor() const >@@ -388,7 +388,7 @@ String StructureShape::leastCommonAncestor(const Vector<Ref<StructureShape>>& sh > // This is unlikely to happen, because we usually bottom out at "Object", but there are some sets of Objects > // that may cause this behavior. We fall back to "Object" because it's our version of Top. > if (!origin->m_proto) >- return ASCIILiteral("Object"); >+ return "Object"_s; > origin = origin->m_proto.get(); > } > } >diff --git a/Source/JavaScriptCore/runtime/TypeSet.h b/Source/JavaScriptCore/runtime/TypeSet.h >index 95a35d18e6fec6d8eda13e2c5ba0f327e0480fc1..69e4831630f1f45b9663a925d56fb3b7d33b6b03 100644 >--- a/Source/JavaScriptCore/runtime/TypeSet.h >+++ b/Source/JavaScriptCore/runtime/TypeSet.h >@@ -61,7 +61,7 @@ class StructureShape : public RefCounted<StructureShape> { > String stringRepresentation(); > String toJSONString() const; > Ref<Inspector::Protocol::Runtime::StructureDescription> inspectorRepresentation(); >- void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? ASCIILiteral("Object") : name); } >+ void setConstructorName(String name) { m_constructorName = (name.isEmpty() ? "Object"_s : name); } > String constructorName() { return m_constructorName; } > void setProto(Ref<StructureShape>&& shape) { m_proto = WTFMove(shape); } > void enterDictionaryMode(); >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index f019955c26ad6c4c22d3ac1d5df61767cf1710e0..98f9a44799a4555d761a8dce343dfff7c265129a 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -1089,7 +1089,7 @@ void VM::dumpTypeProfilerData() > if (!typeProfiler()) > return; > >- typeProfilerLog()->processLogEntries(ASCIILiteral("VM Dump Types")); >+ typeProfilerLog()->processLogEntries("VM Dump Types"_s); > typeProfiler()->dumpTypeProfilerData(*this); > } > >diff --git a/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp b/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp >index 55ca0284dc29da166e4b2c0ff7c4762670856b9e..eb4cd21a2594354aa843003b85e3c18f671aac6c 100644 >--- a/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp >@@ -58,7 +58,7 @@ ALWAYS_INLINE static JSWeakMap* getWeakMap(CallFrame* callFrame, JSValue value) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (UNLIKELY(!value.isObject())) { >- throwTypeError(callFrame, scope, WTF::ASCIILiteral("Called WeakMap function on non-object")); >+ throwTypeError(callFrame, scope, "Called WeakMap function on non-object"_s); > return nullptr; > } > >@@ -66,7 +66,7 @@ ALWAYS_INLINE static JSWeakMap* getWeakMap(CallFrame* callFrame, JSValue value) > if (LIKELY(map)) > return map; > >- throwTypeError(callFrame, scope, WTF::ASCIILiteral("Called WeakMap function on a non-WeakMap object")); >+ throwTypeError(callFrame, scope, "Called WeakMap function on a non-WeakMap object"_s); > return nullptr; > } > >@@ -110,7 +110,7 @@ EncodedJSValue JSC_HOST_CALL protoFuncWeakMapSet(CallFrame* callFrame) > return JSValue::encode(jsUndefined()); > JSValue key = callFrame->argument(0); > if (!key.isObject()) >- return JSValue::encode(throwTypeError(callFrame, scope, WTF::ASCIILiteral("Attempted to set a non-object key in a WeakMap"))); >+ return JSValue::encode(throwTypeError(callFrame, scope, "Attempted to set a non-object key in a WeakMap"_s)); > map->set(vm, asObject(key), callFrame->argument(1)); > return JSValue::encode(callFrame->thisValue()); > } >diff --git a/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp b/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp >index 1413ae6b1ba29336e2b42788f84000b4f5364b61..7b42de0792962f9faed19ed317596adf77641934 100644 >--- a/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp >@@ -56,7 +56,7 @@ ALWAYS_INLINE static JSWeakSet* getWeakSet(CallFrame* callFrame, JSValue value) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (UNLIKELY(!value.isObject())) { >- throwTypeError(callFrame, scope, WTF::ASCIILiteral("Called WeakSet function on non-object")); >+ throwTypeError(callFrame, scope, "Called WeakSet function on non-object"_s); > return nullptr; > } > >@@ -64,7 +64,7 @@ ALWAYS_INLINE static JSWeakSet* getWeakSet(CallFrame* callFrame, JSValue value) > if (LIKELY(set)) > return set; > >- throwTypeError(callFrame, scope, WTF::ASCIILiteral("Called WeakSet function on a non-WeakSet object")); >+ throwTypeError(callFrame, scope, "Called WeakSet function on a non-WeakSet object"_s); > return nullptr; > } > >@@ -97,7 +97,7 @@ EncodedJSValue JSC_HOST_CALL protoFuncWeakSetAdd(CallFrame* callFrame) > return JSValue::encode(jsUndefined()); > JSValue key = callFrame->argument(0); > if (!key.isObject()) >- return JSValue::encode(throwTypeError(callFrame, scope, WTF::ASCIILiteral("Attempted to add a non-object key to a WeakSet"))); >+ return JSValue::encode(throwTypeError(callFrame, scope, "Attempted to add a non-object key to a WeakSet"_s)); > set->add(vm, asObject(key)); > return JSValue::encode(callFrame->thisValue()); > } >diff --git a/Source/JavaScriptCore/tools/JSDollarVM.cpp b/Source/JavaScriptCore/tools/JSDollarVM.cpp >index 17c4654031972f1cf9a296d0d934974251b63c99..0b9612b21c5f484d53208ca8376283280e61fde3 100644 >--- a/Source/JavaScriptCore/tools/JSDollarVM.cpp >+++ b/Source/JavaScriptCore/tools/JSDollarVM.cpp >@@ -622,7 +622,7 @@ class DOMJITGetterComplex : public DOMJITNode { > auto* domjitGetterComplex = jsDynamicCast<DOMJITGetterComplex*>(vm, object); > if (domjitGetterComplex) { > if (domjitGetterComplex->m_enableException) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("DOMJITGetterComplex slow call exception")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "DOMJITGetterComplex slow call exception"_s))); > } > return JSValue::encode(jsNumber(object->value())); > } >@@ -668,7 +668,7 @@ class DOMJITGetterComplex : public DOMJITNode { > auto* thisObject = jsDynamicCast<DOMJITGetterComplex*>(vm, JSValue::decode(thisValue)); > ASSERT(thisObject); > if (thisObject->m_enableException) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("DOMJITGetterComplex slow call exception")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "DOMJITGetterComplex slow call exception"_s))); > return JSValue::encode(jsNumber(thisObject->value())); > } > >@@ -1518,7 +1518,7 @@ static EncodedJSValue JSC_HOST_CALL functionSetImpureGetterDelegate(ExecState* e > return JSValue::encode(jsUndefined()); > ImpureGetter* impureGetter = jsDynamicCast<ImpureGetter*>(vm, asObject(base.asCell())); > if (UNLIKELY(!impureGetter)) { >- throwTypeError(exec, scope, ASCIILiteral("argument is not an ImpureGetter")); >+ throwTypeError(exec, scope, "argument is not an ImpureGetter"_s); > return encodedJSValue(); > } > impureGetter->setDelegate(vm, asObject(delegate.asCell())); >@@ -1557,7 +1557,7 @@ static EncodedJSValue JSC_HOST_CALL functionCreateElement(ExecState* exec) > > Root* root = jsDynamicCast<Root*>(vm, exec->argument(0)); > if (!root) >- return JSValue::encode(throwException(exec, scope, createError(exec, ASCIILiteral("Cannot create Element without a Root.")))); >+ return JSValue::encode(throwException(exec, scope, createError(exec, "Cannot create Element without a Root."_s))); > return JSValue::encode(Element::create(vm, exec->lexicalGlobalObject(), root)); > } > >@@ -1587,7 +1587,7 @@ static EncodedJSValue JSC_HOST_CALL functionGetHiddenValue(ExecState* exec) > > SimpleObject* simpleObject = jsDynamicCast<SimpleObject*>(vm, exec->argument(0)); > if (UNLIKELY(!simpleObject)) { >- throwTypeError(exec, scope, ASCIILiteral("Invalid use of getHiddenValue test function")); >+ throwTypeError(exec, scope, "Invalid use of getHiddenValue test function"_s); > return encodedJSValue(); > } > return JSValue::encode(simpleObject->hiddenValue()); >@@ -1601,7 +1601,7 @@ static EncodedJSValue JSC_HOST_CALL functionSetHiddenValue(ExecState* exec) > > SimpleObject* simpleObject = jsDynamicCast<SimpleObject*>(vm, exec->argument(0)); > if (UNLIKELY(!simpleObject)) { >- throwTypeError(exec, scope, ASCIILiteral("Invalid use of setHiddenValue test function")); >+ throwTypeError(exec, scope, "Invalid use of setHiddenValue test function"_s); > return encodedJSValue(); > } > JSValue value = exec->argument(1); >@@ -1626,7 +1626,7 @@ static EncodedJSValue JSC_HOST_CALL functionFindTypeForExpression(ExecState* exe > { > VM& vm = exec->vm(); > RELEASE_ASSERT(vm.typeProfiler()); >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("jsc Testing API: functionFindTypeForExpression")); >+ vm.typeProfilerLog()->processLogEntries("jsc Testing API: functionFindTypeForExpression"_s); > > JSValue functionValue = exec->argument(0); > RELEASE_ASSERT(functionValue.isFunction(vm)); >@@ -1645,7 +1645,7 @@ static EncodedJSValue JSC_HOST_CALL functionReturnTypeFor(ExecState* exec) > { > VM& vm = exec->vm(); > RELEASE_ASSERT(vm.typeProfiler()); >- vm.typeProfilerLog()->processLogEntries(ASCIILiteral("jsc Testing API: functionReturnTypeFor")); >+ vm.typeProfilerLog()->processLogEntries("jsc Testing API: functionReturnTypeFor"_s); > > JSValue functionValue = exec->argument(0); > RELEASE_ASSERT(functionValue.isFunction(vm)); >@@ -1760,7 +1760,7 @@ static EncodedJSValue JSC_HOST_CALL functionLoadGetterFromGetterSetter(ExecState > > GetterSetter* getterSetter = jsDynamicCast<GetterSetter*>(vm, exec->argument(0)); > if (UNLIKELY(!getterSetter)) { >- throwTypeError(exec, scope, ASCIILiteral("Invalid use of loadGetterFromGetterSetter test function: argument is not a GetterSetter")); >+ throwTypeError(exec, scope, "Invalid use of loadGetterFromGetterSetter test function: argument is not a GetterSetter"_s); > return encodedJSValue(); > } > >diff --git a/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp b/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >index 107336b880be054976e118eeded0eb1b35c354e5..3e7ce60ad74b0020474a86993da76e7180dc6f24 100644 >--- a/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >+++ b/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >@@ -170,7 +170,7 @@ class B3IRGenerator { > NEVER_INLINE UnexpectedResult WARN_UNUSED_RETURN fail(Args... args) const > { > using namespace FailureHelper; // See ADL comment in WasmParser.h. >- return UnexpectedResult(makeString(ASCIILiteral("WebAssembly.Module failed compiling: "), makeString(args)...)); >+ return UnexpectedResult(makeString("WebAssembly.Module failed compiling: "_s, makeString(args)...)); > } > #define WASM_COMPILE_FAIL_IF(condition, ...) do { \ > if (UNLIKELY(condition)) \ >diff --git a/Source/JavaScriptCore/wasm/WasmIndexOrName.cpp b/Source/JavaScriptCore/wasm/WasmIndexOrName.cpp >index 56dcd64ceb60d1e7b0d8ff3eb17fbcf507a551d8..4120ae6a9494fd4469f97b8f4088d7fcac318a88 100644 >--- a/Source/JavaScriptCore/wasm/WasmIndexOrName.cpp >+++ b/Source/JavaScriptCore/wasm/WasmIndexOrName.cpp >@@ -46,7 +46,7 @@ IndexOrName::IndexOrName(Index index, std::pair<const Name*, RefPtr<NameSection> > String makeString(const IndexOrName& ion) > { > if (ion.isEmpty()) >- return ASCIILiteral("wasm-stub"); >+ return "wasm-stub"_s; > const String moduleName = ion.nameSection()->moduleName.size() ? String(ion.nameSection()->moduleName.data(), ion.nameSection()->moduleName.size()) : String(ion.nameSection()->moduleHash.data(), ion.nameSection()->moduleHash.size()); > if (ion.isIndex()) > return makeString(moduleName, ".wasm-function[", String::number(ion.m_indexName.index & ~IndexOrName::indexTag), ']'); >diff --git a/Source/JavaScriptCore/wasm/WasmParser.h b/Source/JavaScriptCore/wasm/WasmParser.h >index 3c728b2e64c10d93250f0ae075f6094dcaa11dee..6510705eaf578ce33e3bd76b2bc838adda5f5b00 100644 >--- a/Source/JavaScriptCore/wasm/WasmParser.h >+++ b/Source/JavaScriptCore/wasm/WasmParser.h >@@ -45,7 +45,7 @@ namespace JSC { namespace Wasm { > > namespace FailureHelper { > // FIXME We should move this to makeString. It's in its own namespace to enable C++ Argument Dependent Lookup à la std::swap: user code can deblare its own "boxFailure" and the fail() helper will find it. >-static inline auto makeString(const char *failure) { return ASCIILiteral(failure); } >+static inline auto makeString(const char *failure) { return failure; } > template <typename Int, typename = typename std::enable_if<std::is_integral<Int>::value>::type> > static inline auto makeString(Int failure) { return String::number(failure); } > } >@@ -90,7 +90,7 @@ class Parser { > NEVER_INLINE UnexpectedResult WARN_UNUSED_RETURN fail(Args... args) const > { > using namespace FailureHelper; // See ADL comment in namespace above. >- return UnexpectedResult(makeString(ASCIILiteral("WebAssembly.Module doesn't parse at byte "), String::number(m_offset), ASCIILiteral(" / "), String::number(m_sourceLength), ASCIILiteral(": "), makeString(args)...)); >+ return UnexpectedResult(makeString("WebAssembly.Module doesn't parse at byte "_s, String::number(m_offset), " / "_s, String::number(m_sourceLength), ": "_s, makeString(args)...)); > } > #define WASM_PARSER_FAIL_IF(condition, ...) do { \ > if (UNLIKELY(condition)) \ >diff --git a/Source/JavaScriptCore/wasm/WasmPlan.cpp b/Source/JavaScriptCore/wasm/WasmPlan.cpp >index d063cc1fcdd73504a63ad16a74cfac4974fcbe46..a34deecb16b140beb53b87c6e2a7039834930c2c 100644 >--- a/Source/JavaScriptCore/wasm/WasmPlan.cpp >+++ b/Source/JavaScriptCore/wasm/WasmPlan.cpp >@@ -126,7 +126,7 @@ bool Plan::tryRemoveContextAndCancelIfLast(Context& context) > > // FIXME: Make 0 index not so magical: https://bugs.webkit.org/show_bug.cgi?id=171395 > if (m_completionTasks.isEmpty() || (m_completionTasks.size() == 1 && !m_completionTasks[0].first)) { >- fail(locker, ASCIILiteral("WebAssembly Plan was cancelled. If you see this error message please file a bug at bugs.webkit.org!")); >+ fail(locker, "WebAssembly Plan was cancelled. If you see this error message please file a bug at bugs.webkit.org!"_s); > return true; > } > >diff --git a/Source/JavaScriptCore/wasm/WasmValidate.cpp b/Source/JavaScriptCore/wasm/WasmValidate.cpp >index 116f9d209adf1c185b5ceeafa2725962c27b9b8b..ea4a7598fa049544f87684a50e3cfcb913108eaf 100644 >--- a/Source/JavaScriptCore/wasm/WasmValidate.cpp >+++ b/Source/JavaScriptCore/wasm/WasmValidate.cpp >@@ -89,7 +89,7 @@ class Validate { > NEVER_INLINE UnexpectedResult WARN_UNUSED_RETURN fail(Args... args) const > { > using namespace FailureHelper; // See ADL comment in WasmParser.h. >- return UnexpectedResult(makeString(ASCIILiteral("WebAssembly.Module doesn't validate: "), makeString(args)...)); >+ return UnexpectedResult(makeString("WebAssembly.Module doesn't validate: "_s, makeString(args)...)); > } > #define WASM_VALIDATOR_FAIL_IF(condition, ...) do { \ > if (UNLIKELY(condition)) \ >diff --git a/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.cpp b/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.cpp >index cedad5bd7eeb24066390265311e70d9f4526e930..cd85997de8373d3c7d5540cca4a0335c70f02515 100644 >--- a/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.cpp >+++ b/Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlock.cpp >@@ -59,7 +59,7 @@ JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock(VM& vm, Ref<Wasm::CodeBlock>&& co > if (UNLIKELY(!binding)) { > switch (binding.error()) { > case Wasm::BindingFailure::OutOfMemory: >- m_errorMessage = ASCIILiteral("Out of executable memory"); >+ m_errorMessage = "Out of executable memory"_s; > return; > } > RELEASE_ASSERT_NOT_REACHED(); >diff --git a/Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h b/Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h >index e6514b007dc665a828932d812e94b1efa563aed9..ea292a22f64e385ced233b8f4cbac5c8c08c6e1f 100644 >--- a/Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h >+++ b/Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h >@@ -43,7 +43,7 @@ ALWAYS_INLINE uint32_t toNonWrappingUint32(ExecState* exec, JSValue value) > RETURN_IF_EXCEPTION(throwScope, { }); > if (doubleValue < 0 || doubleValue > UINT_MAX) { > throwException(exec, throwScope, >- createRangeError(exec, ASCIILiteral("Expect an integer argument in the range: [0, 2^32 - 1]"))); >+ createRangeError(exec, "Expect an integer argument in the range: [0, 2^32 - 1]"_s)); > return { }; > } > >@@ -65,13 +65,13 @@ ALWAYS_INLINE std::pair<const uint8_t*, size_t> getWasmBufferFromValue(ExecState > JSArrayBufferView* arrayBufferView = value.getObject() ? jsDynamicCast<JSArrayBufferView*>(vm, value.getObject()) : nullptr; > if (!(arrayBuffer || arrayBufferView)) { > throwException(exec, throwScope, createTypeError(exec, >- ASCIILiteral("first argument must be an ArrayBufferView or an ArrayBuffer"), defaultSourceAppender, runtimeTypeForValue(vm, value))); >+ "first argument must be an ArrayBufferView or an ArrayBuffer"_s, defaultSourceAppender, runtimeTypeForValue(vm, value))); > return { nullptr, 0 }; > } > > if (arrayBufferView ? arrayBufferView->isNeutered() : arrayBuffer->impl()->isNeutered()) { > throwException(exec, throwScope, createTypeError(exec, >- ASCIILiteral("underlying TypedArray has been detatched from the ArrayBuffer"), defaultSourceAppender, runtimeTypeForValue(vm, value))); >+ "underlying TypedArray has been detatched from the ArrayBuffer"_s, defaultSourceAppender, runtimeTypeForValue(vm, value))); > return { nullptr, 0 }; > } > >diff --git a/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp b/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp >index d9dfd85e34de051ca9fa0b61e3ecbeefeb472b77..e0b8e0c4eeaf5dba18790dd112a0b6989e5760c6 100644 >--- a/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp >+++ b/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp >@@ -185,7 +185,7 @@ JSWebAssemblyInstance* JSWebAssemblyInstance::create(VM& vm, ExecState* exec, co > if (creationMode == Wasm::CreationMode::FromJS) { > // If the list of module.imports is not empty and Type(importObject) is not Object, a TypeError is thrown. > if (moduleInformation.imports.size() && !importObject) >- return exception(createTypeError(exec, ASCIILiteral("can't make WebAssembly.Instance because there is no imports Object and the WebAssembly.Module requires imports"))); >+ return exception(createTypeError(exec, "can't make WebAssembly.Instance because there is no imports Object and the WebAssembly.Module requires imports"_s)); > } > > // For each import i in module.imports: >diff --git a/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp b/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp >index d640a46b4a9934402493385ba62f269f989ecc26..c90ac93a247a3fc4476d57e8a6bee617cf59b33a 100644 >--- a/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp >+++ b/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp >@@ -96,13 +96,13 @@ Wasm::PageCount JSWebAssemblyMemory::grow(VM& vm, ExecState* exec, uint32_t delt > if (!grown) { > switch (grown.error()) { > case Wasm::Memory::GrowFailReason::InvalidDelta: >- throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Memory.grow expects the delta to be a valid page count"))); >+ throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Memory.grow expects the delta to be a valid page count"_s)); > break; > case Wasm::Memory::GrowFailReason::InvalidGrowSize: >- throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Memory.grow expects the grown size to be a valid page count"))); >+ throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Memory.grow expects the grown size to be a valid page count"_s)); > break; > case Wasm::Memory::GrowFailReason::WouldExceedMaximum: >- throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Memory.grow would exceed the memory's declared maximum size"))); >+ throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Memory.grow would exceed the memory's declared maximum size"_s)); > break; > case Wasm::Memory::GrowFailReason::OutOfMemory: > throwException(exec, throwScope, createOutOfMemoryError(exec)); >diff --git a/Source/JavaScriptCore/wasm/js/WasmToJS.cpp b/Source/JavaScriptCore/wasm/js/WasmToJS.cpp >index 7cdce40d94bc5ee6d14d0225e72d1ff643b3c309..1270c79b1c4310cc5fc63029ae83bfb18c5e03c6 100644 >--- a/Source/JavaScriptCore/wasm/js/WasmToJS.cpp >+++ b/Source/JavaScriptCore/wasm/js/WasmToJS.cpp >@@ -103,7 +103,7 @@ static Expected<MacroAssemblerCodeRef<WasmEntryPtrTag>, BindingFailure> handleBa > { > auto throwScope = DECLARE_THROW_SCOPE(*vm); > JSGlobalObject* globalObject = instance->globalObject(*vm); >- auto* error = ErrorInstance::create(exec, *vm, globalObject->typeErrorConstructor()->errorStructure(), ASCIILiteral("i64 not allowed as return type or argument to an imported function")); >+ auto* error = ErrorInstance::create(exec, *vm, globalObject->typeErrorConstructor()->errorStructure(), "i64 not allowed as return type or argument to an imported function"_s); > throwException(exec, throwScope, error); > } > >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp >index 53f798dbfe0b24fce0a0b5a962a98da4c9960380..46c567560cf45124ce6753934ef1a2240e78fbe1 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp >@@ -75,7 +75,7 @@ Structure* WebAssemblyCompileErrorConstructor::createStructure(VM& vm, JSGlobalO > > void WebAssemblyCompileErrorConstructor::finishCreation(VM& vm, WebAssemblyCompileErrorPrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("CompileError")); >+ Base::finishCreation(vm, "CompileError"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp >index e206c7e8bf4a23beef0c04b686a5eadb723e8f34..dd8ef5fdc7281238074e775119da8c75d0f69c6b 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp >@@ -66,13 +66,13 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyInstance(ExecState* ex > // If moduleObject is not a WebAssembly.Module instance, a TypeError is thrown. > JSWebAssemblyModule* module = jsDynamicCast<JSWebAssemblyModule*>(vm, exec->argument(0)); > if (!module) >- return JSValue::encode(throwException(exec, scope, createTypeError(exec, ASCIILiteral("first argument to WebAssembly.Instance must be a WebAssembly.Module"), defaultSourceAppender, runtimeTypeForValue(vm, exec->argument(0))))); >+ return JSValue::encode(throwException(exec, scope, createTypeError(exec, "first argument to WebAssembly.Instance must be a WebAssembly.Module"_s, defaultSourceAppender, runtimeTypeForValue(vm, exec->argument(0))))); > > // If the importObject parameter is not undefined and Type(importObject) is not Object, a TypeError is thrown. > JSValue importArgument = exec->argument(1); > JSObject* importObject = importArgument.getObject(); > if (!importArgument.isUndefined() && !importObject) >- return JSValue::encode(throwException(exec, scope, createTypeError(exec, ASCIILiteral("second argument to WebAssembly.Instance must be undefined or an Object"), defaultSourceAppender, runtimeTypeForValue(vm, importArgument)))); >+ return JSValue::encode(throwException(exec, scope, createTypeError(exec, "second argument to WebAssembly.Instance must be undefined or an Object"_s, defaultSourceAppender, runtimeTypeForValue(vm, importArgument)))); > > Structure* instanceStructure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), exec->lexicalGlobalObject()->WebAssemblyInstanceStructure()); > RETURN_IF_EXCEPTION(scope, { }); >@@ -106,7 +106,7 @@ Structure* WebAssemblyInstanceConstructor::createStructure(VM& vm, JSGlobalObjec > > void WebAssemblyInstanceConstructor::finishCreation(VM& vm, WebAssemblyInstancePrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("Instance")); >+ Base::finishCreation(vm, "Instance"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp >index 0ac3241630d1c2b4ef7aeba6dcbcab7680cb4503..10c2fec5c34e1e0d02769b497341d68f9bc78a41 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyInstancePrototype.cpp >@@ -55,7 +55,7 @@ static ALWAYS_INLINE JSWebAssemblyInstance* getInstance(ExecState* exec, VM& vm, > JSWebAssemblyInstance* result = jsDynamicCast<JSWebAssemblyInstance*>(vm, v); > if (!result) { > throwException(exec, throwScope, >- createTypeError(exec, ASCIILiteral("expected |this| value to be an instance of WebAssembly.Instance"))); >+ createTypeError(exec, "expected |this| value to be an instance of WebAssembly.Instance"_s)); > return nullptr; > } > return result; >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp >index 991662751617bf2423cef7729180f0f90186e504..b10aeabed373fbd49a065cb18b984e7b5d34e202 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp >@@ -75,7 +75,7 @@ Structure* WebAssemblyLinkErrorConstructor::createStructure(VM& vm, JSGlobalObje > > void WebAssemblyLinkErrorConstructor::finishCreation(VM& vm, WebAssemblyLinkErrorPrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("LinkError")); >+ Base::finishCreation(vm, "LinkError"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >index c55698c1197c00cdbc4ce425c8e31d2ae773c48e..4f260242d6fb5707f75de71d136d6a69b012aff8 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp >@@ -53,13 +53,13 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyMemory(ExecState* exec > VM& vm = exec->vm(); > auto throwScope = DECLARE_THROW_SCOPE(vm); > if (exec->argumentCount() != 1) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Memory expects exactly one argument")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Memory expects exactly one argument"_s))); > > JSObject* memoryDescriptor; > { > JSValue argument = exec->argument(0); > if (!argument.isObject()) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Memory expects its first argument to be an object")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Memory expects its first argument to be an object"_s))); > memoryDescriptor = jsCast<JSObject*>(argument); > } > >@@ -71,7 +71,7 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyMemory(ExecState* exec > uint32_t size = toNonWrappingUint32(exec, minSizeValue); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > if (!Wasm::PageCount::isValid(size)) >- return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Memory 'initial' page count is too large")))); >+ return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Memory 'initial' page count is too large"_s))); > initialPageCount = Wasm::PageCount(size); > } > >@@ -86,12 +86,12 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyMemory(ExecState* exec > uint32_t size = toNonWrappingUint32(exec, maxSizeValue); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > if (!Wasm::PageCount::isValid(size)) >- return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Memory 'maximum' page count is too large")))); >+ return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Memory 'maximum' page count is too large"_s))); > maximumPageCount = Wasm::PageCount(size); > > if (initialPageCount > maximumPageCount) { > return JSValue::encode(throwException(exec, throwScope, >- createRangeError(exec, ASCIILiteral("'maximum' page count must be than greater than or equal to the 'initial' page count")))); >+ createRangeError(exec, "'maximum' page count must be than greater than or equal to the 'initial' page count"_s))); > } > } > } >@@ -132,7 +132,7 @@ Structure* WebAssemblyMemoryConstructor::createStructure(VM& vm, JSGlobalObject* > > void WebAssemblyMemoryConstructor::finishCreation(VM& vm, WebAssemblyMemoryPrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("Memory")); >+ Base::finishCreation(vm, "Memory"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp >index 4fca8c43665a3718fa4c27b0b3a877a4cccf783f..082b08d7c333aa038e3d6729cc53972f0e06038d 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp >@@ -60,7 +60,7 @@ ALWAYS_INLINE JSWebAssemblyMemory* getMemory(ExecState* exec, VM& vm, JSValue va > JSWebAssemblyMemory* memory = jsDynamicCast<JSWebAssemblyMemory*>(vm, value); > if (!memory) { > throwException(exec, throwScope, >- createTypeError(exec, ASCIILiteral("WebAssembly.Memory.prototype.buffer getter called with non WebAssembly.Memory |this| value"))); >+ createTypeError(exec, "WebAssembly.Memory.prototype.buffer getter called with non WebAssembly.Memory |this| value"_s)); > return nullptr; > } > return memory; >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp >index fa31c59319831ea55df51c274ed4434d27b46ace..ca8f92533f25e07988ce5d0082ebdb687fe68194 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp >@@ -73,7 +73,7 @@ EncodedJSValue JSC_HOST_CALL webAssemblyModuleCustomSections(ExecState* exec) > > JSWebAssemblyModule* module = jsDynamicCast<JSWebAssemblyModule*>(vm, exec->argument(0)); > if (!module) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Module.customSections called with non WebAssembly.Module argument")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Module.customSections called with non WebAssembly.Module argument"_s))); > > const String sectionNameString = exec->argument(1).getString(exec); > RETURN_IF_EXCEPTION(throwScope, { }); >@@ -104,7 +104,7 @@ EncodedJSValue JSC_HOST_CALL webAssemblyModuleImports(ExecState* exec) > > JSWebAssemblyModule* module = jsDynamicCast<JSWebAssemblyModule*>(vm, exec->argument(0)); > if (!module) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Module.imports called with non WebAssembly.Module argument")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Module.imports called with non WebAssembly.Module argument"_s))); > > JSArray* result = constructEmptyArray(exec, nullptr, globalObject); > RETURN_IF_EXCEPTION(throwScope, { }); >@@ -136,7 +136,7 @@ EncodedJSValue JSC_HOST_CALL webAssemblyModuleExports(ExecState* exec) > > JSWebAssemblyModule* module = jsDynamicCast<JSWebAssemblyModule*>(vm, exec->argument(0)); > if (!module) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Module.exports called with non WebAssembly.Module argument")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Module.exports called with non WebAssembly.Module argument"_s))); > > JSArray* result = constructEmptyArray(exec, nullptr, globalObject); > RETURN_IF_EXCEPTION(throwScope, { }); >@@ -203,7 +203,7 @@ Structure* WebAssemblyModuleConstructor::createStructure(VM& vm, JSGlobalObject* > > void WebAssemblyModuleConstructor::finishCreation(VM& vm, WebAssemblyModulePrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("Module")); >+ Base::finishCreation(vm, "Module"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >index 56404599ed6843f4c3e8b394db8d2e91302030a2..d74417cb1a4c1ca3b2f38efa2077a538b165ea12 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp >@@ -384,7 +384,7 @@ void WebAssemblyModuleRecord::link(ExecState* exec, JSValue, JSObject* importObj > break; > > case Wasm::I64: >- throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, ASCIILiteral("exported global cannot be an i64"))); >+ throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, "exported global cannot be an i64"_s)); > return; > > case Wasm::F32: >@@ -434,7 +434,7 @@ void WebAssemblyModuleRecord::link(ExecState* exec, JSValue, JSObject* importObj > template <typename Scope, typename M, typename N, typename ...Args> > NEVER_INLINE static JSValue dataSegmentFail(ExecState* exec, VM& vm, Scope& scope, M memorySize, N segmentSize, N offset, Args... args) > { >- return throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, makeString(ASCIILiteral("Invalid data segment initialization: segment of "), String::number(segmentSize), ASCIILiteral(" bytes memory of "), String::number(memorySize), ASCIILiteral(" bytes, at offset "), String::number(offset), args...))); >+ return throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, makeString("Invalid data segment initialization: segment of "_s, String::number(segmentSize), " bytes memory of "_s, String::number(memorySize), " bytes, at offset "_s, String::number(offset), args...))); > } > > JSValue WebAssemblyModuleRecord::evaluate(ExecState* exec) >@@ -493,7 +493,7 @@ JSValue WebAssemblyModuleRecord::evaluate(ExecState* exec) > forEachElement([&] (const Wasm::Element& element, uint32_t tableIndex) { > uint64_t lastWrittenIndex = static_cast<uint64_t>(tableIndex) + static_cast<uint64_t>(element.functionIndices.size()) - 1; > if (UNLIKELY(lastWrittenIndex >= table->length())) >- exception = JSValue(throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, ASCIILiteral("Element is trying to set an out of bounds table index")))); >+ exception = JSValue(throwException(exec, scope, createJSWebAssemblyLinkError(exec, vm, "Element is trying to set an out of bounds table index"_s))); > }); > > if (UNLIKELY(exception)) >@@ -502,9 +502,9 @@ JSValue WebAssemblyModuleRecord::evaluate(ExecState* exec) > // Validation of all segment ranges comes before all Table and Memory initialization. > forEachSegment([&] (uint8_t*, uint64_t sizeInBytes, const Wasm::Segment::Ptr& segment, uint32_t offset) { > if (UNLIKELY(sizeInBytes < segment->sizeInBytes)) >- exception = dataSegmentFail(exec, vm, scope, sizeInBytes, segment->sizeInBytes, offset, ASCIILiteral(", segment is too big")); >+ exception = dataSegmentFail(exec, vm, scope, sizeInBytes, segment->sizeInBytes, offset, ", segment is too big"_s); > else if (UNLIKELY(offset > sizeInBytes - segment->sizeInBytes)) >- exception = dataSegmentFail(exec, vm, scope, sizeInBytes, segment->sizeInBytes, offset, ASCIILiteral(", segment writes outside of memory")); >+ exception = dataSegmentFail(exec, vm, scope, sizeInBytes, segment->sizeInBytes, offset, ", segment writes outside of memory"_s); > }); > > if (UNLIKELY(exception)) >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.cpp >index 1e40b8a996969ad518dddf1bb6647407d1465b0f..0866aaf313e0c994b31c12d04d07c517af54b5e2 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.cpp >@@ -147,8 +147,8 @@ static void resolve(VM& vm, ExecState* exec, JSPromiseDeferred* promise, JSWebAs > promise->resolve(exec, moduleRecord); > } else { > JSObject* result = constructEmptyObject(exec); >- result->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("module")), module); >- result->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("instance")), instance); >+ result->putDirect(vm, Identifier::fromString(&vm, "module"_s), module); >+ result->putDirect(vm, Identifier::fromString(&vm, "instance"_s), instance); > promise->resolve(exec, result); > } > CLEAR_AND_RETURN_IF_EXCEPTION(scope, void()); >@@ -271,7 +271,7 @@ static EncodedJSValue JSC_HOST_CALL webAssemblyInstantiateFunc(ExecState* exec) > JSObject* importObject = importArgument.getObject(); > if (UNLIKELY(!importArgument.isUndefined() && !importObject)) { > promise->reject(exec, createTypeError(exec, >- ASCIILiteral("second argument to WebAssembly.instantiate must be undefined or an Object"), defaultSourceAppender, runtimeTypeForValue(vm, importArgument))); >+ "second argument to WebAssembly.instantiate must be undefined or an Object"_s, defaultSourceAppender, runtimeTypeForValue(vm, importArgument))); > CLEAR_AND_RETURN_IF_EXCEPTION(catchScope, JSValue::encode(promise->promise())); > } else { > JSValue firstArgument = exec->argument(0); >@@ -340,7 +340,7 @@ EncodedJSValue JSC_HOST_CALL webAssemblyInstantiateStreamingInternal(ExecState* > JSObject* importObject = importArgument.getObject(); > if (UNLIKELY(!importArgument.isUndefined() && !importObject)) { > promise->reject(exec, createTypeError(exec, >- ASCIILiteral("second argument to WebAssembly.instantiateStreaming must be undefined or an Object"), defaultSourceAppender, runtimeTypeForValue(vm, importArgument))); >+ "second argument to WebAssembly.instantiateStreaming must be undefined or an Object"_s, defaultSourceAppender, runtimeTypeForValue(vm, importArgument))); > CLEAR_AND_RETURN_IF_EXCEPTION(catchScope, JSValue::encode(promise->promise())); > } else { > if (globalObject->globalObjectMethodTable()->instantiateStreaming) { >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp >index b1019dcb2b9dd23d7db8eb928c7ed4a8a876f1a5..a14243b2e9fa918aa9098ea0c1d450eba63ee6c8 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp >@@ -75,7 +75,7 @@ Structure* WebAssemblyRuntimeErrorConstructor::createStructure(VM& vm, JSGlobalO > > void WebAssemblyRuntimeErrorConstructor::finishCreation(VM& vm, WebAssemblyRuntimeErrorPrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("RuntimeError")); >+ Base::finishCreation(vm, "RuntimeError"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp >index 5844c9ea083a6c2297163cc678be3a45867d3ed2..41fd134c70c194efa7c9ac5f1d091e0255e1bc9b 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp >@@ -54,7 +54,7 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyTable(ExecState* exec) > { > JSValue argument = exec->argument(0); > if (!argument.isObject()) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Table expects its first argument to be an object")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Table expects its first argument to be an object"_s))); > memoryDescriptor = jsCast<JSObject*>(argument); > } > >@@ -65,7 +65,7 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyTable(ExecState* exec) > String elementString = elementValue.toWTFString(exec); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > if (elementString != "anyfunc") >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Table expects its 'element' field to be the string 'anyfunc'")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Table expects its 'element' field to be the string 'anyfunc'"_s))); > } > > Identifier initialIdent = Identifier::fromString(&vm, "initial"); >@@ -86,14 +86,14 @@ static EncodedJSValue JSC_HOST_CALL constructJSWebAssemblyTable(ExecState* exec) > > if (initial > *maximum) { > return JSValue::encode(throwException(exec, throwScope, >- createRangeError(exec, ASCIILiteral("'maximum' property must be greater than or equal to the 'initial' property")))); >+ createRangeError(exec, "'maximum' property must be greater than or equal to the 'initial' property"_s))); > } > } > > RefPtr<Wasm::Table> wasmTable = Wasm::Table::create(initial, maximum); > if (!wasmTable) { > return JSValue::encode(throwException(exec, throwScope, >- createRangeError(exec, ASCIILiteral("couldn't create Table")))); >+ createRangeError(exec, "couldn't create Table"_s))); > } > > throwScope.release(); >@@ -122,7 +122,7 @@ Structure* WebAssemblyTableConstructor::createStructure(VM& vm, JSGlobalObject* > > void WebAssemblyTableConstructor::finishCreation(VM& vm, WebAssemblyTablePrototype* prototype) > { >- Base::finishCreation(vm, ASCIILiteral("Table")); >+ Base::finishCreation(vm, "Table"_s); > putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); > putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete); > } >diff --git a/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp b/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp >index a70dd62b81b30b0a8664ae7ce52b302897b5b31c..f48178374fd81135f0988d910219dd4896809f44 100644 >--- a/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp >+++ b/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp >@@ -61,7 +61,7 @@ static ALWAYS_INLINE JSWebAssemblyTable* getTable(ExecState* exec, VM& vm, JSVal > JSWebAssemblyTable* result = jsDynamicCast<JSWebAssemblyTable*>(vm, v); > if (!result) { > throwException(exec, throwScope, >- createTypeError(exec, ASCIILiteral("expected |this| value to be an instance of WebAssembly.Table"))); >+ createTypeError(exec, "expected |this| value to be an instance of WebAssembly.Table"_s)); > return nullptr; > } > return result; >@@ -91,7 +91,7 @@ static EncodedJSValue JSC_HOST_CALL webAssemblyTableProtoFuncGrow(ExecState* exe > uint32_t oldLength = table->length(); > > if (!table->grow(delta)) >- return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Table.prototype.grow could not grow the table")))); >+ return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Table.prototype.grow could not grow the table"_s))); > > return JSValue::encode(jsNumber(oldLength)); > } >@@ -107,7 +107,7 @@ static EncodedJSValue JSC_HOST_CALL webAssemblyTableProtoFuncGet(ExecState* exec > uint32_t index = toNonWrappingUint32(exec, exec->argument(0)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > if (index >= table->length()) >- return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Table.prototype.get expects an integer less than the length of the table")))); >+ return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Table.prototype.get expects an integer less than the length of the table"_s))); > > if (JSObject* result = table->getFunction(index)) > return JSValue::encode(result); >@@ -126,13 +126,13 @@ static EncodedJSValue JSC_HOST_CALL webAssemblyTableProtoFuncSet(ExecState* exec > WebAssemblyFunction* wasmFunction; > WebAssemblyWrapperFunction* wasmWrapperFunction; > if (!value.isNull() && !isWebAssemblyHostFunction(vm, value, wasmFunction, wasmWrapperFunction)) >- return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("WebAssembly.Table.prototype.set expects the second argument to be null or an instance of WebAssembly.Function")))); >+ return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, "WebAssembly.Table.prototype.set expects the second argument to be null or an instance of WebAssembly.Function"_s))); > > uint32_t index = toNonWrappingUint32(exec, exec->argument(0)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > > if (index >= table->length()) >- return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral("WebAssembly.Table.prototype.set expects an integer less than the length of the table")))); >+ return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, "WebAssembly.Table.prototype.set expects an integer less than the length of the table"_s))); > > if (value.isNull()) > table->clearFunction(index); >diff --git a/Source/WTF/WTF.xcodeproj/project.pbxproj b/Source/WTF/WTF.xcodeproj/project.pbxproj >index ef1b33b7fe0782f1d87405993f6f4106b1066e20..be89f17fb2d353e1eab9f2431ec23040e0a51eb5 100644 >--- a/Source/WTF/WTF.xcodeproj/project.pbxproj >+++ b/Source/WTF/WTF.xcodeproj/project.pbxproj >@@ -156,6 +156,7 @@ > FE05FAFF1FE5007500093230 /* WTFAssertions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE05FAFE1FE5007500093230 /* WTFAssertions.cpp */; }; > FE85416E1FBE285D008DA5DA /* Poisoned.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE85416C1FBE285B008DA5DA /* Poisoned.cpp */; }; > FEDACD3D1630F83F00C69634 /* StackStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDACD3B1630F83F00C69634 /* StackStats.cpp */; }; >+ C805EF39E5F14481A96D39FC /* ASCIILiteral.cpp in Resources */ = {isa = PBXBuildFile; fileRef = C6F050790D9C432A99085E75 /* ASCIILiteral.cpp */; }; > /* End PBXBuildFile section */ > > /* Begin PBXContainerItemProxy section */ >@@ -649,6 +650,8 @@ > FEDACD3C1630F83F00C69634 /* StackStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackStats.h; sourceTree = "<group>"; }; > FEF295BF20B49DCB00CF283A /* UTF8ConversionError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTF8ConversionError.h; sourceTree = "<group>"; }; > FF0A436588954F3CB07DBECA /* StdList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdList.h; sourceTree = "<group>"; }; >+ 382029E246C84B0099FD6764 /* ASCIILiteral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASCIILiteral.h; sourceTree = "<group>"; }; >+ C6F050790D9C432A99085E75 /* ASCIILiteral.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASCIILiteral.cpp; sourceTree = "<group>"; }; > /* End PBXFileReference section */ > > /* Begin PBXFrameworksBuildPhase section */ >@@ -1183,6 +1186,8 @@ > 1C181C881D307AB800F5FA16 /* icu */, > A5BA15F11824339F00A82E69 /* mac */, > A8A4731C151A825B004123FF /* ASCIIFastPath.h */, >+ C6F050790D9C432A99085E75 /* ASCIILiteral.cpp */, >+ 382029E246C84B0099FD6764 /* ASCIILiteral.h */, > A8A4731D151A825B004123FF /* AtomicString.cpp */, > A8A4731E151A825B004123FF /* AtomicString.h */, > A8A4731F151A825B004123FF /* AtomicStringHash.h */, >@@ -1442,6 +1447,7 @@ > isa = PBXSourcesBuildPhase; > buildActionMask = 2147483647; > files = ( >+ C805EF39E5F14481A96D39FC /* ASCIILiteral.cpp in Resources */, > A8A47386151A825B004123FF /* Assertions.cpp in Sources */, > A8A47435151A825B004123FF /* AtomicString.cpp in Sources */, > 70ECA60D1B02426800449739 /* AtomicStringImpl.cpp in Sources */, >diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt >index 0f9f4e1f2da16c312c0dd52d8dbe953b554d344d..e46802a3444eb433022a59e58c678b1416d273b4 100644 >--- a/Source/WTF/wtf/CMakeLists.txt >+++ b/Source/WTF/wtf/CMakeLists.txt >@@ -276,6 +276,7 @@ set(WTF_PUBLIC_HEADERS > persistence/PersistentEncoder.h > > text/ASCIIFastPath.h >+ text/ASCIILiteral.h > text/AtomicString.h > text/AtomicStringHash.h > text/AtomicStringImpl.h >@@ -407,6 +408,7 @@ set(WTF_SOURCES > persistence/PersistentDecoder.cpp > persistence/PersistentEncoder.cpp > >+ text/ASCIILiteral.cpp > text/AtomicString.cpp > text/AtomicStringImpl.cpp > text/AtomicStringTable.cpp >diff --git a/Source/WTF/wtf/Indenter.h b/Source/WTF/wtf/Indenter.h >index 9f3f811734d51bc254081aadd7f4830116639b80..89e7eeb5b64846355ffc99da8876b1c035243775 100644 >--- a/Source/WTF/wtf/Indenter.h >+++ b/Source/WTF/wtf/Indenter.h >@@ -33,7 +33,7 @@ namespace WTF { > > class Indenter { > public: >- Indenter(unsigned count = 0, String string = ASCIILiteral(" ")) >+ Indenter(unsigned count = 0, String string = " "_s) > : m_count(count) > , m_string(string) > { } >diff --git a/Source/WTF/wtf/Logger.h b/Source/WTF/wtf/Logger.h >index 6b01b5895c0be0dd4b5973650a941811f2648064..8f6e4d36f78cd814d7cdbe12fd15e2db44788c26 100644 >--- a/Source/WTF/wtf/Logger.h >+++ b/Source/WTF/wtf/Logger.h >@@ -37,7 +37,7 @@ namespace WTF { > > template<typename T> > struct LogArgument { >- template<typename U = T> static typename std::enable_if<std::is_same<U, bool>::value, String>::type toString(bool argument) { return argument ? ASCIILiteral("true") : ASCIILiteral("false"); } >+ template<typename U = T> static typename std::enable_if<std::is_same<U, bool>::value, String>::type toString(bool argument) { return argument ? "true"_s : "false"_s; } > template<typename U = T> static typename std::enable_if<std::is_same<U, int>::value, String>::type toString(int argument) { return String::number(argument); } > template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned>::value, String>::type toString(unsigned argument) { return String::number(argument); } > template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned long>::value, String>::type toString(unsigned long argument) { return String::number(argument); } >diff --git a/Source/WTF/wtf/MediaTime.cpp b/Source/WTF/wtf/MediaTime.cpp >index 9a28ab0e29b26552494e72ac581ae3077bcfa521..cba969ab58815300a75dd4146527c4f877880301 100644 >--- a/Source/WTF/wtf/MediaTime.cpp >+++ b/Source/WTF/wtf/MediaTime.cpp >@@ -582,20 +582,20 @@ static Ref<JSON::Object> toJSONStringInternal(const MediaTime& time) > auto object = JSON::Object::create(); > > if (time.hasDoubleValue()) >- object->setDouble(ASCIILiteral("value"), time.toDouble()); >+ object->setDouble("value"_s, time.toDouble()); > else { > if (time.isInvalid() || time.isIndefinite()) >- object->setString(ASCIILiteral("value"), ASCIILiteral("NaN")); >+ object->setString("value"_s, "NaN"_s); > else if (time.isPositiveInfinite()) >- object->setString(ASCIILiteral("value"), ASCIILiteral("POSITIVE_INFINITY")); >+ object->setString("value"_s, "POSITIVE_INFINITY"_s); > else if (time.isNegativeInfinite()) >- object->setString(ASCIILiteral("value"), ASCIILiteral("NEGATIVE_INFINITY")); >+ object->setString("value"_s, "NEGATIVE_INFINITY"_s); > else >- object->setDouble(ASCIILiteral("value"), time.toDouble()); >+ object->setDouble("value"_s, time.toDouble()); > >- object->setInteger(ASCIILiteral("numerator"), static_cast<int>(time.timeValue())); >- object->setInteger(ASCIILiteral("denominator"), time.timeScale()); >- object->setInteger(ASCIILiteral("flags"), time.timeFlags()); >+ object->setInteger("numerator"_s, static_cast<int>(time.timeValue())); >+ object->setInteger("denominator"_s, time.timeScale()); >+ object->setInteger("flags"_s, time.timeFlags()); > } > > return object; >@@ -624,8 +624,8 @@ String MediaTimeRange::toJSONString() const > { > auto object = JSON::Object::create(); > >- object->setObject(ASCIILiteral("start"), toJSONStringInternal(start)); >- object->setObject(ASCIILiteral("end"), toJSONStringInternal(end)); >+ object->setObject("start"_s, toJSONStringInternal(start)); >+ object->setObject("end"_s, toJSONStringInternal(end)); > > return object->toJSONString(); > } >diff --git a/Source/WTF/wtf/linux/MemoryFootprintLinux.cpp b/Source/WTF/wtf/linux/MemoryFootprintLinux.cpp >index 82c1eee526c17a78a281c2aa47176dc99dba1ae8..55872ca5f4560b871d9c34959f0495bddf193f5d 100644 >--- a/Source/WTF/wtf/linux/MemoryFootprintLinux.cpp >+++ b/Source/WTF/wtf/linux/MemoryFootprintLinux.cpp >@@ -74,7 +74,7 @@ std::optional<size_t> memoryFootprint() > } > if (scannedCount == 7) { > StringView pathString(path); >- isAnonymous = pathString == ASCIILiteral("[heap]") || pathString.startsWith("[stack"); >+ isAnonymous = pathString == "[heap]"_s || pathString.startsWith("[stack"); > return; > } > } >diff --git a/Source/WTF/wtf/text/ASCIILiteral.cpp b/Source/WTF/wtf/text/ASCIILiteral.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..1e13c433e27a9809213b02e4c1803e9aa4ff3d21 >--- /dev/null >+++ b/Source/WTF/wtf/text/ASCIILiteral.cpp >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2018 Yusuke Suzuki <utatane.tea@gmail.com> >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "ASCIILiteral.h" >+ >+#include <wtf/PrintStream.h> >+ >+namespace WTF { >+ >+void ASCIILiteral::dump(PrintStream& out) const >+{ >+ out.print(m_characters); >+} >+ >+} // namespace WTF >diff --git a/Source/WTF/wtf/text/ASCIILiteral.h b/Source/WTF/wtf/text/ASCIILiteral.h >new file mode 100644 >index 0000000000000000000000000000000000000000..57e85a93eae25c699144737a9f748f02f9ef010d >--- /dev/null >+++ b/Source/WTF/wtf/text/ASCIILiteral.h >@@ -0,0 +1,69 @@ >+/* >+ * Copyright (C) 2018 Yusuke Suzuki <utatane.tea@gmail.com> >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+namespace WTF { >+ >+class PrintStream; >+ >+class ASCIILiteral { >+public: >+ operator const char*() const { return m_characters; } >+ >+ static constexpr ASCIILiteral fromLiteralUnsafe(const char* string) >+ { >+ return ASCIILiteral { string }; >+ } >+ >+ WTF_EXPORT_PRIVATE void dump(PrintStream& out) const; >+ >+ static constexpr ASCIILiteral null() >+ { >+ return ASCIILiteral { nullptr }; >+ } >+ >+ const char* characters() const { return m_characters; } >+ >+private: >+ constexpr explicit ASCIILiteral(const char* characters) : m_characters(characters) { } >+ >+ >+ const char* m_characters; >+}; >+ >+inline namespace string_literals { >+ >+constexpr ASCIILiteral operator"" _s(const char* characters, size_t) >+{ >+ return ASCIILiteral::fromLiteralUnsafe(characters); >+} >+ >+} // inline string_literals >+ >+} // namespace WTF >+ >+using namespace WTF::string_literals; >+using WTF::ASCIILiteral; >diff --git a/Source/WTF/wtf/text/WTFString.cpp b/Source/WTF/wtf/text/WTFString.cpp >index b24c79f74d2527177f019e487e2d3b70960a3f15..9c5edd6a9924736f6e6cbcd80cc2772f12b6ec7a 100644 >--- a/Source/WTF/wtf/text/WTFString.cpp >+++ b/Source/WTF/wtf/text/WTFString.cpp >@@ -1205,7 +1205,7 @@ String* string(const char* s) > Vector<char> asciiDebug(StringImpl* impl) > { > if (!impl) >- return asciiDebug(String(ASCIILiteral("[null]")).impl()); >+ return asciiDebug(String("[null]"_s).impl()); > > Vector<char> buffer; > for (unsigned i = 0; i < impl->length(); ++i) { >diff --git a/Source/WTF/wtf/text/WTFString.h b/Source/WTF/wtf/text/WTFString.h >index 17e2c69eb99c320bc3902316bb1958b697be1b46..43545f2c2f7b3e6158da89b92ddce7a065f47891 100644 >--- a/Source/WTF/wtf/text/WTFString.h >+++ b/Source/WTF/wtf/text/WTFString.h >@@ -27,6 +27,7 @@ > > #include <stdarg.h> > #include <wtf/Function.h> >+#include <wtf/text/ASCIILiteral.h> > #include <wtf/text/IntegerToStringConversion.h> > #include <wtf/text/StringImpl.h> > >@@ -36,8 +37,6 @@ > > namespace WTF { > >-class ASCIILiteral; >- > // Declarations of string operations > > WTF_EXPORT_PRIVATE int charactersToIntStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10); >@@ -379,16 +378,20 @@ static_assert(sizeof(String) == sizeof(void*), "String should effectively be a p > inline bool operator==(const String& a, const String& b) { return equal(a.impl(), b.impl()); } > inline bool operator==(const String& a, const LChar* b) { return equal(a.impl(), b); } > inline bool operator==(const String& a, const char* b) { return equal(a.impl(), reinterpret_cast<const LChar*>(b)); } >+inline bool operator==(const String& a, ASCIILiteral b) { return equal(a.impl(), reinterpret_cast<const LChar*>(b.characters())); } > inline bool operator==(const LChar* a, const String& b) { return equal(a, b.impl()); } > inline bool operator==(const char* a, const String& b) { return equal(reinterpret_cast<const LChar*>(a), b.impl()); } >+inline bool operator==(ASCIILiteral a, const String& b) { return equal(reinterpret_cast<const LChar*>(a.characters()), b.impl()); } > template<size_t inlineCapacity> inline bool operator==(const Vector<char, inlineCapacity>& a, const String& b) { return equal(b.impl(), a.data(), a.size()); } > template<size_t inlineCapacity> inline bool operator==(const String& a, const Vector<char, inlineCapacity>& b) { return b == a; } > > inline bool operator!=(const String& a, const String& b) { return !equal(a.impl(), b.impl()); } > inline bool operator!=(const String& a, const LChar* b) { return !equal(a.impl(), b); } > inline bool operator!=(const String& a, const char* b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b)); } >+inline bool operator!=(const String& a, ASCIILiteral b) { return !equal(a.impl(), reinterpret_cast<const LChar*>(b.characters())); } > inline bool operator!=(const LChar* a, const String& b) { return !equal(a, b.impl()); } > inline bool operator!=(const char* a, const String& b) { return !equal(reinterpret_cast<const LChar*>(a), b.impl()); } >+inline bool operator!=(ASCIILiteral a, const String& b) { return !equal(reinterpret_cast<const LChar*>(a.characters()), b.impl()); } > template<size_t inlineCapacity> inline bool operator!=(const Vector<char, inlineCapacity>& a, const String& b) { return !(a == b); } > template<size_t inlineCapacity> inline bool operator!=(const String& a, const Vector<char, inlineCapacity>& b) { return b != a; } > >@@ -424,15 +427,6 @@ template<typename> struct DefaultHash; > template<> struct DefaultHash<String> { using Hash = StringHash; }; > template<> struct VectorTraits<String> : SimpleClassVectorTraits { }; > >-class ASCIILiteral { >-public: >- explicit ASCIILiteral(const char* characters) : m_characters(characters) { } >- operator const char*() { return m_characters; } >- >-private: >- const char* m_characters; >-}; >- > template<> struct IntegerToStringConversionTrait<String> { > using ReturnType = String; > using AdditionalArgumentType = void; >@@ -647,7 +641,6 @@ template<unsigned length> inline bool startsWithLettersIgnoringASCIICase(const S > > } // namespace WTF > >-using WTF::ASCIILiteral; > using WTF::KeepTrailingZeros; > using WTF::String; > using WTF::appendNumber; >diff --git a/Source/WTF/wtf/unix/LanguageUnix.cpp b/Source/WTF/wtf/unix/LanguageUnix.cpp >index e016fb2ae370b3181359b8aef393f3e57f52f353..28eb0e7603faf453b4a29b4088072cd542aea4c9 100644 >--- a/Source/WTF/wtf/unix/LanguageUnix.cpp >+++ b/Source/WTF/wtf/unix/LanguageUnix.cpp >@@ -34,7 +34,7 @@ static String platformLanguage() > { > String localeDefault(setlocale(LC_CTYPE, nullptr)); > if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX")) >- return ASCIILiteral("en-US"); >+ return "en-US"_s; > > String normalizedDefault = localeDefault; > normalizedDefault.replace('_', '-'); >diff --git a/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp b/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp >index 126538b146ff3d53c690b1d47c5d109017cd1121..3c5c1db3e746a10ddbd2fae32e7c680d2cd001c5 100644 >--- a/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp >+++ b/Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp >@@ -56,13 +56,13 @@ ApplicationManifest ApplicationManifestParser::parseManifest(const String& text, > > RefPtr<JSON::Value> jsonValue; > if (!JSON::Value::parseJSON(text, jsonValue)) { >- logDeveloperWarning(ASCIILiteral("The manifest is not valid JSON data.")); >+ logDeveloperWarning("The manifest is not valid JSON data."_s); > jsonValue = JSON::Object::create(); > } > > RefPtr<JSON::Object> manifest; > if (!jsonValue->asObject(manifest)) { >- logDeveloperWarning(ASCIILiteral("The manifest is not a JSON value of type \"object\".")); >+ logDeveloperWarning("The manifest is not a JSON value of type \"object\"."_s); > manifest = JSON::Object::create(); > } > >@@ -91,7 +91,7 @@ void ApplicationManifestParser::logManifestPropertyInvalidURL(const String& prop > void ApplicationManifestParser::logDeveloperWarning(const String& message) > { > if (m_consoleContext) >- m_consoleContext->addConsoleMessage(std::make_unique<Inspector::ConsoleMessage>(JSC::MessageSource::Other, JSC::MessageType::Log, JSC::MessageLevel::Warning, ASCIILiteral("Parsing application manifest ") + m_manifestURL.string() + ASCIILiteral(": ") + message)); >+ m_consoleContext->addConsoleMessage(std::make_unique<Inspector::ConsoleMessage>(JSC::MessageSource::Other, JSC::MessageType::Log, JSC::MessageLevel::Warning, "Parsing application manifest "_s + m_manifestURL.string() + ": "_s + message)); > } > > URL ApplicationManifestParser::parseStartURL(const JSON::Object& manifest, const URL& documentURL) >@@ -102,7 +102,7 @@ URL ApplicationManifestParser::parseStartURL(const JSON::Object& manifest, const > > String stringValue; > if (!value->asString(stringValue)) { >- logManifestPropertyNotAString(ASCIILiteral("start_url")); >+ logManifestPropertyNotAString("start_url"_s); > return documentURL; > } > >@@ -111,14 +111,14 @@ URL ApplicationManifestParser::parseStartURL(const JSON::Object& manifest, const > > URL startURL(m_manifestURL, stringValue); > if (!startURL.isValid()) { >- logManifestPropertyInvalidURL(ASCIILiteral("start_url")); >+ logManifestPropertyInvalidURL("start_url"_s); > return documentURL; > } > > if (!protocolHostAndPortAreEqual(startURL, documentURL)) { > auto startURLOrigin = SecurityOrigin::create(startURL); > auto documentOrigin = SecurityOrigin::create(documentURL); >- logDeveloperWarning(ASCIILiteral("The start_url's origin of \"") + startURLOrigin->toString() + ASCIILiteral("\" is different from the document's origin of \"") + documentOrigin->toString() + ASCIILiteral("\".")); >+ logDeveloperWarning("The start_url's origin of \""_s + startURLOrigin->toString() + "\" is different from the document's origin of \""_s + documentOrigin->toString() + "\"."_s); > return documentURL; > } > >@@ -128,12 +128,12 @@ URL ApplicationManifestParser::parseStartURL(const JSON::Object& manifest, const > ApplicationManifest::Display ApplicationManifestParser::parseDisplay(const JSON::Object& manifest) > { > RefPtr<JSON::Value> value; >- if (!manifest.getValue(ASCIILiteral("display"), value)) >+ if (!manifest.getValue("display"_s, value)) > return ApplicationManifest::Display::Browser; > > String stringValue; > if (!value->asString(stringValue)) { >- logManifestPropertyNotAString(ASCIILiteral("display")); >+ logManifestPropertyNotAString("display"_s); > return ApplicationManifest::Display::Browser; > } > >@@ -148,23 +148,23 @@ ApplicationManifest::Display ApplicationManifestParser::parseDisplay(const JSON: > if (stringValue == "browser") > return ApplicationManifest::Display::Browser; > >- logDeveloperWarning(ASCIILiteral("\"") + stringValue + ASCIILiteral("\" is not a valid display mode.")); >+ logDeveloperWarning("\""_s + stringValue + "\" is not a valid display mode."_s); > return ApplicationManifest::Display::Browser; > } > > String ApplicationManifestParser::parseName(const JSON::Object& manifest) > { >- return parseGenericString(manifest, ASCIILiteral("name")); >+ return parseGenericString(manifest, "name"_s); > } > > String ApplicationManifestParser::parseDescription(const JSON::Object& manifest) > { >- return parseGenericString(manifest, ASCIILiteral("description")); >+ return parseGenericString(manifest, "description"_s); > } > > String ApplicationManifestParser::parseShortName(const JSON::Object& manifest) > { >- return parseGenericString(manifest, ASCIILiteral("short_name")); >+ return parseGenericString(manifest, "short_name"_s); > } > > static bool isInScope(const URL& scopeURL, const URL& targetURL) >@@ -201,7 +201,7 @@ URL ApplicationManifestParser::parseScope(const JSON::Object& manifest, const UR > > String stringValue; > if (!value->asString(stringValue)) { >- logManifestPropertyNotAString(ASCIILiteral("scope")); >+ logManifestPropertyNotAString("scope"_s); > return defaultScope; > } > >@@ -210,19 +210,19 @@ URL ApplicationManifestParser::parseScope(const JSON::Object& manifest, const UR > > URL scopeURL(m_manifestURL, stringValue); > if (!scopeURL.isValid()) { >- logManifestPropertyInvalidURL(ASCIILiteral("scope")); >+ logManifestPropertyInvalidURL("scope"_s); > return defaultScope; > } > > if (!protocolHostAndPortAreEqual(scopeURL, documentURL)) { > auto scopeURLOrigin = SecurityOrigin::create(scopeURL); > auto documentOrigin = SecurityOrigin::create(documentURL); >- logDeveloperWarning(ASCIILiteral("The scope's origin of \"") + scopeURLOrigin->toString() + ASCIILiteral("\" is different from the document's origin of \"") + documentOrigin->toString() + ASCIILiteral("\".")); >+ logDeveloperWarning("The scope's origin of \""_s + scopeURLOrigin->toString() + "\" is different from the document's origin of \""_s + documentOrigin->toString() + "\"."_s); > return defaultScope; > } > > if (!isInScope(scopeURL, startURL)) { >- logDeveloperWarning(ASCIILiteral("The start URL is not within scope of the provided scope URL.")); >+ logDeveloperWarning("The start URL is not within scope of the provided scope URL."_s); > return defaultScope; > } > >diff --git a/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp b/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp >index a984d1bc8a18713aac0ffd00b06d813e03e28a09..e6896e7878b2c2b10f6613cdb985d0b6e258d94a 100644 >--- a/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp >+++ b/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp >@@ -86,16 +86,16 @@ void NavigatorBeacon::logError(const ResourceError& error) > if (!document) > return; > >- const char* messageMiddle = ". "; >+ ASCIILiteral messageMiddle { ". "_s }; > String description = error.localizedDescription(); > if (description.isEmpty()) { > if (error.isAccessControl()) >- messageMiddle = " due to access control checks."; >+ messageMiddle = " due to access control checks."_s; > else >- messageMiddle = "."; >+ messageMiddle = "."_s; > } > >- document->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString(ASCIILiteral("Beacon API cannot load "), error.failingURL().string(), ASCIILiteral(messageMiddle), description)); >+ document->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString("Beacon API cannot load "_s, error.failingURL().string(), messageMiddle, description)); > } > > ExceptionOr<bool> NavigatorBeacon::sendBeacon(Document& document, const String& url, std::optional<FetchBody::Init>&& body) >@@ -105,9 +105,9 @@ ExceptionOr<bool> NavigatorBeacon::sendBeacon(Document& document, const String& > // Set parsedUrl to the result of the URL parser steps with url and base. If the algorithm returns an error, or if > // parsedUrl's scheme is not "http" or "https", throw a "TypeError" exception and terminate these steps. > if (!parsedUrl.isValid()) >- return Exception { TypeError, ASCIILiteral("This URL is invalid") }; >+ return Exception { TypeError, "This URL is invalid"_s }; > if (!parsedUrl.protocolIsInHTTPFamily()) >- return Exception { TypeError, ASCIILiteral("Beacons can only be sent over HTTP(S)") }; >+ return Exception { TypeError, "Beacons can only be sent over HTTP(S)"_s }; > > if (!document.frame()) > return false; >@@ -119,7 +119,7 @@ ExceptionOr<bool> NavigatorBeacon::sendBeacon(Document& document, const String& > } > > ResourceRequest request(parsedUrl); >- request.setHTTPMethod(ASCIILiteral("POST")); >+ request.setHTTPMethod("POST"_s); > > FetchOptions options; > options.credentials = FetchOptions::Credentials::Include; >@@ -131,7 +131,7 @@ ExceptionOr<bool> NavigatorBeacon::sendBeacon(Document& document, const String& > auto fetchBody = FetchBody::extract(document, WTFMove(body.value()), mimeType); > > if (fetchBody.hasReadableStream()) >- return Exception { TypeError, ASCIILiteral("Beacons cannot send ReadableStream body") }; >+ return Exception { TypeError, "Beacons cannot send ReadableStream body"_s }; > > request.setHTTPBody(fetchBody.bodyAsFormData(document)); > if (!mimeType.isEmpty()) { >diff --git a/Source/WebCore/Modules/cache/DOMCache.cpp b/Source/WebCore/Modules/cache/DOMCache.cpp >index 98d62add1c3ed6166cf75108bad08c027b205564..23135c1a186111deeddaf5f4c5b329037fd5ea48 100644 >--- a/Source/WebCore/Modules/cache/DOMCache.cpp >+++ b/Source/WebCore/Modules/cache/DOMCache.cpp >@@ -199,12 +199,12 @@ ExceptionOr<Ref<FetchRequest>> DOMCache::requestFromInfo(RequestInfo&& info, boo > if (WTF::holds_alternative<RefPtr<FetchRequest>>(info)) { > request = WTF::get<RefPtr<FetchRequest>>(info).releaseNonNull(); > if (request->method() != "GET" && !ignoreMethod) >- return Exception { TypeError, ASCIILiteral("Request method is not GET") }; >+ return Exception { TypeError, "Request method is not GET"_s }; > } else > request = FetchRequest::create(*scriptExecutionContext(), WTFMove(info), { }).releaseReturnValue(); > > if (!protocolIsInHTTPFamily(request->url())) >- return Exception { TypeError, ASCIILiteral("Request url is not HTTP/HTTPS") }; >+ return Exception { TypeError, "Request url is not HTTP/HTTPS"_s }; > > return request.releaseNonNull(); > } >@@ -251,24 +251,24 @@ void DOMCache::addAll(Vector<RequestInfo>&& infos, DOMPromiseDeferred<void>&& pr > auto& response = result.releaseReturnValue(); > > if (!response.ok()) { >- taskHandler->error(Exception { TypeError, ASCIILiteral("Response is not OK") }); >+ taskHandler->error(Exception { TypeError, "Response is not OK"_s }); > return; > } > > if (hasResponseVaryStarHeaderValue(response)) { >- taskHandler->error(Exception { TypeError, ASCIILiteral("Response has a '*' Vary header value") }); >+ taskHandler->error(Exception { TypeError, "Response has a '*' Vary header value"_s }); > return; > } > > if (response.status() == 206) { >- taskHandler->error(Exception { TypeError, ASCIILiteral("Response is a 206 partial") }); >+ taskHandler->error(Exception { TypeError, "Response is a 206 partial"_s }); > return; > } > > CacheQueryOptions options; > for (const auto& record : taskHandler->records()) { > if (DOMCacheEngine::queryCacheMatch(request->resourceRequest(), record.request, record.response, options)) { >- taskHandler->error(Exception { InvalidStateError, ASCIILiteral("addAll cannot store several matching requests")}); >+ taskHandler->error(Exception { InvalidStateError, "addAll cannot store several matching requests"_s}); > return; > } > } >@@ -326,22 +326,22 @@ void DOMCache::put(RequestInfo&& info, Ref<FetchResponse>&& response, DOMPromise > } > > if (hasResponseVaryStarHeaderValue(response.get())) { >- promise.reject(Exception { TypeError, ASCIILiteral("Response has a '*' Vary header value") }); >+ promise.reject(Exception { TypeError, "Response has a '*' Vary header value"_s }); > return; > } > > if (response->status() == 206) { >- promise.reject(Exception { TypeError, ASCIILiteral("Response is a 206 partial") }); >+ promise.reject(Exception { TypeError, "Response is a 206 partial"_s }); > return; > } > > if (response->isDisturbedOrLocked()) { >- promise.reject(Exception { TypeError, ASCIILiteral("Response is disturbed or locked") }); >+ promise.reject(Exception { TypeError, "Response is disturbed or locked"_s }); > return; > } > > if (response->isBlobFormData()) { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented") }); >+ promise.reject(Exception { NotSupportedError, "Not implemented"_s }); > return; > } > >diff --git a/Source/WebCore/Modules/cache/DOMCacheEngine.cpp b/Source/WebCore/Modules/cache/DOMCacheEngine.cpp >index ea6f87de8d78b3faae23ccd0451efd19cecc0e26..49128c64e98731148e3512eb916950fcd38f4f07 100644 >--- a/Source/WebCore/Modules/cache/DOMCacheEngine.cpp >+++ b/Source/WebCore/Modules/cache/DOMCacheEngine.cpp >@@ -39,15 +39,15 @@ static inline Exception errorToException(Error error) > { > switch (error) { > case Error::NotImplemented: >- return Exception { NotSupportedError, ASCIILiteral("Not implemented") }; >+ return Exception { NotSupportedError, "Not implemented"_s }; > case Error::ReadDisk: >- return Exception { TypeError, ASCIILiteral("Failed reading data from the file system") }; >+ return Exception { TypeError, "Failed reading data from the file system"_s }; > case Error::WriteDisk: >- return Exception { TypeError, ASCIILiteral("Failed writing data to the file system") }; >+ return Exception { TypeError, "Failed writing data to the file system"_s }; > case Error::QuotaExceeded: >- return Exception { QuotaExceededError, ASCIILiteral("Quota exceeded") }; >+ return Exception { QuotaExceededError, "Quota exceeded"_s }; > default: >- return Exception { TypeError, ASCIILiteral("Internal error") }; >+ return Exception { TypeError, "Internal error"_s }; > } > } > >diff --git a/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp b/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp >index 700864b7be312785f5125f4911e3fc61aeb0e5d4..a23df107f165dfb7114ce298b54880a7b79ce62f 100644 >--- a/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp >+++ b/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp >@@ -43,7 +43,7 @@ String BasicCredential::type() const > { > switch (m_type) { > case Type::PublicKey: >- return ASCIILiteral("public-key"); >+ return "public-key"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp b/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp >index ad64b6139e57a4337d9ff218b3bb4ea66772b1cd..14707ae11aedaa64f0ebc72d8b23b2169f8928e3 100644 >--- a/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp >+++ b/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp >@@ -68,7 +68,7 @@ void CredentialsContainer::get(CredentialRequestOptions&& options, CredentialPro > return; > } > if (options.signal && options.signal->aborted()) { >- promise.reject(Exception { AbortError, ASCIILiteral("Aborted by AbortSignal.") }); >+ promise.reject(Exception { AbortError, "Aborted by AbortSignal."_s }); > return; > } > // Step 1-2. >@@ -78,7 +78,7 @@ void CredentialsContainer::get(CredentialRequestOptions&& options, CredentialPro > // Step 4-6. Shortcut as we only support PublicKeyCredential which can only > // be requested from [[discoverFromExternalSource]]. > if (!options.publicKey) { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("Only PublicKeyCredential is supported.") }); >+ promise.reject(Exception { NotSupportedError, "Only PublicKeyCredential is supported."_s }); > return; > } > >@@ -88,7 +88,7 @@ void CredentialsContainer::get(CredentialRequestOptions&& options, CredentialPro > > void CredentialsContainer::store(const BasicCredential&, CredentialPromise&& promise) > { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented.") }); >+ promise.reject(Exception { NotSupportedError, "Not implemented."_s }); > } > > void CredentialsContainer::isCreate(CredentialCreationOptions&& options, CredentialPromise&& promise) >@@ -100,7 +100,7 @@ void CredentialsContainer::isCreate(CredentialCreationOptions&& options, Credent > return; > } > if (options.signal && options.signal->aborted()) { >- promise.reject(Exception { AbortError, ASCIILiteral("Aborted by AbortSignal.") }); >+ promise.reject(Exception { AbortError, "Aborted by AbortSignal."_s }); > return; > } > // Step 1-2. >@@ -108,7 +108,7 @@ void CredentialsContainer::isCreate(CredentialCreationOptions&& options, Credent > > // Step 3-7. Shortcut as we only support one kind of credentials. > if (!options.publicKey) { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("Only PublicKeyCredential is supported.") }); >+ promise.reject(Exception { NotSupportedError, "Only PublicKeyCredential is supported."_s }); > return; > } > >@@ -118,7 +118,7 @@ void CredentialsContainer::isCreate(CredentialCreationOptions&& options, Credent > > void CredentialsContainer::preventSilentAccess(DOMPromiseDeferred<void>&& promise) const > { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("Not implemented.") }); >+ promise.reject(Exception { NotSupportedError, "Not implemented."_s }); > } > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp b/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp >index 8e5066dded1d6da9f31cb8bd8584c188b92f1550..8faf04d03780b00ea256fc3053a3848e7ecc52b9 100644 >--- a/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp >+++ b/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp >@@ -153,7 +153,7 @@ DOMFileSystem::~DOMFileSystem() = default; > > Ref<FileSystemDirectoryEntry> DOMFileSystem::root(ScriptExecutionContext& context) > { >- return FileSystemDirectoryEntry::create(context, *this, ASCIILiteral("/")); >+ return FileSystemDirectoryEntry::create(context, *this, "/"_s); > } > > Ref<FileSystemEntry> DOMFileSystem::fileAsEntry(ScriptExecutionContext& context) >@@ -169,7 +169,7 @@ static ExceptionOr<String> validatePathIsExpectedType(const String& fullPath, St > > auto metadata = FileSystem::fileMetadata(fullPath); > if (!metadata || metadata.value().isHidden) >- return Exception { NotFoundError, ASCIILiteral("Path does not exist") }; >+ return Exception { NotFoundError, "Path does not exist"_s }; > > if (metadata.value().type != expectedType) > return Exception { TypeMismatchError, "Entry at path does not have expected type" }; >@@ -209,7 +209,7 @@ static String resolveRelativeVirtualPath(StringView baseVirtualPath, StringView > } > > if (virtualPathSegments.isEmpty()) >- return ASCIILiteral("/"); >+ return "/"_s; > > StringBuilder builder; > for (auto& segment : virtualPathSegments) { >@@ -286,14 +286,14 @@ void DOMFileSystem::getEntry(ScriptExecutionContext& context, FileSystemDirector > > if (!isValidVirtualPath(virtualPath)) { > callOnMainThread([completionCallback = WTFMove(completionCallback)] { >- completionCallback(Exception { TypeMismatchError, ASCIILiteral("Path is invalid") }); >+ completionCallback(Exception { TypeMismatchError, "Path is invalid"_s }); > }); > return; > } > > if (flags.create) { > callOnMainThread([completionCallback = WTFMove(completionCallback)] { >- completionCallback(Exception { SecurityError, ASCIILiteral("create flag cannot be true") }); >+ completionCallback(Exception { SecurityError, "create flag cannot be true"_s }); > }); > return; > } >@@ -312,7 +312,7 @@ void DOMFileSystem::getEntry(ScriptExecutionContext& context, FileSystemDirector > auto entryType = fileType(fullPath); > callOnMainThread([this, context = WTFMove(context), resolvedVirtualPath = crossThreadCopy(resolvedVirtualPath), entryType, completionCallback = WTFMove(completionCallback)]() mutable { > if (!entryType) { >- completionCallback(Exception { NotFoundError, ASCIILiteral("Cannot find entry at given path") }); >+ completionCallback(Exception { NotFoundError, "Cannot find entry at given path"_s }); > return; > } > switch (entryType.value()) { >@@ -323,7 +323,7 @@ void DOMFileSystem::getEntry(ScriptExecutionContext& context, FileSystemDirector > completionCallback(Ref<FileSystemEntry> { FileSystemFileEntry::create(context, *this, resolvedVirtualPath) }); > break; > default: >- completionCallback(Exception { NotFoundError, ASCIILiteral("Cannot find entry at given path") }); >+ completionCallback(Exception { NotFoundError, "Cannot find entry at given path"_s }); > break; > } > }); >diff --git a/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp b/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp >index 0cdc0478720039b78b15e7af30e97487ba8496d9..02130a4a901db88bee512fb4bfe39e0aea0106aa 100644 >--- a/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp >+++ b/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp >@@ -60,7 +60,7 @@ void FileSystemDirectoryEntry::getEntry(ScriptExecutionContext& context, const S > auto entry = result.releaseReturnValue(); > if (!matches(entry)) { > if (errorCallback) >- errorCallback->handleEvent(DOMException::create(Exception { TypeMismatchError, ASCIILiteral("Entry at given path does not match expected type") })); >+ errorCallback->handleEvent(DOMException::create(Exception { TypeMismatchError, "Entry at given path does not match expected type"_s })); > return; > } > if (successCallback) >diff --git a/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp b/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp >index 82cbeb2215bf68c971eacf550c5332c021d73e6a..f9273c4e0e110538a10dedc1dd46b586d555fd9b 100644 >--- a/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp >+++ b/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp >@@ -60,7 +60,7 @@ void FileSystemDirectoryReader::readEntries(ScriptExecutionContext& context, Ref > { > if (m_isReading) { > if (errorCallback) >- errorCallback->scheduleCallback(context, DOMException::create(Exception { InvalidStateError, ASCIILiteral("Directory reader is already reading") })); >+ errorCallback->scheduleCallback(context, DOMException::create(Exception { InvalidStateError, "Directory reader is already reading"_s })); > return; > } > >diff --git a/Source/WebCore/Modules/fetch/FetchBody.cpp b/Source/WebCore/Modules/fetch/FetchBody.cpp >index a988a38e4b7d36158dd52899f8a78bb12b855a06..07a4cddd1d4b3cf4339f2b0c987a3e1d271af2f0 100644 >--- a/Source/WebCore/Modules/fetch/FetchBody.cpp >+++ b/Source/WebCore/Modules/fetch/FetchBody.cpp >@@ -186,7 +186,7 @@ void FetchBody::consumeAsStream(FetchBodyOwner& owner, FetchBodySource& source) > owner.loadBlob(blobBody(), nullptr); > m_data = nullptr; > } else if (isFormData()) >- source.error(ASCIILiteral("not implemented")); >+ source.error("not implemented"_s); > else if (m_consumer.hasData()) > closeStream = source.enqueue(m_consumer.takeAsArrayBuffer()); > else >diff --git a/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp b/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp >index fd442cce3100f0d89285069c615fb4a72fe4cd0e..00f173edd289b43f87fba64feda614f99afab942 100644 >--- a/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp >+++ b/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp >@@ -220,7 +220,7 @@ void FetchBodyConsumer::loadingFailed() > m_consumePromise = nullptr; > } > if (m_source) { >- m_source->error(ASCIILiteral("Loading failed")); >+ m_source->error("Loading failed"_s); > m_source = nullptr; > } > } >diff --git a/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp b/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp >index dc16155e117bb820b029923bd2807ba984dc77af..fa31a190846e431c61576f123f119c28609e3017 100644 >--- a/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp >+++ b/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp >@@ -98,7 +98,7 @@ void FetchBodyOwner::arrayBuffer(Ref<DeferredPromise>&& promise) > return; > } > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -112,7 +112,7 @@ void FetchBodyOwner::blob(Ref<DeferredPromise>&& promise) > return; > } > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -146,7 +146,7 @@ void FetchBodyOwner::updateContentType() > void FetchBodyOwner::consumeOnceLoadingFinished(FetchBodyConsumer::Type type, Ref<DeferredPromise>&& promise) > { > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -160,7 +160,7 @@ void FetchBodyOwner::formData(Ref<DeferredPromise>&& promise) > return; > } > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -174,7 +174,7 @@ void FetchBodyOwner::json(Ref<DeferredPromise>&& promise) > return; > } > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -188,7 +188,7 @@ void FetchBodyOwner::text(Ref<DeferredPromise>&& promise) > return; > } > if (isDisturbedOrLocked()) { >- promise->reject(Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }); >+ promise->reject(Exception { TypeError, "Body is disturbed or locked"_s }); > return; > } > m_isDisturbed = true; >@@ -245,7 +245,7 @@ void FetchBodyOwner::blobLoadingFailed() > #if ENABLE(STREAMS_API) > if (m_readableStreamSource) { > if (!m_readableStreamSource->isCancelling()) >- m_readableStreamSource->error(ASCIILiteral("Blob loading failed")); >+ m_readableStreamSource->error("Blob loading failed"_s); > m_readableStreamSource = nullptr; > } else > #endif >@@ -314,7 +314,7 @@ void FetchBodyOwner::consumeBodyAsStream() > > if (m_loadingError) { > auto errorMessage = m_loadingError->localizedDescription(); >- m_readableStreamSource->error(errorMessage.isEmpty() ? ASCIILiteral("Loading failed") : errorMessage); >+ m_readableStreamSource->error(errorMessage.isEmpty() ? "Loading failed"_s : errorMessage); > return; > } > >diff --git a/Source/WebCore/Modules/fetch/FetchHeaders.cpp b/Source/WebCore/Modules/fetch/FetchHeaders.cpp >index d772fd0a3b591cb1d897d3e4fa2099d947b35906..1c87482add10bea448bc2ac6da6199d0e5ed31bc 100644 >--- a/Source/WebCore/Modules/fetch/FetchHeaders.cpp >+++ b/Source/WebCore/Modules/fetch/FetchHeaders.cpp >@@ -40,7 +40,7 @@ static ExceptionOr<bool> canWriteHeader(const String& name, const String& value, > if (!isValidHTTPHeaderValue(value)) > return Exception { TypeError, makeString("Header '", name, "' has invalid value: '", value, "'") }; > if (guard == FetchHeaders::Guard::Immutable) >- return Exception { TypeError, ASCIILiteral("Headers object's guard is 'immutable'") }; >+ return Exception { TypeError, "Headers object's guard is 'immutable'"_s }; > if (guard == FetchHeaders::Guard::Request && isForbiddenHeaderName(name)) > return false; > if (guard == FetchHeaders::Guard::RequestNoCors && !isSimpleHeader(name, value)) >diff --git a/Source/WebCore/Modules/fetch/FetchLoader.cpp b/Source/WebCore/Modules/fetch/FetchLoader.cpp >index c01331fc717bd0db373602fe5af5a44d9f92149a..0d5a9ea157d7d2c514ac32ed578f03c18cc30358 100644 >--- a/Source/WebCore/Modules/fetch/FetchLoader.cpp >+++ b/Source/WebCore/Modules/fetch/FetchLoader.cpp >@@ -60,7 +60,7 @@ void FetchLoader::startLoadingBlobURL(ScriptExecutionContext& context, const URL > { > m_urlForReading = BlobURL::createPublicURL(context.securityOrigin()); > if (m_urlForReading.isEmpty()) { >- m_client.didFail({ errorDomainWebKitInternal, 0, URL(), ASCIILiteral("Could not create URL for Blob") }); >+ m_client.didFail({ errorDomainWebKitInternal, 0, URL(), "Could not create URL for Blob"_s }); > return; > } > >@@ -102,7 +102,7 @@ void FetchLoader::start(ScriptExecutionContext& context, const FetchRequest& req > contentSecurityPolicy.upgradeInsecureRequestIfNeeded(fetchRequest, ContentSecurityPolicy::InsecureRequestType::Load); > > if (!context.shouldBypassMainWorldContentSecurityPolicy() && !contentSecurityPolicy.allowConnectToSource(fetchRequest.url())) { >- m_client.didFail({ errorDomainWebKitInternal, 0, fetchRequest.url(), ASCIILiteral("Not allowed by ContentSecurityPolicy"), ResourceError::Type::AccessControl }); >+ m_client.didFail({ errorDomainWebKitInternal, 0, fetchRequest.url(), "Not allowed by ContentSecurityPolicy"_s, ResourceError::Type::AccessControl }); > return; > } > >diff --git a/Source/WebCore/Modules/fetch/FetchRequest.cpp b/Source/WebCore/Modules/fetch/FetchRequest.cpp >index 8af9965acb5ccd08b8a45d473db415a3ca26a729..cb7b5f9cf4b0da30b6ad6c6cf3fb5a7610d6b529 100644 >--- a/Source/WebCore/Modules/fetch/FetchRequest.cpp >+++ b/Source/WebCore/Modules/fetch/FetchRequest.cpp >@@ -38,9 +38,9 @@ namespace WebCore { > static std::optional<Exception> setMethod(ResourceRequest& request, const String& initMethod) > { > if (!isValidHTTPToken(initMethod)) >- return Exception { TypeError, ASCIILiteral("Method is not a valid HTTP token.") }; >+ return Exception { TypeError, "Method is not a valid HTTP token."_s }; > if (isForbiddenMethod(initMethod)) >- return Exception { TypeError, ASCIILiteral("Method is forbidden.") }; >+ return Exception { TypeError, "Method is forbidden."_s }; > request.setHTTPMethod(normalizeHTTPMethod(initMethod)); > return std::nullopt; > } >@@ -53,13 +53,13 @@ static ExceptionOr<String> computeReferrer(ScriptExecutionContext& context, cons > // FIXME: Tighten the URL parsing algorithm according https://url.spec.whatwg.org/#concept-url-parser. > URL referrerURL = context.completeURL(referrer); > if (!referrerURL.isValid()) >- return Exception { TypeError, ASCIILiteral("Referrer is not a valid URL.") }; >+ return Exception { TypeError, "Referrer is not a valid URL."_s }; > > if (referrerURL.protocolIs("about") && referrerURL.path() == "client") > return String { "client" }; > > if (!(context.securityOrigin() && context.securityOrigin()->canRequest(referrerURL))) >- return Exception { TypeError, ASCIILiteral("Referrer is not same-origin.") }; >+ return Exception { TypeError, "Referrer is not same-origin."_s }; > > return String { referrerURL.string() }; > } >@@ -67,12 +67,12 @@ static ExceptionOr<String> computeReferrer(ScriptExecutionContext& context, cons > static std::optional<Exception> buildOptions(FetchOptions& options, ResourceRequest& request, String& referrer, ScriptExecutionContext& context, const FetchRequest::Init& init) > { > if (!init.window.isUndefinedOrNull() && !init.window.isEmpty()) >- return Exception { TypeError, ASCIILiteral("Window can only be null.") }; >+ return Exception { TypeError, "Window can only be null."_s }; > > if (init.hasMembers()) { > if (options.mode == FetchOptions::Mode::Navigate) > options.mode = FetchOptions::Mode::SameOrigin; >- referrer = ASCIILiteral("client"); >+ referrer = "client"_s; > options.referrerPolicy = { }; > } > >@@ -89,7 +89,7 @@ static std::optional<Exception> buildOptions(FetchOptions& options, ResourceRequ > if (init.mode) { > options.mode = init.mode.value(); > if (options.mode == FetchOptions::Mode::Navigate) >- return Exception { TypeError, ASCIILiteral("Request constructor does not accept navigate fetch mode.") }; >+ return Exception { TypeError, "Request constructor does not accept navigate fetch mode."_s }; > } > > if (init.credentials) >@@ -98,7 +98,7 @@ static std::optional<Exception> buildOptions(FetchOptions& options, ResourceRequ > if (init.cache) > options.cache = init.cache.value(); > if (options.cache == FetchOptions::Cache::OnlyIfCached && options.mode != FetchOptions::Mode::SameOrigin) >- return Exception { TypeError, ASCIILiteral("only-if-cached cache option requires fetch mode to be same-origin.") }; >+ return Exception { TypeError, "only-if-cached cache option requires fetch mode to be same-origin."_s }; > > if (init.redirect) > options.redirect = init.redirect.value(); >@@ -133,9 +133,9 @@ ExceptionOr<void> FetchRequest::initializeOptions(const Init& init) > if (m_options.mode == FetchOptions::Mode::NoCors) { > const String& method = m_request.httpMethod(); > if (method != "GET" && method != "POST" && method != "HEAD") >- return Exception { TypeError, ASCIILiteral("Method must be GET, POST or HEAD in no-cors mode.") }; >+ return Exception { TypeError, "Method must be GET, POST or HEAD in no-cors mode."_s }; > if (!m_options.integrity.isEmpty()) >- return Exception { TypeError, ASCIILiteral("There cannot be an integrity in no-cors mode.") }; >+ return Exception { TypeError, "There cannot be an integrity in no-cors mode."_s }; > m_headers->setGuard(FetchHeaders::Guard::RequestNoCors); > } > >@@ -148,11 +148,11 @@ ExceptionOr<void> FetchRequest::initializeWith(const String& url, Init&& init) > // FIXME: Tighten the URL parsing algorithm according https://url.spec.whatwg.org/#concept-url-parser. > URL requestURL = scriptExecutionContext()->completeURL(url); > if (!requestURL.isValid() || !requestURL.user().isEmpty() || !requestURL.pass().isEmpty()) >- return Exception { TypeError, ASCIILiteral("URL is not valid or contains user credentials.") }; >+ return Exception { TypeError, "URL is not valid or contains user credentials."_s }; > > m_options.mode = Mode::Cors; > m_options.credentials = Credentials::Omit; >- m_referrer = ASCIILiteral("client"); >+ m_referrer = "client"_s; > m_request.setURL(requestURL); > m_request.setRequester(ResourceRequest::Requester::Fetch); > m_request.setInitiatorIdentifier(scriptExecutionContext()->resourceRequestIdentifier()); >@@ -180,7 +180,7 @@ ExceptionOr<void> FetchRequest::initializeWith(const String& url, Init&& init) > ExceptionOr<void> FetchRequest::initializeWith(FetchRequest& input, Init&& init) > { > if (input.isDisturbedOrLocked()) >- return Exception {TypeError, ASCIILiteral("Request input is disturbed or locked.") }; >+ return Exception {TypeError, "Request input is disturbed or locked."_s }; > > m_request = input.m_request; > m_options = input.m_options; >@@ -223,7 +223,7 @@ ExceptionOr<void> FetchRequest::setBody(FetchBody::Init&& body) > extractBody(*scriptExecutionContext(), WTFMove(body)); > > if (m_options.keepAlive && hasReadableStreamBody()) >- return Exception { TypeError, ASCIILiteral("Request cannot have a ReadableStream body and keepalive set to true") }; >+ return Exception { TypeError, "Request cannot have a ReadableStream body and keepalive set to true"_s }; > return { }; > } > >@@ -238,7 +238,7 @@ ExceptionOr<void> FetchRequest::setBody(FetchRequest& request) > } > > if (m_options.keepAlive && hasReadableStreamBody()) >- return Exception { TypeError, ASCIILiteral("Request cannot have a ReadableStream body and keepalive set to true") }; >+ return Exception { TypeError, "Request cannot have a ReadableStream body and keepalive set to true"_s }; > return { }; > } > >@@ -264,7 +264,7 @@ String FetchRequest::referrer() const > if (m_referrer == "no-referrer") > return String(); > if (m_referrer == "client") >- return ASCIILiteral("about:client"); >+ return "about:client"_s; > return m_referrer; > } > >@@ -291,7 +291,7 @@ ResourceRequest FetchRequest::resourceRequest() const > ExceptionOr<Ref<FetchRequest>> FetchRequest::clone(ScriptExecutionContext& context) > { > if (isDisturbedOrLocked()) >- return Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }; >+ return Exception { TypeError, "Body is disturbed or locked"_s }; > > auto clone = adoptRef(*new FetchRequest(context, std::nullopt, FetchHeaders::create(m_headers.get()), ResourceRequest { m_request }, FetchOptions { m_options}, String { m_referrer })); > clone->cloneBody(*this); >diff --git a/Source/WebCore/Modules/fetch/FetchResponse.cpp b/Source/WebCore/Modules/fetch/FetchResponse.cpp >index f927880beb5bddcc8edc037318ab0fe8d169737d..ef4a7c225dddedd193b2f575308dac3a3bdf3a79 100644 >--- a/Source/WebCore/Modules/fetch/FetchResponse.cpp >+++ b/Source/WebCore/Modules/fetch/FetchResponse.cpp >@@ -64,11 +64,11 @@ ExceptionOr<Ref<FetchResponse>> FetchResponse::create(ScriptExecutionContext& co > { > // 1. If initâs status member is not in the range 200 to 599, inclusive, then throw a RangeError. > if (init.status < 200 || init.status > 599) >- return Exception { RangeError, ASCIILiteral("Status must be between 200 and 599") }; >+ return Exception { RangeError, "Status must be between 200 and 599"_s }; > > // 2. If initâs statusText member does not match the reason-phrase token production, then throw a TypeError. > if (!isValidReasonPhrase(init.statusText)) >- return Exception { TypeError, ASCIILiteral("Status text must be a valid reason-phrase.") }; >+ return Exception { TypeError, "Status text must be a valid reason-phrase."_s }; > > // 3. Let r be a new Response object associated with a new response. > // NOTE: Creation of the Response object is delayed until all potential exceptional cases are handled. >@@ -96,7 +96,7 @@ ExceptionOr<Ref<FetchResponse>> FetchResponse::create(ScriptExecutionContext& co > // 8.1 If initâs status member is a null body status, then throw a TypeError. > // (NOTE: 101 is included in null body status due to its use elsewhere. It does not affect this step.) > if (isNullBodyStatus(init.status)) >- return Exception { TypeError, ASCIILiteral("Response cannot have a body with the given status.") }; >+ return Exception { TypeError, "Response cannot have a body with the given status."_s }; > > // 8.2 Let Content-Type be null. > String contentType; >@@ -147,7 +147,7 @@ ExceptionOr<Ref<FetchResponse>> FetchResponse::redirect(ScriptExecutionContext& > if (!requestURL.isValid()) > return Exception { TypeError, makeString("Redirection URL '", requestURL.string(), "' is invalid") }; > if (!requestURL.user().isEmpty() || !requestURL.pass().isEmpty()) >- return Exception { TypeError, ASCIILiteral("Redirection URL contains credentials") }; >+ return Exception { TypeError, "Redirection URL contains credentials"_s }; > if (!ResourceResponse::isRedirectionStatusCode(status)) > return Exception { RangeError, makeString("Status code ", status, "is not a redirection status code") }; > auto redirectResponse = adoptRef(*new FetchResponse(context, { }, FetchHeaders::create(FetchHeaders::Guard::Immutable), { })); >@@ -166,7 +166,7 @@ FetchResponse::FetchResponse(ScriptExecutionContext& context, std::optional<Fetc > ExceptionOr<Ref<FetchResponse>> FetchResponse::clone(ScriptExecutionContext& context) > { > if (isDisturbedOrLocked()) >- return Exception { TypeError, ASCIILiteral("Body is disturbed or locked") }; >+ return Exception { TypeError, "Body is disturbed or locked"_s }; > > ASSERT(scriptExecutionContext()); > >@@ -252,7 +252,7 @@ void FetchResponse::BodyLoader::didFail(const ResourceError& error) > #if ENABLE(STREAMS_API) > if (m_response.m_readableStreamSource) { > if (!m_response.m_readableStreamSource->isCancelling()) >- m_response.m_readableStreamSource->error(ASCIILiteral("Loading failed")); >+ m_response.m_readableStreamSource->error("Loading failed"_s); > m_response.m_readableStreamSource = nullptr; > } > #endif >diff --git a/Source/WebCore/Modules/fetch/FetchResponse.h b/Source/WebCore/Modules/fetch/FetchResponse.h >index 47e2ebab6aeb8a96b6eaa9bff70d31bc70b136cb..a8424ea8d19059a1973881087eadbd6be34ff1b9 100644 >--- a/Source/WebCore/Modules/fetch/FetchResponse.h >+++ b/Source/WebCore/Modules/fetch/FetchResponse.h >@@ -51,7 +51,7 @@ class FetchResponse final : public FetchBodyOwner { > > struct Init { > unsigned short status { 200 }; >- String statusText { ASCIILiteral("OK") }; >+ String statusText { "OK"_s }; > std::optional<FetchHeaders::Init> headers; > }; > >diff --git a/Source/WebCore/Modules/geolocation/GeoNotifier.cpp b/Source/WebCore/Modules/geolocation/GeoNotifier.cpp >index 1a28d19ef244f55c909bb1f0707ed78fa27c83b4..77ebf3421c92f30688954229c5b33ee7b0b43340 100644 >--- a/Source/WebCore/Modules/geolocation/GeoNotifier.cpp >+++ b/Source/WebCore/Modules/geolocation/GeoNotifier.cpp >@@ -121,7 +121,7 @@ void GeoNotifier::timerFired() > } > > if (m_errorCallback) { >- auto error = PositionError::create(PositionError::TIMEOUT, ASCIILiteral("Timeout expired")); >+ auto error = PositionError::create(PositionError::TIMEOUT, "Timeout expired"_s); > m_errorCallback->handleEvent(error); > } > m_geolocation->requestTimedOut(this); >diff --git a/Source/WebCore/Modules/geolocation/Geolocation.cpp b/Source/WebCore/Modules/geolocation/Geolocation.cpp >index dcbf703342f63f66543832499dd3b3804d5f4adf..4dc1313da17a19b8c3da66de8a7d7e170496d571 100644 >--- a/Source/WebCore/Modules/geolocation/Geolocation.cpp >+++ b/Source/WebCore/Modules/geolocation/Geolocation.cpp >@@ -47,10 +47,10 @@ > > namespace WebCore { > >-static const char permissionDeniedErrorMessage[] = "User denied Geolocation"; >-static const char failedToStartServiceErrorMessage[] = "Failed to start Geolocation service"; >-static const char framelessDocumentErrorMessage[] = "Geolocation cannot be used in frameless documents"; >-static const char originCannotRequestGeolocationErrorMessage[] = "Origin does not have permission to use Geolocation service"; >+static const ASCIILiteral permissionDeniedErrorMessage { "User denied Geolocation"_s }; >+static const ASCIILiteral failedToStartServiceErrorMessage { "Failed to start Geolocation service"_s }; >+static const ASCIILiteral framelessDocumentErrorMessage { "Geolocation cannot be used in frameless documents"_s }; >+static const ASCIILiteral originCannotRequestGeolocationErrorMessage { "Origin does not have permission to use Geolocation service"_s }; > > static RefPtr<Geoposition> createGeoposition(std::optional<GeolocationPosition>&& position) > { >@@ -371,7 +371,7 @@ bool Geolocation::shouldBlockGeolocationRequests() > void Geolocation::startRequest(GeoNotifier* notifier) > { > if (shouldBlockGeolocationRequests()) { >- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(originCannotRequestGeolocationErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, originCannotRequestGeolocationErrorMessage)); > return; > } > document()->setGeolocationAccessed(); >@@ -379,7 +379,7 @@ void Geolocation::startRequest(GeoNotifier* notifier) > // Check whether permissions have already been denied. Note that if this is the case, > // the permission state can not change again in the lifetime of this page. > if (isDenied()) >- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage)); > else if (haveSuitableCachedPosition(notifier->options())) > notifier->setUseCachedPosition(); > else if (notifier->hasZeroTimeout()) >@@ -391,7 +391,7 @@ void Geolocation::startRequest(GeoNotifier* notifier) > } else if (startUpdating(notifier)) > notifier->startTimerIfNeeded(); > else >- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage)); > } > > void Geolocation::fatalErrorOccurred(GeoNotifier* notifier) >@@ -409,7 +409,7 @@ void Geolocation::requestUsesCachedPosition(GeoNotifier* notifier) > // This is called asynchronously, so the permissions could have been denied > // since we last checked in startRequest. > if (isDenied()) { >- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage)); > return; > } > >@@ -441,7 +441,7 @@ void Geolocation::makeCachedPositionCallbacks() > if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) > notifier->startTimerIfNeeded(); > else >- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage)); > } > } > >@@ -504,7 +504,7 @@ void Geolocation::setIsAllowed(bool allowed) > } > > if (!isAllowed()) { >- auto error = PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)); >+ auto error = PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage); > error->setIsFatal(true); > handleError(error); > m_requestsAwaitingCachedPosition.clear(); >@@ -563,7 +563,7 @@ void Geolocation::stopTimers() > void Geolocation::cancelRequests(GeoNotifierVector& notifiers) > { > for (auto& notifier : notifiers) >- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(framelessDocumentErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, framelessDocumentErrorMessage)); > } > > void Geolocation::cancelAllRequests() >@@ -722,9 +722,9 @@ void Geolocation::handlePendingPermissionNotifiers() > if (startUpdating(notifier.get())) > notifier->startTimerIfNeeded(); > else >- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage)); > } else >- notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); >+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage)); > } > } > >diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >index b1e46dc444861929408e61df1580cc35006828b3..05db83417e5c01c9567a52c02b29dc2760a370c0 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >@@ -110,19 +110,19 @@ ExceptionOr<Ref<IDBRequest>> IDBCursor::update(ExecState& state, JSValue value) > ASSERT(&effectiveObjectStore().transaction().database().originThread() == &Thread::current()); > > if (sourcesDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted."_s }; > > if (!transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished."_s }; > > if (transaction().isReadOnly()) >- return Exception { ReadonlyError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.") }; >+ return Exception { ReadonlyError, "Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction."_s }; > > if (!m_gotValue) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.") }; >+ return Exception { InvalidStateError, "Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end."_s }; > > if (!isKeyCursorWithValue()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.") }; >+ return Exception { InvalidStateError, "Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor."_s }; > > auto& objectStore = effectiveObjectStore(); > auto& optionalKeyPath = objectStore.info().keyPath(); >@@ -131,7 +131,7 @@ ExceptionOr<Ref<IDBRequest>> IDBCursor::update(ExecState& state, JSValue value) > RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, optionalKeyPath.value()); > IDBKeyData keyPathKeyData(keyPathKey.get()); > if (!keyPathKey || keyPathKeyData != m_currentPrimaryKeyData) >- return Exception { DataError, ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.") }; >+ return Exception { DataError, "Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key."_s }; > } > > auto putResult = effectiveObjectStore().putForCursorUpdate(state, value, m_currentPrimaryKey.get()); >@@ -154,16 +154,16 @@ ExceptionOr<void> IDBCursor::advance(unsigned count) > return Exception { InvalidStateError }; > > if (!count) >- return Exception { TypeError, ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.") }; >+ return Exception { TypeError, "Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0."_s }; > > if (!transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished."_s }; > > if (sourcesDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted."_s }; > > if (!m_gotValue) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.") }; >+ return Exception { InvalidStateError, "Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end."_s }; > > m_gotValue = false; > >@@ -175,43 +175,43 @@ ExceptionOr<void> IDBCursor::advance(unsigned count) > ExceptionOr<void> IDBCursor::continuePrimaryKey(ExecState& state, JSValue keyValue, JSValue primaryKeyValue) > { > if (!transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The transaction is inactive or finished."_s }; > > if (sourcesDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's source or effective object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's source or effective object store has been deleted."_s }; > > if (!WTF::holds_alternative<RefPtr<IDBIndex>>(m_source)) >- return Exception { InvalidAccessError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's source is not an index.") }; >+ return Exception { InvalidAccessError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's source is not an index."_s }; > > auto direction = m_info.cursorDirection(); > if (direction != IndexedDB::CursorDirection::Next && direction != IndexedDB::CursorDirection::Prev) >- return Exception { InvalidAccessError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's direction must be either \"next\" or \"prev\".") }; >+ return Exception { InvalidAccessError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor's direction must be either \"next\" or \"prev\"."_s }; > > if (!m_gotValue) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor is being iterated or has iterated past its end.") }; >+ return Exception { InvalidStateError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The cursor is being iterated or has iterated past its end."_s }; > > RefPtr<IDBKey> key = scriptValueToIDBKey(state, keyValue); > if (!key->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is not a valid key."_s }; > > RefPtr<IDBKey> primaryKey = scriptValueToIDBKey(state, primaryKeyValue); > if (!primaryKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The second parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The second parameter is not a valid key."_s }; > > IDBKeyData keyData = { key.get() }; > IDBKeyData primaryKeyData = { primaryKey.get() }; > > if (keyData < m_currentKeyData && direction == IndexedDB::CursorDirection::Next) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is less than this cursor's position and this cursor's direction is \"next\".") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is less than this cursor's position and this cursor's direction is \"next\"."_s }; > > if (keyData > m_currentKeyData && direction == IndexedDB::CursorDirection::Prev) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is greater than this cursor's position and this cursor's direction is \"prev\".") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The first parameter is greater than this cursor's position and this cursor's direction is \"prev\"."_s }; > > if (keyData == m_currentKeyData) { > if (primaryKeyData <= m_currentPrimaryKeyData && direction == IndexedDB::CursorDirection::Next) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The key parameters represent a position less-than-or-equal-to this cursor's position and this cursor's direction is \"next\".") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The key parameters represent a position less-than-or-equal-to this cursor's position and this cursor's direction is \"next\"."_s }; > if (primaryKeyData >= m_currentPrimaryKeyData && direction == IndexedDB::CursorDirection::Prev) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continuePrimaryKey' on 'IDBCursor': The key parameters represent a position greater-than-or-equal-to this cursor's position and this cursor's direction is \"prev\".") }; >+ return Exception { DataError, "Failed to execute 'continuePrimaryKey' on 'IDBCursor': The key parameters represent a position greater-than-or-equal-to this cursor's position and this cursor's direction is \"prev\"."_s }; > } > > m_gotValue = false; >@@ -239,23 +239,23 @@ ExceptionOr<void> IDBCursor::continueFunction(const IDBKeyData& key) > return Exception { InvalidStateError }; > > if (!transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished."_s }; > > if (sourcesDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted."_s }; > > if (!m_gotValue) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.") }; >+ return Exception { InvalidStateError, "Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end."_s }; > > if (!key.isNull() && !key.isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key."_s }; > > if (m_info.isDirectionForward()) { > if (!key.isNull() && key.compare(m_currentKeyData) <= 0) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.") }; >+ return Exception { DataError, "Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position."_s }; > } else { > if (!key.isNull() && key.compare(m_currentKeyData) >= 0) >- return Exception { DataError, ASCIILiteral("Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.") }; >+ return Exception { DataError, "Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position."_s }; > } > > m_gotValue = false; >@@ -291,19 +291,19 @@ ExceptionOr<Ref<WebCore::IDBRequest>> IDBCursor::deleteFunction(ExecState& state > ASSERT(&effectiveObjectStore().transaction().database().originThread() == &Thread::current()); > > if (sourcesDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted."_s }; > > if (!transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished."_s }; > > if (transaction().isReadOnly()) >- return Exception { ReadonlyError, ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.") }; >+ return Exception { ReadonlyError, "Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction."_s }; > > if (!m_gotValue) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.") }; >+ return Exception { InvalidStateError, "Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end."_s }; > > if (!isKeyCursorWithValue()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.") }; >+ return Exception { InvalidStateError, "Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor."_s }; > > auto result = effectiveObjectStore().deleteFunction(state, m_currentPrimaryKey.get()); > if (result.hasException()) >diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >index ddc820fe93fd6e8b6901287cddc51d1530df997a..032857551e87ca8da993835b3ecc42f26666f33a 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp >@@ -139,20 +139,20 @@ ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String& na > ASSERT(!m_versionChangeTransaction || m_versionChangeTransaction->isVersionChange()); > > if (!m_versionChangeTransaction) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction."_s }; > > if (!m_versionChangeTransaction->isActive()) > return Exception { TransactionInactiveError }; > > if (m_info.hasObjectStore(name)) >- return Exception { ConstraintError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.") }; >+ return Exception { ConstraintError, "Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists."_s }; > > auto& keyPath = parameters.keyPath; > if (keyPath && !isIDBKeyPathValid(keyPath.value())) >- return Exception { SyntaxError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.") }; >+ return Exception { SyntaxError, "Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path."_s }; > > if (keyPath && parameters.autoIncrement && ((WTF::holds_alternative<String>(keyPath.value()) && WTF::get<String>(keyPath.value()).isEmpty()) || WTF::holds_alternative<Vector<String>>(keyPath.value()))) >- return Exception { InvalidAccessError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.") }; >+ return Exception { InvalidAccessError, "Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array."_s }; > > // Install the new ObjectStore into the connection's metadata. > auto info = m_info.createNewObjectStore(name, WTFMove(keyPath), parameters.autoIncrement); >@@ -168,7 +168,7 @@ ExceptionOr<Ref<IDBTransaction>> IDBDatabase::transaction(StringOrVectorOfString > ASSERT(&originThread() == &Thread::current()); > > if (m_closePending) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.") }; >+ return Exception { InvalidStateError, "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing."_s }; > > Vector<String> objectStores; > if (WTF::holds_alternative<Vector<String>>(storeNames)) >@@ -177,13 +177,13 @@ ExceptionOr<Ref<IDBTransaction>> IDBDatabase::transaction(StringOrVectorOfString > objectStores.append(WTFMove(WTF::get<String>(storeNames))); > > if (objectStores.isEmpty()) >- return Exception { InvalidAccessError, ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.") }; >+ return Exception { InvalidAccessError, "Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty."_s }; > > if (mode != IDBTransactionMode::Readonly && mode != IDBTransactionMode::Readwrite) > return Exception { TypeError }; > > if (m_versionChangeTransaction && !m_versionChangeTransaction->isFinishedOrFinishing()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.") }; >+ return Exception { InvalidStateError, "Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running."_s }; > > // It is valid for javascript to pass in a list of object store names with the same name listed twice, > // so we need to put them all in a set to get a unique list. >@@ -196,7 +196,7 @@ ExceptionOr<Ref<IDBTransaction>> IDBDatabase::transaction(StringOrVectorOfString > for (auto& objectStoreName : objectStores) { > if (m_info.hasObjectStore(objectStoreName)) > continue; >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found."_s }; > } > > auto info = IDBTransactionInfo::clientTransaction(m_connectionProxy.get(), objectStores, mode); >@@ -218,13 +218,13 @@ ExceptionOr<void> IDBDatabase::deleteObjectStore(const String& objectStoreName) > ASSERT(&originThread() == &Thread::current()); > > if (!m_versionChangeTransaction) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction."_s }; > > if (!m_versionChangeTransaction->isActive()) > return Exception { TransactionInactiveError }; > > if (!m_info.hasObjectStore(objectStoreName)) >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found."_s }; > > m_info.deleteObjectStore(objectStoreName); > m_versionChangeTransaction->deleteObjectStore(objectStoreName); >diff --git a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >index d7e4727c058f08d3485c514fbb5f7bf87734b054..9fa34cc2677638d973a965faf33f143488fbb9e3 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBFactory.cpp >@@ -77,7 +77,7 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::open(ScriptExecutionContext& cont > LOG(IndexedDB, "IDBFactory::open"); > > if (version && !version.value()) >- return Exception { TypeError, ASCIILiteral("IDBFactory.open() called with a version of 0") }; >+ return Exception { TypeError, "IDBFactory.open() called with a version of 0"_s }; > > return openInternal(context, name, version.value_or(0)); > } >@@ -85,15 +85,15 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::open(ScriptExecutionContext& cont > ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::openInternal(ScriptExecutionContext& context, const String& name, uint64_t version) > { > if (name.isNull()) >- return Exception { TypeError, ASCIILiteral("IDBFactory.open() called without a database name") }; >+ return Exception { TypeError, "IDBFactory.open() called without a database name"_s }; > > if (shouldThrowSecurityException(context)) >- return Exception { SecurityError, ASCIILiteral("IDBFactory.open() called in an invalid security context") }; >+ return Exception { SecurityError, "IDBFactory.open() called in an invalid security context"_s }; > > ASSERT(context.securityOrigin()); > IDBDatabaseIdentifier databaseIdentifier(name, SecurityOriginData { context.securityOrigin()->data() }, SecurityOriginData { context.topOrigin().data() }); > if (!databaseIdentifier.isValid()) >- return Exception { TypeError, ASCIILiteral("IDBFactory.open() called with an invalid security origin") }; >+ return Exception { TypeError, "IDBFactory.open() called with an invalid security origin"_s }; > > LOG(IndexedDBOperations, "IDB opening database: %s %" PRIu64, name.utf8().data(), version); > >@@ -105,15 +105,15 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::deleteDatabase(ScriptExecutionCon > LOG(IndexedDB, "IDBFactory::deleteDatabase - %s", name.utf8().data()); > > if (name.isNull()) >- return Exception { TypeError, ASCIILiteral("IDBFactory.deleteDatabase() called without a database name") }; >+ return Exception { TypeError, "IDBFactory.deleteDatabase() called without a database name"_s }; > > if (shouldThrowSecurityException(context)) >- return Exception { SecurityError, ASCIILiteral("IDBFactory.deleteDatabase() called in an invalid security context") }; >+ return Exception { SecurityError, "IDBFactory.deleteDatabase() called in an invalid security context"_s }; > > ASSERT(context.securityOrigin()); > IDBDatabaseIdentifier databaseIdentifier(name, SecurityOriginData { context.securityOrigin()->data() }, SecurityOriginData { context.topOrigin().data() }); > if (!databaseIdentifier.isValid()) >- return Exception { TypeError, ASCIILiteral("IDBFactory.deleteDatabase() called with an invalid security origin") }; >+ return Exception { TypeError, "IDBFactory.deleteDatabase() called with an invalid security origin"_s }; > > LOG(IndexedDBOperations, "IDB deleting database: %s", name.utf8().data()); > >@@ -126,7 +126,7 @@ ExceptionOr<short> IDBFactory::cmp(ExecState& execState, JSValue firstValue, JSV > auto second = scriptValueToIDBKey(execState, secondValue); > > if (!first->isValid() || !second->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key."_s }; > > return first->compare(second.get()); > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBIndex.cpp b/Source/WebCore/Modules/indexeddb/IDBIndex.cpp >index 308305b8e6ecb67041016d65fe5683a061b525c4..1919e469418c05c8ae7723ed66111d9a3e45516b 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBIndex.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBIndex.cpp >@@ -83,16 +83,16 @@ ExceptionOr<void> IDBIndex::setName(const String& name) > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index has been deleted.") }; >+ return Exception { InvalidStateError, "Failed set property 'name' on 'IDBIndex': The index has been deleted."_s }; > > if (m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed set property 'name' on 'IDBIndex': The index's object store has been deleted."_s }; > > if (!m_objectStore.transaction().isVersionChange()) >- return Exception { InvalidStateError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's transaction is not a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed set property 'name' on 'IDBIndex': The index's transaction is not a version change transaction."_s }; > > if (!m_objectStore.transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBIndex': The index's transaction is not active.") }; >+ return Exception { TransactionInactiveError, "Failed set property 'name' on 'IDBIndex': The index's transaction is not active."_s }; > > if (m_info.name() == name) > return { }; >@@ -154,10 +154,10 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::openCursor(ExecState& execState, IDBKeyRa > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (!m_objectStore.transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished."_s }; > > IDBKeyRangeData rangeData = range; > if (rangeData.lowerKey.isNull()) >@@ -176,7 +176,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::openCursor(ExecState& execState, JSValue > > auto keyRange = IDBKeyRange::only(execState, key); > if (keyRange.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key."_s }; > > return openCursor(execState, keyRange.releaseReturnValue().ptr(), direction); > } >@@ -187,10 +187,10 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::openKeyCursor(ExecState& execState, IDBKe > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (!m_objectStore.transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished."_s }; > > auto info = IDBCursorInfo::indexCursor(m_objectStore.transaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly); > return m_objectStore.transaction().requestOpenCursor(execState, *this, info); >@@ -202,7 +202,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::openKeyCursor(ExecState& execState, JSVal > > auto keyRange = IDBKeyRange::only(execState, key); > if (keyRange.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key."_s }; > return openKeyCursor(execState, keyRange.releaseReturnValue().ptr(), direction); > } > >@@ -219,7 +219,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::count(ExecState& execState, JSValue key) > > auto idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key."_s }; > > return doCount(execState, IDBKeyRangeData(idbKey.ptr())); > } >@@ -229,14 +229,14 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::doCount(ExecState& execState, const IDBKe > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (!range.isValid()) > return Exception { DataError }; > > auto& transaction = m_objectStore.transaction(); > if (!transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished."_s }; > > return transaction.requestCount(execState, *this, range); > } >@@ -254,7 +254,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::get(ExecState& execState, JSValue key) > > auto idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key."_s }; > > return doGet(execState, IDBKeyRangeData(idbKey.ptr())); > } >@@ -264,14 +264,14 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::doGet(ExecState& execState, const IDBKeyR > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (range.isNull) > return Exception { DataError }; > > auto& transaction = m_objectStore.transaction(); > if (!transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished."_s }; > > return transaction.requestGetValue(execState, *this, range); > } >@@ -289,7 +289,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::getKey(ExecState& execState, JSValue key) > > auto idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key."_s }; > > return doGetKey(execState, IDBKeyRangeData(idbKey.ptr())); > } >@@ -299,14 +299,14 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::doGetKey(ExecState& execState, const IDBK > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (range.isNull) > return Exception { DataError }; > > auto& transaction = m_objectStore.transaction(); > if (!transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished."_s }; > > return transaction.requestGetKey(execState, *this, range); > } >@@ -317,10 +317,10 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::getAll(ExecState& execState, RefPtr<IDBKe > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getAll' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getAll' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (!m_objectStore.transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getAll' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getAll' on 'IDBIndex': The transaction is inactive or finished."_s }; > > return m_objectStore.transaction().requestGetAllIndexRecords(execState, *this, range.get(), IndexedDB::GetAllType::Values, count); > } >@@ -329,7 +329,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::getAll(ExecState& execState, JSValue key, > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getAll' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getAll' on 'IDBIndex': The parameter is not a valid key."_s }; > > return getAll(execState, onlyResult.releaseReturnValue(), count); > } >@@ -340,10 +340,10 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::getAllKeys(ExecState& execState, RefPtr<I > ASSERT(&m_objectStore.transaction().database().originThread() == &Thread::current()); > > if (m_deleted || m_objectStore.isDeleted()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBIndex': The index or its object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getAllKeys' on 'IDBIndex': The index or its object store has been deleted."_s }; > > if (!m_objectStore.transaction().isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBIndex': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getAllKeys' on 'IDBIndex': The transaction is inactive or finished."_s }; > > return m_objectStore.transaction().requestGetAllIndexRecords(execState, *this, range.get(), IndexedDB::GetAllType::Keys, count); > } >@@ -352,7 +352,7 @@ ExceptionOr<Ref<IDBRequest>> IDBIndex::getAllKeys(ExecState& execState, JSValue > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBIndex': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getAllKeys' on 'IDBIndex': The parameter is not a valid key."_s }; > > return getAllKeys(execState, onlyResult.releaseReturnValue(), count); > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp b/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp >index 2e93645664051f7162c49027809c37b2454b769b..0dbc73043df051eb5e39e4de4fd0936468513206 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp >@@ -371,7 +371,7 @@ String IDBKeyData::loggingString() const > > if (result.length() > 150) { > result.truncate(147); >- result.append(WTF::ASCIILiteral("...")); >+ result.append(WTF::"..."_s); > } > > return result; >diff --git a/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp b/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp >index 7132edb812a11a6f1314b361630635d9c3662138..bf8ab6c0a73913e2acd793ca58a26bd2c6f09d56 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBKeyRangeData.cpp >@@ -119,7 +119,7 @@ String IDBKeyRangeData::loggingString() const > auto result = makeString(lowerOpen ? "( " : "[ ", lowerKey.loggingString(), ", ", upperKey.loggingString(), upperOpen ? " )" : " ]"); > if (result.length() > 400) { > result.truncate(397); >- result.append(WTF::ASCIILiteral("...")); >+ result.append(WTF::"..."_s); > } > > return result; >diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >index 12c9bad51a354ae75f0d276517b4e89a59ae7d8d..3c50ebcd69b7a3c3fb84a6a3a4d315ad62d43612 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >@@ -96,13 +96,13 @@ ExceptionOr<void> IDBObjectStore::setName(const String& name) > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed set property 'name' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isVersionChange()) >- return Exception { InvalidStateError, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not a version change transaction."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active.") }; >+ return Exception { TransactionInactiveError, "Failed set property 'name' on 'IDBObjectStore': The object store's transaction is not active."_s }; > > if (m_info.name() == name) > return { }; >@@ -155,10 +155,10 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openCursor(ExecState& execState, Re > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > auto info = IDBCursorInfo::objectStoreCursor(m_transaction, m_info.identifier(), range.get(), direction, IndexedDB::CursorType::KeyAndValue); > return m_transaction.requestOpenCursor(execState, *this, info); >@@ -168,7 +168,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openCursor(ExecState& execState, JS > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return openCursor(execState, onlyResult.releaseReturnValue(), direction); > } >@@ -179,10 +179,10 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openKeyCursor(ExecState& execState, > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'openKeyCursor' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'openKeyCursor' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > auto info = IDBCursorInfo::objectStoreCursor(m_transaction, m_info.identifier(), range.get(), direction, IndexedDB::CursorType::KeyOnly); > return m_transaction.requestOpenCursor(execState, *this, info); >@@ -192,7 +192,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::openKeyCursor(ExecState& execState, > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBObjectStore': The parameter is not a valid key or key range.") }; >+ return Exception { DataError, "Failed to execute 'openKeyCursor' on 'IDBObjectStore': The parameter is not a valid key or key range."_s }; > > return openKeyCursor(execState, onlyResult.releaseReturnValue(), direction); > } >@@ -203,14 +203,14 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::get(ExecState& execState, JSValue k > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > auto idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return m_transaction.requestGetRecord(execState, *this, { idbKey.ptr(), IDBGetRecordDataType::KeyAndValue }); > } >@@ -221,7 +221,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::get(ExecState& execState, IDBKeyRan > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) > return Exception { TransactionInactiveError }; >@@ -239,14 +239,14 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getKey(ExecState& execState, JSValu > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > auto idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return m_transaction.requestGetRecord(execState, *this, { idbKey.ptr(), IDBGetRecordDataType::KeyOnly }); > } >@@ -257,14 +257,14 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getKey(ExecState& execState, IDBKey > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getKey' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getKey' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > IDBKeyRangeData keyRangeData(keyRange); > if (!keyRangeData.isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key range.") }; >+ return Exception { DataError, "Failed to execute 'getKey' on 'IDBObjectStore': The parameter is not a valid key range."_s }; > > return m_transaction.requestGetRecord(execState, *this, { keyRangeData, IDBGetRecordDataType::KeyOnly }); > } >@@ -300,23 +300,23 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::putOrAdd(ExecState& state, JSValue > > auto context = scriptExecutionContextFromExecState(&state); > if (!context) >- return Exception { UnknownError, ASCIILiteral("Unable to store record in object store because it does not have a valid script execution context") }; >+ return Exception { UnknownError, "Unable to store record in object store because it does not have a valid script execution context"_s }; > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to store record in an IDBObjectStore: The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to store record in an IDBObjectStore: The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to store record in an IDBObjectStore: The transaction is inactive or finished."_s }; > > if (m_transaction.isReadOnly()) >- return Exception { ReadonlyError, ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is read-only.") }; >+ return Exception { ReadonlyError, "Failed to store record in an IDBObjectStore: The transaction is read-only."_s }; > > auto serializedValue = SerializedScriptValue::create(state, value); > if (UNLIKELY(scope.exception())) { > // Clear the DOM exception from the serializer so we can give a more targeted exception. > scope.clearException(); > >- return Exception { DataCloneError, ASCIILiteral("Failed to store record in an IDBObjectStore: An object could not be cloned.") }; >+ return Exception { DataCloneError, "Failed to store record in an IDBObjectStore: An object could not be cloned."_s }; > } > > bool privateBrowsingEnabled = false; >@@ -327,25 +327,25 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::putOrAdd(ExecState& state, JSValue > > if (serializedValue->hasBlobURLs() && privateBrowsingEnabled) { > // https://bugs.webkit.org/show_bug.cgi?id=156347 - Support Blobs in private browsing. >- return Exception { DataCloneError, ASCIILiteral("Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.") }; >+ return Exception { DataCloneError, "Failed to store record in an IDBObjectStore: BlobURLs are not yet supported."_s }; > } > > if (key && !key->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to store record in an IDBObjectStore: The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to store record in an IDBObjectStore: The parameter is not a valid key."_s }; > > bool usesInlineKeys = !!m_info.keyPath(); > bool usesKeyGenerator = autoIncrement(); > if (usesInlineKeys && inlineKeyCheck == InlineKeyCheck::Perform) { > if (key) >- return Exception { DataError, ASCIILiteral("Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided.") }; >+ return Exception { DataError, "Failed to store record in an IDBObjectStore: The object store uses in-line keys and the key parameter was provided."_s }; > > RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath().value()); > if (keyPathKey && !keyPathKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key.") }; >+ return Exception { DataError, "Failed to store record in an IDBObjectStore: Evaluating the object store's key path yielded a value that is not a valid key."_s }; > > if (!keyPathKey) { > if (!usesKeyGenerator) >- return Exception { DataError, ASCIILiteral("Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.") }; >+ return Exception { DataError, "Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value."_s }; > if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath().value())) > return Exception { DataError }; > } >@@ -355,7 +355,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::putOrAdd(ExecState& state, JSValue > key = keyPathKey; > } > } else if (!usesKeyGenerator && !key) >- return Exception { DataError, ASCIILiteral("Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.") }; >+ return Exception { DataError, "Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided."_s }; > > return m_transaction.requestPutOrAdd(state, *this, key.get(), *serializedValue, overwriteMode); > } >@@ -376,17 +376,17 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::doDelete(ExecState& execState, IDBK > // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit. > // Until this is sorted out, we'll agree with the test and the majority share browsers. > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'delete' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > if (m_transaction.isReadOnly()) >- return Exception { ReadonlyError, ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.") }; >+ return Exception { ReadonlyError, "Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only."_s }; > > IDBKeyRangeData keyRangeData(keyRange); > if (!keyRangeData.isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.") }; >+ return Exception { DataError, "Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range."_s }; > > return m_transaction.requestDeleteRecord(execState, *this, keyRangeData); > } >@@ -395,7 +395,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::deleteFunction(ExecState& execState > { > Ref<IDBKey> idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key."_s }; > return doDelete(execState, IDBKeyRange::create(WTFMove(idbKey)).ptr()); > } > >@@ -410,13 +410,13 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::clear(ExecState& execState) > // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit. > // Until this is sorted out, we'll agree with the test and the majority share browsers. > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > if (m_transaction.isReadOnly()) >- return Exception { ReadonlyError, ASCIILiteral("Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.") }; >+ return Exception { ReadonlyError, "Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only."_s }; > > return m_transaction.requestClearObjectStore(execState, *this); > } >@@ -427,25 +427,25 @@ ExceptionOr<Ref<IDBIndex>> IDBObjectStore::createIndex(ExecState&, const String& > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (!m_transaction.isVersionChange()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction."_s }; > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'createIndex' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The transaction is inactive.")}; >+ return Exception { TransactionInactiveError, "Failed to execute 'createIndex' on 'IDBObjectStore': The transaction is inactive."_s}; > > if (m_info.hasIndex(name)) >- return Exception { ConstraintError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.") }; >+ return Exception { ConstraintError, "Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists."_s }; > > if (!isIDBKeyPathValid(keyPath)) >- return Exception { SyntaxError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.") }; >+ return Exception { SyntaxError, "Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path."_s }; > > if (name.isNull()) > return Exception { TypeError }; > > if (parameters.multiEntry && WTF::holds_alternative<Vector<String>>(keyPath)) >- return Exception { InvalidAccessError, ASCIILiteral("Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.") }; >+ return Exception { InvalidAccessError, "Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true."_s }; > > // Install the new Index into the ObjectStore's info. > IDBIndexInfo info = m_info.createNewIndex(name, WTFMove(keyPath), parameters.unique, parameters.multiEntry); >@@ -471,10 +471,10 @@ ExceptionOr<Ref<IDBIndex>> IDBObjectStore::index(const String& indexName) > return Exception { InvalidStateError }; // FIXME: Is this code tested? Is iteven reachable? > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'index' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'index' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (m_transaction.isFinishedOrFinishing()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'index' on 'IDBObjectStore': The transaction is finished.") }; >+ return Exception { InvalidStateError, "Failed to execute 'index' on 'IDBObjectStore': The transaction is finished."_s }; > > Locker<Lock> locker(m_referencedIndexLock); > auto iterator = m_referencedIndexes.find(indexName); >@@ -483,7 +483,7 @@ ExceptionOr<Ref<IDBIndex>> IDBObjectStore::index(const String& indexName) > > auto* info = m_info.infoForExistingIndex(indexName); > if (!info) >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'index' on 'IDBObjectStore': The specified index was not found."_s }; > > auto index = std::make_unique<IDBIndex>(*scriptExecutionContext(), *info, *this); > >@@ -500,16 +500,16 @@ ExceptionOr<void> IDBObjectStore::deleteIndex(const String& name) > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'deleteIndex' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isVersionChange()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction.") }; >+ return Exception { InvalidStateError, "Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'deleteIndex' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > if (!m_info.hasIndex(name)) >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found."_s }; > > auto* info = m_info.infoForExistingIndex(name); > ASSERT(info); >@@ -536,7 +536,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::count(ExecState& execState, JSValue > > Ref<IDBKey> idbKey = scriptValueToIDBKey(execState, key); > if (!idbKey->isValid()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return doCount(execState, IDBKeyRangeData(idbKey.ptr())); > } >@@ -558,10 +558,10 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::doCount(ExecState& execState, const > // Additionally, Chrome and Edge agree with the test, as does Legacy IDB in WebKit. > // Until this is sorted out, we'll agree with the test and the majority share browsers. > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > if (!range.isValid()) > return Exception { DataError }; >@@ -575,10 +575,10 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getAll(ExecState& execState, RefPtr > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getAll' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getAll' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getAll' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getAll' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > return m_transaction.requestGetAllObjectStoreRecords(execState, *this, range.get(), IndexedDB::GetAllType::Values, count); > } >@@ -587,7 +587,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getAll(ExecState& execState, JSValu > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getAll' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getAll' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return getAll(execState, onlyResult.releaseReturnValue(), count); > } >@@ -598,10 +598,10 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getAllKeys(ExecState& execState, Re > ASSERT(&m_transaction.database().originThread() == &Thread::current()); > > if (m_deleted) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBObjectStore': The object store has been deleted.") }; >+ return Exception { InvalidStateError, "Failed to execute 'getAllKeys' on 'IDBObjectStore': The object store has been deleted."_s }; > > if (!m_transaction.isActive()) >- return Exception { TransactionInactiveError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBObjectStore': The transaction is inactive or finished.") }; >+ return Exception { TransactionInactiveError, "Failed to execute 'getAllKeys' on 'IDBObjectStore': The transaction is inactive or finished."_s }; > > return m_transaction.requestGetAllObjectStoreRecords(execState, *this, range.get(), IndexedDB::GetAllType::Keys, count); > } >@@ -610,7 +610,7 @@ ExceptionOr<Ref<IDBRequest>> IDBObjectStore::getAllKeys(ExecState& execState, JS > { > auto onlyResult = IDBKeyRange::only(execState, key); > if (onlyResult.hasException()) >- return Exception { DataError, ASCIILiteral("Failed to execute 'getAllKeys' on 'IDBObjectStore': The parameter is not a valid key.") }; >+ return Exception { DataError, "Failed to execute 'getAllKeys' on 'IDBObjectStore': The parameter is not a valid key."_s }; > > return getAllKeys(execState, onlyResult.releaseReturnValue(), count); > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >index 51f80a75bcf930991ad1f4eac8ba56cdc8fb1a73..afdc99ac8c8e924aafca19a3b7324211024fe120 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >@@ -156,7 +156,7 @@ IDBRequest::~IDBRequest() > ExceptionOr<std::optional<IDBRequest::Result>> IDBRequest::result() const > { > if (!isDone()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to read the 'result' property from 'IDBRequest': The request has not finished.") }; >+ return Exception { InvalidStateError, "Failed to read the 'result' property from 'IDBRequest': The request has not finished."_s }; > > return std::optional<IDBRequest::Result> { m_result }; > } >@@ -166,7 +166,7 @@ ExceptionOr<DOMException*> IDBRequest::error() const > ASSERT(&originThread() == &Thread::current()); > > if (!isDone()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to read the 'error' property from 'IDBRequest': The request has not finished.") }; >+ return Exception { InvalidStateError, "Failed to read the 'error' property from 'IDBRequest': The request has not finished."_s }; > > return m_domError.get(); > } >@@ -350,7 +350,7 @@ void IDBRequest::uncaughtExceptionInEventHandler() > ASSERT(&originThread() == &Thread::current()); > > if (m_transaction && m_idbError.code() != AbortError) >- m_transaction->abortDueToFailedRequest(DOMException::create(AbortError, ASCIILiteral("IDBTransaction will abort due to uncaught exception in an event handler"))); >+ m_transaction->abortDueToFailedRequest(DOMException::create(AbortError, "IDBTransaction will abort due to uncaught exception in an event handler"_s)); > } > > void IDBRequest::setResult(const IDBKeyData& keyData) >diff --git a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >index a9d640e50a0798cfeb2148a1ba170a848a5ca09b..95fc867c8fee6b72804480f30dff83ef42410192 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp >@@ -149,7 +149,7 @@ ExceptionOr<Ref<IDBObjectStore>> IDBTransaction::objectStore(const String& objec > return Exception { InvalidStateError }; > > if (isFinishedOrFinishing()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The transaction finished.") }; >+ return Exception { InvalidStateError, "Failed to execute 'objectStore' on 'IDBTransaction': The transaction finished."_s }; > > Locker<Lock> locker(m_referencedObjectStoreLock); > >@@ -166,11 +166,11 @@ ExceptionOr<Ref<IDBObjectStore>> IDBTransaction::objectStore(const String& objec > > auto* info = m_database->info().infoForExistingObjectStore(objectStoreName); > if (!info) >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found."_s }; > > // Version change transactions are scoped to every object store in the database. > if (!info || (!found && !isVersionChange())) >- return Exception { NotFoundError, ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.") }; >+ return Exception { NotFoundError, "Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found."_s }; > > auto objectStore = std::make_unique<IDBObjectStore>(*scriptExecutionContext(), *info, *this); > auto* rawObjectStore = objectStore.get(); >@@ -207,7 +207,7 @@ ExceptionOr<void> IDBTransaction::abort() > ASSERT(&m_database->originThread() == &Thread::current()); > > if (isFinishedOrFinishing()) >- return Exception { InvalidStateError, ASCIILiteral("Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.") }; >+ return Exception { InvalidStateError, "Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished."_s }; > > internalAbort(); > >@@ -1211,7 +1211,7 @@ void IDBTransaction::putOrAddOnServer(IDBClient::TransactionOperation& operation > // If the IDBValue doesn't have any data, then something went wrong writing the blobs to disk. > // In that case, we cannot successfully store this record, so we callback with an error. > RefPtr<IDBClient::TransactionOperation> protectedOperation(&operation); >- auto result = IDBResultData::error(operation.identifier(), IDBError { UnknownError, ASCIILiteral("Error preparing Blob/File data to be stored in object store") }); >+ auto result = IDBResultData::error(operation.identifier(), IDBError { UnknownError, "Error preparing Blob/File data to be stored in object store"_s }); > scriptExecutionContext()->postTask([protectedOperation = WTFMove(protectedOperation), result = WTFMove(result)](ScriptExecutionContext&) { > protectedOperation->doComplete(result); > }); >@@ -1233,7 +1233,7 @@ void IDBTransaction::putOrAddOnServer(IDBClient::TransactionOperation& operation > > // If the IDBValue doesn't have any data, then something went wrong writing the blobs to disk. > // In that case, we cannot successfully store this record, so we callback with an error. >- auto result = IDBResultData::error(protectedOperation->identifier(), IDBError { UnknownError, ASCIILiteral("Error preparing Blob/File data to be stored in object store") }); >+ auto result = IDBResultData::error(protectedOperation->identifier(), IDBError { UnknownError, "Error preparing Blob/File data to be stored in object store"_s }); > callOnMainThread([protectedThis = WTFMove(protectedThis), protectedOperation = WTFMove(protectedOperation), result = WTFMove(result)]() mutable { > protectedOperation->doComplete(result); > }); >diff --git a/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp b/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp >index c8912c16a89c3142d0163e604b6a769efe4d2365..afe575dbe202eca59e28ff19d8dc018490641aa0 100644 >--- a/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp >@@ -459,7 +459,7 @@ void IDBServer::performGetAllDatabaseNames(uint64_t serverConnectionIdentifier, > { > String directory = IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot(mainFrameOrigin, openingOrigin, m_databaseDirectoryPath); > >- Vector<String> entries = FileSystem::listDirectory(directory, ASCIILiteral("*")); >+ Vector<String> entries = FileSystem::listDirectory(directory, "*"_s); > Vector<String> databases; > databases.reserveInitialCapacity(entries.size()); > for (auto& entry : entries) { >diff --git a/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp b/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp >index f7d664f45ba04420175f192081c1036c9dab079b..df82482e9a4dcfa5e8979bd29dccdbd33216ea50 100644 >--- a/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp >@@ -322,11 +322,11 @@ IDBError MemoryIDBBackingStore::deleteRange(const IDBResourceIdentifier& transac > ASSERT(objectStoreIdentifier); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to delete from") }; >+ return IDBError { UnknownError, "No backing store transaction found to delete from"_s }; > > MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > objectStore->deleteRange(range); > return IDBError { }; >@@ -340,11 +340,11 @@ IDBError MemoryIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti > > auto transaction = m_transactions.get(transactionIdentifier); > if (!transaction) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to put record") }; >+ return IDBError { UnknownError, "No backing store transaction found to put record"_s }; > > MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreInfo.identifier()); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found to put record") }; >+ return IDBError { UnknownError, "No backing store object store found to put record"_s }; > > return objectStore->addRecord(*transaction, keyData, value); > } >@@ -356,11 +356,11 @@ IDBError MemoryIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > ASSERT(objectStoreIdentifier); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to get record") }; >+ return IDBError { UnknownError, "No backing store transaction found to get record"_s }; > > MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > switch (type) { > case IDBGetRecordDataType::KeyAndValue: >@@ -381,16 +381,16 @@ IDBError MemoryIDBBackingStore::getAllRecords(const IDBResourceIdentifier& trans > ASSERT(getAllRecordsData.objectStoreIdentifier); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to get all records") }; >+ return IDBError { UnknownError, "No backing store transaction found to get all records"_s }; > > auto* objectStore = m_objectStoresByIdentifier.get(getAllRecordsData.objectStoreIdentifier); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > if (getAllRecordsData.indexIdentifier) { > auto* index = objectStore->indexForIdentifier(getAllRecordsData.indexIdentifier); > if (!index) >- return IDBError { UnknownError, ASCIILiteral("No backing store index found") }; >+ return IDBError { UnknownError, "No backing store index found"_s }; > > index->getAllRecords(getAllRecordsData.keyRangeData, getAllRecordsData.count, getAllRecordsData.getAllType, result); > } else >@@ -406,11 +406,11 @@ IDBError MemoryIDBBackingStore::getIndexRecord(const IDBResourceIdentifier& tran > ASSERT(objectStoreIdentifier); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to get record") }; >+ return IDBError { UnknownError, "No backing store transaction found to get record"_s }; > > MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > outValue = objectStore->indexValueForKeyRange(indexIdentifier, recordType, range); > return IDBError { }; >@@ -423,11 +423,11 @@ IDBError MemoryIDBBackingStore::getCount(const IDBResourceIdentifier& transactio > ASSERT(objectStoreIdentifier); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found to get count") }; >+ return IDBError { UnknownError, "No backing store transaction found to get count"_s }; > > MemoryObjectStore* objectStore = m_objectStoresByIdentifier.get(objectStoreIdentifier); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > outCount = objectStore->countForKeyRange(indexIdentifier, range); > >@@ -499,17 +499,17 @@ IDBError MemoryIDBBackingStore::openCursor(const IDBResourceIdentifier& transact > ASSERT(!MemoryCursor::cursorForIdentifier(info.identifier())); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found in which to open a cursor") }; >+ return IDBError { UnknownError, "No backing store transaction found in which to open a cursor"_s }; > > switch (info.cursorSource()) { > case IndexedDB::CursorSource::ObjectStore: { > auto* objectStore = m_objectStoresByIdentifier.get(info.sourceIdentifier()); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > MemoryCursor* cursor = objectStore->maybeOpenCursor(info); > if (!cursor) >- return IDBError { UnknownError, ASCIILiteral("Could not create object store cursor in backing store") }; >+ return IDBError { UnknownError, "Could not create object store cursor in backing store"_s }; > > cursor->currentData(outData); > break; >@@ -517,15 +517,15 @@ IDBError MemoryIDBBackingStore::openCursor(const IDBResourceIdentifier& transact > case IndexedDB::CursorSource::Index: > auto* objectStore = m_objectStoresByIdentifier.get(info.objectStoreIdentifier()); > if (!objectStore) >- return IDBError { UnknownError, ASCIILiteral("No backing store object store found") }; >+ return IDBError { UnknownError, "No backing store object store found"_s }; > > auto* index = objectStore->indexForIdentifier(info.sourceIdentifier()); > if (!index) >- return IDBError { UnknownError, ASCIILiteral("No backing store index found") }; >+ return IDBError { UnknownError, "No backing store index found"_s }; > > MemoryCursor* cursor = index->maybeOpenCursor(info); > if (!cursor) >- return IDBError { UnknownError, ASCIILiteral("Could not create index cursor in backing store") }; >+ return IDBError { UnknownError, "Could not create index cursor in backing store"_s }; > > cursor->currentData(outData); > break; >@@ -539,11 +539,11 @@ IDBError MemoryIDBBackingStore::iterateCursor(const IDBResourceIdentifier& trans > LOG(IndexedDB, "MemoryIDBBackingStore::iterateCursor"); > > if (!m_transactions.contains(transactionIdentifier)) >- return IDBError { UnknownError, ASCIILiteral("No backing store transaction found in which to iterate cursor") }; >+ return IDBError { UnknownError, "No backing store transaction found in which to iterate cursor"_s }; > > auto* cursor = MemoryCursor::cursorForIdentifier(cursorIdentifier); > if (!cursor) >- return IDBError { UnknownError, ASCIILiteral("No backing store cursor found in which to iterate cursor") }; >+ return IDBError { UnknownError, "No backing store cursor found in which to iterate cursor"_s }; > > cursor->iterate(data.keyData, data.primaryKeyData, data.count, outData); > >diff --git a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >index 37b775af0fe3d8f18521161141564066b0407119..86f809cf25272089de4e9dcb024eabb0b75bd19b 100644 >--- a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp >@@ -580,7 +580,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::createAndPopulateInitial > } > > { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("INSERT INTO IDBDatabaseInfo VALUES ('MetadataVersion', ?);")); >+ SQLiteStatement sql(*m_sqliteDB, "INSERT INTO IDBDatabaseInfo VALUES ('MetadataVersion', ?);"_s); > if (sql.prepare() != SQLITE_OK > || sql.bindInt(1, currentMetadataVersion) != SQLITE_OK > || sql.step() != SQLITE_DONE) { >@@ -590,7 +590,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::createAndPopulateInitial > } > } > { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("INSERT INTO IDBDatabaseInfo VALUES ('DatabaseName', ?);")); >+ SQLiteStatement sql(*m_sqliteDB, "INSERT INTO IDBDatabaseInfo VALUES ('DatabaseName', ?);"_s); > if (sql.prepare() != SQLITE_OK > || sql.bindText(1, m_identifier.databaseName()) != SQLITE_OK > || sql.step() != SQLITE_DONE) { >@@ -602,7 +602,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::createAndPopulateInitial > { > // Database versions are defined to be a uin64_t in the spec but sqlite3 doesn't support native binding of unsigned integers. > // Therefore we'll store the version as a String. >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("INSERT INTO IDBDatabaseInfo VALUES ('DatabaseVersion', ?);")); >+ SQLiteStatement sql(*m_sqliteDB, "INSERT INTO IDBDatabaseInfo VALUES ('DatabaseVersion', ?);"_s); > if (sql.prepare() != SQLITE_OK > || sql.bindText(1, String::number(0)) != SQLITE_OK > || sql.step() != SQLITE_DONE) { >@@ -612,7 +612,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::createAndPopulateInitial > } > } > >- if (!m_sqliteDB->executeCommand(ASCIILiteral("INSERT INTO IDBDatabaseInfo VALUES ('MaxObjectStoreID', 1);"))) { >+ if (!m_sqliteDB->executeCommand("INSERT INTO IDBDatabaseInfo VALUES ('MaxObjectStoreID', 1);"_s)) { > LOG_ERROR("Could not insert default version into IDBDatabaseInfo table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); > closeSQLiteDB(); > return nullptr; >@@ -626,7 +626,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::extractExistingDatabaseI > { > ASSERT(m_sqliteDB); > >- if (!m_sqliteDB->tableExists(ASCIILiteral("IDBDatabaseInfo"))) >+ if (!m_sqliteDB->tableExists("IDBDatabaseInfo"_s)) > return nullptr; > > String databaseName; >@@ -642,7 +642,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::extractExistingDatabaseI > } > uint64_t databaseVersion; > { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT value FROM IDBDatabaseInfo WHERE key = 'DatabaseVersion';")); >+ SQLiteStatement sql(*m_sqliteDB, "SELECT value FROM IDBDatabaseInfo WHERE key = 'DatabaseVersion';"_s); > if (sql.isColumnNull(0)) > return nullptr; > String stringVersion = sql.getColumnText(0); >@@ -657,7 +657,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::extractExistingDatabaseI > auto databaseInfo = std::make_unique<IDBDatabaseInfo>(databaseName, databaseVersion); > > { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT id, name, keyPath, autoInc, maxIndexID FROM ObjectStoreInfo;")); >+ SQLiteStatement sql(*m_sqliteDB, "SELECT id, name, keyPath, autoInc, maxIndexID FROM ObjectStoreInfo;"_s); > if (sql.prepare() != SQLITE_OK) > return nullptr; > >@@ -689,7 +689,7 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::extractExistingDatabaseI > } > > { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT id, name, objectStoreID, keyPath, isUnique, multiEntry FROM IndexInfo;")); >+ SQLiteStatement sql(*m_sqliteDB, "SELECT id, name, objectStoreID, keyPath, isUnique, multiEntry FROM IndexInfo;"_s); > if (sql.prepare() != SQLITE_OK) > return nullptr; > >@@ -737,11 +737,11 @@ std::unique_ptr<IDBDatabaseInfo> SQLiteIDBBackingStore::extractExistingDatabaseI > > String SQLiteIDBBackingStore::databaseNameFromEncodedFilename(const String& encodedName) > { >- if (equal(encodedName, ASCIILiteral("%00"))) >+ if (equal(encodedName, "%00"_s)) > return { }; > > String partiallyDecoded = encodedName; >- partiallyDecoded.replace(ASCIILiteral("%2E"), ASCIILiteral(".")); >+ partiallyDecoded.replace("%2E"_s, "."_s); > > return FileSystem::decodeFromFilename(partiallyDecoded); > } >@@ -792,7 +792,7 @@ IDBError SQLiteIDBBackingStore::getOrEstablishDatabaseInfo(IDBDatabaseInfo& info > } > > if (!m_sqliteDB) >- return IDBError { UnknownError, ASCIILiteral("Unable to open database file on disk") }; >+ return IDBError { UnknownError, "Unable to open database file on disk"_s }; > > m_sqliteDB->setCollationFunction("IDBKEY", [](int aLength, const void* a, int bLength, const void* b) { > return idbKeyCollate(aLength, a, bLength, b); >@@ -801,25 +801,25 @@ IDBError SQLiteIDBBackingStore::getOrEstablishDatabaseInfo(IDBDatabaseInfo& info > if (!ensureValidRecordsTable()) { > LOG_ERROR("Error creating or migrating Records table in database"); > closeSQLiteDB(); >- return IDBError { UnknownError, ASCIILiteral("Error creating or migrating Records table in database") }; >+ return IDBError { UnknownError, "Error creating or migrating Records table in database"_s }; > } > > if (!ensureValidIndexRecordsTable()) { > LOG_ERROR("Error creating or migrating Index Records table in database"); > closeSQLiteDB(); >- return IDBError { UnknownError, ASCIILiteral("Error creating or migrating Index Records table in database") }; >+ return IDBError { UnknownError, "Error creating or migrating Index Records table in database"_s }; > } > > if (!ensureValidIndexRecordsIndex()) { > LOG_ERROR("Error creating or migrating Index Records index in database"); > closeSQLiteDB(); >- return IDBError { UnknownError, ASCIILiteral("Error creating or migrating Index Records index in database") }; >+ return IDBError { UnknownError, "Error creating or migrating Index Records index in database"_s }; > } > > if (!ensureValidBlobTables()) { > LOG_ERROR("Error creating or confirming Blob Records tables in database"); > closeSQLiteDB(); >- return IDBError { UnknownError, ASCIILiteral("Error creating or confirming Blob Records tables in database") }; >+ return IDBError { UnknownError, "Error creating or confirming Blob Records tables in database"_s }; > } > > auto databaseInfo = extractExistingDatabaseInfo(); >@@ -829,7 +829,7 @@ IDBError SQLiteIDBBackingStore::getOrEstablishDatabaseInfo(IDBDatabaseInfo& info > if (!databaseInfo) { > LOG_ERROR("Unable to establish IDB database at path '%s'", dbFilename.utf8().data()); > closeSQLiteDB(); >- return IDBError { UnknownError, ASCIILiteral("Unable to establish IDB database file") }; >+ return IDBError { UnknownError, "Unable to establish IDB database file"_s }; > } > > m_databaseInfo = WTFMove(databaseInfo); >@@ -848,7 +848,7 @@ IDBError SQLiteIDBBackingStore::beginTransaction(const IDBTransactionInfo& info) > auto addResult = m_transactions.add(info.identifier(), nullptr); > if (!addResult.isNewEntry) { > LOG_ERROR("Attempt to establish transaction identifier that already exists"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to establish transaction identifier that already exists") }; >+ return IDBError { UnknownError, "Attempt to establish transaction identifier that already exists"_s }; > } > > addResult.iterator->value = std::make_unique<SQLiteIDBTransaction>(*this, info); >@@ -857,11 +857,11 @@ IDBError SQLiteIDBBackingStore::beginTransaction(const IDBTransactionInfo& info) > if (error.isNull() && info.mode() == IDBTransactionMode::Versionchange) { > m_originalDatabaseInfoBeforeVersionChange = std::make_unique<IDBDatabaseInfo>(*m_databaseInfo); > >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("UPDATE IDBDatabaseInfo SET value = ? where key = 'DatabaseVersion';")); >+ SQLiteStatement sql(*m_sqliteDB, "UPDATE IDBDatabaseInfo SET value = ? where key = 'DatabaseVersion';"_s); > if (sql.prepare() != SQLITE_OK > || sql.bindText(1, String::number(info.newVersion())) != SQLITE_OK > || sql.step() != SQLITE_DONE) >- error = IDBError { UnknownError, ASCIILiteral("Failed to store new database version in database") }; >+ error = IDBError { UnknownError, "Failed to store new database version in database"_s }; > } > > return error; >@@ -877,7 +877,7 @@ IDBError SQLiteIDBBackingStore::abortTransaction(const IDBResourceIdentifier& id > auto transaction = m_transactions.take(identifier); > if (!transaction) { > LOG_ERROR("Attempt to commit a transaction that hasn't been established"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to abort a transaction that hasn't been established") }; >+ return IDBError { UnknownError, "Attempt to abort a transaction that hasn't been established"_s }; > } > > if (transaction->mode() == IDBTransactionMode::Versionchange && m_originalDatabaseInfoBeforeVersionChange) >@@ -896,7 +896,7 @@ IDBError SQLiteIDBBackingStore::commitTransaction(const IDBResourceIdentifier& i > auto transaction = m_transactions.take(identifier); > if (!transaction) { > LOG_ERROR("Attempt to commit a transaction that hasn't been established"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to commit a transaction that hasn't been established") }; >+ return IDBError { UnknownError, "Attempt to commit a transaction that hasn't been established"_s }; > } > > auto error = transaction->commit(); >@@ -921,21 +921,21 @@ IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier& t > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to create an object store without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to create an object store without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to create an object store without an in-progress transaction"_s }; > } > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to create an object store in a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to create an object store in a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to create an object store in a non-version-change transaction"_s }; > } > > RefPtr<SharedBuffer> keyPathBlob = serializeIDBKeyPath(info.keyPath()); > if (!keyPathBlob) { > LOG_ERROR("Unable to serialize IDBKeyPath to save in database for new object store"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKeyPath to save in database for new object store") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKeyPath to save in database for new object store"_s }; > } > > { >- auto* sql = cachedStatement(SQL::CreateObjectStoreInfo, ASCIILiteral("INSERT INTO ObjectStoreInfo VALUES (?, ?, ?, ?, ?);")); >+ auto* sql = cachedStatement(SQL::CreateObjectStoreInfo, "INSERT INTO ObjectStoreInfo VALUES (?, ?, ?, ?, ?);"_s); > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->bindText(2, info.name()) != SQLITE_OK >@@ -944,17 +944,17 @@ IDBError SQLiteIDBBackingStore::createObjectStore(const IDBResourceIdentifier& t > || sql->bindInt64(5, info.maxIndexID()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not add object store '%s' to ObjectStoreInfo table (%i) - %s", info.name().utf8().data(), m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not create object store") }; >+ return IDBError { UnknownError, "Could not create object store"_s }; > } > } > > { >- auto* sql = cachedStatement(SQL::CreateObjectStoreKeyGenerator, ASCIILiteral("INSERT INTO KeyGenerators VALUES (?, 0);")); >+ auto* sql = cachedStatement(SQL::CreateObjectStoreKeyGenerator, "INSERT INTO KeyGenerators VALUES (?, 0);"_s); > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not seed initial key generator value for ObjectStoreInfo table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not seed initial key generator value for object store") }; >+ return IDBError { UnknownError, "Could not seed initial key generator value for object store"_s }; > } > } > >@@ -973,75 +973,75 @@ IDBError SQLiteIDBBackingStore::deleteObjectStore(const IDBResourceIdentifier& t > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to delete an object store without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete an object store without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to delete an object store without an in-progress transaction"_s }; > } > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to delete an object store in a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete an object store in a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to delete an object store in a non-version-change transaction"_s }; > } > > // Delete the ObjectStore record > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreInfo, ASCIILiteral("DELETE FROM ObjectStoreInfo WHERE id = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreInfo, "DELETE FROM ObjectStoreInfo WHERE id = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete object store id %" PRIi64 " from ObjectStoreInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete object store") }; >+ return IDBError { UnknownError, "Could not delete object store"_s }; > } > } > > // Delete the ObjectStore's key generator record if there is one. > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreKeyGenerator, ASCIILiteral("DELETE FROM KeyGenerators WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreKeyGenerator, "DELETE FROM KeyGenerators WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete object store from KeyGenerators table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete key generator for deleted object store") }; >+ return IDBError { UnknownError, "Could not delete key generator for deleted object store"_s }; > } > } > > // Delete all associated records > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreRecords, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreRecords, "DELETE FROM Records WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete records for object store %" PRIi64 " (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete records for deleted object store") }; >+ return IDBError { UnknownError, "Could not delete records for deleted object store"_s }; > } > } > > // Delete all associated Indexes > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexInfo, ASCIILiteral("DELETE FROM IndexInfo WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexInfo, "DELETE FROM IndexInfo WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete index from IndexInfo table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete IDBIndex for deleted object store") }; >+ return IDBError { UnknownError, "Could not delete IDBIndex for deleted object store"_s }; > } > } > > // Delete all associated Index records > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecords, ASCIILiteral("DELETE FROM IndexRecords WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecords, "DELETE FROM IndexRecords WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete index records(%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete IDBIndex records for deleted object store") }; >+ return IDBError { UnknownError, "Could not delete IDBIndex records for deleted object store"_s }; > } > } > > // Delete all unused Blob URL records. > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreBlobRecords, ASCIILiteral("DELETE FROM BlobRecords WHERE objectStoreRow NOT IN (SELECT recordID FROM Records)")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreBlobRecords, "DELETE FROM BlobRecords WHERE objectStoreRow NOT IN (SELECT recordID FROM Records)"_s); > if (!sql > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete Blob URL records(%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not delete stored blob records for deleted object store") }; >+ return IDBError { UnknownError, "Could not delete stored blob records for deleted object store"_s }; > } > } > >@@ -1065,21 +1065,21 @@ IDBError SQLiteIDBBackingStore::renameObjectStore(const IDBResourceIdentifier& t > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to rename an object store without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to rename an object store without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to rename an object store without an in-progress transaction"_s }; > } > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to rename an object store in a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to rename an object store in a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to rename an object store in a non-version-change transaction"_s }; > } > > { >- auto* sql = cachedStatement(SQL::RenameObjectStore, ASCIILiteral("UPDATE ObjectStoreInfo SET name = ? WHERE id = ?;")); >+ auto* sql = cachedStatement(SQL::RenameObjectStore, "UPDATE ObjectStoreInfo SET name = ? WHERE id = ?;"_s); > if (!sql > || sql->bindText(1, newName) != SQLITE_OK > || sql->bindInt64(2, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not update name for object store id %" PRIi64 " in ObjectStoreInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not rename object store") }; >+ return IDBError { UnknownError, "Could not rename object store"_s }; > } > } > >@@ -1098,30 +1098,30 @@ IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& tr > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to clear an object store without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to clear an object store without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to clear an object store without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to clear an object store in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to clear an object store in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to clear an object store in a read-only transaction"_s }; > } > > { >- auto* sql = cachedStatement(SQL::ClearObjectStoreRecords, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::ClearObjectStoreRecords, "DELETE FROM Records WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not clear records from object store id %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Unable to clear object store") }; >+ return IDBError { UnknownError, "Unable to clear object store"_s }; > } > } > > { >- auto* sql = cachedStatement(SQL::ClearObjectStoreIndexRecords, ASCIILiteral("DELETE FROM IndexRecords WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::ClearObjectStoreIndexRecords, "DELETE FROM IndexRecords WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete records from index record store id %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Unable to delete index records while clearing object store") }; >+ return IDBError { UnknownError, "Unable to delete index records while clearing object store"_s }; > } > } > >@@ -1139,20 +1139,20 @@ IDBError SQLiteIDBBackingStore::createIndex(const IDBResourceIdentifier& transac > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to create an index without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to create an index without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to create an index without an in-progress transaction"_s }; > } > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to create an index in a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to create an index in a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to create an index in a non-version-change transaction"_s }; > } > > RefPtr<SharedBuffer> keyPathBlob = serializeIDBKeyPath(info.keyPath()); > if (!keyPathBlob) { > LOG_ERROR("Unable to serialize IDBKeyPath to save in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKeyPath to create index in database") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKeyPath to create index in database"_s }; > } > >- auto* sql = cachedStatement(SQL::CreateIndexInfo, ASCIILiteral("INSERT INTO IndexInfo VALUES (?, ?, ?, ?, ?, ?);")); >+ auto* sql = cachedStatement(SQL::CreateIndexInfo, "INSERT INTO IndexInfo VALUES (?, ?, ?, ?, ?, ?);"_s); > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->bindText(2, info.name()) != SQLITE_OK >@@ -1162,7 +1162,7 @@ IDBError SQLiteIDBBackingStore::createIndex(const IDBResourceIdentifier& transac > || sql->bindInt(6, info.multiEntry()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not add index '%s' to IndexInfo table (%i) - %s", info.name().utf8().data(), m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Unable to create index in database") }; >+ return IDBError { UnknownError, "Unable to create index in database"_s }; > } > > // Write index records for any records that already exist in this object store. >@@ -1171,7 +1171,7 @@ IDBError SQLiteIDBBackingStore::createIndex(const IDBResourceIdentifier& transac > > if (!cursor) { > LOG_ERROR("Cannot open cursor to populate indexes in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to populate indexes in database") }; >+ return IDBError { UnknownError, "Unable to populate indexes in database"_s }; > } > > while (!cursor->currentKey().isNull()) { >@@ -1183,13 +1183,13 @@ IDBError SQLiteIDBBackingStore::createIndex(const IDBResourceIdentifier& transac > > IDBError error = updateOneIndexForAddRecord(info, key, valueBuffer, cursor->currentRecordRowID()); > if (!error.isNull()) { >- auto* sql = cachedStatement(SQL::DeleteIndexInfo, ASCIILiteral("DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteIndexInfo, "DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->bindInt64(2, info.objectStoreIdentifier()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Index creation failed due to uniqueness constraint failure, but there was an error deleting the Index record from the database"); >- return IDBError { UnknownError, ASCIILiteral("Index creation failed due to uniqueness constraint failure, but there was an error deleting the Index record from the database") }; >+ return IDBError { UnknownError, "Index creation failed due to uniqueness constraint failure, but there was an error deleting the Index record from the database"_s }; > } > > return error; >@@ -1197,7 +1197,7 @@ IDBError SQLiteIDBBackingStore::createIndex(const IDBResourceIdentifier& transac > > if (!cursor->advance(1)) { > LOG_ERROR("Error advancing cursor while indexing existing records for new index."); >- return IDBError { UnknownError, ASCIILiteral("Error advancing cursor while indexing existing records for new index") }; >+ return IDBError { UnknownError, "Error advancing cursor while indexing existing records for new index"_s }; > } > } > >@@ -1215,16 +1215,16 @@ IDBError SQLiteIDBBackingStore::uncheckedHasIndexRecord(const IDBIndexInfo& info > RefPtr<SharedBuffer> indexKeyBuffer = serializeIDBKeyData(indexKey); > if (!indexKeyBuffer) { > LOG_ERROR("Unable to serialize index key to be stored in the database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKey to check for index record in database") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKey to check for index record in database"_s }; > } > >- auto* sql = cachedStatement(SQL::HasIndexRecord, ASCIILiteral("SELECT rowid FROM IndexRecords WHERE indexID = ? AND objectStoreID = ? AND key = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::HasIndexRecord, "SELECT rowid FROM IndexRecords WHERE indexID = ? AND objectStoreID = ? AND key = CAST(? AS TEXT);"_s); > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->bindInt64(2, info.objectStoreIdentifier()) != SQLITE_OK > || sql->bindBlob(3, indexKeyBuffer->data(), indexKeyBuffer->size()) != SQLITE_OK) { > LOG_ERROR("Error checking for index record in database"); >- return IDBError { UnknownError, ASCIILiteral("Error checking for index record in database") }; >+ return IDBError { UnknownError, "Error checking for index record in database"_s }; > } > > int sqlResult = sql->step(); >@@ -1234,7 +1234,7 @@ IDBError SQLiteIDBBackingStore::uncheckedHasIndexRecord(const IDBIndexInfo& info > if (sqlResult != SQLITE_ROW) { > // There was an error fetching the record from the database. > LOG_ERROR("Could not check if key exists in index (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error checking for existence of IDBKey in index") }; >+ return IDBError { UnknownError, "Error checking for existence of IDBKey in index"_s }; > } > > hasRecord = true; >@@ -1285,17 +1285,17 @@ IDBError SQLiteIDBBackingStore::uncheckedPutIndexRecord(int64_t objectStoreID, i > RefPtr<SharedBuffer> indexKeyBuffer = serializeIDBKeyData(indexKey); > if (!indexKeyBuffer) { > LOG_ERROR("Unable to serialize index key to be stored in the database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize index key to be stored in the database") }; >+ return IDBError { UnknownError, "Unable to serialize index key to be stored in the database"_s }; > } > > RefPtr<SharedBuffer> valueBuffer = serializeIDBKeyData(keyValue); > if (!valueBuffer) { > LOG_ERROR("Unable to serialize the value to be stored in the database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize value to be stored in the database") }; >+ return IDBError { UnknownError, "Unable to serialize value to be stored in the database"_s }; > } > > { >- auto* sql = cachedStatement(SQL::PutIndexRecord, ASCIILiteral("INSERT INTO IndexRecords VALUES (?, ?, CAST(? AS TEXT), CAST(? AS TEXT), ?);")); >+ auto* sql = cachedStatement(SQL::PutIndexRecord, "INSERT INTO IndexRecords VALUES (?, ?, CAST(? AS TEXT), CAST(? AS TEXT), ?);"_s); > if (!sql > || sql->bindInt64(1, indexID) != SQLITE_OK > || sql->bindInt64(2, objectStoreID) != SQLITE_OK >@@ -1304,7 +1304,7 @@ IDBError SQLiteIDBBackingStore::uncheckedPutIndexRecord(int64_t objectStoreID, i > || sql->bindInt64(5, recordID) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not put index record for index %" PRIi64 " in object store %" PRIi64 " in Records table (%i) - %s", indexID, objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error putting index record into database") }; >+ return IDBError { UnknownError, "Error putting index record into database"_s }; > } > } > >@@ -1322,33 +1322,33 @@ IDBError SQLiteIDBBackingStore::deleteIndex(const IDBResourceIdentifier& transac > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to delete index without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete index without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to delete index without an in-progress transaction"_s }; > } > > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to delete index during a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete index during a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to delete index during a non-version-change transaction"_s }; > } > > { >- auto* sql = cachedStatement(SQL::DeleteIndexInfo, ASCIILiteral("DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteIndexInfo, "DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, indexIdentifier) != SQLITE_OK > || sql->bindInt64(2, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete index id %" PRIi64 " from IndexInfo table (%i) - %s", objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error deleting index from database") }; >+ return IDBError { UnknownError, "Error deleting index from database"_s }; > } > } > > { >- auto* sql = cachedStatement(SQL::DeleteIndexRecords, ASCIILiteral("DELETE FROM IndexRecords WHERE indexID = ? AND objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteIndexRecords, "DELETE FROM IndexRecords WHERE indexID = ? AND objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, indexIdentifier) != SQLITE_OK > || sql->bindInt64(2, objectStoreIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete index records for index id %" PRIi64 " from IndexRecords table (%i) - %s", indexIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error deleting index records from database") }; >+ return IDBError { UnknownError, "Error deleting index records from database"_s }; > } > } > >@@ -1368,32 +1368,32 @@ IDBError SQLiteIDBBackingStore::renameIndex(const IDBResourceIdentifier& transac > > auto* objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); > if (!objectStoreInfo) >- return IDBError { UnknownError, ASCIILiteral("Could not rename index") }; >+ return IDBError { UnknownError, "Could not rename index"_s }; > > auto* indexInfo = objectStoreInfo->infoForExistingIndex(indexIdentifier); > if (!indexInfo) >- return IDBError { UnknownError, ASCIILiteral("Could not rename index") }; >+ return IDBError { UnknownError, "Could not rename index"_s }; > > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to rename an index without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to rename an index without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to rename an index without an in-progress transaction"_s }; > } > > if (transaction->mode() != IDBTransactionMode::Versionchange) { > LOG_ERROR("Attempt to rename an index in a non-version-change transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to rename an index in a non-version-change transaction") }; >+ return IDBError { UnknownError, "Attempt to rename an index in a non-version-change transaction"_s }; > } > > { >- auto* sql = cachedStatement(SQL::RenameIndex, ASCIILiteral("UPDATE IndexInfo SET name = ? WHERE objectStoreID = ? AND id = ?;")); >+ auto* sql = cachedStatement(SQL::RenameIndex, "UPDATE IndexInfo SET name = ? WHERE objectStoreID = ? AND id = ?;"_s); > if (!sql > || sql->bindText(1, newName) != SQLITE_OK > || sql->bindInt64(2, objectStoreIdentifier) != SQLITE_OK > || sql->bindInt64(3, indexIdentifier) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not update name for index id (%" PRIi64 ", %" PRIi64 ") in IndexInfo table (%i) - %s", objectStoreIdentifier, indexIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Could not rename index") }; >+ return IDBError { UnknownError, "Could not rename index"_s }; > } > } > >@@ -1414,20 +1414,20 @@ IDBError SQLiteIDBBackingStore::keyExistsInObjectStore(const IDBResourceIdentifi > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to see if key exists in objectstore without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to see if key exists in objectstore without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to see if key exists in objectstore without an in-progress transaction"_s }; > } > > RefPtr<SharedBuffer> keyBuffer = serializeIDBKeyData(keyData); > if (!keyBuffer) { > LOG_ERROR("Unable to serialize IDBKey to check for existence in object store"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKey to check for existence in object store") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKey to check for existence in object store"_s }; > } >- auto* sql = cachedStatement(SQL::KeyExistsInObjectStore, ASCIILiteral("SELECT key FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT) LIMIT 1;")); >+ auto* sql = cachedStatement(SQL::KeyExistsInObjectStore, "SELECT key FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT) LIMIT 1;"_s); > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK) { > LOG_ERROR("Could not get record from object store %" PRIi64 " from Records table (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Unable to check for existence of IDBKey in object store") }; >+ return IDBError { UnknownError, "Unable to check for existence of IDBKey in object store"_s }; > } > > int sqlResult = sql->step(); >@@ -1437,7 +1437,7 @@ IDBError SQLiteIDBBackingStore::keyExistsInObjectStore(const IDBResourceIdentifi > if (sqlResult != SQLITE_ROW) { > // There was an error fetching the record from the database. > LOG_ERROR("Could not check if key exists in object store (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error checking for existence of IDBKey in object store") }; >+ return IDBError { UnknownError, "Error checking for existence of IDBKey in object store"_s }; > } > > keyExists = true; >@@ -1451,11 +1451,11 @@ IDBError SQLiteIDBBackingStore::deleteUnusedBlobFileRecords(SQLiteIDBTransaction > // Gather the set of blob URLs and filenames that are no longer in use. > HashSet<String> removedBlobFilenames; > { >- auto* sql = cachedStatement(SQL::GetUnusedBlobFilenames, ASCIILiteral("SELECT fileName FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)")); >+ auto* sql = cachedStatement(SQL::GetUnusedBlobFilenames, "SELECT fileName FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)"_s); > > if (!sql) { > LOG_ERROR("Error deleting stored blobs (%i) (Could not gather unused blobURLs) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error deleting stored blobs") }; >+ return IDBError { UnknownError, "Error deleting stored blobs"_s }; > } > > int result = sql->step(); >@@ -1466,18 +1466,18 @@ IDBError SQLiteIDBBackingStore::deleteUnusedBlobFileRecords(SQLiteIDBTransaction > > if (result != SQLITE_DONE) { > LOG_ERROR("Error deleting stored blobs (%i) (Could not gather unused blobURLs) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error deleting stored blobs") }; >+ return IDBError { UnknownError, "Error deleting stored blobs"_s }; > } > } > > // Remove the blob records that are no longer in use. > if (!removedBlobFilenames.isEmpty()) { >- auto* sql = cachedStatement(SQL::DeleteUnusedBlobs, ASCIILiteral("DELETE FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)")); >+ auto* sql = cachedStatement(SQL::DeleteUnusedBlobs, "DELETE FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)"_s); > > if (!sql > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Error deleting stored blobs (%i) (Could not delete blobFile records) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error deleting stored blobs") }; >+ return IDBError { UnknownError, "Error deleting stored blobs"_s }; > } > } > >@@ -1500,19 +1500,19 @@ IDBError SQLiteIDBBackingStore::deleteRecord(SQLiteIDBTransaction& transaction, > RefPtr<SharedBuffer> keyBuffer = serializeIDBKeyData(keyData); > if (!keyBuffer) { > LOG_ERROR("Unable to serialize IDBKeyData to be removed from the database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKeyData to be removed from the database") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKeyData to be removed from the database"_s }; > } > > // Get the record ID > int64_t recordID; > { >- auto* sql = cachedStatement(SQL::GetObjectStoreRecordID, ASCIILiteral("SELECT recordID FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::GetObjectStoreRecordID, "SELECT recordID FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"_s); > > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK) { > LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete record from object store") }; >+ return IDBError { UnknownError, "Failed to delete record from object store"_s }; > } > > int result = sql->step(); >@@ -1523,7 +1523,7 @@ IDBError SQLiteIDBBackingStore::deleteRecord(SQLiteIDBTransaction& transaction, > > if (result != SQLITE_ROW) { > LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (unable to fetch record ID) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete record from object store") }; >+ return IDBError { UnknownError, "Failed to delete record from object store"_s }; > } > > recordID = sql->getColumnInt64(0); >@@ -1531,18 +1531,18 @@ IDBError SQLiteIDBBackingStore::deleteRecord(SQLiteIDBTransaction& transaction, > > if (recordID < 1) { > LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (record ID is invalid) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete record from object store") }; >+ return IDBError { UnknownError, "Failed to delete record from object store"_s }; > } > > // Delete the blob records for this object store record. > { >- auto* sql = cachedStatement(SQL::DeleteBlobRecord, ASCIILiteral("DELETE FROM BlobRecords WHERE objectStoreRow = ?;")); >+ auto* sql = cachedStatement(SQL::DeleteBlobRecord, "DELETE FROM BlobRecords WHERE objectStoreRow = ?;"_s); > > if (!sql > || sql->bindInt64(1, recordID) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (Could not delete BlobRecords records) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete record from object store") }; >+ return IDBError { UnknownError, "Failed to delete record from object store"_s }; > } > } > >@@ -1552,27 +1552,27 @@ IDBError SQLiteIDBBackingStore::deleteRecord(SQLiteIDBTransaction& transaction, > > // Delete record from object store > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, "DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"_s); > > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete record from object store") }; >+ return IDBError { UnknownError, "Failed to delete record from object store"_s }; > } > } > > // Delete record from indexes store > { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecord, ASCIILiteral("DELETE FROM IndexRecords WHERE objectStoreID = ? AND value = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecord, "DELETE FROM IndexRecords WHERE objectStoreID = ? AND value = CAST(? AS TEXT);"_s); > > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not delete record from indexes for object store %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to delete index entries for object store record") }; >+ return IDBError { UnknownError, "Failed to delete index entries for object store record"_s }; > } > } > >@@ -1589,11 +1589,11 @@ IDBError SQLiteIDBBackingStore::deleteRange(const IDBResourceIdentifier& transac > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to delete range from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete range from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to delete range from database without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to delete records from an object store in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to delete records from an object store in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to delete records from an object store in a read-only transaction"_s }; > } > > // If the range to delete is exactly one key we can delete it right now. >@@ -1612,7 +1612,7 @@ IDBError SQLiteIDBBackingStore::deleteRange(const IDBResourceIdentifier& transac > auto cursor = transaction->maybeOpenBackingStoreCursor(objectStoreID, 0, keyRange); > if (!cursor) { > LOG_ERROR("Cannot open cursor to delete range of records from the database"); >- return IDBError { UnknownError, ASCIILiteral("Cannot open cursor to delete range of records from the database") }; >+ return IDBError { UnknownError, "Cannot open cursor to delete range of records from the database"_s }; > } > > Vector<IDBKeyData> keys; >@@ -1623,7 +1623,7 @@ IDBError SQLiteIDBBackingStore::deleteRange(const IDBResourceIdentifier& transac > > if (cursor->didError()) { > LOG_ERROR("Cursor failed while accumulating range of records from the database"); >- return IDBError { UnknownError, ASCIILiteral("Cursor failed while accumulating range of records from the database") }; >+ return IDBError { UnknownError, "Cursor failed while accumulating range of records from the database"_s }; > } > > IDBError error; >@@ -1684,14 +1684,14 @@ IDBError SQLiteIDBBackingStore::updateAllIndexesForAddRecord(const IDBObjectStor > if (!error.isNull() && anyRecordsSucceeded) { > RefPtr<SharedBuffer> keyBuffer = serializeIDBKeyData(key); > >- auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecord, ASCIILiteral("DELETE FROM IndexRecords WHERE objectStoreID = ? AND value = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreIndexRecord, "DELETE FROM IndexRecords WHERE objectStoreID = ? AND value = CAST(? AS TEXT);"_s); > > if (!sql > || sql->bindInt64(1, info.identifier()) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Adding one Index record failed, but failed to remove all others that previously succeeded"); >- return IDBError { UnknownError, ASCIILiteral("Adding one Index record failed, but failed to remove all others that previously succeeded") }; >+ return IDBError { UnknownError, "Adding one Index record failed, but failed to remove all others that previously succeeded"_s }; > } > } > >@@ -1710,29 +1710,29 @@ IDBError SQLiteIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to store a record in an object store without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to store a record in an object store without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to store a record in an object store without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to store a record in an object store in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to store a record in an object store in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to store a record in an object store in a read-only transaction"_s }; > } > > RefPtr<SharedBuffer> keyBuffer = serializeIDBKeyData(keyData); > if (!keyBuffer) { > LOG_ERROR("Unable to serialize IDBKey to be stored in an object store"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKey to be stored in an object store") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKey to be stored in an object store"_s }; > } > > int64_t recordID = 0; > { >- auto* sql = cachedStatement(SQL::AddObjectStoreRecord, ASCIILiteral("INSERT INTO Records VALUES (?, CAST(? AS TEXT), ?, NULL);")); >+ auto* sql = cachedStatement(SQL::AddObjectStoreRecord, "INSERT INTO Records VALUES (?, CAST(? AS TEXT), ?, NULL);"_s); > if (!sql > || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK > || sql->bindBlob(3, value.data().data()->data(), value.data().data()->size()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Could not put record for object store %" PRIi64 " in Records table (%i) - %s", objectStoreInfo.identifier(), m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Unable to store record in object store") }; >+ return IDBError { UnknownError, "Unable to store record in object store"_s }; > } > > recordID = m_sqliteDB->lastInsertRowID(); >@@ -1741,13 +1741,13 @@ IDBError SQLiteIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti > auto error = updateAllIndexesForAddRecord(objectStoreInfo, keyData, value.data(), recordID); > > if (!error.isNull()) { >- auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);")); >+ auto* sql = cachedStatement(SQL::DeleteObjectStoreRecord, "DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"_s); > if (!sql > || sql->bindInt64(1, objectStoreInfo.identifier()) != SQLITE_OK > || sql->bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself"); >- return IDBError { UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") }; >+ return IDBError { UnknownError, "Indexing new object store record failed, but unable to remove the object store record itself"_s }; > } > > return error; >@@ -1758,30 +1758,30 @@ IDBError SQLiteIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti > for (size_t i = 0; i < blobURLs.size(); ++i) { > auto& url = blobURLs[i]; > { >- auto* sql = cachedStatement(SQL::AddBlobRecord, ASCIILiteral("INSERT INTO BlobRecords VALUES (?, ?);")); >+ auto* sql = cachedStatement(SQL::AddBlobRecord, "INSERT INTO BlobRecords VALUES (?, ?);"_s); > if (!sql > || sql->bindInt64(1, recordID) != SQLITE_OK > || sql->bindText(2, url) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Unable to record Blob record in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to record Blob record in database") }; >+ return IDBError { UnknownError, "Unable to record Blob record in database"_s }; > } > } > int64_t potentialFileNameInteger = m_sqliteDB->lastInsertRowID(); > > // If we already have a file for this blobURL, nothing left to do. > { >- auto* sql = cachedStatement(SQL::BlobFilenameForBlobURL, ASCIILiteral("SELECT fileName FROM BlobFiles WHERE blobURL = ?;")); >+ auto* sql = cachedStatement(SQL::BlobFilenameForBlobURL, "SELECT fileName FROM BlobFiles WHERE blobURL = ?;"_s); > if (!sql > || sql->bindText(1, url) != SQLITE_OK) { > LOG_ERROR("Unable to examine Blob filenames in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to examine Blob filenames in database") }; >+ return IDBError { UnknownError, "Unable to examine Blob filenames in database"_s }; > } > > int result = sql->step(); > if (result != SQLITE_ROW && result != SQLITE_DONE) { > LOG_ERROR("Unable to examine Blob filenames in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to examine Blob filenames in database") }; >+ return IDBError { UnknownError, "Unable to examine Blob filenames in database"_s }; > } > > if (result == SQLITE_ROW) >@@ -1791,13 +1791,13 @@ 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); > { >- auto* sql = cachedStatement(SQL::AddBlobFilename, ASCIILiteral("INSERT INTO BlobFiles VALUES (?, ?);")); >+ auto* sql = cachedStatement(SQL::AddBlobFilename, "INSERT INTO BlobFiles VALUES (?, ?);"_s); > if (!sql > || sql->bindText(1, url) != SQLITE_OK > || sql->bindText(2, storedFilename) != SQLITE_OK > || sql->step() != SQLITE_DONE) { > LOG_ERROR("Unable to record Blob file record in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to record Blob file record in database") }; >+ return IDBError { UnknownError, "Unable to record Blob file record in database"_s }; > } > } > >@@ -1815,11 +1815,11 @@ IDBError SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord(int64_t objec > > HashSet<String> blobURLSet; > { >- auto* sql = cachedStatement(SQL::GetBlobURL, ASCIILiteral("SELECT blobURL FROM BlobRecords WHERE objectStoreRow = ?")); >+ auto* sql = cachedStatement(SQL::GetBlobURL, "SELECT blobURL FROM BlobRecords WHERE objectStoreRow = ?"_s); > if (!sql > || sql->bindInt64(1, objectStoreRecord) != SQLITE_OK) { > LOG_ERROR("Could not prepare statement to fetch blob URLs for object store record (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up blobURL records in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up blobURL records in object store by key range"_s }; > } > > int sqlResult = sql->step(); >@@ -1835,23 +1835,23 @@ IDBError SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord(int64_t objec > > if (sqlResult != SQLITE_DONE) { > LOG_ERROR("Could not fetch blob URLs for object store record (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up blobURL records in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up blobURL records in object store by key range"_s }; > } > } > > ASSERT(!blobURLSet.isEmpty()); > String databaseDirectory = fullDatabaseDirectory(); > for (auto& blobURL : blobURLSet) { >- auto* sql = cachedStatement(SQL::BlobFilenameForBlobURL, ASCIILiteral("SELECT fileName FROM BlobFiles WHERE blobURL = ?;")); >+ auto* sql = cachedStatement(SQL::BlobFilenameForBlobURL, "SELECT fileName FROM BlobFiles WHERE blobURL = ?;"_s); > if (!sql > || sql->bindText(1, blobURL) != SQLITE_OK) { > LOG_ERROR("Could not prepare statement to fetch blob filename for object store record (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up blobURL records in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up blobURL records in object store by key range"_s }; > } > > if (sql->step() != SQLITE_ROW) { > LOG_ERROR("Entry for blob filename for blob url %s does not exist (%i) - %s", blobURL.utf8().data(), m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up blobURL records in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up blobURL records in object store by key range"_s }; > } > > blobURLs.append(blobURL); >@@ -1873,7 +1873,7 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to get a record from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to get a record from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to get a record from database without an in-progress transaction"_s }; > } > > auto key = keyRange.lowerKey; >@@ -1882,7 +1882,7 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > RefPtr<SharedBuffer> lowerBuffer = serializeIDBKeyData(key); > if (!lowerBuffer) { > LOG_ERROR("Unable to serialize lower IDBKey in lookup range"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize lower IDBKey in lookup range") }; >+ return IDBError { UnknownError, "Unable to serialize lower IDBKey in lookup range"_s }; > } > > key = keyRange.upperKey; >@@ -1891,7 +1891,7 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > RefPtr<SharedBuffer> upperBuffer = serializeIDBKeyData(key); > if (!upperBuffer) { > LOG_ERROR("Unable to serialize upper IDBKey in lookup range"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize upper IDBKey in lookup range") }; >+ return IDBError { UnknownError, "Unable to serialize upper IDBKey in lookup range"_s }; > } > > int64_t recordID = 0; >@@ -1942,7 +1942,7 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > || sql->bindBlob(2, lowerBuffer->data(), lowerBuffer->size()) != SQLITE_OK > || sql->bindBlob(3, upperBuffer->data(), upperBuffer->size()) != SQLITE_OK) { > LOG_ERROR("Could not get key range record from object store %" PRIi64 " from Records table (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up record in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up record in object store by key range"_s }; > } > > int sqlResult = sql->step(); >@@ -1954,7 +1954,7 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > if (sqlResult != SQLITE_ROW) { > // There was an error fetching the record from the database. > LOG_ERROR("Could not get record from object store %" PRIi64 " from Records table (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error looking up record in object store by key range") }; >+ return IDBError { UnknownError, "Error looking up record in object store by key range"_s }; > } > > Vector<uint8_t> buffer; >@@ -1969,13 +1969,13 @@ IDBError SQLiteIDBBackingStore::getRecord(const IDBResourceIdentifier& transacti > auto* vector = resultBuffer.data(); > if (!vector) { > LOG_ERROR("Unable to deserialize key data from database for IDBObjectStore.getKey()"); >- return IDBError { UnknownError, ASCIILiteral("Error extracting key data from database executing IDBObjectStore.getKey()") }; >+ return IDBError { UnknownError, "Error extracting key data from database executing IDBObjectStore.getKey()"_s }; > } > > IDBKeyData keyData; > if (!deserializeIDBKeyData(vector->data(), vector->size(), keyData)) { > LOG_ERROR("Unable to deserialize key data from database for IDBObjectStore.getKey()"); >- return IDBError { UnknownError, ASCIILiteral("Error extracting key data from database executing IDBObjectStore.getKey()") }; >+ return IDBError { UnknownError, "Error extracting key data from database executing IDBObjectStore.getKey()"_s }; > } > > resultValue = { keyData }; >@@ -2043,7 +2043,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to get records from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to get records from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to get records from database without an in-progress transaction"_s }; > } > > auto key = getAllRecordsData.keyRangeData.lowerKey; >@@ -2052,7 +2052,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > auto lowerBuffer = serializeIDBKeyData(key); > if (!lowerBuffer) { > LOG_ERROR("Unable to serialize lower IDBKey in lookup range"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize lower IDBKey in lookup range") }; >+ return IDBError { UnknownError, "Unable to serialize lower IDBKey in lookup range"_s }; > } > > key = getAllRecordsData.keyRangeData.upperKey; >@@ -2061,7 +2061,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > auto upperBuffer = serializeIDBKeyData(key); > if (!upperBuffer) { > LOG_ERROR("Unable to serialize upper IDBKey in lookup range"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize upper IDBKey in lookup range") }; >+ return IDBError { UnknownError, "Unable to serialize upper IDBKey in lookup range"_s }; > } > > auto* sql = cachedStatementForGetAllObjectStoreRecords(getAllRecordsData); >@@ -2070,7 +2070,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > || sql->bindBlob(2, lowerBuffer->data(), lowerBuffer->size()) != SQLITE_OK > || sql->bindBlob(3, upperBuffer->data(), upperBuffer->size()) != SQLITE_OK) { > LOG_ERROR("Could not get key range record from object store %" PRIi64 " from Records table (%i) - %s", getAllRecordsData.objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Failed to look up record in object store by key range") }; >+ return IDBError { UnknownError, "Failed to look up record in object store by key range"_s }; > } > > result = { getAllRecordsData.getAllType }; >@@ -2108,7 +2108,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > > if (!deserializeIDBKeyData(keyData.data(), keyData.size(), key)) { > LOG_ERROR("Unable to deserialize key data from database while getting all key records"); >- return IDBError { UnknownError, ASCIILiteral("Unable to deserialize key data while getting all key records") }; >+ return IDBError { UnknownError, "Unable to deserialize key data while getting all key records"_s }; > } > > result.addKey(WTFMove(key)); >@@ -2125,7 +2125,7 @@ IDBError SQLiteIDBBackingStore::getAllObjectStoreRecords(const IDBResourceIdenti > > // There was an error fetching records from the database. > LOG_ERROR("Could not get record from object store %" PRIi64 " from Records table (%i) - %s", getAllRecordsData.objectStoreIdentifier, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error looking up record in object store by key range") }; >+ return IDBError { UnknownError, "Error looking up record in object store by key range"_s }; > } > > IDBError SQLiteIDBBackingStore::getAllIndexRecords(const IDBResourceIdentifier& transactionIdentifier, const IDBGetAllRecordsData& getAllRecordsData, IDBGetAllResult& result) >@@ -2138,18 +2138,18 @@ IDBError SQLiteIDBBackingStore::getAllIndexRecords(const IDBResourceIdentifier& > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to get all index records from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to get all index records from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to get all index records from database without an in-progress transaction"_s }; > } > > auto cursor = transaction->maybeOpenBackingStoreCursor(getAllRecordsData.objectStoreIdentifier, getAllRecordsData.indexIdentifier, getAllRecordsData.keyRangeData); > if (!cursor) { > LOG_ERROR("Cannot open cursor to perform index gets in database"); >- return IDBError { UnknownError, ASCIILiteral("Cannot open cursor to perform index gets in database") }; >+ return IDBError { UnknownError, "Cannot open cursor to perform index gets in database"_s }; > } > > if (cursor->didError()) { > LOG_ERROR("Cursor failed while looking up index records in database"); >- return IDBError { UnknownError, ASCIILiteral("Cursor failed while looking up index records in database") }; >+ return IDBError { UnknownError, "Cursor failed while looking up index records in database"_s }; > } > > result = { getAllRecordsData.getAllType }; >@@ -2170,7 +2170,7 @@ IDBError SQLiteIDBBackingStore::getAllIndexRecords(const IDBResourceIdentifier& > > if (cursor->didError()) { > LOG_ERROR("Cursor failed while looking up index records in database"); >- return IDBError { UnknownError, ASCIILiteral("Cursor failed while looking up index records in database") }; >+ return IDBError { UnknownError, "Cursor failed while looking up index records in database"_s }; > } > > return IDBError { }; >@@ -2186,7 +2186,7 @@ IDBError SQLiteIDBBackingStore::getIndexRecord(const IDBResourceIdentifier& tran > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to get an index record from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to get an index record from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to get an index record from database without an in-progress transaction"_s }; > } > > if (range.isExactlyOneKey()) >@@ -2195,12 +2195,12 @@ IDBError SQLiteIDBBackingStore::getIndexRecord(const IDBResourceIdentifier& tran > auto cursor = transaction->maybeOpenBackingStoreCursor(objectStoreID, indexID, range); > if (!cursor) { > LOG_ERROR("Cannot open cursor to perform index get in database"); >- return IDBError { UnknownError, ASCIILiteral("Cannot open cursor to perform index get in database") }; >+ return IDBError { UnknownError, "Cannot open cursor to perform index get in database"_s }; > } > > if (cursor->didError()) { > LOG_ERROR("Cursor failed while looking up index record in database"); >- return IDBError { UnknownError, ASCIILiteral("Cursor failed while looking up index record in database") }; >+ return IDBError { UnknownError, "Cursor failed while looking up index record in database"_s }; > } > > if (cursor->didComplete()) >@@ -2224,23 +2224,23 @@ IDBError SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey(int64_t indexID > RefPtr<SharedBuffer> buffer = serializeIDBKeyData(key); > if (!buffer) { > LOG_ERROR("Unable to serialize IDBKey to look up one index record"); >- return IDBError { UnknownError, ASCIILiteral("Unable to serialize IDBKey to look up one index record") }; >+ return IDBError { UnknownError, "Unable to serialize IDBKey to look up one index record"_s }; > } > >- auto* sql = cachedStatement(SQL::GetIndexRecordForOneKey, ASCIILiteral("SELECT IndexRecords.value, Records.value, Records.recordID FROM Records INNER JOIN IndexRecords ON Records.recordID = IndexRecords.objectStoreRecordID WHERE IndexRecords.indexID = ? AND IndexRecords.objectStoreID = ? AND IndexRecords.key = CAST(? AS TEXT) ORDER BY IndexRecords.key, IndexRecords.value")); >+ auto* sql = cachedStatement(SQL::GetIndexRecordForOneKey, "SELECT IndexRecords.value, Records.value, Records.recordID FROM Records INNER JOIN IndexRecords ON Records.recordID = IndexRecords.objectStoreRecordID WHERE IndexRecords.indexID = ? AND IndexRecords.objectStoreID = ? AND IndexRecords.key = CAST(? AS TEXT) ORDER BY IndexRecords.key, IndexRecords.value"_s); > > if (!sql > || sql->bindInt64(1, indexID) != SQLITE_OK > || sql->bindInt64(2, objectStoreID) != SQLITE_OK > || sql->bindBlob(3, buffer->data(), buffer->size()) != SQLITE_OK) { > LOG_ERROR("Unable to lookup index record in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to lookup index record in database") }; >+ return IDBError { UnknownError, "Unable to lookup index record in database"_s }; > } > > int result = sql->step(); > if (result != SQLITE_ROW && result != SQLITE_DONE) { > LOG_ERROR("Unable to lookup index record in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to lookup index record in database") }; >+ return IDBError { UnknownError, "Unable to lookup index record in database"_s }; > } > > if (result == SQLITE_DONE) >@@ -2252,7 +2252,7 @@ IDBError SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey(int64_t indexID > > if (!deserializeIDBKeyData(keyVector.data(), keyVector.size(), objectStoreKey)) { > LOG_ERROR("Unable to deserialize key looking up index record in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to deserialize key looking up index record in database") }; >+ return IDBError { UnknownError, "Unable to deserialize key looking up index record in database"_s }; > } > > if (type == IndexedDB::IndexRecordType::Key) { >@@ -2285,13 +2285,13 @@ IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier& transactio > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to get count from database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to get count from database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to get count from database without an in-progress transaction"_s }; > } > > auto cursor = transaction->maybeOpenBackingStoreCursor(objectStoreIdentifier, indexIdentifier, range); > if (!cursor) { > LOG_ERROR("Cannot open cursor to populate indexes in database"); >- return IDBError { UnknownError, ASCIILiteral("Unable to populate indexes in database") }; >+ return IDBError { UnknownError, "Unable to populate indexes in database"_s }; > } > > while (cursor->advance(1)) >@@ -2302,16 +2302,16 @@ IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier& transactio > > IDBError SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue(int64_t objectStoreID, uint64_t& outValue) > { >- auto* sql = cachedStatement(SQL::GetKeyGeneratorValue, ASCIILiteral("SELECT currentKey FROM KeyGenerators WHERE objectStoreID = ?;")); >+ auto* sql = cachedStatement(SQL::GetKeyGeneratorValue, "SELECT currentKey FROM KeyGenerators WHERE objectStoreID = ?;"_s); > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK) { > LOG_ERROR("Could not retrieve currentKey from KeyGenerators table (%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg()); >- return IDBError { UnknownError, ASCIILiteral("Error getting current key generator value from database") }; >+ return IDBError { UnknownError, "Error getting current key generator value from database"_s }; > } > int result = sql->step(); > if (result != SQLITE_ROW) { > LOG_ERROR("Could not retreive key generator value for object store, but it should be there."); >- return IDBError { UnknownError, ASCIILiteral("Error finding current key generator value in database") }; >+ return IDBError { UnknownError, "Error finding current key generator value in database"_s }; > } > > int64_t value = sql->getColumnInt64(0); >@@ -2324,7 +2324,7 @@ IDBError SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue(int64_t objectStor > > IDBError SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue(int64_t objectStoreID, uint64_t value) > { >- auto* sql = cachedStatement(SQL::SetKeyGeneratorValue, ASCIILiteral("INSERT INTO KeyGenerators VALUES (?, ?);")); >+ auto* sql = cachedStatement(SQL::SetKeyGeneratorValue, "INSERT INTO KeyGenerators VALUES (?, ?);"_s); > if (!sql > || sql->bindInt64(1, objectStoreID) != SQLITE_OK > || sql->bindInt64(2, value) != SQLITE_OK >@@ -2349,11 +2349,11 @@ IDBError SQLiteIDBBackingStore::generateKeyNumber(const IDBResourceIdentifier& t > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to generate key in database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to generate key in database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to generate key in database without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to generate key in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to generate key in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to generate key in a read-only transaction"_s }; > } > > uint64_t currentValue; >@@ -2378,11 +2378,11 @@ IDBError SQLiteIDBBackingStore::revertGeneratedKeyNumber(const IDBResourceIdenti > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to revert key generator value in database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to revert key generator value in database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to revert key generator value in database without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to revert key generator value in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to revert key generator value in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to revert key generator value in a read-only transaction"_s }; > } > > ASSERT(newKeyNumber); >@@ -2399,11 +2399,11 @@ IDBError SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber(const IDBResourceI > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to update key generator value in database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to update key generator value in database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to update key generator value in database without an in-progress transaction"_s }; > } > if (transaction->mode() == IDBTransactionMode::Readonly) { > LOG_ERROR("Attempt to update key generator value in a read-only transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to update key generator value in a read-only transaction") }; >+ return IDBError { UnknownError, "Attempt to update key generator value in a read-only transaction"_s }; > } > > uint64_t currentValue; >@@ -2431,13 +2431,13 @@ IDBError SQLiteIDBBackingStore::openCursor(const IDBResourceIdentifier& transact > auto* transaction = m_transactions.get(transactionIdentifier); > if (!transaction || !transaction->inProgress()) { > LOG_ERROR("Attempt to open a cursor in database without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to open a cursor in database without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to open a cursor in database without an in-progress transaction"_s }; > } > > auto* cursor = transaction->maybeOpenCursor(info); > if (!cursor) { > LOG_ERROR("Unable to open cursor"); >- return IDBError { UnknownError, ASCIILiteral("Unable to open cursor") }; >+ return IDBError { UnknownError, "Unable to open cursor"_s }; > } > > m_cursors.set(cursor->identifier(), cursor); >@@ -2456,14 +2456,14 @@ IDBError SQLiteIDBBackingStore::iterateCursor(const IDBResourceIdentifier& trans > auto* cursor = m_cursors.get(cursorIdentifier); > if (!cursor) { > LOG_ERROR("Attempt to iterate a cursor that doesn't exist"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to iterate a cursor that doesn't exist") }; >+ return IDBError { UnknownError, "Attempt to iterate a cursor that doesn't exist"_s }; > } > > ASSERT_UNUSED(transactionIdentifier, cursor->transaction()->transactionIdentifier() == transactionIdentifier); > > if (!cursor->transaction() || !cursor->transaction()->inProgress()) { > LOG_ERROR("Attempt to iterate a cursor without an in-progress transaction"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to iterate a cursor without an in-progress transaction") }; >+ return IDBError { UnknownError, "Attempt to iterate a cursor without an in-progress transaction"_s }; > } > > auto key = data.keyData; >@@ -2473,7 +2473,7 @@ IDBError SQLiteIDBBackingStore::iterateCursor(const IDBResourceIdentifier& trans > if (key.isValid()) { > if (!cursor->iterate(key, primaryKey)) { > LOG_ERROR("Attempt to iterate cursor failed"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to iterate cursor failed") }; >+ return IDBError { UnknownError, "Attempt to iterate cursor failed"_s }; > } > } else { > ASSERT(!primaryKey.isValid()); >@@ -2481,7 +2481,7 @@ IDBError SQLiteIDBBackingStore::iterateCursor(const IDBResourceIdentifier& trans > count = 1; > if (!cursor->advance(count)) { > LOG_ERROR("Attempt to advance cursor failed"); >- return IDBError { UnknownError, ASCIILiteral("Attempt to advance cursor failed") }; >+ return IDBError { UnknownError, "Attempt to advance cursor failed"_s }; > } > } > >@@ -2522,7 +2522,7 @@ void SQLiteIDBBackingStore::deleteBackingStore() > bool errored = true; > > if (m_sqliteDB) { >- SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT fileName FROM BlobFiles;")); >+ SQLiteStatement sql(*m_sqliteDB, "SELECT fileName FROM BlobFiles;"_s); > if (sql.prepare() == SQLITE_OK) { > int result = sql.step(); > while (result == SQLITE_ROW) { >diff --git a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp >index 23165c9b96d1dfceeddc9d24e159f26f01fbf881..a02f641bda8c2502139e6a74d8b194cca72f6d68 100644 >--- a/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp >@@ -64,19 +64,19 @@ IDBError SQLiteIDBTransaction::begin(SQLiteDatabase& database) > if (m_sqliteTransaction->inProgress()) > return IDBError { }; > >- return IDBError { UnknownError, ASCIILiteral("Could not start SQLite transaction in database backend") }; >+ return IDBError { UnknownError, "Could not start SQLite transaction in database backend"_s }; > } > > IDBError SQLiteIDBTransaction::commit() > { > LOG(IndexedDB, "SQLiteIDBTransaction::commit"); > if (!m_sqliteTransaction || !m_sqliteTransaction->inProgress()) >- return IDBError { UnknownError, ASCIILiteral("No SQLite transaction in progress to commit") }; >+ return IDBError { UnknownError, "No SQLite transaction in progress to commit"_s }; > > m_sqliteTransaction->commit(); > > if (m_sqliteTransaction->inProgress()) >- return IDBError { UnknownError, ASCIILiteral("Unable to commit SQLite transaction in database backend") }; >+ return IDBError { UnknownError, "Unable to commit SQLite transaction in database backend"_s }; > > deleteBlobFilesIfNecessary(); > moveBlobFilesIfNecessary(); >@@ -125,12 +125,12 @@ IDBError SQLiteIDBTransaction::abort() > m_blobTemporaryAndStoredFilenames.clear(); > > if (!m_sqliteTransaction || !m_sqliteTransaction->inProgress()) >- return IDBError { UnknownError, ASCIILiteral("No SQLite transaction in progress to abort") }; >+ return IDBError { UnknownError, "No SQLite transaction in progress to abort"_s }; > > m_sqliteTransaction->rollback(); > > if (m_sqliteTransaction->inProgress()) >- return IDBError { UnknownError, ASCIILiteral("Unable to abort SQLite transaction in database backend") }; >+ return IDBError { UnknownError, "Unable to abort SQLite transaction in database backend"_s }; > > reset(); > return IDBError { }; >diff --git a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >index cdef93fdb4f4154757973ddad8707110928b6011..28da2a566252a1118d2f42864b8267f9c23f3af5 100644 >--- a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >@@ -678,7 +678,7 @@ void UniqueIDBDatabase::deleteObjectStore(UniqueIDBDatabaseTransaction& transact > > auto* info = m_databaseInfo->infoForExistingObjectStore(objectStoreName); > if (!info) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to delete non-existant object store") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to delete non-existant object store"_s }); > return; > } > >@@ -719,7 +719,7 @@ void UniqueIDBDatabase::renameObjectStore(UniqueIDBDatabaseTransaction& transact > > auto* info = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); > if (!info) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to rename non-existant object store") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to rename non-existant object store"_s }); > return; > } > >@@ -828,13 +828,13 @@ void UniqueIDBDatabase::deleteIndex(UniqueIDBDatabaseTransaction& transaction, u > > auto* objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); > if (!objectStoreInfo) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to delete index from non-existant object store") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to delete index from non-existant object store"_s }); > return; > } > > auto* indexInfo = objectStoreInfo->infoForExistingIndex(indexName); > if (!indexInfo) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to delete non-existant index") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to delete non-existant index"_s }); > return; > } > >@@ -878,13 +878,13 @@ void UniqueIDBDatabase::renameIndex(UniqueIDBDatabaseTransaction& transaction, u > > auto* objectStoreInfo = m_databaseInfo->infoForExistingObjectStore(objectStoreIdentifier); > if (!objectStoreInfo) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to rename index in non-existant object store") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to rename index in non-existant object store"_s }); > return; > } > > auto* indexInfo = objectStoreInfo->infoForExistingIndex(indexIdentifier); > if (!indexInfo) { >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to rename non-existant index") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to rename non-existant index"_s }); > return; > } > >@@ -962,7 +962,7 @@ void UniqueIDBDatabase::performPutOrAdd(uint64_t callbackIdentifier, const IDBRe > > auto* objectStoreInfo = m_backingStore->infoForObjectStore(objectStoreIdentifier); > if (!objectStoreInfo) { >- error = IDBError(InvalidStateError, ASCIILiteral("Object store cannot be found in the backing store")); >+ error = IDBError(InvalidStateError, "Object store cannot be found in the backing store"_s); > postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, error, usedKey)); > return; > } >@@ -989,7 +989,7 @@ void UniqueIDBDatabase::performPutOrAdd(uint64_t callbackIdentifier, const IDBRe > bool keyExists; > error = m_backingStore->keyExistsInObjectStore(transactionIdentifier, objectStoreIdentifier, usedKey, keyExists); > if (error.isNull() && keyExists) >- error = IDBError(ConstraintError, ASCIILiteral("Key already exists in the object store")); >+ error = IDBError(ConstraintError, "Key already exists in the object store"_s); > > if (!error.isNull()) { > postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, error, usedKey)); >@@ -1008,18 +1008,18 @@ void UniqueIDBDatabase::performPutOrAdd(uint64_t callbackIdentifier, const IDBRe > > auto value = deserializeIDBValueToJSValue(databaseThreadExecState(), originalRecordValue.data()); > if (value.isUndefined()) { >- postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, ASCIILiteral("Unable to deserialize record value for record key injection")), usedKey)); >+ postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, "Unable to deserialize record value for record key injection"_s), usedKey)); > return; > } > > if (!injectIDBKeyIntoScriptValue(databaseThreadExecState(), usedKey, value, objectStoreInfo->keyPath().value())) { >- postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, ASCIILiteral("Unable to inject record key into record value")), usedKey)); >+ postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, "Unable to inject record key into record value"_s), usedKey)); > return; > } > > auto serializedValue = SerializedScriptValue::create(databaseThreadExecState(), value); > if (UNLIKELY(scope.exception())) { >- postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, ASCIILiteral("Unable to serialize record value after injecting record key")), usedKey)); >+ postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didPerformPutOrAdd, callbackIdentifier, IDBError(ConstraintError, "Unable to serialize record value after injecting record key"_s), usedKey)); > return; > } > >@@ -1313,7 +1313,7 @@ void UniqueIDBDatabase::commitTransaction(UniqueIDBDatabaseTransaction& transact > return; > } > >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to commit transaction that is already finishing") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to commit transaction that is already finishing"_s }); > return; > } > >@@ -1357,7 +1357,7 @@ void UniqueIDBDatabase::abortTransaction(UniqueIDBDatabaseTransaction& transacti > return; > } > >- performErrorCallback(callbackID, IDBError { UnknownError, ASCIILiteral("Attempt to abort transaction that is already finishing") }); >+ performErrorCallback(callbackID, IDBError { UnknownError, "Attempt to abort transaction that is already finishing"_s }); > return; > } > >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBError.h b/Source/WebCore/Modules/indexeddb/shared/IDBError.h >index 62a76c88447f2a79d19b0f7c48ed1abd57300e04..ea7717de53b16b66ad4d73ebf35c67d9b82527cb 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBError.h >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBError.h >@@ -39,7 +39,7 @@ class IDBError { > > static IDBError userDeleteError() > { >- return IDBError { UnknownError, ASCIILiteral("Database deleted by request of the user") }; >+ return IDBError { UnknownError, "Database deleted by request of the user"_s }; > } > > WEBCORE_EXPORT IDBError& operator=(const IDBError&); >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >index 0010c2443a1ee68c5ae66d78eb9a2a78455de1e6..29ea7790153d3f55e807a0a0098e96067c4c8a35 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >@@ -100,13 +100,13 @@ String IDBTransactionInfo::loggingString() const > String modeString; > switch (m_mode) { > case IDBTransactionMode::Readonly: >- modeString = ASCIILiteral("readonly"); >+ modeString = "readonly"_s; > break; > case IDBTransactionMode::Readwrite: >- modeString = ASCIILiteral("readwrite"); >+ modeString = "readwrite"_s; > break; > case IDBTransactionMode::Versionchange: >- modeString = ASCIILiteral("versionchange"); >+ modeString = "versionchange"_s; > break; > default: > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp b/Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp >index e75072c976813d61d7c963abe700fcf070c5a3a5..24b816d2f0f88635811d63c6c35b79edc7987b65 100644 >--- a/Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp >+++ b/Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp >@@ -130,7 +130,7 @@ void CanvasCaptureMediaStreamTrack::Source::canvasChanged(CanvasBase& canvas, co > if (is<WebGLRenderingContextBase>(canvas.renderingContext())) { > auto& context = downcast<WebGLRenderingContextBase>(*canvas.renderingContext()); > if (!context.isPreservingDrawingBuffer()) { >- canvas.scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Turning drawing buffer preservation for the WebGL canvas being captured")); >+ canvas.scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Turning drawing buffer preservation for the WebGL canvas being captured"_s); > context.setPreserveDrawingBuffer(true); > } > } >diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >index aa237ce198f342bbd514b88a16710d0355e457d2..213daf08a2001fd6e9bef6e75d77fe148b72d7f7 100644 >--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >@@ -310,7 +310,7 @@ void PeerConnectionBackend::addIceCandidate(RTCIceCandidate* iceCandidate, DOMPr > > // FIXME: As per https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addicecandidate(), this check should be done before enqueuing the task. > if (iceCandidate->sdpMid().isNull() && !iceCandidate->sdpMLineIndex()) { >- promise.reject(Exception { TypeError, ASCIILiteral("Trying to add a candidate that is missing both sdpMid and sdpMLineIndex") }); >+ promise.reject(Exception { TypeError, "Trying to add a candidate that is missing both sdpMid and sdpMLineIndex"_s }); > return; > } > m_addIceCandidatePromise = WTFMove(promise); >diff --git a/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp b/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp >index 785bf16a2512e397ea7d99021ec5f8442d9e93c1..15a8f18a3733161f422e4c0646ab41895d034386 100644 >--- a/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp >+++ b/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp >@@ -278,7 +278,7 @@ void UserMediaRequest::deny(MediaAccessDenialReason reason, const String& messag > break; > case MediaAccessDenialReason::InvalidConstraint: > RELEASE_LOG(MediaStream, "UserMediaRequest::deny - invalid constraint - %s", message.utf8().data()); >- m_promise.rejectType<IDLInterface<OverconstrainedError>>(OverconstrainedError::create(message, ASCIILiteral("Invalid constraint")).get()); >+ m_promise.rejectType<IDLInterface<OverconstrainedError>>(OverconstrainedError::create(message, "Invalid constraint"_s).get()); > return; > case MediaAccessDenialReason::HardwareError: > RELEASE_LOG(MediaStream, "UserMediaRequest::deny - hardware error"); >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp >index a79cbabdd298704d33bc1b1daa3feb83c2cb5466..64e2bbf11b615bdd4bdb9988733c7d1db2a3e148 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp >@@ -170,7 +170,7 @@ void LibWebRTCMediaEndpoint::doSetLocalDescription(RTCSessionDescription& descri > > // FIXME: See https://bugs.webkit.org/show_bug.cgi?id=173783. Remove this test once fixed at LibWebRTC level. > if (description.type() == RTCSdpType::Answer && !m_backend->pending_remote_description()) { >- m_peerConnectionBackend.setLocalDescriptionFailed(Exception { InvalidStateError, ASCIILiteral("Failed to set local answer sdp: no pending remote description.") }); >+ m_peerConnectionBackend.setLocalDescriptionFailed(Exception { InvalidStateError, "Failed to set local answer sdp: no pending remote description."_s }); > return; > } > >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >index aaf2441c5ebed3c44d5eaab7c54e080b690d6caf..327bc88fe854598f26de8f9690496912d9ba52ac 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >@@ -221,7 +221,7 @@ void LibWebRTCPeerConnectionBackend::doAddIceCandidate(RTCIceCandidate& candidat > m_pendingCandidates.append(WTFMove(rtcCandidate)); > else if (!m_endpoint->addIceCandidate(*rtcCandidate.get())) { > ASSERT_NOT_REACHED(); >- addIceCandidateFailed(Exception { OperationError, ASCIILiteral("Failed to apply the received candidate") }); >+ addIceCandidateFailed(Exception { OperationError, "Failed to apply the received candidate"_s }); > return; > } > addIceCandidateSucceeded(); >diff --git a/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp b/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >index b92cb2ea98c17f6d720e6cffde234b8144c9d969..24cb5ee1b9af5743683c0e66bef46bc2b1bb013b 100644 >--- a/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >+++ b/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp >@@ -157,7 +157,7 @@ static ExceptionOr<void> checkAndCanonicalizeTotal(PaymentCurrencyAmount& total) > return exception; > > if (total.value[0] == '-') >- return Exception { TypeError, ASCIILiteral("Total currency values cannot be negative.") }; >+ return Exception { TypeError, "Total currency values cannot be negative."_s }; > > return { }; > } >@@ -316,7 +316,7 @@ ExceptionOr<Ref<PaymentRequest>> PaymentRequest::create(Document& document, Vect > details.id = createCanonicalUUIDString(); > > if (methodData.isEmpty()) >- return Exception { TypeError, ASCIILiteral("At least one payment method is required.") }; >+ return Exception { TypeError, "At least one payment method is required."_s }; > > Vector<Method> serializedMethodData; > serializedMethodData.reserveInitialCapacity(methodData.size()); >diff --git a/Source/WebCore/Modules/quota/DOMWindowQuota.cpp b/Source/WebCore/Modules/quota/DOMWindowQuota.cpp >index a642d89231f9b1942c8184979ae92f4a62c7f60f..9d4eb856493780adb6a9fb23c7512cecebdd6055 100644 >--- a/Source/WebCore/Modules/quota/DOMWindowQuota.cpp >+++ b/Source/WebCore/Modules/quota/DOMWindowQuota.cpp >@@ -73,7 +73,7 @@ StorageInfo* DOMWindowQuota::webkitStorageInfo(DOMWindow* window) > StorageInfo* DOMWindowQuota::webkitStorageInfo() const > { > if (!m_storageInfo && frame()) { >- frame()->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("window.webkitStorageInfo is deprecated. Use navigator.webkitTemporaryStorage or navigator.webkitPersistentStorage instead.")); >+ frame()->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "window.webkitStorageInfo is deprecated. Use navigator.webkitTemporaryStorage or navigator.webkitPersistentStorage instead."_s); > m_storageInfo = StorageInfo::create(); > } > return m_storageInfo.get(); >diff --git a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp >index 5e62c5ac2dc9cc010b5e993db13cca5e4623e85d..fbd2b63cf774c31d2b3be9a10575ec5266df22d0 100644 >--- a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp >+++ b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp >@@ -529,7 +529,7 @@ bool AudioBufferSourceNode::looping() > { > static bool firstTime = true; > if (firstTime && context().scriptExecutionContext()) { >- context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead.")); >+ context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead."_s); > firstTime = false; > } > >@@ -540,7 +540,7 @@ void AudioBufferSourceNode::setLooping(bool looping) > { > static bool firstTime = true; > if (firstTime && context().scriptExecutionContext()) { >- context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead.")); >+ context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "AudioBufferSourceNode 'looping' attribute is deprecated. Use 'loop' instead."_s); > firstTime = false; > } > >diff --git a/Source/WebCore/Modules/webaudio/AudioNode.cpp b/Source/WebCore/Modules/webaudio/AudioNode.cpp >index f200b050e726127cc1d6f6b5a635f67af2b4e776..ad1351f44aeef347c3edb0d5da5be17113e797fa 100644 >--- a/Source/WebCore/Modules/webaudio/AudioNode.cpp >+++ b/Source/WebCore/Modules/webaudio/AudioNode.cpp >@@ -205,11 +205,11 @@ String AudioNode::channelCountMode() > { > switch (m_channelCountMode) { > case Max: >- return ASCIILiteral("max"); >+ return "max"_s; > case ClampedMax: >- return ASCIILiteral("clamped-max"); >+ return "clamped-max"_s; > case Explicit: >- return ASCIILiteral("explicit"); >+ return "explicit"_s; > } > ASSERT_NOT_REACHED(); > return emptyString(); >@@ -241,9 +241,9 @@ String AudioNode::channelInterpretation() > { > switch (m_channelInterpretation) { > case AudioBus::Speakers: >- return ASCIILiteral("speakers"); >+ return "speakers"_s; > case AudioBus::Discrete: >- return ASCIILiteral("discrete"); >+ return "discrete"_s; > } > ASSERT_NOT_REACHED(); > return emptyString(); >diff --git a/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp b/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp >index 65267d7a6cc9ff16f3ec0ce7a2a650b9ee4a59f7..f538e45be9f2c46fbb3d2331a735f19f5472944d 100644 >--- a/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp >+++ b/Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp >@@ -40,7 +40,7 @@ Ref<MediaStreamAudioSource> MediaStreamAudioSource::create() > } > > MediaStreamAudioSource::MediaStreamAudioSource() >- : RealtimeMediaSource(ASCIILiteral("WebAudio-") + createCanonicalUUIDString(), RealtimeMediaSource::Type::Audio, "MediaStreamAudioDestinationNode") >+ : RealtimeMediaSource("WebAudio-"_s + createCanonicalUUIDString(), RealtimeMediaSource::Type::Audio, "MediaStreamAudioDestinationNode") > { > } > >diff --git a/Source/WebCore/Modules/webauthn/AuthenticatorManager.cpp b/Source/WebCore/Modules/webauthn/AuthenticatorManager.cpp >index 7ee2afc92be838a29989d82d6dff0073845451fc..59d601621f1911795b17e4de766fd639696f6154 100644 >--- a/Source/WebCore/Modules/webauthn/AuthenticatorManager.cpp >+++ b/Source/WebCore/Modules/webauthn/AuthenticatorManager.cpp >@@ -58,16 +58,16 @@ static Ref<ArrayBuffer> produceClientDataJson(ClientDataType type, const BufferS > auto object = JSON::Object::create(); > switch (type) { > case ClientDataType::Create: >- object->setString(ASCIILiteral("type"), ASCIILiteral("webauthn.create")); >+ object->setString("type"_s, "webauthn.create"_s); > break; > case ClientDataType::Get: >- object->setString(ASCIILiteral("type"), ASCIILiteral("webauthn.get")); >+ object->setString("type"_s, "webauthn.get"_s); > break; > } >- object->setString(ASCIILiteral("challenge"), WTF::base64URLEncode(challenge.data(), challenge.length())); >- object->setString(ASCIILiteral("origin"), origin.toRawString()); >+ object->setString("challenge"_s, WTF::base64URLEncode(challenge.data(), challenge.length())); >+ object->setString("origin"_s, origin.toRawString()); > // FIXME: This might be platform dependent. >- object->setString(ASCIILiteral("hashAlgorithm"), ASCIILiteral("SHA-256")); >+ object->setString("hashAlgorithm"_s, "SHA-256"_s); > > auto utf8JSONString = object->toJSONString().utf8(); > return ArrayBuffer::create(utf8JSONString.data(), utf8JSONString.length()); >@@ -88,7 +88,7 @@ static std::unique_ptr<Timer> initTimeoutTimer(std::optional<unsigned long> time > return nullptr; > > auto timer = std::make_unique<Timer>([promise = promise] () mutable { >- promise.reject(Exception { NotAllowedError, ASCIILiteral("Operation timed out.") }); >+ promise.reject(Exception { NotAllowedError, "Operation timed out."_s }); > }); > timer->startOneShot(Seconds::fromMilliseconds(*timeOutInMs)); > return timer; >@@ -127,7 +127,7 @@ void AuthenticatorManager::create(const SecurityOrigin& callerOrigin, const Publ > // Step 1, 3, 16 are handled by the caller. > // Step 2. > if (!sameOriginWithAncestors) { >- promise.reject(Exception { NotAllowedError, ASCIILiteral("The origin of the document is not the same as its ancestors.") }); >+ promise.reject(Exception { NotAllowedError, "The origin of the document is not the same as its ancestors."_s }); > return; > } > >@@ -139,7 +139,7 @@ void AuthenticatorManager::create(const SecurityOrigin& callerOrigin, const Publ > // Step 6 is therefore skipped. Also, we lack the support to determine whether a domain is a registrable > // domain suffix of another domain. Hence restrict the comparison to equal in Step 7. > if (!options.rp.id.isEmpty() && callerOrigin.host() != options.rp.id) { >- promise.reject(Exception { SecurityError, ASCIILiteral("The origin of the document is not a registrable domain suffix of the provided RP ID.") }); >+ promise.reject(Exception { SecurityError, "The origin of the document is not a registrable domain suffix of the provided RP ID."_s }); > return; > } > if (options.rp.id.isEmpty()) >@@ -149,7 +149,7 @@ void AuthenticatorManager::create(const SecurityOrigin& callerOrigin, const Publ > // Most of the jobs are done by bindings. However, we can't know if the JSValue of options.pubKeyCredParams > // is empty or not. Return NotSupportedError as long as it is empty. > if (options.pubKeyCredParams.isEmpty()) { >- promise.reject(Exception { NotSupportedError, ASCIILiteral("No desired properties of the to be created credential are provided.") }); >+ promise.reject(Exception { NotSupportedError, "No desired properties of the to be created credential are provided."_s }); > return; > } > >@@ -162,7 +162,7 @@ void AuthenticatorManager::create(const SecurityOrigin& callerOrigin, const Publ > // Also, resident keys, user verifications and direct attestation are enforced at this tage. > // For better performance, transports of options.excludeCredentials are checked in LocalAuthenticator. > if (!m_messenger) { >- promise.reject(Exception { UnknownError, ASCIILiteral("Unknown internal error.") }); >+ promise.reject(Exception { UnknownError, "Unknown internal error."_s }); > return; > } > >@@ -170,7 +170,7 @@ void AuthenticatorManager::create(const SecurityOrigin& callerOrigin, const Publ > if (didTimeoutTimerFire(timeoutTimer.get())) > return; > if (abortSignal && abortSignal->aborted()) { >- promise.reject(Exception { AbortError, ASCIILiteral("Aborted by AbortSignal.") }); >+ promise.reject(Exception { AbortError, "Aborted by AbortSignal."_s }); > return; > } > if (result.hasException()) { >@@ -194,7 +194,7 @@ void AuthenticatorManager::discoverFromExternalSource(const SecurityOrigin& call > // Step 1, 3, 13 are handled by the caller. > // Step 2. > if (!sameOriginWithAncestors) { >- promise.reject(Exception { NotAllowedError, ASCIILiteral("The origin of the document is not the same as its ancestors.") }); >+ promise.reject(Exception { NotAllowedError, "The origin of the document is not the same as its ancestors."_s }); > return; > } > >@@ -206,7 +206,7 @@ void AuthenticatorManager::discoverFromExternalSource(const SecurityOrigin& call > // Step 6 is therefore skipped. Also, we lack the support to determine whether a domain is a registrable > // domain suffix of another domain. Hence restrict the comparison to equal in Step 7. > if (!options.rpId.isEmpty() && callerOrigin.host() != options.rpId) { >- promise.reject(Exception { SecurityError, ASCIILiteral("The origin of the document is not a registrable domain suffix of the provided RP ID.") }); >+ promise.reject(Exception { SecurityError, "The origin of the document is not a registrable domain suffix of the provided RP ID."_s }); > return; > } > if (options.rpId.isEmpty()) >@@ -221,7 +221,7 @@ void AuthenticatorManager::discoverFromExternalSource(const SecurityOrigin& call > // Also, resident keys, user verifications and direct attestation are enforced at this tage. > // For better performance, filtering of options.allowCredentials is done in LocalAuthenticator. > if (!m_messenger) { >- promise.reject(Exception { UnknownError, ASCIILiteral("Unknown internal error.") }); >+ promise.reject(Exception { UnknownError, "Unknown internal error."_s }); > return; > } > >@@ -229,7 +229,7 @@ void AuthenticatorManager::discoverFromExternalSource(const SecurityOrigin& call > if (didTimeoutTimerFire(timeoutTimer.get())) > return; > if (abortSignal && abortSignal->aborted()) { >- promise.reject(Exception { AbortError, ASCIILiteral("Aborted by AbortSignal.") }); >+ promise.reject(Exception { AbortError, "Aborted by AbortSignal."_s }); > return; > } > if (result.hasException()) { >@@ -249,7 +249,7 @@ void AuthenticatorManager::isUserVerifyingPlatformAuthenticatorAvailable(DOMProm > // The following implements https://www.w3.org/TR/webauthn/#isUserVerifyingPlatformAuthenticatorAvailable > // as of 5 December 2017. > if (!m_messenger) { >- promise.reject(Exception { UnknownError, ASCIILiteral("Unknown internal error.") }); >+ promise.reject(Exception { UnknownError, "Unknown internal error."_s }); > return; > } > >diff --git a/Source/WebCore/Modules/webauthn/cocoa/LocalAuthenticator.mm b/Source/WebCore/Modules/webauthn/cocoa/LocalAuthenticator.mm >index 3a740ed295d1469369079809461849d2572a8d3e..40c8631ef002b600d7d3da79b9a93b414b53923c 100644 >--- a/Source/WebCore/Modules/webauthn/cocoa/LocalAuthenticator.mm >+++ b/Source/WebCore/Modules/webauthn/cocoa/LocalAuthenticator.mm >@@ -124,7 +124,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > ASSERT_UNUSED(hash, hash == hash); > ASSERT_UNUSED(options, !options.rp.id.isEmpty()); > ASSERT_UNUSED(callback, callback); >- exceptionCallback({ NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionCallback({ NotAllowedError, "No avaliable authenticators."_s }); > #else > // The following implements https://www.w3.org/TR/webauthn/#op-make-cred as of 5 December 2017. > // Skip Step 4-5 as requireResidentKey and requireUserVerification are enforced. >@@ -139,7 +139,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > } > } > if (!canFullfillPubKeyCredParams) { >- exceptionCallback({ NotSupportedError, ASCIILiteral("The platform attached authenticator doesn't support any provided PublicKeyCredentialParameters.") }); >+ exceptionCallback({ NotSupportedError, "The platform attached authenticator doesn't support any provided PublicKeyCredentialParameters."_s }); > return; > } > >@@ -158,7 +158,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &attributesArrayRef); > if (status && status != errSecItemNotFound) { > LOG_ERROR("Couldn't query Keychain: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto retainAttributesArray = adoptCF(attributesArrayRef); >@@ -166,7 +166,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > for (NSDictionary *nsAttributes in (NSArray *)attributesArrayRef) { > NSData *nsCredentialId = nsAttributes[(id)kSecAttrApplicationLabel]; > if (excludeCredentialIds.contains(String(reinterpret_cast<const char*>(nsCredentialId.bytes), nsCredentialId.length))) { >- exceptionCallback({ NotAllowedError, ASCIILiteral("At least one credential matches an entry of the excludeCredentials list in the platform attached authenticator.") }); >+ exceptionCallback({ NotAllowedError, "At least one credential matches an entry of the excludeCredentials list in the platform attached authenticator."_s }); > return; > } > } >@@ -180,7 +180,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > if (![context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) { > LOG_ERROR("Couldn't evaluate authentication with biometrics policy: %@", error); > // FIXME(182767) >- exceptionCallback({ NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionCallback({ NotAllowedError, "No avaliable authenticators."_s }); > return; > } > >@@ -190,7 +190,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > ASSERT(!isMainThread()); > if (!success || error) { > LOG_ERROR("Couldn't authenticate with biometrics: %@", error); >- exceptionCallback({ NotAllowedError, ASCIILiteral("Couldn't get user consent.") }); >+ exceptionCallback({ NotAllowedError, "Couldn't get user consent."_s }); > return; > } > >@@ -205,7 +205,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteQuery); > if (status && status != errSecItemNotFound) { > LOG_ERROR("Couldn't detele older credential: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > >@@ -217,7 +217,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > ASSERT(!isMainThread()); > if (error) { > LOG_ERROR("Couldn't attest: %@", error); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > // Attestation Certificate and Attestation Issuing CA >@@ -250,7 +250,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)credentialIdQuery, &attributesRef); > if (status) { > LOG_ERROR("Couldn't get Credential ID: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto retainAttributes = adoptCF(attributesRef); >@@ -271,7 +271,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > status = SecItemUpdate((__bridge CFDictionaryRef)updateQuery, (__bridge CFDictionaryRef)updateParams); > if (status) { > LOG_ERROR("Couldn't update the Keychain item: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > } >@@ -304,7 +304,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > auto retainError = adoptCF(errorRef); > if (errorRef) { > LOG_ERROR("Couldn't export the public key: %@", (NSError*)errorRef); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > ASSERT(((NSData *)publicKeyDataRef.get()).length == (1 + 2 * ES256KeySizeInBytes)); // 04 | X | Y >@@ -325,7 +325,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > auto cosePublicKey = cbor::CBORWriter::write(cbor::CBORValue(WTFMove(publicKeyMap))); > if (!cosePublicKey) { > LOG_ERROR("Couldn't encode the public key into COSE binaries."); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > attestedCredentialData.appendVector(cosePublicKey.value()); >@@ -347,7 +347,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > auto retainError = adoptCF(errorRef); > if (errorRef) { > LOG_ERROR("Couldn't generate the signature: %@", (NSError*)errorRef); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto nsSignature = (NSData *)signatureRef.get(); >@@ -374,7 +374,7 @@ void LocalAuthenticator::makeCredential(const Vector<uint8_t>& hash, const Publi > auto attestationObject = cbor::CBORWriter::write(cbor::CBORValue(WTFMove(attestationObjectMap))); > if (!attestationObject) { > LOG_ERROR("Couldn't encode the attestation object."); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > >@@ -393,7 +393,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > ASSERT_UNUSED(hash, hash == hash); > ASSERT_UNUSED(options, !options.rpId.isEmpty()); > ASSERT_UNUSED(callback, callback); >- exceptionCallback({ NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionCallback({ NotAllowedError, "No avaliable authenticators."_s }); > #else > // The following implements https://www.w3.org/TR/webauthn/#op-get-assertion as of 5 December 2017. > // Skip Step 2 as requireUserVerification is enforced. >@@ -402,7 +402,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > // Step 3-5. Unlike the spec, if an allow list is provided and there is no intersection between existing ones and the allow list, we always return NotAllowedError. > HashSet<String> allowCredentialIds = produceHashSet(options.allowCredentials); > if (!options.allowCredentials.isEmpty() && allowCredentialIds.isEmpty()) { >- exceptionCallback({ NotAllowedError, ASCIILiteral("No matched credentials are found in the platform attached authenticator.") }); >+ exceptionCallback({ NotAllowedError, "No matched credentials are found in the platform attached authenticator."_s }); > return; > } > >@@ -418,7 +418,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &attributesArrayRef); > if (status && status != errSecItemNotFound) { > LOG_ERROR("Couldn't query Keychain: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto retainAttributesArray = adoptCF(attributesArrayRef); >@@ -436,7 +436,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > intersectedCredentialsAttributes = result; > } > if (!intersectedCredentialsAttributes.count) { >- exceptionCallback({ NotAllowedError, ASCIILiteral("No matched credentials are found in the platform attached authenticator.") }); >+ exceptionCallback({ NotAllowedError, "No matched credentials are found in the platform attached authenticator."_s }); > return; > } > >@@ -452,7 +452,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > auto retainContext = adoptNS(context); > LOG_ERROR("Couldn't evaluate authentication with biometrics policy: %@", error); > // FIXME(182767) >- exceptionCallback({ NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionCallback({ NotAllowedError, "No avaliable authenticators."_s }); > return; > } > >@@ -466,7 +466,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > ASSERT(!isMainThread()); > if (!success || error) { > LOG_ERROR("Couldn't authenticate with biometrics: %@", error); >- exceptionCallback({ NotAllowedError, ASCIILiteral("Couldn't get user consent.") }); >+ exceptionCallback({ NotAllowedError, "Couldn't get user consent."_s }); > return; > } > >@@ -490,7 +490,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &privateKeyRef); > if (status) { > LOG_ERROR("Couldn't get the private key reference: %d", status); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto privateKey = adoptCF(privateKeyRef); >@@ -504,7 +504,7 @@ void LocalAuthenticator::getAssertion(const Vector<uint8_t>& hash, const PublicK > auto retainError = adoptCF(errorRef); > if (errorRef) { > LOG_ERROR("Couldn't generate the signature: %@", (NSError*)errorRef); >- exceptionCallback({ UnknownError, ASCIILiteral("Unknown internal error.") }); >+ exceptionCallback({ UnknownError, "Unknown internal error."_s }); > return; > } > auto nsSignature = (NSData *)signatureRef.get(); >diff --git a/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp b/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp >index 8fda62a6e63dff4dc6e78f5ed5138a255c117894..dde7cc6ab7c3237b2a22725b5a139a0c63ec0331 100644 >--- a/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp >+++ b/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp >@@ -649,7 +649,7 @@ unsigned long long DatabaseTracker::usage(const SecurityOriginData& origin) > { > String originPath = this->originPath(origin); > unsigned long long diskUsage = 0; >- for (auto& fileName : FileSystem::listDirectory(originPath, ASCIILiteral("*.db"))) { >+ for (auto& fileName : FileSystem::listDirectory(originPath, "*.db"_s)) { > long long size; > FileSystem::getFileSize(fileName, size); > diskUsage += size; >diff --git a/Source/WebCore/Modules/websockets/WebSocket.cpp b/Source/WebCore/Modules/websockets/WebSocket.cpp >index 02477b9d0d0e2d3a8c798455db71d09336846ee2..f68c2a9398c501bdb13da876dbd5ee68d2c717ab 100644 >--- a/Source/WebCore/Modules/websockets/WebSocket.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocket.cpp >@@ -236,7 +236,7 @@ ExceptionOr<void> WebSocket::connect(const String& url, const Vector<String>& pr > if (m_url.port()) > message = makeString("WebSocket port ", String::number(m_url.port().value()), " blocked"); > else >- message = ASCIILiteral("WebSocket without port blocked"); >+ message = "WebSocket without port blocked"_s; > context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, message); > m_state = CLOSED; > return Exception { SecurityError }; >@@ -397,7 +397,7 @@ ExceptionOr<void> WebSocket::close(std::optional<unsigned short> optionalCode, c > return Exception { InvalidAccessError }; > CString utf8 = reason.utf8(StrictConversionReplacingUnpairedSurrogatesWithFFFD); > if (utf8.length() > maxReasonSizeInBytes) { >- scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("WebSocket close message is too long.")); >+ scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "WebSocket close message is too long."_s); > return Exception { SyntaxError }; > } > } >@@ -449,9 +449,9 @@ String WebSocket::binaryType() const > { > switch (m_binaryType) { > case BinaryType::Blob: >- return ASCIILiteral("blob"); >+ return "blob"_s; > case BinaryType::ArrayBuffer: >- return ASCIILiteral("arraybuffer"); >+ return "arraybuffer"_s; > } > ASSERT_NOT_REACHED(); > return String(); >diff --git a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >index b8b73370f0ce5c4f51f30fc77775492ed00759cf..2701adb9699c3facddb3e5c60fa54eddcdce41b2 100644 >--- a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >@@ -449,10 +449,10 @@ int WebSocketHandshake::readStatusLine(const char* header, size_t headerLength, > // The caller isn't prepared to deal with null bytes in status > // line. WebSockets specification doesn't prohibit this, but HTTP > // does, so we'll just treat this as an error. >- m_failureReason = ASCIILiteral("Status line contains embedded null"); >+ m_failureReason = "Status line contains embedded null"_s; > return p + 1 - header; > } else if (!isASCII(*p)) { >- m_failureReason = ASCIILiteral("Status line contains non-ASCII character"); >+ m_failureReason = "Status line contains non-ASCII character"_s; > return p + 1 - header; > } else if (*p == '\n') > break; >@@ -463,13 +463,13 @@ int WebSocketHandshake::readStatusLine(const char* header, size_t headerLength, > const char* end = p + 1; > int lineLength = end - header; > if (lineLength > maximumLength) { >- m_failureReason = ASCIILiteral("Status line is too long"); >+ m_failureReason = "Status line is too long"_s; > return maximumLength; > } > > // The line must end with "\r\n". > if (lineLength < 2 || *(end - 2) != '\r') { >- m_failureReason = ASCIILiteral("Status line does not end with CRLF"); >+ m_failureReason = "Status line does not end with CRLF"_s; > return lineLength; > } > >@@ -538,7 +538,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e > > if (headerName == HTTPHeaderName::SecWebSocketExtensions) { > if (sawSecWebSocketExtensionsHeaderField) { >- m_failureReason = ASCIILiteral("The Sec-WebSocket-Extensions header must not appear more than once in an HTTP response"); >+ m_failureReason = "The Sec-WebSocket-Extensions header must not appear more than once in an HTTP response"_s; > return nullptr; > } > if (!m_extensionDispatcher.processHeaderValue(value)) { >@@ -549,13 +549,13 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e > } else { > if (headerName == HTTPHeaderName::SecWebSocketAccept) { > if (sawSecWebSocketAcceptHeaderField) { >- m_failureReason = ASCIILiteral("The Sec-WebSocket-Accept header must not appear more than once in an HTTP response"); >+ m_failureReason = "The Sec-WebSocket-Accept header must not appear more than once in an HTTP response"_s; > return nullptr; > } > sawSecWebSocketAcceptHeaderField = true; > } else if (headerName == HTTPHeaderName::SecWebSocketProtocol) { > if (sawSecWebSocketProtocolHeaderField) { >- m_failureReason = ASCIILiteral("The Sec-WebSocket-Protocol header must not appear more than once in an HTTP response"); >+ m_failureReason = "The Sec-WebSocket-Protocol header must not appear more than once in an HTTP response"_s; > return nullptr; > } > sawSecWebSocketProtocolHeaderField = true; >@@ -575,40 +575,40 @@ bool WebSocketHandshake::checkResponseHeaders() > const String& serverWebSocketAccept = this->serverWebSocketAccept(); > > if (serverUpgrade.isNull()) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: 'Upgrade' header is missing"); >+ m_failureReason = "Error during WebSocket handshake: 'Upgrade' header is missing"_s; > return false; > } > if (serverConnection.isNull()) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: 'Connection' header is missing"); >+ m_failureReason = "Error during WebSocket handshake: 'Connection' header is missing"_s; > return false; > } > if (serverWebSocketAccept.isNull()) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing"); >+ m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing"_s; > return false; > } > > if (!equalLettersIgnoringASCIICase(serverUpgrade, "websocket")) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: 'Upgrade' header value is not 'WebSocket'"); >+ m_failureReason = "Error during WebSocket handshake: 'Upgrade' header value is not 'WebSocket'"_s; > return false; > } > if (!equalLettersIgnoringASCIICase(serverConnection, "upgrade")) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: 'Connection' header value is not 'Upgrade'"); >+ m_failureReason = "Error during WebSocket handshake: 'Connection' header value is not 'Upgrade'"_s; > return false; > } > > if (serverWebSocketAccept != m_expectedAccept) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: Sec-WebSocket-Accept mismatch"); >+ m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Accept mismatch"_s; > return false; > } > if (!serverWebSocketProtocol.isNull()) { > if (m_clientProtocol.isEmpty()) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch"); >+ m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch"_s; > return false; > } > Vector<String> result; > m_clientProtocol.split(WebSocket::subprotocolSeparator(), result); > if (!result.contains(serverWebSocketProtocol)) { >- m_failureReason = ASCIILiteral("Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch"); >+ m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch"_s; > return false; > } > } >diff --git a/Source/WebCore/Modules/webvr/VRDisplay.cpp b/Source/WebCore/Modules/webvr/VRDisplay.cpp >index 127cc5c838214a282d30797a76b518cd929192cf..d107a29a6b537e14f1133b4ada64488d904dced0 100644 >--- a/Source/WebCore/Modules/webvr/VRDisplay.cpp >+++ b/Source/WebCore/Modules/webvr/VRDisplay.cpp >@@ -139,17 +139,17 @@ void VRDisplay::requestPresent(const Vector<VRLayerInit>& layers, Ref<DeferredPr > }; > > if (!m_capabilities->canPresent()) { >- rejectRequestAndStopPresenting(NotSupportedError, ASCIILiteral("VRDisplay cannot present")); >+ rejectRequestAndStopPresenting(NotSupportedError, "VRDisplay cannot present"_s); > return; > } > > if (!layers.size() || layers.size() > m_capabilities->maxLayers()) { >- rejectRequestAndStopPresenting(InvalidStateError, ASCIILiteral(layers.size() ? "Too many layers" : "Not enough layers")); >+ rejectRequestAndStopPresenting(InvalidStateError, layers.size() ? "Too many layers"_s : "Not enough layers"_s); > return; > } > > if (!m_presentingLayer && !UserGestureIndicator::processingUserGesture()) { >- rejectRequestAndStopPresenting(InvalidAccessError, ASCIILiteral("Must request presentation from a user gesture handler.")); >+ rejectRequestAndStopPresenting(InvalidAccessError, "Must request presentation from a user gesture handler."_s); > return; > } > >@@ -157,19 +157,19 @@ void VRDisplay::requestPresent(const Vector<VRLayerInit>& layers, Ref<DeferredPr > auto layer = layers[0]; > > if (!layer.source) { >- rejectRequestAndStopPresenting(InvalidStateError, ASCIILiteral("Layer does not contain any source")); >+ rejectRequestAndStopPresenting(InvalidStateError, "Layer does not contain any source"_s); > return; > } > > auto* canvasContext = layer.source->getContext("webgl"); > if (!canvasContext || !canvasContext->isWebGL()) { >- rejectRequestAndStopPresenting(NotSupportedError, ASCIILiteral("WebVR requires VRLayerInit with WebGL context.")); >+ rejectRequestAndStopPresenting(NotSupportedError, "WebVR requires VRLayerInit with WebGL context."_s); > return; > } > > if ((layer.leftBounds.size() && layer.leftBounds.size() != 4) > || (layer.rightBounds.size() && layer.rightBounds.size() != 4)) { >- rejectRequestAndStopPresenting(InvalidStateError, ASCIILiteral("Layer bounds must be either 0 or 4")); >+ rejectRequestAndStopPresenting(InvalidStateError, "Layer bounds must be either 0 or 4"_s); > return; > } > >@@ -185,7 +185,7 @@ void VRDisplay::stopPresenting() > void VRDisplay::exitPresent(Ref<DeferredPromise>&& promise) > { > if (!m_presentingLayer) { >- promise->reject(Exception { InvalidStateError, ASCIILiteral("VRDisplay is not presenting") }); >+ promise->reject(Exception { InvalidStateError, "VRDisplay is not presenting"_s }); > return; > } > >diff --git a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >index 24e22515f4d3ebee104c071c758350317a06fe73..3f1da7629145677563ac1790ddae2594ed89f136 100644 >--- a/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >+++ b/Source/WebCore/PAL/pal/unix/LoggingUnix.cpp >@@ -42,7 +42,7 @@ String logLevelString() > #endif > > // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. >- return ASCIILiteral("NotYetImplemented,") + String(logEnv); >+ return "NotYetImplemented,"_s + String(logEnv); > } > #endif > return String(); >diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp >index 0c1abc4d5e8551835f052e75a9c2007d5461fb36..2f6ab75336010cb706d3899c68880caac60b3a95 100644 >--- a/Source/WebCore/accessibility/AccessibilityObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp >@@ -1940,13 +1940,13 @@ const String AccessibilityObject::defaultLiveRegionStatusForRole(AccessibilityRo > switch (role) { > case AccessibilityRole::ApplicationAlertDialog: > case AccessibilityRole::ApplicationAlert: >- return ASCIILiteral("assertive"); >+ return "assertive"_s; > case AccessibilityRole::ApplicationLog: > case AccessibilityRole::ApplicationStatus: >- return ASCIILiteral("polite"); >+ return "polite"_s; > case AccessibilityRole::ApplicationTimer: > case AccessibilityRole::ApplicationMarquee: >- return ASCIILiteral("off"); >+ return "off"_s; > default: > return nullAtom(); > } >@@ -2004,11 +2004,11 @@ bool AccessibilityObject::ariaIsMultiline() const > > String AccessibilityObject::invalidStatus() const > { >- String grammarValue = ASCIILiteral("grammar"); >- String falseValue = ASCIILiteral("false"); >- String spellingValue = ASCIILiteral("spelling"); >- String trueValue = ASCIILiteral("true"); >- String undefinedValue = ASCIILiteral("undefined"); >+ String grammarValue = "grammar"_s; >+ String falseValue = "false"_s; >+ String spellingValue = "spelling"_s; >+ String trueValue = "true"_s; >+ String undefinedValue = "undefined"_s; > > // aria-invalid can return false (default), grammar, spelling, or true. > String ariaInvalid = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_invalidAttr)); >diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >index 5e3647ef3a88bdfc5cea0a07f89ed6bd6f6689f2..84c2b4e714ecd01649505802fa973789e2a61a56 100644 >--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >@@ -620,7 +620,7 @@ String AccessibilityRenderObject::textUnderElement(AccessibilityTextUnderElement > > // Reflect when a content author has explicitly marked a line break. > if (m_renderer->isBR()) >- return ASCIILiteral("\n"); >+ return "\n"_s; > > if (shouldGetTextFromNode(mode)) > return AccessibilityNodeObject::textUnderElement(mode); >diff --git a/Source/WebCore/bindings/js/JSCustomElementInterface.cpp b/Source/WebCore/bindings/js/JSCustomElementInterface.cpp >index 255c5ad0f5c0f52fd8858f895a1450ebf0c5170e..4beffad42cf3377ca8b3437ab6e45c31e6cc72fa 100644 >--- a/Source/WebCore/bindings/js/JSCustomElementInterface.cpp >+++ b/Source/WebCore/bindings/js/JSCustomElementInterface.cpp >@@ -134,29 +134,29 @@ static RefPtr<Element> constructCustomElementSynchronously(Document& document, V > ASSERT(!newElement.isEmpty()); > HTMLElement* wrappedElement = JSHTMLElement::toWrapped(vm, newElement); > if (!wrappedElement) { >- throwTypeError(&state, scope, ASCIILiteral("The result of constructing a custom element must be a HTMLElement")); >+ throwTypeError(&state, scope, "The result of constructing a custom element must be a HTMLElement"_s); > return nullptr; > } > > if (wrappedElement->hasAttributes()) { >- throwNotSupportedError(state, scope, ASCIILiteral("A newly constructed custom element must not have attributes")); >+ throwNotSupportedError(state, scope, "A newly constructed custom element must not have attributes"_s); > return nullptr; > } > if (wrappedElement->hasChildNodes()) { >- throwNotSupportedError(state, scope, ASCIILiteral("A newly constructed custom element must not have child nodes")); >+ throwNotSupportedError(state, scope, "A newly constructed custom element must not have child nodes"_s); > return nullptr; > } > if (wrappedElement->parentNode()) { >- throwNotSupportedError(state, scope, ASCIILiteral("A newly constructed custom element must not have a parent node")); >+ throwNotSupportedError(state, scope, "A newly constructed custom element must not have a parent node"_s); > return nullptr; > } > if (&wrappedElement->document() != &document) { >- throwNotSupportedError(state, scope, ASCIILiteral("A newly constructed custom element belongs to a wrong docuemnt")); >+ throwNotSupportedError(state, scope, "A newly constructed custom element belongs to a wrong docuemnt"_s); > return nullptr; > } > ASSERT(wrappedElement->namespaceURI() == HTMLNames::xhtmlNamespaceURI); > if (wrappedElement->localName() != localName) { >- throwNotSupportedError(state, scope, ASCIILiteral("A newly constructed custom element belongs to a wrong docuemnt")); >+ throwNotSupportedError(state, scope, "A newly constructed custom element belongs to a wrong docuemnt"_s); > return nullptr; > } > >diff --git a/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp b/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp >index 103d4768e9bf6f9a26328e38dd1c6ea877006304..00ae0dae4152192883be4dd9f0743fc9fd586b0c 100644 >--- a/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp >+++ b/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp >@@ -50,7 +50,7 @@ static JSObject* getCustomElementCallback(ExecState& state, JSObject& prototype, > if (callback.isUndefined()) > return nullptr; > if (!callback.isFunction(vm)) { >- throwTypeError(&state, scope, ASCIILiteral("A custom element callback must be a function")); >+ throwTypeError(&state, scope, "A custom element callback must be a function"_s); > return nullptr; > } > return callback.getObject(); >@@ -63,19 +63,19 @@ static bool validateCustomElementNameAndThrowIfNeeded(ExecState& state, const At > case CustomElementNameValidationStatus::Valid: > return true; > case CustomElementNameValidationStatus::FirstCharacterIsNotLowercaseASCIILetter: >- throwDOMSyntaxError(state, scope, ASCIILiteral("Custom element name must have a lowercase ASCII letter as its first character")); >+ throwDOMSyntaxError(state, scope, "Custom element name must have a lowercase ASCII letter as its first character"_s); > return false; > case CustomElementNameValidationStatus::ContainsUppercaseASCIILetter: >- throwDOMSyntaxError(state, scope, ASCIILiteral("Custom element name cannot contain an uppercase ASCII letter")); >+ throwDOMSyntaxError(state, scope, "Custom element name cannot contain an uppercase ASCII letter"_s); > return false; > case CustomElementNameValidationStatus::ContainsNoHyphen: >- throwDOMSyntaxError(state, scope, ASCIILiteral("Custom element name must contain a hyphen")); >+ throwDOMSyntaxError(state, scope, "Custom element name must contain a hyphen"_s); > return false; > case CustomElementNameValidationStatus::ContainsDisallowedCharacter: >- throwDOMSyntaxError(state, scope, ASCIILiteral("Custom element name contains a character that is not allowed")); >+ throwDOMSyntaxError(state, scope, "Custom element name contains a character that is not allowed"_s); > return false; > case CustomElementNameValidationStatus::ConflictsWithStandardElementName: >- throwDOMSyntaxError(state, scope, ASCIILiteral("Custom element name cannot be same as one of the standard elements")); >+ throwDOMSyntaxError(state, scope, "Custom element name cannot be same as one of the standard elements"_s); > return false; > } > ASSERT_NOT_REACHED(); >@@ -96,7 +96,7 @@ JSValue JSCustomElementRegistry::define(ExecState& state) > > JSValue constructorValue = state.uncheckedArgument(1); > if (!constructorValue.isConstructor()) >- return throwTypeError(&state, scope, ASCIILiteral("The second argument must be a constructor")); >+ return throwTypeError(&state, scope, "The second argument must be a constructor"_s); > JSObject* constructor = constructorValue.getObject(); > > if (!validateCustomElementNameAndThrowIfNeeded(state, localName)) >@@ -105,25 +105,25 @@ JSValue JSCustomElementRegistry::define(ExecState& state) > CustomElementRegistry& registry = wrapped(); > > if (registry.elementDefinitionIsRunning()) { >- throwNotSupportedError(state, scope, ASCIILiteral("Cannot define a custom element while defining another custom element")); >+ throwNotSupportedError(state, scope, "Cannot define a custom element while defining another custom element"_s); > return jsUndefined(); > } > SetForScope<bool> change(registry.elementDefinitionIsRunning(), true); > > if (registry.findInterface(localName)) { >- throwNotSupportedError(state, scope, ASCIILiteral("Cannot define multiple custom elements with the same tag name")); >+ throwNotSupportedError(state, scope, "Cannot define multiple custom elements with the same tag name"_s); > return jsUndefined(); > } > > if (registry.containsConstructor(constructor)) { >- throwNotSupportedError(state, scope, ASCIILiteral("Cannot define multiple custom elements with the same class")); >+ throwNotSupportedError(state, scope, "Cannot define multiple custom elements with the same class"_s); > return jsUndefined(); > } > > JSValue prototypeValue = constructor->get(&state, vm.propertyNames->prototype); > RETURN_IF_EXCEPTION(scope, JSValue()); > if (!prototypeValue.isObject()) >- return throwTypeError(&state, scope, ASCIILiteral("Custom element constructor's prototype must be an object")); >+ return throwTypeError(&state, scope, "Custom element constructor's prototype must be an object"_s); > JSObject& prototypeObject = *asObject(prototypeValue); > > QualifiedName name(nullAtom(), localName, HTMLNames::xhtmlNamespaceURI); >diff --git a/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp b/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp >index ed156d7d625e665a1135347a7867c36ed6a1cf1c..76a662f85e4724f02cb0f9b220fd09c1efaeba92 100644 >--- a/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp >+++ b/Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp >@@ -78,7 +78,7 @@ String JSCustomXPathNSResolver::lookupNamespaceURI(const String& prefix) > callType = m_customResolver->methodTable(vm)->getCallData(m_customResolver.get(), callData); > if (callType == CallType::None) { > if (PageConsoleClient* console = m_globalObject->wrapped().console()) >- console->addMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("XPathNSResolver does not have a lookupNamespaceURI method.")); >+ console->addMessage(MessageSource::JS, MessageLevel::Error, "XPathNSResolver does not have a lookupNamespaceURI method."_s); > return String(); > } > function = m_customResolver.get(); >diff --git a/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp b/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp >index 9c805c4d51b6a6352a58a3e0a284ced956be9b62..3cc2f4b0d2f939fc28d4168aa83812295acf2b9a 100644 >--- a/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp >+++ b/Source/WebCore/bindings/js/JSDOMConstructorBase.cpp >@@ -33,7 +33,7 @@ static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec) > { > VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- throwTypeError(exec, scope, ASCIILiteral("Constructor requires 'new' operator")); >+ throwTypeError(exec, scope, "Constructor requires 'new' operator"_s); > return JSValue::encode(jsNull()); > } > >diff --git a/Source/WebCore/bindings/js/JSDOMConstructorBase.h b/Source/WebCore/bindings/js/JSDOMConstructorBase.h >index d75e885c9d5380a27ae1b5ca93673fbe2194e317..fee564835535d7eafca0cae875100f5f6b749815 100644 >--- a/Source/WebCore/bindings/js/JSDOMConstructorBase.h >+++ b/Source/WebCore/bindings/js/JSDOMConstructorBase.h >@@ -48,7 +48,7 @@ inline JSC::Structure* JSDOMConstructorBase::createStructure(JSC::VM& vm, JSC::J > > inline String JSDOMConstructorBase::className(const JSObject*) > { >- return ASCIILiteral("Function"); >+ return "Function"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h b/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h >index 90690807e64462a25c4d039de19e2b2cdc73e345..f0b103f0c59a5a1d84b1bfa71774bc5aa9937bd0 100644 >--- a/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h >+++ b/Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h >@@ -50,7 +50,7 @@ template<typename JSClass> class JSDOMConstructorNotConstructable : public JSDOM > { > JSC::VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- JSC::throwTypeError(exec, scope, ASCIILiteral("Illegal constructor")); >+ JSC::throwTypeError(exec, scope, "Illegal constructor"_s); > return JSC::JSValue::encode(JSC::jsNull()); > } > >diff --git a/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp b/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp >index 895a30042cd9acd877834bcdd8b97c9910407402..1311c9da05a9c01cd6953fff2fc4799dfe049693 100644 >--- a/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp >+++ b/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp >@@ -134,7 +134,7 @@ JSValue createDOMException(ExecState* exec, ExceptionCode ec, const String& mess > > if (ec == RangeError) { > if (message.isEmpty()) >- return createRangeError(exec, ASCIILiteral("Bad value")); >+ return createRangeError(exec, "Bad value"_s); > return createRangeError(exec, message); > } > >@@ -255,12 +255,12 @@ JSC::EncodedJSValue throwConstructorScriptExecutionContextUnavailableError(JSC:: > > void throwSequenceTypeError(JSC::ExecState& state, JSC::ThrowScope& scope) > { >- throwTypeError(state, scope, ASCIILiteral("Value is not a sequence")); >+ throwTypeError(state, scope, "Value is not a sequence"_s); > } > > void throwNonFiniteTypeError(ExecState& state, JSC::ThrowScope& scope) > { >- throwTypeError(&state, scope, ASCIILiteral("The provided value is non-finite")); >+ throwTypeError(&state, scope, "The provided value is non-finite"_s); > } > > String makeGetterTypeErrorMessage(const char* interfaceName, const char* attributeName) >diff --git a/Source/WebCore/bindings/js/JSDOMIterator.h b/Source/WebCore/bindings/js/JSDOMIterator.h >index 8f9ca26c49d15bd52030a932106ac33bc116e4b9..32c4005a147cb7d717f80ef5880b9e2433ffbe3e 100644 >--- a/Source/WebCore/bindings/js/JSDOMIterator.h >+++ b/Source/WebCore/bindings/js/JSDOMIterator.h >@@ -208,7 +208,7 @@ template<typename JSIterator> JSC::JSValue iteratorForEach(JSC::ExecState& state > JSC::CallData callData; > JSC::CallType callType = JSC::getCallData(state.vm(), callback, callData); > if (callType == JSC::CallType::None) >- return throwTypeError(&state, scope, ASCIILiteral("Cannot call callback")); >+ return throwTypeError(&state, scope, "Cannot call callback"_s); > > auto iterator = thisObject.wrapped().createIterator(); > while (auto value = iterator.next()) { >@@ -253,7 +253,7 @@ JSC::EncodedJSValue JSC_HOST_CALL JSDOMIteratorPrototype<JSWrapper, IteratorTrai > > auto iterator = JSC::jsDynamicCast<JSDOMIterator<JSWrapper, IteratorTraits>*>(vm, state->thisValue()); > if (!iterator) >- return JSC::JSValue::encode(throwTypeError(state, scope, ASCIILiteral("Cannot call next() on a non-Iterator object"))); >+ return JSC::JSValue::encode(throwTypeError(state, scope, "Cannot call next() on a non-Iterator object"_s)); > > return JSC::JSValue::encode(iterator->next(*state)); > } >diff --git a/Source/WebCore/bindings/js/JSDOMWindowBase.cpp b/Source/WebCore/bindings/js/JSDOMWindowBase.cpp >index 9cb686c0a057058cec5e6502c0b7e12f8c0116da..f4d8cf325fbdf9ada3eb4e318f8bdca25e30d3ae 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowBase.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowBase.cpp >@@ -395,18 +395,18 @@ static bool isResponseCorrect(JSC::ExecState* exec, FetchResponse* inputResponse > bool isResponseCorsSameOrigin = inputResponse->type() == ResourceResponse::Type::Basic || inputResponse->type() == ResourceResponse::Type::Cors || inputResponse->type() == ResourceResponse::Type::Default; > > if (!isResponseCorsSameOrigin) { >- promise->reject(exec, createTypeError(exec, ASCIILiteral("Response is not CORS-same-origin"))); >+ promise->reject(exec, createTypeError(exec, "Response is not CORS-same-origin"_s)); > return false; > } > > if (!inputResponse->ok()) { >- promise->reject(exec, createTypeError(exec, ASCIILiteral("Response has not returned OK status"))); >+ promise->reject(exec, createTypeError(exec, "Response has not returned OK status"_s)); > return false; > } > > auto contentType = inputResponse->headers().fastGet(HTTPHeaderName::ContentType); > if (!equalLettersIgnoringASCIICase(contentType, "application/wasm")) { >- promise->reject(exec, createTypeError(exec, ASCIILiteral("Unexpected response MIME type. Expected 'application/wasm'"))); >+ promise->reject(exec, createTypeError(exec, "Unexpected response MIME type. Expected 'application/wasm'"_s)); > return false; > } > >@@ -448,14 +448,14 @@ static void handleResponseOnStreamingAction(JSC::JSGlobalObject* globalObject, J > return; > } > // FIXME: http://webkit.org/b/184886> Implement loading for the Blob type >- promise->reject(exec, createTypeError(exec, ASCIILiteral("Unexpected Response's Content-type"))); >+ promise->reject(exec, createTypeError(exec, "Unexpected Response's Content-type"_s)); > }, [&] (Ref<SharedBuffer>& buffer) { > VM& vm = exec->vm(); > JSLockHolder lock(vm); > > actionCallback(exec, buffer->data(), buffer->size()); > }, [&] (std::nullptr_t&) { >- promise->reject(exec, createTypeError(exec, ASCIILiteral("Unexpected Response's Content-type"))); >+ promise->reject(exec, createTypeError(exec, "Unexpected Response's Content-type"_s)); > }); > } > >@@ -474,7 +474,7 @@ void JSDOMWindowBase::compileStreaming(JSC::JSGlobalObject* globalObject, JSC::E > JSC::WebAssemblyPrototype::webAssemblyModuleValidateAsync(exec, promise, WTFMove(*arrayBuffer)); > }); > } else >- promise->reject(exec, createTypeError(exec, ASCIILiteral("first argument must be an Response or Promise for Response"))); >+ promise->reject(exec, createTypeError(exec, "first argument must be an Response or Promise for Response"_s)); > } > > void JSDOMWindowBase::instantiateStreaming(JSC::JSGlobalObject* globalObject, JSC::ExecState* exec, JSC::JSPromiseDeferred* promise, JSC::JSValue source, JSC::JSObject* importedObject) >@@ -493,7 +493,7 @@ void JSDOMWindowBase::instantiateStreaming(JSC::JSGlobalObject* globalObject, JS > JSC::WebAssemblyPrototype::webAssemblyModuleInstantinateAsync(exec, promise, WTFMove(*arrayBuffer), importedObject); > }); > } else >- promise->reject(exec, createTypeError(exec, ASCIILiteral("first argument must be an Response or Promise for Response"))); >+ promise->reject(exec, createTypeError(exec, "first argument must be an Response or Promise for Response"_s)); > } > #endif > >diff --git a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >index d999393ece8376d45a87151b9f9ebfd66673498d..1405015cf13fdfe653b0fd46711b87f3f509c5b2 100644 >--- a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >+++ b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >@@ -437,7 +437,7 @@ bool JSDOMWindow::preventExtensions(JSObject*, ExecState* exec) > { > auto scope = DECLARE_THROW_SCOPE(exec->vm()); > >- throwTypeError(exec, scope, ASCIILiteral("Cannot prevent extensions on this object")); >+ throwTypeError(exec, scope, "Cannot prevent extensions on this object"_s); > return false; > } > >@@ -445,8 +445,8 @@ String JSDOMWindow::toStringName(const JSObject* object, ExecState* exec) > { > auto* thisObject = jsCast<const JSDOMWindow*>(object); > if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, thisObject->wrapped(), DoNotReportSecurityError)) >- return ASCIILiteral("Object"); >- return ASCIILiteral("Window"); >+ return "Object"_s; >+ return "Window"_s; > } > > // Custom Attributes >diff --git a/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp b/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp >index 0a777bf985ec672f8d4f8765e7cf9b257f617b63..122833d300e2408034d48ecf2c1dbdf2cbde3dff 100644 >--- a/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp >+++ b/Source/WebCore/bindings/js/JSHTMLElementCustom.cpp >@@ -58,22 +58,22 @@ EncodedJSValue JSC_HOST_CALL constructJSHTMLElement(ExecState& exec) > auto* globalObject = jsConstructor->globalObject(); > JSValue htmlElementConstructorValue = JSHTMLElement::getConstructor(vm, globalObject); > if (newTargetValue == htmlElementConstructorValue) >- return throwVMTypeError(&exec, scope, ASCIILiteral("new.target is not a valid custom element constructor")); >+ return throwVMTypeError(&exec, scope, "new.target is not a valid custom element constructor"_s); > > auto& document = downcast<Document>(*context); > > auto* window = document.domWindow(); > if (!window) >- return throwVMTypeError(&exec, scope, ASCIILiteral("new.target is not a valid custom element constructor")); >+ return throwVMTypeError(&exec, scope, "new.target is not a valid custom element constructor"_s); > > auto* registry = window->customElementRegistry(); > if (!registry) >- return throwVMTypeError(&exec, scope, ASCIILiteral("new.target is not a valid custom element constructor")); >+ return throwVMTypeError(&exec, scope, "new.target is not a valid custom element constructor"_s); > > JSObject* newTarget = newTargetValue.getObject(); > auto* elementInterface = registry->findInterface(newTarget); > if (!elementInterface) >- return throwVMTypeError(&exec, scope, ASCIILiteral("new.target does not define a custom element")); >+ return throwVMTypeError(&exec, scope, "new.target does not define a custom element"_s); > > if (!elementInterface->isUpgradingElement()) { > Structure* baseStructure = getDOMStructure<JSHTMLElement>(vm, *globalObject); >@@ -89,7 +89,7 @@ EncodedJSValue JSC_HOST_CALL constructJSHTMLElement(ExecState& exec) > > Element* elementToUpgrade = elementInterface->lastElementInConstructionStack(); > if (!elementToUpgrade) { >- throwInvalidStateError(exec, scope, ASCIILiteral("Cannot instantiate a custom element inside its own constructor during upgrades")); >+ throwInvalidStateError(exec, scope, "Cannot instantiate a custom element inside its own constructor during upgrades"_s); > return JSValue::encode(jsUndefined()); > } > >diff --git a/Source/WebCore/bindings/js/JSLocationCustom.cpp b/Source/WebCore/bindings/js/JSLocationCustom.cpp >index 1514aa63f27baff0e5191e0f63713ff3f9e0963f..1a1d03488b8491f94b79ca08f69e79df7d51158b 100644 >--- a/Source/WebCore/bindings/js/JSLocationCustom.cpp >+++ b/Source/WebCore/bindings/js/JSLocationCustom.cpp >@@ -219,7 +219,7 @@ bool JSLocation::preventExtensions(JSObject*, ExecState* exec) > { > auto scope = DECLARE_THROW_SCOPE(exec->vm()); > >- throwTypeError(exec, scope, ASCIILiteral("Cannot prevent extensions on this object")); >+ throwTypeError(exec, scope, "Cannot prevent extensions on this object"_s); > return false; > } > >@@ -227,8 +227,8 @@ String JSLocation::toStringName(const JSObject* object, ExecState* exec) > { > auto* thisObject = jsCast<const JSLocation*>(object); > if (!BindingSecurity::shouldAllowAccessToFrame(exec, thisObject->wrapped().frame(), DoNotReportSecurityError)) >- return ASCIILiteral("Object"); >- return ASCIILiteral("Location"); >+ return "Object"_s; >+ return "Location"_s; > } > > bool JSLocationPrototype::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot) >diff --git a/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp b/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp >index ca97e9611d0322b652dcce4f6ef98e48a2d7336d..f50cd273b60ed0c2cd7174c3c3416530a910a214 100644 >--- a/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp >+++ b/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp >@@ -50,7 +50,7 @@ EncodedJSValue JSC_HOST_CALL constructJSReadableStreamDefaultController(ExecStat > { > VM& vm = exec.vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- return throwVMTypeError(&exec, scope, ASCIILiteral("ReadableStreamDefaultController constructor should not be called directly")); >+ return throwVMTypeError(&exec, scope, "ReadableStreamDefaultController constructor should not be called directly"_s); > } > > // Public JS ReadableStreamDefaultReader and ReadableStreamBYOBReader callbacks. >@@ -92,14 +92,14 @@ EncodedJSValue JSC_HOST_CALL constructJSReadableByteStreamController(ExecState& > { > VM& vm = exec.vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- return throwVMTypeError(&exec, scope, ASCIILiteral("ReadableByteStreamController constructor should not be called directly")); >+ return throwVMTypeError(&exec, scope, "ReadableByteStreamController constructor should not be called directly"_s); > } > > EncodedJSValue JSC_HOST_CALL constructJSReadableStreamBYOBRequest(ExecState& exec) > { > VM& vm = exec.vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >- return throwVMTypeError(&exec, scope, ASCIILiteral("ReadableStreamBYOBRequest constructor should not be called directly")); >+ return throwVMTypeError(&exec, scope, "ReadableStreamBYOBRequest constructor should not be called directly"_s); > } > > // Private JS ReadableStreamDefaultReader and ReadableStreamDefaultController constructors. >diff --git a/Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp b/Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp >index 8cd42526b9a6469b24dc9c3cd2a3ef4249964e33..010981a427da3f83e8973fe89c611e388bd39bf1 100644 >--- a/Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp >+++ b/Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp >@@ -124,13 +124,13 @@ JSValue JSRemoteDOMWindow::getPrototype(JSObject*, ExecState*) > bool JSRemoteDOMWindow::preventExtensions(JSObject*, ExecState* exec) > { > auto scope = DECLARE_THROW_SCOPE(exec->vm()); >- throwTypeError(exec, scope, ASCIILiteral("Cannot prevent extensions on this object")); >+ throwTypeError(exec, scope, "Cannot prevent extensions on this object"_s); > return false; > } > > String JSRemoteDOMWindow::toStringName(const JSObject*, ExecState*) > { >- return ASCIILiteral("Object"); >+ return "Object"_s; > } > > } // namepace WebCore >diff --git a/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp b/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp >index aa12d3ebca515fe8bcfb58777898f9852789a251..1dbebde71c9dedbdf526ad994c023ee2de76c54b 100644 >--- a/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp >+++ b/Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp >@@ -59,7 +59,7 @@ JSC::JSValue ReadableStreamDefaultController::invoke(JSC::ExecState& state, JSC: > > if (!function.isFunction(vm)) { > if (!function.isUndefined()) >- throwTypeError(&state, scope, ASCIILiteral("ReadableStream trying to call a property that is not callable")); >+ throwTypeError(&state, scope, "ReadableStream trying to call a property that is not callable"_s); > return JSC::jsUndefined(); > } > >diff --git a/Source/WebCore/bindings/js/ScriptModuleLoader.cpp b/Source/WebCore/bindings/js/ScriptModuleLoader.cpp >index a6e3bc201f611e4312e17f13108a089d1921f491..1d93254ec060be2d4ee87f5e334869477ee96264 100644 >--- a/Source/WebCore/bindings/js/ScriptModuleLoader.cpp >+++ b/Source/WebCore/bindings/js/ScriptModuleLoader.cpp >@@ -77,11 +77,11 @@ static Expected<URL, ASCIILiteral> resolveModuleSpecifier(Document& document, co > return absoluteURL; > > if (!specifier.startsWith('/') && !specifier.startsWith("./") && !specifier.startsWith("../")) >- return makeUnexpected(ASCIILiteral("Module specifier does not start with \"/\", \"./\", or \"../\".")); >+ return makeUnexpected("Module specifier does not start with \"/\", \"./\", or \"../\"."_s); > > auto result = document.completeURL(specifier, baseURL); > if (!result.isValid()) >- return makeUnexpected(ASCIILiteral("Module name does not resolve to a valid URL.")); >+ return makeUnexpected("Module name does not resolve to a valid URL."_s); > return result; > } > >@@ -97,7 +97,7 @@ JSC::Identifier ScriptModuleLoader::resolve(JSC::JSGlobalObject*, JSC::ExecState > return JSC::Identifier::fromUid(asSymbol(moduleNameValue)->privateName()); > > if (!moduleNameValue.isString()) { >- JSC::throwTypeError(exec, scope, ASCIILiteral("Importer module key is not a Symbol or a String.")); >+ JSC::throwTypeError(exec, scope, "Importer module key is not a Symbol or a String."_s); > return { }; > } > >@@ -149,12 +149,12 @@ JSC::JSInternalPromise* ScriptModuleLoader::fetch(JSC::JSGlobalObject* jsGlobalO > auto& jsPromise = *JSC::JSInternalPromiseDeferred::create(exec, &globalObject); > auto deferred = DeferredPromise::create(globalObject, jsPromise); > if (moduleKeyValue.isSymbol()) { >- deferred->reject(TypeError, ASCIILiteral("Symbol module key should be already fulfilled with the inlined resource.")); >+ deferred->reject(TypeError, "Symbol module key should be already fulfilled with the inlined resource."_s); > return jsPromise.promise(); > } > > if (!moduleKeyValue.isString()) { >- deferred->reject(TypeError, ASCIILiteral("Module key is not Symbol or String.")); >+ deferred->reject(TypeError, "Module key is not Symbol or String."_s); > return jsPromise.promise(); > } > >@@ -162,7 +162,7 @@ JSC::JSInternalPromise* ScriptModuleLoader::fetch(JSC::JSGlobalObject* jsGlobalO > > URL completedURL(URL(), asString(moduleKeyValue)->value(exec)); > if (!completedURL.isValid()) { >- deferred->reject(TypeError, ASCIILiteral("Module key is a valid URL.")); >+ deferred->reject(TypeError, "Module key is a valid URL."_s); > return jsPromise.promise(); > } > >@@ -175,7 +175,7 @@ JSC::JSInternalPromise* ScriptModuleLoader::fetch(JSC::JSGlobalObject* jsGlobalO > if (!loader->load(m_document, completedURL)) { > loader->clearClient(); > m_loaders.remove(WTFMove(loader)); >- rejectToPropagateNetworkError(deferred.get(), ModuleFetchFailureKind::WasErrored, ASCIILiteral("Importing a module script failed.")); >+ rejectToPropagateNetworkError(deferred.get(), ModuleFetchFailureKind::WasErrored, "Importing a module script failed."_s); > return jsPromise.promise(); > } > >@@ -205,7 +205,7 @@ JSC::JSValue ScriptModuleLoader::evaluate(JSC::JSGlobalObject*, JSC::ExecState* > > URL sourceURL = moduleURL(*exec, moduleKeyValue); > if (!sourceURL.isValid()) >- return JSC::throwTypeError(exec, scope, ASCIILiteral("Module key is an invalid URL.")); >+ return JSC::throwTypeError(exec, scope, "Module key is an invalid URL."_s); > > if (auto* frame = m_document.frame()) > return frame->script().evaluateModule(sourceURL, *moduleRecord); >@@ -241,7 +241,7 @@ JSC::JSInternalPromise* ScriptModuleLoader::importModule(JSC::JSGlobalObject* js > } else { > baseURL = URL(URL(), sourceOrigin.string()); > if (!baseURL.isValid()) >- return rejectPromise(state, globalObject, TypeError, ASCIILiteral("Importer module key is not a Symbol or a String.")); >+ return rejectPromise(state, globalObject, TypeError, "Importer module key is not a Symbol or a String."_s); > > if (sourceOrigin.fetcher()) > scriptFetcher = sourceOrigin.fetcher(); >@@ -287,17 +287,17 @@ void ScriptModuleLoader::notifyFinished(CachedModuleScriptLoader& loader, RefPtr > auto& cachedScript = *loader.cachedScript(); > > if (cachedScript.resourceError().isAccessControl()) { >- promise->reject(TypeError, ASCIILiteral("Cross-origin script load denied by Cross-Origin Resource Sharing policy.")); >+ promise->reject(TypeError, "Cross-origin script load denied by Cross-Origin Resource Sharing policy."_s); > return; > } > > if (cachedScript.errorOccurred()) { >- rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasErrored, ASCIILiteral("Importing a module script failed.")); >+ rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasErrored, "Importing a module script failed."_s); > return; > } > > if (cachedScript.wasCanceled()) { >- rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasCanceled, ASCIILiteral("Importing a module script is canceled.")); >+ rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasCanceled, "Importing a module script is canceled."_s); > return; > } > >diff --git a/Source/WebCore/bindings/js/SerializedScriptValue.cpp b/Source/WebCore/bindings/js/SerializedScriptValue.cpp >index 7388e0cfa5c1e84e77909dab8aa864972c8cd757..fea9c381b11d4ad4a8c2459e73badd7dfe15a8aa 100644 >--- a/Source/WebCore/bindings/js/SerializedScriptValue.cpp >+++ b/Source/WebCore/bindings/js/SerializedScriptValue.cpp >@@ -3238,7 +3238,7 @@ static void maybeThrowExceptionIfSerializationFailed(ExecState& state, Serializa > throwException(&state, scope, createStackOverflowError(&state)); > break; > case SerializationReturnCode::ValidationError: >- throwTypeError(&state, scope, ASCIILiteral("Unable to deserialize data.")); >+ throwTypeError(&state, scope, "Unable to deserialize data."_s); > break; > case SerializationReturnCode::DataCloneError: > throwDataCloneError(state, scope); >diff --git a/Source/WebCore/bindings/js/WorkerScriptController.cpp b/Source/WebCore/bindings/js/WorkerScriptController.cpp >index 83ae56764a4bb1cc728a12d0009ca86c3ebf7858..9bc583aafed9705a511bc18f4b055f520e58addc 100644 >--- a/Source/WebCore/bindings/js/WorkerScriptController.cpp >+++ b/Source/WebCore/bindings/js/WorkerScriptController.cpp >@@ -158,7 +158,7 @@ void WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, NakedP > *returnedExceptionMessage = returnedException->value().toWTFString(&state); > } else { > // Overwrite the detailed error with a generic error. >- String genericErrorMessage { ASCIILiteral { "Script error." } }; >+ String genericErrorMessage { "Script error."_s }; > if (returnedExceptionMessage) > *returnedExceptionMessage = genericErrorMessage; > returnedException = JSC::Exception::create(vm, createError(&state, genericErrorMessage)); >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index 0e0701dcf7123aa5ea255e0801006ca33c9366ef..b5ed507b1406420871f99603f2a982543704a6c4 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -2181,7 +2181,7 @@ sub GenerateDefaultValue > } elsif ($defaultValue eq "\"\"") { > return $useAtomicString ? "emptyAtom()" : "emptyString()"; > } else { >- return $useAtomicString ? "AtomicString(${defaultValue}, AtomicString::ConstructFromLiteral)" : "ASCIILiteral(${defaultValue})"; >+ return $useAtomicString ? "AtomicString(${defaultValue}, AtomicString::ConstructFromLiteral)" : "${defaultValue}_s"; > } > } > >@@ -7191,7 +7191,7 @@ sub GenerateConstructorHelperMethods > push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n"); > } > >- push(@$outputArray, " putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral(\"$visibleInterfaceName\"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n"); >+ push(@$outputArray, " putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(\"$visibleInterfaceName\"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n"); > push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);\n") if defined $leastConstructorLength; > > my $classForThis = "${className}::info()"; >@@ -7400,7 +7400,7 @@ () > push(@$outputArray, join("\n", @$arguments)); > } > push(@$outputArray, "\n"); >- push(@$outputArray, $indent . " CallTracer::" . $callTracingCallback . "(impl, ASCIILiteral(\"" . $name . "\")"); >+ push(@$outputArray, $indent . " CallTracer::" . $callTracingCallback . "(impl, \"" . $name . "\"_s"); > if ($count) { > push(@$outputArray, ", WTFMove(callTracerParameters)"); > } >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp b/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >index 4bf546f98b04d4159e5d35c8c54f1cd00353739b..9eb8d2665f088c911fd2fd4fd42e50d3927605fb 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp >@@ -75,7 +75,7 @@ template<> JSValue JSInterfaceNameConstructor::prototypeForStructure(JSC::VM& vm > template<> void JSInterfaceNameConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSInterfaceName::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("InterfaceName"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("InterfaceName"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp b/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >index 697889c411fcb3b9f4c1379381da1d6fabbe5339..761bbf46d9a6e4160b567214fa956295857b649e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp >@@ -94,7 +94,7 @@ template<> JSValue JSMapLikeConstructor::prototypeForStructure(JSC::VM& vm, cons > template<> void JSMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSMapLike::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("MapLike"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("MapLike"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp b/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >index f343ee49beaa922045afb550634ef5c60bff1c71..c52d101f4b0100e773fe67b52d9611ac83e06579 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp >@@ -91,7 +91,7 @@ template<> JSValue JSReadOnlyMapLikeConstructor::prototypeForStructure(JSC::VM& > template<> void JSReadOnlyMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSReadOnlyMapLike::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("ReadOnlyMapLike"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("ReadOnlyMapLike"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >index 5099f832b7f492481d2fb025c8c0f93f5377e76b..7d4907d15fd2ddb6c7bc3887b0df5cfd4d84bf8b 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp >@@ -102,7 +102,7 @@ template<> JSValue JSTestActiveDOMObjectConstructor::prototypeForStructure(JSC:: > template<> void JSTestActiveDOMObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestActiveDOMObject"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >index d5befde9e40f76af895d2f2ee31cf236771934ed..39281f1cc8b926baa74287ed94b95b31fc6b0d1e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp >@@ -93,7 +93,7 @@ template<> JSValue JSTestCEReactionsConstructor::prototypeForStructure(JSC::VM& > template<> void JSTestCEReactionsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactions"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCEReactions"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >index 5bc50fb015ab0b98274ae4b9919fe445fa338290..d7f167967bd6dbae6605167703c8b5ef10097e31 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp >@@ -85,7 +85,7 @@ template<> JSValue JSTestCEReactionsStringifierConstructor::prototypeForStructur > template<> void JSTestCEReactionsStringifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactionsStringifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCEReactionsStringifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >index a8156d0e7cd5f999a28d1e8ff656052d3f819edd..330a2cec7e031ecabf35e692f4337f2b1551a85a 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp >@@ -114,7 +114,7 @@ template<> JSValue JSTestCallTracerConstructor::prototypeForStructure(JSC::VM& v > template<> void JSTestCallTracerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestCallTracer::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCallTracer"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCallTracer"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > reifyStaticProperties(vm, JSTestCallTracer::info(), JSTestCallTracerConstructorTableValues, *this); > } >@@ -223,7 +223,7 @@ static inline JSValue jsTestCallTracerTestAttributeInterfaceGetter(ExecState& st > UNUSED_PARAM(state); > auto& impl = thisObject.wrapped(); > if (UNLIKELY(impl.callTracingActive())) >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testAttributeInterface")); >+ CallTracer::testCallTracerInterface(impl, "testAttributeInterface"_s); > JSValue result = toJS<IDLBoolean>(state, throwScope, impl.testAttributeInterface()); > return result; > } >@@ -242,7 +242,7 @@ static inline bool setJSTestCallTracerTestAttributeInterfaceSetter(ExecState& st > if (UNLIKELY(impl.callTracingActive())) { > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > callTracerParameters.append(nativeValue); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testAttributeInterface"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testAttributeInterface"_s, WTFMove(callTracerParameters)); > } > AttributeSetter::call(state, throwScope, [&] { > return impl.setTestAttributeInterface(WTFMove(nativeValue)); >@@ -261,7 +261,7 @@ static inline JSValue jsTestCallTracerTestAttributeSpecifiedGetter(ExecState& st > UNUSED_PARAM(state); > auto& impl = thisObject.wrapped(); > if (UNLIKELY(impl.callTracingActive())) >- CallTracer::testCallTracerAttribute(impl, ASCIILiteral("testAttributeSpecified")); >+ CallTracer::testCallTracerAttribute(impl, "testAttributeSpecified"_s); > JSValue result = toJS<IDLBoolean>(state, throwScope, impl.testAttributeSpecified()); > return result; > } >@@ -280,7 +280,7 @@ static inline bool setJSTestCallTracerTestAttributeSpecifiedSetter(ExecState& st > if (UNLIKELY(impl.callTracingActive())) { > Vector<TestCallTracerAttributeVariant> callTracerParameters; > callTracerParameters.append(nativeValue); >- CallTracer::testCallTracerAttribute(impl, ASCIILiteral("testAttributeSpecified"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerAttribute(impl, "testAttributeSpecified"_s, WTFMove(callTracerParameters)); > } > AttributeSetter::call(state, throwScope, [&] { > return impl.setTestAttributeSpecified(WTFMove(nativeValue)); >@@ -299,7 +299,7 @@ static inline JSValue jsTestCallTracerTestAttributeWithVariantGetter(ExecState& > UNUSED_PARAM(state); > auto& impl = thisObject.wrapped(); > if (UNLIKELY(impl.callTracingActive())) >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testAttributeWithVariant")); >+ CallTracer::testCallTracerInterface(impl, "testAttributeWithVariant"_s); > JSValue result = toJS<IDLUnion<IDLBoolean, IDLFloat, IDLDOMString>>(state, *thisObject.globalObject(), throwScope, impl.testAttributeWithVariant()); > return result; > } >@@ -318,7 +318,7 @@ static inline bool setJSTestCallTracerTestAttributeWithVariantSetter(ExecState& > if (UNLIKELY(impl.callTracingActive())) { > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > WTF::visit([&] (auto& value) { callTracerParameters.append(value); }, nativeValue); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testAttributeWithVariant"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testAttributeWithVariant"_s, WTFMove(callTracerParameters)); > } > AttributeSetter::call(state, throwScope, [&] { > return impl.setTestAttributeWithVariant(WTFMove(nativeValue)); >@@ -351,7 +351,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > UNUSED_PARAM(throwScope); > auto& impl = castedThis->wrapped(); > if (UNLIKELY(impl.callTracingActive())) >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationInterface")); >+ CallTracer::testCallTracerInterface(impl, "testOperationInterface"_s); > impl.testOperationInterface(); > return JSValue::encode(jsUndefined()); > } >@@ -367,7 +367,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > UNUSED_PARAM(throwScope); > auto& impl = castedThis->wrapped(); > if (UNLIKELY(impl.callTracingActive())) >- CallTracer::testCallTracerOperation(impl, ASCIILiteral("testOperationSpecified")); >+ CallTracer::testCallTracerOperation(impl, "testOperationSpecified"_s); > impl.testOperationSpecified(); > return JSValue::encode(jsUndefined()); > } >@@ -395,7 +395,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > callTracerParameters.append(a); > callTracerParameters.append(b); > callTracerParameters.append(c); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithArguments"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithArguments"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithArguments(WTFMove(a), WTFMove(b), WTFMove(c)); > return JSValue::encode(jsUndefined()); >@@ -419,7 +419,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > if (nodeNullableArg) > callTracerParameters.append(nodeNullableArg); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithNullableArgument"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithNullableArgument"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithNullableArgument(WTFMove(nodeNullableArg)); > return JSValue::encode(jsUndefined()); >@@ -442,7 +442,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > if (UNLIKELY(impl.callTracingActive())) { > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > WTF::visit([&] (auto& value) { callTracerParameters.append(value); }, variantArg); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithVariantArgument"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithVariantArgument"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithVariantArgument(WTFMove(variantArg)); > return JSValue::encode(jsUndefined()); >@@ -466,7 +466,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > if (variantNullableArg) > WTF::visit([&] (auto& value) { callTracerParameters.append(value); }, *variantNullableArg); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithNullableVariantArgument"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithNullableVariantArgument"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithNullableVariantArgument(WTFMove(variantNullableArg)); > return JSValue::encode(jsUndefined()); >@@ -488,7 +488,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > if (variantOptionalArg) > WTF::visit([&] (auto& value) { callTracerParameters.append(value); }, *variantOptionalArg); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithOptionalVariantArgument"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithOptionalVariantArgument"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithOptionalVariantArgument(WTFMove(variantOptionalArg)); > return JSValue::encode(jsUndefined()); >@@ -509,7 +509,7 @@ static inline JSC::EncodedJSValue jsTestCallTracerPrototypeFunctionTestOperation > if (UNLIKELY(impl.callTracingActive())) { > Vector<TestCallTracerInterfaceVariant> callTracerParameters; > WTF::visit([&] (auto& value) { callTracerParameters.append(value); }, variantDefaultArg); >- CallTracer::testCallTracerInterface(impl, ASCIILiteral("testOperationWithDefaultVariantArgument"), WTFMove(callTracerParameters)); >+ CallTracer::testCallTracerInterface(impl, "testOperationWithDefaultVariantArgument"_s, WTFMove(callTracerParameters)); > } > impl.testOperationWithDefaultVariantArgument(WTFMove(variantDefaultArg)); > return JSValue::encode(jsUndefined()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp >index 4620bd7bacb33debed24b0d81a7fb6571e2902df..2fc738220b8d75c2a7083534ab312b52f559d649 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp >@@ -160,7 +160,7 @@ template<> JSValue JSTestCallbackInterfaceConstructor::prototypeForStructure(JSC > template<> void JSTestCallbackInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > UNUSED_PARAM(globalObject); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCallbackInterface"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCallbackInterface"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > reifyStaticProperties(vm, nullptr, JSTestCallbackInterfaceConstructorTableValues, *this); > } >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >index 15e2e4005e5e5d9443b3e69ab0608fbf64236368..b8b3101c99b173dcd35746724754a160f43a6e4f 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp >@@ -76,7 +76,7 @@ template<> JSValue JSTestClassWithJSBuiltinConstructorConstructor::prototypeForS > template<> void JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestClassWithJSBuiltinConstructor::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestClassWithJSBuiltinConstructor"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestClassWithJSBuiltinConstructor"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp >index 31a0c19d2032c94ad88b3a257441a5dc9a2bdc3f..84f8df209e115ce83d88453239f3217866f8b958 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp >@@ -81,7 +81,7 @@ template<> JSValue JSTestCustomConstructorWithNoInterfaceObjectConstructor::prot > template<> void JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestCustomConstructorWithNoInterfaceObject"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >index ae2ac1a2a79ccadb3e8ec80e84ef31514a126d75..93872a6a01d7deebf8db37549cbbd0f088349e9c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp >@@ -497,7 +497,7 @@ template<> JSValue JSTestDOMJITConstructor::prototypeForStructure(JSC::VM& vm, c > template<> void JSTestDOMJITConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestDOMJIT::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestDOMJIT"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestDOMJIT"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >index e963c6cb67a1a4797187eafba4e70f1afc3c35db..d999032ef2e7a2c31148c187a9c95a7de9a8b826 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp >@@ -97,7 +97,7 @@ template<> JSValue JSTestEnabledBySettingConstructor::prototypeForStructure(JSC: > template<> void JSTestEnabledBySettingConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestEnabledBySetting::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEnabledBySetting"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestEnabledBySetting"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >index 375228cb5485148be61c2a2150f5fd27323d27ae..8f1f9b4fc9454248d791ff9d07fa3595a052d7cd 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp >@@ -173,7 +173,7 @@ template<> JSValue JSTestEventConstructorConstructor::prototypeForStructure(JSC: > template<> void JSTestEventConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestEventConstructor"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(1), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >index 8b62306a759596fcd832e32c8daeb450498e0a16..17f3d03f0bd4a770f1e9e86299a051efc08d41ec 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >@@ -84,7 +84,7 @@ template<> JSValue JSTestEventTargetConstructor::prototypeForStructure(JSC::VM& > template<> void JSTestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestEventTarget"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >index efe3174c4549b8d728e1b8a9fc80805d8677a8f8..348190e93b1fd58cac0dbb5e50a6061ab6351c16 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp >@@ -78,7 +78,7 @@ template<> JSValue JSTestExceptionConstructor::prototypeForStructure(JSC::VM& vm > template<> void JSTestExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestException::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestException"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >index f64c585af1933cd3e4dc5b64ecafda007c7cd461..708ef66d69120b9978dcc998454d0c432dcc2525 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >@@ -79,7 +79,7 @@ template<> JSValue JSTestGenerateIsReachableConstructor::prototypeForStructure(J > template<> void JSTestGenerateIsReachableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestGenerateIsReachable"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >index 04ae749b4b358ac1307b4a889958b0437439027b..561d51471bdef373f2ef1a6f83f618320607b476 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp >@@ -129,7 +129,7 @@ template<> JSValue JSTestGlobalObjectConstructor::prototypeForStructure(JSC::VM& > template<> void JSTestGlobalObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGlobalObject"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestGlobalObject"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >index 47f0878ebd9168a5e7d24a0e5e7360fe7ac67b40..efd18c9b6098cbd825f4208dd2064efe07cadef5 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >@@ -78,7 +78,7 @@ template<> JSValue JSTestIndexedSetterNoIdentifierConstructor::prototypeForStruc > template<> void JSTestIndexedSetterNoIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestIndexedSetterNoIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIndexedSetterNoIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestIndexedSetterNoIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >index 40beeff60cb2dfcd46de93523a32b156cef14b2f..0119e6bea7a937d5a2615a92f95c71ee848e7f82 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >@@ -78,7 +78,7 @@ template<> JSValue JSTestIndexedSetterThrowingExceptionConstructor::prototypeFor > template<> void JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestIndexedSetterThrowingException::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIndexedSetterThrowingException"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestIndexedSetterThrowingException"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >index 755bccc7334b029a69c8d5521ba9260109260675..8c2974e8edb448eac6f97892b8e75f47ba4434fe 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >@@ -84,7 +84,7 @@ template<> JSValue JSTestIndexedSetterWithIdentifierConstructor::prototypeForStr > template<> void JSTestIndexedSetterWithIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestIndexedSetterWithIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIndexedSetterWithIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestIndexedSetterWithIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >index daf072587c0266f57222f13631c48cc0c79c773f..b7dee1a8eafa4d94c9a18898fe12947024c5e202 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp >@@ -247,7 +247,7 @@ template<> EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::construct(Ex > return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, "TestInterface"); > auto str1 = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >- auto str2 = state->argument(1).isUndefined() ? ASCIILiteral("defaultString") : convert<IDLDOMString>(*state, state->uncheckedArgument(1)); >+ auto str2 = state->argument(1).isUndefined() ? "defaultString"_s : convert<IDLDOMString>(*state, state->uncheckedArgument(1)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > auto object = TestInterface::create(*context, WTFMove(str1), WTFMove(str2)); > return JSValue::encode(toJSNewlyCreated<IDLInterface<TestInterface>>(*state, *castedThis->globalObject(), throwScope, WTFMove(object))); >@@ -262,7 +262,7 @@ template<> JSValue JSTestInterfaceConstructor::prototypeForStructure(JSC::VM& vm > template<> void JSTestInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestInterface::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestInterface"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(1), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > reifyStaticProperties(vm, JSTestInterface::info(), JSTestInterfaceConstructorTableValues, *this); > } >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >index 0463c511c3f06df7cd9590221d8a70d141759ba7..11a78d7943ace14c58c98c7f05a2ab120056fbb7 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp >@@ -78,7 +78,7 @@ template<> JSValue JSTestInterfaceLeadingUnderscoreConstructor::prototypeForStru > template<> void JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestInterfaceLeadingUnderscore::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterfaceLeadingUnderscore"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestInterfaceLeadingUnderscore"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >index 2e979dbd7f13604d8f64a19b6f1d8153e2cebe5d..78c3ff921791d15bf00ad1ffa4f0ac8101beb008 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp >@@ -86,7 +86,7 @@ template<> JSValue JSTestIterableConstructor::prototypeForStructure(JSC::VM& vm, > template<> void JSTestIterableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestIterable::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIterable"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestIterable"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >index e2ae5bd8a43cc1dc9574bb63fa4f365ffa361652..a6560b395be62132fd4fbf4797ed3a2e77d80d91 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp >@@ -85,7 +85,7 @@ template<> JSValue JSTestJSBuiltinConstructorConstructor::prototypeForStructure( > template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestJSBuiltinConstructor"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestJSBuiltinConstructor"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >index 9a80ab041c541fb49835bc7d39ff29215efad686..e0d83898cc9925d439a6624a9347d50d95a78735 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp >@@ -83,7 +83,7 @@ template<> JSValue JSTestMediaQueryListListenerConstructor::prototypeForStructur > template<> void JSTestMediaQueryListListenerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestMediaQueryListListener"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >index aada48c04e6ede9a8e47667af3e512f327573c89..17cf7e5034d2262b580f3025083bd2e2120aab81 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >@@ -79,7 +79,7 @@ template<> JSValue JSTestNamedAndIndexedSetterNoIdentifierConstructor::prototype > template<> void JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedAndIndexedSetterNoIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedAndIndexedSetterNoIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedAndIndexedSetterNoIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >index c27fbbad05248f998f236d29d4224092a25e2699..d3c324a2d0b90f6aa7978c39275955a2a2aac3ed 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >@@ -79,7 +79,7 @@ template<> JSValue JSTestNamedAndIndexedSetterThrowingExceptionConstructor::prot > template<> void JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedAndIndexedSetterThrowingException::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedAndIndexedSetterThrowingException"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedAndIndexedSetterThrowingException"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >index e4bbce80eca6b873741fbdb7b6c07cf0b7933b81..99574b20547a301f3b274249bb312b9bf5bbe9b7 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >@@ -86,7 +86,7 @@ template<> JSValue JSTestNamedAndIndexedSetterWithIdentifierConstructor::prototy > template<> void JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedAndIndexedSetterWithIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedAndIndexedSetterWithIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedAndIndexedSetterWithIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >index 3733a78a3a3c490ea3c2d76e588c4241b753cc60..e3ce42191733972e02bcf6404cce6f39fcd5663d 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp >@@ -79,7 +79,7 @@ template<> JSValue JSTestNamedConstructorConstructor::prototypeForStructure(JSC: > template<> void JSTestNamedConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedConstructor"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >@@ -96,7 +96,7 @@ template<> EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor:: > return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); > auto str1 = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >- auto str2 = state->argument(1).isUndefined() ? ASCIILiteral("defaultString") : convert<IDLDOMString>(*state, state->uncheckedArgument(1)); >+ auto str2 = state->argument(1).isUndefined() ? "defaultString"_s : convert<IDLDOMString>(*state, state->uncheckedArgument(1)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > auto str3 = state->argument(2).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(2)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); >@@ -113,7 +113,7 @@ template<> JSValue JSTestNamedConstructorNamedConstructor::prototypeForStructure > template<> void JSTestNamedConstructorNamedConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("Audio"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >index 825676242e533b7a9f137dcf7e70438409a1763b..524a60348e2998a4cae7a7048a60a758e16f23aa 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedDeleterNoIdentifierConstructor::prototypeForStruct > template<> void JSTestNamedDeleterNoIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedDeleterNoIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedDeleterNoIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedDeleterNoIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >index 8f17172af1d949501c906243a1bde0ab9e641bc3..e07c9a1aac87397a7221fe0d696e7359aae0b600 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedDeleterThrowingExceptionConstructor::prototypeForS > template<> void JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedDeleterThrowingException::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedDeleterThrowingException"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedDeleterThrowingException"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >index fc5f6f95fdf653cfa61a660326eb001966a6a258..6a597416ee3403066dcdc98cceddf30de8975453 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >@@ -82,7 +82,7 @@ template<> JSValue JSTestNamedDeleterWithIdentifierConstructor::prototypeForStru > template<> void JSTestNamedDeleterWithIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedDeleterWithIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedDeleterWithIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedDeleterWithIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >index e3ffa78338bbecca51e7a1e1f171abc36acbe0bc..1f83a9a67ba88561e3ffd212211f7027b4fdc564 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >@@ -79,7 +79,7 @@ template<> JSValue JSTestNamedDeleterWithIndexedGetterConstructor::prototypeForS > template<> void JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedDeleterWithIndexedGetter::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedDeleterWithIndexedGetter"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedDeleterWithIndexedGetter"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >index c11820ef8adcbe7c47497a804553841523b8ce0f..5d34b7b891b4edb5687928ee19313e816bb92e04 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedGetterCallWithConstructor::prototypeForStructure(J > template<> void JSTestNamedGetterCallWithConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedGetterCallWith::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedGetterCallWith"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedGetterCallWith"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >index 63dbc63dbe96df2e0cc0fdbde19257270f5def73..9b0c4b71cfa7f55e2814d06fd6c0983f580cfdfa 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedGetterNoIdentifierConstructor::prototypeForStructu > template<> void JSTestNamedGetterNoIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedGetterNoIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedGetterNoIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedGetterNoIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >index bd96cab29ac60d9ef887392f0c379fdfee601df8..c752fd00c9a09eda75bbf498cc63d6c780f54637 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >@@ -82,7 +82,7 @@ template<> JSValue JSTestNamedGetterWithIdentifierConstructor::prototypeForStruc > template<> void JSTestNamedGetterWithIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedGetterWithIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedGetterWithIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedGetterWithIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >index c89b23bfd9abf4f85381e48ac6baf93aa3c7cf65..48c07113a4c45d41ea350c4bb2bba67ff8f1a8c5 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedSetterNoIdentifierConstructor::prototypeForStructu > template<> void JSTestNamedSetterNoIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterNoIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterNoIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterNoIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >index 3afa11d0ae3e89f3cbf0ee8944f1d6bef114d8e7..2b7dc95a89d134c154bb35165c566546e1289088 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedSetterThrowingExceptionConstructor::prototypeForSt > template<> void JSTestNamedSetterThrowingExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterThrowingException::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterThrowingException"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterThrowingException"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >index 92873641ef7f449d18dc56baacbe07f3a88e6d2f..e659eb347538fd7c75c4959731129d539ebefd15 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >@@ -82,7 +82,7 @@ template<> JSValue JSTestNamedSetterWithIdentifierConstructor::prototypeForStruc > template<> void JSTestNamedSetterWithIdentifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithIdentifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithIdentifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithIdentifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >index 66d5a8adaba59ee0893526d488d16b9935c39df9..64a5ca632598657941d75652e3392b6cc6d716d9 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >@@ -86,7 +86,7 @@ template<> JSValue JSTestNamedSetterWithIndexedGetterConstructor::prototypeForSt > template<> void JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithIndexedGetter::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithIndexedGetter"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithIndexedGetter"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >index 3c29137d3a6a173653083ce7774c80837fcb012b..cccdeb12760eb394f059be87e48073d4d488cde8 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >@@ -86,7 +86,7 @@ template<> JSValue JSTestNamedSetterWithIndexedGetterAndSetterConstructor::proto > template<> void JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithIndexedGetterAndSetter::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithIndexedGetterAndSetter"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithIndexedGetterAndSetter"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >index c33fd8ed75102a06deb4618343245c19c14f6036..fb2514cbdd035475592fc002d5a2bc734882663b 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp >@@ -77,7 +77,7 @@ template<> JSValue JSTestNamedSetterWithOverrideBuiltinsConstructor::prototypeFo > template<> void JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithOverrideBuiltins::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithOverrideBuiltins"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithOverrideBuiltins"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >index 44057fe87a12c69d90710740e24a0908df94c459..c54943a3938d0450be87b24244a53e93064b3dc7 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp >@@ -101,7 +101,7 @@ template<> JSValue JSTestNamedSetterWithUnforgablePropertiesConstructor::prototy > template<> void JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithUnforgableProperties::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithUnforgableProperties"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithUnforgableProperties"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >index db2d6c590ea48ece128dd82ea484a1812ed20cd3..4982e17064ba1ea40c086c484207b1415bae0e1e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp >@@ -101,7 +101,7 @@ template<> JSValue JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsC > template<> void JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >index b2ba55910839b7e187adfd5acd73f80c27319797..246b17a2449061820180e9fe9dbf16349f7f4cf3 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp >@@ -112,7 +112,7 @@ template<> JSValue JSTestNodeConstructor::prototypeForStructure(JSC::VM& vm, con > template<> void JSTestNodeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestNode::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestNode"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >index c0466c266b737f6c885d2aafd05b5f16f682d501..5deebbb11a1138996f802d1f4a5691741b905557 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >@@ -834,7 +834,7 @@ template<> TestObj::Dictionary convertDictionary<TestObj::Dictionary>(ExecState& > result.stringWithDefault = convert<IDLDOMString>(state, stringWithDefaultValue); > RETURN_IF_EXCEPTION(throwScope, { }); > } else >- result.stringWithDefault = ASCIILiteral("defaultString"); >+ result.stringWithDefault = "defaultString"_s; > JSValue stringWithoutDefaultValue; > if (isNullOrUndefined) > stringWithoutDefaultValue = jsUndefined(); >@@ -1941,7 +1941,7 @@ template<> JSValue JSTestObjConstructor::prototypeForStructure(JSC::VM& vm, cons > template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestObj::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestObject"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(2), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > reifyStaticProperties(vm, JSTestObj::info(), JSTestObjConstructorTableValues, *this); > } >@@ -6274,7 +6274,7 @@ static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalSt > UNUSED_PARAM(state); > UNUSED_PARAM(throwScope); > auto& impl = castedThis->wrapped(); >- auto str = state->argument(0).isUndefined() ? ASCIILiteral("foo") : convert<IDLDOMString>(*state, state->uncheckedArgument(0)); >+ auto str = state->argument(0).isUndefined() ? "foo"_s : convert<IDLDOMString>(*state, state->uncheckedArgument(0)); > RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); > impl.methodWithOptionalStringAndDefaultValue(WTFMove(str)); > return JSValue::encode(jsUndefined()); >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >index 41811b9f771f72ee6614a3750623429f15a62739..38aa4ab268ba82ddb4f0e4bc1937e5038d2f0b71 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp >@@ -170,7 +170,7 @@ template<> JSValue JSTestOverloadedConstructorsConstructor::prototypeForStructur > template<> void JSTestOverloadedConstructorsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestOverloadedConstructors"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >index 90ce90d5020bb188617dc1464a071077a7913e62..1dc8bc98288f6cfe06a6b6f8f9ccebf81641f01f 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp >@@ -126,7 +126,7 @@ template<> JSValue JSTestOverloadedConstructorsWithSequenceConstructor::prototyp > template<> void JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructorsWithSequence::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructorsWithSequence"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestOverloadedConstructorsWithSequence"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >index 03928b51d11dd1715914b5ce161ebcb850bc4ca7..d890d3e7197e2a056bc77934e61228dd3010a43e 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp >@@ -85,7 +85,7 @@ template<> JSValue JSTestOverrideBuiltinsConstructor::prototypeForStructure(JSC: > template<> void JSTestOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestOverrideBuiltins::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverrideBuiltins"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestOverrideBuiltins"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >index b04c35bd15240a8068861b25ef2c778a8b45c511..de490c5f09a9aaa8cd1fdba42d1764a4c09af804 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp >@@ -76,7 +76,7 @@ template<> JSValue JSTestPluginInterfaceConstructor::prototypeForStructure(JSC:: > template<> void JSTestPluginInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestPluginInterface::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestPluginInterface"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestPluginInterface"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >index 149cc9b7c60beb1ab1be271b6b451daf18b6f421..07a93b39e11ed663fa2c3e8d6af6077b67db1808 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp >@@ -177,7 +177,7 @@ template<> JSValue JSTestPromiseRejectionEventConstructor::prototypeForStructure > template<> void JSTestPromiseRejectionEventConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestPromiseRejectionEvent::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestPromiseRejectionEvent"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestPromiseRejectionEvent"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(2), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >index 36d92d00091c863dff361d61685f97daf75108f4..2b2cc626b4908131f99bf2a14bae216c6c4511d8 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp >@@ -108,7 +108,7 @@ template<> JSValue JSTestSerializationConstructor::prototypeForStructure(JSC::VM > template<> void JSTestSerializationConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestSerialization::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerialization"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestSerialization"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >index df64eadc4736ac2833bc58af47159546404e0f20..86e1cd99f6636b5ba90e4bc70e75f669eec4104c 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp >@@ -73,7 +73,7 @@ template<> JSValue JSTestSerializationIndirectInheritanceConstructor::prototypeF > template<> void JSTestSerializationIndirectInheritanceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestSerializationIndirectInheritance::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationIndirectInheritance"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestSerializationIndirectInheritance"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >index 16ad10ebb20a93ce1800e80e83888661b20b6517..a77a5888f3072d185f95a123269b37127e8d1976 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp >@@ -83,7 +83,7 @@ template<> JSValue JSTestSerializationInheritConstructor::prototypeForStructure( > template<> void JSTestSerializationInheritConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInherit::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInherit"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestSerializationInherit"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >index f0c4085a3632331ab771f61aa5a2c11711581901..52504f18136472a1261b34747905ccb742295be6 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp >@@ -85,7 +85,7 @@ template<> JSValue JSTestSerializationInheritFinalConstructor::prototypeForStruc > template<> void JSTestSerializationInheritFinalConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInheritFinal::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInheritFinal"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestSerializationInheritFinal"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >index d3fedaab9657db54d3cbb579b0bc8d4500e7deb6..32af6939f07a5c899f9bcb3ddc5470f6eb752453 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp >@@ -99,7 +99,7 @@ template<> JSValue JSTestSerializedScriptValueInterfaceConstructor::prototypeFor > template<> void JSTestSerializedScriptValueInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestSerializedScriptValueInterface"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >index d2275eda22f66ddcd9c954abb3ae1e82e811ffbc..ac39bc84e91dea974c7594d3c31c9707753eea6a 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp >@@ -81,7 +81,7 @@ template<> JSValue JSTestStringifierConstructor::prototypeForStructure(JSC::VM& > template<> void JSTestStringifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifier::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifier"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifier"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >index 0459c1ae98d3839db757ecc7860abc39a5529e72..1e4730eb20e9495b2da8040d74ea713e36d2eaf9 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp >@@ -81,7 +81,7 @@ template<> JSValue JSTestStringifierAnonymousOperationConstructor::prototypeForS > template<> void JSTestStringifierAnonymousOperationConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierAnonymousOperation::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierAnonymousOperation"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierAnonymousOperation"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >index 0f0a914c379501845ddeb2ffe04612142aa8b0b9..d16ed4bb9ecc0e657d0884c317317fe38b852df4 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp >@@ -82,7 +82,7 @@ template<> JSValue JSTestStringifierNamedOperationConstructor::prototypeForStruc > template<> void JSTestStringifierNamedOperationConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierNamedOperation::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierNamedOperation"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierNamedOperation"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >index d699c81711100dc0b641092395cbe003f64618c9..b8da5d6f5dcc3f1e5c22522aef406073ebf510d1 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp >@@ -82,7 +82,7 @@ template<> JSValue JSTestStringifierOperationImplementedAsConstructor::prototype > template<> void JSTestStringifierOperationImplementedAsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierOperationImplementedAs::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierOperationImplementedAs"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierOperationImplementedAs"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >index 3d190341c5730507b1b371535212faab52e67788..c2edea8d3bc91c926a3c77be9c4646629db81123 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp >@@ -81,7 +81,7 @@ template<> JSValue JSTestStringifierOperationNamedToStringConstructor::prototype > template<> void JSTestStringifierOperationNamedToStringConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierOperationNamedToString::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierOperationNamedToString"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierOperationNamedToString"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >index 83d787464a23052e844053fb1f3ff6af26b3e047..d1e37d163d76109c63af969514940771df5e7e53 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp >@@ -83,7 +83,7 @@ template<> JSValue JSTestStringifierReadOnlyAttributeConstructor::prototypeForSt > template<> void JSTestStringifierReadOnlyAttributeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierReadOnlyAttribute::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierReadOnlyAttribute"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierReadOnlyAttribute"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >index 41dadeef05fcf983dfb640f910caa68352f69f96..aa54121f8c270b317e4bcecb27824eb3bb0301cb 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp >@@ -84,7 +84,7 @@ template<> JSValue JSTestStringifierReadWriteAttributeConstructor::prototypeForS > template<> void JSTestStringifierReadWriteAttributeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestStringifierReadWriteAttribute::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestStringifierReadWriteAttribute"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestStringifierReadWriteAttribute"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > } > >diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >index 33671dcaa99e913baa137840bec90c16b5a424f6..ad7fa7fe057229b2bc99d3dfec6b1595598c6e80 100644 >--- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp >@@ -167,7 +167,7 @@ template<> JSValue JSTestTypedefsConstructor::prototypeForStructure(JSC::VM& vm, > template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) > { > putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); >+ putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("TestTypedefs"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > putDirect(vm, vm.propertyNames->length, jsNumber(3), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum); > reifyStaticProperties(vm, JSTestTypedefs::info(), JSTestTypedefsConstructorTableValues, *this); > } >diff --git a/Source/WebCore/bridge/c/c_instance.cpp b/Source/WebCore/bridge/c/c_instance.cpp >index 398b7be16441bf4d90faca1b5ebe7caa3224023f..d370b2c830b0862cb6513d2d97d3a629f2f082b5 100644 >--- a/Source/WebCore/bridge/c/c_instance.cpp >+++ b/Source/WebCore/bridge/c/c_instance.cpp >@@ -160,7 +160,7 @@ JSValue CInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!asObject(runtimeMethod)->inherits<CRuntimeMethod>(vm)) >- return throwTypeError(exec, scope, ASCIILiteral("Attempt to invoke non-plug-in method on plug-in object.")); >+ return throwTypeError(exec, scope, "Attempt to invoke non-plug-in method on plug-in object."_s); > > CMethod* method = static_cast<CMethod*>(runtimeMethod->method()); > ASSERT(method); >@@ -189,7 +189,7 @@ JSValue CInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod) > } > > if (!retval) >- throwException(exec, scope, createError(exec, ASCIILiteral("Error calling method on NPObject."))); >+ throwException(exec, scope, createError(exec, "Error calling method on NPObject."_s)); > > for (i = 0; i < count; i++) > _NPN_ReleaseVariantValue(&cArgs[i]); >@@ -227,7 +227,7 @@ JSValue CInstance::invokeDefaultMethod(ExecState* exec) > } > > if (!retval) >- throwException(exec, scope, createError(exec, ASCIILiteral("Error calling method on NPObject."))); >+ throwException(exec, scope, createError(exec, "Error calling method on NPObject."_s)); > > for (i = 0; i < count; i++) > _NPN_ReleaseVariantValue(&cArgs[i]); >@@ -269,7 +269,7 @@ JSValue CInstance::invokeConstruct(ExecState* exec, const ArgList& args) > } > > if (!retval) >- throwException(exec, scope, createError(exec, ASCIILiteral("Error calling method on NPObject."))); >+ throwException(exec, scope, createError(exec, "Error calling method on NPObject."_s)); > > for (i = 0; i < count; i++) > _NPN_ReleaseVariantValue(&cArgs[i]); >@@ -295,7 +295,7 @@ JSValue CInstance::stringValue(ExecState* exec) const > return value; > > // Fallback to default implementation. >- return jsNontrivialString(exec, ASCIILiteral("NPObject")); >+ return jsNontrivialString(exec, "NPObject"_s); > } > > JSValue CInstance::numberValue(ExecState*) const >@@ -342,7 +342,7 @@ bool CInstance::toJSPrimitive(ExecState* exec, const char* name, JSValue& result > } > > if (!retval) >- throwException(exec, scope, createError(exec, ASCIILiteral("Error calling method on NPObject."))); >+ throwException(exec, scope, createError(exec, "Error calling method on NPObject."_s)); > > resultValue = convertNPVariantToValue(exec, &resultVariant, m_rootObject.get()); > _NPN_ReleaseVariantValue(&resultVariant); >diff --git a/Source/WebCore/bridge/objc/objc_instance.mm b/Source/WebCore/bridge/objc/objc_instance.mm >index 0a1124722bf6213b220f1ca6b40dc6e05c89bfba..fce743d432bfe041224a46e985e73d9a1dd3c208 100644 >--- a/Source/WebCore/bridge/objc/objc_instance.mm >+++ b/Source/WebCore/bridge/objc/objc_instance.mm >@@ -210,7 +210,7 @@ JSC::JSValue ObjcInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeM > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!asObject(runtimeMethod)->inherits<ObjCRuntimeMethod>(vm)) >- return throwTypeError(exec, scope, ASCIILiteral("Attempt to invoke non-plug-in method on plug-in object.")); >+ return throwTypeError(exec, scope, "Attempt to invoke non-plug-in method on plug-in object."_s); > > ObjcMethod *method = static_cast<ObjcMethod*>(runtimeMethod->method()); > ASSERT(method); >diff --git a/Source/WebCore/bridge/objc/objc_runtime.mm b/Source/WebCore/bridge/objc/objc_runtime.mm >index e7b1bdbebbf95d64c88f2f2bc1cf6a15112e2457..51a21039a9260aecc0213563491f080b760fd640 100644 >--- a/Source/WebCore/bridge/objc/objc_runtime.mm >+++ b/Source/WebCore/bridge/objc/objc_runtime.mm >@@ -166,7 +166,7 @@ bool ObjcArray::setValueAt(ExecState* exec, unsigned int index, JSValue aValue) > auto scope = DECLARE_THROW_SCOPE(vm); > > if (![_array.get() respondsToSelector:@selector(insertObject:atIndex:)]) { >- throwTypeError(exec, scope, ASCIILiteral("Array is not mutable.")); >+ throwTypeError(exec, scope, "Array is not mutable."_s); > return false; > } > >diff --git a/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp b/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp >index a66261532827df9392b2d336151807f0c95a711b..72407156ebd62686a134b01a4e40cd5116b759df 100644 >--- a/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp >+++ b/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp >@@ -215,7 +215,7 @@ BlockedStatus ContentExtensionsBackend::processContentExtensionRulesForLoad(cons > if (currentDocument) { > if (willMakeHTTPS) { > ASSERT(url.protocolIs("http") || url.protocolIs("ws")); >- String newProtocol = url.protocolIs("http") ? ASCIILiteral("https") : ASCIILiteral("wss"); >+ String newProtocol = url.protocolIs("http") ? "https"_s : "wss"_s; > currentDocument->addConsoleMessage(MessageSource::ContentBlocker, MessageLevel::Info, makeString("Content blocker promoted URL from ", url.string(), " to ", newProtocol)); > } > if (willBlockLoad) >diff --git a/Source/WebCore/crypto/SubtleCrypto.cpp b/Source/WebCore/crypto/SubtleCrypto.cpp >index a0d0d9ab9489025861b30af5643816c50aa82728..86736424c8755e7610e8c0730ecba1729d12cabd 100644 >--- a/Source/WebCore/crypto/SubtleCrypto.cpp >+++ b/Source/WebCore/crypto/SubtleCrypto.cpp >@@ -410,25 +410,25 @@ static void rejectWithException(Ref<DeferredPromise>&& passedPromise, ExceptionC > { > switch (ec) { > case NotSupportedError: >- passedPromise->reject(ec, ASCIILiteral("The algorithm is not supported")); >+ passedPromise->reject(ec, "The algorithm is not supported"_s); > return; > case SyntaxError: >- passedPromise->reject(ec, ASCIILiteral("A required parameter was missing or out-of-range")); >+ passedPromise->reject(ec, "A required parameter was missing or out-of-range"_s); > return; > case InvalidStateError: >- passedPromise->reject(ec, ASCIILiteral("The requested operation is not valid for the current state of the provided key")); >+ passedPromise->reject(ec, "The requested operation is not valid for the current state of the provided key"_s); > return; > case InvalidAccessError: >- passedPromise->reject(ec, ASCIILiteral("The requested operation is not valid for the provided key")); >+ passedPromise->reject(ec, "The requested operation is not valid for the provided key"_s); > return; > case UnknownError: >- passedPromise->reject(ec, ASCIILiteral("The operation failed for an unknown transient reason (e.g. out of memory)")); >+ passedPromise->reject(ec, "The operation failed for an unknown transient reason (e.g. out of memory)"_s); > return; > case DataError: >- passedPromise->reject(ec, ASCIILiteral("Data provided to an operation does not meet requirements")); >+ passedPromise->reject(ec, "Data provided to an operation does not meet requirements"_s); > return; > case OperationError: >- passedPromise->reject(ec, ASCIILiteral("The operation failed for an operation-specific reason")); >+ passedPromise->reject(ec, "The operation failed for an operation-specific reason"_s); > return; > default: > break; >@@ -530,12 +530,12 @@ void SubtleCrypto::encrypt(JSC::ExecState& state, AlgorithmIdentifier&& algorith > auto data = copyToVector(WTFMove(dataBufferSource)); > > if (params->identifier != key.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!key.allows(CryptoKeyUsageEncrypt)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support encryption")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support encryption"_s); > return; > } > >@@ -568,12 +568,12 @@ void SubtleCrypto::decrypt(JSC::ExecState& state, AlgorithmIdentifier&& algorith > auto data = copyToVector(WTFMove(dataBufferSource)); > > if (params->identifier != key.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!key.allows(CryptoKeyUsageDecrypt)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support decryption")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support decryption"_s); > return; > } > >@@ -606,12 +606,12 @@ void SubtleCrypto::sign(JSC::ExecState& state, AlgorithmIdentifier&& algorithmId > auto data = copyToVector(WTFMove(dataBufferSource)); > > if (params->identifier != key.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!key.allows(CryptoKeyUsageSign)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support signing")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support signing"_s); > return; > } > >@@ -645,12 +645,12 @@ void SubtleCrypto::verify(JSC::ExecState& state, AlgorithmIdentifier&& algorithm > auto data = copyToVector(WTFMove(dataBufferSource)); > > if (params->identifier != key.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!key.allows(CryptoKeyUsageVerify)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support verification")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support verification"_s); > return; > } > >@@ -772,12 +772,12 @@ void SubtleCrypto::deriveKey(JSC::ExecState& state, AlgorithmIdentifier&& algori > auto keyUsagesBitmap = toCryptoKeyUsageBitmap(keyUsages); > > if (params->identifier != baseKey.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!baseKey.allows(CryptoKeyUsageDeriveKey)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support CryptoKey derivation")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support CryptoKey derivation"_s); > return; > } > >@@ -785,7 +785,7 @@ void SubtleCrypto::deriveKey(JSC::ExecState& state, AlgorithmIdentifier&& algori > > auto result = getLengthAlgorithm->getKeyLength(*getLengthParams); > if (result.hasException()) { >- promise->reject(result.releaseException().code(), ASCIILiteral("Cannot get key length from derivedKeyType")); >+ promise->reject(result.releaseException().code(), "Cannot get key length from derivedKeyType"_s); > return; > } > size_t length = result.releaseReturnValue(); >@@ -833,12 +833,12 @@ void SubtleCrypto::deriveBits(JSC::ExecState& state, AlgorithmIdentifier&& algor > auto params = paramsOrException.releaseReturnValue(); > > if (params->identifier != baseKey.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!baseKey.allows(CryptoKeyUsageDeriveBits)) { >- promise->reject(InvalidAccessError, ASCIILiteral("CryptoKey doesn't support bits derivation")); >+ promise->reject(InvalidAccessError, "CryptoKey doesn't support bits derivation"_s); > return; > } > >@@ -910,7 +910,7 @@ void SubtleCrypto::exportKey(KeyFormat format, CryptoKey& key, Ref<DeferredPromi > } > > if (!key.extractable()) { >- promise->reject(InvalidAccessError, ASCIILiteral("The CryptoKey is nonextractable")); >+ promise->reject(InvalidAccessError, "The CryptoKey is nonextractable"_s); > return; > } > >@@ -966,12 +966,12 @@ void SubtleCrypto::wrapKey(JSC::ExecState& state, KeyFormat format, CryptoKey& k > auto wrapParams = wrapParamsOrException.releaseReturnValue(); > > if (wrapParams->identifier != wrappingKey.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("Wrapping CryptoKey doesn't match AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "Wrapping CryptoKey doesn't match AlgorithmIdentifier"_s); > return; > } > > if (!wrappingKey.allows(CryptoKeyUsageWrapKey)) { >- promise->reject(InvalidAccessError, ASCIILiteral("Wrapping CryptoKey doesn't support wrapKey operation")); >+ promise->reject(InvalidAccessError, "Wrapping CryptoKey doesn't support wrapKey operation"_s); > return; > } > >@@ -981,7 +981,7 @@ void SubtleCrypto::wrapKey(JSC::ExecState& state, KeyFormat format, CryptoKey& k > } > > if (!key.extractable()) { >- promise->reject(InvalidAccessError, ASCIILiteral("The CryptoKey is nonextractable")); >+ promise->reject(InvalidAccessError, "The CryptoKey is nonextractable"_s); > return; > } > >@@ -1072,12 +1072,12 @@ void SubtleCrypto::unwrapKey(JSC::ExecState& state, KeyFormat format, BufferSour > auto keyUsagesBitmap = toCryptoKeyUsageBitmap(keyUsages); > > if (unwrapParams->identifier != unwrappingKey.algorithmIdentifier()) { >- promise->reject(InvalidAccessError, ASCIILiteral("Unwrapping CryptoKey doesn't match unwrap AlgorithmIdentifier")); >+ promise->reject(InvalidAccessError, "Unwrapping CryptoKey doesn't match unwrap AlgorithmIdentifier"_s); > return; > } > > if (!unwrappingKey.allows(CryptoKeyUsageUnwrapKey)) { >- promise->reject(InvalidAccessError, ASCIILiteral("Unwrapping CryptoKey doesn't support unwrapKey operation")); >+ promise->reject(InvalidAccessError, "Unwrapping CryptoKey doesn't support unwrapKey operation"_s); > return; > } > >@@ -1115,7 +1115,7 @@ void SubtleCrypto::unwrapKey(JSC::ExecState& state, KeyFormat format, BufferSour > JSLockHolder locker(vm); > auto jwkObject = JSONParse(&state, jwkString); > if (!jwkObject) { >- promise->reject(DataError, ASCIILiteral("WrappedKey cannot be converted to a JSON object")); >+ promise->reject(DataError, "WrappedKey cannot be converted to a JSON object"_s); > return; > } > auto jwk = convert<IDLDictionary<JsonWebKey>>(state, jwkObject); >diff --git a/Source/WebCore/crypto/keys/CryptoKeyEC.cpp b/Source/WebCore/crypto/keys/CryptoKeyEC.cpp >index 74ec5e04249d0a0f6e5b1074f0f88894d096a605..59c8c544b85afd93e0d6cfd0b8bebaa6822719df 100644 >--- a/Source/WebCore/crypto/keys/CryptoKeyEC.cpp >+++ b/Source/WebCore/crypto/keys/CryptoKeyEC.cpp >@@ -34,9 +34,9 @@ > > namespace WebCore { > >-static const char* const P256 = "P-256"; >-static const char* const P384 = "P-384"; >-static const char* const P521 = "P-521"; >+static const ASCIILiteral P256 { "P-256"_s }; >+static const ASCIILiteral P384 { "P-384"_s }; >+static const ASCIILiteral P521 { "P-521"_s }; > > static std::optional<CryptoKeyEC::NamedCurve> toNamedCurve(const String& curve) > { >@@ -216,13 +216,13 @@ auto CryptoKeyEC::algorithm() const -> KeyAlgorithm > > switch (m_curve) { > case NamedCurve::P256: >- result.namedCurve = ASCIILiteral(P256); >+ result.namedCurve = P256; > break; > case NamedCurve::P384: >- result.namedCurve = ASCIILiteral(P384); >+ result.namedCurve = P384; > break; > case NamedCurve::P521: >- result.namedCurve = ASCIILiteral(P521); >+ result.namedCurve = P521; > break; > } > >diff --git a/Source/WebCore/css/CSSInheritedValue.cpp b/Source/WebCore/css/CSSInheritedValue.cpp >index 05b183c00bdd94b0718a5f8fec0eacd57f1f92ae..ed248981b1ad244becd73481332b7a87aace897f 100644 >--- a/Source/WebCore/css/CSSInheritedValue.cpp >+++ b/Source/WebCore/css/CSSInheritedValue.cpp >@@ -27,7 +27,7 @@ namespace WebCore { > > String CSSInheritedValue::customCSSText() const > { >- return ASCIILiteral("inherit"); >+ return "inherit"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSInitialValue.cpp b/Source/WebCore/css/CSSInitialValue.cpp >index 5d8fc253c5b9c5488f73f61091b73e6b96d3dbb4..fd1436e7f1eca646f868d988f766246ef761330a 100644 >--- a/Source/WebCore/css/CSSInitialValue.cpp >+++ b/Source/WebCore/css/CSSInitialValue.cpp >@@ -27,7 +27,7 @@ namespace WebCore { > > String CSSInitialValue::customCSSText() const > { >- return ASCIILiteral("initial"); >+ return "initial"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSKeyframesRule.cpp b/Source/WebCore/css/CSSKeyframesRule.cpp >index 9f000d9cf2687544168fe9aab77c66c9f67a238c..632a547a92d987368214f14ab476ad6649346ea2 100644 >--- a/Source/WebCore/css/CSSKeyframesRule.cpp >+++ b/Source/WebCore/css/CSSKeyframesRule.cpp >@@ -156,7 +156,7 @@ void CSSKeyframesRule::insertRule(const String& ruleText) > { > if (CSSStyleSheet* parent = parentStyleSheet()) { > if (Document* ownerDocument = parent->ownerDocument()) >- ownerDocument->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("CSSKeyframesRule 'insertRule' function is deprecated. Use 'appendRule' instead.")); >+ ownerDocument->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "CSSKeyframesRule 'insertRule' function is deprecated. Use 'appendRule' instead."_s); > } > appendRule(ruleText); > } >diff --git a/Source/WebCore/css/CSSRevertValue.cpp b/Source/WebCore/css/CSSRevertValue.cpp >index 9a63ef9ef7dc66135d10baeb0d46faac6ec3c8bc..d99def73217e7b141306f91a50f4f35f739614fd 100644 >--- a/Source/WebCore/css/CSSRevertValue.cpp >+++ b/Source/WebCore/css/CSSRevertValue.cpp >@@ -32,7 +32,7 @@ namespace WebCore { > > String CSSRevertValue::customCSSText() const > { >- return ASCIILiteral("Revert"); >+ return "Revert"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSStyleSheet.h b/Source/WebCore/css/CSSStyleSheet.h >index d3694b8cc70e0c655e47b64cc8fd0d665b3b6862..f65460ca5d7370734791b6b788bdedda0b0013fa 100644 >--- a/Source/WebCore/css/CSSStyleSheet.h >+++ b/Source/WebCore/css/CSSStyleSheet.h >@@ -131,7 +131,7 @@ class CSSStyleSheet final : public StyleSheet { > CSSStyleSheet(Ref<StyleSheetContents>&&, Node& ownerNode, const TextPosition& startPosition, bool isInlineStylesheet, const std::optional<bool>&); > > bool isCSSStyleSheet() const final { return true; } >- String type() const final { return ASCIILiteral("text/css"); } >+ String type() const final { return "text/css"_s; } > > bool canAccessRules() const; > >diff --git a/Source/WebCore/css/CSSUnsetValue.cpp b/Source/WebCore/css/CSSUnsetValue.cpp >index 98472d73f8dec73ef34ff9812e424fda8b8713d4..726b0b3bc75433676536474a407e7d07dd75eb7e 100644 >--- a/Source/WebCore/css/CSSUnsetValue.cpp >+++ b/Source/WebCore/css/CSSUnsetValue.cpp >@@ -32,7 +32,7 @@ namespace WebCore { > > String CSSUnsetValue::customCSSText() const > { >- return ASCIILiteral("unset"); >+ return "unset"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSValueList.cpp b/Source/WebCore/css/CSSValueList.cpp >index b6e0c2c5445f6316c1dc952abbd9fa9906921f9f..757cb3a78a6a87cdc53c6bf5bd754877359aec8c 100644 >--- a/Source/WebCore/css/CSSValueList.cpp >+++ b/Source/WebCore/css/CSSValueList.cpp >@@ -89,13 +89,13 @@ String CSSValueList::customCSSText() const > String separator; > switch (m_valueListSeparator) { > case SpaceSeparator: >- separator = ASCIILiteral(" "); >+ separator = " "_s; > break; > case CommaSeparator: >- separator = ASCIILiteral(", "); >+ separator = ", "_s; > break; > case SlashSeparator: >- separator = ASCIILiteral(" / "); >+ separator = " / "_s; > break; > default: > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/css/DOMMatrixReadOnly.cpp b/Source/WebCore/css/DOMMatrixReadOnly.cpp >index f74b4659ba6f547ba8147c11d7065b702e6bd547..deaadfa7f811e748f3eb13714b95e7076d8b2c4e 100644 >--- a/Source/WebCore/css/DOMMatrixReadOnly.cpp >+++ b/Source/WebCore/css/DOMMatrixReadOnly.cpp >@@ -107,17 +107,17 @@ static bool sameValueZero(double a, double b) > ExceptionOr<void> DOMMatrixReadOnly::validateAndFixup(DOMMatrix2DInit& init) > { > if (init.a && init.m11 && !sameValueZero(init.a.value(), init.m11.value())) >- return Exception { TypeError, ASCIILiteral("init.a and init.m11 do not match") }; >+ return Exception { TypeError, "init.a and init.m11 do not match"_s }; > if (init.b && init.m12 && !sameValueZero(init.b.value(), init.m12.value())) >- return Exception { TypeError, ASCIILiteral("init.b and init.m12 do not match") }; >+ return Exception { TypeError, "init.b and init.m12 do not match"_s }; > if (init.c && init.m21 && !sameValueZero(init.c.value(), init.m21.value())) >- return Exception { TypeError, ASCIILiteral("init.c and init.m21 do not match") }; >+ return Exception { TypeError, "init.c and init.m21 do not match"_s }; > if (init.d && init.m22 && !sameValueZero(init.d.value(), init.m22.value())) >- return Exception { TypeError, ASCIILiteral("init.d and init.m22 do not match") }; >+ return Exception { TypeError, "init.d and init.m22 do not match"_s }; > if (init.e && init.m41 && !sameValueZero(init.e.value(), init.m41.value())) >- return Exception { TypeError, ASCIILiteral("init.e and init.m41 do not match") }; >+ return Exception { TypeError, "init.e and init.m41 do not match"_s }; > if (init.f && init.m42 && !sameValueZero(init.f.value(), init.m42.value())) >- return Exception { TypeError, ASCIILiteral("init.f and init.m42 do not match") }; >+ return Exception { TypeError, "init.f and init.m42 do not match"_s }; > > if (!init.m11) > init.m11 = init.a.value_or(1); >@@ -143,25 +143,25 @@ ExceptionOr<void> DOMMatrixReadOnly::validateAndFixup(DOMMatrixInit& init) > > if (init.is2D && init.is2D.value()) { > if (init.m13) >- return Exception { TypeError, ASCIILiteral("m13 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m13 should be 0 for a 2D matrix"_s }; > if (init.m14) >- return Exception { TypeError, ASCIILiteral("m14 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m14 should be 0 for a 2D matrix"_s }; > if (init.m23) >- return Exception { TypeError, ASCIILiteral("m23 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m23 should be 0 for a 2D matrix"_s }; > if (init.m24) >- return Exception { TypeError, ASCIILiteral("m24 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m24 should be 0 for a 2D matrix"_s }; > if (init.m31) >- return Exception { TypeError, ASCIILiteral("m31 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m31 should be 0 for a 2D matrix"_s }; > if (init.m32) >- return Exception { TypeError, ASCIILiteral("m32 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m32 should be 0 for a 2D matrix"_s }; > if (init.m34) >- return Exception { TypeError, ASCIILiteral("m34 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m34 should be 0 for a 2D matrix"_s }; > if (init.m43) >- return Exception { TypeError, ASCIILiteral("m43 should be 0 for a 2D matrix") }; >+ return Exception { TypeError, "m43 should be 0 for a 2D matrix"_s }; > if (init.m33 != 1) >- return Exception { TypeError, ASCIILiteral("m33 should be 1 for a 2D matrix") }; >+ return Exception { TypeError, "m33 should be 1 for a 2D matrix"_s }; > if (init.m44 != 1) >- return Exception { TypeError, ASCIILiteral("m44 should be 1 for a 2D matrix") }; >+ return Exception { TypeError, "m44 should be 1 for a 2D matrix"_s }; > } > > if (!init.is2D) { >@@ -347,7 +347,7 @@ ExceptionOr<Ref<Float32Array>> DOMMatrixReadOnly::toFloat32Array() const > { > auto array32 = Float32Array::createUninitialized(16); > if (!array32) >- return Exception { UnknownError, ASCIILiteral("Out of memory") }; >+ return Exception { UnknownError, "Out of memory"_s }; > > unsigned index = 0; > array32->set(index++, m_matrix.m11()); >@@ -373,7 +373,7 @@ ExceptionOr<Ref<Float64Array>> DOMMatrixReadOnly::toFloat64Array() const > { > auto array64 = Float64Array::createUninitialized(16); > if (!array64) >- return Exception { UnknownError, ASCIILiteral("Out of memory") }; >+ return Exception { UnknownError, "Out of memory"_s }; > > unsigned index = 0; > array64->set(index++, m_matrix.m11()); >@@ -399,7 +399,7 @@ ExceptionOr<Ref<Float64Array>> DOMMatrixReadOnly::toFloat64Array() const > ExceptionOr<String> DOMMatrixReadOnly::toString() const > { > if (!m_matrix.containsOnlyFiniteValues()) >- return Exception { InvalidStateError, ASCIILiteral("Matrix contains non-finite values") }; >+ return Exception { InvalidStateError, "Matrix contains non-finite values"_s }; > > StringBuilder builder; > if (is2D()) { >diff --git a/Source/WebCore/css/DeprecatedCSSOMValueList.cpp b/Source/WebCore/css/DeprecatedCSSOMValueList.cpp >index e496884aeb43f61329b1e8cc84efbf2815a6588e..ee9054732319f99317d872c9fd1bb485971ca5b3 100644 >--- a/Source/WebCore/css/DeprecatedCSSOMValueList.cpp >+++ b/Source/WebCore/css/DeprecatedCSSOMValueList.cpp >@@ -36,13 +36,13 @@ String DeprecatedCSSOMValueList::cssText() const > String separator; > switch (m_valueListSeparator) { > case CSSValue::SpaceSeparator: >- separator = ASCIILiteral(" "); >+ separator = " "_s; > break; > case CSSValue::CommaSeparator: >- separator = ASCIILiteral(", "); >+ separator = ", "_s; > break; > case CSSValue::SlashSeparator: >- separator = ASCIILiteral(" / "); >+ separator = " / "_s; > break; > default: > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/css/FontFace.cpp b/Source/WebCore/css/FontFace.cpp >index 1fffb175de425e2111530560268a81c23733d1a8..2eb41c9c11444d61bddf3ab142b95be384195c78 100644 >--- a/Source/WebCore/css/FontFace.cpp >+++ b/Source/WebCore/css/FontFace.cpp >@@ -87,25 +87,25 @@ ExceptionOr<Ref<FontFace>> FontFace::create(Document& document, const String& fa > return sourceConversionResult.releaseException(); > > // These ternaries match the default strings inside the FontFaceDescriptors dictionary inside FontFace.idl. >- auto setStyleResult = result->setStyle(descriptors.style.isEmpty() ? ASCIILiteral("normal") : descriptors.style); >+ auto setStyleResult = result->setStyle(descriptors.style.isEmpty() ? "normal"_s : descriptors.style); > if (setStyleResult.hasException()) > return setStyleResult.releaseException(); >- auto setWeightResult = result->setWeight(descriptors.weight.isEmpty() ? ASCIILiteral("normal") : descriptors.weight); >+ auto setWeightResult = result->setWeight(descriptors.weight.isEmpty() ? "normal"_s : descriptors.weight); > if (setWeightResult.hasException()) > return setWeightResult.releaseException(); >- auto setStretchResult = result->setStretch(descriptors.stretch.isEmpty() ? ASCIILiteral("normal") : descriptors.stretch); >+ auto setStretchResult = result->setStretch(descriptors.stretch.isEmpty() ? "normal"_s : descriptors.stretch); > if (setStretchResult.hasException()) > return setStretchResult.releaseException(); >- auto setUnicodeRangeResult = result->setUnicodeRange(descriptors.unicodeRange.isEmpty() ? ASCIILiteral("U+0-10FFFF") : descriptors.unicodeRange); >+ auto setUnicodeRangeResult = result->setUnicodeRange(descriptors.unicodeRange.isEmpty() ? "U+0-10FFFF"_s : descriptors.unicodeRange); > if (setUnicodeRangeResult.hasException()) > return setUnicodeRangeResult.releaseException(); >- auto setVariantResult = result->setVariant(descriptors.variant.isEmpty() ? ASCIILiteral("normal") : descriptors.variant); >+ auto setVariantResult = result->setVariant(descriptors.variant.isEmpty() ? "normal"_s : descriptors.variant); > if (setVariantResult.hasException()) > return setVariantResult.releaseException(); >- auto setFeatureSettingsResult = result->setFeatureSettings(descriptors.featureSettings.isEmpty() ? ASCIILiteral("normal") : descriptors.featureSettings); >+ auto setFeatureSettingsResult = result->setFeatureSettings(descriptors.featureSettings.isEmpty() ? "normal"_s : descriptors.featureSettings); > if (setFeatureSettingsResult.hasException()) > return setFeatureSettingsResult.releaseException(); >- auto setDisplayResult = result->setDisplay(descriptors.display.isEmpty() ? ASCIILiteral("auto") : descriptors.display); >+ auto setDisplayResult = result->setDisplay(descriptors.display.isEmpty() ? "auto"_s : descriptors.display); > if (setDisplayResult.hasException()) > return setDisplayResult.releaseException(); > >@@ -372,7 +372,7 @@ String FontFace::unicodeRange() const > { > m_backing->updateStyleIfNeeded(); > if (!m_backing->ranges().size()) >- return ASCIILiteral("U+0-10FFFF"); >+ return "U+0-10FFFF"_s; > RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated(); > for (auto& range : m_backing->ranges()) > values->append(CSSUnicodeRangeValue::create(range.from, range.to)); >@@ -389,7 +389,7 @@ String FontFace::featureSettings() const > { > m_backing->updateStyleIfNeeded(); > if (!m_backing->featureSettings().size()) >- return ASCIILiteral("normal"); >+ return "normal"_s; > RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); > for (auto& feature : m_backing->featureSettings()) > list->append(CSSFontFeatureValue::create(FontTag(feature.tag()), feature.value())); >diff --git a/Source/WebCore/css/MediaQuery.cpp b/Source/WebCore/css/MediaQuery.cpp >index 74c47044c62bbf13800ea33c91b9c8c52e8dbc0b..a649304b393d8073247f27c396b8c83d8a2f8f33 100644 >--- a/Source/WebCore/css/MediaQuery.cpp >+++ b/Source/WebCore/css/MediaQuery.cpp >@@ -39,7 +39,7 @@ String MediaQuery::serialize() const > { > if (m_ignored) { > // If query is invalid, serialized text should turn into "not all". >- return ASCIILiteral("not all"); >+ return "not all"_s; > } > > bool shouldOmitMediaType = false; >diff --git a/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp b/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp >index 0e14bdf8e223e82df3d0cc657a71e7e448e53b0a..e28b34c0d91e7785a47a78c8bc1309056ffa119c 100644 >--- a/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp >+++ b/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp >@@ -199,12 +199,12 @@ String PropertySetCSSStyleDeclaration::getPropertyValue(const String& propertyNa > String PropertySetCSSStyleDeclaration::getPropertyPriority(const String& propertyName) > { > if (isCustomPropertyName(propertyName)) >- return m_propertySet->customPropertyIsImportant(propertyName) ? ASCIILiteral("important") : emptyString(); >+ return m_propertySet->customPropertyIsImportant(propertyName) ? "important"_s : emptyString(); > > CSSPropertyID propertyID = cssPropertyID(propertyName); > if (!propertyID) > return String(); >- return m_propertySet->propertyIsImportant(propertyID) ? ASCIILiteral("important") : emptyString(); >+ return m_propertySet->propertyIsImportant(propertyID) ? "important"_s : emptyString(); > } > > String PropertySetCSSStyleDeclaration::getPropertyShorthand(const String& propertyName) >diff --git a/Source/WebCore/css/WebKitCSSMatrix.cpp b/Source/WebCore/css/WebKitCSSMatrix.cpp >index 7bde64d3a5c8af05b982d4e79b3864578d9c901b..1a88fea46640197dc5bf9718a4f20eb1a9a4b90a 100644 >--- a/Source/WebCore/css/WebKitCSSMatrix.cpp >+++ b/Source/WebCore/css/WebKitCSSMatrix.cpp >@@ -198,7 +198,7 @@ Ref<WebKitCSSMatrix> WebKitCSSMatrix::skewY(double angle) const > ExceptionOr<String> WebKitCSSMatrix::toString() const > { > if (!m_matrix.containsOnlyFiniteValues()) >- return Exception { InvalidStateError, ASCIILiteral("Matrix contains non-finite values") }; >+ return Exception { InvalidStateError, "Matrix contains non-finite values"_s }; > > StringBuilder builder; > if (m_matrix.isAffine()) { >diff --git a/Source/WebCore/css/parser/MediaQueryParser.cpp b/Source/WebCore/css/parser/MediaQueryParser.cpp >index 5d36f1b25f5d0ae6c2d8a024f085e52ff11157e3..a71de6d3a19bec1c58b0057113397f9c9a99d2b3 100644 >--- a/Source/WebCore/css/parser/MediaQueryParser.cpp >+++ b/Source/WebCore/css/parser/MediaQueryParser.cpp >@@ -140,7 +140,7 @@ void MediaQueryParser::commitMediaQuery() > { > // FIXME-NEWPARSER: Convoluted and awful, but we can't change the MediaQuerySet yet because of the > // old parser. >- static const NeverDestroyed<String> defaultMediaType = ASCIILiteral { "all" }; >+ static const NeverDestroyed<String> defaultMediaType { "all"_s }; > MediaQuery mediaQuery { m_mediaQueryData.restrictor(), m_mediaQueryData.mediaType().value_or(defaultMediaType), WTFMove(m_mediaQueryData.expressions()) }; > m_mediaQueryData.clear(); > m_querySet->addMediaQuery(WTFMove(mediaQuery)); >diff --git a/Source/WebCore/dom/CDATASection.cpp b/Source/WebCore/dom/CDATASection.cpp >index b443df6bbfcd37c8173867dffd1b6a020de156f0..754f48288fe196a3d282a296d878d2334d39784b 100644 >--- a/Source/WebCore/dom/CDATASection.cpp >+++ b/Source/WebCore/dom/CDATASection.cpp >@@ -41,7 +41,7 @@ Ref<CDATASection> CDATASection::create(Document& document, const String& data) > > String CDATASection::nodeName() const > { >- return ASCIILiteral("#cdata-section"); >+ return "#cdata-section"_s; > } > > Node::NodeType CDATASection::nodeType() const >diff --git a/Source/WebCore/dom/Comment.cpp b/Source/WebCore/dom/Comment.cpp >index ef0ae33cb5ce2afd8846eff25ead81a0c03e11a3..b56ad0f0aed07031a4b362234f1b28a5a65d349d 100644 >--- a/Source/WebCore/dom/Comment.cpp >+++ b/Source/WebCore/dom/Comment.cpp >@@ -41,7 +41,7 @@ Ref<Comment> Comment::create(Document& document, const String& text) > > String Comment::nodeName() const > { >- return ASCIILiteral("#comment"); >+ return "#comment"_s; > } > > Node::NodeType Comment::nodeType() const >diff --git a/Source/WebCore/dom/DOMException.cpp b/Source/WebCore/dom/DOMException.cpp >index c44a0a4906de027c7b52a3c9b2caa583d3331016..00ab749f3b8b1464dfe8fcbe0d7eb9cb7111677b 100644 >--- a/Source/WebCore/dom/DOMException.cpp >+++ b/Source/WebCore/dom/DOMException.cpp >@@ -36,38 +36,38 @@ namespace WebCore { > // This array needs to be kept in sync with the ExceptionCode enumeration. > // http://heycam.github.io/webidl/#idl-DOMException-error-names > static const DOMException::Description descriptions[] = { >- { "IndexSizeError", "The index is not in the allowed range.", 1 }, >- { "HierarchyRequestError", "The operation would yield an incorrect node tree.", 3 }, >- { "WrongDocumentError", "The object is in the wrong document.", 4 }, >- { "InvalidCharacterError", "The string contains invalid characters.", 5 }, >- { "NoModificationAllowedError", "The object can not be modified.", 7 }, >- { "NotFoundError", "The object can not be found here.", 8 }, >- { "NotSupportedError", "The operation is not supported.", 9 }, >- { "InUseAttributeError", "The attribute is in use.", 10 }, >- { "InvalidStateError", "The object is in an invalid state.", 11 }, >- { "SyntaxError", "The string did not match the expected pattern.", 12 }, >- { "InvalidModificationError", " The object can not be modified in this way.", 13 }, >- { "NamespaceError", "The operation is not allowed by Namespaces in XML.", 14 }, >- { "InvalidAccessError", "The object does not support the operation or argument.", 15 }, >- { "TypeMismatchError", "The type of an object was incompatible with the expected type of the parameter associated to the object.", 17 }, >- { "SecurityError", "The operation is insecure.", 18 }, >- { "NetworkError", " A network error occurred.", 19 }, >- { "AbortError", "The operation was aborted.", 20 }, >- { "URLMismatchError", "The given URL does not match another URL.", 21 }, >- { "QuotaExceededError", "The quota has been exceeded.", 22 }, >- { "TimeoutError", "The operation timed out.", 23 }, >- { "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation.", 24 }, >- { "DataCloneError", "The object can not be cloned.", 25 }, >- { "EncodingError", "The encoding operation (either encoded or decoding) failed.", 0 }, >- { "NotReadableError", "The I/O read operation failed.", 0 }, >- { "UnknownError", "The operation failed for an unknown transient reason (e.g. out of memory).", 0 }, >- { "ConstraintError", "A mutation operation in a transaction failed because a constraint was not satisfied.", 0 }, >- { "DataError", "Provided data is inadequate.", 0 }, >- { "TransactionInactiveError", "A request was placed against a transaction which is currently not active, or which is finished.", 0 }, >- { "ReadOnlyError", "The mutating operation was attempted in a \"readonly\" transaction.", 0 }, >- { "VersionError", "An attempt was made to open a database using a lower version than the existing version.", 0 }, >- { "OperationError", "The operation failed for an operation-specific reason.", 0 }, >- { "NotAllowedError", "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", 0 } >+ { "IndexSizeError"_s, "The index is not in the allowed range."_s, 1 }, >+ { "HierarchyRequestError"_s, "The operation would yield an incorrect node tree."_s, 3 }, >+ { "WrongDocumentError"_s, "The object is in the wrong document."_s, 4 }, >+ { "InvalidCharacterError"_s, "The string contains invalid characters."_s, 5 }, >+ { "NoModificationAllowedError"_s, "The object can not be modified."_s, 7 }, >+ { "NotFoundError"_s, "The object can not be found here."_s, 8 }, >+ { "NotSupportedError"_s, "The operation is not supported."_s, 9 }, >+ { "InUseAttributeError"_s, "The attribute is in use."_s, 10 }, >+ { "InvalidStateError"_s, "The object is in an invalid state."_s, 11 }, >+ { "SyntaxError"_s, "The string did not match the expected pattern."_s, 12 }, >+ { "InvalidModificationError"_s, " The object can not be modified in this way."_s, 13 }, >+ { "NamespaceError"_s, "The operation is not allowed by Namespaces in XML."_s, 14 }, >+ { "InvalidAccessError"_s, "The object does not support the operation or argument."_s, 15 }, >+ { "TypeMismatchError"_s, "The type of an object was incompatible with the expected type of the parameter associated to the object."_s, 17 }, >+ { "SecurityError"_s, "The operation is insecure."_s, 18 }, >+ { "NetworkError"_s, " A network error occurred."_s, 19 }, >+ { "AbortError"_s, "The operation was aborted."_s, 20 }, >+ { "URLMismatchError"_s, "The given URL does not match another URL."_s, 21 }, >+ { "QuotaExceededError"_s, "The quota has been exceeded."_s, 22 }, >+ { "TimeoutError"_s, "The operation timed out."_s, 23 }, >+ { "InvalidNodeTypeError"_s, "The supplied node is incorrect or has an incorrect ancestor for this operation."_s, 24 }, >+ { "DataCloneError"_s, "The object can not be cloned."_s, 25 }, >+ { "EncodingError"_s, "The encoding operation (either encoded or decoding) failed."_s, 0 }, >+ { "NotReadableError"_s, "The I/O read operation failed."_s, 0 }, >+ { "UnknownError"_s, "The operation failed for an unknown transient reason (e.g. out of memory)."_s, 0 }, >+ { "ConstraintError"_s, "A mutation operation in a transaction failed because a constraint was not satisfied."_s, 0 }, >+ { "DataError"_s, "Provided data is inadequate."_s, 0 }, >+ { "TransactionInactiveError"_s, "A request was placed against a transaction which is currently not active, or which is finished."_s, 0 }, >+ { "ReadOnlyError"_s, "The mutating operation was attempted in a \"readonly\" transaction."_s, 0 }, >+ { "VersionError"_s, "An attempt was made to open a database using a lower version than the existing version."_s, 0 }, >+ { "OperationError"_s, "The operation failed for an operation-specific reason."_s, 0 }, >+ { "NotAllowedError"_s, "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."_s, 0 } > }; > static_assert(!IndexSizeError, "This table needs to be kept in sync with DOMException names in ExceptionCode enumeration"); > static_assert(NotAllowedError == WTF_ARRAY_LENGTH(descriptions) - 1, "This table needs to be kept in sync with DOMException names in ExceptionCode enumeration"); >@@ -77,7 +77,7 @@ auto DOMException::description(ExceptionCode ec) -> const Description& > if (ec < WTF_ARRAY_LENGTH(descriptions)) > return descriptions[ec]; > >- static const Description emptyDescription { nullptr, nullptr, 0 }; >+ static const Description emptyDescription { ASCIILiteral::null(), ASCIILiteral::null(), 0 }; > return emptyDescription; > } > >@@ -93,7 +93,7 @@ static DOMException::LegacyCode legacyCodeFromName(const String& name) > Ref<DOMException> DOMException::create(ExceptionCode ec, const String& message) > { > auto& description = DOMException::description(ec); >- return adoptRef(*new DOMException(description.legacyCode, description.name, !message.isEmpty() ? message : ASCIILiteral(description.message))); >+ return adoptRef(*new DOMException(description.legacyCode, description.name, !message.isEmpty() ? message : description.message)); > } > > Ref<DOMException> DOMException::create(const String& message, const String& name) >diff --git a/Source/WebCore/dom/DOMException.h b/Source/WebCore/dom/DOMException.h >index 2c77070c2af73e7051598cc6bd4c86f6a5328014..8a32fcc2a481e2c41b6838a97e5b09af449c55fc 100644 >--- a/Source/WebCore/dom/DOMException.h >+++ b/Source/WebCore/dom/DOMException.h >@@ -50,15 +50,15 @@ class DOMException : public RefCounted<DOMException> { > String message() const { return m_message; } > > struct Description { >- const char* const name; >- const char* const message; >+ const ASCIILiteral name; >+ const ASCIILiteral message; > LegacyCode legacyCode; > }; > > WEBCORE_EXPORT static const Description& description(ExceptionCode); > >- static ASCIILiteral name(ExceptionCode ec) { return ASCIILiteral(description(ec).name); } >- static ASCIILiteral message(ExceptionCode ec) { return ASCIILiteral(description(ec).message); } >+ static ASCIILiteral name(ExceptionCode ec) { return description(ec).name; } >+ static ASCIILiteral message(ExceptionCode ec) { return description(ec).message; } > > private: > DOMException(LegacyCode, const String& name, const String& message); >diff --git a/Source/WebCore/dom/DOMImplementation.cpp b/Source/WebCore/dom/DOMImplementation.cpp >index f5b80747f030ea08d0105726ea865f5a3156ce33..a9832c820fb25a71a7008a0823a1623f4550455d 100644 >--- a/Source/WebCore/dom/DOMImplementation.cpp >+++ b/Source/WebCore/dom/DOMImplementation.cpp >@@ -119,7 +119,7 @@ Ref<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title) > { > auto document = HTMLDocument::create(nullptr, URL()); > document->open(); >- document->write(nullptr, { ASCIILiteral("<!doctype html><html><head></head><body></body></html>") }); >+ document->write(nullptr, { "<!doctype html><html><head></head><body></body></html>"_s }); > if (!title.isNull()) { > auto titleElement = HTMLTitleElement::create(titleTag, document); > titleElement->appendChild(document->createTextNode(title)); >diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp >index 769e51ec3a8faef5890c2dbe2edcf8ac2f78a6d2..2b91748a5b480896656877d56b320ad6131159b2 100644 >--- a/Source/WebCore/dom/DataTransfer.cpp >+++ b/Source/WebCore/dom/DataTransfer.cpp >@@ -72,8 +72,8 @@ DataTransfer::DataTransfer(StoreMode mode, std::unique_ptr<Pasteboard> pasteboar > , m_pasteboard(WTFMove(pasteboard)) > #if ENABLE(DRAG_SUPPORT) > , m_type(type) >- , m_dropEffect(ASCIILiteral("uninitialized")) >- , m_effectAllowed(ASCIILiteral("uninitialized")) >+ , m_dropEffect("uninitialized"_s) >+ , m_effectAllowed("uninitialized"_s) > , m_shouldUpdateDragImage(false) > #endif > { >@@ -305,7 +305,7 @@ Vector<String> DataTransfer::types(AddFilesType addFilesType) const > if (hasFileBackedItem || fileContentState != Pasteboard::FileContentState::NoFileOrImageData) { > Vector<String> types; > if (addFilesType == AddFilesType::Yes) >- types.append(ASCIILiteral("Files")); >+ types.append("Files"_s); > > if (fileContentState != Pasteboard::FileContentState::MayContainFilePaths) { > types.appendVector(WTFMove(safeTypes)); >@@ -313,9 +313,9 @@ Vector<String> DataTransfer::types(AddFilesType addFilesType) const > } > > if (safeTypes.contains("text/uri-list")) >- types.append(ASCIILiteral("text/uri-list")); >+ types.append("text/uri-list"_s); > if (safeTypes.contains("text/html") && RuntimeEnabledFeatures::sharedFeatures().customPasteboardDataEnabled()) >- types.append(ASCIILiteral("text/html")); >+ types.append("text/html"_s); > return types; > } > >@@ -396,8 +396,8 @@ bool DataTransfer::hasStringOfType(const String& type) > Ref<DataTransfer> DataTransfer::createForInputEvent(const String& plainText, const String& htmlText) > { > auto pasteboard = std::make_unique<StaticPasteboard>(); >- pasteboard->writeString(ASCIILiteral("text/plain"), plainText); >- pasteboard->writeString(ASCIILiteral("text/html"), htmlText); >+ pasteboard->writeString("text/plain"_s, plainText); >+ pasteboard->writeString("text/html"_s, htmlText); > return adoptRef(*new DataTransfer(StoreMode::Readonly, WTFMove(pasteboard), Type::InputEvent)); > } > >@@ -421,7 +421,7 @@ void DataTransfer::commitToPasteboard(Pasteboard& nativePasteboard) > > String DataTransfer::dropEffect() const > { >- return ASCIILiteral("none"); >+ return "none"_s; > } > > void DataTransfer::setDropEffect(const String&) >@@ -430,7 +430,7 @@ void DataTransfer::setDropEffect(const String&) > > String DataTransfer::effectAllowed() const > { >- return ASCIILiteral("uninitialized"); >+ return "uninitialized"_s; > } > > void DataTransfer::setEffectAllowed(const String&) >@@ -641,7 +641,7 @@ void DataTransfer::setDestinationOperation(DragOperation operation) > > String DataTransfer::dropEffect() const > { >- return m_dropEffect == "uninitialized" ? ASCIILiteral("none") : m_dropEffect; >+ return m_dropEffect == "uninitialized" ? "none"_s : m_dropEffect; > } > > void DataTransfer::setDropEffect(const String& effect) >diff --git a/Source/WebCore/dom/DataTransferItem.cpp b/Source/WebCore/dom/DataTransferItem.cpp >index 42b0731fa99ffb1c95d49428b6db673cf588e73e..a3ecc5a5c9e0f30d76032817f0d4639633ff1a8b 100644 >--- a/Source/WebCore/dom/DataTransferItem.cpp >+++ b/Source/WebCore/dom/DataTransferItem.cpp >@@ -76,7 +76,7 @@ void DataTransferItem::clearListAndPutIntoDisabledMode() > > String DataTransferItem::kind() const > { >- return m_file ? ASCIILiteral("file") : ASCIILiteral("string"); >+ return m_file ? "file"_s : "string"_s; > } > > String DataTransferItem::type() const >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 36ddf004c5ea01255b93efea98e1054e9fc8454a..40a91b481b32bf6dcf06608945f1486525cc4672 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -498,7 +498,7 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig > #if ENABLE(XSLT) > , m_applyPendingXSLTransformsTimer(*this, &Document::applyPendingXSLTransformsTimerFired) > #endif >- , m_xmlVersion(ASCIILiteral("1.0")) >+ , m_xmlVersion("1.0"_s) > , m_constantPropertyMap(std::make_unique<ConstantPropertyMap>(*this)) > , m_documentClasses(documentClasses) > , m_eventQueue(*this) >@@ -1373,13 +1373,13 @@ void Document::setContent(const String& content) > String Document::suggestedMIMEType() const > { > if (isXHTMLDocument()) >- return ASCIILiteral("application/xhtml+xml"); >+ return "application/xhtml+xml"_s; > if (isSVGDocument()) >- return ASCIILiteral("image/svg+xml"); >+ return "image/svg+xml"_s; > if (xmlStandalone()) >- return ASCIILiteral("text/xml"); >+ return "text/xml"_s; > if (isHTMLDocument()) >- return ASCIILiteral("text/html"); >+ return "text/html"_s; > if (DocumentLoader* loader = this->loader()) > return loader->responseMIMEType(); > return String(); >@@ -1402,7 +1402,7 @@ String Document::contentType() const > if (!mimeType.isNull()) > return mimeType; > >- return ASCIILiteral("application/xml"); >+ return "application/xml"_s; > } > > RefPtr<Range> Document::caretRangeFromPoint(int x, int y) >@@ -1674,7 +1674,7 @@ void Document::allowsMediaDocumentInlinePlaybackChanged() > > String Document::nodeName() const > { >- return ASCIILiteral("#document"); >+ return "#document"_s; > } > > Node::NodeType Document::nodeType() const >@@ -2995,7 +2995,7 @@ ExceptionOr<void> Document::writeln(Document* responsibleDocument, Vector<String > for (auto& string : strings) > text.append(WTFMove(string)); > >- text.append(ASCIILiteral { "\n" }); >+ text.append("\n"_s); > write(responsibleDocument, WTFMove(text)); > > return { }; >@@ -3189,7 +3189,7 @@ bool Document::canNavigate(Frame* targetFrame) > auto destinationCrossOriginWindowPolicy = targetFrame->window() ? targetFrame->window()->crossOriginWindowPolicy() : CrossOriginWindowPolicy::Allow; > if (sourceCrossOriginWindowPolicy != CrossOriginWindowPolicy::Allow || destinationCrossOriginWindowPolicy != CrossOriginWindowPolicy::Allow) { > if (m_frame->document() && targetFrame->document() && !m_frame->document()->securityOrigin().canAccess(targetFrame->document()->securityOrigin())) { >- printNavigationErrorMessage(targetFrame, url(), ASCIILiteral("Navigation was not allowed due to Cross-Origin-Window-Policy header.")); >+ printNavigationErrorMessage(targetFrame, url(), "Navigation was not allowed due to Cross-Origin-Window-Policy header."_s); > return false; > } > } >@@ -3213,7 +3213,7 @@ bool Document::canNavigate(Frame* targetFrame) > // 1. If A is not the same browsing context as B, and A is not one of the ancestor browsing contexts of B, and B is not a top-level browsing context, and A's active document's active sandboxing > // flag set has its sandboxed navigation browsing context flag set, then abort these steps negatively. > if (m_frame != targetFrame && isSandboxed(SandboxNavigation) && targetFrame->tree().parent() && !targetFrame->tree().isDescendantOf(m_frame)) { >- printNavigationErrorMessage(targetFrame, url(), ASCIILiteral("The frame attempting navigation is sandboxed, and is therefore disallowed from navigating its ancestors.")); >+ printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation is sandboxed, and is therefore disallowed from navigating its ancestors."_s); > return false; > } > >@@ -3222,12 +3222,12 @@ bool Document::canNavigate(Frame* targetFrame) > bool triggeredByUserActivation = UserGestureIndicator::processingUserGesture(); > // 1. If this algorithm is triggered by user activation and A's active document's active sandboxing flag set has its sandboxed top-level navigation with user activation browsing context flag set, then abort these steps negatively. > if (triggeredByUserActivation && isSandboxed(SandboxTopNavigationByUserActivation)) { >- printNavigationErrorMessage(targetFrame, url(), ASCIILiteral("The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation-by-user-activation' flag is not set and navigation is not triggered by user activation.")); >+ printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation-by-user-activation' flag is not set and navigation is not triggered by user activation."_s); > return false; > } > // 2. Otherwise, If this algorithm is not triggered by user activation and A's active document's active sandboxing flag set has its sandboxed top-level navigation without user activation browsing context flag set, then abort these steps negatively. > if (!triggeredByUserActivation && isSandboxed(SandboxTopNavigation)) { >- printNavigationErrorMessage(targetFrame, url(), ASCIILiteral("The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set.")); >+ printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set."_s); > return false; > } > } >@@ -3235,7 +3235,7 @@ bool Document::canNavigate(Frame* targetFrame) > // 3. Otherwise, if B is a top-level browsing context, and is neither A nor one of the ancestor browsing contexts of A, and A's Document's active sandboxing flag set has its > // sandboxed navigation browsing context flag set, and A is not the one permitted sandboxed navigator of B, then abort these steps negatively. > if (!targetFrame->tree().parent() && m_frame != targetFrame && targetFrame != &m_frame->tree().top() && isSandboxed(SandboxNavigation) && targetFrame->loader().opener() != m_frame) { >- printNavigationErrorMessage(targetFrame, url(), ASCIILiteral("The frame attempting navigation is sandboxed, and is not allowed to navigate this popup.")); >+ printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation is sandboxed, and is not allowed to navigate this popup."_s); > return false; > } > >@@ -5236,7 +5236,7 @@ void Document::setDesignMode(InheritedBool value) > > String Document::designMode() const > { >- return inDesignMode() ? ASCIILiteral("on") : ASCIILiteral("off"); >+ return inDesignMode() ? "on"_s : "off"_s; > } > > void Document::setDesignMode(const String& value) >@@ -6043,7 +6043,7 @@ void Document::requestFullScreenForElement(Element* element, FullScreenCheckType > // We do not allow pressing the Escape key as a user gesture to enter fullscreen since this is the key > // to exit fullscreen. > if (UserGestureIndicator::currentUserGesture()->gestureType() == UserGestureType::EscapeKey) { >- addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("The Escape key may not be used as a user gesture to enter fullscreen")); >+ addConsoleMessage(MessageSource::Security, MessageLevel::Error, "The Escape key may not be used as a user gesture to enter fullscreen"_s); > break; > } > >diff --git a/Source/WebCore/dom/DocumentFragment.cpp b/Source/WebCore/dom/DocumentFragment.cpp >index 12cd2e96eb3f5fc7384b1fbb9d86b5f930458238..a6db28a3e762cd14e60ee892387fa15461b7396a 100644 >--- a/Source/WebCore/dom/DocumentFragment.cpp >+++ b/Source/WebCore/dom/DocumentFragment.cpp >@@ -46,7 +46,7 @@ Ref<DocumentFragment> DocumentFragment::create(Document& document) > > String DocumentFragment::nodeName() const > { >- return ASCIILiteral("#document-fragment"); >+ return "#document-fragment"_s; > } > > Node::NodeType DocumentFragment::nodeType() const >diff --git a/Source/WebCore/dom/InlineStyleSheetOwner.cpp b/Source/WebCore/dom/InlineStyleSheetOwner.cpp >index dab24276523235b0610a5effbf4df9ed45a99d73..8eec26a9d544e13846d8a4043965fcd705e20470 100644 >--- a/Source/WebCore/dom/InlineStyleSheetOwner.cpp >+++ b/Source/WebCore/dom/InlineStyleSheetOwner.cpp >@@ -174,8 +174,8 @@ void InlineStyleSheetOwner::createSheet(Element& element, const String& text) > > RefPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(m_media, MediaQueryParserContext(document)); > >- MediaQueryEvaluator screenEval(ASCIILiteral("screen"), true); >- MediaQueryEvaluator printEval(ASCIILiteral("print"), true); >+ MediaQueryEvaluator screenEval("screen"_s, true); >+ MediaQueryEvaluator printEval("print"_s, true); > LOG(MediaQueries, "InlineStyleSheetOwner::createSheet evaluating queries"); > if (!screenEval.evaluate(*mediaQueries) && !printEval.evaluate(*mediaQueries)) > return; >diff --git a/Source/WebCore/dom/MouseEvent.cpp b/Source/WebCore/dom/MouseEvent.cpp >index c896f8631a3d2bbda19306210feddb8986e4ca62..05c14513f4c4122953ca0266346fcc38cb37fae2 100644 >--- a/Source/WebCore/dom/MouseEvent.cpp >+++ b/Source/WebCore/dom/MouseEvent.cpp >@@ -161,7 +161,7 @@ void MouseEvent::initMouseEventQuirk(ExecState& state, ScriptExecutionContext& s > // jsEventTargetCast() does not throw and will silently convert bad input to nullptr. > auto jsRelatedTarget = jsEventTargetCast(state.vm(), relatedTargetValue); > if (!jsRelatedTarget && !relatedTargetValue.isUndefinedOrNull()) >- scriptExecutionContext.addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Calling initMouseEvent() with a relatedTarget that is not an EventTarget is deprecated.")); >+ scriptExecutionContext.addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Calling initMouseEvent() with a relatedTarget that is not an EventTarget is deprecated."_s); > relatedTarget = jsRelatedTarget ? &jsRelatedTarget->wrapped() : nullptr; > } else { > #else >diff --git a/Source/WebCore/dom/ScriptElement.cpp b/Source/WebCore/dom/ScriptElement.cpp >index b37ba4d10835f1c57d3c890a29a03281a3f6492f..a1d41cc86568ae45af057e3c4f7309adaa91cf77 100644 >--- a/Source/WebCore/dom/ScriptElement.cpp >+++ b/Source/WebCore/dom/ScriptElement.cpp >@@ -308,7 +308,7 @@ bool ScriptElement::requestModuleScript(const TextPosition& scriptStartPosition) > String nonce = m_element.attributeWithoutSynchronization(HTMLNames::nonceAttr); > String crossOriginMode = m_element.attributeWithoutSynchronization(HTMLNames::crossoriginAttr); > if (crossOriginMode.isNull()) >- crossOriginMode = ASCIILiteral("omit"); >+ crossOriginMode = "omit"_s; > > if (hasSourceAttribute()) { > String sourceURL = sourceAttributeValue(); >diff --git a/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp b/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp >index 489ab832d3ad49c2d7728a231c99832936631683..843da203123c1283c089b396bb62b9ae4bd36c6b 100644 >--- a/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp >+++ b/Source/WebCore/dom/ScriptElementCachedScriptFetcher.cpp >@@ -36,7 +36,7 @@ CachedResourceHandle<CachedScript> ScriptElementCachedScriptFetcher::requestModu > // https://github.com/tc39/proposal-dynamic-import/blob/master/HTML Integration.md > // If the fetcher is not module script, credential mode is always "omit". > >- return requestScriptWithCache(document, sourceURL, isClassicScript() ? ASCIILiteral("omit") : m_crossOriginMode, WTFMove(integrity)); >+ return requestScriptWithCache(document, sourceURL, isClassicScript() ? "omit"_s : m_crossOriginMode, WTFMove(integrity)); > } > > } >diff --git a/Source/WebCore/dom/ScriptExecutionContext.cpp b/Source/WebCore/dom/ScriptExecutionContext.cpp >index c0c26f6e7478f8b55bfa332ba964985ba668618c..2b780ecc7a78d76ae1bc3ad8858812357358fd8c 100644 >--- a/Source/WebCore/dom/ScriptExecutionContext.cpp >+++ b/Source/WebCore/dom/ScriptExecutionContext.cpp >@@ -457,7 +457,7 @@ bool ScriptExecutionContext::dispatchErrorEvent(const String& errorMessage, int > if (canIncludeErrorDetails(cachedScript, sourceURL)) > errorEvent = ErrorEvent::create(errorMessage, sourceURL, lineNumber, columnNumber, { vm(), exception ? exception->value() : JSC::jsNull() }); > else >- errorEvent = ErrorEvent::create(ASCIILiteral { "Script error." }, { }, 0, 0, { }); >+ errorEvent = ErrorEvent::create("Script error."_s, { }, 0, 0, { }); > > ASSERT(!m_inDispatchErrorEvent); > m_inDispatchErrorEvent = true; >diff --git a/Source/WebCore/dom/ScriptedAnimationController.cpp b/Source/WebCore/dom/ScriptedAnimationController.cpp >index c4d85d83494deadf88f01d4a5c71c17bde9f6484..5c843c342c9af3e23742b754b17c4cae4c47ace3 100644 >--- a/Source/WebCore/dom/ScriptedAnimationController.cpp >+++ b/Source/WebCore/dom/ScriptedAnimationController.cpp >@@ -104,7 +104,7 @@ static const char* throttlingReasonToString(ScriptedAnimationController::Throttl > static String throttlingReasonsToString(OptionSet<ScriptedAnimationController::ThrottlingReason> reasons) > { > if (reasons.isEmpty()) >- return ASCIILiteral("[Unthrottled]"); >+ return "[Unthrottled]"_s; > > StringBuilder builder; > for (auto reason : reasons) { >diff --git a/Source/WebCore/dom/Text.cpp b/Source/WebCore/dom/Text.cpp >index 7315d16928152c4f03d094aec96509f69f202050..50f292b07f475e2608aecb78c2ba5016a443ad7b 100644 >--- a/Source/WebCore/dom/Text.cpp >+++ b/Source/WebCore/dom/Text.cpp >@@ -153,7 +153,7 @@ RefPtr<Text> Text::replaceWholeText(const String& newText) > > String Text::nodeName() const > { >- return ASCIILiteral("#text"); >+ return "#text"_s; > } > > Node::NodeType Text::nodeType() const >diff --git a/Source/WebCore/dom/TextEncoder.cpp b/Source/WebCore/dom/TextEncoder.cpp >index 24e2d0c60821d8b6bd8802e54a7261a25221e1b8..9eeb77945ae9214fdb800c0be0ca390585354fb5 100644 >--- a/Source/WebCore/dom/TextEncoder.cpp >+++ b/Source/WebCore/dom/TextEncoder.cpp >@@ -33,7 +33,7 @@ namespace WebCore { > > String TextEncoder::encoding() const > { >- return ASCIILiteral("utf-8"); >+ return "utf-8"_s; > } > > RefPtr<Uint8Array> TextEncoder::encode(String&& input) const >diff --git a/Source/WebCore/dom/Traversal.cpp b/Source/WebCore/dom/Traversal.cpp >index fdf70c9d7293397401cfafc9b2ee0eea11230098..17cfa50aa92384a90d5d4bfb33e2faf30112b4bb 100644 >--- a/Source/WebCore/dom/Traversal.cpp >+++ b/Source/WebCore/dom/Traversal.cpp >@@ -43,7 +43,7 @@ NodeIteratorBase::NodeIteratorBase(Node& rootNode, unsigned whatToShow, RefPtr<N > ExceptionOr<unsigned short> NodeIteratorBase::acceptNode(Node& node) > { > if (m_isActive) >- return Exception { InvalidStateError, ASCIILiteral("Recursive filters are not allowed") }; >+ return Exception { InvalidStateError, "Recursive filters are not allowed"_s }; > > // The bit twiddling here is done to map DOM node types, which are given as integers from > // 1 through 14, to whatToShow bit masks. >diff --git a/Source/WebCore/editing/EditCommand.cpp b/Source/WebCore/editing/EditCommand.cpp >index 92d8ec13c4be2d19a693881c3c9a4e0994047264..db1f40845096b1a92444956cbf6bddf811b30b16 100644 >--- a/Source/WebCore/editing/EditCommand.cpp >+++ b/Source/WebCore/editing/EditCommand.cpp >@@ -43,75 +43,75 @@ String inputTypeNameForEditingAction(EditAction action) > { > switch (action) { > case EditActionJustify: >- return ASCIILiteral("formatJustifyFull"); >+ return "formatJustifyFull"_s; > case EditActionAlignLeft: >- return ASCIILiteral("formatJustifyLeft"); >+ return "formatJustifyLeft"_s; > case EditActionAlignRight: >- return ASCIILiteral("formatJustifyRight"); >+ return "formatJustifyRight"_s; > case EditActionCenter: >- return ASCIILiteral("formatJustifyCenter"); >+ return "formatJustifyCenter"_s; > case EditActionSubscript: >- return ASCIILiteral("formatSubscript"); >+ return "formatSubscript"_s; > case EditActionSuperscript: >- return ASCIILiteral("formatSuperscript"); >+ return "formatSuperscript"_s; > case EditActionUnderline: >- return ASCIILiteral("formatUnderline"); >+ return "formatUnderline"_s; > case EditActionSetColor: >- return ASCIILiteral("formatFontColor"); >+ return "formatFontColor"_s; > case EditActionDeleteByDrag: >- return ASCIILiteral("deleteByDrag"); >+ return "deleteByDrag"_s; > case EditActionCut: >- return ASCIILiteral("deleteByCut"); >+ return "deleteByCut"_s; > case EditActionBold: >- return ASCIILiteral("formatBold"); >+ return "formatBold"_s; > case EditActionItalics: >- return ASCIILiteral("formatItalic"); >+ return "formatItalic"_s; > case EditActionPaste: >- return ASCIILiteral("insertFromPaste"); >+ return "insertFromPaste"_s; > case EditActionDelete: > case EditActionTypingDeleteSelection: >- return ASCIILiteral("deleteContent"); >+ return "deleteContent"_s; > case EditActionTypingDeleteBackward: >- return ASCIILiteral("deleteContentBackward"); >+ return "deleteContentBackward"_s; > case EditActionTypingDeleteForward: >- return ASCIILiteral("deleteContentForward"); >+ return "deleteContentForward"_s; > case EditActionTypingDeleteWordBackward: >- return ASCIILiteral("deleteWordBackward"); >+ return "deleteWordBackward"_s; > case EditActionTypingDeleteWordForward: >- return ASCIILiteral("deleteWordForward"); >+ return "deleteWordForward"_s; > case EditActionTypingDeleteLineBackward: >- return ASCIILiteral("deleteHardLineBackward"); >+ return "deleteHardLineBackward"_s; > case EditActionTypingDeleteLineForward: >- return ASCIILiteral("deleteHardLineForward"); >+ return "deleteHardLineForward"_s; > case EditActionTypingDeletePendingComposition: >- return ASCIILiteral("deleteCompositionText"); >+ return "deleteCompositionText"_s; > case EditActionTypingDeleteFinalComposition: >- return ASCIILiteral("deleteByComposition"); >+ return "deleteByComposition"_s; > case EditActionInsert: > case EditActionTypingInsertText: >- return ASCIILiteral("insertText"); >+ return "insertText"_s; > case EditActionInsertReplacement: >- return ASCIILiteral("insertReplacementText"); >+ return "insertReplacementText"_s; > case EditActionInsertFromDrop: >- return ASCIILiteral("insertFromDrop"); >+ return "insertFromDrop"_s; > case EditActionTypingInsertLineBreak: >- return ASCIILiteral("insertLineBreak"); >+ return "insertLineBreak"_s; > case EditActionTypingInsertParagraph: >- return ASCIILiteral("insertParagraph"); >+ return "insertParagraph"_s; > case EditActionInsertOrderedList: >- return ASCIILiteral("insertOrderedList"); >+ return "insertOrderedList"_s; > case EditActionInsertUnorderedList: >- return ASCIILiteral("insertUnorderedList"); >+ return "insertUnorderedList"_s; > case EditActionTypingInsertPendingComposition: >- return ASCIILiteral("insertCompositionText"); >+ return "insertCompositionText"_s; > case EditActionTypingInsertFinalComposition: >- return ASCIILiteral("insertFromComposition"); >+ return "insertFromComposition"_s; > case EditActionIndent: >- return ASCIILiteral("formatIndent"); >+ return "formatIndent"_s; > case EditActionOutdent: >- return ASCIILiteral("formatOutdent"); >+ return "formatOutdent"_s; > case EditActionSetWritingDirection: >- return ASCIILiteral("formatSetInlineTextDirection"); >+ return "formatSetInlineTextDirection"_s; > default: > return emptyString(); > } >diff --git a/Source/WebCore/editing/Editing.cpp b/Source/WebCore/editing/Editing.cpp >index 938d5679ae4e8798aaf20d90f71eec3d090bfc28..9d8be792f0b534702d9a1bd32eed7c55f3ff40ff 100644 >--- a/Source/WebCore/editing/Editing.cpp >+++ b/Source/WebCore/editing/Editing.cpp >@@ -927,7 +927,7 @@ Ref<Element> createTabSpanElement(Document& document, const String& tabText) > > Ref<Element> createTabSpanElement(Document& document) > { >- return createTabSpanElement(document, document.createEditingTextNode(ASCIILiteral("\t"))); >+ return createTabSpanElement(document, document.createEditingTextNode("\t"_s)); > } > > bool isNodeRendered(const Node& node) >diff --git a/Source/WebCore/editing/Editor.cpp b/Source/WebCore/editing/Editor.cpp >index 8002e2bff04b1e9f481350e732306b569c5945b7..0c7163285340aa5144432ea62640583209c680d7 100644 >--- a/Source/WebCore/editing/Editor.cpp >+++ b/Source/WebCore/editing/Editor.cpp >@@ -360,7 +360,7 @@ static Ref<DataTransfer> createDataTransferForClipboardEvent(Document& document, > return DataTransfer::createForCopyAndPaste(document, DataTransfer::StoreMode::ReadWrite, std::make_unique<StaticPasteboard>()); > case ClipboardEventKind::PasteAsPlainText: > if (RuntimeEnabledFeatures::sharedFeatures().customPasteboardDataEnabled()) { >- auto plainTextType = ASCIILiteral("text/plain"); >+ auto plainTextType = "text/plain"_s; > auto plainText = Pasteboard::createForCopyAndPaste()->readString(plainTextType); > auto pasteboard = std::make_unique<StaticPasteboard>(); > pasteboard->writeString(plainTextType, plainText); >diff --git a/Source/WebCore/editing/EditorCommand.cpp b/Source/WebCore/editing/EditorCommand.cpp >index 6f1bc9ff79b0d278d89251669bbc0e29ae4b4cf0..8a5021f9bb1a8d2db990a67c89f1169404c7302a 100644 >--- a/Source/WebCore/editing/EditorCommand.cpp >+++ b/Source/WebCore/editing/EditorCommand.cpp >@@ -452,7 +452,7 @@ static bool executeIndent(Frame& frame, Event*, EditorCommandSource, const Strin > > static bool executeInsertBacktab(Frame& frame, Event* event, EditorCommandSource, const String&) > { >- return targetFrame(frame, event)->eventHandler().handleTextInputEvent(ASCIILiteral("\t"), event, TextEventInputBackTab); >+ return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\t"_s, event, TextEventInputBackTab); > } > > static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSource, const String& value) >@@ -480,7 +480,7 @@ static bool executeInsertLineBreak(Frame& frame, Event* event, EditorCommandSour > { > switch (source) { > case CommandFromMenuOrKeyBinding: >- return targetFrame(frame, event)->eventHandler().handleTextInputEvent(ASCIILiteral("\n"), event, TextEventInputLineBreak); >+ return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\n"_s, event, TextEventInputLineBreak); > case CommandFromDOM: > case CommandFromDOMWithUserInterface: > // Doesn't scroll to make the selection visible, or modify the kill ring. >@@ -496,7 +496,7 @@ static bool executeInsertLineBreak(Frame& frame, Event* event, EditorCommandSour > static bool executeInsertNewline(Frame& frame, Event* event, EditorCommandSource, const String&) > { > Frame* targetFrame = WebCore::targetFrame(frame, event); >- return targetFrame->eventHandler().handleTextInputEvent(ASCIILiteral("\n"), event, targetFrame->editor().canEditRichly() ? TextEventInputKeyboard : TextEventInputLineBreak); >+ return targetFrame->eventHandler().handleTextInputEvent("\n"_s, event, targetFrame->editor().canEditRichly() ? TextEventInputKeyboard : TextEventInputLineBreak); > } > > static bool executeInsertNewlineInQuotedContent(Frame& frame, Event*, EditorCommandSource, const String&) >@@ -520,7 +520,7 @@ static bool executeInsertParagraph(Frame& frame, Event*, EditorCommandSource, co > > static bool executeInsertTab(Frame& frame, Event* event, EditorCommandSource, const String&) > { >- return targetFrame(frame, event)->eventHandler().handleTextInputEvent(ASCIILiteral("\t"), event); >+ return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\t"_s, event); > } > > static bool executeInsertText(Frame& frame, Event*, EditorCommandSource, const String& value) >@@ -538,22 +538,22 @@ static bool executeInsertUnorderedList(Frame& frame, Event*, EditorCommandSource > > static bool executeJustifyCenter(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeApplyParagraphStyle(frame, source, EditActionCenter, CSSPropertyTextAlign, ASCIILiteral("center")); >+ return executeApplyParagraphStyle(frame, source, EditActionCenter, CSSPropertyTextAlign, "center"_s); > } > > static bool executeJustifyFull(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeApplyParagraphStyle(frame, source, EditActionJustify, CSSPropertyTextAlign, ASCIILiteral("justify")); >+ return executeApplyParagraphStyle(frame, source, EditActionJustify, CSSPropertyTextAlign, "justify"_s); > } > > static bool executeJustifyLeft(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeApplyParagraphStyle(frame, source, EditActionAlignLeft, CSSPropertyTextAlign, ASCIILiteral("left")); >+ return executeApplyParagraphStyle(frame, source, EditActionAlignLeft, CSSPropertyTextAlign, "left"_s); > } > > static bool executeJustifyRight(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeApplyParagraphStyle(frame, source, EditActionAlignRight, CSSPropertyTextAlign, ASCIILiteral("right")); >+ return executeApplyParagraphStyle(frame, source, EditActionAlignRight, CSSPropertyTextAlign, "right"_s); > } > > static bool executeMakeTextWritingDirectionLeftToRight(Frame& frame, Event*, EditorCommandSource, const String&) >@@ -1027,7 +1027,7 @@ static TextDecorationChange textDecorationChangeForToggling(Editor& editor, CSSP > static bool executeStrikethrough(Frame& frame, Event*, EditorCommandSource source, const String&) > { > Ref<EditingStyle> style = EditingStyle::create(); >- style->setStrikeThroughChange(textDecorationChangeForToggling(frame.editor(), CSSPropertyWebkitTextDecorationsInEffect, ASCIILiteral("line-through"))); >+ style->setStrikeThroughChange(textDecorationChangeForToggling(frame.editor(), CSSPropertyWebkitTextDecorationsInEffect, "line-through"_s)); > // FIXME: Needs a new EditAction! > return applyCommandToFrame(frame, source, EditActionUnderline, WTFMove(style)); > } >@@ -1046,12 +1046,12 @@ static bool executeUseCSS(Frame& frame, Event*, EditorCommandSource, const Strin > > static bool executeSubscript(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeToggleStyle(frame, source, EditActionSubscript, CSSPropertyVerticalAlign, ASCIILiteral("baseline"), ASCIILiteral("sub")); >+ return executeToggleStyle(frame, source, EditActionSubscript, CSSPropertyVerticalAlign, "baseline"_s, "sub"_s); > } > > static bool executeSuperscript(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeToggleStyle(frame, source, EditActionSuperscript, CSSPropertyVerticalAlign, ASCIILiteral("baseline"), ASCIILiteral("super")); >+ return executeToggleStyle(frame, source, EditActionSuperscript, CSSPropertyVerticalAlign, "baseline"_s, "super"_s); > } > > static bool executeSwapWithMark(Frame& frame, Event*, EditorCommandSource, const String&) >@@ -1078,12 +1078,12 @@ static bool executeTakeFindStringFromSelection(Frame& frame, Event*, EditorComma > > static bool executeToggleBold(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeToggleStyle(frame, source, EditActionBold, CSSPropertyFontWeight, ASCIILiteral("normal"), ASCIILiteral("bold")); >+ return executeToggleStyle(frame, source, EditActionBold, CSSPropertyFontWeight, "normal"_s, "bold"_s); > } > > static bool executeToggleItalic(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeToggleStyle(frame, source, EditActionItalics, CSSPropertyFontStyle, ASCIILiteral("normal"), ASCIILiteral("italic")); >+ return executeToggleStyle(frame, source, EditActionItalics, CSSPropertyFontStyle, "normal"_s, "italic"_s); > } > > static bool executeTranspose(Frame& frame, Event*, EditorCommandSource, const String&) >@@ -1095,7 +1095,7 @@ static bool executeTranspose(Frame& frame, Event*, EditorCommandSource, const St > static bool executeUnderline(Frame& frame, Event*, EditorCommandSource source, const String&) > { > Ref<EditingStyle> style = EditingStyle::create(); >- TextDecorationChange change = textDecorationChangeForToggling(frame.editor(), CSSPropertyWebkitTextDecorationsInEffect, ASCIILiteral("underline")); >+ TextDecorationChange change = textDecorationChangeForToggling(frame.editor(), CSSPropertyWebkitTextDecorationsInEffect, "underline"_s); > style->setUnderlineChange(change); > return applyCommandToFrame(frame, source, EditActionUnderline, WTFMove(style)); > } >@@ -1115,7 +1115,7 @@ static bool executeUnlink(Frame& frame, Event*, EditorCommandSource, const Strin > > static bool executeUnscript(Frame& frame, Event*, EditorCommandSource source, const String&) > { >- return executeApplyStyle(frame, source, EditActionUnscript, CSSPropertyVerticalAlign, ASCIILiteral("baseline")); >+ return executeApplyStyle(frame, source, EditActionUnscript, CSSPropertyVerticalAlign, "baseline"_s); > } > > static bool executeUnselect(Frame& frame, Event*, EditorCommandSource, const String&) >@@ -1354,12 +1354,12 @@ static TriState stateNone(Frame&, Event*) > > static TriState stateBold(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyFontWeight, ASCIILiteral("bold")); >+ return stateStyle(frame, CSSPropertyFontWeight, "bold"_s); > } > > static TriState stateItalic(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyFontStyle, ASCIILiteral("italic")); >+ return stateStyle(frame, CSSPropertyFontStyle, "italic"_s); > } > > static TriState stateOrderedList(Frame& frame, Event*) >@@ -1369,7 +1369,7 @@ static TriState stateOrderedList(Frame& frame, Event*) > > static TriState stateStrikethrough(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyWebkitTextDecorationsInEffect, ASCIILiteral("line-through")); >+ return stateStyle(frame, CSSPropertyWebkitTextDecorationsInEffect, "line-through"_s); > } > > static TriState stateStyleWithCSS(Frame& frame, Event*) >@@ -1379,12 +1379,12 @@ static TriState stateStyleWithCSS(Frame& frame, Event*) > > static TriState stateSubscript(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyVerticalAlign, ASCIILiteral("sub")); >+ return stateStyle(frame, CSSPropertyVerticalAlign, "sub"_s); > } > > static TriState stateSuperscript(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyVerticalAlign, ASCIILiteral("super")); >+ return stateStyle(frame, CSSPropertyVerticalAlign, "super"_s); > } > > static TriState stateTextWritingDirectionLeftToRight(Frame& frame, Event*) >@@ -1404,7 +1404,7 @@ static TriState stateTextWritingDirectionRightToLeft(Frame& frame, Event*) > > static TriState stateUnderline(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyWebkitTextDecorationsInEffect, ASCIILiteral("underline")); >+ return stateStyle(frame, CSSPropertyWebkitTextDecorationsInEffect, "underline"_s); > } > > static TriState stateUnorderedList(Frame& frame, Event*) >@@ -1414,22 +1414,22 @@ static TriState stateUnorderedList(Frame& frame, Event*) > > static TriState stateJustifyCenter(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyTextAlign, ASCIILiteral("center")); >+ return stateStyle(frame, CSSPropertyTextAlign, "center"_s); > } > > static TriState stateJustifyFull(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyTextAlign, ASCIILiteral("justify")); >+ return stateStyle(frame, CSSPropertyTextAlign, "justify"_s); > } > > static TriState stateJustifyLeft(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyTextAlign, ASCIILiteral("left")); >+ return stateStyle(frame, CSSPropertyTextAlign, "left"_s); > } > > static TriState stateJustifyRight(Frame& frame, Event*) > { >- return stateStyle(frame, CSSPropertyTextAlign, ASCIILiteral("right")); >+ return stateStyle(frame, CSSPropertyTextAlign, "right"_s); > } > > // Value functions >@@ -1821,7 +1821,7 @@ String Editor::Command::value(Event* triggeringEvent) const > if (!isSupported() || !m_frame) > return String(); > if (m_command->value == valueNull && m_command->state != stateNone) >- return m_command->state(*m_frame, triggeringEvent) == TrueTriState ? ASCIILiteral("true") : ASCIILiteral("false"); >+ return m_command->state(*m_frame, triggeringEvent) == TrueTriState ? "true"_s : "false"_s; > return m_command->value(*m_frame, triggeringEvent); > } > >diff --git a/Source/WebCore/editing/SmartReplace.cpp b/Source/WebCore/editing/SmartReplace.cpp >index 0b4764cc0d10b53cb6ff08a8717fa2a6c9bcf944..de53cc0ffbf14c4ab2eda0242888230c98fe4098 100644 >--- a/Source/WebCore/editing/SmartReplace.cpp >+++ b/Source/WebCore/editing/SmartReplace.cpp >@@ -54,7 +54,7 @@ static USet* getSmartSet(bool isPreviousCharacter) > if (!smartSet) { > // Whitespace and newline (kCFCharacterSetWhitespaceAndNewline) > UErrorCode ec = U_ZERO_ERROR; >- String whitespaceAndNewline = ASCIILiteral("[[:WSpace:] [\\u000A\\u000B\\u000C\\u000D\\u0085]]"); >+ String whitespaceAndNewline = "[[:WSpace:] [\\u000A\\u000B\\u000C\\u000D\\u0085]]"_s; > smartSet = uset_openPattern(StringView(whitespaceAndNewline).upconvertedCharacters(), whitespaceAndNewline.length(), &ec); > ASSERT(U_SUCCESS(ec)); > >@@ -73,15 +73,15 @@ static USet* getSmartSet(bool isPreviousCharacter) > > if (isPreviousCharacter) { > // FIXME: Silly to convert this to a WTF::String just to loop through the characters. >- addAllCodePoints(smartSet, ASCIILiteral("([\"\'#$/-`{")); >+ addAllCodePoints(smartSet, "([\"\'#$/-`{"_s); > preSmartSet = smartSet; > } else { > // FIXME: Silly to convert this to a WTF::String just to loop through the characters. >- addAllCodePoints(smartSet, ASCIILiteral(")].,;:?\'!\"%*-/}")); >+ addAllCodePoints(smartSet, ")].,;:?\'!\"%*-/}"_s); > > // Punctuation (kCFCharacterSetPunctuation) > UErrorCode ec = U_ZERO_ERROR; >- String punctuationClass = ASCIILiteral("[:P:]"); >+ String punctuationClass = "[:P:]"_s; > USet* icuPunct = uset_openPattern(StringView(punctuationClass).upconvertedCharacters(), punctuationClass.length(), &ec); > ASSERT(U_SUCCESS(ec)); > uset_addAll(smartSet, icuPunct); >diff --git a/Source/WebCore/fileapi/FileCocoa.mm b/Source/WebCore/fileapi/FileCocoa.mm >index 44cccb8af5350c9fc8d301aa576cb25e321fa7b2..c0a81f335b904b37c445401334c100fd48cb7a1a 100644 >--- a/Source/WebCore/fileapi/FileCocoa.mm >+++ b/Source/WebCore/fileapi/FileCocoa.mm >@@ -60,8 +60,8 @@ bool File::shouldReplaceFile(const String& path) > void File::computeNameAndContentTypeForReplacedFile(const String& path, const String& nameOverride, String& effectiveName, String& effectiveContentType) > { > ASSERT(!FileSystem::pathGetFileName(path).endsWith('/')); // Expecting to get a path without trailing slash, even for directories. >- effectiveContentType = ASCIILiteral("application/zip"); >- effectiveName = (nameOverride.isNull() ? FileSystem::pathGetFileName(path) : nameOverride) + ASCIILiteral(".zip"); >+ effectiveContentType = "application/zip"_s; >+ effectiveName = (nameOverride.isNull() ? FileSystem::pathGetFileName(path) : nameOverride) + ".zip"_s; > } > > } >diff --git a/Source/WebCore/html/BaseCheckableInputType.cpp b/Source/WebCore/html/BaseCheckableInputType.cpp >index 6a2567137fd2299fab05be04f45888de09836c0f..bb1da0866bb69afad9d9a24a802a1ea757890c20 100644 >--- a/Source/WebCore/html/BaseCheckableInputType.cpp >+++ b/Source/WebCore/html/BaseCheckableInputType.cpp >@@ -46,7 +46,7 @@ using namespace HTMLNames; > FormControlState BaseCheckableInputType::saveFormControlState() const > { > ASSERT(element()); >- return { element()->checked() ? ASCIILiteral("on") : ASCIILiteral("off") }; >+ return { element()->checked() ? "on"_s : "off"_s }; > } > > void BaseCheckableInputType::restoreFormControlState(const FormControlState& state) >diff --git a/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp b/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp >index 5c12f6c1544d3a5bc372476c29753ea62b279b4b..21fede101fb9a1c13ece1d748092f97c524828ae 100644 >--- a/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp >+++ b/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp >@@ -79,7 +79,7 @@ void BaseChooserOnlyDateAndTimeInputType::updateInnerTextValue() > String displayValue = visibleValue(); > if (displayValue.isEmpty()) { > // Need to put something to keep text baseline. >- displayValue = ASCIILiteral(" "); >+ displayValue = " "_s; > } > downcast<HTMLElement>(*node).setInnerText(displayValue); > } >diff --git a/Source/WebCore/html/ColorInputType.cpp b/Source/WebCore/html/ColorInputType.cpp >index 4dac86f8d90e32076d45c4deacef54319a39dc5f..8ce246591f61ec02db13b781a8bb55ee5632539d 100644 >--- a/Source/WebCore/html/ColorInputType.cpp >+++ b/Source/WebCore/html/ColorInputType.cpp >@@ -98,7 +98,7 @@ bool ColorInputType::supportsRequired() const > > String ColorInputType::fallbackValue() const > { >- return ASCIILiteral("#000000"); >+ return "#000000"_s; > } > > String ColorInputType::sanitizeValue(const String& proposedValue) const >diff --git a/Source/WebCore/html/DOMFormData.cpp b/Source/WebCore/html/DOMFormData.cpp >index afe7c13e3ed851584db99093e35747d71c677f1f..d2eb67d670237b671cc13ccb319305b372ff23f2 100644 >--- a/Source/WebCore/html/DOMFormData.cpp >+++ b/Source/WebCore/html/DOMFormData.cpp >@@ -57,7 +57,7 @@ DOMFormData::DOMFormData(HTMLFormElement* form) > auto DOMFormData::createFileEntry(const String& name, Blob& blob, const String& filename) -> Item > { > if (!blob.isFile()) >- return { name, File::create(blob, filename.isNull() ? ASCIILiteral("blob") : filename) }; >+ return { name, File::create(blob, filename.isNull() ? "blob"_s : filename) }; > > if (!filename.isNull()) > return { name, File::create(downcast<File>(blob), filename) }; >diff --git a/Source/WebCore/html/FTPDirectoryDocument.cpp b/Source/WebCore/html/FTPDirectoryDocument.cpp >index fa07b5f1545cd17e80f6b1c1f06a4dfbbbb5ec58..d7e2b75a453120b02d7c742d460f46a4dd59948e 100644 >--- a/Source/WebCore/html/FTPDirectoryDocument.cpp >+++ b/Source/WebCore/html/FTPDirectoryDocument.cpp >@@ -159,7 +159,7 @@ Ref<Element> FTPDirectoryDocumentParser::createTDForFilename(const String& filen > static String processFilesizeString(const String& size, bool isDirectory) > { > if (isDirectory) >- return ASCIILiteral("--"); >+ return "--"_s; > > bool valid; > int64_t bytes = size.toUInt64(&valid); >@@ -302,7 +302,7 @@ bool FTPDirectoryDocumentParser::loadDocumentTemplate() > > auto& document = *this->document(); > >- auto foundElement = makeRefPtr(document.getElementById(String(ASCIILiteral("ftpDirectoryTable")))); >+ auto foundElement = makeRefPtr(document.getElementById(String("ftpDirectoryTable"_s))); > if (!foundElement) > LOG_ERROR("Unable to find element by id \"ftpDirectoryTable\" in the template document."); > else if (!is<HTMLTableElement>(foundElement)) >diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp >index 08ca042a76433421ac448c40da8ffd073158f6dc..0155fc70a18338526ee2a14652c9c523025b3f10 100644 >--- a/Source/WebCore/html/HTMLAnchorElement.cpp >+++ b/Source/WebCore/html/HTMLAnchorElement.cpp >@@ -317,7 +317,7 @@ DOMTokenList& HTMLAnchorElement::relList() const > #if USE(APPLE_INTERNAL_SDK) > auto systemPreviewRelValue = getSystemPreviewRelValue(); > #else >- auto systemPreviewRelValue = ASCIILiteral("system-preview"); >+ auto systemPreviewRelValue = "system-preview"_s; > #endif > return equalIgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener") || equalIgnoringASCIICase(token, systemPreviewRelValue); > #else >@@ -386,7 +386,7 @@ bool HTMLAnchorElement::isSystemPreviewLink() const > #if USE(APPLE_INTERNAL_SDK) > auto systemPreviewRelValue = getSystemPreviewRelValue(); > #else >- auto systemPreviewRelValue = String { ASCIILiteral("system-preview") }; >+ auto systemPreviewRelValue = String { "system-preview"_s }; > #endif > > if (!relList().contains(systemPreviewRelValue)) >diff --git a/Source/WebCore/html/HTMLAppletElement.cpp b/Source/WebCore/html/HTMLAppletElement.cpp >index 9b6401930b5f2528da9100c6c4b5462d60fe2b45..5bff0aa5ea3026e86e7ec9368f44c9614be5fd21 100644 >--- a/Source/WebCore/html/HTMLAppletElement.cpp >+++ b/Source/WebCore/html/HTMLAppletElement.cpp >@@ -48,7 +48,7 @@ inline HTMLAppletElement::HTMLAppletElement(const QualifiedName& tagName, Docume > { > ASSERT(hasTagName(appletTag)); > >- m_serviceType = ASCIILiteral { "application/x-java-applet" }; >+ m_serviceType = "application/x-java-applet"_s; > } > > Ref<HTMLAppletElement> HTMLAppletElement::create(const QualifiedName& tagName, Document& document) >@@ -141,7 +141,7 @@ void HTMLAppletElement::updateWidget(CreatePlugins createPlugins) > > const AtomicString& codeBase = attributeWithoutSynchronization(codebaseAttr); > if (!codeBase.isNull()) { >- paramNames.append(ASCIILiteral("codeBase")); >+ paramNames.append("codeBase"_s); > paramValues.append(codeBase.string()); > } > >@@ -153,16 +153,16 @@ void HTMLAppletElement::updateWidget(CreatePlugins createPlugins) > > const AtomicString& archive = attributeWithoutSynchronization(archiveAttr); > if (!archive.isNull()) { >- paramNames.append(ASCIILiteral("archive")); >+ paramNames.append("archive"_s); > paramValues.append(archive.string()); > } > >- paramNames.append(ASCIILiteral("baseURL")); >+ paramNames.append("baseURL"_s); > paramValues.append(document().baseURL().string()); > > const AtomicString& mayScript = attributeWithoutSynchronization(mayscriptAttr); > if (!mayScript.isNull()) { >- paramNames.append(ASCIILiteral("mayScript")); >+ paramNames.append("mayScript"_s); > paramValues.append(mayScript.string()); > } > >diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp >index f0fa51bf069697c41bfb2c7acb3f95fae2ba4419..e6535cea25feb25a2c8589d5babae52c06ff8483 100644 >--- a/Source/WebCore/html/HTMLCanvasElement.cpp >+++ b/Source/WebCore/html/HTMLCanvasElement.cpp >@@ -667,7 +667,7 @@ void HTMLCanvasElement::setSurfaceSize(const IntSize& size) > static String toEncodingMimeType(const String& mimeType) > { > if (!MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)) >- return ASCIILiteral("image/png"); >+ return "image/png"_s; > return mimeType.convertToASCIILowercase(); > } > >@@ -690,7 +690,7 @@ ExceptionOr<UncachedString> HTMLCanvasElement::toDataURL(const String& mimeType, > return Exception { SecurityError }; > > if (m_size.isEmpty() || !buffer()) >- return UncachedString { ASCIILiteral { "data:," } }; >+ return UncachedString { "data:,"_s }; > > auto encodingMIMEType = toEncodingMimeType(mimeType); > auto quality = qualityFromJSValue(qualityValue); >@@ -773,10 +773,10 @@ RefPtr<MediaSample> HTMLCanvasElement::toMediaSample() > ExceptionOr<Ref<MediaStream>> HTMLCanvasElement::captureStream(ScriptExecutionContext& context, std::optional<double>&& frameRequestRate) > { > if (!originClean()) >- return Exception(SecurityError, ASCIILiteral("Canvas is tainted")); >+ return Exception(SecurityError, "Canvas is tainted"_s); > > if (frameRequestRate && frameRequestRate.value() < 0) >- return Exception(NotSupportedError, ASCIILiteral("frameRequestRate is negative")); >+ return Exception(NotSupportedError, "frameRequestRate is negative"_s); > > auto track = CanvasCaptureMediaStreamTrack::create(context, *this, WTFMove(frameRequestRate)); > auto stream = MediaStream::create(context); >diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp >index 00ea0ed058b764a2b519d727f373b5e9e05795aa..2ba68cbf0b77170f328766cf94b2f61824549e2b 100644 >--- a/Source/WebCore/html/HTMLElement.cpp >+++ b/Source/WebCore/html/HTMLElement.cpp >@@ -639,15 +639,15 @@ String HTMLElement::contentEditable() const > { > switch (contentEditableType(*this)) { > case ContentEditableType::Inherit: >- return ASCIILiteral("inherit"); >+ return "inherit"_s; > case ContentEditableType::True: >- return ASCIILiteral("true"); >+ return "true"_s; > case ContentEditableType::False: >- return ASCIILiteral("false"); >+ return "false"_s; > case ContentEditableType::PlaintextOnly: >- return ASCIILiteral("plaintext-only"); >+ return "plaintext-only"_s; > } >- return ASCIILiteral("inherit"); >+ return "inherit"_s; > } > > ExceptionOr<void> HTMLElement::setContentEditable(const String& enabled) >diff --git a/Source/WebCore/html/HTMLFormControlElement.cpp b/Source/WebCore/html/HTMLFormControlElement.cpp >index abeb3858e9975718413a4ac95d9769287428baf2..c092b8212e0221379d914c028bf6048fcaf71344 100644 >--- a/Source/WebCore/html/HTMLFormControlElement.cpp >+++ b/Source/WebCore/html/HTMLFormControlElement.cpp >@@ -206,7 +206,7 @@ static bool shouldAutofocus(HTMLFormControlElement* element) > return false; > if (element->document().isSandboxed(SandboxAutomaticFeatures)) { > // FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists. >- element->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("Blocked autofocusing on a form control because the form's frame is sandboxed and the 'allow-scripts' permission is not set.")); >+ element->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Blocked autofocusing on a form control because the form's frame is sandboxed and the 'allow-scripts' permission is not set."_s); > return false; > } > if (element->hasAutofocused()) >diff --git a/Source/WebCore/html/HTMLHtmlElement.cpp b/Source/WebCore/html/HTMLHtmlElement.cpp >index 225075403ff0fad1b248c8485d0fc7e2c865a2d8..65174b87c904915be9d987b2627396c378b43831 100644 >--- a/Source/WebCore/html/HTMLHtmlElement.cpp >+++ b/Source/WebCore/html/HTMLHtmlElement.cpp >@@ -77,7 +77,7 @@ void HTMLHtmlElement::insertedByParser() > if (manifest.isEmpty()) > documentLoader->applicationCacheHost().selectCacheWithoutManifest(); > else { >- document().addConsoleMessage(MessageSource::AppCache, MessageLevel::Warning, ASCIILiteral("ApplicationCache is deprecated. Please use ServiceWorkers instead.")); >+ document().addConsoleMessage(MessageSource::AppCache, MessageLevel::Warning, "ApplicationCache is deprecated. Please use ServiceWorkers instead."_s); > documentLoader->applicationCacheHost().selectCacheWithManifest(document().completeURL(manifest)); > } > } >diff --git a/Source/WebCore/html/HTMLKeygenElement.cpp b/Source/WebCore/html/HTMLKeygenElement.cpp >index 60ac275d86b56ebc330c73fe3dde391de711c045..db778f94b34953ccd23347ff698baa7826d604b1 100644 >--- a/Source/WebCore/html/HTMLKeygenElement.cpp >+++ b/Source/WebCore/html/HTMLKeygenElement.cpp >@@ -116,7 +116,7 @@ void HTMLKeygenElement::setKeytype(const AtomicString& value) > > String HTMLKeygenElement::keytype() const > { >- return isKeytypeRSA() ? ASCIILiteral("rsa") : emptyString(); >+ return isKeytypeRSA() ? "rsa"_s : emptyString(); > } > > bool HTMLKeygenElement::appendFormData(DOMFormData& formData, bool) >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index 44a0d18af166fabfe24f55262be068dbbd3dd070..628b0a0a1a760cf2e31deda3b70ae74307ad5861 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -1221,10 +1221,10 @@ String HTMLMediaElement::canPlayType(const String& mimeType) const > canPlay = emptyString(); > break; > case MediaPlayer::MayBeSupported: >- canPlay = ASCIILiteral("maybe"); >+ canPlay = "maybe"_s; > break; > case MediaPlayer::IsSupported: >- canPlay = ASCIILiteral("probably"); >+ canPlay = "probably"_s; > break; > } > >@@ -2295,13 +2295,13 @@ static void logMediaLoadRequest(Page* page, const String& mediaEngine, const Str > static String stringForNetworkState(MediaPlayer::NetworkState state) > { > switch (state) { >- case MediaPlayer::Empty: return ASCIILiteral("Empty"); >- case MediaPlayer::Idle: return ASCIILiteral("Idle"); >- case MediaPlayer::Loading: return ASCIILiteral("Loading"); >- case MediaPlayer::Loaded: return ASCIILiteral("Loaded"); >- case MediaPlayer::FormatError: return ASCIILiteral("FormatError"); >- case MediaPlayer::NetworkError: return ASCIILiteral("NetworkError"); >- case MediaPlayer::DecodeError: return ASCIILiteral("DecodeError"); >+ case MediaPlayer::Empty: return "Empty"_s; >+ case MediaPlayer::Idle: return "Idle"_s; >+ case MediaPlayer::Loading: return "Loading"_s; >+ case MediaPlayer::Loaded: return "Loaded"_s; >+ case MediaPlayer::FormatError: return "FormatError"_s; >+ case MediaPlayer::NetworkError: return "NetworkError"_s; >+ case MediaPlayer::DecodeError: return "DecodeError"_s; > default: return emptyString(); > } > } >@@ -3394,16 +3394,16 @@ String HTMLMediaElement::preload() const > // http://w3c.github.io/mediacapture-main/#mediastreams-in-media-elements > // "preload" - On getting: none. On setting: ignored. > if (m_mediaStreamSrcObject) >- return ASCIILiteral("none"); >+ return "none"_s; > #endif > > switch (m_preload) { > case MediaPlayer::None: >- return ASCIILiteral("none"); >+ return "none"_s; > case MediaPlayer::MetaData: >- return ASCIILiteral("metadata"); >+ return "metadata"_s; > case MediaPlayer::Auto: >- return ASCIILiteral("auto"); >+ return "auto"_s; > } > > ASSERT_NOT_REACHED(); >@@ -7108,7 +7108,7 @@ bool HTMLMediaElement::ensureMediaControlsInjectedScript() > > #ifndef NDEBUG > // Setting a scriptURL allows the source to be debuggable in the inspector. >- URL scriptURL = URL(ParsedURLString, ASCIILiteral("mediaControlsScript")); >+ URL scriptURL = URL(ParsedURLString, "mediaControlsScript"_s); > #else > URL scriptURL; > #endif >diff --git a/Source/WebCore/html/HTMLObjectElement.cpp b/Source/WebCore/html/HTMLObjectElement.cpp >index 97f85a4c0c69aa289a54830236642bec08a30c1c..97ad3b4f4d62cd8b7e4d495cd147c8409cc52173 100644 >--- a/Source/WebCore/html/HTMLObjectElement.cpp >+++ b/Source/WebCore/html/HTMLObjectElement.cpp >@@ -142,7 +142,7 @@ static void mapDataParamToSrc(Vector<String>& paramNames, Vector<String>& paramV > dataParamValue = paramValues[i]; > } > if (!foundSrcParam && !dataParamValue.isNull()) { >- paramNames.append(ASCIILiteral("src")); >+ paramNames.append("src"_s); > paramValues.append(WTFMove(dataParamValue)); > } > } >diff --git a/Source/WebCore/html/HTMLPlugInElement.cpp b/Source/WebCore/html/HTMLPlugInElement.cpp >index 1e2b83384867ea1ba223842c97414cbaeb37303c..1e04c5fe508e843a7f53e54b93527dcfbb65ea70 100644 >--- a/Source/WebCore/html/HTMLPlugInElement.cpp >+++ b/Source/WebCore/html/HTMLPlugInElement.cpp >@@ -412,7 +412,7 @@ bool HTMLPlugInElement::setReplacement(RenderEmbeddedObject::PluginUnavailabilit > return false; > > if (reason == RenderEmbeddedObject::UnsupportedPlugin) >- document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Tried to use an unsupported plug-in.")); >+ document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Tried to use an unsupported plug-in."_s); > > Ref<HTMLPlugInElement> protectedThis(*this); > downcast<RenderEmbeddedObject>(*renderer()).setPluginUnavailabilityReasonWithDescription(reason, unavailabilityDescription); >diff --git a/Source/WebCore/html/ImageData.cpp b/Source/WebCore/html/ImageData.cpp >index 9ec0a5458a0a8527c5ae26c6f5dc88bf34177c9b..9ffc408ef6025d2ee2c56133cb75eee8b8609ee9 100644 >--- a/Source/WebCore/html/ImageData.cpp >+++ b/Source/WebCore/html/ImageData.cpp >@@ -44,7 +44,7 @@ ExceptionOr<Ref<ImageData>> ImageData::create(unsigned sw, unsigned sh) > dataSize *= sw; > dataSize *= sh; > if (dataSize.hasOverflowed()) >- return Exception { RangeError, ASCIILiteral("Cannot allocate a buffer of this size") }; >+ return Exception { RangeError, "Cannot allocate a buffer of this size"_s }; > > IntSize size(sw, sh); > auto data = adoptRef(*new ImageData(size)); >@@ -81,16 +81,16 @@ ExceptionOr<RefPtr<ImageData>> ImageData::create(Ref<Uint8ClampedArray>&& byteAr > { > unsigned length = byteArray->length(); > if (!length || length % 4) >- return Exception { InvalidStateError, ASCIILiteral("Length is not a non-zero multiple of 4") }; >+ return Exception { InvalidStateError, "Length is not a non-zero multiple of 4"_s }; > > ASSERT(length > 0); > length /= 4; > if (!sw || length % sw) >- return Exception { IndexSizeError, ASCIILiteral("Length is not a multiple of sw") }; >+ return Exception { IndexSizeError, "Length is not a multiple of sw"_s }; > > unsigned height = length / sw; > if (sh && sh.value() != height) >- return Exception { IndexSizeError, ASCIILiteral("sh value is not equal to height") }; >+ return Exception { IndexSizeError, "sh value is not equal to height"_s }; > > return create(IntSize(sw, height), WTFMove(byteArray)); > } >diff --git a/Source/WebCore/html/ImageDocument.cpp b/Source/WebCore/html/ImageDocument.cpp >index a14b2d2dfef5098dd3ef8852b208c69c2b9d1c1f..0518ff867dc005d4f331a69d5d6fc093f7f1d526 100644 >--- a/Source/WebCore/html/ImageDocument.cpp >+++ b/Source/WebCore/html/ImageDocument.cpp >@@ -244,7 +244,7 @@ void ImageDocument::createDocumentStructure() > if (m_shouldShrinkImage) { > #if PLATFORM(IOS) > // Set the viewport to be in device pixels (rather than the default of 980). >- processViewport(ASCIILiteral("width=device-width"), ViewportArguments::ImageDocument); >+ processViewport("width=device-width"_s, ViewportArguments::ImageDocument); > #else > auto listener = ImageEventListener::create(*this); > if (RefPtr<DOMWindow> window = this->domWindow()) >diff --git a/Source/WebCore/html/ImageInputType.cpp b/Source/WebCore/html/ImageInputType.cpp >index 38cd0da71851d8303202fb791591754bd61ba494..2b0f1ed66828f126a7e159a04b1cba8c08c5aaa0 100644 >--- a/Source/WebCore/html/ImageInputType.cpp >+++ b/Source/WebCore/html/ImageInputType.cpp >@@ -62,8 +62,8 @@ bool ImageInputType::appendFormData(DOMFormData& formData, bool) const > > auto& name = element()->name(); > if (name.isEmpty()) { >- formData.append(ASCIILiteral("x"), String::number(m_clickLocation.x())); >- formData.append(ASCIILiteral("y"), String::number(m_clickLocation.y())); >+ formData.append("x"_s, String::number(m_clickLocation.x())); >+ formData.append("y"_s, String::number(m_clickLocation.y())); > return true; > } > >diff --git a/Source/WebCore/html/PluginDocument.cpp b/Source/WebCore/html/PluginDocument.cpp >index 4330a1dd2d684e5e442f327fc81e544e194e9d3b..df6dca00bab69b3b8dc1f15c0c4b9fe6810f823d 100644 >--- a/Source/WebCore/html/PluginDocument.cpp >+++ b/Source/WebCore/html/PluginDocument.cpp >@@ -77,7 +77,7 @@ void PluginDocumentParser::createDocumentStructure() > > #if PLATFORM(IOS) > // Should not be able to zoom into standalone plug-in documents. >- document.processViewport(ASCIILiteral("user-scalable=no"), ViewportArguments::PluginDocument); >+ document.processViewport("user-scalable=no"_s, ViewportArguments::PluginDocument); > #endif > > auto body = HTMLBodyElement::create(document); >diff --git a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >index d6386aab47ebd97085ac57d209e8c067f5683d94..ba82dabab4ad2b2c4f6519854c54cee7081b8cf4 100644 >--- a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >+++ b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >@@ -1114,12 +1114,12 @@ WebGLExtension* WebGL2RenderingContext::getExtension(const String& name) > return variable.get(); \ > } > >- ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic")); >- ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "WEBKIT_EXT_texture_filter_anisotropic", enableSupportedExtension("GL_OES_texture_float")); >- ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float")); >- ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear")); >- ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float")); >- ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear")); >+ ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s)); >+ ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "WEBKIT_EXT_texture_filter_anisotropic", enableSupportedExtension("GL_OES_texture_float"_s)); >+ ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float"_s)); >+ ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear"_s)); >+ ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float"_s)); >+ ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear"_s)); > ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context", true); > ENABLE_IF_REQUESTED(WebGLCompressedTextureATC, m_webglCompressedTextureATC, "WEBKIT_WEBGL_compressed_texture_atc", WebGLCompressedTextureATC::supported(*this)); > ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this)); >@@ -1127,7 +1127,7 @@ WebGLExtension* WebGL2RenderingContext::getExtension(const String& name) > ENABLE_IF_REQUESTED(WebGLCompressedTextureASTC, m_webglCompressedTextureASTC, "WEBGL_compressed_texture_astc", WebGLCompressedTextureASTC::supported(*this)); > ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*graphicsContext3D())); > ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true); >- ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports(ASCIILiteral { "GL_ANGLE_translated_shader_source" })); >+ ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s)); > return nullptr; > } > >@@ -1142,30 +1142,30 @@ std::optional<Vector<String>> WebGL2RenderingContext::getSupportedExtensions() > return result; > > auto& extensions = m_context->getExtensions(); >- if (extensions.supports(ASCIILiteral { "GL_OES_texture_float" })) >- result.append(ASCIILiteral { "OES_texture_float" }); >- if (extensions.supports(ASCIILiteral { "GL_OES_texture_float_linear" })) >- result.append(ASCIILiteral { "OES_texture_float_linear" }); >- if (extensions.supports(ASCIILiteral { "GL_OES_texture_half_float" })) >- result.append(ASCIILiteral { "OES_texture_half_float" }); >- if (extensions.supports(ASCIILiteral { "GL_OES_texture_half_float_linear" })) >- result.append(ASCIILiteral { "OES_texture_half_float_linear" }); >- if (extensions.supports(ASCIILiteral { "GL_EXT_texture_filter_anisotropic" })) >- result.append(ASCIILiteral { "WEBKIT_EXT_texture_filter_anisotropic" }); >+ if (extensions.supports("GL_OES_texture_float"_s)) >+ result.append("OES_texture_float"_s); >+ if (extensions.supports("GL_OES_texture_float_linear"_s)) >+ result.append("OES_texture_float_linear"_s); >+ if (extensions.supports("GL_OES_texture_half_float"_s)) >+ result.append("OES_texture_half_float"_s); >+ if (extensions.supports("GL_OES_texture_half_float_linear"_s)) >+ result.append("OES_texture_half_float_linear"_s); >+ if (extensions.supports("GL_EXT_texture_filter_anisotropic"_s)) >+ result.append("WEBKIT_EXT_texture_filter_anisotropic"_s); > if (WebGLCompressedTextureATC::supported(*this)) >- result.append(ASCIILiteral { "WEBKIT_WEBGL_compressed_texture_atc" }); >+ result.append("WEBKIT_WEBGL_compressed_texture_atc"_s); > if (WebGLCompressedTexturePVRTC::supported(*this)) >- result.append(ASCIILiteral { "WEBKIT_WEBGL_compressed_texture_pvrtc" }); >+ result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s); > if (WebGLCompressedTextureS3TC::supported(*this)) >- result.append(ASCIILiteral { "WEBGL_compressed_texture_s3tc" }); >+ result.append("WEBGL_compressed_texture_s3tc"_s); > if (WebGLCompressedTextureASTC::supported(*this)) >- result.append(ASCIILiteral { "WEBGL_compressed_texture_astc" }); >+ result.append("WEBGL_compressed_texture_astc"_s); > if (WebGLDepthTexture::supported(*graphicsContext3D())) >- result.append(ASCIILiteral { "WEBGL_depth_texture" }); >- result.append(ASCIILiteral { "WEBGL_lose_context" }); >- if (extensions.supports(ASCIILiteral { "GL_ANGLE_translated_shader_source" })) >- result.append(ASCIILiteral { "WEBGL_debug_shaders" }); >- result.append(ASCIILiteral { "WEBGL_debug_renderer_info" }); >+ result.append("WEBGL_depth_texture"_s); >+ result.append("WEBGL_lose_context"_s); >+ if (extensions.supports("GL_ANGLE_translated_shader_source"_s)) >+ result.append("WEBGL_debug_shaders"_s); >+ result.append("WEBGL_debug_renderer_info"_s); > > return result; > } >@@ -1564,7 +1564,7 @@ WebGLAny WebGL2RenderingContext::getParameter(GC3Denum pname) > case GraphicsContext3D::RENDERBUFFER_BINDING: > return m_renderbufferBinding; > case GraphicsContext3D::RENDERER: >- return String { ASCIILiteral { "WebKit WebGL" } }; >+ return String { "WebKit WebGL"_s }; > case GraphicsContext3D::SAMPLE_BUFFERS: > return getIntParameter(pname); > case GraphicsContext3D::SAMPLE_COVERAGE_INVERT: >@@ -1630,7 +1630,7 @@ WebGLAny WebGL2RenderingContext::getParameter(GC3Denum pname) > case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL: > return m_unpackColorspaceConversion; > case GraphicsContext3D::VENDOR: >- return String { ASCIILiteral { "WebKit" } }; >+ return String { "WebKit"_s }; > case GraphicsContext3D::VERSION: > return "WebGL 2.0 (" + m_context->getString(GraphicsContext3D::VERSION) + ")"; > case GraphicsContext3D::VIEWPORT: >diff --git a/Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp b/Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp >index 9f5bf8680a9606e6c4892ce5f57cfee124926c3c..f11467f132fdf60ae3bb603ce883528cf56faf99 100644 >--- a/Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp >+++ b/Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp >@@ -36,8 +36,8 @@ namespace WebCore { > > WebGLCompressedTextureASTC::WebGLCompressedTextureASTC(WebGLRenderingContextBase& context) > : WebGLExtension(context) >- , m_isHDRSupported(context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_hdr" })) >- , m_isLDRSupported(context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_ldr" })) >+ , m_isHDRSupported(context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s)) >+ , m_isLDRSupported(context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s)) > { > context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_4x4_KHR); > context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_ASTC_5x4_KHR); >@@ -82,9 +82,9 @@ Vector<String> WebGLCompressedTextureASTC::getSupportedProfiles() > Vector<String> result; > > if (m_isHDRSupported) >- result.append(ASCIILiteral { "hdr" }); >+ result.append("hdr"_s); > if (m_isLDRSupported) >- result.append(ASCIILiteral { "ldr" }); >+ result.append("ldr"_s); > > return result; > } >@@ -92,8 +92,8 @@ Vector<String> WebGLCompressedTextureASTC::getSupportedProfiles() > bool WebGLCompressedTextureASTC::supported(const WebGLRenderingContextBase& context) > { > return RuntimeEnabledFeatures::sharedFeatures().webGLCompressedTextureASTCSupportEnabled() >- && (context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_hdr" }) >- || context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_ldr" })); >+ && (context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_hdr"_s) >+ || context.graphicsContext3D()->getExtensions().supports("GL_KHR_texture_compression_astc_ldr"_s)); > } > > } // namespace WebCore >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp >index a1a51c71704b3a114a9f95712d358a30b8d8defe..620bdb30a1b62905c1028ac1c32eda8ecda660a8 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.cpp >@@ -120,30 +120,30 @@ WebGLExtension* WebGLRenderingContext::getExtension(const String& name) > return variable.get(); \ > } > >- ENABLE_IF_REQUESTED(EXTBlendMinMax, m_extBlendMinMax, "EXT_blend_minmax", enableSupportedExtension("GL_EXT_blend_minmax")); >- ENABLE_IF_REQUESTED(EXTsRGB, m_extsRGB, "EXT_sRGB", enableSupportedExtension("GL_EXT_sRGB")); >- ENABLE_IF_REQUESTED(EXTFragDepth, m_extFragDepth, "EXT_frag_depth", enableSupportedExtension("GL_EXT_frag_depth")); >+ ENABLE_IF_REQUESTED(EXTBlendMinMax, m_extBlendMinMax, "EXT_blend_minmax", enableSupportedExtension("GL_EXT_blend_minmax"_s)); >+ ENABLE_IF_REQUESTED(EXTsRGB, m_extsRGB, "EXT_sRGB", enableSupportedExtension("GL_EXT_sRGB"_s)); >+ ENABLE_IF_REQUESTED(EXTFragDepth, m_extFragDepth, "EXT_frag_depth", enableSupportedExtension("GL_EXT_frag_depth"_s)); > if (equalIgnoringASCIICase(name, "EXT_shader_texture_lod")) { > if (!m_extShaderTextureLOD) { >- if (!(m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_shader_texture_lod" }) || m_context->getExtensions().supports(ASCIILiteral { "GL_ARB_shader_texture_lod" }))) >+ if (!(m_context->getExtensions().supports("GL_EXT_shader_texture_lod"_s) || m_context->getExtensions().supports("GL_ARB_shader_texture_lod"_s))) > m_extShaderTextureLOD = nullptr; > else { >- m_context->getExtensions().ensureEnabled(ASCIILiteral { "GL_EXT_shader_texture_lod" }); >+ m_context->getExtensions().ensureEnabled("GL_EXT_shader_texture_lod"_s); > m_extShaderTextureLOD = std::make_unique<EXTShaderTextureLOD>(*this); > InspectorInstrumentation::didEnableExtension(*this, name); > } > } > return m_extShaderTextureLOD.get(); > } >- ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic")); >- ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "WEBKIT_EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic")); >- ENABLE_IF_REQUESTED(OESStandardDerivatives, m_oesStandardDerivatives, "OES_standard_derivatives", enableSupportedExtension("GL_OES_standard_derivatives")); >- ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float")); >- ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear")); >- ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float")); >- ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear")); >- ENABLE_IF_REQUESTED(OESVertexArrayObject, m_oesVertexArrayObject, "OES_vertex_array_object", enableSupportedExtension("GL_OES_vertex_array_object")); >- ENABLE_IF_REQUESTED(OESElementIndexUint, m_oesElementIndexUint, "OES_element_index_uint", enableSupportedExtension("GL_OES_element_index_uint")); >+ ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s)); >+ ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "WEBKIT_EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s)); >+ ENABLE_IF_REQUESTED(OESStandardDerivatives, m_oesStandardDerivatives, "OES_standard_derivatives", enableSupportedExtension("GL_OES_standard_derivatives"_s)); >+ ENABLE_IF_REQUESTED(OESTextureFloat, m_oesTextureFloat, "OES_texture_float", enableSupportedExtension("GL_OES_texture_float"_s)); >+ ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear"_s)); >+ ENABLE_IF_REQUESTED(OESTextureHalfFloat, m_oesTextureHalfFloat, "OES_texture_half_float", enableSupportedExtension("GL_OES_texture_half_float"_s)); >+ ENABLE_IF_REQUESTED(OESTextureHalfFloatLinear, m_oesTextureHalfFloatLinear, "OES_texture_half_float_linear", enableSupportedExtension("GL_OES_texture_half_float_linear"_s)); >+ ENABLE_IF_REQUESTED(OESVertexArrayObject, m_oesVertexArrayObject, "OES_vertex_array_object", enableSupportedExtension("GL_OES_vertex_array_object"_s)); >+ ENABLE_IF_REQUESTED(OESElementIndexUint, m_oesElementIndexUint, "OES_element_index_uint", enableSupportedExtension("GL_OES_element_index_uint"_s)); > ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context", true); > ENABLE_IF_REQUESTED(WebGLCompressedTextureATC, m_webglCompressedTextureATC, "WEBKIT_WEBGL_compressed_texture_atc", WebGLCompressedTextureATC::supported(*this)); > ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*this)); >@@ -155,7 +155,7 @@ WebGLExtension* WebGLRenderingContext::getExtension(const String& name) > if (!supportsDrawBuffers()) > m_webglDrawBuffers = nullptr; > else { >- m_context->getExtensions().ensureEnabled(ASCIILiteral { "GL_EXT_draw_buffers" }); >+ m_context->getExtensions().ensureEnabled("GL_EXT_draw_buffers"_s); > m_webglDrawBuffers = std::make_unique<WebGLDrawBuffers>(*this); > InspectorInstrumentation::didEnableExtension(*this, name); > } >@@ -167,7 +167,7 @@ WebGLExtension* WebGLRenderingContext::getExtension(const String& name) > if (!ANGLEInstancedArrays::supported(*this)) > m_angleInstancedArrays = nullptr; > else { >- m_context->getExtensions().ensureEnabled(ASCIILiteral { "GL_ANGLE_instanced_arrays" }); >+ m_context->getExtensions().ensureEnabled("GL_ANGLE_instanced_arrays"_s); > m_angleInstancedArrays = std::make_unique<ANGLEInstancedArrays>(*this); > InspectorInstrumentation::didEnableExtension(*this, name); > } >@@ -175,7 +175,7 @@ WebGLExtension* WebGLRenderingContext::getExtension(const String& name) > return m_angleInstancedArrays.get(); > } > ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true); >- ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports(ASCIILiteral { "GL_ANGLE_translated_shader_source" })); >+ ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s)); > return nullptr; > } > >@@ -189,48 +189,48 @@ std::optional<Vector<String>> WebGLRenderingContext::getSupportedExtensions() > if (m_isPendingPolicyResolution) > return result; > >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_blend_minmax" })) >- result.append(ASCIILiteral { "EXT_blend_minmax" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_sRGB" })) >- result.append(ASCIILiteral { "EXT_sRGB" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_frag_depth" })) >- result.append(ASCIILiteral { "EXT_frag_depth" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_texture_float" })) >- result.append(ASCIILiteral { "OES_texture_float" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_texture_float_linear" })) >- result.append(ASCIILiteral { "OES_texture_float_linear" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_texture_half_float" })) >- result.append(ASCIILiteral { "OES_texture_half_float" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_texture_half_float_linear" })) >- result.append(ASCIILiteral { "OES_texture_half_float_linear" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_standard_derivatives" })) >- result.append(ASCIILiteral { "OES_standard_derivatives" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_shader_texture_lod" }) || m_context->getExtensions().supports(ASCIILiteral { "GL_ARB_shader_texture_lod" })) >- result.append(ASCIILiteral { "EXT_shader_texture_lod" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_EXT_texture_filter_anisotropic" })) >- result.append(ASCIILiteral { "EXT_texture_filter_anisotropic" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_vertex_array_object" })) >- result.append(ASCIILiteral { "OES_vertex_array_object" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_OES_element_index_uint" })) >- result.append(ASCIILiteral { "OES_element_index_uint" }); >- result.append(ASCIILiteral { "WEBGL_lose_context" }); >+ if (m_context->getExtensions().supports("GL_EXT_blend_minmax"_s)) >+ result.append("EXT_blend_minmax"_s); >+ if (m_context->getExtensions().supports("GL_EXT_sRGB"_s)) >+ result.append("EXT_sRGB"_s); >+ if (m_context->getExtensions().supports("GL_EXT_frag_depth"_s)) >+ result.append("EXT_frag_depth"_s); >+ if (m_context->getExtensions().supports("GL_OES_texture_float"_s)) >+ result.append("OES_texture_float"_s); >+ if (m_context->getExtensions().supports("GL_OES_texture_float_linear"_s)) >+ result.append("OES_texture_float_linear"_s); >+ if (m_context->getExtensions().supports("GL_OES_texture_half_float"_s)) >+ result.append("OES_texture_half_float"_s); >+ if (m_context->getExtensions().supports("GL_OES_texture_half_float_linear"_s)) >+ result.append("OES_texture_half_float_linear"_s); >+ if (m_context->getExtensions().supports("GL_OES_standard_derivatives"_s)) >+ result.append("OES_standard_derivatives"_s); >+ if (m_context->getExtensions().supports("GL_EXT_shader_texture_lod"_s) || m_context->getExtensions().supports("GL_ARB_shader_texture_lod"_s)) >+ result.append("EXT_shader_texture_lod"_s); >+ if (m_context->getExtensions().supports("GL_EXT_texture_filter_anisotropic"_s)) >+ result.append("EXT_texture_filter_anisotropic"_s); >+ if (m_context->getExtensions().supports("GL_OES_vertex_array_object"_s)) >+ result.append("OES_vertex_array_object"_s); >+ if (m_context->getExtensions().supports("GL_OES_element_index_uint"_s)) >+ result.append("OES_element_index_uint"_s); >+ result.append("WEBGL_lose_context"_s); > if (WebGLCompressedTextureATC::supported(*this)) >- result.append(ASCIILiteral { "WEBKIT_WEBGL_compressed_texture_atc" }); >+ result.append("WEBKIT_WEBGL_compressed_texture_atc"_s); > if (WebGLCompressedTexturePVRTC::supported(*this)) >- result.append(ASCIILiteral { "WEBKIT_WEBGL_compressed_texture_pvrtc" }); >+ result.append("WEBKIT_WEBGL_compressed_texture_pvrtc"_s); > if (WebGLCompressedTextureS3TC::supported(*this)) >- result.append(ASCIILiteral { "WEBGL_compressed_texture_s3tc" }); >+ result.append("WEBGL_compressed_texture_s3tc"_s); > if (WebGLCompressedTextureASTC::supported(*this)) >- result.append(ASCIILiteral { "WEBGL_compressed_texture_astc" }); >+ result.append("WEBGL_compressed_texture_astc"_s); > if (WebGLDepthTexture::supported(*m_context)) >- result.append(ASCIILiteral { "WEBGL_depth_texture" }); >+ result.append("WEBGL_depth_texture"_s); > if (supportsDrawBuffers()) >- result.append(ASCIILiteral { "WEBGL_draw_buffers" }); >+ result.append("WEBGL_draw_buffers"_s); > if (ANGLEInstancedArrays::supported(*this)) >- result.append(ASCIILiteral { "ANGLE_instanced_arrays" }); >- if (m_context->getExtensions().supports(ASCIILiteral { "GL_ANGLE_translated_shader_source" })) >- result.append(ASCIILiteral { "WEBGL_debug_shaders" }); >- result.append(ASCIILiteral { "WEBGL_debug_renderer_info" }); >+ result.append("ANGLE_instanced_arrays"_s); >+ if (m_context->getExtensions().supports("GL_ANGLE_translated_shader_source"_s)) >+ result.append("WEBGL_debug_shaders"_s); >+ result.append("WEBGL_debug_renderer_info"_s); > > return result; > } >@@ -520,7 +520,7 @@ WebGLAny WebGLRenderingContext::getParameter(GC3Denum pname) > case GraphicsContext3D::RENDERBUFFER_BINDING: > return m_renderbufferBinding; > case GraphicsContext3D::RENDERER: >- return String { ASCIILiteral { "WebKit WebGL" } }; >+ return String { "WebKit WebGL"_s }; > case GraphicsContext3D::SAMPLE_BUFFERS: > return getIntParameter(pname); > case GraphicsContext3D::SAMPLE_COVERAGE_INVERT: >@@ -586,7 +586,7 @@ WebGLAny WebGLRenderingContext::getParameter(GC3Denum pname) > case GraphicsContext3D::UNPACK_COLORSPACE_CONVERSION_WEBGL: > return m_unpackColorspaceConversion; > case GraphicsContext3D::VENDOR: >- return String { ASCIILiteral { "WebKit" } }; >+ return String { "WebKit"_s }; > case GraphicsContext3D::VERSION: > return "WebGL 1.0 (" + m_context->getString(GraphicsContext3D::VERSION) + ")"; > case GraphicsContext3D::VIEWPORT: >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >index 9b1fae2d24d275612c7040617e964e7be61368df..d559428818ffc1ee9f2bc19dc7673ee6ab12bf04 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >@@ -607,8 +607,8 @@ std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(Can > } > > auto& extensions = context->getExtensions(); >- if (extensions.supports(ASCIILiteral { "GL_EXT_debug_marker" })) >- extensions.pushGroupMarkerEXT(ASCIILiteral { "WebGLRenderingContext" }); >+ if (extensions.supports("GL_EXT_debug_marker"_s)) >+ extensions.pushGroupMarkerEXT("WebGLRenderingContext"_s); > > #if ENABLE(WEBGL2) && PLATFORM(MAC) > // glTexStorage() was only added to Core in OpenGL 4.2. >@@ -6172,17 +6172,17 @@ namespace { > { > switch (error) { > case GraphicsContext3D::INVALID_ENUM: >- return ASCIILiteral("INVALID_ENUM"); >+ return "INVALID_ENUM"_s; > case GraphicsContext3D::INVALID_VALUE: >- return ASCIILiteral("INVALID_VALUE"); >+ return "INVALID_VALUE"_s; > case GraphicsContext3D::INVALID_OPERATION: >- return ASCIILiteral("INVALID_OPERATION"); >+ return "INVALID_OPERATION"_s; > case GraphicsContext3D::OUT_OF_MEMORY: >- return ASCIILiteral("OUT_OF_MEMORY"); >+ return "OUT_OF_MEMORY"_s; > case GraphicsContext3D::INVALID_FRAMEBUFFER_OPERATION: >- return ASCIILiteral("INVALID_FRAMEBUFFER_OPERATION"); >+ return "INVALID_FRAMEBUFFER_OPERATION"_s; > case GraphicsContext3D::CONTEXT_LOST_WEBGL: >- return ASCIILiteral("CONTEXT_LOST_WEBGL"); >+ return "CONTEXT_LOST_WEBGL"_s; > default: > return String::format("WebGL ERROR(%04x)", error); > } >@@ -6360,11 +6360,11 @@ void WebGLRenderingContextBase::vertexAttribDivisor(GC3Duint index, GC3Duint div > m_context->vertexAttribDivisor(index, divisor); > } > >-bool WebGLRenderingContextBase::enableSupportedExtension(const char* extensionNameLiteral) >+bool WebGLRenderingContextBase::enableSupportedExtension(ASCIILiteral extensionNameLiteral) > { > ASSERT(m_context); > auto& extensions = m_context->getExtensions(); >- String extensionName { ASCIILiteral { extensionNameLiteral } }; >+ String extensionName { extensionNameLiteral }; > if (!extensions.supports(extensionName)) > return false; > extensions.ensureEnabled(extensionName); >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.h b/Source/WebCore/html/canvas/WebGLRenderingContextBase.h >index 579883e51e5c21aa0eb8512e7a35b9bc7b703361..71b0d543c2294298e4c90e42e36f6c1d85c81d84 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.h >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.h >@@ -435,7 +435,7 @@ class WebGLRenderingContextBase : public GPUBasedCanvasRenderingContext, private > > WebGLTexture::TextureExtensionFlag textureExtensionFlags() const; > >- bool enableSupportedExtension(const char* extensionNameLiteral); >+ bool enableSupportedExtension(ASCIILiteral extensionNameLiteral); > > RefPtr<GraphicsContext3D> m_context; > RefPtr<WebGLContextGroup> m_contextGroup; >diff --git a/Source/WebCore/html/canvas/WebGPUEnums.cpp b/Source/WebCore/html/canvas/WebGPUEnums.cpp >index e1b496623efafe08d8fd587925915ff4aa9a63e7..2659014537dbe1d020ce7d84d8358feee4b4774f 100644 >--- a/Source/WebCore/html/canvas/WebGPUEnums.cpp >+++ b/Source/WebCore/html/canvas/WebGPUEnums.cpp >@@ -58,21 +58,21 @@ std::optional<WebGPUCompareFunction> toWebGPUCompareFunction(const String& name) > String web3DCompareFunctionName(const WebGPUCompareFunction value) > { > if (value == WebGPUCompareFunction::Never) >- return ASCIILiteral("never"); >+ return "never"_s; > if (value == WebGPUCompareFunction::Less) >- return ASCIILiteral("less"); >+ return "less"_s; > if (value == WebGPUCompareFunction::Equal) >- return ASCIILiteral("equal"); >+ return "equal"_s; > if (value == WebGPUCompareFunction::Lessequal) >- return ASCIILiteral("lessequal"); >+ return "lessequal"_s; > if (value == WebGPUCompareFunction::Greater) >- return ASCIILiteral("greater"); >+ return "greater"_s; > if (value == WebGPUCompareFunction::Notequal) >- return ASCIILiteral("notequal"); >+ return "notequal"_s; > if (value == WebGPUCompareFunction::Greaterequal) >- return ASCIILiteral("greaterequal"); >+ return "greaterequal"_s; > if (value == WebGPUCompareFunction::Always) >- return ASCIILiteral("always"); >+ return "always"_s; > > ASSERT_NOT_REACHED(); > return emptyString(); >diff --git a/Source/WebCore/html/parser/HTMLParserIdioms.cpp b/Source/WebCore/html/parser/HTMLParserIdioms.cpp >index 6c86148367776489c154ebfafd0649d65ba47264..674debc698db9b7002eb4052335b9e6db81b64a3 100644 >--- a/Source/WebCore/html/parser/HTMLParserIdioms.cpp >+++ b/Source/WebCore/html/parser/HTMLParserIdioms.cpp >@@ -349,8 +349,8 @@ String parseCORSSettingsAttribute(const AtomicString& value) > if (value.isNull()) > return String(); > if (equalIgnoringASCIICase(value, "use-credentials")) >- return ASCIILiteral("use-credentials"); >- return ASCIILiteral("anonymous"); >+ return "use-credentials"_s; >+ return "anonymous"_s; > } > > // https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh >diff --git a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp b/Source/WebCore/html/parser/HTMLPreloadScanner.cpp >index aa6e839b3a808e160e28d36533c617a68ddee8a1..15c5a65d996993a04d315fc0343ede81f1425b05 100644 >--- a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp >+++ b/Source/WebCore/html/parser/HTMLPreloadScanner.cpp >@@ -80,13 +80,13 @@ String TokenPreloadScanner::initiatorFor(TagId tagId) > switch (tagId) { > case TagId::Source: > case TagId::Img: >- return ASCIILiteral("img"); >+ return "img"_s; > case TagId::Input: >- return ASCIILiteral("input"); >+ return "input"_s; > case TagId::Link: >- return ASCIILiteral("link"); >+ return "link"_s; > case TagId::Script: >- return ASCIILiteral("script"); >+ return "script"_s; > case TagId::Unknown: > case TagId::Style: > case TagId::Base: >@@ -94,10 +94,10 @@ String TokenPreloadScanner::initiatorFor(TagId tagId) > case TagId::Meta: > case TagId::Picture: > ASSERT_NOT_REACHED(); >- return ASCIILiteral("unknown"); >+ return "unknown"_s; > } > ASSERT_NOT_REACHED(); >- return ASCIILiteral("unknown"); >+ return "unknown"_s; > } > > class TokenPreloadScanner::StartTagScanner { >diff --git a/Source/WebCore/html/parser/HTMLResourcePreloader.cpp b/Source/WebCore/html/parser/HTMLResourcePreloader.cpp >index c9e3bb58ded40e7ae808a23ab77983fb483abaac..7221a8b37479f9eb75474e7afc4161e629b50ff8 100644 >--- a/Source/WebCore/html/parser/HTMLResourcePreloader.cpp >+++ b/Source/WebCore/html/parser/HTMLResourcePreloader.cpp >@@ -58,7 +58,7 @@ CachedResourceRequest PreloadRequest::resourceRequest(Document& document) > String crossOriginMode = m_crossOriginMode; > if (m_moduleScript == ModuleScript::Yes) { > if (crossOriginMode.isNull()) >- crossOriginMode = ASCIILiteral("omit"); >+ crossOriginMode = "omit"_s; > } > request.setAsPotentiallyCrossOrigin(crossOriginMode, document); > return request; >diff --git a/Source/WebCore/html/parser/HTMLTreeBuilder.cpp b/Source/WebCore/html/parser/HTMLTreeBuilder.cpp >index 603fc5718a1b531156b27c222f9c7adcc60b685f..eba8d1db0c15d272b0e36f9dae472f6e6c2c4021 100644 >--- a/Source/WebCore/html/parser/HTMLTreeBuilder.cpp >+++ b/Source/WebCore/html/parser/HTMLTreeBuilder.cpp >@@ -2197,7 +2197,7 @@ void HTMLTreeBuilder::processCharacter(AtomicHTMLToken&& token) > void HTMLTreeBuilder::insertPhoneNumberLink(const String& string) > { > Vector<Attribute> attributes; >- attributes.append(Attribute(HTMLNames::hrefAttr, ASCIILiteral("tel:") + string)); >+ attributes.append(Attribute(HTMLNames::hrefAttr, "tel:"_s + string)); > > const AtomicString& aTagLocalName = aTag->localName(); > AtomicHTMLToken aStartToken(HTMLToken::StartTag, aTagLocalName, WTFMove(attributes)); >diff --git a/Source/WebCore/html/track/DataCue.cpp b/Source/WebCore/html/track/DataCue.cpp >index 072b42198bf347f72bacf8907f9997f444bffefa..755c019eed90348760b4d8889dada6ed89bbecc6 100644 >--- a/Source/WebCore/html/track/DataCue.cpp >+++ b/Source/WebCore/html/track/DataCue.cpp >@@ -194,7 +194,7 @@ String DataCue::toJSONString() const > TextTrackCue::toJSON(object.get()); > > if (!m_type.isEmpty()) >- object->setString(ASCIILiteral("type"), m_type); >+ object->setString("type"_s, m_type); > > return object->toJSONString(); > } >diff --git a/Source/WebCore/html/track/InbandGenericTextTrack.cpp b/Source/WebCore/html/track/InbandGenericTextTrack.cpp >index 7e3e39d677344b8bf1c04935a5955c4606a9868a..94e2ac9cf197b7a0922803293c0118acdca14c02 100644 >--- a/Source/WebCore/html/track/InbandGenericTextTrack.cpp >+++ b/Source/WebCore/html/track/InbandGenericTextTrack.cpp >@@ -107,11 +107,11 @@ void InbandGenericTextTrack::updateCueFromCueData(TextTrackCueGeneric& cue, Gene > cue.setHighlightColor(cueData.highlightColor().rgb()); > > if (cueData.align() == GenericCueData::Start) >- cue.setAlign(ASCIILiteral("start")); >+ cue.setAlign("start"_s); > else if (cueData.align() == GenericCueData::Middle) >- cue.setAlign(ASCIILiteral("middle")); >+ cue.setAlign("middle"_s); > else if (cueData.align() == GenericCueData::End) >- cue.setAlign(ASCIILiteral("end")); >+ cue.setAlign("end"_s); > cue.setSnapToLines(false); > > cue.didChange(); >diff --git a/Source/WebCore/html/track/TextTrackCue.cpp b/Source/WebCore/html/track/TextTrackCue.cpp >index cfb67ae398b655bba2811162047fe4129342b422..c47b4805390b5419fd4a68cb74857e3749b2135c 100644 >--- a/Source/WebCore/html/track/TextTrackCue.cpp >+++ b/Source/WebCore/html/track/TextTrackCue.cpp >@@ -218,22 +218,22 @@ bool TextTrackCue::doesExtendCue(const TextTrackCue& cue) const > > void TextTrackCue::toJSON(JSON::Object& value) const > { >- const char* type = "Generic"; >+ ASCIILiteral type = "Generic"_s; > switch (cueType()) { > case TextTrackCue::Generic: >- type = "Generic"; >+ type = "Generic"_s; > break; > case TextTrackCue::WebVTT: >- type = "WebVTT"; >+ type = "WebVTT"_s; > break; > case TextTrackCue::Data: >- type = "Data"; >+ type = "Data"_s; > break; > } > >- value.setString(ASCIILiteral("type"), ASCIILiteral(type)); >- value.setDouble(ASCIILiteral("startTime"), startTime()); >- value.setDouble(ASCIILiteral("endTime"), endTime()); >+ value.setString("type"_s, type); >+ value.setDouble("startTime"_s, startTime()); >+ value.setDouble("endTime"_s, endTime()); > } > > String TextTrackCue::toJSONString() const >diff --git a/Source/WebCore/html/track/TextTrackCueGeneric.cpp b/Source/WebCore/html/track/TextTrackCueGeneric.cpp >index c0da58b18ef7a9709e8a161deec184774a1c0f06..95a341972fa577713fd98190c8c0df96018caa4a 100644 >--- a/Source/WebCore/html/track/TextTrackCueGeneric.cpp >+++ b/Source/WebCore/html/track/TextTrackCueGeneric.cpp >@@ -275,17 +275,17 @@ String TextTrackCueGeneric::toJSONString() const > toJSON(object.get()); > > if (m_foregroundColor.isValid()) >- object->setString(ASCIILiteral("foregroundColor"), m_foregroundColor.serialized()); >+ object->setString("foregroundColor"_s, m_foregroundColor.serialized()); > if (m_backgroundColor.isValid()) >- object->setString(ASCIILiteral("backgroundColor"), m_backgroundColor.serialized()); >+ object->setString("backgroundColor"_s, m_backgroundColor.serialized()); > if (m_highlightColor.isValid()) >- object->setString(ASCIILiteral("highlightColor"), m_highlightColor.serialized()); >+ object->setString("highlightColor"_s, m_highlightColor.serialized()); > if (m_baseFontSizeRelativeToVideoHeight) >- object->setDouble(ASCIILiteral("relativeFontSize"), m_baseFontSizeRelativeToVideoHeight); >+ object->setDouble("relativeFontSize"_s, m_baseFontSizeRelativeToVideoHeight); > if (m_fontSizeMultiplier) >- object->setDouble(ASCIILiteral("fontSizeMultiplier"), m_fontSizeMultiplier); >+ object->setDouble("fontSizeMultiplier"_s, m_fontSizeMultiplier); > if (!m_fontName.isEmpty()) >- object->setString(ASCIILiteral("font"), m_fontName); >+ object->setString("font"_s, m_fontName); > > return object->toJSONString(); > } >diff --git a/Source/WebCore/html/track/TrackBase.cpp b/Source/WebCore/html/track/TrackBase.cpp >index 333a2f8b6cbeca67be326e17e894879c61a6a2ad..746ac2ebc7fa4268643d4845a987f4a921dd5229 100644 >--- a/Source/WebCore/html/track/TrackBase.cpp >+++ b/Source/WebCore/html/track/TrackBase.cpp >@@ -147,7 +147,7 @@ void TrackBase::setLanguage(const AtomicString& language) > if (!language.isEmpty() && !isValidBCP47LanguageTag(language)) { > String message; > if (language.contains((UChar)'\0')) >- message = WTF::ASCIILiteral("The language contains a null character and is not a valid BCP 47 language tag."); >+ message = "The language contains a null character and is not a valid BCP 47 language tag."_s; > else { > StringBuilder stringBuilder; > stringBuilder.appendLiteral("The language '"); >diff --git a/Source/WebCore/html/track/VTTCue.cpp b/Source/WebCore/html/track/VTTCue.cpp >index 40406f45c68df23d4df4492867ddd28e54be4ea2..191074c1681c93925a856e5429a3a9ee1825f71b 100644 >--- a/Source/WebCore/html/track/VTTCue.cpp >+++ b/Source/WebCore/html/track/VTTCue.cpp >@@ -1192,15 +1192,15 @@ void VTTCue::toJSON(JSON::Object& object) const > TextTrackCue::toJSON(object); > > #if !LOG_DISABLED >- object.setString(ASCIILiteral("text"), text()); >+ object.setString("text"_s, text()); > #endif >- object.setString(ASCIILiteral("vertical"), vertical()); >- object.setBoolean(ASCIILiteral("snapToLines"), snapToLines()); >- object.setDouble(ASCIILiteral("line"), m_linePosition); >- object.setDouble(ASCIILiteral("position"), position()); >- object.setInteger(ASCIILiteral("size"), m_cueSize); >- object.setString(ASCIILiteral("align"), align()); >- object.setString(ASCIILiteral("regionId"), regionId()); >+ object.setString("vertical"_s, vertical()); >+ object.setBoolean("snapToLines"_s, snapToLines()); >+ object.setDouble("line"_s, m_linePosition); >+ object.setDouble("position"_s, position()); >+ object.setInteger("size"_s, m_cueSize); >+ object.setString("align"_s, align()); >+ object.setString("regionId"_s, regionId()); > } > > } // namespace WebCore >diff --git a/Source/WebCore/inspector/CommandLineAPIModule.cpp b/Source/WebCore/inspector/CommandLineAPIModule.cpp >index dcd6b27d5e28b7f6265018f4b390d2e8b6b43268..c8bc6636d21bc6977e814670017a1d61ca8b79a8 100644 >--- a/Source/WebCore/inspector/CommandLineAPIModule.cpp >+++ b/Source/WebCore/inspector/CommandLineAPIModule.cpp >@@ -44,7 +44,7 @@ void CommandLineAPIModule::injectIfNeeded(InjectedScriptManager* injectedScriptM > } > > CommandLineAPIModule::CommandLineAPIModule() >- : InjectedScriptModule(ASCIILiteral("CommandLineAPI")) >+ : InjectedScriptModule("CommandLineAPI"_s) > { > } > >diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp >index 893eeaa9293554f651052a6d0e187179ca54b182..3b2284fcddd28d212d19a2dcbe4265af0351448c 100644 >--- a/Source/WebCore/inspector/InspectorCanvas.cpp >+++ b/Source/WebCore/inspector/InspectorCanvas.cpp >@@ -318,7 +318,7 @@ String InspectorCanvas::getCanvasContentAsDataURL() > downcast<WebGLRenderingContextBase>(m_context).setPreventBufferClearForInspector(true); > #endif > >- ExceptionOr<UncachedString> result = node->toDataURL(ASCIILiteral("image/png")); >+ ExceptionOr<UncachedString> result = node->toDataURL("image/png"_s); > > #if ENABLE(WEBGL) > if (is<WebGLRenderingContextBase>(m_context)) >@@ -345,7 +345,7 @@ int InspectorCanvas::indexForData(DuplicateDataVariant data) > RefPtr<JSON::Value> item; > WTF::switchOn(data, > [&] (const HTMLImageElement* imageElement) { >- String dataURL = ASCIILiteral("data:,"); >+ String dataURL = "data:,"_s; > > if (CachedImage* cachedImage = imageElement->cachedImage()) { > Image* image = cachedImage->image(); >@@ -360,7 +360,7 @@ int InspectorCanvas::indexForData(DuplicateDataVariant data) > }, > #if ENABLE(VIDEO) > [&] (HTMLVideoElement* videoElement) { >- String dataURL = ASCIILiteral("data:,"); >+ String dataURL = "data:,"_s; > > unsigned videoWidth = videoElement->videoWidth(); > unsigned videoHeight = videoElement->videoHeight(); >@@ -374,9 +374,9 @@ int InspectorCanvas::indexForData(DuplicateDataVariant data) > }, > #endif > [&] (HTMLCanvasElement* canvasElement) { >- String dataURL = ASCIILiteral("data:,"); >+ String dataURL = "data:,"_s; > >- ExceptionOr<UncachedString> result = canvasElement->toDataURL(ASCIILiteral("image/png")); >+ ExceptionOr<UncachedString> result = canvasElement->toDataURL("image/png"_s); > if (!result.hasException()) > dataURL = result.releaseReturnValue().string; > >@@ -436,8 +436,8 @@ Ref<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildInitialS > auto initialState = Inspector::Protocol::Recording::InitialState::create().release(); > > auto attributes = JSON::Object::create(); >- attributes->setInteger(ASCIILiteral("width"), m_context.canvasBase().width()); >- attributes->setInteger(ASCIILiteral("height"), m_context.canvasBase().height()); >+ attributes->setInteger("width"_s, m_context.canvasBase().width()); >+ attributes->setInteger("height"_s, m_context.canvasBase().height()); > > auto parameters = JSON::ArrayOf<JSON::Value>::create(); > >@@ -445,29 +445,29 @@ Ref<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildInitialS > auto& context2d = downcast<CanvasRenderingContext2D>(m_context); > auto& state = context2d.state(); > >- attributes->setArray(ASCIILiteral("setTransform"), buildArrayForAffineTransform(state.transform)); >- attributes->setDouble(ASCIILiteral("globalAlpha"), context2d.globalAlpha()); >- attributes->setInteger(ASCIILiteral("globalCompositeOperation"), indexForData(context2d.globalCompositeOperation())); >- attributes->setDouble(ASCIILiteral("lineWidth"), context2d.lineWidth()); >- attributes->setInteger(ASCIILiteral("lineCap"), indexForData(convertEnumerationToString(context2d.lineCap()))); >- attributes->setInteger(ASCIILiteral("lineJoin"), indexForData(convertEnumerationToString(context2d.lineJoin()))); >- attributes->setDouble(ASCIILiteral("miterLimit"), context2d.miterLimit()); >- attributes->setDouble(ASCIILiteral("shadowOffsetX"), context2d.shadowOffsetX()); >- attributes->setDouble(ASCIILiteral("shadowOffsetY"), context2d.shadowOffsetY()); >- attributes->setDouble(ASCIILiteral("shadowBlur"), context2d.shadowBlur()); >- attributes->setInteger(ASCIILiteral("shadowColor"), indexForData(context2d.shadowColor())); >+ attributes->setArray("setTransform"_s, buildArrayForAffineTransform(state.transform)); >+ attributes->setDouble("globalAlpha"_s, context2d.globalAlpha()); >+ attributes->setInteger("globalCompositeOperation"_s, indexForData(context2d.globalCompositeOperation())); >+ attributes->setDouble("lineWidth"_s, context2d.lineWidth()); >+ attributes->setInteger("lineCap"_s, indexForData(convertEnumerationToString(context2d.lineCap()))); >+ attributes->setInteger("lineJoin"_s, indexForData(convertEnumerationToString(context2d.lineJoin()))); >+ attributes->setDouble("miterLimit"_s, context2d.miterLimit()); >+ attributes->setDouble("shadowOffsetX"_s, context2d.shadowOffsetX()); >+ attributes->setDouble("shadowOffsetY"_s, context2d.shadowOffsetY()); >+ attributes->setDouble("shadowBlur"_s, context2d.shadowBlur()); >+ attributes->setInteger("shadowColor"_s, indexForData(context2d.shadowColor())); > > // The parameter to `setLineDash` is itself an array, so we need to wrap the parameters > // list in an array to allow spreading. > auto setLineDash = JSON::ArrayOf<JSON::Value>::create(); > setLineDash->addItem(buildArrayForVector(state.lineDash)); >- attributes->setArray(ASCIILiteral("setLineDash"), WTFMove(setLineDash)); >+ attributes->setArray("setLineDash"_s, WTFMove(setLineDash)); > >- attributes->setDouble(ASCIILiteral("lineDashOffset"), context2d.lineDashOffset()); >- attributes->setInteger(ASCIILiteral("font"), indexForData(context2d.font())); >- attributes->setInteger(ASCIILiteral("textAlign"), indexForData(convertEnumerationToString(context2d.textAlign()))); >- attributes->setInteger(ASCIILiteral("textBaseline"), indexForData(convertEnumerationToString(context2d.textBaseline()))); >- attributes->setInteger(ASCIILiteral("direction"), indexForData(convertEnumerationToString(context2d.direction()))); >+ attributes->setDouble("lineDashOffset"_s, context2d.lineDashOffset()); >+ attributes->setInteger("font"_s, indexForData(context2d.font())); >+ attributes->setInteger("textAlign"_s, indexForData(convertEnumerationToString(context2d.textAlign()))); >+ attributes->setInteger("textBaseline"_s, indexForData(convertEnumerationToString(context2d.textBaseline()))); >+ attributes->setInteger("direction"_s, indexForData(convertEnumerationToString(context2d.direction()))); > > int strokeStyleIndex; > if (auto canvasGradient = state.strokeStyle.canvasGradient()) >@@ -476,7 +476,7 @@ Ref<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildInitialS > strokeStyleIndex = indexForData(canvasPattern.get()); > else > strokeStyleIndex = indexForData(state.strokeStyle.color()); >- attributes->setInteger(ASCIILiteral("strokeStyle"), strokeStyleIndex); >+ attributes->setInteger("strokeStyle"_s, strokeStyleIndex); > > int fillStyleIndex; > if (auto canvasGradient = state.fillStyle.canvasGradient()) >@@ -485,27 +485,27 @@ Ref<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildInitialS > fillStyleIndex = indexForData(canvasPattern.get()); > else > fillStyleIndex = indexForData(state.fillStyle.color()); >- attributes->setInteger(ASCIILiteral("fillStyle"), fillStyleIndex); >+ attributes->setInteger("fillStyle"_s, fillStyleIndex); > >- attributes->setBoolean(ASCIILiteral("imageSmoothingEnabled"), context2d.imageSmoothingEnabled()); >- attributes->setInteger(ASCIILiteral("imageSmoothingQuality"), indexForData(convertEnumerationToString(context2d.imageSmoothingQuality()))); >+ attributes->setBoolean("imageSmoothingEnabled"_s, context2d.imageSmoothingEnabled()); >+ attributes->setInteger("imageSmoothingQuality"_s, indexForData(convertEnumerationToString(context2d.imageSmoothingQuality()))); > > auto setPath = JSON::ArrayOf<JSON::Value>::create(); > setPath->addItem(indexForData(buildStringFromPath(context2d.getPath()->path()))); >- attributes->setArray(ASCIILiteral("setPath"), WTFMove(setPath)); >+ attributes->setArray("setPath"_s, WTFMove(setPath)); > } > #if ENABLE(WEBGL) > else if (is<WebGLRenderingContextBase>(m_context)) { > WebGLRenderingContextBase& contextWebGLBase = downcast<WebGLRenderingContextBase>(m_context); > if (std::optional<WebGLContextAttributes> attributes = contextWebGLBase.getContextAttributes()) { > RefPtr<JSON::Object> contextAttributes = JSON::Object::create(); >- contextAttributes->setBoolean(ASCIILiteral("alpha"), attributes->alpha); >- contextAttributes->setBoolean(ASCIILiteral("depth"), attributes->depth); >- contextAttributes->setBoolean(ASCIILiteral("stencil"), attributes->stencil); >- contextAttributes->setBoolean(ASCIILiteral("antialias"), attributes->antialias); >- contextAttributes->setBoolean(ASCIILiteral("premultipliedAlpha"), attributes->premultipliedAlpha); >- contextAttributes->setBoolean(ASCIILiteral("preserveDrawingBuffer"), attributes->preserveDrawingBuffer); >- contextAttributes->setBoolean(ASCIILiteral("failIfMajorPerformanceCaveat"), attributes->failIfMajorPerformanceCaveat); >+ contextAttributes->setBoolean("alpha"_s, attributes->alpha); >+ contextAttributes->setBoolean("depth"_s, attributes->depth); >+ contextAttributes->setBoolean("stencil"_s, attributes->stencil); >+ contextAttributes->setBoolean("antialias"_s, attributes->antialias); >+ contextAttributes->setBoolean("premultipliedAlpha"_s, attributes->premultipliedAlpha); >+ contextAttributes->setBoolean("preserveDrawingBuffer"_s, attributes->preserveDrawingBuffer); >+ contextAttributes->setBoolean("failIfMajorPerformanceCaveat"_s, attributes->failIfMajorPerformanceCaveat); > parameters->addItem(WTFMove(contextAttributes)); > } > } >@@ -614,7 +614,7 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildArrayForCanvasGradient(con > { > const auto& gradient = canvasGradient.gradient(); > >- String type = gradient.type() == Gradient::Type::Radial ? ASCIILiteral("radial-gradient") : ASCIILiteral("linear-gradient"); >+ String type = gradient.type() == Gradient::Type::Radial ? "radial-gradient"_s : "linear-gradient"_s; > > auto parameters = JSON::ArrayOf<float>::create(); > WTF::switchOn(gradient.data(), >@@ -659,13 +659,13 @@ Ref<JSON::ArrayOf<JSON::Value>> InspectorCanvas::buildArrayForCanvasPattern(cons > bool repeatX = canvasPattern.pattern().repeatX(); > bool repeatY = canvasPattern.pattern().repeatY(); > if (repeatX && repeatY) >- repeat = ASCIILiteral("repeat"); >+ repeat = "repeat"_s; > else if (repeatX && !repeatY) >- repeat = ASCIILiteral("repeat-x"); >+ repeat = "repeat-x"_s; > else if (!repeatX && repeatY) >- repeat = ASCIILiteral("repeat-y"); >+ repeat = "repeat-y"_s; > else >- repeat = ASCIILiteral("no-repeat"); >+ repeat = "no-repeat"_s; > > auto array = JSON::ArrayOf<JSON::Value>::create(); > array->addItem(indexForData(imageBuffer->toDataURL("image/png"))); >diff --git a/Source/WebCore/inspector/InspectorFrontendClient.h b/Source/WebCore/inspector/InspectorFrontendClient.h >index b271a70ba76dc301b2b89805f8f3d01930175201..36231003f933a98213f98b539ea21ab318d53a8d 100644 >--- a/Source/WebCore/inspector/InspectorFrontendClient.h >+++ b/Source/WebCore/inspector/InspectorFrontendClient.h >@@ -56,7 +56,7 @@ class InspectorFrontendClient { > virtual String localizedStringsURL() = 0; > virtual unsigned inspectionLevel() const = 0; > virtual String backendCommandsURL() { return String(); }; >- virtual String debuggableType() { return ASCIILiteral("web"); } >+ virtual String debuggableType() { return "web"_s; } > > virtual void bringToFront() = 0; > virtual void closeWindow() = 0; >diff --git a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >index 49657480032f83f224dc5894b42d68937d519340..8e1c4829dff5beac1d6fc03209cebfd0c4505774 100644 >--- a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >+++ b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp >@@ -227,7 +227,7 @@ void InspectorFrontendClientLocal::openInNewTab(const String& url) > { > UserGestureIndicator indicator { ProcessingUserGesture }; > Frame& mainFrame = m_inspectedPageController->inspectedPage().mainFrame(); >- FrameLoadRequest frameLoadRequest { *mainFrame.document(), mainFrame.document()->securityOrigin(), { }, ASCIILiteral("_blank"), LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; >+ FrameLoadRequest frameLoadRequest { *mainFrame.document(), mainFrame.document()->securityOrigin(), { }, "_blank"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; > > bool created; > RefPtr<Frame> frame = WebCore::createWindow(mainFrame, mainFrame, WTFMove(frameLoadRequest), { }, created); >@@ -239,7 +239,7 @@ void InspectorFrontendClientLocal::openInNewTab(const String& url) > > // FIXME: Why do we compute the absolute URL with respect to |frame| instead of |mainFrame|? > ResourceRequest resourceRequest { frame->document()->completeURL(url) }; >- FrameLoadRequest frameLoadRequest2 { *mainFrame.document(), mainFrame.document()->securityOrigin(), resourceRequest, ASCIILiteral("_self"), LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; >+ FrameLoadRequest frameLoadRequest2 { *mainFrame.document(), mainFrame.document()->securityOrigin(), resourceRequest, "_self"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; > frame->loader().changeLocation(WTFMove(frameLoadRequest2)); > } > >diff --git a/Source/WebCore/inspector/InspectorFrontendHost.cpp b/Source/WebCore/inspector/InspectorFrontendHost.cpp >index eb0f525a7a9bda4465a52c19fa5bdd19cb9c0143..55f3d4879183ffabb0fc862be756200ba584e882 100644 >--- a/Source/WebCore/inspector/InspectorFrontendHost.cpp >+++ b/Source/WebCore/inspector/InspectorFrontendHost.cpp >@@ -218,9 +218,9 @@ float InspectorFrontendHost::zoomFactor() > String InspectorFrontendHost::userInterfaceLayoutDirection() > { > if (m_client && m_client->userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::RTL) >- return ASCIILiteral("rtl"); >+ return "rtl"_s; > >- return ASCIILiteral("ltr"); >+ return "ltr"_s; > } > > void InspectorFrontendHost::setAttachedWindowHeight(unsigned height) >@@ -270,26 +270,26 @@ unsigned InspectorFrontendHost::inspectionLevel() > String InspectorFrontendHost::platform() > { > #if PLATFORM(MAC) || PLATFORM(IOS) >- return ASCIILiteral("mac"); >+ return "mac"_s; > #elif OS(WINDOWS) >- return ASCIILiteral("windows"); >+ return "windows"_s; > #elif OS(LINUX) >- return ASCIILiteral("linux"); >+ return "linux"_s; > #elif OS(FREEBSD) >- return ASCIILiteral("freebsd"); >+ return "freebsd"_s; > #elif OS(OPENBSD) >- return ASCIILiteral("openbsd"); >+ return "openbsd"_s; > #else >- return ASCIILiteral("unknown"); >+ return "unknown"_s; > #endif > } > > String InspectorFrontendHost::port() > { > #if PLATFORM(GTK) >- return ASCIILiteral("gtk"); >+ return "gtk"_s; > #else >- return ASCIILiteral("unknown"); >+ return "unknown"_s; > #endif > } > >diff --git a/Source/WebCore/inspector/InspectorOverlay.cpp b/Source/WebCore/inspector/InspectorOverlay.cpp >index 328218f9c2c0362548172ec22ab19c1c9317f18c..f4007ddff191cd64c680ee7440f85bf2985d6eff 100644 >--- a/Source/WebCore/inspector/InspectorOverlay.cpp >+++ b/Source/WebCore/inspector/InspectorOverlay.cpp >@@ -259,9 +259,9 @@ void InspectorOverlay::setIndicating(bool indicating) > m_indicating = indicating; > > if (m_indicating) >- evaluateInOverlay(ASCIILiteral("showPageIndication")); >+ evaluateInOverlay("showPageIndication"_s); > else >- evaluateInOverlay(ASCIILiteral("hidePageIndication")); >+ evaluateInOverlay("hidePageIndication"_s); > > update(); > } >@@ -429,12 +429,12 @@ void InspectorOverlay::drawPaintRects() > for (const auto& pair : m_paintRects) > arrayOfRects->addItem(buildObjectForRect(pair.second)); > >- evaluateInOverlay(ASCIILiteral("updatePaintRects"), WTFMove(arrayOfRects)); >+ evaluateInOverlay("updatePaintRects"_s, WTFMove(arrayOfRects)); > } > > void InspectorOverlay::drawRulers() > { >- evaluateInOverlay(ASCIILiteral("drawRulers")); >+ evaluateInOverlay("drawRulers"_s); > } > > static RefPtr<JSON::ArrayOf<Inspector::Protocol::OverlayTypes::FragmentHighlightData>> buildArrayForRendererFragments(RenderObject* renderer, const HighlightConfig& config) >@@ -482,23 +482,23 @@ static void appendPathSegment(PathApplyInfo& pathApplyInfo, const PathElement& p > switch (pathElement.type) { > // The points member will contain 1 value. > case PathElementMoveToPoint: >- appendPathCommandAndPoints(pathApplyInfo, ASCIILiteral("M"), pathElement.points, 1); >+ appendPathCommandAndPoints(pathApplyInfo, "M"_s, pathElement.points, 1); > break; > // The points member will contain 1 value. > case PathElementAddLineToPoint: >- appendPathCommandAndPoints(pathApplyInfo, ASCIILiteral("L"), pathElement.points, 1); >+ appendPathCommandAndPoints(pathApplyInfo, "L"_s, pathElement.points, 1); > break; > // The points member will contain 3 values. > case PathElementAddCurveToPoint: >- appendPathCommandAndPoints(pathApplyInfo, ASCIILiteral("C"), pathElement.points, 3); >+ appendPathCommandAndPoints(pathApplyInfo, "C"_s, pathElement.points, 3); > break; > // The points member will contain 2 values. > case PathElementAddQuadCurveToPoint: >- appendPathCommandAndPoints(pathApplyInfo, ASCIILiteral("Q"), pathElement.points, 2); >+ appendPathCommandAndPoints(pathApplyInfo, "Q"_s, pathElement.points, 2); > break; > // The points member will contain no values. > case PathElementCloseSubpath: >- appendPathCommandAndPoints(pathApplyInfo, ASCIILiteral("Z"), nullptr, 0); >+ appendPathCommandAndPoints(pathApplyInfo, "Z"_s, nullptr, 0); > break; > } > } >diff --git a/Source/WebCore/inspector/InspectorStyleSheet.h b/Source/WebCore/inspector/InspectorStyleSheet.h >index 32cec9eea325bf8b6f6b07fd975301b31e42325e..eb48f67d3ea5f2c846bc86e46405e3484d4aac35 100644 >--- a/Source/WebCore/inspector/InspectorStyleSheet.h >+++ b/Source/WebCore/inspector/InspectorStyleSheet.h >@@ -53,10 +53,10 @@ class InspectorCSSId { > > explicit InspectorCSSId(const JSON::Object& value) > { >- if (!value.getString(ASCIILiteral("styleSheetId"), m_styleSheetId)) >+ if (!value.getString("styleSheetId"_s, m_styleSheetId)) > return; > >- if (!value.getInteger(ASCIILiteral("ordinal"), m_ordinal)) >+ if (!value.getInteger("ordinal"_s, m_ordinal)) > m_styleSheetId = String(); > } > >diff --git a/Source/WebCore/inspector/TimelineRecordFactory.cpp b/Source/WebCore/inspector/TimelineRecordFactory.cpp >index 1d9b7c747dba9c2bc6fe3bee2d2482c614f6040d..cc6c1b35adccb3eb5593f0f006cf4fbf50f1ea7f 100644 >--- a/Source/WebCore/inspector/TimelineRecordFactory.cpp >+++ b/Source/WebCore/inspector/TimelineRecordFactory.cpp >@@ -47,12 +47,12 @@ using namespace Inspector; > Ref<JSON::Object> TimelineRecordFactory::createGenericRecord(double startTime, int maxCallStackDepth) > { > Ref<JSON::Object> record = JSON::Object::create(); >- record->setDouble(ASCIILiteral("startTime"), startTime); >+ record->setDouble("startTime"_s, startTime); > > if (maxCallStackDepth) { > Ref<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth); > if (stackTrace->size()) >- record->setValue(ASCIILiteral("stackTrace"), stackTrace->buildInspectorArray()); >+ record->setValue("stackTrace"_s, stackTrace->buildInspectorArray()); > } > return record; > } >@@ -60,68 +60,68 @@ Ref<JSON::Object> TimelineRecordFactory::createGenericRecord(double startTime, i > Ref<JSON::Object> TimelineRecordFactory::createFunctionCallData(const String& scriptName, int scriptLine) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setString(ASCIILiteral("scriptName"), scriptName); >- data->setInteger(ASCIILiteral("scriptLine"), scriptLine); >+ data->setString("scriptName"_s, scriptName); >+ data->setInteger("scriptLine"_s, scriptLine); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createConsoleProfileData(const String& title) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setString(ASCIILiteral("title"), title); >+ data->setString("title"_s, title); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createProbeSampleData(const ScriptBreakpointAction& action, unsigned sampleId) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setInteger(ASCIILiteral("probeId"), action.identifier); >- data->setInteger(ASCIILiteral("sampleId"), sampleId); >+ data->setInteger("probeId"_s, action.identifier); >+ data->setInteger("sampleId"_s, sampleId); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createEventDispatchData(const Event& event) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setString(ASCIILiteral("type"), event.type().string()); >+ data->setString("type"_s, event.type().string()); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createGenericTimerData(int timerId) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setInteger(ASCIILiteral("timerId"), timerId); >+ data->setInteger("timerId"_s, timerId); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createTimerInstallData(int timerId, Seconds timeout, bool singleShot) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setInteger(ASCIILiteral("timerId"), timerId); >- data->setInteger(ASCIILiteral("timeout"), (int)timeout.milliseconds()); >- data->setBoolean(ASCIILiteral("singleShot"), singleShot); >+ data->setInteger("timerId"_s, timerId); >+ data->setInteger("timeout"_s, (int)timeout.milliseconds()); >+ data->setBoolean("singleShot"_s, singleShot); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createEvaluateScriptData(const String& url, double lineNumber) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setString(ASCIILiteral("url"), url); >- data->setInteger(ASCIILiteral("lineNumber"), lineNumber); >+ data->setString("url"_s, url); >+ data->setInteger("lineNumber"_s, lineNumber); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createTimeStampData(const String& message) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setString(ASCIILiteral("message"), message); >+ data->setString("message"_s, message); > return data; > } > > Ref<JSON::Object> TimelineRecordFactory::createAnimationFrameData(int callbackId) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setInteger(ASCIILiteral("id"), callbackId); >+ data->setInteger("id"_s, callbackId); > return data; > } > >@@ -142,13 +142,13 @@ static Ref<JSON::Array> createQuad(const FloatQuad& quad) > Ref<JSON::Object> TimelineRecordFactory::createPaintData(const FloatQuad& quad) > { > Ref<JSON::Object> data = JSON::Object::create(); >- data->setArray(ASCIILiteral("clip"), createQuad(quad)); >+ data->setArray("clip"_s, createQuad(quad)); > return data; > } > > void TimelineRecordFactory::appendLayoutRoot(JSON::Object* data, const FloatQuad& quad) > { >- data->setArray(ASCIILiteral("root"), createQuad(quad)); >+ data->setArray("root"_s, createQuad(quad)); > } > > } // namespace WebCore >diff --git a/Source/WebCore/inspector/WebInjectedScriptHost.cpp b/Source/WebCore/inspector/WebInjectedScriptHost.cpp >index 2997d7d94c24e84678c1b56cc4028dd0d7b31759..4e20f49a9f2c7fbcfb78bb8b9abe36a3e675fd30 100644 >--- a/Source/WebCore/inspector/WebInjectedScriptHost.cpp >+++ b/Source/WebCore/inspector/WebInjectedScriptHost.cpp >@@ -48,13 +48,13 @@ JSValue WebInjectedScriptHost::subtype(ExecState* exec, JSValue value) > { > VM& vm = exec->vm(); > if (value.inherits<JSNode>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("node")); >+ return jsNontrivialString(exec, "node"_s); > if (value.inherits<JSNodeList>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("array")); >+ return jsNontrivialString(exec, "array"_s); > if (value.inherits<JSHTMLCollection>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("array")); >+ return jsNontrivialString(exec, "array"_s); > if (value.inherits<JSDOMException>(vm)) >- return jsNontrivialString(exec, ASCIILiteral("error")); >+ return jsNontrivialString(exec, "error"_s); > > return jsUndefined(); > } >@@ -147,11 +147,11 @@ static JSString* jsStringForPaymentRequestState(VM& vm, ExecState* exec, Payment > { > switch (state) { > case PaymentRequest::State::Created: >- return jsNontrivialString(exec, ASCIILiteral("created")); >+ return jsNontrivialString(exec, "created"_s); > case PaymentRequest::State::Interactive: >- return jsNontrivialString(exec, ASCIILiteral("interactive")); >+ return jsNontrivialString(exec, "interactive"_s); > case PaymentRequest::State::Closed: >- return jsNontrivialString(exec, ASCIILiteral("closed")); >+ return jsNontrivialString(exec, "closed"_s); > } > > ASSERT_NOT_REACHED(); >@@ -167,9 +167,9 @@ JSValue WebInjectedScriptHost::getInternalProperties(VM& vm, ExecState* exec, JS > if (PaymentRequest* paymentRequest = JSPaymentRequest::toWrapped(vm, value)) { > unsigned index = 0; > auto* array = constructEmptyArray(exec, nullptr); >- array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, ASCIILiteral("options"), objectForPaymentOptions(vm, exec, paymentRequest->paymentOptions()))); >- array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, ASCIILiteral("details"), objectForPaymentDetails(vm, exec, paymentRequest->paymentDetails()))); >- array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, ASCIILiteral("state"), jsStringForPaymentRequestState(vm, exec, paymentRequest->state()))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, "options"_s, objectForPaymentOptions(vm, exec, paymentRequest->paymentOptions()))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, "details"_s, objectForPaymentDetails(vm, exec, paymentRequest->paymentDetails()))); >+ array->putDirectIndex(exec, index++, constructInternalProperty(vm, exec, "state"_s, jsStringForPaymentRequestState(vm, exec, paymentRequest->state()))); > RETURN_IF_EXCEPTION(scope, { }); > return array; > } >diff --git a/Source/WebCore/inspector/agents/InspectorApplicationCacheAgent.cpp b/Source/WebCore/inspector/agents/InspectorApplicationCacheAgent.cpp >index 19af4e95021f4ec1ace12539901307f3a7a585f9..76f316fc4a73c6c51746cda8350be4b61b409fb6 100644 >--- a/Source/WebCore/inspector/agents/InspectorApplicationCacheAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorApplicationCacheAgent.cpp >@@ -41,7 +41,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(WebAgentContext& context, InspectorPageAgent* pageAgent) >- : InspectorAgentBase(ASCIILiteral("ApplicationCache"), context) >+ : InspectorAgentBase("ApplicationCache"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::ApplicationCacheFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::ApplicationCacheBackendDispatcher::create(context.backendDispatcher, this)) > , m_pageAgent(pageAgent) >diff --git a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >index 67491d9f166fd3ed2d1e5eb924562ad0216d1d9a..206eae3e60e35b3afbc5d06a0dcaa3b6dfbc7dae 100644 >--- a/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >@@ -291,7 +291,7 @@ CSSStyleRule* InspectorCSSAgent::asCSSStyleRule(CSSRule& rule) > } > > InspectorCSSAgent::InspectorCSSAgent(WebAgentContext& context, InspectorDOMAgent* domAgent) >- : InspectorAgentBase(ASCIILiteral("CSS"), context) >+ : InspectorAgentBase("CSS"_s, context) > , m_frontendDispatcher(std::make_unique<CSSFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(CSSBackendDispatcher::create(context.backendDispatcher, this)) > , m_domAgent(domAgent) >@@ -441,7 +441,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString& errorString, int no > if (elementPseudoId != PseudoId::None) { > element = downcast<PseudoElement>(*element).hostElement(); > if (!element) { >- errorString = ASCIILiteral("Pseudo element has no parent"); >+ errorString = "Pseudo element has no parent"_s; > return; > } > } >@@ -630,19 +630,19 @@ void InspectorCSSAgent::createStyleSheet(ErrorString& errorString, const String& > { > Frame* frame = m_domAgent->pageAgent()->frameForId(frameId); > if (!frame) { >- errorString = ASCIILiteral("No frame for given id found"); >+ errorString = "No frame for given id found"_s; > return; > } > > Document* document = frame->document(); > if (!document) { >- errorString = ASCIILiteral("No document for frame"); >+ errorString = "No document for frame"_s; > return; > } > > InspectorStyleSheet* inspectorStyleSheet = createInspectorStyleSheetForDocument(*document); > if (!inspectorStyleSheet) { >- errorString = ASCIILiteral("Could not create stylesheet for the frame."); >+ errorString = "Could not create stylesheet for the frame."_s; > return; > } > >@@ -694,7 +694,7 @@ void InspectorCSSAgent::addRule(ErrorString& errorString, const String& styleShe > { > InspectorStyleSheet* inspectorStyleSheet = assertStyleSheetForId(errorString, styleSheetId); > if (!inspectorStyleSheet) { >- errorString = ASCIILiteral("No target stylesheet found"); >+ errorString = "No target stylesheet found"_s; > return; > } > >@@ -788,11 +788,11 @@ Element* InspectorCSSAgent::elementForId(ErrorString& errorString, int nodeId) > { > Node* node = m_domAgent->nodeForId(nodeId); > if (!node) { >- errorString = ASCIILiteral("No node with given id found"); >+ errorString = "No node with given id found"_s; > return nullptr; > } > if (!is<Element>(*node)) { >- errorString = ASCIILiteral("Not an element node"); >+ errorString = "Not an element node"_s; > return nullptr; > } > return downcast<Element>(node); >@@ -828,7 +828,7 @@ InspectorStyleSheet* InspectorCSSAgent::assertStyleSheetForId(ErrorString& error > { > IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.find(styleSheetId); > if (it == m_idToInspectorStyleSheet.end()) { >- errorString = ASCIILiteral("No stylesheet with given id found"); >+ errorString = "No stylesheet with given id found"_s; > return nullptr; > } > return it->value.get(); >diff --git a/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp b/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp >index ed021687b7ee120ea4e05ade9fcad0dce0ad8ece..812184115a03c4371e97764490fd046fc5f3c41d 100644 >--- a/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp >@@ -66,7 +66,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorCanvasAgent::InspectorCanvasAgent(WebAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Canvas"), context) >+ : InspectorAgentBase("Canvas"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::CanvasFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::CanvasBackendDispatcher::create(context.backendDispatcher, this)) > , m_injectedScriptManager(context.injectedScriptManager) >@@ -149,13 +149,13 @@ void InspectorCanvasAgent::requestNode(ErrorString& errorString, const String& c > > auto* node = inspectorCanvas->canvasElement(); > if (!node) { >- errorString = ASCIILiteral("No node for canvas"); >+ errorString = "No node for canvas"_s; > return; > } > > int documentNodeId = m_instrumentingAgents.inspectorDOMAgent()->boundNodeId(&node->document()); > if (!documentNodeId) { >- errorString = ASCIILiteral("Document has not been requested"); >+ errorString = "Document has not been requested"_s; > return; > } > >@@ -172,7 +172,7 @@ void InspectorCanvasAgent::requestContent(ErrorString& errorString, const String > > if (auto* node = inspectorCanvas->canvasElement()) { > if (is<CanvasRenderingContext2D>(inspectorCanvas->context()) || is<ImageBitmapRenderingContext>(inspectorCanvas->context())) { >- auto result = node->toDataURL(ASCIILiteral("image/png")); >+ auto result = node->toDataURL("image/png"_s); > if (result.hasException()) { > errorString = result.releaseException().releaseMessage(); > return; >@@ -186,7 +186,7 @@ void InspectorCanvasAgent::requestContent(ErrorString& errorString, const String > WebGLRenderingContextBase& contextWebGLBase = downcast<WebGLRenderingContextBase>(inspectorCanvas->context()); > > contextWebGLBase.setPreventBufferClearForInspector(true); >- auto result = node->toDataURL(ASCIILiteral("image/png")); >+ auto result = node->toDataURL("image/png"_s); > contextWebGLBase.setPreventBufferClearForInspector(false); > > if (result.hasException()) { >@@ -200,7 +200,7 @@ void InspectorCanvasAgent::requestContent(ErrorString& errorString, const String > } > > // FIXME: <https://webkit.org/b/173621> Web Inspector: Support getting the content of WebGPU context; >- errorString = ASCIILiteral("Unsupported canvas context type"); >+ errorString = "Unsupported canvas context type"_s; > } > > void InspectorCanvasAgent::requestCSSCanvasClientNodes(ErrorString& errorString, const String& canvasId, RefPtr<JSON::ArrayOf<int>>& result) >@@ -253,7 +253,7 @@ void InspectorCanvasAgent::resolveCanvasContext(ErrorString& errorString, const > JSC::JSValue value = contextAsScriptValue(state, inspectorCanvas->context()); > if (!value) { > ASSERT_NOT_REACHED(); >- errorString = ASCIILiteral("Unknown context type"); >+ errorString = "Unknown context type"_s; > return; > } > >@@ -268,7 +268,7 @@ void InspectorCanvasAgent::startRecording(ErrorString& errorString, const String > return; > > if (inspectorCanvas->context().callTracingActive()) { >- errorString = ASCIILiteral("Already recording canvas"); >+ errorString = "Already recording canvas"_s; > return; > } > >@@ -288,7 +288,7 @@ void InspectorCanvasAgent::stopRecording(ErrorString& errorString, const String& > return; > > if (!inspectorCanvas->context().callTracingActive()) { >- errorString = ASCIILiteral("No active recording for canvas"); >+ errorString = "No active recording for canvas"_s; > return; > } > >@@ -304,7 +304,7 @@ void InspectorCanvasAgent::requestShaderSource(ErrorString& errorString, const S > > auto* shader = inspectorProgram->shaderForType(shaderType); > if (!shader) { >- errorString = ASCIILiteral("No shader for given type."); >+ errorString = "No shader for given type."_s; > return; > } > >@@ -313,7 +313,7 @@ void InspectorCanvasAgent::requestShaderSource(ErrorString& errorString, const S > UNUSED_PARAM(programId); > UNUSED_PARAM(shaderType); > UNUSED_PARAM(content); >- errorString = ASCIILiteral("WebGL is not supported."); >+ errorString = "WebGL is not supported."_s; > #endif > } > >@@ -326,7 +326,7 @@ void InspectorCanvasAgent::updateShader(ErrorString& errorString, const String& > > auto* shader = inspectorProgram->shaderForType(shaderType); > if (!shader) { >- errorString = ASCIILiteral("No shader for given type."); >+ errorString = "No shader for given type."_s; > return; > } > >@@ -335,7 +335,7 @@ void InspectorCanvasAgent::updateShader(ErrorString& errorString, const String& > contextWebGL.compileShader(shader); > > if (!shader->isValid()) { >- errorString = ASCIILiteral("Shader compilation failed."); >+ errorString = "Shader compilation failed."_s; > return; > } > >@@ -344,7 +344,7 @@ void InspectorCanvasAgent::updateShader(ErrorString& errorString, const String& > UNUSED_PARAM(programId); > UNUSED_PARAM(shaderType); > UNUSED_PARAM(source); >- errorString = ASCIILiteral("WebGL is not supported."); >+ errorString = "WebGL is not supported."_s; > #endif > } > >@@ -359,7 +359,7 @@ void InspectorCanvasAgent::setShaderProgramDisabled(ErrorString& errorString, co > #else > UNUSED_PARAM(programId); > UNUSED_PARAM(disabled); >- errorString = ASCIILiteral("WebGL is not supported."); >+ errorString = "WebGL is not supported."_s; > #endif > } > >@@ -374,7 +374,7 @@ void InspectorCanvasAgent::setShaderProgramHighlighted(ErrorString& errorString, > #else > UNUSED_PARAM(programId); > UNUSED_PARAM(highlighted); >- errorString = ASCIILiteral("WebGL is not supported."); >+ errorString = "WebGL is not supported."_s; > #endif > } > >@@ -697,7 +697,7 @@ InspectorCanvas* InspectorCanvasAgent::assertInspectorCanvas(ErrorString& errorS > { > RefPtr<InspectorCanvas> inspectorCanvas = m_identifierToInspectorCanvas.get(identifier); > if (!inspectorCanvas) { >- errorString = ASCIILiteral("No canvas for given identifier."); >+ errorString = "No canvas for given identifier."_s; > return nullptr; > } > >@@ -727,7 +727,7 @@ InspectorShaderProgram* InspectorCanvasAgent::assertInspectorProgram(ErrorString > { > RefPtr<InspectorShaderProgram> inspectorProgram = m_identifierToInspectorProgram.get(identifier); > if (!inspectorProgram) { >- errorString = ASCIILiteral("No shader program for given identifier."); >+ errorString = "No shader program for given identifier."_s; > return nullptr; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >index ff84b7a42ec6fe2ab5e9abd1882df087d7ae840f..472298bf34bd192c138e2c18a5ad06e41464b0e3 100644 >--- a/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >@@ -229,7 +229,7 @@ String InspectorDOMAgent::toErrorString(Exception&& exception) > } > > InspectorDOMAgent::InspectorDOMAgent(WebAgentContext& context, InspectorPageAgent* pageAgent, InspectorOverlay* overlay) >- : InspectorAgentBase(ASCIILiteral("DOM"), context) >+ : InspectorAgentBase("DOM"_s, context) > , m_injectedScriptManager(context.injectedScriptManager) > , m_frontendDispatcher(std::make_unique<Inspector::DOMFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::DOMBackendDispatcher::create(context.backendDispatcher, this)) >@@ -372,7 +372,7 @@ Node* InspectorDOMAgent::assertNode(ErrorString& errorString, int nodeId) > { > Node* node = nodeForId(nodeId); > if (!node) { >- errorString = ASCIILiteral("Could not find node with given id"); >+ errorString = "Could not find node with given id"_s; > return nullptr; > } > return node; >@@ -384,7 +384,7 @@ Document* InspectorDOMAgent::assertDocument(ErrorString& errorString, int nodeId > if (!node) > return nullptr; > if (!is<Document>(*node)) { >- errorString = ASCIILiteral("Document is not available"); >+ errorString = "Document is not available"_s; > return nullptr; > } > return downcast<Document>(node); >@@ -396,7 +396,7 @@ Element* InspectorDOMAgent::assertElement(ErrorString& errorString, int nodeId) > if (!node) > return nullptr; > if (!is<Element>(*node)) { >- errorString = ASCIILiteral("Node is not an Element"); >+ errorString = "Node is not an Element"_s; > return nullptr; > } > return downcast<Element>(node); >@@ -408,11 +408,11 @@ Node* InspectorDOMAgent::assertEditableNode(ErrorString& errorString, int nodeId > if (!node) > return nullptr; > if (node->isInUserAgentShadowTree()) { >- errorString = ASCIILiteral("Cannot edit nodes in user agent shadow trees"); >+ errorString = "Cannot edit nodes in user agent shadow trees"_s; > return nullptr; > } > if (node->isPseudoElement()) { >- errorString = ASCIILiteral("Cannot edit pseudo elements"); >+ errorString = "Cannot edit pseudo elements"_s; > return nullptr; > } > return node; >@@ -424,11 +424,11 @@ Element* InspectorDOMAgent::assertEditableElement(ErrorString& errorString, int > if (!element) > return nullptr; > if (element->isInUserAgentShadowTree()) { >- errorString = ASCIILiteral("Cannot edit elements in user agent shadow trees"); >+ errorString = "Cannot edit elements in user agent shadow trees"_s; > return nullptr; > } > if (element->isPseudoElement()) { >- errorString = ASCIILiteral("Cannot edit pseudo elements"); >+ errorString = "Cannot edit pseudo elements"_s; > return nullptr; > } > return element; >@@ -439,7 +439,7 @@ void InspectorDOMAgent::getDocument(ErrorString& errorString, RefPtr<Inspector:: > m_documentRequested = true; > > if (!m_document) { >- errorString = ASCIILiteral("Document is not available"); >+ errorString = "Document is not available"_s; > return; > } > >@@ -495,7 +495,7 @@ int InspectorDOMAgent::pushNodeToFrontend(ErrorString& errorString, int document > if (!document) > return 0; > if (&nodeToPush->document() != document) { >- errorString = ASCIILiteral("Node is not part of the document with given id"); >+ errorString = "Node is not part of the document with given id"_s; > return 0; > } > >@@ -521,7 +521,7 @@ void InspectorDOMAgent::requestChildNodes(ErrorString& errorString, int nodeId, > else if (*depth > 0) > sanitizedDepth = *depth; > else { >- errorString = ASCIILiteral("Please provide a positive integer as a depth or -1 for entire subtree"); >+ errorString = "Please provide a positive integer as a depth or -1 for entire subtree"_s; > return; > } > >@@ -541,7 +541,7 @@ void InspectorDOMAgent::querySelector(ErrorString& errorString, int nodeId, cons > > auto queryResult = downcast<ContainerNode>(*node).querySelector(selectors); > if (queryResult.hasException()) { >- errorString = ASCIILiteral("DOM Error while querying"); >+ errorString = "DOM Error while querying"_s; > return; > } > >@@ -561,7 +561,7 @@ void InspectorDOMAgent::querySelectorAll(ErrorString& errorString, int nodeId, c > > auto queryResult = downcast<ContainerNode>(*node).querySelectorAll(selectors); > if (queryResult.hasException()) { >- errorString = ASCIILiteral("DOM Error while querying"); >+ errorString = "DOM Error while querying"_s; > return; > } > >@@ -651,7 +651,7 @@ void InspectorDOMAgent::releaseBackendNodeIds(ErrorString& errorString, const St > m_nodeGroupToBackendIdMap.remove(nodeGroup); > return; > } >- errorString = ASCIILiteral("Group name not found"); >+ errorString = "Group name not found"_s; > } > > void InspectorDOMAgent::setAttributeValue(ErrorString& errorString, int elementId, const String& name, const String& value) >@@ -678,7 +678,7 @@ void InspectorDOMAgent::setAttributesAsText(ErrorString& errorString, int elemen > > Node* child = parsedElement->firstChild(); > if (!child) { >- errorString = ASCIILiteral("Could not parse value as attributes"); >+ errorString = "Could not parse value as attributes"_s; > return; > } > >@@ -717,7 +717,7 @@ void InspectorDOMAgent::removeNode(ErrorString& errorString, int nodeId) > > ContainerNode* parentNode = node->parentNode(); > if (!parentNode) { >- errorString = ASCIILiteral("Cannot remove detached node"); >+ errorString = "Cannot remove detached node"_s; > return; > } > >@@ -781,7 +781,7 @@ void InspectorDOMAgent::setOuterHTML(ErrorString& errorString, int nodeId, const > > Document& document = node->document(); > if (!document.isHTMLDocument() && !document.isXMLDocument()) { >- errorString = ASCIILiteral("Not an HTML/XML document"); >+ errorString = "Not an HTML/XML document"_s; > return; > } > >@@ -808,7 +808,7 @@ void InspectorDOMAgent::insertAdjacentHTML(ErrorString& errorString, int nodeId, > return; > > if (!is<Element>(node)) { >- errorString = ASCIILiteral("Can only call insertAdjacentHTML on Elements."); >+ errorString = "Can only call insertAdjacentHTML on Elements."_s; > return; > } > >@@ -822,7 +822,7 @@ void InspectorDOMAgent::setNodeValue(ErrorString& errorString, int nodeId, const > return; > > if (!is<Text>(*node)) { >- errorString = ASCIILiteral("Can only set value of text nodes"); >+ errorString = "Can only set value of text nodes"_s; > return; > } > >@@ -917,7 +917,7 @@ void InspectorDOMAgent::setEventListenerDisabled(ErrorString& errorString, int e > } > } > >- errorString = ASCIILiteral("No event listener for given identifier."); >+ errorString = "No event listener for given identifier."_s; > } > > void InspectorDOMAgent::getAccessibilityPropertiesForNode(ErrorString& errorString, int nodeId, RefPtr<Inspector::Protocol::DOM::AccessibilityProperties>& axProperties) >@@ -937,12 +937,12 @@ void InspectorDOMAgent::performSearch(ErrorString& errorString, const String& wh > if (nodeIds) { > for (auto& nodeValue : *nodeIds) { > if (!nodeValue) { >- errorString = ASCIILiteral("Invalid nodeIds item."); >+ errorString = "Invalid nodeIds item."_s; > return; > } > int nodeId = 0; > if (!nodeValue->asInteger(nodeId)) { >- errorString = ASCIILiteral("Invalid nodeIds item type. Expecting integer types."); >+ errorString = "Invalid nodeIds item type. Expecting integer types."_s; > return; > } > Node* node = assertNode(errorString, nodeId); >@@ -972,13 +972,13 @@ void InspectorDOMAgent::getSearchResults(ErrorString& errorString, const String& > { > SearchResults::iterator it = m_searchResults.find(searchId); > if (it == m_searchResults.end()) { >- errorString = ASCIILiteral("No search session with given id found"); >+ errorString = "No search session with given id found"_s; > return; > } > > int size = it->value.size(); > if (fromIndex < 0 || toIndex > size || fromIndex >= toIndex) { >- errorString = ASCIILiteral("Invalid search result range"); >+ errorString = "Invalid search result range"_s; > return; > } > >@@ -1097,7 +1097,7 @@ void InspectorDOMAgent::setSearchingForNode(ErrorString& errorString, bool enabl > std::unique_ptr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString& errorString, const JSON::Object* highlightInspectorObject) > { > if (!highlightInspectorObject) { >- errorString = ASCIILiteral("Internal error: highlight configuration parameter is missing"); >+ errorString = "Internal error: highlight configuration parameter is missing"_s; > return nullptr; > } > >@@ -1128,7 +1128,7 @@ void InspectorDOMAgent::highlightQuad(ErrorString& errorString, const JSON::Arra > { > auto quad = std::make_unique<FloatQuad>(); > if (!parseQuad(quadArray, quad.get())) { >- errorString = ASCIILiteral("Invalid Quad format"); >+ errorString = "Invalid Quad format"_s; > return; > } > innerHighlightQuad(WTFMove(quad), color, outlineColor, usePageCoordinates); >@@ -1150,7 +1150,7 @@ void InspectorDOMAgent::highlightSelector(ErrorString& errorString, const JSON:: > if (frameId) { > Frame* frame = m_pageAgent->frameForId(*frameId); > if (!frame) { >- errorString = ASCIILiteral("No frame for given id found"); >+ errorString = "No frame for given id found"_s; > return; > } > >@@ -1159,14 +1159,14 @@ void InspectorDOMAgent::highlightSelector(ErrorString& errorString, const JSON:: > document = m_document; > > if (!document) { >- errorString = ASCIILiteral("Document could not be found"); >+ errorString = "Document could not be found"_s; > return; > } > > auto queryResult = document->querySelectorAll(selectorString); > // FIXME: <https://webkit.org/b/146161> Web Inspector: DOM.highlightSelector should work for "a:visited" > if (queryResult.hasException()) { >- errorString = ASCIILiteral("DOM Error while querying"); >+ errorString = "DOM Error while querying"_s; > return; > } > >@@ -1185,9 +1185,9 @@ void InspectorDOMAgent::highlightNode(ErrorString& errorString, const JSON::Obje > else if (objectId) { > node = nodeForObjectId(*objectId); > if (!node) >- errorString = ASCIILiteral("Node for given objectId not found"); >+ errorString = "Node for given objectId not found"_s; > } else >- errorString = ASCIILiteral("Either nodeId or objectId must be specified"); >+ errorString = "Either nodeId or objectId must be specified"_s; > > if (!node) > return; >@@ -1204,13 +1204,13 @@ void InspectorDOMAgent::highlightNodeList(ErrorString& errorString, const JSON:: > Vector<Ref<Node>> nodes; > for (auto& nodeValue : nodeIds) { > if (!nodeValue) { >- errorString = ASCIILiteral("Invalid nodeIds item."); >+ errorString = "Invalid nodeIds item."_s; > return; > } > > int nodeId = 0; > if (!nodeValue->asInteger(nodeId)) { >- errorString = ASCIILiteral("Invalid nodeIds item type. Expecting integer types."); >+ errorString = "Invalid nodeIds item type. Expecting integer types."_s; > return; > } > >@@ -1269,7 +1269,7 @@ void InspectorDOMAgent::moveTo(ErrorString& errorString, int nodeId, int targetE > if (!anchorNode) > return; > if (anchorNode->parentNode() != targetElement) { >- errorString = ASCIILiteral("Anchor node must be child of the target element"); >+ errorString = "Anchor node must be child of the target element"_s; > return; > } > } >@@ -1305,7 +1305,7 @@ void InspectorDOMAgent::focus(ErrorString& errorString, int nodeId) > if (!element) > return; > if (!element->isFocusable()) { >- errorString = ASCIILiteral("Element is not focusable"); >+ errorString = "Element is not focusable"_s; > return; > } > element->focus(); >@@ -1315,7 +1315,7 @@ void InspectorDOMAgent::setInspectedNode(ErrorString& errorString, int nodeId) > { > Node* node = nodeForId(nodeId); > if (!node || node->isInUserAgentShadowTree()) { >- errorString = ASCIILiteral("No node with given id found"); >+ errorString = "No node with given id found"_s; > return; > } > >@@ -1328,12 +1328,12 @@ void InspectorDOMAgent::resolveNode(ErrorString& errorString, int nodeId, const > String objectGroupName = objectGroup ? *objectGroup : emptyString(); > Node* node = nodeForId(nodeId); > if (!node) { >- errorString = ASCIILiteral("No node with given id found"); >+ errorString = "No node with given id found"_s; > return; > } > RefPtr<Inspector::Protocol::Runtime::RemoteObject> object = resolveNode(node, objectGroupName); > if (!object) { >- errorString = ASCIILiteral("Node with given id does not belong to the document"); >+ errorString = "Node with given id does not belong to the document"_s; > return; > } > result = object; >@@ -2342,14 +2342,14 @@ void InspectorDOMAgent::pushNodeByPathToFrontend(ErrorString& errorString, const > if (Node* node = nodeForPath(path)) > *nodeId = pushNodePathToFrontend(node); > else >- errorString = ASCIILiteral("No node with given path found"); >+ errorString = "No node with given path found"_s; > } > > void InspectorDOMAgent::pushNodeByBackendIdToFrontend(ErrorString& errorString, BackendNodeId backendNodeId, int* nodeId) > { > auto iterator = m_backendIdToNode.find(backendNodeId); > if (iterator == m_backendIdToNode.end()) { >- errorString = ASCIILiteral("No node with given backend id found"); >+ errorString = "No node with given backend id found"_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp >index d122512b37c825d90aa5f11931723ce1563d3c32..fad32f8ce511a801319525a1d1e7296d44d0d9e6 100644 >--- a/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp >@@ -64,7 +64,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent(WebAgentContext& context, InspectorDOMAgent* domAgent, InspectorDebuggerAgent* debuggerAgent) >- : InspectorAgentBase(ASCIILiteral("DOMDebugger"), context) >+ : InspectorAgentBase("DOMDebugger"_s, context) > , m_backendDispatcher(Inspector::DOMDebuggerBackendDispatcher::create(context.backendDispatcher, this)) > , m_domAgent(domAgent) > , m_debuggerAgent(debuggerAgent) >@@ -137,7 +137,7 @@ void InspectorDOMDebuggerAgent::setInstrumentationBreakpoint(ErrorString& error, > void InspectorDOMDebuggerAgent::setBreakpoint(ErrorString& error, const String& eventName) > { > if (eventName.isEmpty()) { >- error = ASCIILiteral("Event name is empty"); >+ error = "Event name is empty"_s; > return; > } > >@@ -157,7 +157,7 @@ void InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint(ErrorString& err > void InspectorDOMDebuggerAgent::removeBreakpoint(ErrorString& error, const String& eventName) > { > if (eventName.isEmpty()) { >- error = ASCIILiteral("Event name is empty"); >+ error = "Event name is empty"_s; > return; > } > >@@ -216,9 +216,9 @@ static int domTypeForName(ErrorString& errorString, const String& typeString) > static String domTypeName(int type) > { > switch (type) { >- case SubtreeModified: return ASCIILiteral("subtree-modified"); >- case AttributeModified: return ASCIILiteral("attribute-modified"); >- case NodeRemoved: return ASCIILiteral("node-removed"); >+ case SubtreeModified: return "subtree-modified"_s; >+ case AttributeModified: return "attribute-modified"_s; >+ case NodeRemoved: return "node-removed"_s; > default: break; > } > return emptyString(); >@@ -371,7 +371,7 @@ void InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded(bool isDOMEvent, cons > return; > > Ref<JSON::Object> eventData = JSON::Object::create(); >- eventData->setString(ASCIILiteral("eventName"), fullEventName); >+ eventData->setString("eventName"_s, fullEventName); > > if (synchronous) > m_debuggerAgent->breakProgram(Inspector::DebuggerFrontendDispatcher::Reason::EventListener, WTFMove(eventData)); >diff --git a/Source/WebCore/inspector/agents/InspectorDOMStorageAgent.cpp b/Source/WebCore/inspector/agents/InspectorDOMStorageAgent.cpp >index 7d632da3ec3a54edf540f494004b6b9cc5dca184..6a7a874dec2c288136c0a9c64f4cbd147deb5761 100644 >--- a/Source/WebCore/inspector/agents/InspectorDOMStorageAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorDOMStorageAgent.cpp >@@ -55,7 +55,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorDOMStorageAgent::InspectorDOMStorageAgent(WebAgentContext& context, InspectorPageAgent* pageAgent) >- : InspectorAgentBase(ASCIILiteral("DOMStorage"), context) >+ : InspectorAgentBase("DOMStorage"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::DOMStorageFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::DOMStorageBackendDispatcher::create(context.backendDispatcher, this)) > , m_pageAgent(pageAgent) >@@ -93,7 +93,7 @@ void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString& errorString, cons > Frame* frame; > RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame); > if (!storageArea) { >- errorString = ASCIILiteral("No StorageArea for given storageId"); >+ errorString = "No StorageArea for given storageId"_s; > return; > } > >@@ -117,7 +117,7 @@ void InspectorDOMStorageAgent::setDOMStorageItem(ErrorString& errorString, const > Frame* frame; > RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame); > if (!storageArea) { >- errorString = ASCIILiteral("Storage not found"); >+ errorString = "Storage not found"_s; > return; > } > >@@ -132,7 +132,7 @@ void InspectorDOMStorageAgent::removeDOMStorageItem(ErrorString& errorString, co > Frame* frame; > RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame); > if (!storageArea) { >- errorString = ASCIILiteral("Storage not found"); >+ errorString = "Storage not found"_s; > return; > } > >@@ -179,18 +179,18 @@ RefPtr<StorageArea> InspectorDOMStorageAgent::findStorageArea(ErrorString& error > { > String securityOrigin; > bool isLocalStorage = false; >- bool success = storageId.getString(ASCIILiteral("securityOrigin"), securityOrigin); >+ bool success = storageId.getString("securityOrigin"_s, securityOrigin); > if (success) >- success = storageId.getBoolean(ASCIILiteral("isLocalStorage"), isLocalStorage); >+ success = storageId.getBoolean("isLocalStorage"_s, isLocalStorage); > if (!success) { >- errorString = ASCIILiteral("Invalid storageId format"); >+ errorString = "Invalid storageId format"_s; > targetFrame = nullptr; > return nullptr; > } > > targetFrame = m_pageAgent->findFrameWithSecurityOrigin(securityOrigin); > if (!targetFrame) { >- errorString = ASCIILiteral("Frame not found for the given security origin"); >+ errorString = "Frame not found for the given security origin"_s; > return nullptr; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorDatabaseAgent.cpp b/Source/WebCore/inspector/agents/InspectorDatabaseAgent.cpp >index 70ddfc18487e74e35e6e14f0bb04c136caf05027..5a40e0320fa3b75ecc62b717e261c7c16d35a312 100644 >--- a/Source/WebCore/inspector/agents/InspectorDatabaseAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorDatabaseAgent.cpp >@@ -217,7 +217,7 @@ void InspectorDatabaseAgent::clearResources() > } > > InspectorDatabaseAgent::InspectorDatabaseAgent(WebAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Database"), context) >+ : InspectorAgentBase("Database"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::DatabaseFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::DatabaseBackendDispatcher::create(context.backendDispatcher, this)) > { >@@ -259,7 +259,7 @@ void InspectorDatabaseAgent::disable(ErrorString&) > void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString& error, const String& databaseId, RefPtr<JSON::ArrayOf<String>>& names) > { > if (!m_enabled) { >- error = ASCIILiteral("Database agent is not enabled"); >+ error = "Database agent is not enabled"_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp b/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >index f74f9411747114cb67640a43eb7dc95d01789211..ae3acafd090b0ac15c7efd6feb89594648d89950 100644 >--- a/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp >@@ -323,7 +323,7 @@ static RefPtr<IDBKeyRange> idbKeyRangeFromKeyRange(const JSON::Object* keyRange) > { > RefPtr<IDBKey> idbLower; > RefPtr<JSON::Object> lower; >- if (keyRange->getObject(ASCIILiteral("lower"), lower)) { >+ if (keyRange->getObject("lower"_s, lower)) { > idbLower = idbKeyFromInspectorObject(lower.get()); > if (!idbLower) > return nullptr; >@@ -331,18 +331,18 @@ static RefPtr<IDBKeyRange> idbKeyRangeFromKeyRange(const JSON::Object* keyRange) > > RefPtr<IDBKey> idbUpper; > RefPtr<JSON::Object> upper; >- if (keyRange->getObject(ASCIILiteral("upper"), upper)) { >+ if (keyRange->getObject("upper"_s, upper)) { > idbUpper = idbKeyFromInspectorObject(upper.get()); > if (!idbUpper) > return nullptr; > } > > bool lowerOpen; >- if (!keyRange->getBoolean(ASCIILiteral("lowerOpen"), lowerOpen)) >+ if (!keyRange->getBoolean("lowerOpen"_s, lowerOpen)) > return nullptr; > > bool upperOpen; >- if (!keyRange->getBoolean(ASCIILiteral("upperOpen"), upperOpen)) >+ if (!keyRange->getBoolean("upperOpen"_s, upperOpen)) > return nullptr; > > return IDBKeyRange::create(WTFMove(idbLower), WTFMove(idbUpper), lowerOpen, upperOpen); >@@ -515,7 +515,7 @@ class DataLoader final : public ExecutableWithDatabase { > } // namespace > > InspectorIndexedDBAgent::InspectorIndexedDBAgent(WebAgentContext& context, InspectorPageAgent* pageAgent) >- : InspectorAgentBase(ASCIILiteral("IndexedDB"), context) >+ : InspectorAgentBase("IndexedDB"_s, context) > , m_injectedScriptManager(context.injectedScriptManager) > , m_backendDispatcher(Inspector::IndexedDBBackendDispatcher::create(context.backendDispatcher, this)) > , m_pageAgent(pageAgent) >@@ -546,7 +546,7 @@ static ErrorStringOr<Document*> documentFromFrame(Frame* frame) > { > Document* document = frame ? frame->document() : nullptr; > if (!document) >- return makeUnexpected(ASCIILiteral("No document for given frame found")); >+ return makeUnexpected("No document for given frame found"_s); > > return document; > } >@@ -555,11 +555,11 @@ static ErrorStringOr<IDBFactory*> IDBFactoryFromDocument(Document* document) > { > DOMWindow* domWindow = document->domWindow(); > if (!domWindow) >- return makeUnexpected(ASCIILiteral("No IndexedDB factory for given frame found")); >+ return makeUnexpected("No IndexedDB factory for given frame found"_s); > > IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(*domWindow); > if (!idbFactory) >- makeUnexpected(ASCIILiteral("No IndexedDB factory for given frame found")); >+ makeUnexpected("No IndexedDB factory for given frame found"_s); > > return idbFactory; > } >@@ -628,7 +628,7 @@ void InspectorIndexedDBAgent::requestData(const String& securityOrigin, const St > InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(mainWorldExecState(frame)); > RefPtr<IDBKeyRange> idbKeyRange = keyRange ? idbKeyRangeFromKeyRange(keyRange) : nullptr; > if (keyRange && !idbKeyRange) { >- callback->sendFailure(ASCIILiteral("Can not parse key range.")); >+ callback->sendFailure("Can not parse key range."_s); > return; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp b/Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp >index b422c834e6c7992c14c208d5b49283e1e724eed4..5fadfd45d985132acd440255942f21b3015590d2 100644 >--- a/Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp >@@ -47,7 +47,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorLayerTreeAgent::InspectorLayerTreeAgent(WebAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("LayerTree"), context) >+ : InspectorAgentBase("LayerTree"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::LayerTreeFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::LayerTreeBackendDispatcher::create(context.backendDispatcher, this)) > { >@@ -107,13 +107,13 @@ void InspectorLayerTreeAgent::layersForNode(ErrorString& errorString, int nodeId > > auto* node = m_instrumentingAgents.inspectorDOMAgent()->nodeForId(nodeId); > if (!node) { >- errorString = ASCIILiteral("Provided node id doesn't match any known node"); >+ errorString = "Provided node id doesn't match any known node"_s; > return; > } > > auto* renderer = node->renderer(); > if (!renderer) { >- errorString = ASCIILiteral("Node for provided node id doesn't have a renderer"); >+ errorString = "Node for provided node id doesn't have a renderer"_s; > return; > } > >@@ -229,7 +229,7 @@ void InspectorLayerTreeAgent::reasonsForCompositingLayer(ErrorString& errorStrin > const RenderLayer* renderLayer = m_idToLayer.get(layerId); > > if (!renderLayer) { >- errorString = ASCIILiteral("Could not find a bound layer for the provided id"); >+ errorString = "Could not find a bound layer for the provided id"_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorMemoryAgent.cpp b/Source/WebCore/inspector/agents/InspectorMemoryAgent.cpp >index d43d266d9ea6e483bcc78676ee8b1f4ee5e8d0ac..630be88249c899707c6a887cab01e686407c0978 100644 >--- a/Source/WebCore/inspector/agents/InspectorMemoryAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorMemoryAgent.cpp >@@ -39,7 +39,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorMemoryAgent::InspectorMemoryAgent(PageAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Memory"), context) >+ : InspectorAgentBase("Memory"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::MemoryFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::MemoryBackendDispatcher::create(context.backendDispatcher, this)) > { >diff --git a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp >index c95397ae372a50ecff4e8533d97c4da90aff0064..6cc5047363c19b232469d8943404b0d6a1eec2cb 100644 >--- a/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp >@@ -115,7 +115,7 @@ class InspectorThreadableLoaderClient final : public ThreadableLoaderClient { > useDetector = true; > } > >- m_decoder = TextResourceDecoder::create(ASCIILiteral("text/plain"), textEncoding, useDetector); >+ m_decoder = TextResourceDecoder::create("text/plain"_s, textEncoding, useDetector); > } > > void didReceiveData(const char* data, int dataLength) override >@@ -140,7 +140,7 @@ class InspectorThreadableLoaderClient final : public ThreadableLoaderClient { > > void didFail(const ResourceError& error) override > { >- m_callback->sendFailure(error.isAccessControl() ? ASCIILiteral("Loading resource for inspector failed access control check") : ASCIILiteral("Loading resource for inspector failed")); >+ m_callback->sendFailure(error.isAccessControl() ? "Loading resource for inspector failed access control check"_s : "Loading resource for inspector failed"_s); > dispose(); > } > >@@ -167,7 +167,7 @@ class InspectorThreadableLoaderClient final : public ThreadableLoaderClient { > } // namespace > > InspectorNetworkAgent::InspectorNetworkAgent(WebAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Network"), context) >+ : InspectorAgentBase("Network"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::NetworkFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::NetworkBackendDispatcher::create(context.backendDispatcher, this)) > , m_injectedScriptManager(context.injectedScriptManager) >@@ -773,7 +773,7 @@ void InspectorNetworkAgent::getResponseBody(ErrorString& errorString, const Stri > { > NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(requestId); > if (!resourceData) { >- errorString = ASCIILiteral("No resource with given identifier found"); >+ errorString = "No resource with given identifier found"_s; > return; > } > >@@ -784,7 +784,7 @@ void InspectorNetworkAgent::getResponseBody(ErrorString& errorString, const Stri > } > > if (resourceData->isContentEvicted()) { >- errorString = ASCIILiteral("Request content was evicted from inspector cache"); >+ errorString = "Request content was evicted from inspector cache"_s; > return; > } > >@@ -799,7 +799,7 @@ void InspectorNetworkAgent::getResponseBody(ErrorString& errorString, const Stri > return; > } > >- errorString = ASCIILiteral("No data found for resource with given identifier"); >+ errorString = "No data found for resource with given identifier"_s; > } > > void InspectorNetworkAgent::setResourceCachingDisabled(ErrorString&, bool disabled) >@@ -818,7 +818,7 @@ void InspectorNetworkAgent::loadResource(const String& frameId, const String& ur > > URL url = context->completeURL(urlString); > ResourceRequest request(url); >- request.setHTTPMethod(ASCIILiteral("GET")); >+ request.setHTTPMethod("GET"_s); > request.setHiddenFromInspector(true); > > ThreadableLoaderOptions options; >@@ -832,7 +832,7 @@ void InspectorNetworkAgent::loadResource(const String& frameId, const String& ur > InspectorThreadableLoaderClient* inspectorThreadableLoaderClient = new InspectorThreadableLoaderClient(callback.copyRef()); > auto loader = ThreadableLoader::create(*context, *inspectorThreadableLoaderClient, WTFMove(request), options); > if (!loader) { >- callback->sendFailure(ASCIILiteral("Could not load requested resource.")); >+ callback->sendFailure("Could not load requested resource."_s); > return; > } > >@@ -867,7 +867,7 @@ void InspectorNetworkAgent::resolveWebSocket(ErrorString& errorString, const Str > { > WebSocket* webSocket = webSocketForRequestId(requestId); > if (!webSocket) { >- errorString = ASCIILiteral("WebSocket not found"); >+ errorString = "WebSocket not found"_s; > return; > } > >@@ -878,7 +878,7 @@ void InspectorNetworkAgent::resolveWebSocket(ErrorString& errorString, const Str > auto* document = downcast<Document>(webSocket->scriptExecutionContext()); > auto* frame = document->frame(); > if (!frame) { >- errorString = ASCIILiteral("WebSocket belongs to document without a frame"); >+ errorString = "WebSocket belongs to document without a frame"_s; > return; > } > >@@ -901,17 +901,17 @@ bool InspectorNetworkAgent::shouldTreatAsText(const String& mimeType) > Ref<TextResourceDecoder> InspectorNetworkAgent::createTextDecoder(const String& mimeType, const String& textEncodingName) > { > if (!textEncodingName.isEmpty()) >- return TextResourceDecoder::create(ASCIILiteral("text/plain"), textEncodingName); >+ return TextResourceDecoder::create("text/plain"_s, textEncodingName); > > if (MIMETypeRegistry::isTextMIMEType(mimeType)) > return TextResourceDecoder::create(mimeType, "UTF-8"); > if (MIMETypeRegistry::isXMLMIMEType(mimeType)) { >- auto decoder = TextResourceDecoder::create(ASCIILiteral("application/xml")); >+ auto decoder = TextResourceDecoder::create("application/xml"_s); > decoder->useLenientXMLDecoding(); > return decoder; > } > >- return TextResourceDecoder::create(ASCIILiteral("text/plain"), "UTF-8"); >+ return TextResourceDecoder::create("text/plain"_s, "UTF-8"); > } > > std::optional<String> InspectorNetworkAgent::textContentForCachedResource(CachedResource& cachedResource) >@@ -1006,12 +1006,12 @@ void InspectorNetworkAgent::searchInRequest(ErrorString& errorString, const Stri > { > NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(requestId); > if (!resourceData) { >- errorString = ASCIILiteral("No resource with given identifier found"); >+ errorString = "No resource with given identifier found"_s; > return; > } > > if (!resourceData->hasContent()) { >- errorString = ASCIILiteral("No resource content"); >+ errorString = "No resource content"_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >index bc74600dc17f66ea2a03393641910182e6c2cce4..f5c4bd277c2ee39a167d293ba0fd87bb13a017b1 100644 >--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >@@ -137,7 +137,7 @@ void InspectorPageAgent::resourceContent(ErrorString& errorString, Frame* frame, > } > > if (!success) >- errorString = ASCIILiteral("No resource with given URL found"); >+ errorString = "No resource with given URL found"_s; > } > > String InspectorPageAgent::sourceMapURLForResource(CachedResource* cachedResource) >@@ -268,7 +268,7 @@ Inspector::Protocol::Page::ResourceType InspectorPageAgent::cachedResourceTypeJS > } > > InspectorPageAgent::InspectorPageAgent(PageAgentContext& context, InspectorClient* client, InspectorOverlay* overlay) >- : InspectorAgentBase(ASCIILiteral("Page"), context) >+ : InspectorAgentBase("Page"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::PageFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::PageBackendDispatcher::create(context.backendDispatcher, this)) > , m_page(context.inspectedPage) >@@ -332,7 +332,7 @@ void InspectorPageAgent::navigate(ErrorString&, const String& url) > Frame& frame = m_page.mainFrame(); > > ResourceRequest resourceRequest { frame.document()->completeURL(url) }; >- FrameLoadRequest frameLoadRequest { *frame.document(), frame.document()->securityOrigin(), resourceRequest, ASCIILiteral("_self"), LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::No, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; >+ FrameLoadRequest frameLoadRequest { *frame.document(), frame.document()->securityOrigin(), resourceRequest, "_self"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::No, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; > frame.loader().changeLocation(WTFMove(frameLoadRequest)); > } > >@@ -647,7 +647,7 @@ Frame* InspectorPageAgent::assertFrame(ErrorString& errorString, const String& f > { > Frame* frame = frameForId(frameId); > if (!frame) >- errorString = ASCIILiteral("No frame for given id found"); >+ errorString = "No frame for given id found"_s; > return frame; > } > >@@ -656,7 +656,7 @@ DocumentLoader* InspectorPageAgent::assertDocumentLoader(ErrorString& errorStrin > FrameLoader& frameLoader = frame->loader(); > DocumentLoader* documentLoader = frameLoader.documentLoader(); > if (!documentLoader) >- errorString = ASCIILiteral("No documentLoader for given frame found"); >+ errorString = "No documentLoader for given frame found"_s; > return documentLoader; > } > >@@ -839,11 +839,11 @@ void InspectorPageAgent::snapshotNode(ErrorString& errorString, int nodeId, Stri > > std::unique_ptr<ImageBuffer> snapshot = WebCore::snapshotNode(frame, *node); > if (!snapshot) { >- errorString = ASCIILiteral("Could not capture snapshot"); >+ errorString = "Could not capture snapshot"_s; > return; > } > >- *outDataURL = snapshot->toDataURL(ASCIILiteral("image/png"), std::nullopt, PreserveResolution::Yes); >+ *outDataURL = snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); > } > > void InspectorPageAgent::snapshotRect(ErrorString& errorString, int x, int y, int width, int height, const String& coordinateSystem, String* outDataURL) >@@ -858,11 +858,11 @@ void InspectorPageAgent::snapshotRect(ErrorString& errorString, int x, int y, in > std::unique_ptr<ImageBuffer> snapshot = snapshotFrameRect(frame, rectangle, options); > > if (!snapshot) { >- errorString = ASCIILiteral("Could not capture snapshot"); >+ errorString = "Could not capture snapshot"_s; > return; > } > >- *outDataURL = snapshot->toDataURL(ASCIILiteral("image/png"), std::nullopt, PreserveResolution::Yes); >+ *outDataURL = snapshot->toDataURL("image/png"_s, std::nullopt, PreserveResolution::Yes); > } > > void InspectorPageAgent::archive(ErrorString& errorString, String* data) >@@ -871,7 +871,7 @@ void InspectorPageAgent::archive(ErrorString& errorString, String* data) > Frame& frame = mainFrame(); > RefPtr<LegacyWebArchive> archive = LegacyWebArchive::create(frame); > if (!archive) { >- errorString = ASCIILiteral("Could not create web archive for main frame"); >+ errorString = "Could not create web archive for main frame"_s; > return; > } > >@@ -879,7 +879,7 @@ void InspectorPageAgent::archive(ErrorString& errorString, String* data) > *data = base64Encode(CFDataGetBytePtr(buffer.get()), CFDataGetLength(buffer.get())); > #else > UNUSED_PARAM(data); >- errorString = ASCIILiteral("No support for creating archives"); >+ errorString = "No support for creating archives"_s; > #endif > } > >diff --git a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >index 59c460076b493e31829839456c4c4b73a5ba82e2..7ecd1f48bfd09ac46c64aa92c9f3f456d6b84fa8 100644 >--- a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >@@ -83,7 +83,7 @@ static CFRunLoopRef currentRunLoop() > #endif > > InspectorTimelineAgent::InspectorTimelineAgent(WebAgentContext& context, InspectorScriptProfilerAgent* scriptProfileAgent, InspectorHeapAgent* heapAgent, InspectorPageAgent* pageAgent) >- : InspectorAgentBase(ASCIILiteral("Timeline"), context) >+ : InspectorAgentBase("Timeline"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::TimelineFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::TimelineBackendDispatcher::create(context.backendDispatcher, this)) > , m_scriptProfilerAgent(scriptProfileAgent) >@@ -137,7 +137,7 @@ void InspectorTimelineAgent::setInstruments(ErrorString& errorString, const JSON > for (auto instrumentValue : instruments) { > String enumValueString; > if (!instrumentValue->asString(enumValueString)) { >- errorString = ASCIILiteral("Unexpected type in instruments list, should be string"); >+ errorString = "Unexpected type in instruments list, should be string"_s; > return; > } > >@@ -248,11 +248,11 @@ void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String > if (!title.isEmpty()) { > for (const TimelineRecordEntry& record : m_pendingConsoleProfileRecords) { > String recordTitle; >- record.data->getString(ASCIILiteral("title"), recordTitle); >+ record.data->getString("title"_s, recordTitle); > if (recordTitle == title) { > if (WebConsoleAgent* consoleAgent = m_instrumentingAgents.webConsoleAgent()) { > // FIXME: Send an enum to the frontend for localization? >- String warning = title.isEmpty() ? ASCIILiteral("Unnamed Profile already exists") : makeString("Profile \"", title, "\" already exists"); >+ String warning = title.isEmpty() ? "Unnamed Profile already exists"_s : makeString("Profile \"", title, "\" already exists"); > consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Profile, MessageLevel::Warning, warning)); > } > return; >@@ -274,7 +274,7 @@ void InspectorTimelineAgent::stopFromConsole(JSC::ExecState*, const String& titl > const TimelineRecordEntry& record = m_pendingConsoleProfileRecords[i]; > > String recordTitle; >- record.data->getString(ASCIILiteral("title"), recordTitle); >+ record.data->getString("title"_s, recordTitle); > if (title.isEmpty() || recordTitle == title) { > didCompleteRecordEntry(record); > m_pendingConsoleProfileRecords.remove(i); >@@ -288,7 +288,7 @@ void InspectorTimelineAgent::stopFromConsole(JSC::ExecState*, const String& titl > > if (WebConsoleAgent* consoleAgent = m_instrumentingAgents.webConsoleAgent()) { > // FIXME: Send an enum to the frontend for localization? >- String warning = title.isEmpty() ? ASCIILiteral("No profiles exist") : makeString("Profile \"", title, "\" does not exist"); >+ String warning = title.isEmpty() ? "No profiles exist"_s : makeString("Profile \"", title, "\" does not exist"); > consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::ProfileEnd, MessageLevel::Warning, warning)); > } > } >@@ -689,9 +689,9 @@ void InspectorTimelineAgent::setFrameIdentifier(JSON::Object* record, Frame* fra > > void InspectorTimelineAgent::didCompleteRecordEntry(const TimelineRecordEntry& entry) > { >- entry.record->setObject(ASCIILiteral("data"), entry.data); >- entry.record->setArray(ASCIILiteral("children"), entry.children); >- entry.record->setDouble(ASCIILiteral("endTime"), timestamp()); >+ entry.record->setObject("data"_s, entry.data); >+ entry.record->setArray("children"_s, entry.children); >+ entry.record->setDouble("endTime"_s, timestamp()); > addRecordToTimeline(entry.record.copyRef(), entry.type); > } > >diff --git a/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp b/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp >index f0036c54b17fa80e8fb8acead4202b075b7112ed..9161d843cd38e4d966126acdd36e83dd18f51002 100644 >--- a/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorWorkerAgent.cpp >@@ -35,7 +35,7 @@ namespace WebCore { > using namespace Inspector; > > InspectorWorkerAgent::InspectorWorkerAgent(PageAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("Worker"), context) >+ : InspectorAgentBase("Worker"_s, context) > , m_frontendDispatcher(std::make_unique<Inspector::WorkerFrontendDispatcher>(context.frontendRouter)) > , m_backendDispatcher(Inspector::WorkerBackendDispatcher::create(context.backendDispatcher, this)) > , m_page(context.inspectedPage) >@@ -79,7 +79,7 @@ void InspectorWorkerAgent::initialized(ErrorString& errorString, const String& w > { > WorkerInspectorProxy* proxy = m_connectedProxies.get(workerId); > if (!proxy) { >- errorString = ASCIILiteral("Worker not found."); >+ errorString = "Worker not found."_s; > return; > } > >@@ -89,13 +89,13 @@ void InspectorWorkerAgent::initialized(ErrorString& errorString, const String& w > void InspectorWorkerAgent::sendMessageToWorker(ErrorString& errorString, const String& workerId, const String& message) > { > if (!m_enabled) { >- errorString = ASCIILiteral("Worker inspection must be enabled."); >+ errorString = "Worker inspection must be enabled."_s; > return; > } > > WorkerInspectorProxy* proxy = m_connectedProxies.get(workerId); > if (!proxy) { >- errorString = ASCIILiteral("Worker not found."); >+ errorString = "Worker not found."_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/WebConsoleAgent.cpp b/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >index dc96486d4038ec9e5fc4c68ea08781b2714aeacd..f5dbdf8b2017cf2dd3d12e5f6ae1d857ae80b8e7 100644 >--- a/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >+++ b/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >@@ -114,13 +114,13 @@ void WebConsoleAgent::setLoggingChannelLevel(ErrorString& errorString, const Str > { > auto* channel = getLogChannel(channelName.utf8().data()); > if (!channel) { >- errorString = ASCIILiteral("Logging channel not found"); >+ errorString = "Logging channel not found"_s; > return; > } > > auto configuration = channelConfigurationForString(channelLevel); > if (!configuration) { >- errorString = ASCIILiteral("Invalid logging level"); >+ errorString = "Invalid logging level"_s; > return; > } > >diff --git a/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp b/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp >index 75508e5ebbc0f62b0691d5815d0386e95775202b..887b8530e3b40f8a9fc478fea421cb567cb22377 100644 >--- a/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp >+++ b/Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp >@@ -130,7 +130,7 @@ InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString& errorString > > InjectedScript injectedScript = injectedScriptManager().injectedScriptForId(*executionContextId); > if (injectedScript.hasNoValue()) >- errorString = ASCIILiteral("Execution context with given id not found."); >+ errorString = "Execution context with given id not found."_s; > > return injectedScript; > } >diff --git a/Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp b/Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp >index 44bc1215c419fd19d121eaf1f296bae3f3e716cc..92980dc264e15a57365ebf11517cf32db9da0d19 100644 >--- a/Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp >+++ b/Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp >@@ -96,7 +96,7 @@ ScriptExecutionContext* PageNetworkAgent::scriptExecutionContext(ErrorString& er > > auto* document = frame->document(); > if (!document) { >- errorString = ASCIILiteral("No Document instance for the specified frame"); >+ errorString = "No Document instance for the specified frame"_s; > return nullptr; > } > >diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp >index cc0390cd51643334b9e8404bbf0f8cafb10ed7ca..177367030e920afa2267e06a6eac8621f5b5bbce 100644 >--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp >+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp >@@ -113,13 +113,13 @@ InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString& errorString, > JSC::ExecState* scriptState = mainWorldExecState(&m_inspectedPage.mainFrame()); > InjectedScript result = injectedScriptManager().injectedScriptFor(scriptState); > if (result.hasNoValue()) >- errorString = ASCIILiteral("Internal error: main world execution context not found."); >+ errorString = "Internal error: main world execution context not found."_s; > return result; > } > > InjectedScript injectedScript = injectedScriptManager().injectedScriptForId(*executionContextId); > if (injectedScript.hasNoValue()) >- errorString = ASCIILiteral("Execution context with given id not found."); >+ errorString = "Execution context with given id not found."_s; > return injectedScript; > } > >diff --git a/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp b/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp >index 0f79fb7def7c272dbfa85c54e9149af9a560b45b..2ed55cf56799f65309cd6ee296bc5bb63890a2cd 100644 >--- a/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp >+++ b/Source/WebCore/inspector/agents/worker/ServiceWorkerAgent.cpp >@@ -37,7 +37,7 @@ namespace WebCore { > using namespace Inspector; > > ServiceWorkerAgent::ServiceWorkerAgent(WorkerAgentContext& context) >- : InspectorAgentBase(ASCIILiteral("ServiceWorker"), context) >+ : InspectorAgentBase("ServiceWorker"_s, context) > , m_serviceWorkerGlobalScope(downcast<ServiceWorkerGlobalScope>(context.workerGlobalScope)) > , m_backendDispatcher(Inspector::ServiceWorkerBackendDispatcher::create(context.backendDispatcher, this)) > { >diff --git a/Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp b/Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp >index 914238767bf6c0f144303fa5245c0b6960edf841..cac0625699a418b890d3d113d3c4927bde6fec9d 100644 >--- a/Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp >+++ b/Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp >@@ -56,7 +56,7 @@ void WorkerDebuggerAgent::breakpointActionLog(ExecState& state, const String& me > InjectedScript WorkerDebuggerAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) > { > if (executionContextId) { >- errorString = ASCIILiteral("Execution context id is not supported for workers as there is only one execution context."); >+ errorString = "Execution context id is not supported for workers as there is only one execution context."_s; > return InjectedScript(); > } > >diff --git a/Source/WebCore/inspector/agents/worker/WorkerRuntimeAgent.cpp b/Source/WebCore/inspector/agents/worker/WorkerRuntimeAgent.cpp >index e7601189d1b8d37b54194d4250c75dda37306dd4..9cc69d1724cdad18f98e3d3b32f2968a554e067d 100644 >--- a/Source/WebCore/inspector/agents/worker/WorkerRuntimeAgent.cpp >+++ b/Source/WebCore/inspector/agents/worker/WorkerRuntimeAgent.cpp >@@ -61,7 +61,7 @@ void WorkerRuntimeAgent::willDestroyFrontendAndBackend(DisconnectReason reason) > InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) > { > if (executionContextId) { >- errorString = ASCIILiteral("Execution context id is not supported for workers as there is only one execution context."); >+ errorString = "Execution context id is not supported for workers as there is only one execution context."_s; > return InjectedScript(); > } > >diff --git a/Source/WebCore/loader/ContentFilter.cpp b/Source/WebCore/loader/ContentFilter.cpp >index e2990197f2da00980d1d01b010103503c6cbd0d6..a6dae5be29f594afa266ff03923423ce5bfd9df8 100644 >--- a/Source/WebCore/loader/ContentFilter.cpp >+++ b/Source/WebCore/loader/ContentFilter.cpp >@@ -286,7 +286,7 @@ void ContentFilter::handleProvisionalLoadFailure(const ResourceError& error) > ASSERT(m_blockedError.failingURL() == error.failingURL()); > > RefPtr<SharedBuffer> replacementData { m_blockingContentFilter->replacementData() }; >- ResourceResponse response { URL(), ASCIILiteral("text/html"), static_cast<long long>(replacementData->size()), ASCIILiteral("UTF-8") }; >+ ResourceResponse response { URL(), "text/html"_s, static_cast<long long>(replacementData->size()), "UTF-8"_s }; > SubstituteData substituteData { WTFMove(replacementData), error.failingURL(), response, SubstituteData::SessionHistoryVisibility::Hidden }; > SetForScope<bool> loadingBlockedPage { m_isLoadingBlockedPage, true }; > m_documentLoader.frameLoader()->load(FrameLoadRequest(*m_documentLoader.frame(), blockedPageURL(), ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData)); >diff --git a/Source/WebCore/loader/CrossOriginAccessControl.cpp b/Source/WebCore/loader/CrossOriginAccessControl.cpp >index 26580956558cffdb3417f456f9888c8b6b823b9f..edaf51d1b63a611ac0ad9c86d88cb01df224ddbd 100644 >--- a/Source/WebCore/loader/CrossOriginAccessControl.cpp >+++ b/Source/WebCore/loader/CrossOriginAccessControl.cpp >@@ -166,9 +166,9 @@ bool passesAccessControlCheck(const ResourceResponse& response, StoredCredential > String securityOriginString = securityOrigin.toString(); > if (accessControlOriginString != securityOriginString) { > if (accessControlOriginString == "*") >- errorDescription = ASCIILiteral("Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true."); >+ errorDescription = "Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true."_s; > else if (accessControlOriginString.find(',') != notFound) >- errorDescription = ASCIILiteral("Access-Control-Allow-Origin cannot contain more than one origin."); >+ errorDescription = "Access-Control-Allow-Origin cannot contain more than one origin."_s; > else > errorDescription = makeString("Origin ", securityOriginString, " is not allowed by Access-Control-Allow-Origin."); > return false; >@@ -188,7 +188,7 @@ bool passesAccessControlCheck(const ResourceResponse& response, StoredCredential > bool validatePreflightResponse(const ResourceRequest& request, const ResourceResponse& response, StoredCredentialsPolicy storedCredentialsPolicy, SecurityOrigin& securityOrigin, String& errorDescription) > { > if (!response.isSuccessful()) { >- errorDescription = ASCIILiteral("Preflight response is not successful"); >+ errorDescription = "Preflight response is not successful"_s; > return false; > } > >diff --git a/Source/WebCore/loader/CrossOriginPreflightChecker.cpp b/Source/WebCore/loader/CrossOriginPreflightChecker.cpp >index 7e55616216a67aca3e6cbaf6b74d7f3b82dde8d2..d213f1a642aee7f844da90d56d154ca5604712a1 100644 >--- a/Source/WebCore/loader/CrossOriginPreflightChecker.cpp >+++ b/Source/WebCore/loader/CrossOriginPreflightChecker.cpp >@@ -93,7 +93,7 @@ void CrossOriginPreflightChecker::notifyFinished(CachedResource& resource) > preflightError.setType(ResourceError::Type::AccessControl); > > if (!preflightError.isTimeout()) >- m_loader.document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("CORS-preflight request was blocked")); >+ m_loader.document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, "CORS-preflight request was blocked"_s); > m_loader.preflightFailure(m_resource->identifier(), preflightError); > return; > } >@@ -144,7 +144,7 @@ void CrossOriginPreflightChecker::doPreflight(DocumentThreadableLoader& loader, > error.setType(ResourceError::Type::AccessControl); > > if (!error.isTimeout()) >- loader.document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("CORS-preflight request was blocked")); >+ loader.document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, "CORS-preflight request was blocked"_s); > > loader.preflightFailure(identifier, error); > return; >@@ -153,7 +153,7 @@ void CrossOriginPreflightChecker::doPreflight(DocumentThreadableLoader& loader, > // FIXME: Ideally, we should ask platformLoadResourceSynchronously to set ResourceResponse isRedirected and use it here. > bool isRedirect = preflightRequest.url().strippedForUseAsReferrer() != response.url().strippedForUseAsReferrer(); > if (isRedirect || !response.isSuccessful()) { >- auto errorMessage = ASCIILiteral("Preflight response is not successful"); >+ auto errorMessage = "Preflight response is not successful"_s; > loader.document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, errorMessage); > > loader.preflightFailure(identifier, ResourceError { errorDomainWebKitInternal, 0, request.url(), errorMessage, ResourceError::Type::AccessControl }); >diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp >index 30775bc8377e1159eb0e79721cd0087c8d517f33..ad4d01f50657a5af13f931322b78eb2ec4bc40cb 100644 >--- a/Source/WebCore/loader/DocumentLoader.cpp >+++ b/Source/WebCore/loader/DocumentLoader.cpp >@@ -846,11 +846,11 @@ static bool isRemoteWebArchive(const DocumentLoader& documentLoader) > using MIMETypeHashSet = HashSet<String, ASCIICaseInsensitiveHash>; > static NeverDestroyed<MIMETypeHashSet> webArchiveMIMETypes { > MIMETypeHashSet { >- ASCIILiteral("application/x-webarchive"), >- ASCIILiteral("application/x-mimearchive"), >- ASCIILiteral("multipart/related"), >+ "application/x-webarchive"_s, >+ "application/x-mimearchive"_s, >+ "multipart/related"_s, > #if PLATFORM(GTK) >- ASCIILiteral("message/rfc822"), >+ "message/rfc822"_s, > #endif > } > }; >@@ -1904,7 +1904,7 @@ void DocumentLoader::startIconLoading() > > auto findResult = m_linkIcons.findMatching([](auto& icon) { return icon.type == LinkIconType::Favicon; }); > if (findResult == notFound) >- m_linkIcons.append({ document->completeURL(ASCIILiteral("/favicon.ico")), LinkIconType::Favicon, String(), std::nullopt, { } }); >+ m_linkIcons.append({ document->completeURL("/favicon.ico"_s), LinkIconType::Favicon, String(), std::nullopt, { } }); > > if (!m_linkIcons.size()) > return; >diff --git a/Source/WebCore/loader/DocumentThreadableLoader.cpp b/Source/WebCore/loader/DocumentThreadableLoader.cpp >index b145c1764c34c7ae519003fc8aa2dc822e944e37..d09001e46398056187213ace9423379f74493ff0 100644 >--- a/Source/WebCore/loader/DocumentThreadableLoader.cpp >+++ b/Source/WebCore/loader/DocumentThreadableLoader.cpp >@@ -657,22 +657,22 @@ const ContentSecurityPolicy& DocumentThreadableLoader::contentSecurityPolicy() c > > void DocumentThreadableLoader::reportRedirectionWithBadScheme(const URL& url) > { >- logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Redirection to URL with a scheme that is not HTTP(S).", ResourceError::Type::AccessControl)); >+ logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Redirection to URL with a scheme that is not HTTP(S)."_s, ResourceError::Type::AccessControl)); > } > > void DocumentThreadableLoader::reportContentSecurityPolicyError(const URL& url) > { >- logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, ASCIILiteral { "Blocked by Content Security Policy." }, ResourceError::Type::AccessControl)); >+ logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Blocked by Content Security Policy."_s, ResourceError::Type::AccessControl)); > } > > void DocumentThreadableLoader::reportCrossOriginResourceSharingError(const URL& url) > { >- logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Cross-origin redirection denied by Cross-Origin Resource Sharing policy.", ResourceError::Type::AccessControl)); >+ logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Cross-origin redirection denied by Cross-Origin Resource Sharing policy."_s, ResourceError::Type::AccessControl)); > } > > void DocumentThreadableLoader::reportIntegrityMetadataError(const URL& url) > { >- logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Failed integrity metadata check.", ResourceError::Type::General)); >+ logErrorAndFail(ResourceError(errorDomainWebKitInternal, 0, url, "Failed integrity metadata check."_s, ResourceError::Type::General)); > } > > void DocumentThreadableLoader::logErrorAndFail(const ResourceError& error) >diff --git a/Source/WebCore/loader/FormSubmission.cpp b/Source/WebCore/loader/FormSubmission.cpp >index c70389ad7c1485f4825fb80931e755c3873e72e2..fe427876159a1c780e00e13d524cd771b90433a7 100644 >--- a/Source/WebCore/loader/FormSubmission.cpp >+++ b/Source/WebCore/loader/FormSubmission.cpp >@@ -93,10 +93,10 @@ void FormSubmission::Attributes::parseAction(const String& action) > String FormSubmission::Attributes::parseEncodingType(const String& type) > { > if (equalLettersIgnoringASCIICase(type, "multipart/form-data")) >- return ASCIILiteral("multipart/form-data"); >+ return "multipart/form-data"_s; > if (equalLettersIgnoringASCIICase(type, "text/plain")) >- return ASCIILiteral("text/plain"); >- return ASCIILiteral("application/x-www-form-urlencoded"); >+ return "text/plain"_s; >+ return "application/x-www-form-urlencoded"_s; > } > > void FormSubmission::Attributes::updateEncodingType(const String& type) >diff --git a/Source/WebCore/loader/FormSubmission.h b/Source/WebCore/loader/FormSubmission.h >index 6ebce6b77a299072c76690d8831f0d985389e0fe..4cdf48b77c6d05e2e65579a432148308d848ebc9 100644 >--- a/Source/WebCore/loader/FormSubmission.h >+++ b/Source/WebCore/loader/FormSubmission.h >@@ -49,7 +49,7 @@ class FormSubmission : public RefCounted<FormSubmission> { > Method method() const { return m_method; } > static Method parseMethodType(const String&); > void updateMethodType(const String&); >- static ASCIILiteral methodString(Method method) { return ASCIILiteral { method == Method::Post ? "post" : "get" }; } >+ static ASCIILiteral methodString(Method method) { return method == Method::Post ? "post"_s : "get"_s; } > > const String& action() const { return m_action; } > void parseAction(const String&); >@@ -70,7 +70,7 @@ class FormSubmission : public RefCounted<FormSubmission> { > bool m_isMultiPartForm { false }; > String m_action; > String m_target; >- String m_encodingType { ASCIILiteral { "application/x-www-form-urlencoded" } }; >+ String m_encodingType { "application/x-www-form-urlencoded"_s }; > String m_acceptCharset; > }; > >diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp >index 9d726ab48f40d8f8cff18df0e2c2896b25249fbd..3f20375d716bd6e5ca4e4a64737295b489985a7f 100644 >--- a/Source/WebCore/loader/FrameLoader.cpp >+++ b/Source/WebCore/loader/FrameLoader.cpp >@@ -326,7 +326,7 @@ void FrameLoader::initForSynthesizedDocument(const URL&) > > auto loader = m_client.createDocumentLoader(ResourceRequest(URL(ParsedURLString, emptyString())), SubstituteData()); > loader->attachToFrame(m_frame); >- loader->setResponse(ResourceResponse(URL(), ASCIILiteral("text/html"), 0, String())); >+ loader->setResponse(ResourceResponse(URL(), "text/html"_s, 0, String())); > loader->setCommitted(true); > setDocumentLoader(loader.ptr()); > >@@ -977,7 +977,7 @@ void FrameLoader::loadURLIntoChildFrame(const URL& url, const String& referer, F > auto* lexicalFrame = lexicalFrameFromCommonVM(); > auto initiatedByMainFrame = lexicalFrame && lexicalFrame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown; > >- FrameLoadRequest frameLoadRequest { *m_frame.document(), m_frame.document()->securityOrigin(), { url }, ASCIILiteral("_self"), LockHistory::No, LockBackForwardList::Yes, ShouldSendReferrer::MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Suppress, ShouldOpenExternalURLsPolicy::ShouldNotAllow, initiatedByMainFrame }; >+ FrameLoadRequest frameLoadRequest { *m_frame.document(), m_frame.document()->securityOrigin(), { url }, "_self"_s, LockHistory::No, LockBackForwardList::Yes, ShouldSendReferrer::MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Suppress, ShouldOpenExternalURLsPolicy::ShouldNotAllow, initiatedByMainFrame }; > childFrame->loader().loadURL(WTFMove(frameLoadRequest), referer, FrameLoadType::RedirectWithLockedBackForwardList, nullptr, { }, [] { }); > } > >@@ -1419,7 +1419,7 @@ SubstituteData FrameLoader::defaultSubstituteDataForURL(const URL& url) > ASSERT(!srcdoc.isNull()); > CString encodedSrcdoc = srcdoc.string().utf8(); > >- ResourceResponse response(URL(), ASCIILiteral("text/html"), encodedSrcdoc.length(), ASCIILiteral("UTF-8")); >+ ResourceResponse response(URL(), "text/html"_s, encodedSrcdoc.length(), "UTF-8"_s); > return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcdoc.length()), URL(), response, SubstituteData::SessionHistoryVisibility::Hidden); > } > >@@ -2871,7 +2871,7 @@ void FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded(ResourceRequest& reques > return; > } > >- request.setHTTPHeaderField(HTTPHeaderName::UpgradeInsecureRequests, ASCIILiteral("1")); >+ request.setHTTPHeaderField(HTTPHeaderName::UpgradeInsecureRequests, "1"_s); > } > > void FrameLoader::loadPostRequest(FrameLoadRequest&& request, const String& referrer, FrameLoadType loadType, Event* event, RefPtr<FormState>&& formState, CompletionHandler<void()>&& completionHandler) >@@ -3220,7 +3220,7 @@ bool FrameLoader::dispatchBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLo > // If the navigating FrameLoader has already shown a beforeunload confirmation panel for the current navigation attempt, > // this frame is not allowed to cause another one to be shown. > if (frameLoaderBeingNavigated->m_currentNavigationHasShownBeforeUnloadConfirmPanel) { >- document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Blocked attempt to show multiple beforeunload confirmation dialogs for the same navigation.")); >+ document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Blocked attempt to show multiple beforeunload confirmation dialogs for the same navigation."_s); > return true; > } > >@@ -3233,7 +3233,7 @@ bool FrameLoader::dispatchBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLo > if (!parentDocument) > return true; > if (!m_frame.document() || !m_frame.document()->securityOrigin().canAccess(parentDocument->securityOrigin())) { >- document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin. Protocols, domains, and ports must match.")); >+ document->addConsoleMessage(MessageSource::JS, MessageLevel::Error, "Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin. Protocols, domains, and ports must match."_s); > return true; > } > >diff --git a/Source/WebCore/loader/LinkLoader.cpp b/Source/WebCore/loader/LinkLoader.cpp >index e637b3995b17f051afc596864c9350bd67b1dbd4..6eaa81a4e5f0021dc6cb6dfdaf2ee66d3a0ddadd 100644 >--- a/Source/WebCore/loader/LinkLoader.cpp >+++ b/Source/WebCore/loader/LinkLoader.cpp >@@ -220,9 +220,9 @@ void LinkLoader::preconnectIfNeeded(const LinkRelAttribute& relAttribute, const > return; > > if (!error.isNull()) >- weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString(ASCIILiteral("Failed to preconnect to "), href.string(), ASCIILiteral(". Error: "), error.localizedDescription())); >+ weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Error, makeString("Failed to preconnect to "_s, href.string(), ". Error: "_s, error.localizedDescription())); > else >- weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Info, makeString(ASCIILiteral("Successfuly preconnected to "), href.string())); >+ weakDocument->addConsoleMessage(MessageSource::Network, MessageLevel::Info, makeString("Successfuly preconnected to "_s, href.string())); > }); > } > >diff --git a/Source/WebCore/loader/NavigationScheduler.cpp b/Source/WebCore/loader/NavigationScheduler.cpp >index b61140ab7ee5e914450893be860499a8d606c1cb..b03a4541ea902d73d245727d03f4a4eb8b7d138e 100644 >--- a/Source/WebCore/loader/NavigationScheduler.cpp >+++ b/Source/WebCore/loader/NavigationScheduler.cpp >@@ -318,7 +318,7 @@ class ScheduledPageBlock final : public ScheduledNavigation { > { > UserGestureIndicator gestureIndicator { userGestureToForward() }; > >- ResourceResponse replacementResponse { m_originDocument.url(), ASCIILiteral("text/plain"), 0, ASCIILiteral("UTF-8") }; >+ ResourceResponse replacementResponse { m_originDocument.url(), "text/plain"_s, 0, "UTF-8"_s }; > SubstituteData replacementData { SharedBuffer::create(), m_originDocument.url(), replacementResponse, SubstituteData::SessionHistoryVisibility::Hidden }; > > ResourceRequest resourceRequest { m_originDocument.url(), emptyString(), ReloadIgnoringCacheData }; >@@ -422,7 +422,7 @@ void NavigationScheduler::scheduleLocationChange(Document& initiatingDocument, S > auto* frame = lexicalFrameFromCommonVM(); > auto initiatedByMainFrame = frame && frame->isMainFrame() ? InitiatedByMainFrame::Yes : InitiatedByMainFrame::Unknown; > >- FrameLoadRequest frameLoadRequest { initiatingDocument, securityOrigin, resourceRequest, ASCIILiteral("_self"), lockHistory, lockBackForwardList, MaybeSendReferrer, AllowNavigationToInvalidURL::No, NewFrameOpenerPolicy::Allow, initiatingDocument.shouldOpenExternalURLsPolicyToPropagate(), initiatedByMainFrame }; >+ FrameLoadRequest frameLoadRequest { initiatingDocument, securityOrigin, resourceRequest, "_self"_s, lockHistory, lockBackForwardList, MaybeSendReferrer, AllowNavigationToInvalidURL::No, NewFrameOpenerPolicy::Allow, initiatingDocument.shouldOpenExternalURLsPolicyToPropagate(), initiatedByMainFrame }; > loader.changeLocation(WTFMove(frameLoadRequest)); > return; > } >diff --git a/Source/WebCore/loader/PingLoader.cpp b/Source/WebCore/loader/PingLoader.cpp >index 55ce2069d7d5c8e6122539e258dfa1ff120805b5..134e5560e66f2dea45ac0018c3616065172dcb2e 100644 >--- a/Source/WebCore/loader/PingLoader.cpp >+++ b/Source/WebCore/loader/PingLoader.cpp >@@ -160,14 +160,14 @@ void PingLoader::sendViolationReport(Frame& frame, const URL& reportURL, Ref<For > auto& document = *frame.document(); > document.contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(request, ContentSecurityPolicy::InsecureRequestType::Load); > >- request.setHTTPMethod(ASCIILiteral("POST")); >+ request.setHTTPMethod("POST"_s); > request.setHTTPBody(WTFMove(report)); > switch (reportType) { > case ViolationReportType::ContentSecurityPolicy: >- request.setHTTPContentType(ASCIILiteral("application/csp-report")); >+ request.setHTTPContentType("application/csp-report"_s); > break; > case ViolationReportType::XSSAuditor: >- request.setHTTPContentType(ASCIILiteral("application/json")); >+ request.setHTTPContentType("application/json"_s); > break; > } > >diff --git a/Source/WebCore/loader/ResourceLoadStatistics.cpp b/Source/WebCore/loader/ResourceLoadStatistics.cpp >index 40599d71f7551f6658510eca5ccd7f246ef52a78..96b7eb9b0b40d57b9a36cd92fcbfbe8e959d028b 100644 >--- a/Source/WebCore/loader/ResourceLoadStatistics.cpp >+++ b/Source/WebCore/loader/ResourceLoadStatistics.cpp >@@ -342,7 +342,7 @@ String ResourceLoadStatistics::primaryDomain(const URL& url) > String ResourceLoadStatistics::primaryDomain(StringView host) > { > if (host.isNull() || host.isEmpty()) >- return ASCIILiteral("nullOrigin"); >+ return "nullOrigin"_s; > > String hostString = host.toString(); > #if ENABLE(PUBLIC_SUFFIX_LIST) >@@ -365,11 +365,11 @@ bool ResourceLoadStatistics::areDomainsAssociated(bool needsSiteSpecificQuirks, > > // Domains owned by Dow Jones & Company, Inc. > const unsigned dowJonesIdentifier = 1; >- map.add(ASCIILiteral("dowjones.com"), dowJonesIdentifier); >- map.add(ASCIILiteral("wsj.com"), dowJonesIdentifier); >- map.add(ASCIILiteral("barrons.com"), dowJonesIdentifier); >- map.add(ASCIILiteral("marketwatch.com"), dowJonesIdentifier); >- map.add(ASCIILiteral("wsjplus.com"), dowJonesIdentifier); >+ map.add("dowjones.com"_s, dowJonesIdentifier); >+ map.add("wsj.com"_s, dowJonesIdentifier); >+ map.add("barrons.com"_s, dowJonesIdentifier); >+ map.add("marketwatch.com"_s, dowJonesIdentifier); >+ map.add("wsjplus.com"_s, dowJonesIdentifier); > > return map; > }(); >diff --git a/Source/WebCore/loader/ResourceLoader.cpp b/Source/WebCore/loader/ResourceLoader.cpp >index 230d6f9ce9ceb7114c35898ccf2921c92cfc11b5..5201585f6bb303c8a0f12ad7bb87061b72b808a2 100644 >--- a/Source/WebCore/loader/ResourceLoader.cpp >+++ b/Source/WebCore/loader/ResourceLoader.cpp >@@ -271,7 +271,7 @@ void ResourceLoader::loadDataURL() > > ResourceResponse dataResponse { url, result.mimeType, static_cast<long long>(dataSize), result.charset }; > dataResponse.setHTTPStatusCode(200); >- dataResponse.setHTTPStatusText(ASCIILiteral("OK")); >+ dataResponse.setHTTPStatusText("OK"_s); > dataResponse.setHTTPHeaderField(HTTPHeaderName::ContentType, result.contentType); > dataResponse.setSource(ResourceResponse::Source::Network); > this->didReceiveResponse(dataResponse, [this, protectedThis = WTFMove(protectedThis), dataSize, data = result.data.releaseNonNull()]() mutable { >@@ -463,7 +463,7 @@ void ResourceLoader::didBlockAuthenticationChallenge() > if (m_options.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials) > return; > ASSERT(!shouldAllowResourceToAskForCredentials()); >- FrameLoader::reportAuthenticationChallengeBlocked(m_frame.get(), m_request.url(), ASCIILiteral("it is a cross-origin request")); >+ FrameLoader::reportAuthenticationChallengeBlocked(m_frame.get(), m_request.url(), "it is a cross-origin request"_s); > } > > void ResourceLoader::didReceiveResponse(const ResourceResponse& r, CompletionHandler<void()>&& policyCompletionHandler) >diff --git a/Source/WebCore/loader/SubresourceLoader.cpp b/Source/WebCore/loader/SubresourceLoader.cpp >index a4a15d81fbc520901a75cc2ef103334c4435b2c0..eca2033ecaa4d1b50fd9e7a8b15247e499b5be30 100644 >--- a/Source/WebCore/loader/SubresourceLoader.cpp >+++ b/Source/WebCore/loader/SubresourceLoader.cpp >@@ -229,7 +229,7 @@ void SubresourceLoader::willSendRequestInternal(ResourceRequest&& newRequest, co > didFinishLoading(emptyMetrics); > return completionHandler(WTFMove(newRequest)); > } else if (m_redirectCount++ >= options().maxRedirectCount) { >- cancel(ResourceError(String(), 0, request().url(), ASCIILiteral("Too many redirections"), ResourceError::Type::General)); >+ cancel(ResourceError(String(), 0, request().url(), "Too many redirections"_s, ResourceError::Type::General)); > return completionHandler(WTFMove(newRequest)); > } > >@@ -554,7 +554,7 @@ bool SubresourceLoader::checkRedirectionCrossOriginAccessControl(const ResourceR > > // Implementing https://fetch.spec.whatwg.org/#concept-http-redirect-fetch step 8 & 9. > if (m_resource->isCrossOrigin() && !isValidCrossOriginRedirectionURL(newRequest.url())) { >- errorMessage = ASCIILiteral("URL is either a non-HTTP URL or contains credentials."); >+ errorMessage = "URL is either a non-HTTP URL or contains credentials."_s; > return false; > } > >diff --git a/Source/WebCore/loader/ThreadableLoader.cpp b/Source/WebCore/loader/ThreadableLoader.cpp >index 68b7e9b3cd001f681d1902f2ec73c01925cc9431..d53b4ad39bb5c5e3822906f5b99a15991939695c 100644 >--- a/Source/WebCore/loader/ThreadableLoader.cpp >+++ b/Source/WebCore/loader/ThreadableLoader.cpp >@@ -144,7 +144,7 @@ void ThreadableLoader::logError(ScriptExecutionContext& context, const ResourceE > else > messageStart = "Cannot load "; > >- String messageEnd = error.isAccessControl() ? ASCIILiteral(" due to access control checks.") : ASCIILiteral("."); >+ String messageEnd = error.isAccessControl() ? " due to access control checks."_s : "."_s; > context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString(messageStart, error.failingURL().string(), messageEnd)); > } > >diff --git a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >index c2f0030b273ad71e42513234a6a18827bc002a41..d9947a2b3454a757b51deab909d1b319f67f6550 100644 >--- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >+++ b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >@@ -486,7 +486,7 @@ void ApplicationCacheGroup::abort(Frame& frame) > if (m_completionType != None) > return; > >- frame.document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Debug, ASCIILiteral("Application Cache download process was aborted.")); >+ frame.document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Debug, "Application Cache download process was aborted."_s); > cacheUpdateFailed(); > } > >@@ -529,7 +529,7 @@ void ApplicationCacheGroup::didFinishLoadingEntry(const URL& entryURL) > // FIXME: Should we break earlier and prevent redownloading on later page loads? > if (m_originQuotaExceededPreviously && m_availableSpaceInQuota < m_cacheBeingUpdated->estimatedSizeInStorage()) { > m_currentResource = nullptr; >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache update failed, because size quota was exceeded.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache update failed, because size quota was exceeded."_s); > cacheUpdateFailed(); > return; > } >@@ -583,7 +583,7 @@ void ApplicationCacheGroup::didFinishLoadingManifest() > > if (!isUpgradeAttempt && !m_manifestResource) { > // The server returned 304 Not Modified even though we didn't send a conditional request. >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be fetched because of an unexpected 304 Not Modified server response.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache manifest could not be fetched because of an unexpected 304 Not Modified server response."_s); > cacheUpdateFailed(); > return; > } >@@ -609,7 +609,7 @@ void ApplicationCacheGroup::didFinishLoadingManifest() > Manifest manifest; > if (!parseManifest(m_manifestURL, m_manifestResource->response().mimeType(), m_manifestResource->data().data(), m_manifestResource->data().size(), manifest)) { > // At the time of this writing, lack of "CACHE MANIFEST" signature is the only reason for parseManifest to fail. >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST?")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST?"_s); > cacheUpdateFailed(); > return; > } >@@ -826,7 +826,7 @@ void ApplicationCacheGroup::checkIfLoadIsComplete() > // We ran out of space for this origin. Fall down to the normal error handling > // after recording this state. > m_originQuotaExceededPreviously = true; >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache update failed, because size quota was exceeded.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache update failed, because size quota was exceeded."_s); > } > > if (failureReason == ApplicationCacheStorage::TotalQuotaReached && !m_calledReachedMaxAppCacheSize) { >diff --git a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp b/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp >index 07005cf4e1bce6fd828cd2d76a2814b534a97482..bbf088dbfbadc7d1099fff201ea4b2ed0a34618b 100644 >--- a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp >+++ b/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp >@@ -238,7 +238,7 @@ URL ApplicationCacheHost::createFileURL(const String& path) > URL url(adoptCF(CFURLCreateWithFileSystemPath(0, path.createCFString().get(), kCFURLWindowsPathStyle, false)).get()); > #else > URL url; >- url.setProtocol(ASCIILiteral("file")); >+ url.setProtocol("file"_s); > url.setPath(path); > #endif > return url; >diff --git a/Source/WebCore/loader/appcache/ManifestParser.cpp b/Source/WebCore/loader/appcache/ManifestParser.cpp >index 31c2e7956ff8e34c9774276d91cf9d8670fa7e2c..cb481585f4a0dc3689c8e815e706ca24c4260015 100644 >--- a/Source/WebCore/loader/appcache/ManifestParser.cpp >+++ b/Source/WebCore/loader/appcache/ManifestParser.cpp >@@ -58,7 +58,7 @@ bool parseManifest(const URL& manifestURL, const String& manifestMIMEType, const > > Mode mode = Explicit; > >- String manifestString = TextResourceDecoder::create(ASCIILiteral(cacheManifestMIMEType), "UTF-8")->decodeAndFlush(data, length); >+ String manifestString = TextResourceDecoder::create(ASCIILiteral::fromLiteralUnsafe(cacheManifestMIMEType), "UTF-8")->decodeAndFlush(data, length); > > // Look for the magic signature: "^\xFEFF?CACHE MANIFEST[ \t]?" (the BOM is removed by TextResourceDecoder). > // Example: "CACHE MANIFEST #comment" is a valid signature. >diff --git a/Source/WebCore/loader/archive/ArchiveFactory.cpp b/Source/WebCore/loader/archive/ArchiveFactory.cpp >index bee6e9e2c2904ad8c39f15d9c8b4d56847e8a4ba..48c388e3b608e5760bcdc0bb8a8a18418d7d64d2 100644 >--- a/Source/WebCore/loader/archive/ArchiveFactory.cpp >+++ b/Source/WebCore/loader/archive/ArchiveFactory.cpp >@@ -61,12 +61,12 @@ static ArchiveMIMETypesMap createArchiveMIMETypesMap() > ArchiveMIMETypesMap map; > > #if ENABLE(WEB_ARCHIVE) && USE(CF) >- map.add(ASCIILiteral { "application/x-webarchive" }, archiveFactoryCreate<LegacyWebArchive>); >+ map.add("application/x-webarchive"_s, archiveFactoryCreate<LegacyWebArchive>); > #endif > > #if ENABLE(MHTML) >- map.add(ASCIILiteral { "multipart/related" }, archiveFactoryCreate<MHTMLArchive>); >- map.add(ASCIILiteral { "application/x-mimearchive" }, archiveFactoryCreate<MHTMLArchive>); >+ map.add("multipart/related"_s, archiveFactoryCreate<MHTMLArchive>); >+ map.add("application/x-mimearchive"_s, archiveFactoryCreate<MHTMLArchive>); > #endif > > return map; >diff --git a/Source/WebCore/loader/cache/CachedResource.cpp b/Source/WebCore/loader/cache/CachedResource.cpp >index aa54541d534ec1a2cb58ad000a33cdba34d6064e..8be377a87f6693139b6c997dae39b20ad79eb2d9 100644 >--- a/Source/WebCore/loader/cache/CachedResource.cpp >+++ b/Source/WebCore/loader/cache/CachedResource.cpp >@@ -261,7 +261,7 @@ void CachedResource::load(CachedResourceLoader& cachedResourceLoader) > > if (m_options.keepAlive) { > if (!cachedResourceLoader.keepaliveRequestTracker().tryRegisterRequest(*this)) { >- setResourceError({ errorDomainWebKitInternal, 0, request.url(), ASCIILiteral("Reached maximum amount of queued data of 64Kb for keepalive requests"), ResourceError::Type::AccessControl }); >+ setResourceError({ errorDomainWebKitInternal, 0, request.url(), "Reached maximum amount of queued data of 64Kb for keepalive requests"_s, ResourceError::Type::AccessControl }); > failBeforeStarting(); > return; > } >diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp >index 6c6345132d9abc7a3e210d4cf65ba2b53bfea7b3..752a0b098584762003124f7f2d8e4f248c5c4c4c 100644 >--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp >+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp >@@ -504,7 +504,7 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const URL& url, > > if (options.mode == FetchOptions::Mode::NoCors && options.redirect != FetchOptions::Redirect::Follow) { > ASSERT(type != CachedResource::Type::MainResource); >- frame()->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("No-Cors mode requires follow redirect mode")); >+ frame()->document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "No-Cors mode requires follow redirect mode"_s); > return false; > } > >@@ -793,7 +793,7 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ > > if (!url.isValid()) { > RELEASE_LOG_IF_ALLOWED("requestResource: URL is invalid (frame = %p)", frame()); >- return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, ASCIILiteral("URL is invalid") }); >+ return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, "URL is invalid"_s }); > } > > prepareFetch(type, request); >@@ -801,7 +801,7 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ > // We are passing url as well as request, as request url may contain a fragment identifier. > if (!canRequest(type, url, request, forPreload)) { > RELEASE_LOG_IF_ALLOWED("requestResource: Not allowed to request resource (frame = %p)", frame()); >- return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, ASCIILiteral("Not allowed to request resource"), ResourceError::Type::AccessControl }); >+ return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, "Not allowed to request resource"_s, ResourceError::Type::AccessControl }); > } > > #if ENABLE(CONTENT_EXTENSIONS) >@@ -819,7 +819,7 @@ ResourceErrorOr<CachedResourceHandle<CachedResource>> CachedResourceLoader::requ > resource->setResourceError(ResourceError(ContentExtensions::WebKitContentBlockerDomain, 0, resourceRequest.url(), WEB_UI_STRING("The URL was blocked by a content blocker", "WebKitErrorBlockedByContentBlocker description"))); > return WTFMove(resource); > } >- return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, ASCIILiteral("Resource blocked by content blocker"), ResourceError::Type::AccessControl }); >+ return makeUnexpected(ResourceError { errorDomainWebKitInternal, 0, url, "Resource blocked by content blocker"_s, ResourceError::Type::AccessControl }); > } > if (blockedStatus.madeHTTPS > && type == CachedResource::Type::MainResource >diff --git a/Source/WebCore/loader/cache/CachedResourceRequest.cpp b/Source/WebCore/loader/cache/CachedResourceRequest.cpp >index 8d7c4ebec3b21bf8f5f39ae58f298a722f43fb55..0cc60a7ea6d3fe83d140379d0fe057676ae6e379 100644 >--- a/Source/WebCore/loader/cache/CachedResourceRequest.cpp >+++ b/Source/WebCore/loader/cache/CachedResourceRequest.cpp >@@ -144,22 +144,22 @@ static inline String acceptHeaderValueFromType(CachedResource::Type type) > { > switch (type) { > case CachedResource::Type::MainResource: >- return ASCIILiteral("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); >+ return "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"_s; > case CachedResource::Type::ImageResource: > if (ImageDecoder::supportsMediaType(ImageDecoder::MediaType::Video)) >- return ASCIILiteral("image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5"); >- return ASCIILiteral("image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"); >+ return "image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5"_s; >+ return "image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"_s; > case CachedResource::Type::CSSStyleSheet: >- return ASCIILiteral("text/css,*/*;q=0.1"); >+ return "text/css,*/*;q=0.1"_s; > case CachedResource::Type::SVGDocumentResource: >- return ASCIILiteral("image/svg+xml"); >+ return "image/svg+xml"_s; > #if ENABLE(XSLT) > case CachedResource::Type::XSLStyleSheet: > // FIXME: This should accept more general xml formats */*+xml, image/svg+xml for example. >- return ASCIILiteral("text/xml,application/xml,application/xhtml+xml,text/xsl,application/rss+xml,application/atom+xml"); >+ return "text/xml,application/xml,application/xhtml+xml,text/xsl,application/rss+xml,application/atom+xml"_s; > #endif > default: >- return ASCIILiteral("*/*"); >+ return "*/*"_s; > } > } > >@@ -214,7 +214,7 @@ void CachedResourceRequest::updateAcceptEncodingHeader() > // FIXME: rdar://problem/40879225. Media engines triggering the load should not set this Accept-Encoding header. > ASSERT(!m_resourceRequest.hasHTTPHeaderField(HTTPHeaderName::AcceptEncoding) || m_options.destination == FetchOptions::Destination::Audio || m_options.destination == FetchOptions::Destination::Video); > >- m_resourceRequest.addHTTPHeaderFieldIfNotPresent(HTTPHeaderName::AcceptEncoding, ASCIILiteral("identity")); >+ m_resourceRequest.addHTTPHeaderFieldIfNotPresent(HTTPHeaderName::AcceptEncoding, "identity"_s); > } > > void CachedResourceRequest::removeFragmentIdentifierIfNeeded() >diff --git a/Source/WebCore/loader/cache/CachedScript.cpp b/Source/WebCore/loader/cache/CachedScript.cpp >index ed63c15cabf1a8e192119234cb6418dcdcb8740f..5ad1ec046b62d0425c2e48df913f6faa34d2714d 100644 >--- a/Source/WebCore/loader/cache/CachedScript.cpp >+++ b/Source/WebCore/loader/cache/CachedScript.cpp >@@ -38,7 +38,7 @@ namespace WebCore { > > CachedScript::CachedScript(CachedResourceRequest&& request, PAL::SessionID sessionID) > : CachedResource(WTFMove(request), Script, sessionID) >- , m_decoder(TextResourceDecoder::create(ASCIILiteral("application/javascript"), request.charset())) >+ , m_decoder(TextResourceDecoder::create("application/javascript"_s, request.charset())) > { > } > >diff --git a/Source/WebCore/loader/cache/MemoryCache.cpp b/Source/WebCore/loader/cache/MemoryCache.cpp >index 85f8dbfca387a1d58e953f44a37331a3585d1e3b..b5a405bd8fee3157f8541799b50162919b04f820 100644 >--- a/Source/WebCore/loader/cache/MemoryCache.cpp >+++ b/Source/WebCore/loader/cache/MemoryCache.cpp >@@ -562,7 +562,7 @@ void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins) > auto& resource = *keyValue.value; > auto& partitionName = keyValue.key.second; > if (!partitionName.isEmpty()) >- origins.add(SecurityOrigin::create(ASCIILiteral("http"), partitionName, 0)); >+ origins.add(SecurityOrigin::create("http"_s, partitionName, 0)); > else > origins.add(SecurityOrigin::create(resource.url())); > } >diff --git a/Source/WebCore/loader/soup/ResourceLoaderSoup.cpp b/Source/WebCore/loader/soup/ResourceLoaderSoup.cpp >index 4297ddf7e7f939db0268858e2c4607ae52a8a663..0ae315c425be1e36bdf56f038fa50cb2d35ee587 100644 >--- a/Source/WebCore/loader/soup/ResourceLoaderSoup.cpp >+++ b/Source/WebCore/loader/soup/ResourceLoaderSoup.cpp >@@ -66,7 +66,7 @@ void ResourceLoader::loadGResource() > GUniquePtr<char> contentType(g_content_type_guess(fileName.get(), data, dataSize, nullptr)); > ResourceResponse response { url, extractMIMETypeFromMediaType(contentType.get()), static_cast<long long>(dataSize), extractCharsetFromMediaType(contentType.get()) }; > response.setHTTPStatusCode(200); >- response.setHTTPStatusText(ASCIILiteral("OK")); >+ response.setHTTPStatusText("OK"_s); > response.setHTTPHeaderField(HTTPHeaderName::ContentType, contentType.get()); > response.setSource(ResourceResponse::Source::Network); > loader->deliverResponseAndData(response, SharedBuffer::create(bytes.get())); >diff --git a/Source/WebCore/page/DOMSelection.cpp b/Source/WebCore/page/DOMSelection.cpp >index 549ccf31cd9800479890f8718076d20367437f83..e98dd763b83959a9b6e6be8bc3c3b82b73bbf5f4 100644 >--- a/Source/WebCore/page/DOMSelection.cpp >+++ b/Source/WebCore/page/DOMSelection.cpp >@@ -150,13 +150,13 @@ bool DOMSelection::isCollapsed() const > String DOMSelection::type() const > { > if (!m_frame) >- return ASCIILiteral("None"); >+ return "None"_s; > auto& selection = m_frame->selection(); > if (selection.isNone()) >- return ASCIILiteral("None"); >+ return "None"_s; > if (selection.isCaret()) >- return ASCIILiteral("Caret"); >- return ASCIILiteral("Range"); >+ return "Caret"_s; >+ return "Range"_s; > } > > unsigned DOMSelection::rangeCount() const >diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp >index ffb07b8232278c340ae23b617b5f2435513d1cbf..4fdb608926a92846abb0463f450e521d4e291fbc 100644 >--- a/Source/WebCore/page/DOMWindow.cpp >+++ b/Source/WebCore/page/DOMWindow.cpp >@@ -1089,7 +1089,7 @@ void DOMWindow::close() > bool allowScriptsToCloseWindows = m_frame->settings().allowScriptsToCloseWindows(); > > if (!(page->openedByDOM() || page->backForward().count() <= 1 || allowScriptsToCloseWindows)) { >- console()->addMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Can't close the window since it was not opened by JavaScript")); >+ console()->addMessage(MessageSource::JS, MessageLevel::Warning, "Can't close the window since it was not opened by JavaScript"_s); > return; > } > >@@ -1872,7 +1872,7 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, Ref<EventListene > else > document()->deviceMotionController()->addDeviceEventListener(this); > } else if (document()) >- document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Blocked attempt add device motion or orientation listener from child frame that wasn't the same security origin as the main page.")); >+ document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Blocked attempt add device motion or orientation listener from child frame that wasn't the same security origin as the main page."_s); > } > #else > else if (eventType == eventNames().devicemotionEvent) { >@@ -1880,13 +1880,13 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, Ref<EventListene > if (DeviceMotionController* controller = DeviceMotionController::from(page())) > controller->addDeviceEventListener(this); > } else if (document()) >- document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Blocked attempt add device motion listener from child frame that wasn't the same security origin as the main page.")); >+ document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Blocked attempt add device motion listener from child frame that wasn't the same security origin as the main page."_s); > } else if (eventType == eventNames().deviceorientationEvent) { > if (isSameSecurityOriginAsMainFrame()) { > if (DeviceOrientationController* controller = DeviceOrientationController::from(page())) > controller->addDeviceEventListener(this); > } else if (document()) >- document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Blocked attempt add device orientation listener from child frame that wasn't the same security origin as the main page.")); >+ document()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Blocked attempt add device orientation listener from child frame that wasn't the same security origin as the main page."_s); > } > #endif // PLATFORM(IOS) > #endif // ENABLE(DEVICE_ORIENTATION) >@@ -2293,7 +2293,7 @@ RefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicStrin > if (created) { > ResourceRequest resourceRequest { completedURL, referrer, UseProtocolCachePolicy }; > FrameLoader::addSameSiteInfoToRequestIfNeeded(resourceRequest, openerFrame.document()); >- FrameLoadRequest frameLoadRequest { *activeWindow.document(), activeWindow.document()->securityOrigin(), resourceRequest, ASCIILiteral("_self"), LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, activeDocument->shouldOpenExternalURLsPolicyToPropagate(), initiatedByMainFrame }; >+ FrameLoadRequest frameLoadRequest { *activeWindow.document(), activeWindow.document()->securityOrigin(), resourceRequest, "_self"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, activeDocument->shouldOpenExternalURLsPolicyToPropagate(), initiatedByMainFrame }; > if (openerFrame.document() && !protocolHostAndPortAreEqual(openerFrame.document()->url(), frameLoadRequest.resourceRequest().url())) > frameLoadRequest.setIsCrossOriginWindowOpenNavigation(true); > newFrame->loader().changeLocation(WTFMove(frameLoadRequest)); >diff --git a/Source/WebCore/page/DebugPageOverlays.cpp b/Source/WebCore/page/DebugPageOverlays.cpp >index a979f657622d1b5501a96b561cbef491cf4456b8..595aa41854b849c3da82ae23134d10b9165b9234 100644 >--- a/Source/WebCore/page/DebugPageOverlays.cpp >+++ b/Source/WebCore/page/DebugPageOverlays.cpp >@@ -144,21 +144,21 @@ static const HashMap<String, Color>& touchEventRegionColors() > { > static const auto regionColors = makeNeverDestroyed([] { > struct MapEntry { >- const char* name; >+ ASCIILiteral name; > int r; > int g; > int b; > }; > static const MapEntry entries[] = { >- { "touchstart", 191, 191, 63 }, >- { "touchmove", 63, 191, 191 }, >- { "touchend", 191, 63, 127 }, >- { "touchforcechange", 63, 63, 191 }, >- { "wheel", 255, 128, 0 }, >+ { "touchstart"_s, 191, 191, 63 }, >+ { "touchmove"_s, 63, 191, 191 }, >+ { "touchend"_s, 191, 63, 127 }, >+ { "touchforcechange"_s, 63, 63, 191 }, >+ { "wheel"_s, 255, 128, 0 }, > }; > HashMap<String, Color> map; > for (auto& entry : entries) >- map.add(ASCIILiteral { entry.name }, Color { entry.r, entry.g, entry.b, 80 }); >+ map.add(entry.name, Color { entry.r, entry.g, entry.b, 80 }); > return map; > }()); > return regionColors; >diff --git a/Source/WebCore/page/DiagnosticLoggingKeys.cpp b/Source/WebCore/page/DiagnosticLoggingKeys.cpp >index 0e793ff8f9a6799c44d06081b66431e08f73a199..1796fe85a05119af6bc7ed0d41cee4d27faa47d6 100644 >--- a/Source/WebCore/page/DiagnosticLoggingKeys.cpp >+++ b/Source/WebCore/page/DiagnosticLoggingKeys.cpp >@@ -30,833 +30,833 @@ namespace WebCore { > > String DiagnosticLoggingKeys::mediaLoadedKey() > { >- return ASCIILiteral("mediaLoaded"); >+ return "mediaLoaded"_s; > } > > String DiagnosticLoggingKeys::mediaLoadingFailedKey() > { >- return ASCIILiteral("mediaFailedLoading"); >+ return "mediaFailedLoading"_s; > } > > String DiagnosticLoggingKeys::memoryCacheEntryDecisionKey() > { >- return ASCIILiteral("memoryCacheEntryDecision"); >+ return "memoryCacheEntryDecision"_s; > } > > String DiagnosticLoggingKeys::memoryCacheUsageKey() > { >- return ASCIILiteral("memoryCacheUsage"); >+ return "memoryCacheUsage"_s; > } > > String DiagnosticLoggingKeys::missingValidatorFieldsKey() > { >- return ASCIILiteral("missingValidatorFields"); >+ return "missingValidatorFields"_s; > } > > String DiagnosticLoggingKeys::pluginLoadedKey() > { >- return ASCIILiteral("pluginLoaded"); >+ return "pluginLoaded"_s; > } > > String DiagnosticLoggingKeys::pluginLoadingFailedKey() > { >- return ASCIILiteral("pluginFailedLoading"); >+ return "pluginFailedLoading"_s; > } > > String DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey() > { >- return ASCIILiteral("postPageBackgroundingCPUUsage"); >+ return "postPageBackgroundingCPUUsage"_s; > } > > String DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey() > { >- return ASCIILiteral("postPageBackgroundingMemoryUsage"); >+ return "postPageBackgroundingMemoryUsage"_s; > } > > String DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey() > { >- return ASCIILiteral("pageHandlesWebGLContextLoss"); >+ return "pageHandlesWebGLContextLoss"_s; > } > > String DiagnosticLoggingKeys::postPageLoadCPUUsageKey() > { >- return ASCIILiteral("postPageLoadCPUUsage"); >+ return "postPageLoadCPUUsage"_s; > } > > String DiagnosticLoggingKeys::postPageLoadMemoryUsageKey() > { >- return ASCIILiteral("postPageLoadMemoryUsage"); >+ return "postPageLoadMemoryUsage"_s; > } > > String DiagnosticLoggingKeys::provisionalLoadKey() > { >- return ASCIILiteral("provisionalLoad"); >+ return "provisionalLoad"_s; > } > > String DiagnosticLoggingKeys::pageContainsPluginKey() > { >- return ASCIILiteral("pageContainsPlugin"); >+ return "pageContainsPlugin"_s; > } > > String DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey() > { >- return ASCIILiteral("pageContainsAtLeastOnePlugin"); >+ return "pageContainsAtLeastOnePlugin"_s; > } > > String DiagnosticLoggingKeys::pageContainsMediaEngineKey() > { >- return ASCIILiteral("pageContainsMediaEngine"); >+ return "pageContainsMediaEngine"_s; > } > > String DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey() > { >- return ASCIILiteral("pageContainsAtLeastOneMediaEngine"); >+ return "pageContainsAtLeastOneMediaEngine"_s; > } > > String DiagnosticLoggingKeys::pageLoadedKey() > { >- return ASCIILiteral("pageLoaded"); >+ return "pageLoaded"_s; > } > > String DiagnosticLoggingKeys::playedKey() > { >- return ASCIILiteral("played"); >+ return "played"_s; > } > > String DiagnosticLoggingKeys::engineFailedToLoadKey() > { >- return ASCIILiteral("engineFailedToLoad"); >+ return "engineFailedToLoad"_s; > } > > String DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey() > { >- return ASCIILiteral("entryRightlyNotWarmedUp"); >+ return "entryRightlyNotWarmedUp"_s; > } > > String DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey() > { >- return ASCIILiteral("entryWronglyNotWarmedUp"); >+ return "entryWronglyNotWarmedUp"_s; > } > > String DiagnosticLoggingKeys::navigationKey() > { >- return ASCIILiteral("navigation"); >+ return "navigation"_s; > } > > String DiagnosticLoggingKeys::needsRevalidationKey() > { >- return ASCIILiteral("needsRevalidation"); >+ return "needsRevalidation"_s; > } > > String DiagnosticLoggingKeys::networkCacheKey() > { >- return ASCIILiteral("networkCache"); >+ return "networkCache"_s; > } > > String DiagnosticLoggingKeys::networkCacheFailureReasonKey() > { >- return ASCIILiteral("networkCacheFailureReason"); >+ return "networkCacheFailureReason"_s; > } > > String DiagnosticLoggingKeys::networkCacheUnusedReasonKey() > { >- return ASCIILiteral("networkCacheUnusedReason"); >+ return "networkCacheUnusedReason"_s; > } > > String DiagnosticLoggingKeys::networkCacheReuseFailureKey() > { >- return ASCIILiteral("networkCacheReuseFailure"); >+ return "networkCacheReuseFailure"_s; > } > > String DiagnosticLoggingKeys::networkKey() > { >- return ASCIILiteral("network"); >+ return "network"_s; > } > > String DiagnosticLoggingKeys::networkProcessCrashedKey() > { >- return ASCIILiteral("networkProcessCrashed"); >+ return "networkProcessCrashed"_s; > } > > String DiagnosticLoggingKeys::neverSeenBeforeKey() > { >- return ASCIILiteral("neverSeenBefore"); >+ return "neverSeenBefore"_s; > } > > String DiagnosticLoggingKeys::noKey() > { >- return ASCIILiteral("no"); >+ return "no"_s; > } > > String DiagnosticLoggingKeys::noCacheKey() > { >- return ASCIILiteral("noCache"); >+ return "noCache"_s; > } > > String DiagnosticLoggingKeys::noStoreKey() > { >- return ASCIILiteral("noStore"); >+ return "noStore"_s; > } > > String DiagnosticLoggingKeys::nonVisibleStateKey() > { >- return ASCIILiteral("nonVisibleState"); >+ return "nonVisibleState"_s; > } > > String DiagnosticLoggingKeys::notInMemoryCacheKey() > { >- return ASCIILiteral("notInMemoryCache"); >+ return "notInMemoryCache"_s; > } > > String DiagnosticLoggingKeys::pageCacheKey() > { >- return ASCIILiteral("pageCache"); >+ return "pageCache"_s; > } > > String DiagnosticLoggingKeys::pageCacheFailureKey() > { >- return ASCIILiteral("pageCacheFailure"); >+ return "pageCacheFailure"_s; > } > > String DiagnosticLoggingKeys::noDocumentLoaderKey() > { >- return ASCIILiteral("noDocumentLoader"); >+ return "noDocumentLoader"_s; > } > > String DiagnosticLoggingKeys::noLongerInCacheKey() > { >- return ASCIILiteral("noLongerInCache"); >+ return "noLongerInCache"_s; > } > > String DiagnosticLoggingKeys::otherKey() > { >- return ASCIILiteral("other"); >+ return "other"_s; > } > > String DiagnosticLoggingKeys::mainDocumentErrorKey() > { >- return ASCIILiteral("mainDocumentError"); >+ return "mainDocumentError"_s; > } > > String DiagnosticLoggingKeys::mainResourceKey() > { >- return ASCIILiteral("mainResource"); >+ return "mainResource"_s; > } > > String DiagnosticLoggingKeys::isErrorPageKey() > { >- return ASCIILiteral("isErrorPage"); >+ return "isErrorPage"_s; > } > > String DiagnosticLoggingKeys::isExpiredKey() > { >- return ASCIILiteral("isExpired"); >+ return "isExpired"_s; > } > > String DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey() > { >- return ASCIILiteral("isReloadIgnoringCacheData"); >+ return "isReloadIgnoringCacheData"_s; > } > > String DiagnosticLoggingKeys::loadingKey() > { >- return ASCIILiteral("loading"); >+ return "loading"_s; > } > > String DiagnosticLoggingKeys::hasPluginsKey() > { >- return ASCIILiteral("hasPlugins"); >+ return "hasPlugins"_s; > } > > String DiagnosticLoggingKeys::httpsNoStoreKey() > { >- return ASCIILiteral("httpsNoStore"); >+ return "httpsNoStore"_s; > } > > String DiagnosticLoggingKeys::imageKey() > { >- return ASCIILiteral("image"); >+ return "image"_s; > } > > String DiagnosticLoggingKeys::inMemoryCacheKey() > { >- return ASCIILiteral("inMemoryCache"); >+ return "inMemoryCache"_s; > } > > String DiagnosticLoggingKeys::inactiveKey() > { >- return ASCIILiteral("inactive"); >+ return "inactive"_s; > } > > String DiagnosticLoggingKeys::internalErrorKey() > { >- return ASCIILiteral("internalError"); >+ return "internalError"_s; > } > > String DiagnosticLoggingKeys::invalidSessionIDKey() > { >- return ASCIILiteral("invalidSessionID"); >+ return "invalidSessionID"_s; > } > > String DiagnosticLoggingKeys::isAttachmentKey() > { >- return ASCIILiteral("isAttachment"); >+ return "isAttachment"_s; > } > > String DiagnosticLoggingKeys::isConditionalRequestKey() > { >- return ASCIILiteral("isConditionalRequest"); >+ return "isConditionalRequest"_s; > } > > String DiagnosticLoggingKeys::isDisabledKey() > { >- return ASCIILiteral("isDisabled"); >+ return "isDisabled"_s; > } > > String DiagnosticLoggingKeys::noCurrentHistoryItemKey() > { >- return ASCIILiteral("noCurrentHistoryItem"); >+ return "noCurrentHistoryItem"_s; > } > > String DiagnosticLoggingKeys::quirkRedirectComingKey() > { >- return ASCIILiteral("quirkRedirectComing"); >+ return "quirkRedirectComing"_s; > } > > String DiagnosticLoggingKeys::rawKey() > { >- return ASCIILiteral("raw"); >+ return "raw"_s; > } > > String DiagnosticLoggingKeys::redirectKey() > { >- return ASCIILiteral("redirect"); >+ return "redirect"_s; > } > > String DiagnosticLoggingKeys::isLoadingKey() > { >- return ASCIILiteral("isLoading"); >+ return "isLoading"_s; > } > > String DiagnosticLoggingKeys::documentLoaderStoppingKey() > { >- return ASCIILiteral("documentLoaderStopping"); >+ return "documentLoaderStopping"_s; > } > > String DiagnosticLoggingKeys::domainCausingCrashKey() > { >- return ASCIILiteral("DomainCausingCrash"); >+ return "DomainCausingCrash"_s; > } > > String DiagnosticLoggingKeys::domainCausingEnergyDrainKey() > { >- return ASCIILiteral("DomainCausingEnergyDrain"); >+ return "DomainCausingEnergyDrain"_s; > } > > String DiagnosticLoggingKeys::domainCausingJetsamKey() > { >- return ASCIILiteral("DomainCausingJetsam"); >+ return "DomainCausingJetsam"_s; > } > > String DiagnosticLoggingKeys::simulatedPageCrashKey() > { >- return ASCIILiteral("SimulatedPageCrash"); >+ return "SimulatedPageCrash"_s; > } > > String DiagnosticLoggingKeys::exceededActiveMemoryLimitKey() > { >- return ASCIILiteral("ExceededActiveMemoryLimit"); >+ return "ExceededActiveMemoryLimit"_s; > } > > String DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey() > { >- return ASCIILiteral("ExceededInactiveMemoryLimit"); >+ return "ExceededInactiveMemoryLimit"_s; > } > > String DiagnosticLoggingKeys::exceededBackgroundCPULimitKey() > { >- return ASCIILiteral("ExceededBackgroundCPULimit"); >+ return "ExceededBackgroundCPULimit"_s; > } > > String DiagnosticLoggingKeys::domainVisitedKey() > { >- return ASCIILiteral("DomainVisited"); >+ return "DomainVisited"_s; > } > > String DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey() > { >- return ASCIILiteral("cannotSuspendActiveDOMObjects"); >+ return "cannotSuspendActiveDOMObjects"_s; > } > > String DiagnosticLoggingKeys::cpuUsageKey() > { >- return ASCIILiteral("cpuUsage"); >+ return "cpuUsage"_s; > } > > String DiagnosticLoggingKeys::createSharedBufferFailedKey() > { >- return ASCIILiteral("createSharedBufferFailed"); >+ return "createSharedBufferFailed"_s; > } > > String DiagnosticLoggingKeys::activeInForegroundTabKey() > { >- return ASCIILiteral("activeInForegroundTab"); >+ return "activeInForegroundTab"_s; > } > > String DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey() > { >- return ASCIILiteral("activeInBackgroundTabOnly"); >+ return "activeInBackgroundTabOnly"_s; > } > > String DiagnosticLoggingKeys::applicationCacheKey() > { >- return ASCIILiteral("applicationCache"); >+ return "applicationCache"_s; > } > > #if ENABLE(APPLICATION_MANIFEST) > String DiagnosticLoggingKeys::applicationManifestKey() > { >- return ASCIILiteral("applicationManifest"); >+ return "applicationManifest"_s; > } > #endif > > String DiagnosticLoggingKeys::audioKey() > { >- return ASCIILiteral("audio"); >+ return "audio"_s; > } > > String DiagnosticLoggingKeys::backNavigationDeltaKey() > { >- return ASCIILiteral("backNavigationDelta"); >+ return "backNavigationDelta"_s; > } > > String DiagnosticLoggingKeys::canCacheKey() > { >- return ASCIILiteral("canCache"); >+ return "canCache"_s; > } > > String DiagnosticLoggingKeys::cacheControlNoStoreKey() > { >- return ASCIILiteral("cacheControlNoStore"); >+ return "cacheControlNoStore"_s; > } > > String DiagnosticLoggingKeys::cachedResourceRevalidationKey() > { >- return ASCIILiteral("cachedResourceRevalidation"); >+ return "cachedResourceRevalidation"_s; > } > > String DiagnosticLoggingKeys::cachedResourceRevalidationReasonKey() > { >- return ASCIILiteral("cachedResourceRevalidationReason"); >+ return "cachedResourceRevalidationReason"_s; > } > > String DiagnosticLoggingKeys::deniedByClientKey() > { >- return ASCIILiteral("deniedByClient"); >+ return "deniedByClient"_s; > } > > String DiagnosticLoggingKeys::deviceMotionKey() > { >- return ASCIILiteral("deviceMotion"); >+ return "deviceMotion"_s; > } > > String DiagnosticLoggingKeys::deviceOrientationKey() > { >- return ASCIILiteral("deviceOrientation"); >+ return "deviceOrientation"_s; > } > > String DiagnosticLoggingKeys::diskCacheKey() > { >- return ASCIILiteral("diskCache"); >+ return "diskCache"_s; > } > > String DiagnosticLoggingKeys::diskCacheAfterValidationKey() > { >- return ASCIILiteral("diskCacheAfterValidation"); >+ return "diskCacheAfterValidation"_s; > } > > String DiagnosticLoggingKeys::reloadKey() > { >- return ASCIILiteral("reload"); >+ return "reload"_s; > } > > String DiagnosticLoggingKeys::replaceKey() > { >- return ASCIILiteral("replace"); >+ return "replace"_s; > } > > String DiagnosticLoggingKeys::retrievalRequestKey() > { >- return ASCIILiteral("retrievalRequest"); >+ return "retrievalRequest"_s; > } > > String DiagnosticLoggingKeys::resourceLoadedKey() > { >- return ASCIILiteral("resourceLoaded"); >+ return "resourceLoaded"_s; > } > > String DiagnosticLoggingKeys::resourceResponseSourceKey() > { >- return ASCIILiteral("resourceResponseSource"); >+ return "resourceResponseSource"_s; > } > > String DiagnosticLoggingKeys::retrievalKey() > { >- return ASCIILiteral("retrieval"); >+ return "retrieval"_s; > } > > String DiagnosticLoggingKeys::revalidatingKey() > { >- return ASCIILiteral("revalidating"); >+ return "revalidating"_s; > } > > String DiagnosticLoggingKeys::reloadFromOriginKey() > { >- return ASCIILiteral("reloadFromOrigin"); >+ return "reloadFromOrigin"_s; > } > > String DiagnosticLoggingKeys::reloadRevalidatingExpiredKey() > { >- return ASCIILiteral("reloadRevalidatingExpired"); >+ return "reloadRevalidatingExpired"_s; > } > > String DiagnosticLoggingKeys::sameLoadKey() > { >- return ASCIILiteral("sameLoad"); >+ return "sameLoad"_s; > } > > String DiagnosticLoggingKeys::scriptKey() > { >- return ASCIILiteral("script"); >+ return "script"_s; > } > > String DiagnosticLoggingKeys::serviceWorkerKey() > { >- return ASCIILiteral("serviceWorker"); >+ return "serviceWorker"_s; > } > > String DiagnosticLoggingKeys::streamingMedia() > { >- return ASCIILiteral("streamingMedia"); >+ return "streamingMedia"_s; > } > > String DiagnosticLoggingKeys::styleSheetKey() > { >- return ASCIILiteral("styleSheet"); >+ return "styleSheet"_s; > } > > String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey() > { >- return ASCIILiteral("successfulSpeculativeWarmupWithRevalidation"); >+ return "successfulSpeculativeWarmupWithRevalidation"_s; > } > > String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey() > { >- return ASCIILiteral("successfulSpeculativeWarmupWithoutRevalidation"); >+ return "successfulSpeculativeWarmupWithoutRevalidation"_s; > } > > String DiagnosticLoggingKeys::svgDocumentKey() > { >- return ASCIILiteral("svgDocument"); >+ return "svgDocument"_s; > } > > String DiagnosticLoggingKeys::synchronousMessageFailedKey() > { >- return ASCIILiteral("synchronousMessageFailed"); >+ return "synchronousMessageFailed"_s; > } > > String DiagnosticLoggingKeys::telemetryPageLoadKey() > { >- return ASCIILiteral("telemetryPageLoad"); >+ return "telemetryPageLoad"_s; > } > > String DiagnosticLoggingKeys::timedOutKey() > { >- return ASCIILiteral("timedOut"); >+ return "timedOut"_s; > } > > String DiagnosticLoggingKeys::canceledLessThan2SecondsKey() > { >- return ASCIILiteral("canceledLessThan2Seconds"); >+ return "canceledLessThan2Seconds"_s; > } > > String DiagnosticLoggingKeys::canceledLessThan5SecondsKey() > { >- return ASCIILiteral("canceledLessThan5Seconds"); >+ return "canceledLessThan5Seconds"_s; > } > > String DiagnosticLoggingKeys::canceledLessThan20SecondsKey() > { >- return ASCIILiteral("canceledLessThan20Seconds"); >+ return "canceledLessThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::canceledMoreThan20SecondsKey() > { >- return ASCIILiteral("canceledMoreThan20Seconds"); >+ return "canceledMoreThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::failedLessThan2SecondsKey() > { >- return ASCIILiteral("failedLessThan2Seconds"); >+ return "failedLessThan2Seconds"_s; > } > > String DiagnosticLoggingKeys::failedLessThan5SecondsKey() > { >- return ASCIILiteral("failedLessThan5Seconds"); >+ return "failedLessThan5Seconds"_s; > } > > String DiagnosticLoggingKeys::failedLessThan20SecondsKey() > { >- return ASCIILiteral("failedLessThan20Seconds"); >+ return "failedLessThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::failedMoreThan20SecondsKey() > { >- return ASCIILiteral("failedMoreThan20Seconds"); >+ return "failedMoreThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::occurredKey() > { >- return ASCIILiteral("occurred"); >+ return "occurred"_s; > } > > String DiagnosticLoggingKeys::succeededLessThan2SecondsKey() > { >- return ASCIILiteral("succeededLessThan2Seconds"); >+ return "succeededLessThan2Seconds"_s; > } > > String DiagnosticLoggingKeys::succeededLessThan5SecondsKey() > { >- return ASCIILiteral("succeededLessThan5Seconds"); >+ return "succeededLessThan5Seconds"_s; > } > > String DiagnosticLoggingKeys::succeededLessThan20SecondsKey() > { >- return ASCIILiteral("succeededLessThan20Seconds"); >+ return "succeededLessThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::succeededMoreThan20SecondsKey() > { >- return ASCIILiteral("succeededMoreThan20Seconds"); >+ return "succeededMoreThan20Seconds"_s; > } > > String DiagnosticLoggingKeys::uncacheableStatusCodeKey() > { >- return ASCIILiteral("uncacheableStatusCode"); >+ return "uncacheableStatusCode"_s; > } > > String DiagnosticLoggingKeys::underMemoryPressureKey() > { >- return ASCIILiteral("underMemoryPressure"); >+ return "underMemoryPressure"_s; > } > > String DiagnosticLoggingKeys::unknownEntryRequestKey() > { >- return ASCIILiteral("unknownEntryRequest"); >+ return "unknownEntryRequest"_s; > } > > String DiagnosticLoggingKeys::unlikelyToReuseKey() > { >- return ASCIILiteral("unlikelyToReuse"); >+ return "unlikelyToReuse"_s; > } > > String DiagnosticLoggingKeys::unsupportedHTTPMethodKey() > { >- return ASCIILiteral("unsupportedHTTPMethod"); >+ return "unsupportedHTTPMethod"_s; > } > > String DiagnosticLoggingKeys::unsuspendableDOMObjectKey() > { >- return ASCIILiteral("unsuspendableDOMObject"); >+ return "unsuspendableDOMObject"_s; > } > > String DiagnosticLoggingKeys::unusedKey() > { >- return ASCIILiteral("unused"); >+ return "unused"_s; > } > > String DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey() > { >- return ASCIILiteral("unused.reason.credentialSettings"); >+ return "unused.reason.credentialSettings"_s; > } > > String DiagnosticLoggingKeys::unusedReasonErrorKey() > { >- return ASCIILiteral("unused.reason.error"); >+ return "unused.reason.error"_s; > } > > String DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey() > { >- return ASCIILiteral("unused.reason.mustRevalidateNoValidator"); >+ return "unused.reason.mustRevalidateNoValidator"_s; > } > > String DiagnosticLoggingKeys::unusedReasonNoStoreKey() > { >- return ASCIILiteral("unused.reason.noStore"); >+ return "unused.reason.noStore"_s; > } > > String DiagnosticLoggingKeys::unusedReasonRedirectChainKey() > { >- return ASCIILiteral("unused.reason.redirectChain"); >+ return "unused.reason.redirectChain"_s; > } > > String DiagnosticLoggingKeys::unusedReasonReloadKey() > { >- return ASCIILiteral("unused.reason.reload"); >+ return "unused.reason.reload"_s; > } > > String DiagnosticLoggingKeys::unusedReasonTypeMismatchKey() > { >- return ASCIILiteral("unused.reason.typeMismatch"); >+ return "unused.reason.typeMismatch"_s; > } > > String DiagnosticLoggingKeys::usedKey() > { >- return ASCIILiteral("used"); >+ return "used"_s; > } > > String DiagnosticLoggingKeys::userZoomActionKey() > { >- return ASCIILiteral("userZoomAction"); >+ return "userZoomAction"_s; > } > > String DiagnosticLoggingKeys::varyingHeaderMismatchKey() > { >- return ASCIILiteral("varyingHeaderMismatch"); >+ return "varyingHeaderMismatch"_s; > } > > String DiagnosticLoggingKeys::videoKey() > { >- return ASCIILiteral("video"); >+ return "video"_s; > } > > String DiagnosticLoggingKeys::visibleNonActiveStateKey() > { >- return ASCIILiteral("visibleNonActiveState"); >+ return "visibleNonActiveState"_s; > } > > String DiagnosticLoggingKeys::visibleAndActiveStateKey() > { >- return ASCIILiteral("visibleAndActiveState"); >+ return "visibleAndActiveState"_s; > } > > String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey() > { >- return ASCIILiteral("wastedSpeculativeWarmupWithRevalidation"); >+ return "wastedSpeculativeWarmupWithRevalidation"_s; > } > > String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey() > { >- return ASCIILiteral("wastedSpeculativeWarmupWithoutRevalidation"); >+ return "wastedSpeculativeWarmupWithoutRevalidation"_s; > } > > String DiagnosticLoggingKeys::webViewKey() > { >- return ASCIILiteral("webView"); >+ return "webView"_s; > } > > String DiagnosticLoggingKeys::yesKey() > { >- return ASCIILiteral("yes"); >+ return "yes"_s; > } > > String DiagnosticLoggingKeys::expiredKey() > { >- return ASCIILiteral("expired"); >+ return "expired"_s; > } > > String DiagnosticLoggingKeys::fontKey() > { >- return ASCIILiteral("font"); >+ return "font"_s; > } > > String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey() > { >- return ASCIILiteral("pruned.memoryPressure"); >+ return "pruned.memoryPressure"_s; > } > > String DiagnosticLoggingKeys::prunedDueToMaxSizeReached() > { >- return ASCIILiteral("pruned.capacityReached"); >+ return "pruned.capacityReached"_s; > } > > String DiagnosticLoggingKeys::prunedDueToProcessSuspended() > { >- return ASCIILiteral("pruned.processSuspended"); >+ return "pruned.processSuspended"_s; > } > > String WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey() > { >- return ASCIILiteral("notHTTPFamily"); >+ return "notHTTPFamily"_s; > } > > String WebCore::DiagnosticLoggingKeys::webGLStateKey() > { >- return ASCIILiteral("webGLState"); >+ return "webGLState"_s; > } > > String DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(uint64_t memoryUsage) > { > if (memoryUsage < 32 * MB) >- return ASCIILiteral("below32"); >+ return "below32"_s; > if (memoryUsage < 64 * MB) >- return ASCIILiteral("32to64"); >+ return "32to64"_s; > if (memoryUsage < 128 * MB) >- return ASCIILiteral("64to128"); >+ return "64to128"_s; > if (memoryUsage < 256 * MB) >- return ASCIILiteral("128to256"); >+ return "128to256"_s; > if (memoryUsage < 512 * MB) >- return ASCIILiteral("256to512"); >+ return "256to512"_s; > if (memoryUsage < 1024 * MB) >- return ASCIILiteral("512to1024"); >+ return "512to1024"_s; > if (memoryUsage < 2048 * MB) >- return ASCIILiteral("1024to2048"); >+ return "1024to2048"_s; > if (memoryUsage < 4096llu * MB) >- return ASCIILiteral("2048to4096"); >+ return "2048to4096"_s; > if (memoryUsage < 8192llu * MB) >- return ASCIILiteral("4096to8192"); >+ return "4096to8192"_s; > if (memoryUsage < 16384llu * MB) >- return ASCIILiteral("8192to16384"); >+ return "8192to16384"_s; > if (memoryUsage < 32768llu * MB) >- return ASCIILiteral("16384to32768"); >- return ASCIILiteral("over32768"); >+ return "16384to32768"_s; >+ return "over32768"_s; > } > > String DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey(double cpuUsage) > { > if (cpuUsage < 10) >- return ASCIILiteral("below10"); >+ return "below10"_s; > if (cpuUsage < 20) >- return ASCIILiteral("10to20"); >+ return "10to20"_s; > if (cpuUsage < 40) >- return ASCIILiteral("20to40"); >+ return "20to40"_s; > if (cpuUsage < 60) >- return ASCIILiteral("40to60"); >+ return "40to60"_s; > if (cpuUsage < 80) >- return ASCIILiteral("60to80"); >- return ASCIILiteral("over80"); >+ return "60to80"_s; >+ return "over80"_s; > } > > String DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey(double cpuUsage) > { > if (cpuUsage < 1) >- return ASCIILiteral("below1"); >+ return "below1"_s; > if (cpuUsage < 5) >- return ASCIILiteral("1to5"); >+ return "1to5"_s; > if (cpuUsage < 10) >- return ASCIILiteral("5to10"); >+ return "5to10"_s; > if (cpuUsage < 30) >- return ASCIILiteral("10to30"); >+ return "10to30"_s; > if (cpuUsage < 50) >- return ASCIILiteral("30to50"); >+ return "30to50"_s; > if (cpuUsage < 70) >- return ASCIILiteral("50to70"); >- return ASCIILiteral("over70"); >+ return "50to70"_s; >+ return "over70"_s; > } > > String DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey() > { >- return ASCIILiteral("resourceLoadStatisticsTelemetry"); >+ return "resourceLoadStatisticsTelemetry"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/page/DisabledAdaptations.cpp b/Source/WebCore/page/DisabledAdaptations.cpp >index a65b0092005dea5f1578328a1853ee39200ef33b..dba35dad0cc9e5a2f988684fe886b7369e5156b5 100644 >--- a/Source/WebCore/page/DisabledAdaptations.cpp >+++ b/Source/WebCore/page/DisabledAdaptations.cpp >@@ -32,7 +32,7 @@ namespace WebCore { > > String watchAdaptationName() > { >- return ASCIILiteral("watch"); >+ return "watch"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index 9b034d00ae7385721e877daa7303fd96bd80073c..c16cf2cff2769a49ef2d589bd15c048c063ca7f2 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -2180,7 +2180,7 @@ bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& platform > Frame& focusFrame = m_frame.page()->focusController().focusedOrMainFrame(); > // Do not paste here if the focus was moved somewhere else. > if (&m_frame == &focusFrame && m_frame.editor().client()->supportsGlobalSelection()) >- return m_frame.editor().command(ASCIILiteral("PasteGlobalSelection")).execute(); >+ return m_frame.editor().command("PasteGlobalSelection"_s).execute(); > > return false; > } >@@ -2234,13 +2234,13 @@ static String convertDragOperationToDropZoneOperation(DragOperation operation) > { > switch (operation) { > case DragOperationCopy: >- return ASCIILiteral("copy"); >+ return "copy"_s; > case DragOperationMove: >- return ASCIILiteral("move"); >+ return "move"_s; > case DragOperationLink: >- return ASCIILiteral("link"); >+ return "link"_s; > default: >- return ASCIILiteral("copy"); >+ return "copy"_s; > } > } > >diff --git a/Source/WebCore/page/EventSource.cpp b/Source/WebCore/page/EventSource.cpp >index a6d71299ebe07071b09d49f0d33e6569f8cb445c..0d9cc14ac93d7432ec5c0f4a3375a6d31c274f78 100644 >--- a/Source/WebCore/page/EventSource.cpp >+++ b/Source/WebCore/page/EventSource.cpp >@@ -53,7 +53,7 @@ inline EventSource::EventSource(ScriptExecutionContext& context, const URL& url, > : ActiveDOMObject(&context) > , m_url(url) > , m_withCredentials(eventSourceInit.withCredentials) >- , m_decoder(TextResourceDecoder::create(ASCIILiteral("text/plain"), "UTF-8")) >+ , m_decoder(TextResourceDecoder::create("text/plain"_s, "UTF-8")) > , m_connectTimer(*this, &EventSource::connect) > { > } >diff --git a/Source/WebCore/page/History.cpp b/Source/WebCore/page/History.cpp >index 12598743ab00b5b6da385e223ef38ef3c8ed19e9..8e1bb14a4631ff7f3befc34b07c50de4902b9189 100644 >--- a/Source/WebCore/page/History.cpp >+++ b/Source/WebCore/page/History.cpp >@@ -240,8 +240,8 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data > > if (newTotalUsage > totalStateObjectPayloadLimit) { > if (stateObjectType == StateObjectType::Replace) >- return Exception { QuotaExceededError, ASCIILiteral("Attempt to store more data than allowed using history.replaceState()") }; >- return Exception { QuotaExceededError, ASCIILiteral("Attempt to store more data than allowed using history.pushState()") }; >+ return Exception { QuotaExceededError, "Attempt to store more data than allowed using history.replaceState()"_s }; >+ return Exception { QuotaExceededError, "Attempt to store more data than allowed using history.pushState()"_s }; > } > > m_mostRecentStateObjectUsage = payloadSize.unsafeGet(); >diff --git a/Source/WebCore/page/NavigatorBase.cpp b/Source/WebCore/page/NavigatorBase.cpp >index 452df009e6240a81b79c09381807c5d8a23bddca..40e2ebd3daf1a9368be8034c25d7e3cba31c60fa 100644 >--- a/Source/WebCore/page/NavigatorBase.cpp >+++ b/Source/WebCore/page/NavigatorBase.cpp >@@ -47,26 +47,26 @@ > #if PLATFORM(IOS) > #define WEBCORE_NAVIGATOR_PLATFORM deviceName() > #elif OS(MAC_OS_X) && (CPU(PPC) || CPU(PPC64)) >-#define WEBCORE_NAVIGATOR_PLATFORM ASCIILiteral("MacPPC") >+#define WEBCORE_NAVIGATOR_PLATFORM "MacPPC"_s > #elif OS(MAC_OS_X) && (CPU(X86) || CPU(X86_64)) >-#define WEBCORE_NAVIGATOR_PLATFORM ASCIILiteral("MacIntel") >+#define WEBCORE_NAVIGATOR_PLATFORM "MacIntel"_s > #elif OS(WINDOWS) >-#define WEBCORE_NAVIGATOR_PLATFORM ASCIILiteral("Win32") >+#define WEBCORE_NAVIGATOR_PLATFORM "Win32"_s > #else > #define WEBCORE_NAVIGATOR_PLATFORM emptyString() > #endif > #endif // ifndef WEBCORE_NAVIGATOR_PLATFORM > > #ifndef WEBCORE_NAVIGATOR_PRODUCT >-#define WEBCORE_NAVIGATOR_PRODUCT ASCIILiteral("Gecko") >+#define WEBCORE_NAVIGATOR_PRODUCT "Gecko"_s > #endif // ifndef WEBCORE_NAVIGATOR_PRODUCT > > #ifndef WEBCORE_NAVIGATOR_PRODUCT_SUB >-#define WEBCORE_NAVIGATOR_PRODUCT_SUB ASCIILiteral("20030107") >+#define WEBCORE_NAVIGATOR_PRODUCT_SUB "20030107"_s > #endif // ifndef WEBCORE_NAVIGATOR_PRODUCT_SUB > > #ifndef WEBCORE_NAVIGATOR_VENDOR >-#define WEBCORE_NAVIGATOR_VENDOR ASCIILiteral("Apple Computer, Inc.") >+#define WEBCORE_NAVIGATOR_VENDOR "Apple Computer, Inc."_s > #endif // ifndef WEBCORE_NAVIGATOR_VENDOR > > #ifndef WEBCORE_NAVIGATOR_VENDOR_SUB >@@ -89,7 +89,7 @@ NavigatorBase::~NavigatorBase() = default; > > String NavigatorBase::appName() > { >- return ASCIILiteral("Netscape"); >+ return "Netscape"_s; > } > > String NavigatorBase::appVersion() const >@@ -114,7 +114,7 @@ String NavigatorBase::platform() > > String NavigatorBase::appCodeName() > { >- return ASCIILiteral("Mozilla"); >+ return "Mozilla"_s; > } > > String NavigatorBase::product() >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index 20a610a5b52f7f5b4fa39413c9a74f04495f11d6..851ebb8ae47709bda2ac8a60738ed11d11a9dd73 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2073,28 +2073,28 @@ void Page::logNavigation(const Navigation& navigation) > String navigationDescription; > switch (navigation.type) { > case FrameLoadType::Standard: >- navigationDescription = ASCIILiteral("standard"); >+ navigationDescription = "standard"_s; > break; > case FrameLoadType::Back: >- navigationDescription = ASCIILiteral("back"); >+ navigationDescription = "back"_s; > break; > case FrameLoadType::Forward: >- navigationDescription = ASCIILiteral("forward"); >+ navigationDescription = "forward"_s; > break; > case FrameLoadType::IndexedBackForward: >- navigationDescription = ASCIILiteral("indexedBackForward"); >+ navigationDescription = "indexedBackForward"_s; > break; > case FrameLoadType::Reload: >- navigationDescription = ASCIILiteral("reload"); >+ navigationDescription = "reload"_s; > break; > case FrameLoadType::Same: >- navigationDescription = ASCIILiteral("same"); >+ navigationDescription = "same"_s; > break; > case FrameLoadType::ReloadFromOrigin: >- navigationDescription = ASCIILiteral("reloadFromOrigin"); >+ navigationDescription = "reloadFromOrigin"_s; > break; > case FrameLoadType::ReloadExpiredOnly: >- navigationDescription = ASCIILiteral("reloadRevalidatingExpired"); >+ navigationDescription = "reloadRevalidatingExpired"_s; > break; > case FrameLoadType::Replace: > case FrameLoadType::RedirectWithLockedBackForwardList: >diff --git a/Source/WebCore/page/PageDebuggable.cpp b/Source/WebCore/page/PageDebuggable.cpp >index ad80892d9e0768438ad550d10c6192f2632af055..b3180c704bd86a618778289b0ffafe10c71cce72 100644 >--- a/Source/WebCore/page/PageDebuggable.cpp >+++ b/Source/WebCore/page/PageDebuggable.cpp >@@ -61,7 +61,7 @@ String PageDebuggable::url() const > return String(); > > String url = m_page.mainFrame().document()->url().string(); >- return url.isEmpty() ? ASCIILiteral("about:blank") : url; >+ return url.isEmpty() ? "about:blank"_s : url; > } > > bool PageDebuggable::hasLocalDebugger() const >diff --git a/Source/WebCore/page/PageSerializer.cpp b/Source/WebCore/page/PageSerializer.cpp >index 5f64224c93a5c1ce7fe66e7aa77670931fe8bf69..1d5f8ee1dc8f6da0505021045d47016997907fd8 100644 >--- a/Source/WebCore/page/PageSerializer.cpp >+++ b/Source/WebCore/page/PageSerializer.cpp >@@ -263,7 +263,7 @@ void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const URL > // FIXME: We should check whether a charset has been specified and if none was found add one. > TextEncoding textEncoding(styleSheet->contents().charset()); > ASSERT(textEncoding.isValid()); >- m_resources.append({ url, ASCIILiteral { "text/css" }, SharedBuffer::create(textEncoding.encode(cssText.toString(), UnencodableHandling::Entities)) }); >+ m_resources.append({ url, "text/css"_s, SharedBuffer::create(textEncoding.encode(cssText.toString(), UnencodableHandling::Entities)) }); > m_resourceURLs.add(url); > } > } >diff --git a/Source/WebCore/page/PerformanceMark.h b/Source/WebCore/page/PerformanceMark.h >index 6efdf3071a0ed521a73db8cf75b45c3564bc87de..42d43f5f4bb2fe4dc256d2c77d7963a6d1526bfe 100644 >--- a/Source/WebCore/page/PerformanceMark.h >+++ b/Source/WebCore/page/PerformanceMark.h >@@ -36,7 +36,7 @@ class PerformanceMark final : public PerformanceEntry { > > private: > PerformanceMark(const String& name, double startTime) >- : PerformanceEntry(PerformanceEntry::Type::Mark, name, ASCIILiteral("mark"), startTime, startTime) >+ : PerformanceEntry(PerformanceEntry::Type::Mark, name, "mark"_s, startTime, startTime) > { > } > >diff --git a/Source/WebCore/page/PerformanceMeasure.h b/Source/WebCore/page/PerformanceMeasure.h >index 088c1c1db8bb4c861917388047a5f49b9df607b9..bee3d55daa8ac9fe597c2797839ec41f4827782d 100644 >--- a/Source/WebCore/page/PerformanceMeasure.h >+++ b/Source/WebCore/page/PerformanceMeasure.h >@@ -36,7 +36,7 @@ class PerformanceMeasure final : public PerformanceEntry { > > private: > PerformanceMeasure(const String& name, double startTime, double duration) >- : PerformanceEntry(PerformanceEntry::Type::Measure, name, ASCIILiteral("measure"), startTime, duration) >+ : PerformanceEntry(PerformanceEntry::Type::Measure, name, "measure"_s, startTime, duration) > { > } > >diff --git a/Source/WebCore/page/PerformanceObserver.cpp b/Source/WebCore/page/PerformanceObserver.cpp >index a7037ca5f653abcb57f670a8c12480742e345312..bc2f45d714f8de86b921406910ed7256b1d0eee6 100644 >--- a/Source/WebCore/page/PerformanceObserver.cpp >+++ b/Source/WebCore/page/PerformanceObserver.cpp >@@ -60,7 +60,7 @@ ExceptionOr<void> PerformanceObserver::observe(Init&& init) > return Exception { TypeError }; > > if (init.entryTypes.isEmpty()) >- return Exception { TypeError, ASCIILiteral("entryTypes cannot be an empty list") }; >+ return Exception { TypeError, "entryTypes cannot be an empty list"_s }; > > OptionSet<PerformanceEntry::Type> filter; > for (const String& entryType : init.entryTypes) { >@@ -69,7 +69,7 @@ ExceptionOr<void> PerformanceObserver::observe(Init&& init) > } > > if (filter.isEmpty()) >- return Exception { TypeError, ASCIILiteral("entryTypes contained only unsupported types") }; >+ return Exception { TypeError, "entryTypes contained only unsupported types"_s }; > > m_typeFilter = filter; > >diff --git a/Source/WebCore/page/PerformanceResourceTiming.cpp b/Source/WebCore/page/PerformanceResourceTiming.cpp >index c63c25bf9c41d6f4b5464d6bac0c2cd0b7a7ad62..f8f5839cbd8aed216b3278870dd30ef907e5f516 100644 >--- a/Source/WebCore/page/PerformanceResourceTiming.cpp >+++ b/Source/WebCore/page/PerformanceResourceTiming.cpp >@@ -73,7 +73,7 @@ Ref<PerformanceResourceTiming> PerformanceResourceTiming::create(MonotonicTime t > } > > PerformanceResourceTiming::PerformanceResourceTiming(MonotonicTime timeOrigin, ResourceTiming&& resourceTiming) >- : PerformanceEntry(PerformanceEntry::Type::Resource, resourceTiming.url().string(), ASCIILiteral("resource"), entryStartTime(timeOrigin, resourceTiming), entryEndTime(timeOrigin, resourceTiming)) >+ : PerformanceEntry(PerformanceEntry::Type::Resource, resourceTiming.url().string(), "resource"_s, entryStartTime(timeOrigin, resourceTiming), entryEndTime(timeOrigin, resourceTiming)) > , m_initiatorType(resourceTiming.initiator()) > , m_timeOrigin(timeOrigin) > , m_loadTiming(resourceTiming.loadTiming()) >diff --git a/Source/WebCore/page/PerformanceUserTiming.cpp b/Source/WebCore/page/PerformanceUserTiming.cpp >index 37804d7e1963305f2a63512b4f4d3988e12b6f79..fe15d160e903884851b50ee4b4d9a84348e75428 100644 >--- a/Source/WebCore/page/PerformanceUserTiming.cpp >+++ b/Source/WebCore/page/PerformanceUserTiming.cpp >@@ -40,32 +40,32 @@ static NavigationTimingFunction restrictedMarkFunction(const String& markName) > ASSERT(isMainThread()); > > static const auto map = makeNeverDestroyed([] { >- static const std::pair<const char*, NavigationTimingFunction> pairs[] = { >- { "connectEnd", &PerformanceTiming::connectEnd }, >- { "connectStart", &PerformanceTiming::connectStart }, >- { "domComplete", &PerformanceTiming::domComplete }, >- { "domContentLoadedEventEnd", &PerformanceTiming::domContentLoadedEventEnd }, >- { "domContentLoadedEventStart", &PerformanceTiming::domContentLoadedEventStart }, >- { "domInteractive", &PerformanceTiming::domInteractive }, >- { "domLoading", &PerformanceTiming::domLoading }, >- { "domainLookupEnd", &PerformanceTiming::domainLookupEnd }, >- { "domainLookupStart", &PerformanceTiming::domainLookupStart }, >- { "fetchStart", &PerformanceTiming::fetchStart }, >- { "loadEventEnd", &PerformanceTiming::loadEventEnd }, >- { "loadEventStart", &PerformanceTiming::loadEventStart }, >- { "navigationStart", &PerformanceTiming::navigationStart }, >- { "redirectEnd", &PerformanceTiming::redirectEnd }, >- { "redirectStart", &PerformanceTiming::redirectStart }, >- { "requestStart", &PerformanceTiming::requestStart }, >- { "responseEnd", &PerformanceTiming::responseEnd }, >- { "responseStart", &PerformanceTiming::responseStart }, >- { "secureConnectionStart", &PerformanceTiming::secureConnectionStart }, >- { "unloadEventEnd", &PerformanceTiming::unloadEventEnd }, >- { "unloadEventStart", &PerformanceTiming::unloadEventStart }, >+ static const std::pair<ASCIILiteral, NavigationTimingFunction> pairs[] = { >+ { "connectEnd"_s, &PerformanceTiming::connectEnd }, >+ { "connectStart"_s, &PerformanceTiming::connectStart }, >+ { "domComplete"_s, &PerformanceTiming::domComplete }, >+ { "domContentLoadedEventEnd"_s, &PerformanceTiming::domContentLoadedEventEnd }, >+ { "domContentLoadedEventStart"_s, &PerformanceTiming::domContentLoadedEventStart }, >+ { "domInteractive"_s, &PerformanceTiming::domInteractive }, >+ { "domLoading"_s, &PerformanceTiming::domLoading }, >+ { "domainLookupEnd"_s, &PerformanceTiming::domainLookupEnd }, >+ { "domainLookupStart"_s, &PerformanceTiming::domainLookupStart }, >+ { "fetchStart"_s, &PerformanceTiming::fetchStart }, >+ { "loadEventEnd"_s, &PerformanceTiming::loadEventEnd }, >+ { "loadEventStart"_s, &PerformanceTiming::loadEventStart }, >+ { "navigationStart"_s, &PerformanceTiming::navigationStart }, >+ { "redirectEnd"_s, &PerformanceTiming::redirectEnd }, >+ { "redirectStart"_s, &PerformanceTiming::redirectStart }, >+ { "requestStart"_s, &PerformanceTiming::requestStart }, >+ { "responseEnd"_s, &PerformanceTiming::responseEnd }, >+ { "responseStart"_s, &PerformanceTiming::responseStart }, >+ { "secureConnectionStart"_s, &PerformanceTiming::secureConnectionStart }, >+ { "unloadEventEnd"_s, &PerformanceTiming::unloadEventEnd }, >+ { "unloadEventStart"_s, &PerformanceTiming::unloadEventStart }, > }; > HashMap<String, NavigationTimingFunction> map; > for (auto& pair : pairs) >- map.add(ASCIILiteral { pair.first }, pair.second); >+ map.add(pair.first, pair.second); > return map; > }()); > >diff --git a/Source/WebCore/page/PointerLockController.cpp b/Source/WebCore/page/PointerLockController.cpp >index 356b57e2e749ed20e82ca606d4c4fd2de770d54e..d70f0ddc025125703d2431ecf3e0007259ea4bfc 100644 >--- a/Source/WebCore/page/PointerLockController.cpp >+++ b/Source/WebCore/page/PointerLockController.cpp >@@ -59,7 +59,7 @@ void PointerLockController::requestPointerLock(Element* target) > > if (target->document().isSandboxed(SandboxPointerLock)) { > // FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists. >- target->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, ASCIILiteral("Blocked pointer lock on an element because the element's frame is sandboxed and the 'allow-pointer-lock' permission is not set.")); >+ target->document().addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Blocked pointer lock on an element because the element's frame is sandboxed and the 'allow-pointer-lock' permission is not set."_s); > enqueueEvent(eventNames().pointerlockerrorEvent, target); > return; > } >diff --git a/Source/WebCore/page/PrintContext.cpp b/Source/WebCore/page/PrintContext.cpp >index 8123588047383c00f0e9401712c30f00acbbe70f..c6b03517595fb6357285e9d7784eb84167be2938 100644 >--- a/Source/WebCore/page/PrintContext.cpp >+++ b/Source/WebCore/page/PrintContext.cpp >@@ -297,7 +297,7 @@ String PrintContext::pageProperty(Frame* frame, const char* propertyName, int pa > // Implement formatters for properties we care about. > if (!strcmp(propertyName, "margin-left")) { > if (style->marginLeft().isAuto()) >- return ASCIILiteral { "auto" }; >+ return "auto"_s; > return String::number(style->marginLeft().value()); > } > if (!strcmp(propertyName, "line-height")) >diff --git a/Source/WebCore/page/SecurityOrigin.cpp b/Source/WebCore/page/SecurityOrigin.cpp >index 810733017945b219f591be5fa63d8a2f5245f992..962a2e1b1b6981329403e401a86ff026ffc78d46 100644 >--- a/Source/WebCore/page/SecurityOrigin.cpp >+++ b/Source/WebCore/page/SecurityOrigin.cpp >@@ -459,9 +459,9 @@ void SecurityOrigin::setEnforcesFilePathSeparation() > String SecurityOrigin::toString() const > { > if (isUnique()) >- return ASCIILiteral("null"); >+ return "null"_s; > if (m_data.protocol == "file" && m_enforcesFilePathSeparation) >- return ASCIILiteral("null"); >+ return "null"_s; > return toRawString(); > } > >diff --git a/Source/WebCore/page/SecurityOriginData.cpp b/Source/WebCore/page/SecurityOriginData.cpp >index 12a99e1c32c571ff9d1c6aeaf76b2995627ef6f3..1a5790e28f7138c362c2d22f926e9662799aaedf 100644 >--- a/Source/WebCore/page/SecurityOriginData.cpp >+++ b/Source/WebCore/page/SecurityOriginData.cpp >@@ -41,7 +41,7 @@ namespace WebCore { > String SecurityOriginData::toString() const > { > if (protocol == "file") >- return ASCIILiteral("file://"); >+ return "file://"_s; > > if (!port) > return makeString(protocol, "://", host); >@@ -75,7 +75,7 @@ String SecurityOriginData::databaseIdentifier() const > // Now that we've fixed that bug, we still need to produce this string > // to avoid breaking existing persistent state. > if (equalIgnoringASCIICase(protocol, "file")) >- return ASCIILiteral("file__0"); >+ return "file__0"_s; > > StringBuilder stringBuilder; > stringBuilder.append(protocol); >diff --git a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >index f373cec25504d9489b250d5289aaf3d71efa6e2f..b50ac7975155c864ca0021c229609e77aea98311 100644 >--- a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >+++ b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >@@ -436,7 +436,7 @@ static String formatByteNumber(size_t number) > static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now) > { > if (std::isnan(timerFireDate)) >- return ASCIILiteral("[not scheduled]"); >+ return "[not scheduled]"_s; > return String::format("%g", (timerFireDate - now).seconds()); > } > >diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp >index 5bfeec67606b4175ea561df1aff372a4dfb33539..6d226ea6a3c9b76794f36eb5c0653c362dd0fce8 100644 >--- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp >+++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp >@@ -728,21 +728,21 @@ void ContentSecurityPolicy::reportViolation(const String& effectiveViolatedDirec > // harmless information. > > auto cspReport = JSON::Object::create(); >- cspReport->setString(ASCIILiteral("document-uri"), info.documentURI); >- cspReport->setString(ASCIILiteral("referrer"), m_referrer); >- cspReport->setString(ASCIILiteral("violated-directive"), violatedDirective); >- cspReport->setString(ASCIILiteral("effective-directive"), effectiveViolatedDirective); >- cspReport->setString(ASCIILiteral("original-policy"), violatedDirectiveList.header()); >- cspReport->setString(ASCIILiteral("blocked-uri"), blockedURI); >- cspReport->setInteger(ASCIILiteral("status-code"), httpStatusCode); >+ cspReport->setString("document-uri"_s, info.documentURI); >+ cspReport->setString("referrer"_s, m_referrer); >+ cspReport->setString("violated-directive"_s, violatedDirective); >+ cspReport->setString("effective-directive"_s, effectiveViolatedDirective); >+ cspReport->setString("original-policy"_s, violatedDirectiveList.header()); >+ cspReport->setString("blocked-uri"_s, blockedURI); >+ cspReport->setInteger("status-code"_s, httpStatusCode); > if (!info.sourceFile.isNull()) { >- cspReport->setString(ASCIILiteral("source-file"), info.sourceFile); >- cspReport->setInteger(ASCIILiteral("line-number"), info.lineNumber); >- cspReport->setInteger(ASCIILiteral("column-number"), info.columnNumber); >+ cspReport->setString("source-file"_s, info.sourceFile); >+ cspReport->setInteger("line-number"_s, info.lineNumber); >+ cspReport->setInteger("column-number"_s, info.columnNumber); > } > > auto reportObject = JSON::Object::create(); >- reportObject->setObject(ASCIILiteral("csp-report"), WTFMove(cspReport)); >+ reportObject->setObject("csp-report"_s, WTFMove(cspReport)); > > auto report = FormData::create(reportObject->toJSONString().utf8()); > >@@ -760,11 +760,11 @@ void ContentSecurityPolicy::reportUnsupportedDirective(const String& name) const > { > String message; > if (equalLettersIgnoringASCIICase(name, "allow")) >- message = ASCIILiteral("The 'allow' directive has been replaced with 'default-src'. Please use that directive instead, as 'allow' has no effect."); >+ message = "The 'allow' directive has been replaced with 'default-src'. Please use that directive instead, as 'allow' has no effect."_s; > else if (equalLettersIgnoringASCIICase(name, "options")) >- message = ASCIILiteral("The 'options' directive has been replaced with 'unsafe-inline' and 'unsafe-eval' source expressions for the 'script-src' and 'style-src' directives. Please use those directives instead, as 'options' has no effect."); >+ message = "The 'options' directive has been replaced with 'unsafe-inline' and 'unsafe-eval' source expressions for the 'script-src' and 'style-src' directives. Please use those directives instead, as 'options' has no effect."_s; > else if (equalLettersIgnoringASCIICase(name, "policy-uri")) >- message = ASCIILiteral("The 'policy-uri' directive has been removed from the specification. Please specify a complete policy via the Content-Security-Policy header."); >+ message = "The 'policy-uri' directive has been removed from the specification. Please specify a complete policy via the Content-Security-Policy header."_s; > else > message = makeString("Unrecognized Content-Security-Policy directive '", name, "'.\n"); // FIXME: Why does this include a newline? > >diff --git a/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp b/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp >index 4c52d988a9e3c38277f807c96d23d84787c48ba2..13d9ca2dedd4970e997ba26f89e2de051e3db655 100644 >--- a/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp >+++ b/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp >@@ -44,7 +44,7 @@ static ResourceUsageData gData; > static String cpuUsageString(float cpuUsage) > { > if (cpuUsage < 0) >- return ASCIILiteral("<unknown>"); >+ return "<unknown>"_s; > return String::format("%.1f%%", cpuUsage); > } > >@@ -62,7 +62,7 @@ static String formatByteNumber(size_t number) > static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now) > { > if (std::isnan(timerFireDate)) >- return ASCIILiteral("[not scheduled]"); >+ return "[not scheduled]"_s; > return String::format("%g", (timerFireDate - now).seconds()); > } > >diff --git a/Source/WebCore/platform/ContentType.cpp b/Source/WebCore/platform/ContentType.cpp >index ac75e6f9511f1f1b7de104981035065b4d5bbb26..7ca8be5dc809da6ef8b928c8a6fe8de96f2eb1d2 100644 >--- a/Source/WebCore/platform/ContentType.cpp >+++ b/Source/WebCore/platform/ContentType.cpp >@@ -44,13 +44,13 @@ ContentType::ContentType(const String& contentType) > > const String& ContentType::codecsParameter() > { >- static NeverDestroyed<String> codecs { ASCIILiteral("codecs") }; >+ static NeverDestroyed<String> codecs { "codecs"_s }; > return codecs; > } > > const String& ContentType::profilesParameter() > { >- static NeverDestroyed<String> profiles { ASCIILiteral("profiles") }; >+ static NeverDestroyed<String> profiles { "profiles"_s }; > return profiles; > } > >diff --git a/Source/WebCore/platform/Decimal.cpp b/Source/WebCore/platform/Decimal.cpp >index 3d525cf3e518e1abf8b2bdf0a6a0207f63246a0b..b1ac6592ef281a21cbb36c6e80a829dbcbaa3fbe 100644 >--- a/Source/WebCore/platform/Decimal.cpp >+++ b/Source/WebCore/platform/Decimal.cpp >@@ -949,10 +949,10 @@ String Decimal::toString() const > { > switch (m_data.formatClass()) { > case EncodedData::ClassInfinity: >- return sign() ? ASCIILiteral("-Infinity") : ASCIILiteral("Infinity"); >+ return sign() ? "-Infinity"_s : "Infinity"_s; > > case EncodedData::ClassNaN: >- return ASCIILiteral("NaN"); >+ return "NaN"_s; > > case EncodedData::ClassNormal: > case EncodedData::ClassZero: >diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp >index 017bd99097ee4a3bfdfa0a08ba821faaa6c16945..76c63b76184bf76eb0ab07fe103bb6889646001a 100644 >--- a/Source/WebCore/platform/MIMETypeRegistry.cpp >+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp >@@ -71,10 +71,10 @@ static void initializeSupportedImageMIMETypes() > > #if USE(CG) > // This represents the subset of allowed image UTIs for which CoreServices has a corresponding MIME type. Keep this in sync with allowedImageUTIs(). >- static const char* const allowedImageMIMETypes[] = { "image/tiff", "image/gif", "image/jpeg", "image/vnd.microsoft.icon", "image/jp2", "image/png", "image/bmp" }; >+ static const ASCIILiteral allowedImageMIMETypes[] = { "image/tiff"_s, "image/gif"_s, "image/jpeg"_s, "image/vnd.microsoft.icon"_s, "image/jp2"_s, "image/png"_s, "image/bmp"_s }; > for (auto& mimeType : allowedImageMIMETypes) { >- supportedImageMIMETypes->add(ASCIILiteral { mimeType }); >- supportedImageResourceMIMETypes->add(ASCIILiteral { mimeType }); >+ supportedImageMIMETypes->add(mimeType); >+ supportedImageResourceMIMETypes->add(mimeType); > } > > #ifndef NDEBUG >@@ -265,97 +265,97 @@ static const Vector<String>* typesForCommonExtension(const String& extension) > { > static const auto map = makeNeverDestroyed([] { > struct TypeExtensionPair { >- const char* type; >- const char* extension; >+ ASCIILiteral type; >+ ASCIILiteral extension; > }; > > // A table of common media MIME types and file extentions used when a platform's > // specific MIME type lookup doesn't have a match for a media file extension. > static const TypeExtensionPair commonMediaTypes[] = { > // Ogg >- { "application/ogg", "ogx" }, >- { "audio/ogg", "ogg" }, >- { "audio/ogg", "oga" }, >- { "video/ogg", "ogv" }, >+ { "application/ogg"_s, "ogx"_s }, >+ { "audio/ogg"_s, "ogg"_s }, >+ { "audio/ogg"_s, "oga"_s }, >+ { "video/ogg"_s, "ogv"_s }, > > // Annodex >- { "application/annodex", "anx" }, >- { "audio/annodex", "axa" }, >- { "video/annodex", "axv" }, >- { "audio/speex", "spx" }, >+ { "application/annodex"_s, "anx"_s }, >+ { "audio/annodex"_s, "axa"_s }, >+ { "video/annodex"_s, "axv"_s }, >+ { "audio/speex"_s, "spx"_s }, > > // WebM >- { "video/webm", "webm" }, >- { "audio/webm", "webm" }, >+ { "video/webm"_s, "webm"_s }, >+ { "audio/webm"_s, "webm"_s }, > > // MPEG >- { "audio/mpeg", "m1a" }, >- { "audio/mpeg", "m2a" }, >- { "audio/mpeg", "m1s" }, >- { "audio/mpeg", "mpa" }, >- { "video/mpeg", "mpg" }, >- { "video/mpeg", "m15" }, >- { "video/mpeg", "m1s" }, >- { "video/mpeg", "m1v" }, >- { "video/mpeg", "m75" }, >- { "video/mpeg", "mpa" }, >- { "video/mpeg", "mpeg" }, >- { "video/mpeg", "mpm" }, >- { "video/mpeg", "mpv" }, >+ { "audio/mpeg"_s, "m1a"_s }, >+ { "audio/mpeg"_s, "m2a"_s }, >+ { "audio/mpeg"_s, "m1s"_s }, >+ { "audio/mpeg"_s, "mpa"_s }, >+ { "video/mpeg"_s, "mpg"_s }, >+ { "video/mpeg"_s, "m15"_s }, >+ { "video/mpeg"_s, "m1s"_s }, >+ { "video/mpeg"_s, "m1v"_s }, >+ { "video/mpeg"_s, "m75"_s }, >+ { "video/mpeg"_s, "mpa"_s }, >+ { "video/mpeg"_s, "mpeg"_s }, >+ { "video/mpeg"_s, "mpm"_s }, >+ { "video/mpeg"_s, "mpv"_s }, > > // MPEG playlist >- { "application/vnd.apple.mpegurl", "m3u8" }, >- { "application/mpegurl", "m3u8" }, >- { "application/x-mpegurl", "m3u8" }, >- { "audio/mpegurl", "m3url" }, >- { "audio/x-mpegurl", "m3url" }, >- { "audio/mpegurl", "m3u" }, >- { "audio/x-mpegurl", "m3u" }, >+ { "application/vnd.apple.mpegurl"_s, "m3u8"_s }, >+ { "application/mpegurl"_s, "m3u8"_s }, >+ { "application/x-mpegurl"_s, "m3u8"_s }, >+ { "audio/mpegurl"_s, "m3url"_s }, >+ { "audio/x-mpegurl"_s, "m3url"_s }, >+ { "audio/mpegurl"_s, "m3u"_s }, >+ { "audio/x-mpegurl"_s, "m3u"_s }, > > // MPEG-4 >- { "video/x-m4v", "m4v" }, >- { "audio/x-m4a", "m4a" }, >- { "audio/x-m4b", "m4b" }, >- { "audio/x-m4p", "m4p" }, >- { "audio/mp4", "m4a" }, >+ { "video/x-m4v"_s, "m4v"_s }, >+ { "audio/x-m4a"_s, "m4a"_s }, >+ { "audio/x-m4b"_s, "m4b"_s }, >+ { "audio/x-m4p"_s, "m4p"_s }, >+ { "audio/mp4"_s, "m4a"_s }, > > // MP3 >- { "audio/mp3", "mp3" }, >- { "audio/x-mp3", "mp3" }, >- { "audio/x-mpeg", "mp3" }, >+ { "audio/mp3"_s, "mp3"_s }, >+ { "audio/x-mp3"_s, "mp3"_s }, >+ { "audio/x-mpeg"_s, "mp3"_s }, > > // MPEG-2 >- { "video/x-mpeg2", "mp2" }, >- { "video/mpeg2", "vob" }, >- { "video/mpeg2", "mod" }, >- { "video/m2ts", "m2ts" }, >- { "video/x-m2ts", "m2t" }, >- { "video/x-m2ts", "ts" }, >+ { "video/x-mpeg2"_s, "mp2"_s }, >+ { "video/mpeg2"_s, "vob"_s }, >+ { "video/mpeg2"_s, "mod"_s }, >+ { "video/m2ts"_s, "m2ts"_s }, >+ { "video/x-m2ts"_s, "m2t"_s }, >+ { "video/x-m2ts"_s, "ts"_s }, > > // 3GP/3GP2 >- { "audio/3gpp", "3gpp" }, >- { "audio/3gpp2", "3g2" }, >- { "application/x-mpeg", "amc" }, >+ { "audio/3gpp"_s, "3gpp"_s }, >+ { "audio/3gpp2"_s, "3g2"_s }, >+ { "application/x-mpeg"_s, "amc"_s }, > > // AAC >- { "audio/aac", "aac" }, >- { "audio/aac", "adts" }, >- { "audio/x-aac", "m4r" }, >+ { "audio/aac"_s, "aac"_s }, >+ { "audio/aac"_s, "adts"_s }, >+ { "audio/x-aac"_s, "m4r"_s }, > > // CoreAudio File >- { "audio/x-caf", "caf" }, >- { "audio/x-gsm", "gsm" }, >+ { "audio/x-caf"_s, "caf"_s }, >+ { "audio/x-gsm"_s, "gsm"_s }, > > // ADPCM >- { "audio/x-wav", "wav" }, >- { "audio/vnd.wave", "wav" }, >+ { "audio/x-wav"_s, "wav"_s }, >+ { "audio/vnd.wave"_s, "wav"_s }, > }; > > HashMap<String, Vector<String>, ASCIICaseInsensitiveHash> map; > for (auto& pair : commonMediaTypes) { >- const char* type = pair.type; >- const char* extension = pair.extension; >- map.ensure(ASCIILiteral { extension }, [type, extension] { >+ ASCIILiteral type = pair.type; >+ ASCIILiteral extension = pair.extension; >+ map.ensure(extension, [type, extension] { > // First type in the vector must always be the one from getMIMETypeForExtension, > // so we can use the map without also calling getMIMETypeForExtension each time. > Vector<String> synonyms; >@@ -363,7 +363,7 @@ static const Vector<String>* typesForCommonExtension(const String& extension) > if (!systemType.isEmpty() && type != systemType) > synonyms.append(systemType); > return synonyms; >- }).iterator->value.append(ASCIILiteral { type }); >+ }).iterator->value.append(type); > } > return map; > }()); >@@ -403,28 +403,28 @@ static void initializeSupportedMediaMIMETypes() > static void initializeUnsupportedTextMIMETypes() > { > static const char* const types[] = { >- "text/calendar", >- "text/x-calendar", >- "text/x-vcalendar", >- "text/vcalendar", >- "text/vcard", >- "text/x-vcard", >- "text/directory", >- "text/ldif", >- "text/qif", >- "text/x-qif", >- "text/x-csv", >- "text/x-vcf", >+ "text/calendar"_s, >+ "text/x-calendar"_s, >+ "text/x-vcalendar"_s, >+ "text/vcalendar"_s, >+ "text/vcard"_s, >+ "text/x-vcard"_s, >+ "text/directory"_s, >+ "text/ldif"_s, >+ "text/qif"_s, >+ "text/x-qif"_s, >+ "text/x-csv"_s, >+ "text/x-vcf"_s, > #if !PLATFORM(IOS) >- "text/rtf", >+ "text/rtf"_s, > #else >- "text/vnd.sun.j2me.app-descriptor", >+ "text/vnd.sun.j2me.app-descriptor"_s, > #endif > }; > > unsupportedTextMIMETypes = new HashSet<String, ASCIICaseInsensitiveHash>; > for (auto& type : types) >- unsupportedTextMIMETypes->add(ASCIILiteral { type }); >+ unsupportedTextMIMETypes->add(type); > } > > String MIMETypeRegistry::getMIMETypeForPath(const String& path) >@@ -714,58 +714,58 @@ String MIMETypeRegistry::getNormalizedMIMEType(const String& mimeType) > String MIMETypeRegistry::getNormalizedMIMEType(const String& mimeType) > { > static const auto mimeTypeAssociationMap = makeNeverDestroyed([] { >- static const std::pair<const char*, const char*> mimeTypeAssociations[] = { >- { "image/x-ms-bmp", "image/bmp" }, >- { "image/x-windows-bmp", "image/bmp" }, >- { "image/x-bmp", "image/bmp" }, >- { "image/x-bitmap", "image/bmp" }, >- { "image/x-ms-bitmap", "image/bmp" }, >- { "image/jpg", "image/jpeg" }, >- { "image/pjpeg", "image/jpeg" }, >- { "image/x-png", "image/png" }, >- { "image/vnd.rim.png", "image/png" }, >- { "image/ico", "image/vnd.microsoft.icon" }, >- { "image/icon", "image/vnd.microsoft.icon" }, >- { "text/ico", "image/vnd.microsoft.icon" }, >- { "application/ico", "image/vnd.microsoft.icon" }, >- { "image/x-icon", "image/vnd.microsoft.icon" }, >- { "audio/vnd.qcelp", "audio/qcelp" }, >- { "audio/qcp", "audio/qcelp" }, >- { "audio/vnd.qcp", "audio/qcelp" }, >- { "audio/wav", "audio/x-wav" }, >- { "audio/vnd.wave", "audio/x-wav" }, >- { "audio/mid", "audio/midi" }, >- { "audio/sp-midi", "audio/midi" }, >- { "audio/x-mid", "audio/midi" }, >- { "audio/x-midi", "audio/midi" }, >- { "audio/x-mpeg", "audio/mpeg" }, >- { "audio/mp3", "audio/mpeg" }, >- { "audio/x-mp3", "audio/mpeg" }, >- { "audio/mpeg3", "audio/mpeg" }, >- { "audio/x-mpeg3", "audio/mpeg" }, >- { "audio/mpg3", "audio/mpeg" }, >- { "audio/mpg", "audio/mpeg" }, >- { "audio/x-mpg", "audio/mpeg" }, >- { "audio/m4a", "audio/mp4" }, >- { "audio/x-m4a", "audio/mp4" }, >- { "audio/x-mp4", "audio/mp4" }, >- { "audio/x-aac", "audio/aac" }, >- { "audio/x-amr", "audio/amr" }, >- { "audio/mpegurl", "audio/x-mpegurl" }, >- { "audio/flac", "audio/x-flac" }, >- { "video/3gp", "video/3gpp" }, >- { "video/avi", "video/x-msvideo" }, >- { "video/x-m4v", "video/mp4" }, >- { "video/x-quicktime", "video/quicktime" }, >- { "application/java", "application/java-archive" }, >- { "application/x-java-archive", "application/java-archive" }, >- { "application/x-zip-compressed", "application/zip" }, >- { "text/cache-manifest", "text/plain" }, >+ static const std::pair<ASCIILiteral, ASCIILiteral> mimeTypeAssociations[] = { >+ { "image/x-ms-bmp"_s, "image/bmp"_s }, >+ { "image/x-windows-bmp"_s, "image/bmp"_s }, >+ { "image/x-bmp"_s, "image/bmp"_s }, >+ { "image/x-bitmap"_s, "image/bmp"_s }, >+ { "image/x-ms-bitmap"_s, "image/bmp"_s }, >+ { "image/jpg"_s, "image/jpeg"_s }, >+ { "image/pjpeg"_s, "image/jpeg"_s }, >+ { "image/x-png"_s, "image/png"_s }, >+ { "image/vnd.rim.png"_s, "image/png"_s }, >+ { "image/ico"_s, "image/vnd.microsoft.icon"_s }, >+ { "image/icon"_s, "image/vnd.microsoft.icon"_s }, >+ { "text/ico"_s, "image/vnd.microsoft.icon"_s }, >+ { "application/ico"_s, "image/vnd.microsoft.icon"_s }, >+ { "image/x-icon"_s, "image/vnd.microsoft.icon"_s }, >+ { "audio/vnd.qcelp"_s, "audio/qcelp"_s }, >+ { "audio/qcp"_s, "audio/qcelp"_s }, >+ { "audio/vnd.qcp"_s, "audio/qcelp"_s }, >+ { "audio/wav"_s, "audio/x-wav"_s }, >+ { "audio/vnd.wave"_s, "audio/x-wav"_s }, >+ { "audio/mid"_s, "audio/midi"_s }, >+ { "audio/sp-midi"_s, "audio/midi"_s }, >+ { "audio/x-mid"_s, "audio/midi"_s }, >+ { "audio/x-midi"_s, "audio/midi"_s }, >+ { "audio/x-mpeg"_s, "audio/mpeg"_s }, >+ { "audio/mp3"_s, "audio/mpeg"_s }, >+ { "audio/x-mp3"_s, "audio/mpeg"_s }, >+ { "audio/mpeg3"_s, "audio/mpeg"_s }, >+ { "audio/x-mpeg3"_s, "audio/mpeg"_s }, >+ { "audio/mpg3"_s, "audio/mpeg"_s }, >+ { "audio/mpg"_s, "audio/mpeg"_s }, >+ { "audio/x-mpg"_s, "audio/mpeg"_s }, >+ { "audio/m4a"_s, "audio/mp4"_s }, >+ { "audio/x-m4a"_s, "audio/mp4"_s }, >+ { "audio/x-mp4"_s, "audio/mp4"_s }, >+ { "audio/x-aac"_s, "audio/aac"_s }, >+ { "audio/x-amr"_s, "audio/amr"_s }, >+ { "audio/mpegurl"_s, "audio/x-mpegurl"_s }, >+ { "audio/flac"_s, "audio/x-flac"_s }, >+ { "video/3gp"_s, "video/3gpp"_s }, >+ { "video/avi"_s, "video/x-msvideo"_s }, >+ { "video/x-m4v"_s, "video/mp4"_s }, >+ { "video/x-quicktime"_s, "video/quicktime"_s }, >+ { "application/java"_s, "application/java-archive"_s }, >+ { "application/x-java-archive"_s, "application/java-archive"_s }, >+ { "application/x-zip-compressed"_s, "application/zip"_s }, >+ { "text/cache-manifest"_s, "text/plain"_s }, > }; > > HashMap<String, String, ASCIICaseInsensitiveHash> map; > for (auto& pair : mimeTypeAssociations) >- map.add(ASCIILiteral { pair.first }, ASCIILiteral { pair.second }); >+ map.add(pair.first, pair.second); > return map; > }()); > >diff --git a/Source/WebCore/platform/SchemeRegistry.cpp b/Source/WebCore/platform/SchemeRegistry.cpp >index e8eb5aa8c89c6dd1670df19b906f946e6052b582..90dc461df5b70e221f7e28691c5732ab94d8c825 100644 >--- a/Source/WebCore/platform/SchemeRegistry.cpp >+++ b/Source/WebCore/platform/SchemeRegistry.cpp >@@ -525,7 +525,7 @@ bool SchemeRegistry::canServiceWorkersHandleURLScheme(const String& scheme) > if (scheme.isNull()) > return false; > >- if (scheme.startsWithIgnoringASCIICase(ASCIILiteral("http"))) { >+ if (scheme.startsWithIgnoringASCIICase("http"_s)) { > if (scheme.length() == 4) > return true; > if (scheme.length() == 5 && isASCIIAlphaCaselessEqual(scheme[4], 's')) >diff --git a/Source/WebCore/platform/URL.cpp b/Source/WebCore/platform/URL.cpp >index c76472d01b6636253f51d74cc1f8509e4b2031af..cb66916f23e4c1324186cd8270e828b14973498b 100644 >--- a/Source/WebCore/platform/URL.cpp >+++ b/Source/WebCore/platform/URL.cpp >@@ -1031,7 +1031,7 @@ String mimeTypeFromDataURL(const String& url) > return emptyString(); > } > if (index == 5) >- return ASCIILiteral("text/plain"); >+ return "text/plain"_s; > ASSERT(index >= 5); > return url.substring(5, index - 5).convertToASCIILowercase(); > } >diff --git a/Source/WebCore/platform/UserAgentQuirks.cpp b/Source/WebCore/platform/UserAgentQuirks.cpp >index 6bc389e39bf0fc85b5cdd886248c2e55b64f4631..232e5ce57db05db38b49dd9c021a1bc99c0385cb 100644 >--- a/Source/WebCore/platform/UserAgentQuirks.cpp >+++ b/Source/WebCore/platform/UserAgentQuirks.cpp >@@ -144,16 +144,16 @@ String UserAgentQuirks::stringForQuirk(UserAgentQuirk quirk) > switch (quirk) { > case NeedsChromeBrowser: > // Get versions from https://chromium.googlesource.com/chromium/src.git >- return ASCIILiteral("Chrome/58.0.3029.81"); >+ return "Chrome/58.0.3029.81"_s; > case NeedsMacintoshPlatform: >- return ASCIILiteral("Macintosh; Intel Mac OS X 10_13_4"); >+ return "Macintosh; Intel Mac OS X 10_13_4"_s; > case NeedsLinuxDesktopPlatform: >- return ASCIILiteral("X11; Linux x86_64"); >+ return "X11; Linux x86_64"_s; > case NumUserAgentQuirks: > default: > ASSERT_NOT_REACHED(); > } >- return ASCIILiteral(""); >+ return ""_s; > } > > } >diff --git a/Source/WebCore/platform/cocoa/KeyEventCocoa.mm b/Source/WebCore/platform/cocoa/KeyEventCocoa.mm >index 4d65ea20eb5f9c03e71477e1268900d617862057..a7821f72d9f9915c466b5c63adf41af08c27f055 100644 >--- a/Source/WebCore/platform/cocoa/KeyEventCocoa.mm >+++ b/Source/WebCore/platform/cocoa/KeyEventCocoa.mm >@@ -44,133 +44,133 @@ String keyForCharCode(unichar charCode) > { > switch (charCode) { > case NSUpArrowFunctionKey: >- return ASCIILiteral("ArrowUp"); >+ return "ArrowUp"_s; > case NSDownArrowFunctionKey: >- return ASCIILiteral("ArrowDown"); >+ return "ArrowDown"_s; > case NSLeftArrowFunctionKey: >- return ASCIILiteral("ArrowLeft"); >+ return "ArrowLeft"_s; > case NSRightArrowFunctionKey: >- return ASCIILiteral("ArrowRight"); >+ return "ArrowRight"_s; > case NSF1FunctionKey: >- return ASCIILiteral("F1"); >+ return "F1"_s; > case NSF2FunctionKey: >- return ASCIILiteral("F2"); >+ return "F2"_s; > case NSF3FunctionKey: >- return ASCIILiteral("F3"); >+ return "F3"_s; > case NSF4FunctionKey: >- return ASCIILiteral("F4"); >+ return "F4"_s; > case NSF5FunctionKey: >- return ASCIILiteral("F5"); >+ return "F5"_s; > case NSF6FunctionKey: >- return ASCIILiteral("F6"); >+ return "F6"_s; > case NSF7FunctionKey: >- return ASCIILiteral("F7"); >+ return "F7"_s; > case NSF8FunctionKey: >- return ASCIILiteral("F8"); >+ return "F8"_s; > case NSF9FunctionKey: >- return ASCIILiteral("F9"); >+ return "F9"_s; > case NSF10FunctionKey: >- return ASCIILiteral("F10"); >+ return "F10"_s; > case NSF11FunctionKey: >- return ASCIILiteral("F11"); >+ return "F11"_s; > case NSF12FunctionKey: >- return ASCIILiteral("F12"); >+ return "F12"_s; > case NSF13FunctionKey: >- return ASCIILiteral("F13"); >+ return "F13"_s; > case NSF14FunctionKey: >- return ASCIILiteral("F14"); >+ return "F14"_s; > case NSF15FunctionKey: >- return ASCIILiteral("F15"); >+ return "F15"_s; > case NSF16FunctionKey: >- return ASCIILiteral("F16"); >+ return "F16"_s; > case NSF17FunctionKey: >- return ASCIILiteral("F17"); >+ return "F17"_s; > case NSF18FunctionKey: >- return ASCIILiteral("F18"); >+ return "F18"_s; > case NSF19FunctionKey: >- return ASCIILiteral("F19"); >+ return "F19"_s; > case NSF20FunctionKey: >- return ASCIILiteral("F20"); >+ return "F20"_s; > case NSF21FunctionKey: >- return ASCIILiteral("F21"); >+ return "F21"_s; > case NSF22FunctionKey: >- return ASCIILiteral("F22"); >+ return "F22"_s; > case NSF23FunctionKey: >- return ASCIILiteral("F23"); >+ return "F23"_s; > case NSF24FunctionKey: >- return ASCIILiteral("F24"); >+ return "F24"_s; > case NSF25FunctionKey: >- return ASCIILiteral("F25"); >+ return "F25"_s; > case NSF26FunctionKey: >- return ASCIILiteral("F26"); >+ return "F26"_s; > case NSF27FunctionKey: >- return ASCIILiteral("F27"); >+ return "F27"_s; > case NSF28FunctionKey: >- return ASCIILiteral("F28"); >+ return "F28"_s; > case NSF29FunctionKey: >- return ASCIILiteral("F29"); >+ return "F29"_s; > case NSF30FunctionKey: >- return ASCIILiteral("F30"); >+ return "F30"_s; > case NSF31FunctionKey: >- return ASCIILiteral("F31"); >+ return "F31"_s; > case NSF32FunctionKey: >- return ASCIILiteral("F32"); >+ return "F32"_s; > case NSF33FunctionKey: >- return ASCIILiteral("F33"); >+ return "F33"_s; > case NSF34FunctionKey: >- return ASCIILiteral("F34"); >+ return "F34"_s; > case NSF35FunctionKey: >- return ASCIILiteral("F35"); >+ return "F35"_s; > case NSInsertFunctionKey: >- return ASCIILiteral("Insert"); >+ return "Insert"_s; > case NSDeleteFunctionKey: >- return ASCIILiteral("Delete"); >+ return "Delete"_s; > case NSHomeFunctionKey: >- return ASCIILiteral("Home"); >+ return "Home"_s; > case NSEndFunctionKey: >- return ASCIILiteral("End"); >+ return "End"_s; > case NSPageUpFunctionKey: >- return ASCIILiteral("PageUp"); >+ return "PageUp"_s; > case NSPageDownFunctionKey: >- return ASCIILiteral("PageDown"); >+ return "PageDown"_s; > case NSPrintScreenFunctionKey: >- return ASCIILiteral("PrintScreen"); >+ return "PrintScreen"_s; > case NSScrollLockFunctionKey: >- return ASCIILiteral("ScrollLock"); >+ return "ScrollLock"_s; > case NSPauseFunctionKey: >- return ASCIILiteral("Pause"); >+ return "Pause"_s; > case NSMenuFunctionKey: >- return ASCIILiteral("ContextMenu"); >+ return "ContextMenu"_s; > case NSPrintFunctionKey: >- return ASCIILiteral("Print"); >+ return "Print"_s; > case NSClearLineFunctionKey: >- return ASCIILiteral("Clear"); >+ return "Clear"_s; > case NSSelectFunctionKey: >- return ASCIILiteral("Select"); >+ return "Select"_s; > case NSExecuteFunctionKey: >- return ASCIILiteral("Execute"); >+ return "Execute"_s; > case NSUndoFunctionKey: >- return ASCIILiteral("Undo"); >+ return "Undo"_s; > case NSRedoFunctionKey: >- return ASCIILiteral("Redo"); >+ return "Redo"_s; > case NSFindFunctionKey: >- return ASCIILiteral("Find"); >+ return "Find"_s; > case NSHelpFunctionKey: >- return ASCIILiteral("Help"); >+ return "Help"_s; > case NSModeSwitchFunctionKey: >- return ASCIILiteral("ModeChange"); >+ return "ModeChange"_s; > case NSEnterCharacter: > case NSNewlineCharacter: > case NSCarriageReturnCharacter: >- return ASCIILiteral("Enter"); >+ return "Enter"_s; > case NSDeleteCharacter: > case NSBackspaceCharacter: >- return ASCIILiteral("Backspace"); >+ return "Backspace"_s; > case NSBackTabCharacter: > case NSTabCharacter: >- return ASCIILiteral("Tab"); >+ return "Tab"_s; > case 0x1B: >- return ASCIILiteral("Escape"); >+ return "Escape"_s; > case NSFormFeedCharacter: > case NSParagraphSeparatorCharacter: > case NSLineSeparatorCharacter: >@@ -188,7 +188,7 @@ String keyForCharCode(unichar charCode) > case NSDeleteCharFunctionKey: > case NSPrevFunctionKey: > case NSNextFunctionKey: >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > default: > return String(&charCode, 1); > } >diff --git a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm >index 7d0d25ee29d1c6a30b2344fa25412f5f359874c0..0d892ff840bd3cc1ad1280b22d39981a70eddebc 100644 >--- a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm >+++ b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm >@@ -180,7 +180,7 @@ ContentFilterUnblockHandler NetworkExtensionContentFilter::unblockHandler() cons > > RetainPtr<NEFilterSource> neFilterSource { m_neFilterSource }; > return ContentFilterUnblockHandler { >- ASCIILiteral("nefilter-unblock"), [neFilterSource](DecisionHandlerFunction decisionHandler) { >+ "nefilter-unblock"_s, [neFilterSource](DecisionHandlerFunction decisionHandler) { > [neFilterSource remediateWithDecisionHandler:[decisionHandler](NEFilterSourceStatus status, NSDictionary *) { > LOG(ContentFiltering, "NEFilterSource %s the unblock request.\n", status == NEFilterSourceStatusPass ? "allowed" : "did not allow"); > decisionHandler(status == NEFilterSourceStatusPass); >diff --git a/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm b/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm >index 29ac6de1ad5ddcb104ee53a975fd0aa354bb66bd..adc6cf498ca2a934ded948419ed6f028ede8c33f 100644 >--- a/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm >+++ b/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm >@@ -100,7 +100,7 @@ Ref<SharedBuffer> ParentalControlsContentFilter::replacementData() const > ContentFilterUnblockHandler ParentalControlsContentFilter::unblockHandler() const > { > #if PLATFORM(IOS) >- return ContentFilterUnblockHandler { ASCIILiteral("unblock"), m_webFilterEvaluator }; >+ return ContentFilterUnblockHandler { "unblock"_s, m_webFilterEvaluator }; > #else > return { }; > #endif >diff --git a/Source/WebCore/platform/cocoa/PasteboardCocoa.mm b/Source/WebCore/platform/cocoa/PasteboardCocoa.mm >index a286519f18ba65a33acf60d4e90ecf23a86663a4..61e5fea70847d606d03f3ffee4af9d34631fd6b8 100644 >--- a/Source/WebCore/platform/cocoa/PasteboardCocoa.mm >+++ b/Source/WebCore/platform/cocoa/PasteboardCocoa.mm >@@ -150,7 +150,7 @@ Pasteboard::FileContentState Pasteboard::fileContentState() > #endif > return cocoaType == String(kUTTypeURL); > }); >- mayContainFilePaths = containsURL && !Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles(readString(ASCIILiteral("text/uri-list"))); >+ mayContainFilePaths = containsURL && !Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles(readString("text/uri-list"_s)); > } > > // Enforce changeCount ourselves for security. We check after reading instead of before to be >diff --git a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >index 2f379a3da2d317e66a534cd55e0fa67179c2bdac..571454ea65d1a5fd8a556bd79a9e80711beabf2f 100644 >--- a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >+++ b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >@@ -82,91 +82,91 @@ static bool applicationBundleIsEqualTo(const String& bundleIdentifierString) > > bool MacApplication::isSafari() > { >- static bool isSafari = applicationBundleIsEqualTo(ASCIILiteral("com.apple.Safari")) || applicationBundleIsEqualTo(ASCIILiteral("com.apple.SafariTechnologyPreview")); >+ static bool isSafari = applicationBundleIsEqualTo("com.apple.Safari"_s) || applicationBundleIsEqualTo("com.apple.SafariTechnologyPreview"_s); > return isSafari; > } > > bool MacApplication::isAppleMail() > { >- static bool isAppleMail = applicationBundleIsEqualTo(ASCIILiteral("com.apple.mail")); >+ static bool isAppleMail = applicationBundleIsEqualTo("com.apple.mail"_s); > return isAppleMail; > } > > bool MacApplication::isIBooks() > { >- static bool isIBooks = applicationBundleIsEqualTo(ASCIILiteral("com.apple.iBooksX")); >+ static bool isIBooks = applicationBundleIsEqualTo("com.apple.iBooksX"_s); > return isIBooks; > } > > bool MacApplication::isITunes() > { >- static bool isITunes = applicationBundleIsEqualTo(ASCIILiteral("com.apple.iTunes")); >+ static bool isITunes = applicationBundleIsEqualTo("com.apple.iTunes"_s); > return isITunes; > } > > bool MacApplication::isMicrosoftMessenger() > { >- static bool isMicrosoftMessenger = applicationBundleIsEqualTo(ASCIILiteral("com.microsoft.Messenger")); >+ static bool isMicrosoftMessenger = applicationBundleIsEqualTo("com.microsoft.Messenger"_s); > return isMicrosoftMessenger; > } > > bool MacApplication::isAdobeInstaller() > { >- static bool isAdobeInstaller = applicationBundleIsEqualTo(ASCIILiteral("com.adobe.Installers.Setup")); >+ static bool isAdobeInstaller = applicationBundleIsEqualTo("com.adobe.Installers.Setup"_s); > return isAdobeInstaller; > } > > bool MacApplication::isAOLInstantMessenger() > { >- static bool isAOLInstantMessenger = applicationBundleIsEqualTo(ASCIILiteral("com.aol.aim.desktop")); >+ static bool isAOLInstantMessenger = applicationBundleIsEqualTo("com.aol.aim.desktop"_s); > return isAOLInstantMessenger; > } > > bool MacApplication::isMicrosoftMyDay() > { >- static bool isMicrosoftMyDay = applicationBundleIsEqualTo(ASCIILiteral("com.microsoft.myday")); >+ static bool isMicrosoftMyDay = applicationBundleIsEqualTo("com.microsoft.myday"_s); > return isMicrosoftMyDay; > } > > bool MacApplication::isMicrosoftOutlook() > { >- static bool isMicrosoftOutlook = applicationBundleIsEqualTo(ASCIILiteral("com.microsoft.Outlook")); >+ static bool isMicrosoftOutlook = applicationBundleIsEqualTo("com.microsoft.Outlook"_s); > return isMicrosoftOutlook; > } > > bool MacApplication::isQuickenEssentials() > { >- static bool isQuickenEssentials = applicationBundleIsEqualTo(ASCIILiteral("com.intuit.QuickenEssentials")); >+ static bool isQuickenEssentials = applicationBundleIsEqualTo("com.intuit.QuickenEssentials"_s); > return isQuickenEssentials; > } > > bool MacApplication::isAperture() > { >- static bool isAperture = applicationBundleIsEqualTo(ASCIILiteral("com.apple.Aperture")); >+ static bool isAperture = applicationBundleIsEqualTo("com.apple.Aperture"_s); > return isAperture; > } > > bool MacApplication::isVersions() > { >- static bool isVersions = applicationBundleIsEqualTo(ASCIILiteral("com.blackpixel.versions")); >+ static bool isVersions = applicationBundleIsEqualTo("com.blackpixel.versions"_s); > return isVersions; > } > > bool MacApplication::isHRBlock() > { >- static bool isHRBlock = applicationBundleIsEqualTo(ASCIILiteral("com.hrblock.tax.2010")); >+ static bool isHRBlock = applicationBundleIsEqualTo("com.hrblock.tax.2010"_s); > return isHRBlock; > } > > bool MacApplication::isIAdProducer() > { >- static bool isIAdProducer = applicationBundleIsEqualTo(ASCIILiteral("com.apple.iAdProducer")); >+ static bool isIAdProducer = applicationBundleIsEqualTo("com.apple.iAdProducer"_s); > return isIAdProducer; > } > > bool MacApplication::isSolidStateNetworksDownloader() > { >- static bool isSolidStateNetworksDownloader = applicationBundleIsEqualTo(ASCIILiteral("com.solidstatenetworks.awkhost")); >+ static bool isSolidStateNetworksDownloader = applicationBundleIsEqualTo("com.solidstatenetworks.awkhost"_s); > return isSolidStateNetworksDownloader; > } > >@@ -176,19 +176,19 @@ bool MacApplication::isSolidStateNetworksDownloader() > > bool IOSApplication::isMobileMail() > { >- static bool isMobileMail = applicationBundleIsEqualTo(ASCIILiteral("com.apple.mobilemail")); >+ static bool isMobileMail = applicationBundleIsEqualTo("com.apple.mobilemail"_s); > return isMobileMail; > } > > bool IOSApplication::isMobileSafari() > { >- static bool isMobileSafari = applicationBundleIsEqualTo(ASCIILiteral("com.apple.mobilesafari")); >+ static bool isMobileSafari = applicationBundleIsEqualTo("com.apple.mobilesafari"_s); > return isMobileSafari; > } > > bool IOSApplication::isWebBookmarksD() > { >- static bool isWebBookmarksD = applicationBundleIsEqualTo(ASCIILiteral("com.apple.webbookmarksd")); >+ static bool isWebBookmarksD = applicationBundleIsEqualTo("com.apple.webbookmarksd"_s); > return isWebBookmarksD; > } > >@@ -196,25 +196,25 @@ bool IOSApplication::isDumpRenderTree() > { > // We use a prefix match instead of strict equality since multiple instances of DumpRenderTree > // may be launched, where the bundle identifier of each instance has a unique suffix. >- static bool isDumpRenderTree = applicationBundleIsEqualTo(ASCIILiteral("org.webkit.DumpRenderTree")); // e.g. org.webkit.DumpRenderTree0 >+ static bool isDumpRenderTree = applicationBundleIsEqualTo("org.webkit.DumpRenderTree"_s); // e.g. org.webkit.DumpRenderTree0 > return isDumpRenderTree; > } > > bool IOSApplication::isMobileStore() > { >- static bool isMobileStore = applicationBundleIsEqualTo(ASCIILiteral("com.apple.MobileStore")); >+ static bool isMobileStore = applicationBundleIsEqualTo("com.apple.MobileStore"_s); > return isMobileStore; > } > > bool IOSApplication::isSpringBoard() > { >- static bool isSpringBoard = applicationBundleIsEqualTo(ASCIILiteral("com.apple.springboard")); >+ static bool isSpringBoard = applicationBundleIsEqualTo("com.apple.springboard"_s); > return isSpringBoard; > } > > bool IOSApplication::isWebApp() > { >- static bool isWebApp = applicationBundleIsEqualTo(ASCIILiteral("com.apple.webapp")); >+ static bool isWebApp = applicationBundleIsEqualTo("com.apple.webapp"_s); > return isWebApp; > } > >@@ -226,31 +226,31 @@ bool IOSApplication::isWebProcess() > > bool IOSApplication::isIBooks() > { >- static bool isIBooks = applicationBundleIsEqualTo(ASCIILiteral("com.apple.iBooks")); >+ static bool isIBooks = applicationBundleIsEqualTo("com.apple.iBooks"_s); > return isIBooks; > } > > bool IOSApplication::isIBooksStorytime() > { >- static bool isIBooksStorytime = applicationBundleIsEqualTo(ASCIILiteral("com.apple.TVBooks")); >+ static bool isIBooksStorytime = applicationBundleIsEqualTo("com.apple.TVBooks"_s); > return isIBooksStorytime; > } > > bool IOSApplication::isTheSecretSocietyHiddenMystery() > { >- static bool isTheSecretSocietyHiddenMystery = applicationBundleIsEqualTo(ASCIILiteral("com.g5e.secretsociety")); >+ static bool isTheSecretSocietyHiddenMystery = applicationBundleIsEqualTo("com.g5e.secretsociety"_s); > return isTheSecretSocietyHiddenMystery; > } > > bool IOSApplication::isCardiogram() > { >- static bool isCardiogram = applicationBundleIsEqualTo(ASCIILiteral("com.cardiogram.ios.heart")); >+ static bool isCardiogram = applicationBundleIsEqualTo("com.cardiogram.ios.heart"_s); > return isCardiogram; > } > > bool IOSApplication::isNike() > { >- static bool isNike = applicationBundleIsEqualTo(ASCIILiteral("com.nike.omega")); >+ static bool isNike = applicationBundleIsEqualTo("com.nike.omega"_s); > return isNike; > } > >diff --git a/Source/WebCore/platform/cocoa/UserAgentCocoa.mm b/Source/WebCore/platform/cocoa/UserAgentCocoa.mm >index d8c383a4b330d98f22a98a4a60a1c4323aa6d7bb..ee4e7e293a7d27ddb067d106a499547dabac89ae 100644 >--- a/Source/WebCore/platform/cocoa/UserAgentCocoa.mm >+++ b/Source/WebCore/platform/cocoa/UserAgentCocoa.mm >@@ -40,7 +40,7 @@ String systemMarketingVersionForUserAgentString() > > String userAgentBundleVersion() > { >- return ASCIILiteral("605.1.15"); >+ return "605.1.15"_s; > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm b/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm >index e3111aa6b456e4aaf7a27ac9c2f5a1254bbef39b..705994d4e9dc39696e43b3276b06027fb1b99d2e 100644 >--- a/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm >+++ b/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm >@@ -54,7 +54,7 @@ void GameControllerGamepad::setupAsExtendedGamepad() > { > ASSERT(m_extendedGamepad); > >- m_id = makeString(String(m_gcController.get().vendorName), ASCIILiteral(" Extended Gamepad")); >+ m_id = makeString(String(m_gcController.get().vendorName), " Extended Gamepad"_s); > > m_extendedGamepad.get().valueChangedHandler = ^(GCExtendedGamepad *, GCControllerElement *) { > m_lastUpdateTime = MonotonicTime::now(); >@@ -145,7 +145,7 @@ void GameControllerGamepad::setupAsGamepad() > { > ASSERT(m_gamepad); > >- m_id = makeString(String(m_gcController.get().vendorName), ASCIILiteral(" Gamepad")); >+ m_id = makeString(String(m_gcController.get().vendorName), " Gamepad"_s); > > m_gamepad.get().valueChangedHandler = ^(GCGamepad *, GCControllerElement *) { > m_lastUpdateTime = MonotonicTime::now(); >diff --git a/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h b/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h >index 66f1b63584d0ddfc706d9dbec17ae6c424a855ad..9d4e1fadd720be81623c2a7ca561fda9372886b3 100644 >--- a/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h >+++ b/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h >@@ -121,10 +121,10 @@ inline String GenericCueData::toJSONString() const > auto object = JSON::Object::create(); > > #if !LOG_DISABLED >- object->setString(ASCIILiteral("text"), m_content); >+ object->setString("text"_s, m_content); > #endif >- object->setDouble(ASCIILiteral("start"), m_startTime.toDouble()); >- object->setDouble(ASCIILiteral("end"), m_endTime.toDouble()); >+ object->setDouble("start"_s, m_startTime.toDouble()); >+ object->setDouble("end"_s, m_endTime.toDouble()); > > const char* status; > switch (m_status) { >@@ -144,13 +144,13 @@ inline String GenericCueData::toJSONString() const > object->setString("id", m_id); > > if (m_line > 0) >- object->setDouble(ASCIILiteral("line"), m_line); >+ object->setDouble("line"_s, m_line); > > if (m_size > 0) >- object->setDouble(ASCIILiteral("size"), m_size); >+ object->setDouble("size"_s, m_size); > > if (m_position > 0) >- object->setDouble(ASCIILiteral("position"), m_position); >+ object->setDouble("position"_s, m_position); > > if (m_align != None) { > const char* align; >@@ -168,26 +168,26 @@ inline String GenericCueData::toJSONString() const > align = "None"; > break; > } >- object->setString(ASCIILiteral("align"), align); >+ object->setString("align"_s, align); > } > > if (m_foregroundColor.isValid()) >- object->setString(ASCIILiteral("foregroundColor"), m_foregroundColor.serialized()); >+ object->setString("foregroundColor"_s, m_foregroundColor.serialized()); > > if (m_backgroundColor.isValid()) >- object->setString(ASCIILiteral("backgroundColor"), m_backgroundColor.serialized()); >+ object->setString("backgroundColor"_s, m_backgroundColor.serialized()); > > if (m_highlightColor.isValid()) >- object->setString(ASCIILiteral("highlightColor"), m_highlightColor.serialized()); >+ object->setString("highlightColor"_s, m_highlightColor.serialized()); > > if (m_baseFontSize) >- object->setDouble(ASCIILiteral("baseFontSize"), m_baseFontSize); >+ object->setDouble("baseFontSize"_s, m_baseFontSize); > > if (m_relativeFontSize) >- object->setDouble(ASCIILiteral("relativeFontSize"), m_relativeFontSize); >+ object->setDouble("relativeFontSize"_s, m_relativeFontSize); > > if (!m_fontName.isEmpty()) >- object->setString(ASCIILiteral("font"), m_fontName); >+ object->setString("font"_s, m_fontName); > > return object->toJSONString(); > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >index 5a9de27330b1b37a77d66cc4010ab7973dd3b8ff..d2086848de9e0367b29a702d6451e0ee8f2674a8 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >+++ b/Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp >@@ -231,7 +231,7 @@ bool CDMFactoryFairPlayStreaming::supportsKeySystem(const String& keySystem) > { > // https://w3c.github.io/encrypted-media/#key-system > // "Key System strings are compared using case-sensitive matching." >- return keySystem == "com.apple.fps" || keySystem.startsWith(ASCIILiteral("com.apple.fps.")); >+ return keySystem == "com.apple.fps" || keySystem.startsWith("com.apple.fps."_s); > } > > CDMPrivateFairPlayStreaming::CDMPrivateFairPlayStreaming() = default; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm >index 46304164e2e1344ef44f5137f9ac7afdfe302757..e105486cbf5f065fb36e26cf042234bf015a43ff 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm >@@ -280,7 +280,7 @@ static bool isEqual(const SharedBuffer& data, const String& value) > if (!arrayBuffer) > return false; > >- auto exceptionOrDecoder = TextDecoder::create(ASCIILiteral("utf8"), TextDecoder::Options()); >+ auto exceptionOrDecoder = TextDecoder::create("utf8"_s, TextDecoder::Options()); > if (exceptionOrDecoder.hasException()) > return false; > >@@ -294,7 +294,7 @@ static bool isEqual(const SharedBuffer& data, const String& value) > > void CDMInstanceFairPlayStreamingAVFObjC::updateLicense(const String&, LicenseType, const SharedBuffer& responseData, LicenseUpdateCallback callback) > { >- if (!m_expiredSessions.isEmpty() && isEqual(responseData, ASCIILiteral("acknowledged"))) { >+ if (!m_expiredSessions.isEmpty() && isEqual(responseData, "acknowledged"_s)) { > auto expiredSessions = adoptNS([[NSMutableArray alloc] init]); > for (auto& session : m_expiredSessions) > [expiredSessions addObject:session.get()]; >@@ -435,7 +435,7 @@ void CDMInstanceFairPlayStreamingAVFObjC::clearClient() > > const String& CDMInstanceFairPlayStreamingAVFObjC::keySystem() const > { >- static NeverDestroyed<String> s_keySystem { ASCIILiteral("com.apple.fps") }; >+ static NeverDestroyed<String> s_keySystem { "com.apple.fps"_s }; > return s_keySystem; > } > >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm >index 8ec647d92743284f46f6a1dae1cb5bbe05d8e848..98562263a75c61ee3d990698e9eecdae612f1855 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm >@@ -164,7 +164,7 @@ RefPtr<Uint8Array> CDMSessionAVContentKeySession::generateKeyRequest(const Strin > } > > if (!m_certificate) { >- String certificateString(ASCIILiteral("certificate")); >+ String certificateString("certificate"_s); > RefPtr<Uint8Array> array = Uint8Array::create(certificateString.length()); > for (unsigned i = 0, length = certificateString.length(); i < length; ++i) > array->set(i, certificateString[i]); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >index 693cfda38a72e4013223bea1cd3bf5686bc6a5b0..26ab024d8bc9f82bf7d6555936dc5eb5aa4b5028 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm >@@ -121,7 +121,7 @@ RefPtr<Uint8Array> CDMSessionAVStreamSession::generateKeyRequest(const String& m > return generateKeyReleaseMessage(errorCode, systemCode); > } > >- String certificateString(ASCIILiteral("certificate")); >+ String certificateString("certificate"_s); > RefPtr<Uint8Array> array = Uint8Array::create(certificateString.length()); > for (unsigned i = 0, length = certificateString.length(); i < length; ++i) > array->set(i, certificateString[i]); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index 6f0763c43125a23791dd168792602d4baad8686d..06100dec3c3b50bacc23b4aa23562dfdc32b2399 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -1787,7 +1787,7 @@ bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource(AVAssetR > > RetainPtr<NSData> keyURIData = [keyURI dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; > auto keyURIBuffer = SharedBuffer::create(keyURIData.get()); >- player()->initializationDataEncountered(ASCIILiteral("skd"), keyURIBuffer->tryCreateArrayBuffer()); >+ player()->initializationDataEncountered("skd"_s, keyURIBuffer->tryCreateArrayBuffer()); > #endif > return true; > } >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index a0d642751f1e7f10d662304b20d17819d39ecf4d..31bf2fc0b7587a4932e0f19d55e98ea329f75efc 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -244,22 +244,22 @@ static ASCIILiteral propertyIdToString(AnimatedPropertyID property) > { > switch (property) { > case AnimatedPropertyTransform: >- return ASCIILiteral("transform"); >+ return "transform"_s; > case AnimatedPropertyOpacity: >- return ASCIILiteral("opacity"); >+ return "opacity"_s; > case AnimatedPropertyBackgroundColor: >- return ASCIILiteral("backgroundColor"); >+ return "backgroundColor"_s; > case AnimatedPropertyFilter: >- return ASCIILiteral("filters"); >+ return "filters"_s; > #if ENABLE(FILTERS_LEVEL_2) > case AnimatedPropertyWebkitBackdropFilter: >- return ASCIILiteral("backdropFilters"); >+ return "backdropFilters"_s; > #endif > case AnimatedPropertyInvalid: > ASSERT_NOT_REACHED(); > } > ASSERT_NOT_REACHED(); >- return ASCIILiteral(""); >+ return ASCIILiteral::null(); > } > > static String animationIdentifier(const String& animationName, AnimatedPropertyID property, int index, int subIndex) >diff --git a/Source/WebCore/platform/graphics/ca/TileController.cpp b/Source/WebCore/platform/graphics/ca/TileController.cpp >index ec3ae4f1cf6e7facd859ea7ee3762fb66500725a..bd86d1c10f14cb38dfaa7687873dce6ea778bbe3 100644 >--- a/Source/WebCore/platform/graphics/ca/TileController.cpp >+++ b/Source/WebCore/platform/graphics/ca/TileController.cpp >@@ -53,12 +53,12 @@ static const Seconds tileSizeUpdateDelay { 500_ms }; > > String TileController::tileGridContainerLayerName() > { >- return ASCIILiteral("TileGrid container"); >+ return "TileGrid container"_s; > } > > String TileController::zoomedOutTileGridContainerLayerName() > { >- return ASCIILiteral("Zoomed-out TileGrid container"); >+ return "Zoomed-out TileGrid container"_s; > } > > TileController::TileController(PlatformCALayer* rootPlatformLayer) >diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >index 47d671bfb85a467190f37579f8c4bdcf38e574d3..4216ba0b16c27225ffedaddf6fe768b1bc94cb1b 100644 >--- a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >@@ -514,7 +514,7 @@ String ImageBuffer::toDataURL(const String& mimeType, std::optional<double> qual > { > if (auto data = toCFData(mimeType, quality, preserveResolution)) > return dataURL(data.get(), mimeType); >- return ASCIILiteral("data:,"); >+ return "data:,"_s; > } > > Vector<uint8_t> ImageBuffer::toData(const String& mimeType, std::optional<double> quality) const >@@ -622,7 +622,7 @@ String dataURL(const ImageData& source, const String& mimeType, std::optional<do > { > if (auto data = cfData(source, mimeType, quality)) > return dataURL(data.get(), mimeType); >- return ASCIILiteral("data:,"); >+ return "data:,"_s; > } > > Vector<uint8_t> data(const ImageData& source, const String& mimeType, std::optional<double> quality) >diff --git a/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp b/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp >index dffcdcb4cca345a5a7542f1263ce11b16cf4192a..31cf6b1da6adf302ddafe3f616adfcabc564c01f 100644 >--- a/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp >+++ b/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp >@@ -579,12 +579,12 @@ bool VideoTextureCopierCV::initializeContextObjects() > return false; > } > >- m_textureUniformLocation = m_context->getUniformLocation(m_program, ASCIILiteral("u_texture")); >- m_textureDimensionsUniformLocation = m_context->getUniformLocation(m_program, ASCIILiteral("u_textureDimensions")); >- m_flipYUniformLocation = m_context->getUniformLocation(m_program, ASCIILiteral("u_flipY")); >- m_swapColorChannelsUniformLocation = m_context->getUniformLocation(m_program, ASCIILiteral("u_swapColorChannels")); >- m_premultiplyUniformLocation = m_context->getUniformLocation(m_program, ASCIILiteral("u_premultiply")); >- m_positionAttributeLocation = m_context->getAttribLocationDirect(m_program, ASCIILiteral("a_position")); >+ m_textureUniformLocation = m_context->getUniformLocation(m_program, "u_texture"_s); >+ m_textureDimensionsUniformLocation = m_context->getUniformLocation(m_program, "u_textureDimensions"_s); >+ m_flipYUniformLocation = m_context->getUniformLocation(m_program, "u_flipY"_s); >+ m_swapColorChannelsUniformLocation = m_context->getUniformLocation(m_program, "u_swapColorChannels"_s); >+ m_premultiplyUniformLocation = m_context->getUniformLocation(m_program, "u_premultiply"_s); >+ m_positionAttributeLocation = m_context->getAttribLocationDirect(m_program, "a_position"_s); > > m_context->detachShader(m_program, vertexShader); > m_context->detachShader(m_program, fragmentShader); >@@ -605,7 +605,7 @@ bool VideoTextureCopierCV::initializeContextObjects() > > bool VideoTextureCopierCV::initializeUVContextObjects() > { >- String vertexShaderSource = ASCIILiteral( >+ String vertexShaderSource { > "attribute vec2 a_position;\n" > "uniform vec2 u_yTextureSize;\n" > "uniform vec2 u_uvTextureSize;\n" >@@ -625,8 +625,8 @@ bool VideoTextureCopierCV::initializeUVContextObjects() > " v_yTextureCoordinate = normalizedPosition * u_yTextureSize;\n" > " v_uvTextureCoordinate = normalizedPosition * u_uvTextureSize;\n" > #endif >- "}\n" >- ); >+ "}\n"_s >+ }; > > Platform3DObject vertexShader = m_context->createShader(GraphicsContext3D::VERTEX_SHADER); > m_context->shaderSource(vertexShader, vertexShaderSource); >@@ -640,7 +640,7 @@ bool VideoTextureCopierCV::initializeUVContextObjects() > return false; > } > >- String fragmentShaderSource = ASCIILiteral( >+ String fragmentShaderSource { > #if USE(OPENGL_ES) > "precision mediump float;\n" > "#define SAMPLERTYPE sampler2D\n" >@@ -660,8 +660,8 @@ bool VideoTextureCopierCV::initializeUVContextObjects() > " yuv.gb = TEXTUREFUNC(u_uvTexture, v_uvTextureCoordinate).rg;\n" > " yuv.a = 1.0;\n" > " gl_FragColor = yuv * u_colorMatrix;\n" >- "}\n" >- ); >+ "}\n"_s >+ }; > > Platform3DObject fragmentShader = m_context->createShader(GraphicsContext3D::FRAGMENT_SHADER); > m_context->shaderSource(fragmentShader, fragmentShaderSource); >@@ -690,13 +690,13 @@ bool VideoTextureCopierCV::initializeUVContextObjects() > return false; > } > >- m_yTextureUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_yTexture")); >- m_uvTextureUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_uvTexture")); >- m_colorMatrixUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_colorMatrix")); >- m_yuvFlipYUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_flipY")); >- m_yTextureSizeUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_yTextureSize")); >- m_uvTextureSizeUniformLocation = m_context->getUniformLocation(m_yuvProgram, ASCIILiteral("u_uvTextureSize")); >- m_yuvPositionAttributeLocation = m_context->getAttribLocationDirect(m_yuvProgram, ASCIILiteral("a_position")); >+ m_yTextureUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_yTexture"_s); >+ m_uvTextureUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_uvTexture"_s); >+ m_colorMatrixUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_colorMatrix"_s); >+ m_yuvFlipYUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_flipY"_s); >+ m_yTextureSizeUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_yTextureSize"_s); >+ m_uvTextureSizeUniformLocation = m_context->getUniformLocation(m_yuvProgram, "u_uvTextureSize"_s); >+ m_yuvPositionAttributeLocation = m_context->getAttribLocationDirect(m_yuvProgram, "a_position"_s); > > m_context->detachShader(m_yuvProgram, vertexShader); > m_context->detachShader(m_yuvProgram, fragmentShader); >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >index 16d23407c66496f0d7d1a4882b59545fe8d3ea3d..a622eb28a4eb65f05ea4d02534f3f78fd0dc865d 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -432,7 +432,7 @@ bool MediaPlayerPrivateGStreamerBase::handleSyncMessage(GstMessage* message) > > GST_DEBUG_OBJECT(weakThis->pipeline(), "scheduling initializationDataEncountered event for %s with concatenated init datas size of %" G_GSIZE_FORMAT, eventKeySystemIdString.utf8().data(), initData.size()); > GST_MEMDUMP("init datas", initData.data(), initData.size()); >- weakThis->m_player->initializationDataEncountered(ASCIILiteral("cenc"), ArrayBuffer::create(initData.data(), initData.size())); >+ weakThis->m_player->initializationDataEncountered("cenc"_s, ArrayBuffer::create(initData.data(), initData.size())); > }); > > GST_INFO_OBJECT(pipeline(), "waiting for a CDM instance"); >@@ -1248,7 +1248,7 @@ void MediaPlayerPrivateGStreamerBase::initializationDataEncountered(GstEvent* ev > > GST_DEBUG("scheduling initializationDataEncountered event for %s with init data size of %" G_GSIZE_FORMAT, eventKeySystemUUID.utf8().data(), initData.sizeInBytes()); > GST_MEMDUMP("init datas", reinterpret_cast<const uint8_t*>(initData.characters8()), initData.sizeInBytes()); >- weakThis->m_player->initializationDataEncountered(ASCIILiteral("cenc"), ArrayBuffer::create(reinterpret_cast<const uint8_t*>(initData.characters8()), initData.sizeInBytes())); >+ weakThis->m_player->initializationDataEncountered("cenc"_s, ArrayBuffer::create(reinterpret_cast<const uint8_t*>(initData.characters8()), initData.sizeInBytes())); > }); > } > >diff --git a/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp b/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp >index f8ebf9f7b5c27162b7e8ccfb9868801f85d57c5d..d03f5f7fcea3c8f1737716a435f9e666012a5f18 100644 >--- a/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp >+++ b/Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp >@@ -109,16 +109,16 @@ String ISOWebVTTCue::toJSONString() const > auto object = JSON::Object::create(); > > #if !LOG_DISABLED >- object->setString(ASCIILiteral("text"), m_cueText); >+ object->setString("text"_s, m_cueText); > #endif >- object->setString(ASCIILiteral("sourceId"), encodeWithURLEscapeSequences(m_sourceID)); >- object->setString(ASCIILiteral("id"), encodeWithURLEscapeSequences(m_identifier)); >+ object->setString("sourceId"_s, encodeWithURLEscapeSequences(m_sourceID)); >+ object->setString("id"_s, encodeWithURLEscapeSequences(m_identifier)); > >- object->setString(ASCIILiteral("originalStartTime"), encodeWithURLEscapeSequences(m_originalStartTime)); >- object->setString(ASCIILiteral("settings"), encodeWithURLEscapeSequences(m_settings)); >+ object->setString("originalStartTime"_s, encodeWithURLEscapeSequences(m_originalStartTime)); >+ object->setString("settings"_s, encodeWithURLEscapeSequences(m_settings)); > >- object->setDouble(ASCIILiteral("presentationTime"), m_presentationTime.toDouble()); >- object->setDouble(ASCIILiteral("duration"), m_duration.toDouble()); >+ object->setDouble("presentationTime"_s, m_presentationTime.toDouble()); >+ object->setDouble("duration"_s, m_duration.toDouble()); > > return object->toJSONString(); > } >diff --git a/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp b/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp >index d24b7c2f4a867a122847b6f0515cd4685f8a12c9..9705e62e017ee4c770fa2fe25dcbf489fea0a807 100644 >--- a/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp >+++ b/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp >@@ -60,7 +60,7 @@ static void paintLayer(GraphicsContext& context, GraphicsLayer& layer, const Int > } > > PaintingEngineThreaded::PaintingEngineThreaded(unsigned numThreads) >- : m_workerPool(WorkerPool::create(ASCIILiteral("PaintingThread"), numThreads)) >+ : m_workerPool(WorkerPool::create("PaintingThread"_s, numThreads)) > { > } > >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >index b9d0f7efecb2d1dcc9f03ebc8e38b189e0ecb561..74ac4dc172f131970e3e7b83e3ec453635c0c0ca 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp >@@ -223,13 +223,13 @@ void Extensions3DOpenGLCommon::initializeAvailableExtensions() > for (GLint i = 0; i < numExtensions; ++i) > m_availableExtensions.add(glGetStringi(GL_EXTENSIONS, i)); > >- if (!m_availableExtensions.contains(ASCIILiteral("GL_ARB_texture_storage"))) { >+ if (!m_availableExtensions.contains("GL_ARB_texture_storage"_s)) { > GLint majorVersion; > glGetIntegerv(GL_MAJOR_VERSION, &majorVersion); > GLint minorVersion; > glGetIntegerv(GL_MINOR_VERSION, &minorVersion); > if (majorVersion > 4 || (majorVersion == 4 && minorVersion >= 2)) >- m_availableExtensions.add(ASCIILiteral("GL_ARB_texture_storage")); >+ m_availableExtensions.add("GL_ARB_texture_storage"_s); > } > } else > #endif >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >index 5bdd6630759aec372cc4635b7c44171956b92192..3437952003ea75be922af6f49dfbefaa79578a13 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >@@ -1665,7 +1665,7 @@ String GraphicsContext3D::getUnmangledInfoLog(Platform3DObject shaders[2], GC3Ds > // causes a warning in some compilers. There is no point showing > // this warning to the user since they didn't write the code that > // is causing it. >- static const NeverDestroyed<String> angleWarning = ASCIILiteral { "WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported\n" }; >+ static const NeverDestroyed<String> angleWarning { "WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported\n"_s }; > int startFrom = log.startsWith(angleWarning) ? angleWarning.get().length() : 0; > int matchedLength = 0; > >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp >index 5b17df9ba848709061dba28c1455f9d919eb5b2a..844ab62f2f8a237caf940c9f09e26373a7fc2f8d 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp >@@ -55,8 +55,8 @@ const TextureMapperContextAttributes& TextureMapperContextAttributes::get() > attributes.isGLES2Compliant = true; > > String extensionsString(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); >- attributes.supportsNPOTTextures = extensionsString.contains(ASCIILiteral("GL_OES_texture_npot")); >- attributes.supportsUnpackSubimage = extensionsString.contains(ASCIILiteral("GL_EXT_unpack_subimage")); >+ attributes.supportsNPOTTextures = extensionsString.contains("GL_OES_texture_npot"_s); >+ attributes.supportsUnpackSubimage = extensionsString.contains("GL_EXT_unpack_subimage"_s); > #else > attributes.isGLES2Compliant = false; > attributes.supportsNPOTTextures = true; >diff --git a/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp b/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp >index 29765519da054362594ddfdd4a2fb85acb0f24da..676e7415a07f23f41f9751ba6de3bf5e808026a8 100644 >--- a/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp >+++ b/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp >@@ -261,7 +261,7 @@ void ImageBuffer::putByteArray(const Uint8ClampedArray& source, AlphaPremultipli > String ImageBuffer::toDataURL(const String&, std::optional<double>, PreserveResolution) const > { > notImplemented(); >- return ASCIILiteral("data:,"); >+ return "data:,"_s; > } > > Vector<uint8_t> ImageBuffer::toData(const String& mimeType, std::optional<double> quality) const >@@ -273,7 +273,7 @@ Vector<uint8_t> ImageBuffer::toData(const String& mimeType, std::optional<double > String ImageDataToDataURL(const ImageData& source, const String& mimeType, const double* quality) > { > notImplemented(); >- return ASCIILiteral("data:,"); >+ return "data:,"_s; > } > > void ImageBuffer::transformColorSpace(ColorSpace, ColorSpace) >diff --git a/Source/WebCore/platform/gtk/PasteboardGtk.cpp b/Source/WebCore/platform/gtk/PasteboardGtk.cpp >index e9fc9ea71c70272f9d43063a5ecbdc981f6b9cd8..d5baa1c9b6fe507dd1288de74b18b52508cfb983 100644 >--- a/Source/WebCore/platform/gtk/PasteboardGtk.cpp >+++ b/Source/WebCore/platform/gtk/PasteboardGtk.cpp >@@ -265,17 +265,17 @@ Vector<String> Pasteboard::typesForLegacyUnsafeBindings() > > Vector<String> types; > if (m_selectionData->hasText()) { >- types.append(ASCIILiteral("text/plain")); >- types.append(ASCIILiteral("Text")); >- types.append(ASCIILiteral("text")); >+ types.append("text/plain"_s); >+ types.append("Text"_s); >+ types.append("text"_s); > } > > if (m_selectionData->hasMarkup()) >- types.append(ASCIILiteral("text/html")); >+ types.append("text/html"_s); > > if (m_selectionData->hasURIList()) { >- types.append(ASCIILiteral("text/uri-list")); >- types.append(ASCIILiteral("URL")); >+ types.append("text/uri-list"_s); >+ types.append("URL"_s); > } > > for (auto& key : m_selectionData->unknownTypes().keys()) >diff --git a/Source/WebCore/platform/gtk/PasteboardHelper.cpp b/Source/WebCore/platform/gtk/PasteboardHelper.cpp >index d59a2db60e227c89ae56305faf774de3d6ae359e..c2686fd4eabe0f7b7a648ff65da3bcee0536ea57 100644 >--- a/Source/WebCore/platform/gtk/PasteboardHelper.cpp >+++ b/Source/WebCore/platform/gtk/PasteboardHelper.cpp >@@ -40,7 +40,7 @@ static GdkAtom uriListAtom; > static GdkAtom smartPasteAtom; > static GdkAtom unknownAtom; > >-static const String gMarkupPrefix = ASCIILiteral("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">"); >+static const String gMarkupPrefix = "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">"_s; > > static void removeMarkupPrefix(String& markup) > { >diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >index a2c8c32e2abafdde989a52c6f0a99471d2122a4d..2dd8bfab81f619b96c8460c61cd714a00d773e9b 100644 >--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >@@ -51,7 +51,7 @@ String PlatformKeyboardEvent::keyValueForGdkKeyCode(unsigned keyCode) > // Modifier keys. > case GDK_KEY_Alt_L: > case GDK_KEY_Alt_R: >- return ASCIILiteral("Alt"); >+ return "Alt"_s; > // Firefox uses GDK_KEY_Mode_switch for AltGraph as well. > case GDK_KEY_ISO_Level3_Shift: > case GDK_KEY_ISO_Level3_Latch: >@@ -59,30 +59,30 @@ String PlatformKeyboardEvent::keyValueForGdkKeyCode(unsigned keyCode) > case GDK_KEY_ISO_Level5_Shift: > case GDK_KEY_ISO_Level5_Latch: > case GDK_KEY_ISO_Level5_Lock: >- return ASCIILiteral("AltGraph"); >+ return "AltGraph"_s; > case GDK_KEY_Caps_Lock: >- return ASCIILiteral("CapsLock"); >+ return "CapsLock"_s; > case GDK_KEY_Control_L: > case GDK_KEY_Control_R: >- return ASCIILiteral("Control"); >+ return "Control"_s; > // Fn: This is typically a hardware key that does not generate a separate code. > // FnLock. > case GDK_KEY_Hyper_L: > case GDK_KEY_Hyper_R: >- return ASCIILiteral("Hyper"); >+ return "Hyper"_s; > case GDK_KEY_Meta_L: > case GDK_KEY_Meta_R: >- return ASCIILiteral("Meta"); >+ return "Meta"_s; > case GDK_KEY_Num_Lock: >- return ASCIILiteral("NumLock"); >+ return "NumLock"_s; > case GDK_KEY_Scroll_Lock: >- return ASCIILiteral("ScrollLock"); >+ return "ScrollLock"_s; > case GDK_KEY_Shift_L: > case GDK_KEY_Shift_R: >- return ASCIILiteral("Shift"); >+ return "Shift"_s; > case GDK_KEY_Super_L: > case GDK_KEY_Super_R: >- return ASCIILiteral("Super"); >+ return "Super"_s; > // Symbol. > // SymbolLock. > >@@ -91,133 +91,133 @@ String PlatformKeyboardEvent::keyValueForGdkKeyCode(unsigned keyCode) > case GDK_KEY_KP_Enter: > case GDK_KEY_ISO_Enter: > case GDK_KEY_3270_Enter: >- return ASCIILiteral("Enter"); >+ return "Enter"_s; > case GDK_KEY_Tab: > case GDK_KEY_KP_Tab: >- return ASCIILiteral("Tab"); >+ return "Tab"_s; > > // Navigation keys. > case GDK_KEY_Down: > case GDK_KEY_KP_Down: >- return ASCIILiteral("ArrowDown"); >+ return "ArrowDown"_s; > case GDK_KEY_Left: > case GDK_KEY_KP_Left: >- return ASCIILiteral("ArrowLeft"); >+ return "ArrowLeft"_s; > case GDK_KEY_Right: > case GDK_KEY_KP_Right: >- return ASCIILiteral("ArrowRight"); >+ return "ArrowRight"_s; > case GDK_KEY_Up: > case GDK_KEY_KP_Up: >- return ASCIILiteral("ArrowUp"); >+ return "ArrowUp"_s; > case GDK_KEY_End: > case GDK_KEY_KP_End: >- return ASCIILiteral("End"); >+ return "End"_s; > case GDK_KEY_Home: > case GDK_KEY_KP_Home: >- return ASCIILiteral("Home"); >+ return "Home"_s; > case GDK_KEY_Page_Down: > case GDK_KEY_KP_Page_Down: >- return ASCIILiteral("PageDown"); >+ return "PageDown"_s; > case GDK_KEY_Page_Up: > case GDK_KEY_KP_Page_Up: >- return ASCIILiteral("PageUp"); >+ return "PageUp"_s; > > // Editing keys. > case GDK_KEY_BackSpace: >- return ASCIILiteral("Backspace"); >+ return "Backspace"_s; > case GDK_KEY_Clear: >- return ASCIILiteral("Clear"); >+ return "Clear"_s; > case GDK_KEY_Copy: >- return ASCIILiteral("Copy"); >+ return "Copy"_s; > case GDK_KEY_3270_CursorSelect: >- return ASCIILiteral("CrSel"); >+ return "CrSel"_s; > case GDK_KEY_Cut: >- return ASCIILiteral("Cut"); >+ return "Cut"_s; > case GDK_KEY_Delete: > case GDK_KEY_KP_Delete: >- return ASCIILiteral("Delete"); >+ return "Delete"_s; > case GDK_KEY_3270_EraseEOF: >- return ASCIILiteral("EraseEof"); >+ return "EraseEof"_s; > case GDK_KEY_3270_ExSelect: >- return ASCIILiteral("ExSel"); >+ return "ExSel"_s; > case GDK_KEY_Insert: > case GDK_KEY_KP_Insert: >- return ASCIILiteral("Insert"); >+ return "Insert"_s; > case GDK_KEY_Paste: >- return ASCIILiteral("Paste"); >+ return "Paste"_s; > case GDK_KEY_Redo: >- return ASCIILiteral("Redo"); >+ return "Redo"_s; > case GDK_KEY_Undo: >- return ASCIILiteral("Undo"); >+ return "Undo"_s; > > // UI keys. > // Accept. > // Again. > case GDK_KEY_3270_Attn: >- return ASCIILiteral("Attn"); >+ return "Attn"_s; > case GDK_KEY_Cancel: >- return ASCIILiteral("Cancel"); >+ return "Cancel"_s; > case GDK_KEY_Menu: >- return ASCIILiteral("ContextMenu"); >+ return "ContextMenu"_s; > case GDK_KEY_Escape: >- return ASCIILiteral("Escape"); >+ return "Escape"_s; > case GDK_KEY_Execute: >- return ASCIILiteral("Execute"); >+ return "Execute"_s; > case GDK_KEY_Find: >- return ASCIILiteral("Find"); >+ return "Find"_s; > case GDK_KEY_Help: >- return ASCIILiteral("Help"); >+ return "Help"_s; > case GDK_KEY_Pause: > case GDK_KEY_Break: >- return ASCIILiteral("Pause"); >+ return "Pause"_s; > case GDK_KEY_3270_Play: >- return ASCIILiteral("Play"); >+ return "Play"_s; > // Props. > case GDK_KEY_Select: >- return ASCIILiteral("Select"); >+ return "Select"_s; > case GDK_KEY_ZoomIn: >- return ASCIILiteral("ZoomIn"); >+ return "ZoomIn"_s; > case GDK_KEY_ZoomOut: >- return ASCIILiteral("ZoomOut"); >+ return "ZoomOut"_s; > > // Device keys. > case GDK_KEY_MonBrightnessDown: >- return ASCIILiteral("BrightnessDown"); >+ return "BrightnessDown"_s; > case GDK_KEY_MonBrightnessUp: >- return ASCIILiteral("BrightnessUp"); >+ return "BrightnessUp"_s; > case GDK_KEY_Eject: >- return ASCIILiteral("Eject"); >+ return "Eject"_s; > case GDK_KEY_LogOff: >- return ASCIILiteral("LogOff"); >+ return "LogOff"_s; > // Power. > case GDK_KEY_PowerDown: > case GDK_KEY_PowerOff: >- return ASCIILiteral("PowerOff"); >+ return "PowerOff"_s; > case GDK_KEY_3270_PrintScreen: > case GDK_KEY_Print: > case GDK_KEY_Sys_Req: >- return ASCIILiteral("PrintScreen"); >+ return "PrintScreen"_s; > case GDK_KEY_Hibernate: >- return ASCIILiteral("Hibernate"); >+ return "Hibernate"_s; > case GDK_KEY_Standby: > case GDK_KEY_Suspend: > case GDK_KEY_Sleep: >- return ASCIILiteral("Standby"); >+ return "Standby"_s; > case GDK_KEY_WakeUp: >- return ASCIILiteral("WakeUp"); >+ return "WakeUp"_s; > > // IME keys. > case GDK_KEY_MultipleCandidate: >- return ASCIILiteral("AllCandidates"); >+ return "AllCandidates"_s; > case GDK_KEY_Eisu_Shift: > case GDK_KEY_Eisu_toggle: >- return ASCIILiteral("Alphanumeric"); >+ return "Alphanumeric"_s; > case GDK_KEY_Codeinput: >- return ASCIILiteral("CodeInput"); >+ return "CodeInput"_s; > case GDK_KEY_Multi_key: >- return ASCIILiteral("Compose"); >+ return "Compose"_s; > case GDK_KEY_Henkan: >- return ASCIILiteral("Convert"); >+ return "Convert"_s; > case GDK_KEY_dead_grave: > case GDK_KEY_dead_acute: > case GDK_KEY_dead_circumflex: >@@ -262,133 +262,133 @@ String PlatformKeyboardEvent::keyValueForGdkKeyCode(unsigned keyCode) > case GDK_KEY_dead_U: > case GDK_KEY_dead_small_schwa: > case GDK_KEY_dead_capital_schwa: >- return ASCIILiteral("Dead"); >+ return "Dead"_s; > // FinalMode > case GDK_KEY_ISO_First_Group: >- return ASCIILiteral("GroupFirst"); >+ return "GroupFirst"_s; > case GDK_KEY_ISO_Last_Group: >- return ASCIILiteral("GroupLast"); >+ return "GroupLast"_s; > case GDK_KEY_ISO_Next_Group: >- return ASCIILiteral("GroupNext"); >+ return "GroupNext"_s; > case GDK_KEY_ISO_Prev_Group: >- return ASCIILiteral("GroupPrevious"); >+ return "GroupPrevious"_s; > case GDK_KEY_Mode_switch: >- return ASCIILiteral("ModeChange"); >+ return "ModeChange"_s; > // NextCandidate. > case GDK_KEY_Muhenkan: >- return ASCIILiteral("NonConvert"); >+ return "NonConvert"_s; > case GDK_KEY_PreviousCandidate: >- return ASCIILiteral("PreviousCandidate"); >+ return "PreviousCandidate"_s; > // Process. > case GDK_KEY_SingleCandidate: >- return ASCIILiteral("SingleCandidate"); >+ return "SingleCandidate"_s; > > // Korean and Japanese keys. > case GDK_KEY_Hangul: >- return ASCIILiteral("HangulMode"); >+ return "HangulMode"_s; > case GDK_KEY_Hangul_Hanja: >- return ASCIILiteral("HanjaMode"); >+ return "HanjaMode"_s; > case GDK_KEY_Hangul_Jeonja: >- return ASCIILiteral("JunjaMode"); >+ return "JunjaMode"_s; > case GDK_KEY_Hankaku: >- return ASCIILiteral("Hankaku"); >+ return "Hankaku"_s; > case GDK_KEY_Hiragana: >- return ASCIILiteral("Hiragana"); >+ return "Hiragana"_s; > case GDK_KEY_Hiragana_Katakana: >- return ASCIILiteral("HiraganaKatakana"); >+ return "HiraganaKatakana"_s; > case GDK_KEY_Kana_Lock: > case GDK_KEY_Kana_Shift: >- return ASCIILiteral("KanaMode"); >+ return "KanaMode"_s; > case GDK_KEY_Kanji: >- return ASCIILiteral("KanjiMode"); >+ return "KanjiMode"_s; > case GDK_KEY_Katakana: >- return ASCIILiteral("Katakana"); >+ return "Katakana"_s; > case GDK_KEY_Romaji: >- return ASCIILiteral("Romaji"); >+ return "Romaji"_s; > case GDK_KEY_Zenkaku: >- return ASCIILiteral("Zenkaku"); >+ return "Zenkaku"_s; > case GDK_KEY_Zenkaku_Hankaku: >- return ASCIILiteral("ZenkakuHanaku"); >+ return "ZenkakuHanaku"_s; > > // Multimedia keys. > // ChannelDown. > // ChannelUp. > case GDK_KEY_Close: >- return ASCIILiteral("Close"); >+ return "Close"_s; > case GDK_KEY_MailForward: >- return ASCIILiteral("MailForward"); >+ return "MailForward"_s; > case GDK_KEY_Reply: >- return ASCIILiteral("MailReply"); >+ return "MailReply"_s; > case GDK_KEY_Send: >- return ASCIILiteral("MailSend"); >+ return "MailSend"_s; > case GDK_KEY_AudioForward: >- return ASCIILiteral("MediaFastForward"); >+ return "MediaFastForward"_s; > case GDK_KEY_AudioPause: >- return ASCIILiteral("MediaPause"); >+ return "MediaPause"_s; > case GDK_KEY_AudioPlay: >- return ASCIILiteral("MediaPlay"); >+ return "MediaPlay"_s; > // MediaPlayPause > case GDK_KEY_AudioRecord: >- return ASCIILiteral("MediaRecord"); >+ return "MediaRecord"_s; > case GDK_KEY_AudioRewind: >- return ASCIILiteral("MediaRewind"); >+ return "MediaRewind"_s; > case GDK_KEY_AudioStop: >- return ASCIILiteral("MediaStop"); >+ return "MediaStop"_s; > case GDK_KEY_AudioNext: >- return ASCIILiteral("MediaTrackNext"); >+ return "MediaTrackNext"_s; > case GDK_KEY_AudioPrev: >- return ASCIILiteral("MediaTrackPrevious"); >+ return "MediaTrackPrevious"_s; > case GDK_KEY_New: >- return ASCIILiteral("New"); >+ return "New"_s; > case GDK_KEY_Open: >- return ASCIILiteral("Open"); >+ return "Open"_s; > // Print. > case GDK_KEY_Save: >- return ASCIILiteral("Save"); >+ return "Save"_s; > case GDK_KEY_Spell: >- return ASCIILiteral("SpellCheck"); >+ return "SpellCheck"_s; > > // Function keys. > case GDK_KEY_F1: >- return ASCIILiteral("F1"); >+ return "F1"_s; > case GDK_KEY_F2: >- return ASCIILiteral("F2"); >+ return "F2"_s; > case GDK_KEY_F3: >- return ASCIILiteral("F3"); >+ return "F3"_s; > case GDK_KEY_F4: >- return ASCIILiteral("F4"); >+ return "F4"_s; > case GDK_KEY_F5: >- return ASCIILiteral("F5"); >+ return "F5"_s; > case GDK_KEY_F6: >- return ASCIILiteral("F6"); >+ return "F6"_s; > case GDK_KEY_F7: >- return ASCIILiteral("F7"); >+ return "F7"_s; > case GDK_KEY_F8: >- return ASCIILiteral("F8"); >+ return "F8"_s; > case GDK_KEY_F9: >- return ASCIILiteral("F9"); >+ return "F9"_s; > case GDK_KEY_F10: >- return ASCIILiteral("F10"); >+ return "F10"_s; > case GDK_KEY_F11: >- return ASCIILiteral("F11"); >+ return "F11"_s; > case GDK_KEY_F12: >- return ASCIILiteral("F12"); >+ return "F12"_s; > case GDK_KEY_F13: >- return ASCIILiteral("F13"); >+ return "F13"_s; > case GDK_KEY_F14: >- return ASCIILiteral("F14"); >+ return "F14"_s; > case GDK_KEY_F15: >- return ASCIILiteral("F15"); >+ return "F15"_s; > case GDK_KEY_F16: >- return ASCIILiteral("F16"); >+ return "F16"_s; > case GDK_KEY_F17: >- return ASCIILiteral("F17"); >+ return "F17"_s; > case GDK_KEY_F18: >- return ASCIILiteral("F18"); >+ return "F18"_s; > case GDK_KEY_F19: >- return ASCIILiteral("F19"); >+ return "F19"_s; > case GDK_KEY_F20: >- return ASCIILiteral("F20"); >+ return "F20"_s; > > default: { > guint32 unicodeCharacter = gdk_keyval_to_unicode(keyCode); >@@ -398,7 +398,7 @@ String PlatformKeyboardEvent::keyValueForGdkKeyCode(unsigned keyCode) > g_unichar_to_utf8(unicodeCharacter, utf8); > return String::fromUTF8(utf8); > } >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > } > } > } >@@ -411,319 +411,319 @@ String PlatformKeyboardEvent::keyCodeForHardwareKeyCode(unsigned keyCode) > { > switch (keyCode) { > case 0x0009: >- return ASCIILiteral("Escape"); >+ return "Escape"_s; > case 0x000A: >- return ASCIILiteral("Digit1"); >+ return "Digit1"_s; > case 0x000B: >- return ASCIILiteral("Digit2"); >+ return "Digit2"_s; > case 0x000C: >- return ASCIILiteral("Digit3"); >+ return "Digit3"_s; > case 0x000D: >- return ASCIILiteral("Digit4"); >+ return "Digit4"_s; > case 0x000E: >- return ASCIILiteral("Digit5"); >+ return "Digit5"_s; > case 0x000F: >- return ASCIILiteral("Digit6"); >+ return "Digit6"_s; > case 0x0010: >- return ASCIILiteral("Digit7"); >+ return "Digit7"_s; > case 0x0011: >- return ASCIILiteral("Digit8"); >+ return "Digit8"_s; > case 0x0012: >- return ASCIILiteral("Digit9"); >+ return "Digit9"_s; > case 0x0013: >- return ASCIILiteral("Digit0"); >+ return "Digit0"_s; > case 0x0014: >- return ASCIILiteral("Minus"); >+ return "Minus"_s; > case 0x0015: >- return ASCIILiteral("Equal"); >+ return "Equal"_s; > case 0x0016: >- return ASCIILiteral("Backspace"); >+ return "Backspace"_s; > case 0x0017: >- return ASCIILiteral("Tab"); >+ return "Tab"_s; > case 0x0018: >- return ASCIILiteral("KeyQ"); >+ return "KeyQ"_s; > case 0x0019: >- return ASCIILiteral("KeyW"); >+ return "KeyW"_s; > case 0x001A: >- return ASCIILiteral("KeyE"); >+ return "KeyE"_s; > case 0x001B: >- return ASCIILiteral("KeyR"); >+ return "KeyR"_s; > case 0x001C: >- return ASCIILiteral("KeyT"); >+ return "KeyT"_s; > case 0x001D: >- return ASCIILiteral("KeyY"); >+ return "KeyY"_s; > case 0x001E: >- return ASCIILiteral("KeyU"); >+ return "KeyU"_s; > case 0x001F: >- return ASCIILiteral("KeyI"); >+ return "KeyI"_s; > case 0x0020: >- return ASCIILiteral("KeyO"); >+ return "KeyO"_s; > case 0x0021: >- return ASCIILiteral("KeyP"); >+ return "KeyP"_s; > case 0x0022: >- return ASCIILiteral("BracketLeft"); >+ return "BracketLeft"_s; > case 0x0023: >- return ASCIILiteral("BracketRight"); >+ return "BracketRight"_s; > case 0x0024: >- return ASCIILiteral("Enter"); >+ return "Enter"_s; > case 0x0025: >- return ASCIILiteral("ControlLeft"); >+ return "ControlLeft"_s; > case 0x0026: >- return ASCIILiteral("KeyA"); >+ return "KeyA"_s; > case 0x0027: >- return ASCIILiteral("KeyS"); >+ return "KeyS"_s; > case 0x0028: >- return ASCIILiteral("KeyD"); >+ return "KeyD"_s; > case 0x0029: >- return ASCIILiteral("KeyF"); >+ return "KeyF"_s; > case 0x002A: >- return ASCIILiteral("KeyG"); >+ return "KeyG"_s; > case 0x002B: >- return ASCIILiteral("KeyH"); >+ return "KeyH"_s; > case 0x002C: >- return ASCIILiteral("KeyJ"); >+ return "KeyJ"_s; > case 0x002D: >- return ASCIILiteral("KeyK"); >+ return "KeyK"_s; > case 0x002E: >- return ASCIILiteral("KeyL"); >+ return "KeyL"_s; > case 0x002F: >- return ASCIILiteral("Semicolon"); >+ return "Semicolon"_s; > case 0x0030: >- return ASCIILiteral("Quote"); >+ return "Quote"_s; > case 0x0031: >- return ASCIILiteral("Backquote"); >+ return "Backquote"_s; > case 0x0032: >- return ASCIILiteral("ShiftLeft"); >+ return "ShiftLeft"_s; > case 0x0033: >- return ASCIILiteral("Backslash"); >+ return "Backslash"_s; > case 0x0034: >- return ASCIILiteral("KeyZ"); >+ return "KeyZ"_s; > case 0x0035: >- return ASCIILiteral("KeyX"); >+ return "KeyX"_s; > case 0x0036: >- return ASCIILiteral("KeyC"); >+ return "KeyC"_s; > case 0x0037: >- return ASCIILiteral("KeyV"); >+ return "KeyV"_s; > case 0x0038: >- return ASCIILiteral("KeyB"); >+ return "KeyB"_s; > case 0x0039: >- return ASCIILiteral("KeyN"); >+ return "KeyN"_s; > case 0x003A: >- return ASCIILiteral("KeyM"); >+ return "KeyM"_s; > case 0x003B: >- return ASCIILiteral("Comma"); >+ return "Comma"_s; > case 0x003C: >- return ASCIILiteral("Period"); >+ return "Period"_s; > case 0x003D: >- return ASCIILiteral("Slash"); >+ return "Slash"_s; > case 0x003E: >- return ASCIILiteral("ShiftRight"); >+ return "ShiftRight"_s; > case 0x003F: >- return ASCIILiteral("NumpadMultiply"); >+ return "NumpadMultiply"_s; > case 0x0040: >- return ASCIILiteral("AltLeft"); >+ return "AltLeft"_s; > case 0x0041: >- return ASCIILiteral("Space"); >+ return "Space"_s; > case 0x0042: >- return ASCIILiteral("CapsLock"); >+ return "CapsLock"_s; > case 0x0043: >- return ASCIILiteral("F1"); >+ return "F1"_s; > case 0x0044: >- return ASCIILiteral("F2"); >+ return "F2"_s; > case 0x0045: >- return ASCIILiteral("F3"); >+ return "F3"_s; > case 0x0046: >- return ASCIILiteral("F4"); >+ return "F4"_s; > case 0x0047: >- return ASCIILiteral("F5"); >+ return "F5"_s; > case 0x0048: >- return ASCIILiteral("F6"); >+ return "F6"_s; > case 0x0049: >- return ASCIILiteral("F7"); >+ return "F7"_s; > case 0x004A: >- return ASCIILiteral("F8"); >+ return "F8"_s; > case 0x004B: >- return ASCIILiteral("F9"); >+ return "F9"_s; > case 0x004C: >- return ASCIILiteral("F10"); >+ return "F10"_s; > case 0x004D: >- return ASCIILiteral("NumLock"); >+ return "NumLock"_s; > case 0x004E: >- return ASCIILiteral("ScrollLock"); >+ return "ScrollLock"_s; > case 0x004F: >- return ASCIILiteral("Numpad7"); >+ return "Numpad7"_s; > case 0x0050: >- return ASCIILiteral("Numpad8"); >+ return "Numpad8"_s; > case 0x0051: >- return ASCIILiteral("Numpad9"); >+ return "Numpad9"_s; > case 0x0052: >- return ASCIILiteral("NumpadSubtract"); >+ return "NumpadSubtract"_s; > case 0x0053: >- return ASCIILiteral("Numpad4"); >+ return "Numpad4"_s; > case 0x0054: >- return ASCIILiteral("Numpad5"); >+ return "Numpad5"_s; > case 0x0055: >- return ASCIILiteral("Numpad6"); >+ return "Numpad6"_s; > case 0x0056: >- return ASCIILiteral("NumpadAdd"); >+ return "NumpadAdd"_s; > case 0x0057: >- return ASCIILiteral("Numpad1"); >+ return "Numpad1"_s; > case 0x0058: >- return ASCIILiteral("Numpad2"); >+ return "Numpad2"_s; > case 0x0059: >- return ASCIILiteral("Numpad3"); >+ return "Numpad3"_s; > case 0x005A: >- return ASCIILiteral("Numpad0"); >+ return "Numpad0"_s; > case 0x005B: >- return ASCIILiteral("NumpadDecimal"); >+ return "NumpadDecimal"_s; > case 0x005E: >- return ASCIILiteral("IntlBackslash"); >+ return "IntlBackslash"_s; > case 0x005F: >- return ASCIILiteral("F11"); >+ return "F11"_s; > case 0x0060: >- return ASCIILiteral("F12"); >+ return "F12"_s; > case 0x0061: >- return ASCIILiteral("IntlRo"); >+ return "IntlRo"_s; > case 0x0064: >- return ASCIILiteral("Convert"); >+ return "Convert"_s; > case 0x0065: >- return ASCIILiteral("KanaMode"); >+ return "KanaMode"_s; > case 0x0066: >- return ASCIILiteral("NonConvert"); >+ return "NonConvert"_s; > case 0x0068: >- return ASCIILiteral("NumpadEnter"); >+ return "NumpadEnter"_s; > case 0x0069: >- return ASCIILiteral("ControlRight"); >+ return "ControlRight"_s; > case 0x006A: >- return ASCIILiteral("NumpadDivide"); >+ return "NumpadDivide"_s; > case 0x006B: >- return ASCIILiteral("PrintScreen"); >+ return "PrintScreen"_s; > case 0x006C: >- return ASCIILiteral("AltRight"); >+ return "AltRight"_s; > case 0x006E: >- return ASCIILiteral("Home"); >+ return "Home"_s; > case 0x006F: >- return ASCIILiteral("ArrowUp"); >+ return "ArrowUp"_s; > case 0x0070: >- return ASCIILiteral("PageUp"); >+ return "PageUp"_s; > case 0x0071: >- return ASCIILiteral("ArrowLeft"); >+ return "ArrowLeft"_s; > case 0x0072: >- return ASCIILiteral("ArrowRight"); >+ return "ArrowRight"_s; > case 0x0073: >- return ASCIILiteral("End"); >+ return "End"_s; > case 0x0074: >- return ASCIILiteral("ArrowDown"); >+ return "ArrowDown"_s; > case 0x0075: >- return ASCIILiteral("PageDown"); >+ return "PageDown"_s; > case 0x0076: >- return ASCIILiteral("Insert"); >+ return "Insert"_s; > case 0x0077: >- return ASCIILiteral("Delete"); >+ return "Delete"_s; > case 0x0079: >- return ASCIILiteral("AudioVolumeMute"); >+ return "AudioVolumeMute"_s; > case 0x007A: >- return ASCIILiteral("AudioVolumeDown"); >+ return "AudioVolumeDown"_s; > case 0x007B: >- return ASCIILiteral("AudioVolumeUp"); >+ return "AudioVolumeUp"_s; > case 0x007D: >- return ASCIILiteral("NumpadEqual"); >+ return "NumpadEqual"_s; > case 0x007F: >- return ASCIILiteral("Pause"); >+ return "Pause"_s; > case 0x0081: >- return ASCIILiteral("NumpadComma"); >+ return "NumpadComma"_s; > case 0x0082: >- return ASCIILiteral("Lang1"); >+ return "Lang1"_s; > case 0x0083: >- return ASCIILiteral("Lang2"); >+ return "Lang2"_s; > case 0x0084: >- return ASCIILiteral("IntlYen"); >+ return "IntlYen"_s; > case 0x0085: >- return ASCIILiteral("OSLeft"); >+ return "OSLeft"_s; > case 0x0086: >- return ASCIILiteral("OSRight"); >+ return "OSRight"_s; > case 0x0087: >- return ASCIILiteral("ContextMenu"); >+ return "ContextMenu"_s; > case 0x0088: >- return ASCIILiteral("BrowserStop"); >+ return "BrowserStop"_s; > case 0x0089: >- return ASCIILiteral("Again"); >+ return "Again"_s; > case 0x008A: >- return ASCIILiteral("Props"); >+ return "Props"_s; > case 0x008B: >- return ASCIILiteral("Undo"); >+ return "Undo"_s; > case 0x008C: >- return ASCIILiteral("Select"); >+ return "Select"_s; > case 0x008D: >- return ASCIILiteral("Copy"); >+ return "Copy"_s; > case 0x008E: >- return ASCIILiteral("Open"); >+ return "Open"_s; > case 0x008F: >- return ASCIILiteral("Paste"); >+ return "Paste"_s; > case 0x0090: >- return ASCIILiteral("Find"); >+ return "Find"_s; > case 0x0091: >- return ASCIILiteral("Cut"); >+ return "Cut"_s; > case 0x0092: >- return ASCIILiteral("Help"); >+ return "Help"_s; > case 0x0094: >- return ASCIILiteral("LaunchApp2"); >+ return "LaunchApp2"_s; > case 0x0097: >- return ASCIILiteral("WakeUp"); >+ return "WakeUp"_s; > case 0x0098: >- return ASCIILiteral("LaunchApp1"); >+ return "LaunchApp1"_s; > case 0x00A3: >- return ASCIILiteral("LaunchMail"); >+ return "LaunchMail"_s; > case 0x00A4: >- return ASCIILiteral("BrowserFavorites"); >+ return "BrowserFavorites"_s; > case 0x00A6: >- return ASCIILiteral("BrowserBack"); >+ return "BrowserBack"_s; > case 0x00A7: >- return ASCIILiteral("BrowserForward"); >+ return "BrowserForward"_s; > case 0x00A9: >- return ASCIILiteral("Eject"); >+ return "Eject"_s; > case 0x00AB: >- return ASCIILiteral("MediaTrackNext"); >+ return "MediaTrackNext"_s; > case 0x00AC: >- return ASCIILiteral("MediaPlayPause"); >+ return "MediaPlayPause"_s; > case 0x00AD: >- return ASCIILiteral("MediaTrackPrevious"); >+ return "MediaTrackPrevious"_s; > case 0x00AE: >- return ASCIILiteral("MediaStop"); >+ return "MediaStop"_s; > case 0x00B3: >- return ASCIILiteral("LaunchMediaPlayer"); >+ return "LaunchMediaPlayer"_s; > case 0x00B4: >- return ASCIILiteral("BrowserHome"); >+ return "BrowserHome"_s; > case 0x00B5: >- return ASCIILiteral("BrowserRefresh"); >+ return "BrowserRefresh"_s; > case 0x00BF: >- return ASCIILiteral("F13"); >+ return "F13"_s; > case 0x00C0: >- return ASCIILiteral("F14"); >+ return "F14"_s; > case 0x00C1: >- return ASCIILiteral("F15"); >+ return "F15"_s; > case 0x00C2: >- return ASCIILiteral("F16"); >+ return "F16"_s; > case 0x00C3: >- return ASCIILiteral("F17"); >+ return "F17"_s; > case 0x00C4: >- return ASCIILiteral("F18"); >+ return "F18"_s; > case 0x00C5: >- return ASCIILiteral("F19"); >+ return "F19"_s; > case 0x00C6: >- return ASCIILiteral("F20"); >+ return "F20"_s; > case 0x00C7: >- return ASCIILiteral("F21"); >+ return "F21"_s; > case 0x00C8: >- return ASCIILiteral("F22"); >+ return "F22"_s; > case 0x00C9: >- return ASCIILiteral("F23"); >+ return "F23"_s; > case 0x00CA: >- return ASCIILiteral("F24"); >+ return "F24"_s; > case 0x00E1: >- return ASCIILiteral("BrowserSearch"); >+ return "BrowserSearch"_s; > default: >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > } > } > >diff --git a/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h b/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h >index 72da3e2a381e5c5fa3900a8cf3ff446cbae92c09..14a4feba59e62e95e7d315770392972174de05d6 100644 >--- a/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h >@@ -43,7 +43,7 @@ class BMPImageDecoder final : public ScalableImageDecoder { > } > > // ScalableImageDecoder >- String filenameExtension() const final { return ASCIILiteral("bmp"); } >+ String filenameExtension() const final { return "bmp"_s; } > void setData(SharedBuffer&, bool allDataReceived) final; > ScalableImageDecoderFrame* frameBufferAtIndex(size_t index) final; > // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid >diff --git a/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h b/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h >index 0b17643461cba0ae647a3bfbc32801e61335ca31..35df33f6dfc483fd8471366ae53bb0b961caed2e 100644 >--- a/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h >@@ -45,7 +45,7 @@ class GIFImageDecoder final : public ScalableImageDecoder { > enum GIFQuery { GIFFullQuery, GIFSizeQuery, GIFFrameCountQuery }; > > // ScalableImageDecoder >- String filenameExtension() const final { return ASCIILiteral("gif"); } >+ String filenameExtension() const final { return "gif"_s; } > void setData(SharedBuffer& data, bool allDataReceived) final; > bool setSize(const IntSize&) final; > size_t frameCount() const final; >diff --git a/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.h b/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.h >index c0f423243d6644de416308af17d302c74425e16d..a76eb397d14d628203d0151d690efa1b4d26a209 100644 >--- a/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.h >@@ -45,7 +45,7 @@ class ICOImageDecoder final : public ScalableImageDecoder { > virtual ~ICOImageDecoder(); > > // ScalableImageDecoder >- String filenameExtension() const final { return ASCIILiteral("ico"); } >+ String filenameExtension() const final { return "ico"_s; } > void setData(SharedBuffer&, bool allDataReceived) final; > IntSize size() const final; > IntSize frameSizeAtIndex(size_t, SubsamplingLevel) const final; >diff --git a/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h b/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h >index 284e3c2ba99e106e0d9ff97390f9212751c00d6d..69521dcf7b086ba73b023cbe24299a8279f09d34 100644 >--- a/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.h >@@ -51,7 +51,7 @@ namespace WebCore { > virtual ~JPEGImageDecoder(); > > // ScalableImageDecoder >- String filenameExtension() const override { return ASCIILiteral("jpg"); } >+ String filenameExtension() const override { return "jpg"_s; } > bool setSize(const IntSize&) override; > ScalableImageDecoderFrame* frameBufferAtIndex(size_t index) override; > // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid >diff --git a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h >index 0b9ca7ced19a41aa824681a4f15c4073146b26be..85f705335e3161a193449606745326d56aefa0da 100644 >--- a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h >@@ -45,7 +45,7 @@ namespace WebCore { > virtual ~PNGImageDecoder(); > > // ScalableImageDecoder >- String filenameExtension() const override { return ASCIILiteral("png"); } >+ String filenameExtension() const override { return "png"_s; } > #if ENABLE(APNG) > size_t frameCount() const override { return m_frameCount; } > RepetitionCount repetitionCount() const override; >diff --git a/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h b/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h >index e4808a5f8521088b504d3bf29cd03f5dff7333ae..af365e9cf9c7ce9538b64ba789bf017d48f6ede1 100644 >--- a/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h >+++ b/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h >@@ -46,7 +46,7 @@ class WEBPImageDecoder final : public ScalableImageDecoder { > > virtual ~WEBPImageDecoder(); > >- String filenameExtension() const override { return ASCIILiteral("webp"); } >+ String filenameExtension() const override { return "webp"_s; } > void setData(SharedBuffer&, bool) final; > ScalableImageDecoderFrame* frameBufferAtIndex(size_t index) override; > RepetitionCount repetitionCount() const override; >diff --git a/Source/WebCore/platform/ios/Device.cpp b/Source/WebCore/platform/ios/Device.cpp >index c8e12d73944f0807d6fdc90144206eebd803e49a..e865090eeb71aaf426f7e8ec91592d89f20697ba 100644 >--- a/Source/WebCore/platform/ios/Device.cpp >+++ b/Source/WebCore/platform/ios/Device.cpp >@@ -59,7 +59,7 @@ const String& deviceName() > #if TARGET_OS_IOS > static const NeverDestroyed<String> deviceName = adoptCF(static_cast<CFStringRef>(MGCopyAnswer(kMGQDeviceName, nullptr))).get(); > #else >- static const NeverDestroyed<String> deviceName = ASCIILiteral { "iPhone" }; >+ static const NeverDestroyed<String> deviceName { "iPhone"_s }; > #endif > return deviceName; > } >diff --git a/Source/WebCore/platform/ios/PasteboardIOS.mm b/Source/WebCore/platform/ios/PasteboardIOS.mm >index 2f7120d25dd98b20b5b67745f4767ea39bb8c115..d26c5848efeba5363f10d3c338f9acc09e3d577c 100644 >--- a/Source/WebCore/platform/ios/PasteboardIOS.mm >+++ b/Source/WebCore/platform/ios/PasteboardIOS.mm >@@ -407,15 +407,15 @@ void Pasteboard::addHTMLClipboardTypesForCocoaType(ListHashSet<String>& resultTy > if ([cocoaType isEqualToString:(NSString *)kUTTypePlainText] > || [cocoaType isEqualToString:(NSString *)kUTTypeUTF8PlainText] > || [cocoaType isEqualToString:(NSString *)kUTTypeUTF16PlainText]) { >- resultTypes.add(ASCIILiteral("text/plain")); >+ resultTypes.add("text/plain"_s); > return; > } > if ([cocoaType isEqualToString:(NSString *)kUTTypeURL]) { >- resultTypes.add(ASCIILiteral("text/uri-list")); >+ resultTypes.add("text/uri-list"_s); > return; > } > if ([cocoaType isEqualToString:(NSString *)kUTTypeHTML]) { >- resultTypes.add(ASCIILiteral("text/html")); >+ resultTypes.add("text/html"_s); > // We don't return here for App compatibility. > } > if (Pasteboard::shouldTreatCocoaTypeAsFile(cocoaType)) >diff --git a/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm b/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm >index c97459b0d8316343c7116f98a08e15dc9359a778..6f2481980836d59629a0df7fe22c44c81d2ea2e8 100644 >--- a/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm >+++ b/Source/WebCore/platform/ios/PlatformEventFactoryIOS.mm >@@ -143,7 +143,7 @@ String keyForKeyEvent(WebEvent *event) > // https://developer.apple.com/reference/appkit/nsevent/1534183-characters > // "Dead" is defined here https://w3c.github.io/uievents-key/#keys-composition. > if (!length) >- return ASCIILiteral("Dead"); >+ return "Dead"_s; > > if (length > 1) > return characters; >@@ -156,76 +156,76 @@ String codeForKeyEvent(WebEvent *event) > { > switch (event.keyCode) { > // Keys in the alphanumeric section. >- case VK_OEM_3: return ASCIILiteral("Backquote"); >- case VK_OEM_5: return ASCIILiteral("Backslash"); >- case VK_BACK: return ASCIILiteral("Backspace"); >- case VK_OEM_4: return ASCIILiteral("BracketLeft"); >- case VK_OEM_6: return ASCIILiteral("BracketRight"); >- case VK_OEM_COMMA: return ASCIILiteral("Comma"); >- case VK_0: return ASCIILiteral("Digit0"); >- case VK_1: return ASCIILiteral("Digit1"); >- case VK_2: return ASCIILiteral("Digit2"); >- case VK_3: return ASCIILiteral("Digit3"); >- case VK_4: return ASCIILiteral("Digit4"); >- case VK_5: return ASCIILiteral("Digit5"); >- case VK_6: return ASCIILiteral("Digit6"); >- case VK_7: return ASCIILiteral("Digit7"); >- case VK_8: return ASCIILiteral("Digit8"); >- case VK_9: return ASCIILiteral("Digit9"); >- case VK_OEM_PLUS: return ASCIILiteral("Equal"); >- case VK_OEM_102: return ASCIILiteral("IntlBackslash"); >+ case VK_OEM_3: return "Backquote"_s; >+ case VK_OEM_5: return "Backslash"_s; >+ case VK_BACK: return "Backspace"_s; >+ case VK_OEM_4: return "BracketLeft"_s; >+ case VK_OEM_6: return "BracketRight"_s; >+ case VK_OEM_COMMA: return "Comma"_s; >+ case VK_0: return "Digit0"_s; >+ case VK_1: return "Digit1"_s; >+ case VK_2: return "Digit2"_s; >+ case VK_3: return "Digit3"_s; >+ case VK_4: return "Digit4"_s; >+ case VK_5: return "Digit5"_s; >+ case VK_6: return "Digit6"_s; >+ case VK_7: return "Digit7"_s; >+ case VK_8: return "Digit8"_s; >+ case VK_9: return "Digit9"_s; >+ case VK_OEM_PLUS: return "Equal"_s; >+ case VK_OEM_102: return "IntlBackslash"_s; > // IntlRo. > // IntlYen. >- case VK_A: return ASCIILiteral("KeyA"); >- case VK_B: return ASCIILiteral("KeyB"); >- case VK_C: return ASCIILiteral("KeyC"); >- case VK_D: return ASCIILiteral("KeyD"); >- case VK_E: return ASCIILiteral("KeyE"); >- case VK_F: return ASCIILiteral("KeyF"); >- case VK_G: return ASCIILiteral("KeyG"); >- case VK_H: return ASCIILiteral("KeyH"); >- case VK_I: return ASCIILiteral("KeyI"); >- case VK_J: return ASCIILiteral("KeyJ"); >- case VK_K: return ASCIILiteral("KeyK"); >- case VK_L: return ASCIILiteral("KeyL"); >- case VK_M: return ASCIILiteral("KeyM"); >- case VK_N: return ASCIILiteral("KeyN"); >- case VK_O: return ASCIILiteral("KeyO"); >- case VK_P: return ASCIILiteral("KeyP"); >- case VK_Q: return ASCIILiteral("KeyQ"); >- case VK_R: return ASCIILiteral("KeyR"); >- case VK_S: return ASCIILiteral("KeyS"); >- case VK_T: return ASCIILiteral("KeyT"); >- case VK_U: return ASCIILiteral("KeyU"); >- case VK_V: return ASCIILiteral("KeyV"); >- case VK_W: return ASCIILiteral("KeyW"); >- case VK_X: return ASCIILiteral("KeyX"); >- case VK_Y: return ASCIILiteral("KeyY"); >- case VK_Z: return ASCIILiteral("KeyZ"); >- case VK_OEM_MINUS: return ASCIILiteral("Minus"); >- case VK_OEM_PERIOD: return ASCIILiteral("Period"); >- case VK_OEM_7: return ASCIILiteral("Quote"); >- case VK_OEM_1: return ASCIILiteral("Semicolon"); >- case VK_OEM_2: return ASCIILiteral("Slash"); >+ case VK_A: return "KeyA"_s; >+ case VK_B: return "KeyB"_s; >+ case VK_C: return "KeyC"_s; >+ case VK_D: return "KeyD"_s; >+ case VK_E: return "KeyE"_s; >+ case VK_F: return "KeyF"_s; >+ case VK_G: return "KeyG"_s; >+ case VK_H: return "KeyH"_s; >+ case VK_I: return "KeyI"_s; >+ case VK_J: return "KeyJ"_s; >+ case VK_K: return "KeyK"_s; >+ case VK_L: return "KeyL"_s; >+ case VK_M: return "KeyM"_s; >+ case VK_N: return "KeyN"_s; >+ case VK_O: return "KeyO"_s; >+ case VK_P: return "KeyP"_s; >+ case VK_Q: return "KeyQ"_s; >+ case VK_R: return "KeyR"_s; >+ case VK_S: return "KeyS"_s; >+ case VK_T: return "KeyT"_s; >+ case VK_U: return "KeyU"_s; >+ case VK_V: return "KeyV"_s; >+ case VK_W: return "KeyW"_s; >+ case VK_X: return "KeyX"_s; >+ case VK_Y: return "KeyY"_s; >+ case VK_Z: return "KeyZ"_s; >+ case VK_OEM_MINUS: return "Minus"_s; >+ case VK_OEM_PERIOD: return "Period"_s; >+ case VK_OEM_7: return "Quote"_s; >+ case VK_OEM_1: return "Semicolon"_s; >+ case VK_OEM_2: return "Slash"_s; > > // Functional keys in alphanumeric section. >- case VK_MENU: return ASCIILiteral("AltLeft"); >+ case VK_MENU: return "AltLeft"_s; > // AltRight. >- case VK_CAPITAL: return ASCIILiteral("CapsLock"); >+ case VK_CAPITAL: return "CapsLock"_s; > // ContextMenu. >- case VK_LCONTROL: return ASCIILiteral("ControlLeft"); >- case VK_RCONTROL: return ASCIILiteral("ControlRight"); >- case VK_RETURN: return ASCIILiteral("Enter"); // Labeled Return on Apple keyboards. >- case VK_LWIN: return ASCIILiteral("MetaLeft"); >- case VK_RWIN: return ASCIILiteral("MetaRight"); >- case VK_LSHIFT: return ASCIILiteral("ShiftLeft"); >- case VK_RSHIFT: return ASCIILiteral("ShiftRight"); >- case VK_SPACE: return ASCIILiteral("Space"); >- case VK_TAB: return ASCIILiteral("Tab"); >+ case VK_LCONTROL: return "ControlLeft"_s; >+ case VK_RCONTROL: return "ControlRight"_s; >+ case VK_RETURN: return "Enter"_s; // Labeled Return on Apple keyboards. >+ case VK_LWIN: return "MetaLeft"_s; >+ case VK_RWIN: return "MetaRight"_s; >+ case VK_LSHIFT: return "ShiftLeft"_s; >+ case VK_RSHIFT: return "ShiftRight"_s; >+ case VK_SPACE: return "Space"_s; >+ case VK_TAB: return "Tab"_s; > > // Functional keys found on Japanese and Korean keyboards. > // Convert. >- case VK_KANA: return ASCIILiteral("KanaMode"); >+ case VK_KANA: return "KanaMode"_s; > // Lang1. > // Lang2. > // Lang3. >@@ -235,74 +235,74 @@ String codeForKeyEvent(WebEvent *event) > > // Keys in the ControlPad section. > // Delete >- case VK_END: return ASCIILiteral("End"); >- case VK_HELP: return ASCIILiteral("Help"); >- case VK_HOME: return ASCIILiteral("Home"); >+ case VK_END: return "End"_s; >+ case VK_HELP: return "Help"_s; >+ case VK_HOME: return "Home"_s; > // Insert: Not present on Apple keyboards. >- case VK_NEXT: return ASCIILiteral("PageDown"); >- case VK_PRIOR: return ASCIILiteral("PageUp"); >+ case VK_NEXT: return "PageDown"_s; >+ case VK_PRIOR: return "PageUp"_s; > > // Keys in the ArrowPad section. >- case VK_DOWN: return ASCIILiteral("ArrowDown"); >- case VK_LEFT: return ASCIILiteral("ArrowLeft"); >- case VK_RIGHT: return ASCIILiteral("ArrowRight"); >- case VK_UP: return ASCIILiteral("ArrowUp"); >+ case VK_DOWN: return "ArrowDown"_s; >+ case VK_LEFT: return "ArrowLeft"_s; >+ case VK_RIGHT: return "ArrowRight"_s; >+ case VK_UP: return "ArrowUp"_s; > > // Keys in the Numpad section. >- case VK_NUMLOCK: return ASCIILiteral("NumLock"); >- case VK_NUMPAD0: return ASCIILiteral("Numpad0"); >- case VK_NUMPAD1: return ASCIILiteral("Numpad1"); >- case VK_NUMPAD2: return ASCIILiteral("Numpad2"); >- case VK_NUMPAD3: return ASCIILiteral("Numpad3"); >- case VK_NUMPAD4: return ASCIILiteral("Numpad4"); >- case VK_NUMPAD5: return ASCIILiteral("Numpad5"); >- case VK_NUMPAD6: return ASCIILiteral("Numpad6"); >- case VK_NUMPAD7: return ASCIILiteral("Numpad7"); >- case VK_NUMPAD8: return ASCIILiteral("Numpad8"); >- case VK_NUMPAD9: return ASCIILiteral("Numpad9"); >- case VK_ADD: return ASCIILiteral("NumpadAdd"); >+ case VK_NUMLOCK: return "NumLock"_s; >+ case VK_NUMPAD0: return "Numpad0"_s; >+ case VK_NUMPAD1: return "Numpad1"_s; >+ case VK_NUMPAD2: return "Numpad2"_s; >+ case VK_NUMPAD3: return "Numpad3"_s; >+ case VK_NUMPAD4: return "Numpad4"_s; >+ case VK_NUMPAD5: return "Numpad5"_s; >+ case VK_NUMPAD6: return "Numpad6"_s; >+ case VK_NUMPAD7: return "Numpad7"_s; >+ case VK_NUMPAD8: return "Numpad8"_s; >+ case VK_NUMPAD9: return "Numpad9"_s; >+ case VK_ADD: return "NumpadAdd"_s; > // NumpadBackspace. > // NumpadClear. > // NumpadClearEntry. >- case VK_SEPARATOR: return ASCIILiteral("NumpadComma"); >- case VK_DECIMAL: return ASCIILiteral("NumpadDecimal"); >- case VK_DIVIDE: return ASCIILiteral("NumpadDivide"); >+ case VK_SEPARATOR: return "NumpadComma"_s; >+ case VK_DECIMAL: return "NumpadDecimal"_s; >+ case VK_DIVIDE: return "NumpadDivide"_s; > // NumpadEnter. >- case VK_CLEAR: return ASCIILiteral("NumpadEqual"); >+ case VK_CLEAR: return "NumpadEqual"_s; > // NumpadHash. > // NumpadMemoryAdd. > // NumpadMemoryClear. > // NumpadMemoryRecall. > // NumpadMemoryStore. > // NumpadMemorySubtract. >- case VK_MULTIPLY: return ASCIILiteral("NumpadMultiply"); >+ case VK_MULTIPLY: return "NumpadMultiply"_s; > // NumpadParenLeft. > // NumpadParenRight. > // NumpadStar: The specification says to use "NumpadMultiply" for the * key on numeric keypads. >- case VK_SUBTRACT: return ASCIILiteral("NumpadSubtract"); >+ case VK_SUBTRACT: return "NumpadSubtract"_s; > > // Keys in the Function section. >- case VK_ESCAPE: return ASCIILiteral("Escape"); >- case VK_F1: return ASCIILiteral("F1"); >- case VK_F2: return ASCIILiteral("F2"); >- case VK_F3: return ASCIILiteral("F3"); >- case VK_F4: return ASCIILiteral("F4"); >- case VK_F5: return ASCIILiteral("F5"); >- case VK_F6: return ASCIILiteral("F6"); >- case VK_F7: return ASCIILiteral("F7"); >- case VK_F8: return ASCIILiteral("F8"); >- case VK_F9: return ASCIILiteral("F9"); >- case VK_F10: return ASCIILiteral("F10"); >- case VK_F11: return ASCIILiteral("F11"); >- case VK_F12: return ASCIILiteral("F12"); >- case VK_F13: return ASCIILiteral("F13"); >- case VK_F14: return ASCIILiteral("F14"); >- case VK_F15: return ASCIILiteral("F15"); >- case VK_F16: return ASCIILiteral("F16"); >- case VK_F17: return ASCIILiteral("F17"); >- case VK_F18: return ASCIILiteral("F18"); >- case VK_F19: return ASCIILiteral("F19"); >- case VK_F20: return ASCIILiteral("F20"); >+ case VK_ESCAPE: return "Escape"_s; >+ case VK_F1: return "F1"_s; >+ case VK_F2: return "F2"_s; >+ case VK_F3: return "F3"_s; >+ case VK_F4: return "F4"_s; >+ case VK_F5: return "F5"_s; >+ case VK_F6: return "F6"_s; >+ case VK_F7: return "F7"_s; >+ case VK_F8: return "F8"_s; >+ case VK_F9: return "F9"_s; >+ case VK_F10: return "F10"_s; >+ case VK_F11: return "F11"_s; >+ case VK_F12: return "F12"_s; >+ case VK_F13: return "F13"_s; >+ case VK_F14: return "F14"_s; >+ case VK_F15: return "F15"_s; >+ case VK_F16: return "F16"_s; >+ case VK_F17: return "F17"_s; >+ case VK_F18: return "F18"_s; >+ case VK_F19: return "F19"_s; >+ case VK_F20: return "F20"_s; > // Fn: This is typically a hardware key that does not generate a separate code. > // FnLock. > // PrintScreen. >@@ -328,9 +328,9 @@ String codeForKeyEvent(WebEvent *event) > // MediaTrackPrevious. > // Power. > // Sleep. >- case VK_VOLUME_DOWN: return ASCIILiteral("AudioVolumeDown"); >- case VK_VOLUME_MUTE: return ASCIILiteral("AudioVolumeMute"); >- case VK_VOLUME_UP: return ASCIILiteral("AudioVolumeUp"); >+ case VK_VOLUME_DOWN: return "AudioVolumeDown"_s; >+ case VK_VOLUME_MUTE: return "AudioVolumeMute"_s; >+ case VK_VOLUME_UP: return "AudioVolumeUp"_s; > // WakeUp. > > // Legacy modifier keys. >@@ -359,7 +359,7 @@ String codeForKeyEvent(WebEvent *event) > // Katakana. > > default: >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > } > } > >diff --git a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >index 23121d8685d673ce8744fd6d4d2ac367e766aa2b..7ee2ad9857b2a5941bfe17e8b31feb905cee2bf2 100644 >--- a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >+++ b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >@@ -394,14 +394,14 @@ static const char *safeTypeForDOMToReadAndWriteForPlatformType(const String& pla > { > auto cfType = platformType.createCFString(); > if (UTTypeConformsTo(cfType.get(), kUTTypePlainText)) >- return ASCIILiteral("text/plain"); >+ return "text/plain"_s; > > if (UTTypeConformsTo(cfType.get(), kUTTypeHTML) || UTTypeConformsTo(cfType.get(), (CFStringRef)WebArchivePboardType) > || UTTypeConformsTo(cfType.get(), kUTTypeRTF) || UTTypeConformsTo(cfType.get(), kUTTypeFlatRTFD)) >- return ASCIILiteral("text/html"); >+ return "text/html"_s; > > if (UTTypeConformsTo(cfType.get(), kUTTypeURL)) >- return ASCIILiteral("text/uri-list"); >+ return "text/uri-list"_s; > > return nullptr; > } >diff --git a/Source/WebCore/platform/mac/PasteboardMac.mm b/Source/WebCore/platform/mac/PasteboardMac.mm >index 47636c57ab936eeb1aae66529e310d903f4b5332..4219a5e139f3d1b7d01096c0ab18bbf9c63db4fd 100644 >--- a/Source/WebCore/platform/mac/PasteboardMac.mm >+++ b/Source/WebCore/platform/mac/PasteboardMac.mm >@@ -402,28 +402,28 @@ void Pasteboard::read(PasteboardWebContentReader& reader, WebContentReadingPolic > > if (types.contains(String(legacyTIFFPasteboardType()))) { > if (RefPtr<SharedBuffer> buffer = strategy.bufferForType(legacyTIFFPasteboardType(), m_pasteboardName)) { >- if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), ASCIILiteral("image/tiff"))) >+ if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), "image/tiff"_s)) > return; > } > } > > if (types.contains(String(legacyPDFPasteboardType()))) { > if (RefPtr<SharedBuffer> buffer = strategy.bufferForType(legacyPDFPasteboardType(), m_pasteboardName)) { >- if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), ASCIILiteral("application/pdf"))) >+ if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), "application/pdf"_s)) > return; > } > } > > if (types.contains(String(kUTTypePNG))) { > if (RefPtr<SharedBuffer> buffer = strategy.bufferForType(kUTTypePNG, m_pasteboardName)) { >- if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), ASCIILiteral("image/png"))) >+ if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), "image/png"_s)) > return; > } > } > > if (types.contains(String(kUTTypeJPEG))) { > if (RefPtr<SharedBuffer> buffer = strategy.bufferForType(kUTTypeJPEG, m_pasteboardName)) { >- if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), ASCIILiteral("image/jpeg"))) >+ if (m_changeCount != changeCount() || reader.readImage(buffer.releaseNonNull(), "image/jpeg"_s)) > return; > } > } >@@ -518,11 +518,11 @@ void Pasteboard::addHTMLClipboardTypesForCocoaType(ListHashSet<String>& resultTy > > // UTI may not do these right, so make sure we get the right, predictable result > if (cocoaType == String(legacyStringPasteboardType()) || cocoaType == String(NSPasteboardTypeString)) { >- resultTypes.add(ASCIILiteral("text/plain")); >+ resultTypes.add("text/plain"_s); > return; > } > if (cocoaType == String(legacyURLPasteboardType())) { >- resultTypes.add(ASCIILiteral("text/uri-list")); >+ resultTypes.add("text/uri-list"_s); > return; > } > if (cocoaType == String(legacyFilenamesPasteboardType()) || Pasteboard::shouldTreatCocoaTypeAsFile(cocoaType)) >diff --git a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >index 8de9fbb6befd24b5d5e0e643ab9193ce7b5cb17d..7081e124427ee3d6de491907366087389f994838 100644 >--- a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >+++ b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm >@@ -237,25 +237,25 @@ String keyForKeyEvent(NSEvent *event) > switch ([event keyCode]) { > case kVK_RightCommand: > case kVK_Command: >- return ASCIILiteral("Meta"); >+ return "Meta"_s; > case kVK_Shift: > case kVK_RightShift: >- return ASCIILiteral("Shift"); >+ return "Shift"_s; > case kVK_CapsLock: >- return ASCIILiteral("CapsLock"); >+ return "CapsLock"_s; > case kVK_Option: // Left Alt. > case kVK_RightOption: // Right Alt. >- return ASCIILiteral("Alt"); >+ return "Alt"_s; > case kVK_Control: > case kVK_RightControl: >- return ASCIILiteral("Control"); >+ return "Control"_s; > } > > // If the event is an NSEventTypeFlagsChanged events and we have not returned yet then this means we could not > // identify the modifier key. We return now and report the key as "Unidentified". > // Note that [event characters] below raises an exception if called on an NSEventTypeFlagsChanged event. > if ([event type] == NSEventTypeFlagsChanged) >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > > // If more than one key is being pressed and the key combination includes one or more modifier keys > // that result in the key no longer producing a printable character (e.g., Control + a), then the >@@ -268,7 +268,7 @@ String keyForKeyEvent(NSEvent *event) > // characters / charactersIgnoringModifiers return an empty string for dead keys. > // https://developer.apple.com/reference/appkit/nsevent/1534183-characters > if (!length) >- return ASCIILiteral("Dead"); >+ return "Dead"_s; > // High unicode codepoints are coded with a character sequence in Mac OS X. > if (length > 1) > return s; >@@ -280,153 +280,153 @@ String codeForKeyEvent(NSEvent *event) > { > switch ([event keyCode]) { > // Keys in the alphanumeric section. >- case kVK_ANSI_Grave: return ASCIILiteral("Backquote"); >- case kVK_ANSI_Backslash: return ASCIILiteral("Backslash"); >- case kVK_Delete: return ASCIILiteral("Backspace"); >- case kVK_ANSI_LeftBracket: return ASCIILiteral("BracketLeft"); >- case kVK_ANSI_RightBracket: return ASCIILiteral("BracketRight"); >- case kVK_ANSI_Comma: return ASCIILiteral("Comma"); >- case kVK_ANSI_0: return ASCIILiteral("Digit0"); >- case kVK_ANSI_1: return ASCIILiteral("Digit1"); >- case kVK_ANSI_2: return ASCIILiteral("Digit2"); >- case kVK_ANSI_3: return ASCIILiteral("Digit3"); >- case kVK_ANSI_4: return ASCIILiteral("Digit4"); >- case kVK_ANSI_5: return ASCIILiteral("Digit5"); >- case kVK_ANSI_6: return ASCIILiteral("Digit6"); >- case kVK_ANSI_7: return ASCIILiteral("Digit7"); >- case kVK_ANSI_8: return ASCIILiteral("Digit8"); >- case kVK_ANSI_9: return ASCIILiteral("Digit9"); >- case kVK_ANSI_Equal: return ASCIILiteral("Equal"); >- case kVK_ISO_Section: return ASCIILiteral("IntlBackslash"); >- case kVK_JIS_Underscore: return ASCIILiteral("IntlRo"); >- case kVK_JIS_Yen: return ASCIILiteral("IntlYen"); >- case kVK_ANSI_A: return ASCIILiteral("KeyA"); >- case kVK_ANSI_B: return ASCIILiteral("KeyB"); >- case kVK_ANSI_C: return ASCIILiteral("KeyC"); >- case kVK_ANSI_D: return ASCIILiteral("KeyD"); >- case kVK_ANSI_E: return ASCIILiteral("KeyE"); >- case kVK_ANSI_F: return ASCIILiteral("KeyF"); >- case kVK_ANSI_G: return ASCIILiteral("KeyG"); >- case kVK_ANSI_H: return ASCIILiteral("KeyH"); >- case kVK_ANSI_I: return ASCIILiteral("KeyI"); >- case kVK_ANSI_J: return ASCIILiteral("KeyJ"); >- case kVK_ANSI_K: return ASCIILiteral("KeyK"); >- case kVK_ANSI_L: return ASCIILiteral("KeyL"); >- case kVK_ANSI_M: return ASCIILiteral("KeyM"); >- case kVK_ANSI_N: return ASCIILiteral("KeyN"); >- case kVK_ANSI_O: return ASCIILiteral("KeyO"); >- case kVK_ANSI_P: return ASCIILiteral("KeyP"); >- case kVK_ANSI_Q: return ASCIILiteral("KeyQ"); >- case kVK_ANSI_R: return ASCIILiteral("KeyR"); >- case kVK_ANSI_S: return ASCIILiteral("KeyS"); >- case kVK_ANSI_T: return ASCIILiteral("KeyT"); >- case kVK_ANSI_U: return ASCIILiteral("KeyU"); >- case kVK_ANSI_V: return ASCIILiteral("KeyV"); >- case kVK_ANSI_W: return ASCIILiteral("KeyW"); >- case kVK_ANSI_X: return ASCIILiteral("KeyX"); >- case kVK_ANSI_Y: return ASCIILiteral("KeyY"); >- case kVK_ANSI_Z: return ASCIILiteral("KeyZ"); >- case kVK_ANSI_Minus: return ASCIILiteral("Minus"); >- case kVK_ANSI_Period: return ASCIILiteral("Period"); >- case kVK_ANSI_Quote: return ASCIILiteral("Quote"); >- case kVK_ANSI_Semicolon: return ASCIILiteral("Semicolon"); >- case kVK_ANSI_Slash: return ASCIILiteral("Slash"); >+ case kVK_ANSI_Grave: return "Backquote"_s; >+ case kVK_ANSI_Backslash: return "Backslash"_s; >+ case kVK_Delete: return "Backspace"_s; >+ case kVK_ANSI_LeftBracket: return "BracketLeft"_s; >+ case kVK_ANSI_RightBracket: return "BracketRight"_s; >+ case kVK_ANSI_Comma: return "Comma"_s; >+ case kVK_ANSI_0: return "Digit0"_s; >+ case kVK_ANSI_1: return "Digit1"_s; >+ case kVK_ANSI_2: return "Digit2"_s; >+ case kVK_ANSI_3: return "Digit3"_s; >+ case kVK_ANSI_4: return "Digit4"_s; >+ case kVK_ANSI_5: return "Digit5"_s; >+ case kVK_ANSI_6: return "Digit6"_s; >+ case kVK_ANSI_7: return "Digit7"_s; >+ case kVK_ANSI_8: return "Digit8"_s; >+ case kVK_ANSI_9: return "Digit9"_s; >+ case kVK_ANSI_Equal: return "Equal"_s; >+ case kVK_ISO_Section: return "IntlBackslash"_s; >+ case kVK_JIS_Underscore: return "IntlRo"_s; >+ case kVK_JIS_Yen: return "IntlYen"_s; >+ case kVK_ANSI_A: return "KeyA"_s; >+ case kVK_ANSI_B: return "KeyB"_s; >+ case kVK_ANSI_C: return "KeyC"_s; >+ case kVK_ANSI_D: return "KeyD"_s; >+ case kVK_ANSI_E: return "KeyE"_s; >+ case kVK_ANSI_F: return "KeyF"_s; >+ case kVK_ANSI_G: return "KeyG"_s; >+ case kVK_ANSI_H: return "KeyH"_s; >+ case kVK_ANSI_I: return "KeyI"_s; >+ case kVK_ANSI_J: return "KeyJ"_s; >+ case kVK_ANSI_K: return "KeyK"_s; >+ case kVK_ANSI_L: return "KeyL"_s; >+ case kVK_ANSI_M: return "KeyM"_s; >+ case kVK_ANSI_N: return "KeyN"_s; >+ case kVK_ANSI_O: return "KeyO"_s; >+ case kVK_ANSI_P: return "KeyP"_s; >+ case kVK_ANSI_Q: return "KeyQ"_s; >+ case kVK_ANSI_R: return "KeyR"_s; >+ case kVK_ANSI_S: return "KeyS"_s; >+ case kVK_ANSI_T: return "KeyT"_s; >+ case kVK_ANSI_U: return "KeyU"_s; >+ case kVK_ANSI_V: return "KeyV"_s; >+ case kVK_ANSI_W: return "KeyW"_s; >+ case kVK_ANSI_X: return "KeyX"_s; >+ case kVK_ANSI_Y: return "KeyY"_s; >+ case kVK_ANSI_Z: return "KeyZ"_s; >+ case kVK_ANSI_Minus: return "Minus"_s; >+ case kVK_ANSI_Period: return "Period"_s; >+ case kVK_ANSI_Quote: return "Quote"_s; >+ case kVK_ANSI_Semicolon: return "Semicolon"_s; >+ case kVK_ANSI_Slash: return "Slash"_s; > > // Functional keys in alphanumeric section. >- case kVK_Option: return ASCIILiteral("AltLeft"); >- case kVK_RightOption: return ASCIILiteral("AltRight"); >- case kVK_CapsLock: return ASCIILiteral("CapsLock"); >+ case kVK_Option: return "AltLeft"_s; >+ case kVK_RightOption: return "AltRight"_s; >+ case kVK_CapsLock: return "CapsLock"_s; > // ContextMenu. >- case kVK_Control: return ASCIILiteral("ControlLeft"); >- case kVK_RightControl: return ASCIILiteral("ControlRight"); >- case kVK_Return: return ASCIILiteral("Enter"); // Labeled Return on Apple keyboards. >- case kVK_Command: return ASCIILiteral("MetaLeft"); >- case kVK_RightCommand: return ASCIILiteral("MetaRight"); >- case kVK_Shift: return ASCIILiteral("ShiftLeft"); >- case kVK_RightShift: return ASCIILiteral("ShiftRight"); >- case kVK_Space: return ASCIILiteral("Space"); >- case kVK_Tab: return ASCIILiteral("Tab"); >+ case kVK_Control: return "ControlLeft"_s; >+ case kVK_RightControl: return "ControlRight"_s; >+ case kVK_Return: return "Enter"_s; // Labeled Return on Apple keyboards. >+ case kVK_Command: return "MetaLeft"_s; >+ case kVK_RightCommand: return "MetaRight"_s; >+ case kVK_Shift: return "ShiftLeft"_s; >+ case kVK_RightShift: return "ShiftRight"_s; >+ case kVK_Space: return "Space"_s; >+ case kVK_Tab: return "Tab"_s; > > // Functional keys found on Japanese and Korean keyboards. > // Convert. >- case kVK_JIS_Kana: return ASCIILiteral("KanaMode"); >+ case kVK_JIS_Kana: return "KanaMode"_s; > // Lang1. >- case kVK_JIS_Eisu: return ASCIILiteral("Lang2"); // Japanese (Mac keyboard): eisu. >+ case kVK_JIS_Eisu: return "Lang2"_s; // Japanese (Mac keyboard): eisu. > // Lang3. > // Lang4. > // Lang5. > // NonConvert. > > // Keys in the ControlPad section. >- case kVK_ForwardDelete: return ASCIILiteral("Delete"); >- case kVK_End: return ASCIILiteral("End"); >- case kVK_Help: return ASCIILiteral("Help"); >- case kVK_Home: return ASCIILiteral("Home"); >+ case kVK_ForwardDelete: return "Delete"_s; >+ case kVK_End: return "End"_s; >+ case kVK_Help: return "Help"_s; >+ case kVK_Home: return "Home"_s; > // Insert: Not present on Apple keyboards. >- case kVK_PageDown: return ASCIILiteral("PageDown"); >- case kVK_PageUp: return ASCIILiteral("PageUp"); >+ case kVK_PageDown: return "PageDown"_s; >+ case kVK_PageUp: return "PageUp"_s; > > // Keys in the ArrowPad section. >- case kVK_DownArrow: return ASCIILiteral("ArrowDown"); >- case kVK_LeftArrow: return ASCIILiteral("ArrowLeft"); >- case kVK_RightArrow: return ASCIILiteral("ArrowRight"); >- case kVK_UpArrow: return ASCIILiteral("ArrowUp"); >+ case kVK_DownArrow: return "ArrowDown"_s; >+ case kVK_LeftArrow: return "ArrowLeft"_s; >+ case kVK_RightArrow: return "ArrowRight"_s; >+ case kVK_UpArrow: return "ArrowUp"_s; > > // Keys in the Numpad section. >- case kVK_ANSI_KeypadClear: return ASCIILiteral("NumLock"); // The specification says to use "NumLock" on Mac for the numpad Clear key. >- case kVK_ANSI_Keypad0: return ASCIILiteral("Numpad0"); >- case kVK_ANSI_Keypad1: return ASCIILiteral("Numpad1"); >- case kVK_ANSI_Keypad2: return ASCIILiteral("Numpad2"); >- case kVK_ANSI_Keypad3: return ASCIILiteral("Numpad3"); >- case kVK_ANSI_Keypad4: return ASCIILiteral("Numpad4"); >- case kVK_ANSI_Keypad5: return ASCIILiteral("Numpad5"); >- case kVK_ANSI_Keypad6: return ASCIILiteral("Numpad6"); >- case kVK_ANSI_Keypad7: return ASCIILiteral("Numpad7"); >- case kVK_ANSI_Keypad8: return ASCIILiteral("Numpad8"); >- case kVK_ANSI_Keypad9: return ASCIILiteral("Numpad9"); >- case kVK_ANSI_KeypadPlus: return ASCIILiteral("NumpadAdd"); >+ case kVK_ANSI_KeypadClear: return "NumLock"_s; // The specification says to use "NumLock" on Mac for the numpad Clear key. >+ case kVK_ANSI_Keypad0: return "Numpad0"_s; >+ case kVK_ANSI_Keypad1: return "Numpad1"_s; >+ case kVK_ANSI_Keypad2: return "Numpad2"_s; >+ case kVK_ANSI_Keypad3: return "Numpad3"_s; >+ case kVK_ANSI_Keypad4: return "Numpad4"_s; >+ case kVK_ANSI_Keypad5: return "Numpad5"_s; >+ case kVK_ANSI_Keypad6: return "Numpad6"_s; >+ case kVK_ANSI_Keypad7: return "Numpad7"_s; >+ case kVK_ANSI_Keypad8: return "Numpad8"_s; >+ case kVK_ANSI_Keypad9: return "Numpad9"_s; >+ case kVK_ANSI_KeypadPlus: return "NumpadAdd"_s; > // NumpadBackspace. > // NumpadClear: The specification says that the numpad Clear key should always be encoded as "NumLock" on Mac. > // NumpadClearEntry. >- case kVK_JIS_KeypadComma: return ASCIILiteral("NumpadComma"); >- case kVK_ANSI_KeypadDecimal: return ASCIILiteral("NumpadDecimal"); >- case kVK_ANSI_KeypadDivide: return ASCIILiteral("NumpadDivide"); >- case kVK_ANSI_KeypadEnter: return ASCIILiteral("NumpadEnter"); >- case kVK_ANSI_KeypadEquals: return ASCIILiteral("NumpadEqual"); >+ case kVK_JIS_KeypadComma: return "NumpadComma"_s; >+ case kVK_ANSI_KeypadDecimal: return "NumpadDecimal"_s; >+ case kVK_ANSI_KeypadDivide: return "NumpadDivide"_s; >+ case kVK_ANSI_KeypadEnter: return "NumpadEnter"_s; >+ case kVK_ANSI_KeypadEquals: return "NumpadEqual"_s; > // NumpadHash. > // NumpadMemoryAdd. > // NumpadMemoryClear. > // NumpadMemoryRecall. > // NumpadMemoryStore. > // NumpadMemorySubtract. >- case kVK_ANSI_KeypadMultiply: return ASCIILiteral("NumpadMultiply"); >+ case kVK_ANSI_KeypadMultiply: return "NumpadMultiply"_s; > // NumpadParenLeft. > // NumpadParenRight. > // NumpadStar: The specification says to use "NumpadMultiply" for the * key on numeric keypads. >- case kVK_ANSI_KeypadMinus: return ASCIILiteral("NumpadSubtract"); >+ case kVK_ANSI_KeypadMinus: return "NumpadSubtract"_s; > > // Keys in the Function section. >- case kVK_Escape: return ASCIILiteral("Escape"); >- case kVK_F1: return ASCIILiteral("F1"); >- case kVK_F2: return ASCIILiteral("F2"); >- case kVK_F3: return ASCIILiteral("F3"); >- case kVK_F4: return ASCIILiteral("F4"); >- case kVK_F5: return ASCIILiteral("F5"); >- case kVK_F6: return ASCIILiteral("F6"); >- case kVK_F7: return ASCIILiteral("F7"); >- case kVK_F8: return ASCIILiteral("F8"); >- case kVK_F9: return ASCIILiteral("F9"); >- case kVK_F10: return ASCIILiteral("F10"); >- case kVK_F11: return ASCIILiteral("F11"); >- case kVK_F12: return ASCIILiteral("F12"); >- case kVK_F13: return ASCIILiteral("F13"); >- case kVK_F14: return ASCIILiteral("F14"); >- case kVK_F15: return ASCIILiteral("F15"); >- case kVK_F16: return ASCIILiteral("F16"); >- case kVK_F17: return ASCIILiteral("F17"); >- case kVK_F18: return ASCIILiteral("F18"); >- case kVK_F19: return ASCIILiteral("F19"); >- case kVK_F20: return ASCIILiteral("F20"); >+ case kVK_Escape: return "Escape"_s; >+ case kVK_F1: return "F1"_s; >+ case kVK_F2: return "F2"_s; >+ case kVK_F3: return "F3"_s; >+ case kVK_F4: return "F4"_s; >+ case kVK_F5: return "F5"_s; >+ case kVK_F6: return "F6"_s; >+ case kVK_F7: return "F7"_s; >+ case kVK_F8: return "F8"_s; >+ case kVK_F9: return "F9"_s; >+ case kVK_F10: return "F10"_s; >+ case kVK_F11: return "F11"_s; >+ case kVK_F12: return "F12"_s; >+ case kVK_F13: return "F13"_s; >+ case kVK_F14: return "F14"_s; >+ case kVK_F15: return "F15"_s; >+ case kVK_F16: return "F16"_s; >+ case kVK_F17: return "F17"_s; >+ case kVK_F18: return "F18"_s; >+ case kVK_F19: return "F19"_s; >+ case kVK_F20: return "F20"_s; > // Fn: This is typically a hardware key that does not generate a separate code. > // FnLock. > // PrintScreen. >@@ -452,9 +452,9 @@ String codeForKeyEvent(NSEvent *event) > // MediaTrackPrevious. > // Power. > // Sleep. >- case kVK_VolumeDown: return ASCIILiteral("AudioVolumeDown"); >- case kVK_Mute: return ASCIILiteral("AudioVolumeMute"); >- case kVK_VolumeUp: return ASCIILiteral("AudioVolumeUp"); >+ case kVK_VolumeDown: return "AudioVolumeDown"_s; >+ case kVK_Mute: return "AudioVolumeMute"_s; >+ case kVK_VolumeUp: return "AudioVolumeUp"_s; > // WakeUp. > > // Legacy modifier keys. >@@ -483,7 +483,7 @@ String codeForKeyEvent(NSEvent *event) > // Katakana. > > default: >- return ASCIILiteral("Unidentified"); >+ return "Unidentified"_s; > } > } > >diff --git a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm >index 2f0e5243cd7a3445d4dad2a11e61a98b34cdfce4..9cd52a05a7cde8cf31257f24d3fe93f0ab91f228 100644 >--- a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm >+++ b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm >@@ -119,14 +119,14 @@ String PlatformPasteboard::stringForType(const String& pasteboardType) const > static const char* safeTypeForDOMToReadAndWriteForPlatformType(const String& platformType) > { > if (platformType == String(legacyStringPasteboardType()) || platformType == String(NSPasteboardTypeString)) >- return ASCIILiteral("text/plain"); >+ return "text/plain"_s; > > if (platformType == String(legacyURLPasteboardType())) >- return ASCIILiteral("text/uri-list"); >+ return "text/uri-list"_s; > > if (platformType == String(legacyHTMLPasteboardType()) || platformType == String(WebArchivePboardType) > || platformType == String(legacyRTFDPasteboardType()) || platformType == String(legacyRTFPasteboardType())) >- return ASCIILiteral("text/html"); >+ return "text/html"_s; > > return nullptr; > } >diff --git a/Source/WebCore/platform/mediastream/MediaConstraints.cpp b/Source/WebCore/platform/mediastream/MediaConstraints.cpp >index c90fbb04c5e3ea0869f89718c25646424b1cba3a..545a2f81e26aa876c7c39ac264813bc35a0abc8a 100644 >--- a/Source/WebCore/platform/mediastream/MediaConstraints.cpp >+++ b/Source/WebCore/platform/mediastream/MediaConstraints.cpp >@@ -370,7 +370,7 @@ static inline void addDefaultVideoConstraints(MediaTrackConstraintSetMap& videoC > } > if (addFacingModeConstraint) { > StringConstraint facingModeConstraint({ }, MediaConstraintType::FacingMode); >- facingModeConstraint.setIdeal(ASCIILiteral("user")); >+ facingModeConstraint.setIdeal("user"_s); > videoConstraints.set(MediaConstraintType::FacingMode, WTFMove(facingModeConstraint)); > } > } >diff --git a/Source/WebCore/platform/mediastream/PeerMediaDescription.h b/Source/WebCore/platform/mediastream/PeerMediaDescription.h >index 157dc8a291f4af18850fece5a3619b6ad353148e..2eb5222db7dabe159c066cb4a4654c6c60a74f34 100644 >--- a/Source/WebCore/platform/mediastream/PeerMediaDescription.h >+++ b/Source/WebCore/platform/mediastream/PeerMediaDescription.h >@@ -47,8 +47,8 @@ struct PeerMediaDescription { > > String type; > unsigned short port { 9 }; >- String address { "0.0.0.0" }; >- String mode { ASCIILiteral { "sendrecv" } }; >+ String address { "0.0.0.0"_s }; >+ String mode { "sendrecv"_s }; > String mid; > > Vector<MediaPayload> payloads; >@@ -60,7 +60,7 @@ struct PeerMediaDescription { > String mediaStreamId; > String mediaStreamTrackId; > >- String dtlsSetup { "actpass" }; >+ String dtlsSetup { "actpass"_s }; > String dtlsFingerprintHashFunction; > String dtlsFingerprint; > >diff --git a/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp b/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp >index 7ba40fcd7a1372d6287bc384bf71a3bee24da72c..4acb629c3e0f95c4a1e839b63386d5ed7981ea45 100644 >--- a/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp >+++ b/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp >@@ -799,7 +799,7 @@ std::optional<std::pair<String, String>> RealtimeMediaSource::applyConstraints(c > FlattenedConstraint candidates; > String failedConstraint; > if (!selectSettings(constraints, candidates, failedConstraint, SelectType::ForApplyConstraints)) >- return { { failedConstraint, ASCIILiteral("Constraint not supported") } }; >+ return { { failedConstraint, "Constraint not supported"_s } }; > > applyConstraints(candidates); > return std::nullopt; >diff --git a/Source/WebCore/platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp b/Source/WebCore/platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp >index ceb2a8b5dffb6bc4820a4a534f63433cd3590ba0..ab5fb04e179da2e5b1101c85d8e6edf94dbc7189 100644 >--- a/Source/WebCore/platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp >+++ b/Source/WebCore/platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp >@@ -142,7 +142,7 @@ std::optional<CaptureDevice> DisplayCaptureManagerCocoa::screenCaptureDeviceWith > if (!actualDisplayID) > return std::nullopt; > >- auto device = CaptureDevice(String::number(actualDisplayID.value()), CaptureDevice::DeviceType::Screen, ASCIILiteral("ScreenCaptureDevice")); >+ auto device = CaptureDevice(String::number(actualDisplayID.value()), CaptureDevice::DeviceType::Screen, "ScreenCaptureDevice"_s); > device.setEnabled(true); > > return device; >diff --git a/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp b/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp >index e2e8f239d4def3339dc8856420fa3934a0d27553..4644f082d5e684883a851ac1815ce7de7fe2faff 100644 >--- a/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp >+++ b/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp >@@ -45,9 +45,9 @@ > namespace WebCore { > > struct MockDeviceInfo { >- const char* id; >+ ASCIILiteral id { ASCIILiteral::null() }; > CaptureDevice::DeviceType type; >- const char* name; >+ ASCIILiteral name { ASCIILiteral::null() }; > MockRealtimeMediaSource::MockDevice device; > }; > >@@ -55,19 +55,19 @@ static const HashMap<String, MockDeviceInfo>& deviceMap() > { > static const auto infoMap = makeNeverDestroyed([] { > static const MockDeviceInfo devices[] = { >- { "239c24b0-2b15-11e3-8224-0800200c9a66", CaptureDevice::DeviceType::Microphone, "Mock audio device 1", MockRealtimeMediaSource::MockDevice::Microphone1 }, >- { "239c24b1-2b15-11e3-8224-0800200c9a66", CaptureDevice::DeviceType::Microphone, "Mock audio device 2", MockRealtimeMediaSource::MockDevice::Microphone2 }, >+ { "239c24b0-2b15-11e3-8224-0800200c9a66"_s, CaptureDevice::DeviceType::Microphone, "Mock audio device 1"_s, MockRealtimeMediaSource::MockDevice::Microphone1 }, >+ { "239c24b1-2b15-11e3-8224-0800200c9a66"_s, CaptureDevice::DeviceType::Microphone, "Mock audio device 2"_s, MockRealtimeMediaSource::MockDevice::Microphone2 }, > >- { "239c24b2-2b15-11e3-8224-0800200c9a66", CaptureDevice::DeviceType::Camera, "Mock video device 1", MockRealtimeMediaSource::MockDevice::Camera1 }, >- { "239c24b3-2b15-11e3-8224-0800200c9a66", CaptureDevice::DeviceType::Camera, "Mock video device 2", MockRealtimeMediaSource::MockDevice::Camera2 }, >+ { "239c24b2-2b15-11e3-8224-0800200c9a66"_s, CaptureDevice::DeviceType::Camera, "Mock video device 1"_s, MockRealtimeMediaSource::MockDevice::Camera1 }, >+ { "239c24b3-2b15-11e3-8224-0800200c9a66"_s, CaptureDevice::DeviceType::Camera, "Mock video device 2"_s, MockRealtimeMediaSource::MockDevice::Camera2 }, > >- { "SCREEN-1", CaptureDevice::DeviceType::Screen, "Mock screen device 1", MockRealtimeMediaSource::MockDevice::Screen1 }, >- { "SCREEN-2", CaptureDevice::DeviceType::Screen, "Mock screen device 2", MockRealtimeMediaSource::MockDevice::Screen2 }, >+ { "SCREEN-1"_s, CaptureDevice::DeviceType::Screen, "Mock screen device 1"_s, MockRealtimeMediaSource::MockDevice::Screen1 }, >+ { "SCREEN-2"_s, CaptureDevice::DeviceType::Screen, "Mock screen device 2"_s, MockRealtimeMediaSource::MockDevice::Screen2 }, > }; > > HashMap<String, MockDeviceInfo> map; > for (auto& info : devices) >- map.add(ASCIILiteral(info.id), info); >+ map.add(info.id, info); > return map; > }()); > >@@ -94,11 +94,11 @@ Vector<CaptureDevice>& MockRealtimeMediaSource::audioDevices() > static auto info = makeNeverDestroyed([] { > Vector<CaptureDevice> vector; > >- auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Microphone, ASCIILiteral("239c24b0-2b15-11e3-8224-0800200c9a66")); >+ auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Microphone, "239c24b0-2b15-11e3-8224-0800200c9a66"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >- captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Microphone, ASCIILiteral("239c24b1-2b15-11e3-8224-0800200c9a66")); >+ captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Microphone, "239c24b1-2b15-11e3-8224-0800200c9a66"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >@@ -112,11 +112,11 @@ Vector<CaptureDevice>& MockRealtimeMediaSource::videoDevices() > static auto info = makeNeverDestroyed([] { > Vector<CaptureDevice> vector; > >- auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Camera, ASCIILiteral("239c24b2-2b15-11e3-8224-0800200c9a66")); >+ auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Camera, "239c24b2-2b15-11e3-8224-0800200c9a66"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >- captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Camera, ASCIILiteral("239c24b3-2b15-11e3-8224-0800200c9a66")); >+ captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Camera, "239c24b3-2b15-11e3-8224-0800200c9a66"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >@@ -130,11 +130,11 @@ Vector<CaptureDevice>& MockRealtimeMediaSource::displayDevices() > static auto devices = makeNeverDestroyed([] { > Vector<CaptureDevice> vector; > >- auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Screen, ASCIILiteral("SCREEN-1")); >+ auto captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Screen, "SCREEN-1"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >- captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Screen, ASCIILiteral("SCREEN-2")); >+ captureDevice = captureDeviceWithPersistentID(CaptureDevice::DeviceType::Screen, "SCREEN-2"_s); > ASSERT(captureDevice); > vector.append(WTFMove(captureDevice.value())); > >diff --git a/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp b/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >index ededa83a0e3c5772bd70c8b74dd98e4e062dc28a..03a7c3ec2f10396075e1177bb0545db7c5d83687 100644 >--- a/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >+++ b/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp >@@ -399,11 +399,11 @@ void MockRealtimeVideoSource::drawText(GraphicsContext& context) > unsigned frameMod = m_frameNumber % 60; > if (frameMod <= 15) { > context.setFillColor(Color::cyan); >- String bip(ASCIILiteral("Bip")); >+ String bip("Bip"_s); > context.drawText(bipBopFont, TextRun(StringView(bip)), bipBopLocation); > } else if (frameMod > 30 && frameMod <= 45) { > context.setFillColor(Color::yellow); >- String bop(ASCIILiteral("Bop")); >+ String bop("Bop"_s); > context.drawText(bipBopFont, TextRun(StringView(bop)), bipBopLocation); > } > } >diff --git a/Source/WebCore/platform/network/BlobRegistryImpl.cpp b/Source/WebCore/platform/network/BlobRegistryImpl.cpp >index 7f79fd184a08ac99e2160e0bc8f3f6a43fdaa42d..17562a27046da1f27a55a2c9b027c74d3bf2cb28 100644 >--- a/Source/WebCore/platform/network/BlobRegistryImpl.cpp >+++ b/Source/WebCore/platform/network/BlobRegistryImpl.cpp >@@ -312,7 +312,7 @@ void BlobRegistryImpl::writeBlobsToTemporaryFiles(const Vector<String>& blobURLs > Vector<String> filePaths; > for (auto& blob : blobsForWriting) { > FileSystem::PlatformFileHandle file; >- String tempFilePath = FileSystem::openTemporaryFile(ASCIILiteral("Blob"), file); >+ String tempFilePath = FileSystem::openTemporaryFile("Blob"_s, file); > if (!writeFilePathsOrDataBuffersToFile(blob.filePathsOrDataBuffers, file, tempFilePath)) { > filePaths.clear(); > break; >diff --git a/Source/WebCore/platform/network/DataURLDecoder.cpp b/Source/WebCore/platform/network/DataURLDecoder.cpp >index 88664235ac539ea487cb4c467d086e6a0ca2582f..60749ac35a84cd9de0e5c4d812677f2ef5ad597f 100644 >--- a/Source/WebCore/platform/network/DataURLDecoder.cpp >+++ b/Source/WebCore/platform/network/DataURLDecoder.cpp >@@ -121,9 +121,9 @@ static Result parseMediaType(const String& mediaType) > // If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII. As a shorthand, > // "text/plain" can be omitted but the charset parameter supplied. > if (mimeType.isEmpty()) { >- mimeType = ASCIILiteral("text/plain"); >+ mimeType = "text/plain"_s; > if (charset.isEmpty()) >- charset = ASCIILiteral("US-ASCII"); >+ charset = "US-ASCII"_s; > } > return { mimeType, charset, !mediaType.isEmpty() ? mediaType : "text/plain;charset=US-ASCII", nullptr }; > } >diff --git a/Source/WebCore/platform/network/FormData.cpp b/Source/WebCore/platform/network/FormData.cpp >index 174b8b72699c0efa3bc776d3328b50666b6ca339..bbc4cb1cfab7333d60f402afeecb85cdcdac3dd1 100644 >--- a/Source/WebCore/platform/network/FormData.cpp >+++ b/Source/WebCore/platform/network/FormData.cpp >@@ -213,7 +213,7 @@ void FormData::appendMultiPartFileValue(const File& file, Vector<char>& header, > // Add the content type if available, or "application/octet-stream" otherwise (RFC 1867). > auto contentType = file.type(); > if (contentType.isEmpty()) >- contentType = ASCIILiteral("application/octet-stream"); >+ contentType = "application/octet-stream"_s; > ASSERT(Blob::isNormalizedContentType(contentType)); > > FormDataBuilder::addContentTypeToMultiPartHeader(header, contentType.ascii()); >diff --git a/Source/WebCore/platform/network/HTTPParsers.cpp b/Source/WebCore/platform/network/HTTPParsers.cpp >index e8337d1629eba797801b0b3523baf30891b78301..ea955ca2ebc40473a4384ea9362b516a9b7591ae 100644 >--- a/Source/WebCore/platform/network/HTTPParsers.cpp >+++ b/Source/WebCore/platform/network/HTTPParsers.cpp >@@ -614,20 +614,20 @@ size_t parseHTTPRequestLine(const char* data, size_t length, String& failureReas > > // Haven't finished header line. > if (consumedLength == length) { >- failureReason = ASCIILiteral("Incomplete Request Line"); >+ failureReason = "Incomplete Request Line"_s; > return 0; > } > > // RequestLine does not contain 3 parts. > if (!space1 || !space2) { >- failureReason = ASCIILiteral("Request Line does not appear to contain: <Method> <Url> <HTTPVersion>."); >+ failureReason = "Request Line does not appear to contain: <Method> <Url> <HTTPVersion>."_s; > return 0; > } > > // The line must end with "\r\n". > const char* end = p + 1; > if (*(end - 2) != '\r') { >- failureReason = ASCIILiteral("Request line does not end with CRLF"); >+ failureReason = "Request line does not end with CRLF"_s; > return 0; > } > >@@ -761,7 +761,7 @@ size_t parseHTTPHeader(const char* start, size_t length, String& failureReason, > } > valueStr = String::fromUTF8(value.data(), value.size()); > if (valueStr.isNull()) { >- failureReason = ASCIILiteral("Invalid UTF-8 sequence in header value"); >+ failureReason = "Invalid UTF-8 sequence in header value"_s; > return 0; > } > return p - start; >@@ -892,13 +892,13 @@ bool isCrossOriginSafeRequestHeader(HTTPHeaderName name, const String& value) > // Implements <https://fetch.spec.whatwg.org/#concept-method-normalize>. > String normalizeHTTPMethod(const String& method) > { >- const char* const methods[] = { "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT" }; >- for (auto* value : methods) { >- if (equalIgnoringASCIICase(method, value)) { >+ const ASCIILiteral methods[] = { "DELETE"_s, "GET"_s, "HEAD"_s, "OPTIONS"_s, "POST"_s, "PUT"_s }; >+ for (auto value : methods) { >+ if (equalIgnoringASCIICase(method, value.characters())) { > // Don't bother allocating a new string if it's already all uppercase. > if (method == value) > break; >- return ASCIILiteral { value }; >+ return value; > } > } > return method; >diff --git a/Source/WebCore/platform/network/ResourceRequestBase.cpp b/Source/WebCore/platform/network/ResourceRequestBase.cpp >index 49bd82e05a4498881e41c3241d5d6d2c7d37cb80..f81e79bced82f849d1ee8156c2cb213d151f6138 100644 >--- a/Source/WebCore/platform/network/ResourceRequestBase.cpp >+++ b/Source/WebCore/platform/network/ResourceRequestBase.cpp >@@ -141,7 +141,7 @@ ResourceRequest ResourceRequestBase::redirectedRequest(const ResourceResponse& r > request.setURL(location.isEmpty() ? URL { } : URL { redirectResponse.url(), location }); > > if (shouldUseGet(*this, redirectResponse)) { >- request.setHTTPMethod(ASCIILiteral("GET")); >+ request.setHTTPMethod("GET"_s); > request.setHTTPBody(nullptr); > request.clearHTTPContentType(); > request.m_httpHeaderFields.remove(HTTPHeaderName::ContentLength); >diff --git a/Source/WebCore/platform/network/ResourceRequestBase.h b/Source/WebCore/platform/network/ResourceRequestBase.h >index c7cb729ea2e1d734f34a3995594216f6401618b7..889332adc6e3aa260ad051b799a0539ea0907527 100644 >--- a/Source/WebCore/platform/network/ResourceRequestBase.h >+++ b/Source/WebCore/platform/network/ResourceRequestBase.h >@@ -202,7 +202,7 @@ class ResourceRequestBase { > ResourceRequestBase(const URL& url, ResourceRequestCachePolicy policy) > : m_url(url) > , m_timeoutInterval(s_defaultTimeoutInterval) >- , m_httpMethod(ASCIILiteral("GET")) >+ , m_httpMethod("GET"_s) > , m_cachePolicy(policy) > , m_allowCookies(true) > , m_resourceRequestUpdated(true) >diff --git a/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp b/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp >index cc4d3cc1d02abb388a1bb103cecd5929a3471d5d..7cde2476340a49e815bd1d5693fe27640e3bf5ce 100644 >--- a/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp >+++ b/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp >@@ -535,13 +535,13 @@ void ResourceHandle::handleDataURL() > mediaType = mediaType.left(mediaType.length() - 7); > > if (mediaType.isEmpty()) >- mediaType = ASCIILiteral("text/plain"); >+ mediaType = "text/plain"_s; > > String mimeType = extractMIMETypeFromMediaType(mediaType); > String charset = extractCharsetFromMediaType(mediaType); > > if (charset.isEmpty()) >- charset = ASCIILiteral("US-ASCII"); >+ charset = "US-ASCII"_s; > > ResourceResponse response; > response.setMimeType(mimeType); >diff --git a/Source/WebCore/platform/network/curl/SynchronousLoaderClientCurl.cpp b/Source/WebCore/platform/network/curl/SynchronousLoaderClientCurl.cpp >index d20eab1fa3cb7ae7d59f1ead389e003b5a2d0791..3b3930771e4de1c77dec5d5c983ac7838f59f8c5 100644 >--- a/Source/WebCore/platform/network/curl/SynchronousLoaderClientCurl.cpp >+++ b/Source/WebCore/platform/network/curl/SynchronousLoaderClientCurl.cpp >@@ -46,7 +46,7 @@ ResourceError SynchronousLoaderClient::platformBadResponseError() > URL failingURL; > String localizedDescription("Bad Server Response"); > >- return ResourceError(ASCIILiteral("CURL"), errorCode, failingURL, localizedDescription); >+ return ResourceError("CURL"_s, errorCode, failingURL, localizedDescription); > } > > } >diff --git a/Source/WebCore/platform/network/win/DownloadBundleWin.cpp b/Source/WebCore/platform/network/win/DownloadBundleWin.cpp >index 3d6b11a1f9bc4d9fe80e208396052924cffddc19..38fd60b920b618479de168ebb7f4e296daee8598 100644 >--- a/Source/WebCore/platform/network/win/DownloadBundleWin.cpp >+++ b/Source/WebCore/platform/network/win/DownloadBundleWin.cpp >@@ -44,7 +44,7 @@ static uint32_t magicNumber() > > const String& fileExtension() > { >- static const NeverDestroyed<String> extension { ASCIILiteral { ".download" } }; >+ static const NeverDestroyed<String> extension { ".download"_s }; > return extension; > } > >diff --git a/Source/WebCore/platform/sql/SQLiteDatabase.cpp b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >index 2095ee8118aa120263757a233cd966479af598d2..a16050acea5ee746f3ea1cafc8df385b3e3ff51a 100644 >--- a/Source/WebCore/platform/sql/SQLiteDatabase.cpp >+++ b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >@@ -109,10 +109,10 @@ bool SQLiteDatabase::open(const String& filename, bool forWebSQLDatabase) > else > m_openErrorMessage = "sqlite_open returned null"; > >- if (!SQLiteStatement(*this, ASCIILiteral("PRAGMA temp_store = MEMORY;")).executeCommand()) >+ if (!SQLiteStatement(*this, "PRAGMA temp_store = MEMORY;"_s).executeCommand()) > LOG_ERROR("SQLite database could not set temp_store to memory"); > >- SQLiteStatement walStatement(*this, ASCIILiteral("PRAGMA journal_mode=WAL;")); >+ SQLiteStatement walStatement(*this, "PRAGMA journal_mode=WAL;"_s); > if (walStatement.prepareAndStep() == SQLITE_ROW) { > #ifndef NDEBUG > String mode = walStatement.getColumnText(0); >@@ -162,9 +162,9 @@ void SQLiteDatabase::overrideUnauthorizedFunctions() > void SQLiteDatabase::setFullsync(bool fsync) > { > if (fsync) >- executeCommand(ASCIILiteral("PRAGMA fullfsync = 1;")); >+ executeCommand("PRAGMA fullfsync = 1;"_s); > else >- executeCommand(ASCIILiteral("PRAGMA fullfsync = 0;")); >+ executeCommand("PRAGMA fullfsync = 0;"_s); > } > > int64_t SQLiteDatabase::maximumSize() >@@ -174,7 +174,7 @@ int64_t SQLiteDatabase::maximumSize() > { > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); >- SQLiteStatement statement(*this, ASCIILiteral("PRAGMA max_page_count")); >+ SQLiteStatement statement(*this, "PRAGMA max_page_count"_s); > maxPageCount = statement.getColumnInt64(0); > enableAuthorizer(true); > } >@@ -212,7 +212,7 @@ int SQLiteDatabase::pageSize() > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); > >- SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_size")); >+ SQLiteStatement statement(*this, "PRAGMA page_size"_s); > m_pageSize = statement.getColumnInt(0); > > enableAuthorizer(true); >@@ -229,7 +229,7 @@ int64_t SQLiteDatabase::freeSpaceSize() > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); > // Note: freelist_count was added in SQLite 3.4.1. >- SQLiteStatement statement(*this, ASCIILiteral("PRAGMA freelist_count")); >+ SQLiteStatement statement(*this, "PRAGMA freelist_count"_s); > freelistCount = statement.getColumnInt64(0); > enableAuthorizer(true); > } >@@ -244,7 +244,7 @@ int64_t SQLiteDatabase::totalSize() > { > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); >- SQLiteStatement statement(*this, ASCIILiteral("PRAGMA page_count")); >+ SQLiteStatement statement(*this, "PRAGMA page_count"_s); > pageCount = statement.getColumnInt64(0); > enableAuthorizer(true); > } >@@ -297,7 +297,7 @@ bool SQLiteDatabase::tableExists(const String& tablename) > > void SQLiteDatabase::clearAllTables() > { >- String query = ASCIILiteral("SELECT name FROM sqlite_master WHERE type='table';"); >+ String query = "SELECT name FROM sqlite_master WHERE type='table';"_s; > Vector<String> tables; > if (!SQLiteStatement(*this, query).returnTextResults(0, tables)) { > LOG(SQLDatabase, "Unable to retrieve list of tables from database"); >@@ -314,7 +314,7 @@ void SQLiteDatabase::clearAllTables() > > int SQLiteDatabase::runVacuumCommand() > { >- if (!executeCommand(ASCIILiteral("VACUUM;"))) >+ if (!executeCommand("VACUUM;"_s)) > LOG(SQLDatabase, "Unable to vacuum database - %s", lastErrorMsg()); > return lastError(); > } >@@ -324,7 +324,7 @@ int SQLiteDatabase::runIncrementalVacuumCommand() > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); > >- if (!executeCommand(ASCIILiteral("PRAGMA incremental_vacuum"))) >+ if (!executeCommand("PRAGMA incremental_vacuum"_s)) > LOG(SQLDatabase, "Unable to run incremental vacuum - %s", lastErrorMsg()); > > enableAuthorizer(true); >@@ -485,7 +485,7 @@ bool SQLiteDatabase::isAutoCommitOn() const > > bool SQLiteDatabase::turnOnIncrementalAutoVacuum() > { >- SQLiteStatement statement(*this, ASCIILiteral("PRAGMA auto_vacuum")); >+ SQLiteStatement statement(*this, "PRAGMA auto_vacuum"_s); > int autoVacuumMode = statement.getColumnInt(0); > int error = lastError(); > >@@ -502,10 +502,10 @@ bool SQLiteDatabase::turnOnIncrementalAutoVacuum() > case AutoVacuumIncremental: > return true; > case AutoVacuumFull: >- return executeCommand(ASCIILiteral("PRAGMA auto_vacuum = 2")); >+ return executeCommand("PRAGMA auto_vacuum = 2"_s); > case AutoVacuumNone: > default: >- if (!executeCommand(ASCIILiteral("PRAGMA auto_vacuum = 2"))) >+ if (!executeCommand("PRAGMA auto_vacuum = 2"_s)) > return false; > runVacuumCommand(); > error = lastError(); >diff --git a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp >index 6b2af54524313d8661c49058348faf2c1c020e35..a6e7fb4857da5d3aa6a866a7fd6b679697a0b3e8 100644 >--- a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp >+++ b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp >@@ -83,8 +83,8 @@ bool SQLiteFileSystem::deleteEmptyDatabaseDirectory(const String& path) > > bool SQLiteFileSystem::deleteDatabaseFile(const String& fileName) > { >- String walFileName = makeString(fileName, ASCIILiteral("-wal")); >- String shmFileName = makeString(fileName, ASCIILiteral("-shm")); >+ String walFileName = makeString(fileName, "-wal"_s); >+ String shmFileName = makeString(fileName, "-shm"_s); > > // Try to delete all three files whether or not they are there. > FileSystem::deleteFile(fileName); >diff --git a/Source/WebCore/platform/text/LocaleICU.cpp b/Source/WebCore/platform/text/LocaleICU.cpp >index dee15a1e4eb23d6f80f69335b814aabb05d7bcf4..c59e9f0fa5dc59b431d8781d68014ea7a570db98 100644 >--- a/Source/WebCore/platform/text/LocaleICU.cpp >+++ b/Source/WebCore/platform/text/LocaleICU.cpp >@@ -251,14 +251,14 @@ String LocaleICU::dateFormat() > if (!m_dateFormat.isNull()) > return m_dateFormat; > if (!initializeShortDateFormat()) >- return ASCIILiteral("yyyy-MM-dd"); >+ return "yyyy-MM-dd"_s; > m_dateFormat = getDateFormatPattern(m_shortDateFormat); > return m_dateFormat; > } > > static String getFormatForSkeleton(const char* locale, const UChar* skeleton, int32_t skeletonLength) > { >- String format = ASCIILiteral("yyyy-MM"); >+ String format = "yyyy-MM"_s; > UErrorCode status = U_ZERO_ERROR; > UDateTimePatternGenerator* patternGenerator = udatpg_open(locale, &status); > if (!patternGenerator) >diff --git a/Source/WebCore/platform/text/LocaleNone.cpp b/Source/WebCore/platform/text/LocaleNone.cpp >index 2da86bf4fc29b8a924b4732e796d44d8b7d46a0d..7693ed9af242a17acd84b8472f79a1a487f9a6b1 100644 >--- a/Source/WebCore/platform/text/LocaleNone.cpp >+++ b/Source/WebCore/platform/text/LocaleNone.cpp >@@ -79,37 +79,37 @@ const Vector<String>& LocaleNone::monthLabels() > > String LocaleNone::dateFormat() > { >- return ASCIILiteral("yyyy-MM-dd"); >+ return "yyyy-MM-dd"_s; > } > > String LocaleNone::monthFormat() > { >- return ASCIILiteral("yyyy-MM"); >+ return "yyyy-MM"_s; > } > > String LocaleNone::shortMonthFormat() > { >- return ASCIILiteral("yyyy-MM"); >+ return "yyyy-MM"_s; > } > > String LocaleNone::timeFormat() > { >- return ASCIILiteral("HH:mm:ss"); >+ return "HH:mm:ss"_s; > } > > String LocaleNone::shortTimeFormat() > { >- return ASCIILiteral("HH:mm"); >+ return "HH:mm"_s; > } > > String LocaleNone::dateTimeFormatWithSeconds() > { >- return ASCIILiteral("yyyy-MM-dd'T'HH:mm:ss"); >+ return "yyyy-MM-dd'T'HH:mm:ss"_s; > } > > String LocaleNone::dateTimeFormatWithoutSeconds() > { >- return ASCIILiteral("yyyy-MM-dd'T'HH:mm"); >+ return "yyyy-MM-dd'T'HH:mm"_s; > } > > const Vector<String>& LocaleNone::shortMonthLabels() >diff --git a/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp b/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp >index c706955957c7095bd8ab0c582f01c24f08a005c8..49e0eaa7beb9b3357c170bb0e120461296d1a34d 100644 >--- a/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp >+++ b/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp >@@ -38,7 +38,7 @@ > namespace WebCore { > > struct ScriptNameCode { >- const char* name; >+ ASCIILiteral name; > UScriptCode code; > }; > >@@ -47,112 +47,112 @@ struct ScriptNameCode { > // USCRIPT_KATAKANA_OR_HIRAGANA instead of USCRIPT_HIRAGANA, since we want all Japanese scripts to be rendered > // using the same font setting. > static const ScriptNameCode scriptNameCodeList[] = { >- { "zyyy", USCRIPT_COMMON }, >- { "qaai", USCRIPT_INHERITED }, >- { "arab", USCRIPT_ARABIC }, >- { "armn", USCRIPT_ARMENIAN }, >- { "beng", USCRIPT_BENGALI }, >- { "bopo", USCRIPT_BOPOMOFO }, >- { "cher", USCRIPT_CHEROKEE }, >- { "copt", USCRIPT_COPTIC }, >- { "cyrl", USCRIPT_CYRILLIC }, >- { "dsrt", USCRIPT_DESERET }, >- { "deva", USCRIPT_DEVANAGARI }, >- { "ethi", USCRIPT_ETHIOPIC }, >- { "geor", USCRIPT_GEORGIAN }, >- { "goth", USCRIPT_GOTHIC }, >- { "grek", USCRIPT_GREEK }, >- { "gujr", USCRIPT_GUJARATI }, >- { "guru", USCRIPT_GURMUKHI }, >- { "hani", USCRIPT_HAN }, >- { "hang", USCRIPT_HANGUL }, >- { "hebr", USCRIPT_HEBREW }, >- { "hira", USCRIPT_KATAKANA_OR_HIRAGANA }, >- { "knda", USCRIPT_KANNADA }, >- { "kana", USCRIPT_KATAKANA_OR_HIRAGANA }, >- { "khmr", USCRIPT_KHMER }, >- { "laoo", USCRIPT_LAO }, >- { "latn", USCRIPT_LATIN }, >- { "mlym", USCRIPT_MALAYALAM }, >- { "mong", USCRIPT_MONGOLIAN }, >- { "mymr", USCRIPT_MYANMAR }, >- { "ogam", USCRIPT_OGHAM }, >- { "ital", USCRIPT_OLD_ITALIC }, >- { "orya", USCRIPT_ORIYA }, >- { "runr", USCRIPT_RUNIC }, >- { "sinh", USCRIPT_SINHALA }, >- { "syrc", USCRIPT_SYRIAC }, >- { "taml", USCRIPT_TAMIL }, >- { "telu", USCRIPT_TELUGU }, >- { "thaa", USCRIPT_THAANA }, >- { "thai", USCRIPT_THAI }, >- { "tibt", USCRIPT_TIBETAN }, >- { "cans", USCRIPT_CANADIAN_ABORIGINAL }, >- { "yiii", USCRIPT_YI }, >- { "tglg", USCRIPT_TAGALOG }, >- { "hano", USCRIPT_HANUNOO }, >- { "buhd", USCRIPT_BUHID }, >- { "tagb", USCRIPT_TAGBANWA }, >- { "brai", USCRIPT_BRAILLE }, >- { "cprt", USCRIPT_CYPRIOT }, >- { "limb", USCRIPT_LIMBU }, >- { "linb", USCRIPT_LINEAR_B }, >- { "osma", USCRIPT_OSMANYA }, >- { "shaw", USCRIPT_SHAVIAN }, >- { "tale", USCRIPT_TAI_LE }, >- { "ugar", USCRIPT_UGARITIC }, >- { "hrkt", USCRIPT_KATAKANA_OR_HIRAGANA }, >- { "bugi", USCRIPT_BUGINESE }, >- { "glag", USCRIPT_GLAGOLITIC }, >- { "khar", USCRIPT_KHAROSHTHI }, >- { "sylo", USCRIPT_SYLOTI_NAGRI }, >- { "talu", USCRIPT_NEW_TAI_LUE }, >- { "tfng", USCRIPT_TIFINAGH }, >- { "xpeo", USCRIPT_OLD_PERSIAN }, >- { "bali", USCRIPT_BALINESE }, >- { "batk", USCRIPT_BATAK }, >- { "blis", USCRIPT_BLISSYMBOLS }, >- { "brah", USCRIPT_BRAHMI }, >- { "cham", USCRIPT_CHAM }, >- { "cirt", USCRIPT_CIRTH }, >- { "cyrs", USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC }, >- { "egyd", USCRIPT_DEMOTIC_EGYPTIAN }, >- { "egyh", USCRIPT_HIERATIC_EGYPTIAN }, >- { "egyp", USCRIPT_EGYPTIAN_HIEROGLYPHS }, >- { "geok", USCRIPT_KHUTSURI }, >- { "hans", USCRIPT_SIMPLIFIED_HAN }, >- { "hant", USCRIPT_TRADITIONAL_HAN }, >- { "hmng", USCRIPT_PAHAWH_HMONG }, >- { "hung", USCRIPT_OLD_HUNGARIAN }, >- { "inds", USCRIPT_HARAPPAN_INDUS }, >- { "java", USCRIPT_JAVANESE }, >- { "kali", USCRIPT_KAYAH_LI }, >- { "latf", USCRIPT_LATIN_FRAKTUR }, >- { "latg", USCRIPT_LATIN_GAELIC }, >- { "lepc", USCRIPT_LEPCHA }, >- { "lina", USCRIPT_LINEAR_A }, >- { "mand", USCRIPT_MANDAEAN }, >- { "maya", USCRIPT_MAYAN_HIEROGLYPHS }, >- { "mero", USCRIPT_MEROITIC }, >- { "nkoo", USCRIPT_NKO }, >- { "orkh", USCRIPT_ORKHON }, >- { "perm", USCRIPT_OLD_PERMIC }, >- { "phag", USCRIPT_PHAGS_PA }, >- { "phnx", USCRIPT_PHOENICIAN }, >- { "plrd", USCRIPT_PHONETIC_POLLARD }, >- { "roro", USCRIPT_RONGORONGO }, >- { "sara", USCRIPT_SARATI }, >- { "syre", USCRIPT_ESTRANGELO_SYRIAC }, >- { "syrj", USCRIPT_WESTERN_SYRIAC }, >- { "syrn", USCRIPT_EASTERN_SYRIAC }, >- { "teng", USCRIPT_TENGWAR }, >- { "vaii", USCRIPT_VAI }, >- { "visp", USCRIPT_VISIBLE_SPEECH }, >- { "xsux", USCRIPT_CUNEIFORM }, >- { "jpan", USCRIPT_KATAKANA_OR_HIRAGANA }, >- { "kore", USCRIPT_HANGUL }, >- { "zxxx", USCRIPT_UNWRITTEN_LANGUAGES }, >- { "zzzz", USCRIPT_UNKNOWN } >+ { "zyyy"_s, USCRIPT_COMMON }, >+ { "qaai"_s, USCRIPT_INHERITED }, >+ { "arab"_s, USCRIPT_ARABIC }, >+ { "armn"_s, USCRIPT_ARMENIAN }, >+ { "beng"_s, USCRIPT_BENGALI }, >+ { "bopo"_s, USCRIPT_BOPOMOFO }, >+ { "cher"_s, USCRIPT_CHEROKEE }, >+ { "copt"_s, USCRIPT_COPTIC }, >+ { "cyrl"_s, USCRIPT_CYRILLIC }, >+ { "dsrt"_s, USCRIPT_DESERET }, >+ { "deva"_s, USCRIPT_DEVANAGARI }, >+ { "ethi"_s, USCRIPT_ETHIOPIC }, >+ { "geor"_s, USCRIPT_GEORGIAN }, >+ { "goth"_s, USCRIPT_GOTHIC }, >+ { "grek"_s, USCRIPT_GREEK }, >+ { "gujr"_s, USCRIPT_GUJARATI }, >+ { "guru"_s, USCRIPT_GURMUKHI }, >+ { "hani"_s, USCRIPT_HAN }, >+ { "hang"_s, USCRIPT_HANGUL }, >+ { "hebr"_s, USCRIPT_HEBREW }, >+ { "hira"_s, USCRIPT_KATAKANA_OR_HIRAGANA }, >+ { "knda"_s, USCRIPT_KANNADA }, >+ { "kana"_s, USCRIPT_KATAKANA_OR_HIRAGANA }, >+ { "khmr"_s, USCRIPT_KHMER }, >+ { "laoo"_s, USCRIPT_LAO }, >+ { "latn"_s, USCRIPT_LATIN }, >+ { "mlym"_s, USCRIPT_MALAYALAM }, >+ { "mong"_s, USCRIPT_MONGOLIAN }, >+ { "mymr"_s, USCRIPT_MYANMAR }, >+ { "ogam"_s, USCRIPT_OGHAM }, >+ { "ital"_s, USCRIPT_OLD_ITALIC }, >+ { "orya"_s, USCRIPT_ORIYA }, >+ { "runr"_s, USCRIPT_RUNIC }, >+ { "sinh"_s, USCRIPT_SINHALA }, >+ { "syrc"_s, USCRIPT_SYRIAC }, >+ { "taml"_s, USCRIPT_TAMIL }, >+ { "telu"_s, USCRIPT_TELUGU }, >+ { "thaa"_s, USCRIPT_THAANA }, >+ { "thai"_s, USCRIPT_THAI }, >+ { "tibt"_s, USCRIPT_TIBETAN }, >+ { "cans"_s, USCRIPT_CANADIAN_ABORIGINAL }, >+ { "yiii"_s, USCRIPT_YI }, >+ { "tglg"_s, USCRIPT_TAGALOG }, >+ { "hano"_s, USCRIPT_HANUNOO }, >+ { "buhd"_s, USCRIPT_BUHID }, >+ { "tagb"_s, USCRIPT_TAGBANWA }, >+ { "brai"_s, USCRIPT_BRAILLE }, >+ { "cprt"_s, USCRIPT_CYPRIOT }, >+ { "limb"_s, USCRIPT_LIMBU }, >+ { "linb"_s, USCRIPT_LINEAR_B }, >+ { "osma"_s, USCRIPT_OSMANYA }, >+ { "shaw"_s, USCRIPT_SHAVIAN }, >+ { "tale"_s, USCRIPT_TAI_LE }, >+ { "ugar"_s, USCRIPT_UGARITIC }, >+ { "hrkt"_s, USCRIPT_KATAKANA_OR_HIRAGANA }, >+ { "bugi"_s, USCRIPT_BUGINESE }, >+ { "glag"_s, USCRIPT_GLAGOLITIC }, >+ { "khar"_s, USCRIPT_KHAROSHTHI }, >+ { "sylo"_s, USCRIPT_SYLOTI_NAGRI }, >+ { "talu"_s, USCRIPT_NEW_TAI_LUE }, >+ { "tfng"_s, USCRIPT_TIFINAGH }, >+ { "xpeo"_s, USCRIPT_OLD_PERSIAN }, >+ { "bali"_s, USCRIPT_BALINESE }, >+ { "batk"_s, USCRIPT_BATAK }, >+ { "blis"_s, USCRIPT_BLISSYMBOLS }, >+ { "brah"_s, USCRIPT_BRAHMI }, >+ { "cham"_s, USCRIPT_CHAM }, >+ { "cirt"_s, USCRIPT_CIRTH }, >+ { "cyrs"_s, USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC }, >+ { "egyd"_s, USCRIPT_DEMOTIC_EGYPTIAN }, >+ { "egyh"_s, USCRIPT_HIERATIC_EGYPTIAN }, >+ { "egyp"_s, USCRIPT_EGYPTIAN_HIEROGLYPHS }, >+ { "geok"_s, USCRIPT_KHUTSURI }, >+ { "hans"_s, USCRIPT_SIMPLIFIED_HAN }, >+ { "hant"_s, USCRIPT_TRADITIONAL_HAN }, >+ { "hmng"_s, USCRIPT_PAHAWH_HMONG }, >+ { "hung"_s, USCRIPT_OLD_HUNGARIAN }, >+ { "inds"_s, USCRIPT_HARAPPAN_INDUS }, >+ { "java"_s, USCRIPT_JAVANESE }, >+ { "kali"_s, USCRIPT_KAYAH_LI }, >+ { "latf"_s, USCRIPT_LATIN_FRAKTUR }, >+ { "latg"_s, USCRIPT_LATIN_GAELIC }, >+ { "lepc"_s, USCRIPT_LEPCHA }, >+ { "lina"_s, USCRIPT_LINEAR_A }, >+ { "mand"_s, USCRIPT_MANDAEAN }, >+ { "maya"_s, USCRIPT_MAYAN_HIEROGLYPHS }, >+ { "mero"_s, USCRIPT_MEROITIC }, >+ { "nkoo"_s, USCRIPT_NKO }, >+ { "orkh"_s, USCRIPT_ORKHON }, >+ { "perm"_s, USCRIPT_OLD_PERMIC }, >+ { "phag"_s, USCRIPT_PHAGS_PA }, >+ { "phnx"_s, USCRIPT_PHOENICIAN }, >+ { "plrd"_s, USCRIPT_PHONETIC_POLLARD }, >+ { "roro"_s, USCRIPT_RONGORONGO }, >+ { "sara"_s, USCRIPT_SARATI }, >+ { "syre"_s, USCRIPT_ESTRANGELO_SYRIAC }, >+ { "syrj"_s, USCRIPT_WESTERN_SYRIAC }, >+ { "syrn"_s, USCRIPT_EASTERN_SYRIAC }, >+ { "teng"_s, USCRIPT_TENGWAR }, >+ { "vaii"_s, USCRIPT_VAI }, >+ { "visp"_s, USCRIPT_VISIBLE_SPEECH }, >+ { "xsux"_s, USCRIPT_CUNEIFORM }, >+ { "jpan"_s, USCRIPT_KATAKANA_OR_HIRAGANA }, >+ { "kore"_s, USCRIPT_HANGUL }, >+ { "zxxx"_s, USCRIPT_UNWRITTEN_LANGUAGES }, >+ { "zzzz"_s, USCRIPT_UNKNOWN } > }; > > struct ScriptNameCodeMapHashTraits : public HashTraits<String> { >@@ -164,7 +164,7 @@ UScriptCode scriptNameToCode(const String& scriptName) > static const auto scriptNameCodeMap = makeNeverDestroyed([] { > HashMap<String, UScriptCode, ASCIICaseInsensitiveHash, ScriptNameCodeMapHashTraits> map; > for (auto& nameAndCode : scriptNameCodeList) >- map.add(ASCIILiteral(nameAndCode.name), nameAndCode.code); >+ map.add(nameAndCode.name, nameAndCode.code); > return map; > }()); > >@@ -175,209 +175,209 @@ UScriptCode scriptNameToCode(const String& scriptName) > } > > struct LocaleScript { >- const char* locale; >+ ASCIILiteral locale; > UScriptCode script; > }; > > static const LocaleScript localeScriptList[] = { >- { "aa", USCRIPT_LATIN }, >- { "ab", USCRIPT_CYRILLIC }, >- { "ady", USCRIPT_CYRILLIC }, >- { "af", USCRIPT_LATIN }, >- { "ak", USCRIPT_LATIN }, >- { "am", USCRIPT_ETHIOPIC }, >- { "ar", USCRIPT_ARABIC }, >- { "as", USCRIPT_BENGALI }, >- { "ast", USCRIPT_LATIN }, >- { "av", USCRIPT_CYRILLIC }, >- { "ay", USCRIPT_LATIN }, >- { "az", USCRIPT_LATIN }, >- { "ba", USCRIPT_CYRILLIC }, >- { "be", USCRIPT_CYRILLIC }, >- { "bg", USCRIPT_CYRILLIC }, >- { "bi", USCRIPT_LATIN }, >- { "bn", USCRIPT_BENGALI }, >- { "bo", USCRIPT_TIBETAN }, >- { "bs", USCRIPT_LATIN }, >- { "ca", USCRIPT_LATIN }, >- { "ce", USCRIPT_CYRILLIC }, >- { "ceb", USCRIPT_LATIN }, >- { "ch", USCRIPT_LATIN }, >- { "chk", USCRIPT_LATIN }, >- { "cs", USCRIPT_LATIN }, >- { "cy", USCRIPT_LATIN }, >- { "da", USCRIPT_LATIN }, >- { "de", USCRIPT_LATIN }, >- { "dv", USCRIPT_THAANA }, >- { "dz", USCRIPT_TIBETAN }, >- { "ee", USCRIPT_LATIN }, >- { "efi", USCRIPT_LATIN }, >- { "el", USCRIPT_GREEK }, >- { "en", USCRIPT_LATIN }, >- { "es", USCRIPT_LATIN }, >- { "et", USCRIPT_LATIN }, >- { "eu", USCRIPT_LATIN }, >- { "fa", USCRIPT_ARABIC }, >- { "fi", USCRIPT_LATIN }, >- { "fil", USCRIPT_LATIN }, >- { "fj", USCRIPT_LATIN }, >- { "fo", USCRIPT_LATIN }, >- { "fr", USCRIPT_LATIN }, >- { "fur", USCRIPT_LATIN }, >- { "fy", USCRIPT_LATIN }, >- { "ga", USCRIPT_LATIN }, >- { "gaa", USCRIPT_LATIN }, >- { "gd", USCRIPT_LATIN }, >- { "gil", USCRIPT_LATIN }, >- { "gl", USCRIPT_LATIN }, >- { "gn", USCRIPT_LATIN }, >- { "gsw", USCRIPT_LATIN }, >- { "gu", USCRIPT_GUJARATI }, >- { "ha", USCRIPT_LATIN }, >- { "haw", USCRIPT_LATIN }, >- { "he", USCRIPT_HEBREW }, >- { "hi", USCRIPT_DEVANAGARI }, >- { "hil", USCRIPT_LATIN }, >- { "ho", USCRIPT_LATIN }, >- { "hr", USCRIPT_LATIN }, >- { "ht", USCRIPT_LATIN }, >- { "hu", USCRIPT_LATIN }, >- { "hy", USCRIPT_ARMENIAN }, >- { "id", USCRIPT_LATIN }, >- { "ig", USCRIPT_LATIN }, >- { "ii", USCRIPT_YI }, >- { "ilo", USCRIPT_LATIN }, >- { "inh", USCRIPT_CYRILLIC }, >- { "is", USCRIPT_LATIN }, >- { "it", USCRIPT_LATIN }, >- { "iu", USCRIPT_CANADIAN_ABORIGINAL }, >- { "ja", USCRIPT_KATAKANA_OR_HIRAGANA }, >- { "jv", USCRIPT_LATIN }, >- { "ka", USCRIPT_GEORGIAN }, >- { "kaj", USCRIPT_LATIN }, >- { "kam", USCRIPT_LATIN }, >- { "kbd", USCRIPT_CYRILLIC }, >- { "kha", USCRIPT_LATIN }, >- { "kk", USCRIPT_CYRILLIC }, >- { "kl", USCRIPT_LATIN }, >- { "km", USCRIPT_KHMER }, >- { "kn", USCRIPT_KANNADA }, >- { "ko", USCRIPT_HANGUL }, >- { "kok", USCRIPT_DEVANAGARI }, >- { "kos", USCRIPT_LATIN }, >- { "kpe", USCRIPT_LATIN }, >- { "krc", USCRIPT_CYRILLIC }, >- { "ks", USCRIPT_ARABIC }, >- { "ku", USCRIPT_ARABIC }, >- { "kum", USCRIPT_CYRILLIC }, >- { "ky", USCRIPT_CYRILLIC }, >- { "la", USCRIPT_LATIN }, >- { "lah", USCRIPT_ARABIC }, >- { "lb", USCRIPT_LATIN }, >- { "lez", USCRIPT_CYRILLIC }, >- { "ln", USCRIPT_LATIN }, >- { "lo", USCRIPT_LAO }, >- { "lt", USCRIPT_LATIN }, >- { "lv", USCRIPT_LATIN }, >- { "mai", USCRIPT_DEVANAGARI }, >- { "mdf", USCRIPT_CYRILLIC }, >- { "mg", USCRIPT_LATIN }, >- { "mh", USCRIPT_LATIN }, >- { "mi", USCRIPT_LATIN }, >- { "mk", USCRIPT_CYRILLIC }, >- { "ml", USCRIPT_MALAYALAM }, >- { "mn", USCRIPT_CYRILLIC }, >- { "mr", USCRIPT_DEVANAGARI }, >- { "ms", USCRIPT_LATIN }, >- { "mt", USCRIPT_LATIN }, >- { "my", USCRIPT_MYANMAR }, >- { "myv", USCRIPT_CYRILLIC }, >- { "na", USCRIPT_LATIN }, >- { "nb", USCRIPT_LATIN }, >- { "ne", USCRIPT_DEVANAGARI }, >- { "niu", USCRIPT_LATIN }, >- { "nl", USCRIPT_LATIN }, >- { "nn", USCRIPT_LATIN }, >- { "nr", USCRIPT_LATIN }, >- { "nso", USCRIPT_LATIN }, >- { "ny", USCRIPT_LATIN }, >- { "oc", USCRIPT_LATIN }, >- { "om", USCRIPT_LATIN }, >- { "or", USCRIPT_ORIYA }, >- { "os", USCRIPT_CYRILLIC }, >- { "pa", USCRIPT_GURMUKHI }, >- { "pag", USCRIPT_LATIN }, >- { "pap", USCRIPT_LATIN }, >- { "pau", USCRIPT_LATIN }, >- { "pl", USCRIPT_LATIN }, >- { "pon", USCRIPT_LATIN }, >- { "ps", USCRIPT_ARABIC }, >- { "pt", USCRIPT_LATIN }, >- { "qu", USCRIPT_LATIN }, >- { "rm", USCRIPT_LATIN }, >- { "rn", USCRIPT_LATIN }, >- { "ro", USCRIPT_LATIN }, >- { "ru", USCRIPT_CYRILLIC }, >- { "rw", USCRIPT_LATIN }, >- { "sa", USCRIPT_DEVANAGARI }, >- { "sah", USCRIPT_CYRILLIC }, >- { "sat", USCRIPT_LATIN }, >- { "sd", USCRIPT_ARABIC }, >- { "se", USCRIPT_LATIN }, >- { "sg", USCRIPT_LATIN }, >- { "si", USCRIPT_SINHALA }, >- { "sid", USCRIPT_LATIN }, >- { "sk", USCRIPT_LATIN }, >- { "sl", USCRIPT_LATIN }, >- { "sm", USCRIPT_LATIN }, >- { "so", USCRIPT_LATIN }, >- { "sq", USCRIPT_LATIN }, >- { "sr", USCRIPT_CYRILLIC }, >- { "ss", USCRIPT_LATIN }, >- { "st", USCRIPT_LATIN }, >- { "su", USCRIPT_LATIN }, >- { "sv", USCRIPT_LATIN }, >- { "sw", USCRIPT_LATIN }, >- { "ta", USCRIPT_TAMIL }, >- { "te", USCRIPT_TELUGU }, >- { "tet", USCRIPT_LATIN }, >- { "tg", USCRIPT_CYRILLIC }, >- { "th", USCRIPT_THAI }, >- { "ti", USCRIPT_ETHIOPIC }, >- { "tig", USCRIPT_ETHIOPIC }, >- { "tk", USCRIPT_LATIN }, >- { "tkl", USCRIPT_LATIN }, >- { "tl", USCRIPT_LATIN }, >- { "tn", USCRIPT_LATIN }, >- { "to", USCRIPT_LATIN }, >- { "tpi", USCRIPT_LATIN }, >- { "tr", USCRIPT_LATIN }, >- { "trv", USCRIPT_LATIN }, >- { "ts", USCRIPT_LATIN }, >- { "tt", USCRIPT_CYRILLIC }, >- { "tvl", USCRIPT_LATIN }, >- { "tw", USCRIPT_LATIN }, >- { "ty", USCRIPT_LATIN }, >- { "tyv", USCRIPT_CYRILLIC }, >- { "udm", USCRIPT_CYRILLIC }, >- { "ug", USCRIPT_ARABIC }, >- { "uk", USCRIPT_CYRILLIC }, >- { "und", USCRIPT_LATIN }, >- { "ur", USCRIPT_ARABIC }, >- { "uz", USCRIPT_CYRILLIC }, >- { "ve", USCRIPT_LATIN }, >- { "vi", USCRIPT_LATIN }, >- { "wal", USCRIPT_ETHIOPIC }, >- { "war", USCRIPT_LATIN }, >- { "wo", USCRIPT_LATIN }, >- { "xh", USCRIPT_LATIN }, >- { "yap", USCRIPT_LATIN }, >- { "yo", USCRIPT_LATIN }, >- { "za", USCRIPT_LATIN }, >- { "zh", USCRIPT_HAN }, >- { "zh_hk", USCRIPT_TRADITIONAL_HAN }, >- { "zh_tw", USCRIPT_TRADITIONAL_HAN }, >- { "zu", USCRIPT_LATIN } >+ { "aa"_s, USCRIPT_LATIN }, >+ { "ab"_s, USCRIPT_CYRILLIC }, >+ { "ady"_s, USCRIPT_CYRILLIC }, >+ { "af"_s, USCRIPT_LATIN }, >+ { "ak"_s, USCRIPT_LATIN }, >+ { "am"_s, USCRIPT_ETHIOPIC }, >+ { "ar"_s, USCRIPT_ARABIC }, >+ { "as"_s, USCRIPT_BENGALI }, >+ { "ast"_s, USCRIPT_LATIN }, >+ { "av"_s, USCRIPT_CYRILLIC }, >+ { "ay"_s, USCRIPT_LATIN }, >+ { "az"_s, USCRIPT_LATIN }, >+ { "ba"_s, USCRIPT_CYRILLIC }, >+ { "be"_s, USCRIPT_CYRILLIC }, >+ { "bg"_s, USCRIPT_CYRILLIC }, >+ { "bi"_s, USCRIPT_LATIN }, >+ { "bn"_s, USCRIPT_BENGALI }, >+ { "bo"_s, USCRIPT_TIBETAN }, >+ { "bs"_s, USCRIPT_LATIN }, >+ { "ca"_s, USCRIPT_LATIN }, >+ { "ce"_s, USCRIPT_CYRILLIC }, >+ { "ceb"_s, USCRIPT_LATIN }, >+ { "ch"_s, USCRIPT_LATIN }, >+ { "chk"_s, USCRIPT_LATIN }, >+ { "cs"_s, USCRIPT_LATIN }, >+ { "cy"_s, USCRIPT_LATIN }, >+ { "da"_s, USCRIPT_LATIN }, >+ { "de"_s, USCRIPT_LATIN }, >+ { "dv"_s, USCRIPT_THAANA }, >+ { "dz"_s, USCRIPT_TIBETAN }, >+ { "ee"_s, USCRIPT_LATIN }, >+ { "efi"_s, USCRIPT_LATIN }, >+ { "el"_s, USCRIPT_GREEK }, >+ { "en"_s, USCRIPT_LATIN }, >+ { "es"_s, USCRIPT_LATIN }, >+ { "et"_s, USCRIPT_LATIN }, >+ { "eu"_s, USCRIPT_LATIN }, >+ { "fa"_s, USCRIPT_ARABIC }, >+ { "fi"_s, USCRIPT_LATIN }, >+ { "fil"_s, USCRIPT_LATIN }, >+ { "fj"_s, USCRIPT_LATIN }, >+ { "fo"_s, USCRIPT_LATIN }, >+ { "fr"_s, USCRIPT_LATIN }, >+ { "fur"_s, USCRIPT_LATIN }, >+ { "fy"_s, USCRIPT_LATIN }, >+ { "ga"_s, USCRIPT_LATIN }, >+ { "gaa"_s, USCRIPT_LATIN }, >+ { "gd"_s, USCRIPT_LATIN }, >+ { "gil"_s, USCRIPT_LATIN }, >+ { "gl"_s, USCRIPT_LATIN }, >+ { "gn"_s, USCRIPT_LATIN }, >+ { "gsw"_s, USCRIPT_LATIN }, >+ { "gu"_s, USCRIPT_GUJARATI }, >+ { "ha"_s, USCRIPT_LATIN }, >+ { "haw"_s, USCRIPT_LATIN }, >+ { "he"_s, USCRIPT_HEBREW }, >+ { "hi"_s, USCRIPT_DEVANAGARI }, >+ { "hil"_s, USCRIPT_LATIN }, >+ { "ho"_s, USCRIPT_LATIN }, >+ { "hr"_s, USCRIPT_LATIN }, >+ { "ht"_s, USCRIPT_LATIN }, >+ { "hu"_s, USCRIPT_LATIN }, >+ { "hy"_s, USCRIPT_ARMENIAN }, >+ { "id"_s, USCRIPT_LATIN }, >+ { "ig"_s, USCRIPT_LATIN }, >+ { "ii"_s, USCRIPT_YI }, >+ { "ilo"_s, USCRIPT_LATIN }, >+ { "inh"_s, USCRIPT_CYRILLIC }, >+ { "is"_s, USCRIPT_LATIN }, >+ { "it"_s, USCRIPT_LATIN }, >+ { "iu"_s, USCRIPT_CANADIAN_ABORIGINAL }, >+ { "ja"_s, USCRIPT_KATAKANA_OR_HIRAGANA }, >+ { "jv"_s, USCRIPT_LATIN }, >+ { "ka"_s, USCRIPT_GEORGIAN }, >+ { "kaj"_s, USCRIPT_LATIN }, >+ { "kam"_s, USCRIPT_LATIN }, >+ { "kbd"_s, USCRIPT_CYRILLIC }, >+ { "kha"_s, USCRIPT_LATIN }, >+ { "kk"_s, USCRIPT_CYRILLIC }, >+ { "kl"_s, USCRIPT_LATIN }, >+ { "km"_s, USCRIPT_KHMER }, >+ { "kn"_s, USCRIPT_KANNADA }, >+ { "ko"_s, USCRIPT_HANGUL }, >+ { "kok"_s, USCRIPT_DEVANAGARI }, >+ { "kos"_s, USCRIPT_LATIN }, >+ { "kpe"_s, USCRIPT_LATIN }, >+ { "krc"_s, USCRIPT_CYRILLIC }, >+ { "ks"_s, USCRIPT_ARABIC }, >+ { "ku"_s, USCRIPT_ARABIC }, >+ { "kum"_s, USCRIPT_CYRILLIC }, >+ { "ky"_s, USCRIPT_CYRILLIC }, >+ { "la"_s, USCRIPT_LATIN }, >+ { "lah"_s, USCRIPT_ARABIC }, >+ { "lb"_s, USCRIPT_LATIN }, >+ { "lez"_s, USCRIPT_CYRILLIC }, >+ { "ln"_s, USCRIPT_LATIN }, >+ { "lo"_s, USCRIPT_LAO }, >+ { "lt"_s, USCRIPT_LATIN }, >+ { "lv"_s, USCRIPT_LATIN }, >+ { "mai"_s, USCRIPT_DEVANAGARI }, >+ { "mdf"_s, USCRIPT_CYRILLIC }, >+ { "mg"_s, USCRIPT_LATIN }, >+ { "mh"_s, USCRIPT_LATIN }, >+ { "mi"_s, USCRIPT_LATIN }, >+ { "mk"_s, USCRIPT_CYRILLIC }, >+ { "ml"_s, USCRIPT_MALAYALAM }, >+ { "mn"_s, USCRIPT_CYRILLIC }, >+ { "mr"_s, USCRIPT_DEVANAGARI }, >+ { "ms"_s, USCRIPT_LATIN }, >+ { "mt"_s, USCRIPT_LATIN }, >+ { "my"_s, USCRIPT_MYANMAR }, >+ { "myv"_s, USCRIPT_CYRILLIC }, >+ { "na"_s, USCRIPT_LATIN }, >+ { "nb"_s, USCRIPT_LATIN }, >+ { "ne"_s, USCRIPT_DEVANAGARI }, >+ { "niu"_s, USCRIPT_LATIN }, >+ { "nl"_s, USCRIPT_LATIN }, >+ { "nn"_s, USCRIPT_LATIN }, >+ { "nr"_s, USCRIPT_LATIN }, >+ { "nso"_s, USCRIPT_LATIN }, >+ { "ny"_s, USCRIPT_LATIN }, >+ { "oc"_s, USCRIPT_LATIN }, >+ { "om"_s, USCRIPT_LATIN }, >+ { "or"_s, USCRIPT_ORIYA }, >+ { "os"_s, USCRIPT_CYRILLIC }, >+ { "pa"_s, USCRIPT_GURMUKHI }, >+ { "pag"_s, USCRIPT_LATIN }, >+ { "pap"_s, USCRIPT_LATIN }, >+ { "pau"_s, USCRIPT_LATIN }, >+ { "pl"_s, USCRIPT_LATIN }, >+ { "pon"_s, USCRIPT_LATIN }, >+ { "ps"_s, USCRIPT_ARABIC }, >+ { "pt"_s, USCRIPT_LATIN }, >+ { "qu"_s, USCRIPT_LATIN }, >+ { "rm"_s, USCRIPT_LATIN }, >+ { "rn"_s, USCRIPT_LATIN }, >+ { "ro"_s, USCRIPT_LATIN }, >+ { "ru"_s, USCRIPT_CYRILLIC }, >+ { "rw"_s, USCRIPT_LATIN }, >+ { "sa"_s, USCRIPT_DEVANAGARI }, >+ { "sah"_s, USCRIPT_CYRILLIC }, >+ { "sat"_s, USCRIPT_LATIN }, >+ { "sd"_s, USCRIPT_ARABIC }, >+ { "se"_s, USCRIPT_LATIN }, >+ { "sg"_s, USCRIPT_LATIN }, >+ { "si"_s, USCRIPT_SINHALA }, >+ { "sid"_s, USCRIPT_LATIN }, >+ { "sk"_s, USCRIPT_LATIN }, >+ { "sl"_s, USCRIPT_LATIN }, >+ { "sm"_s, USCRIPT_LATIN }, >+ { "so"_s, USCRIPT_LATIN }, >+ { "sq"_s, USCRIPT_LATIN }, >+ { "sr"_s, USCRIPT_CYRILLIC }, >+ { "ss"_s, USCRIPT_LATIN }, >+ { "st"_s, USCRIPT_LATIN }, >+ { "su"_s, USCRIPT_LATIN }, >+ { "sv"_s, USCRIPT_LATIN }, >+ { "sw"_s, USCRIPT_LATIN }, >+ { "ta"_s, USCRIPT_TAMIL }, >+ { "te"_s, USCRIPT_TELUGU }, >+ { "tet"_s, USCRIPT_LATIN }, >+ { "tg"_s, USCRIPT_CYRILLIC }, >+ { "th"_s, USCRIPT_THAI }, >+ { "ti"_s, USCRIPT_ETHIOPIC }, >+ { "tig"_s, USCRIPT_ETHIOPIC }, >+ { "tk"_s, USCRIPT_LATIN }, >+ { "tkl"_s, USCRIPT_LATIN }, >+ { "tl"_s, USCRIPT_LATIN }, >+ { "tn"_s, USCRIPT_LATIN }, >+ { "to"_s, USCRIPT_LATIN }, >+ { "tpi"_s, USCRIPT_LATIN }, >+ { "tr"_s, USCRIPT_LATIN }, >+ { "trv"_s, USCRIPT_LATIN }, >+ { "ts"_s, USCRIPT_LATIN }, >+ { "tt"_s, USCRIPT_CYRILLIC }, >+ { "tvl"_s, USCRIPT_LATIN }, >+ { "tw"_s, USCRIPT_LATIN }, >+ { "ty"_s, USCRIPT_LATIN }, >+ { "tyv"_s, USCRIPT_CYRILLIC }, >+ { "udm"_s, USCRIPT_CYRILLIC }, >+ { "ug"_s, USCRIPT_ARABIC }, >+ { "uk"_s, USCRIPT_CYRILLIC }, >+ { "und"_s, USCRIPT_LATIN }, >+ { "ur"_s, USCRIPT_ARABIC }, >+ { "uz"_s, USCRIPT_CYRILLIC }, >+ { "ve"_s, USCRIPT_LATIN }, >+ { "vi"_s, USCRIPT_LATIN }, >+ { "wal"_s, USCRIPT_ETHIOPIC }, >+ { "war"_s, USCRIPT_LATIN }, >+ { "wo"_s, USCRIPT_LATIN }, >+ { "xh"_s, USCRIPT_LATIN }, >+ { "yap"_s, USCRIPT_LATIN }, >+ { "yo"_s, USCRIPT_LATIN }, >+ { "za"_s, USCRIPT_LATIN }, >+ { "zh"_s, USCRIPT_HAN }, >+ { "zh_hk"_s, USCRIPT_TRADITIONAL_HAN }, >+ { "zh_tw"_s, USCRIPT_TRADITIONAL_HAN }, >+ { "zu"_s, USCRIPT_LATIN } > }; > > struct LocaleScriptMapHashTraits : public HashTraits<String> { >@@ -389,7 +389,7 @@ UScriptCode localeToScriptCodeForFontSelection(const String& locale) > static const auto localeScriptMap = makeNeverDestroyed([] { > HashMap<String, UScriptCode, ASCIICaseInsensitiveHash, LocaleScriptMapHashTraits> map; > for (auto& localeAndScript : localeScriptList) >- map.add(ASCIILiteral(localeAndScript.locale), localeAndScript.script); >+ map.add(localeAndScript.locale, localeAndScript.script); > return map; > }()); > >diff --git a/Source/WebCore/platform/text/TextEncodingRegistry.cpp b/Source/WebCore/platform/text/TextEncodingRegistry.cpp >index 52416cc3ca2033b5abfede45b9cf2bc797dbe169..4f43f9b37f191e30f0e052cf8c6a08d8de4df367 100644 >--- a/Source/WebCore/platform/text/TextEncodingRegistry.cpp >+++ b/Source/WebCore/platform/text/TextEncodingRegistry.cpp >@@ -312,17 +312,17 @@ String defaultTextEncodingNameForSystemLanguage() > // In addition, this value must match what is used in Safari, see <rdar://problem/5579292>. > // On some OS versions, the result is CP949 (uppercase). > if (equalLettersIgnoringASCIICase(systemEncodingName, "cp949")) >- systemEncodingName = ASCIILiteral("ks_c_5601-1987"); >+ systemEncodingName = "ks_c_5601-1987"_s; > > // CFStringConvertEncodingToIANACharSetName() returns cp874 for kTextEncodingDOSThai, AKA windows-874. > // Since "cp874" alias is not standard (https://encoding.spec.whatwg.org/#names-and-labels), map to > // "dos-874" instead. > if (equalLettersIgnoringASCIICase(systemEncodingName, "cp874")) >- systemEncodingName = ASCIILiteral("dos-874"); >+ systemEncodingName = "dos-874"_s; > > return systemEncodingName; > #else >- return ASCIILiteral("ISO-8859-1"); >+ return "ISO-8859-1"_s; > #endif > } > >diff --git a/Source/WebCore/platform/win/FileSystemWin.cpp b/Source/WebCore/platform/win/FileSystemWin.cpp >index 66c8334e4796f2b3108bedd12bcf99a035092f96..e9e39d842ced6d434401340a86c95b5630563d43 100644 >--- a/Source/WebCore/platform/win/FileSystemWin.cpp >+++ b/Source/WebCore/platform/win/FileSystemWin.cpp >@@ -330,7 +330,7 @@ String directoryName(const String& path) > static String bundleName() > { > static const NeverDestroyed<String> name = [] { >- String name { ASCIILiteral { "WebKit" } }; >+ String name { "WebKit"_s }; > > #if USE(CF) > if (CFBundleRef bundle = CFBundleGetMainBundle()) { >diff --git a/Source/WebCore/platform/wpe/RenderThemeWPE.cpp b/Source/WebCore/platform/wpe/RenderThemeWPE.cpp >index e5d80272176f99dccde7e2ccb7756069294b833f..938aeaf1d2f4d82ea7bf3daf1a22a6f1fe395deb 100644 >--- a/Source/WebCore/platform/wpe/RenderThemeWPE.cpp >+++ b/Source/WebCore/platform/wpe/RenderThemeWPE.cpp >@@ -52,7 +52,7 @@ String RenderThemeWPE::extraDefaultStyleSheet() > #if ENABLE(VIDEO) > String RenderThemeWPE::mediaControlsStyleSheet() > { >- return ASCIILiteral(mediaControlsBaseUserAgentStyleSheet); >+ return ASCIILiteral::fromLiteralUnsafe(mediaControlsBaseUserAgentStyleSheet); > } > > String RenderThemeWPE::mediaControlsScript() >diff --git a/Source/WebCore/rendering/RenderMenuList.cpp b/Source/WebCore/rendering/RenderMenuList.cpp >index bc9254ea2507b1d4aa7cec9ee2f0aeba1b3d9561..1d7d68de9b65356df456d75af6443bc867449a06 100644 >--- a/Source/WebCore/rendering/RenderMenuList.cpp >+++ b/Source/WebCore/rendering/RenderMenuList.cpp >@@ -270,7 +270,7 @@ void RenderMenuList::setTextFromOption(int optionIndex) > > void RenderMenuList::setText(const String& s) > { >- String textToUse = s.isEmpty() ? String(ASCIILiteral("\n")) : s; >+ String textToUse = s.isEmpty() ? String("\n"_s) : s; > > if (m_buttonText) > m_buttonText->setText(textToUse.impl(), true); >diff --git a/Source/WebCore/rendering/RenderThemeIOS.mm b/Source/WebCore/rendering/RenderThemeIOS.mm >index 30a25941ec6dcfba9884cd766b1cfc011d00eb3e..d69b20b9c75dd13a23bf50d2d87c84b62b881efb 100644 >--- a/Source/WebCore/rendering/RenderThemeIOS.mm >+++ b/Source/WebCore/rendering/RenderThemeIOS.mm >@@ -1819,7 +1819,7 @@ bool RenderThemeIOS::paintAttachment(const RenderObject& renderer, const PaintIn > > String RenderThemeIOS::extraDefaultStyleSheet() > { >- return ASCIILiteral("* { -webkit-text-size-adjust: auto; -webkit-hyphens: auto !important; }"); >+ return "* { -webkit-text-size-adjust: auto; -webkit-hyphens: auto !important; }"_s; > } > > #endif >diff --git a/Source/WebCore/svg/SVGComponentTransferFunctionElement.h b/Source/WebCore/svg/SVGComponentTransferFunctionElement.h >index 3895d55132f6766f9b893cadde0b2c6328f07660..701ca05b63a01f1d2adc4980493adac75f20c65c 100644 >--- a/Source/WebCore/svg/SVGComponentTransferFunctionElement.h >+++ b/Source/WebCore/svg/SVGComponentTransferFunctionElement.h >@@ -38,15 +38,15 @@ struct SVGPropertyTraits<ComponentTransferType> { > case FECOMPONENTTRANSFER_TYPE_UNKNOWN: > return emptyString(); > case FECOMPONENTTRANSFER_TYPE_IDENTITY: >- return ASCIILiteral("identity"); >+ return "identity"_s; > case FECOMPONENTTRANSFER_TYPE_TABLE: >- return ASCIILiteral("table"); >+ return "table"_s; > case FECOMPONENTTRANSFER_TYPE_DISCRETE: >- return ASCIILiteral("discrete"); >+ return "discrete"_s; > case FECOMPONENTTRANSFER_TYPE_LINEAR: >- return ASCIILiteral("linear"); >+ return "linear"_s; > case FECOMPONENTTRANSFER_TYPE_GAMMA: >- return ASCIILiteral("gamma"); >+ return "gamma"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFEColorMatrixElement.h b/Source/WebCore/svg/SVGFEColorMatrixElement.h >index 9e77b4cdb474dec2b2060930e3047d85aef7e244..2c5dafbc1b36bc9e1aab287366d18a760496a896 100644 >--- a/Source/WebCore/svg/SVGFEColorMatrixElement.h >+++ b/Source/WebCore/svg/SVGFEColorMatrixElement.h >@@ -37,13 +37,13 @@ struct SVGPropertyTraits<ColorMatrixType> { > case FECOLORMATRIX_TYPE_UNKNOWN: > return emptyString(); > case FECOLORMATRIX_TYPE_MATRIX: >- return ASCIILiteral("matrix"); >+ return "matrix"_s; > case FECOLORMATRIX_TYPE_SATURATE: >- return ASCIILiteral("saturate"); >+ return "saturate"_s; > case FECOLORMATRIX_TYPE_HUEROTATE: >- return ASCIILiteral("hueRotate"); >+ return "hueRotate"_s; > case FECOLORMATRIX_TYPE_LUMINANCETOALPHA: >- return ASCIILiteral("luminanceToAlpha"); >+ return "luminanceToAlpha"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFECompositeElement.h b/Source/WebCore/svg/SVGFECompositeElement.h >index 20ef48000b010c6efc00d8bf1afb39caa93d9797..9836a1be84b9ff7ef8079aae0d5cc2d4d94218ed 100644 >--- a/Source/WebCore/svg/SVGFECompositeElement.h >+++ b/Source/WebCore/svg/SVGFECompositeElement.h >@@ -40,19 +40,19 @@ struct SVGPropertyTraits<CompositeOperationType> { > case FECOMPOSITE_OPERATOR_UNKNOWN: > return emptyString(); > case FECOMPOSITE_OPERATOR_OVER: >- return ASCIILiteral("over"); >+ return "over"_s; > case FECOMPOSITE_OPERATOR_IN: >- return ASCIILiteral("in"); >+ return "in"_s; > case FECOMPOSITE_OPERATOR_OUT: >- return ASCIILiteral("out"); >+ return "out"_s; > case FECOMPOSITE_OPERATOR_ATOP: >- return ASCIILiteral("atop"); >+ return "atop"_s; > case FECOMPOSITE_OPERATOR_XOR: >- return ASCIILiteral("xor"); >+ return "xor"_s; > case FECOMPOSITE_OPERATOR_ARITHMETIC: >- return ASCIILiteral("arithmetic"); >+ return "arithmetic"_s; > case FECOMPOSITE_OPERATOR_LIGHTER: >- return ASCIILiteral("lighter"); >+ return "lighter"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFEConvolveMatrixElement.h b/Source/WebCore/svg/SVGFEConvolveMatrixElement.h >index 36167c0377c3f921a2b9b8f31633eb85dec2a0a3..6d25881dd7b672733a4e5d389b3456b1a3f5f806 100644 >--- a/Source/WebCore/svg/SVGFEConvolveMatrixElement.h >+++ b/Source/WebCore/svg/SVGFEConvolveMatrixElement.h >@@ -39,11 +39,11 @@ struct SVGPropertyTraits<EdgeModeType> { > case EDGEMODE_UNKNOWN: > return emptyString(); > case EDGEMODE_DUPLICATE: >- return ASCIILiteral("duplicate"); >+ return "duplicate"_s; > case EDGEMODE_WRAP: >- return ASCIILiteral("wrap"); >+ return "wrap"_s; > case EDGEMODE_NONE: >- return ASCIILiteral("none"); >+ return "none"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFEDisplacementMapElement.h b/Source/WebCore/svg/SVGFEDisplacementMapElement.h >index 57ceddbca6deba26a8f48872f00fbf665df0f3df..15f8be7e31ad1edf9b0a6ed382243c891fd19a37 100644 >--- a/Source/WebCore/svg/SVGFEDisplacementMapElement.h >+++ b/Source/WebCore/svg/SVGFEDisplacementMapElement.h >@@ -36,13 +36,13 @@ struct SVGPropertyTraits<ChannelSelectorType> { > case CHANNEL_UNKNOWN: > return emptyString(); > case CHANNEL_R: >- return ASCIILiteral("R"); >+ return "R"_s; > case CHANNEL_G: >- return ASCIILiteral("G"); >+ return "G"_s; > case CHANNEL_B: >- return ASCIILiteral("B"); >+ return "B"_s; > case CHANNEL_A: >- return ASCIILiteral("A"); >+ return "A"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFEMorphologyElement.h b/Source/WebCore/svg/SVGFEMorphologyElement.h >index aab0449de7ba7b731a8665ca1cb2ead5fed11756..d66bbbfc9a23fdc9d711cfdaff58ea99e37d5815 100644 >--- a/Source/WebCore/svg/SVGFEMorphologyElement.h >+++ b/Source/WebCore/svg/SVGFEMorphologyElement.h >@@ -36,9 +36,9 @@ struct SVGPropertyTraits<MorphologyOperatorType> { > case FEMORPHOLOGY_OPERATOR_UNKNOWN: > return emptyString(); > case FEMORPHOLOGY_OPERATOR_ERODE: >- return ASCIILiteral("erode"); >+ return "erode"_s; > case FEMORPHOLOGY_OPERATOR_DILATE: >- return ASCIILiteral("dilate"); >+ return "dilate"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGFETurbulenceElement.h b/Source/WebCore/svg/SVGFETurbulenceElement.h >index 14016caca2217f6213f3f99ec20fe0fb0f48be6d..4f3a096a1c7b78ad0efc7590aa37a734d5418ea9 100644 >--- a/Source/WebCore/svg/SVGFETurbulenceElement.h >+++ b/Source/WebCore/svg/SVGFETurbulenceElement.h >@@ -44,9 +44,9 @@ struct SVGPropertyTraits<SVGStitchOptions> { > case SVG_STITCHTYPE_UNKNOWN: > return emptyString(); > case SVG_STITCHTYPE_STITCH: >- return ASCIILiteral("stitch"); >+ return "stitch"_s; > case SVG_STITCHTYPE_NOSTITCH: >- return ASCIILiteral("noStitch"); >+ return "noStitch"_s; > } > > ASSERT_NOT_REACHED(); >@@ -73,9 +73,9 @@ struct SVGPropertyTraits<TurbulenceType> { > case TurbulenceType::Unknown: > return emptyString(); > case TurbulenceType::FractalNoise: >- return ASCIILiteral("fractalNoise"); >+ return "fractalNoise"_s; > case TurbulenceType::Turbulence: >- return ASCIILiteral("turbulence"); >+ return "turbulence"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGGradientElement.h b/Source/WebCore/svg/SVGGradientElement.h >index 5dc3e1aa282413a5db405cb81db4d0debc26902e..a5dced65023f58af25a7ca736a21113ca0260de9 100644 >--- a/Source/WebCore/svg/SVGGradientElement.h >+++ b/Source/WebCore/svg/SVGGradientElement.h >@@ -49,11 +49,11 @@ struct SVGPropertyTraits<SVGSpreadMethodType> { > case SVGSpreadMethodUnknown: > return emptyString(); > case SVGSpreadMethodPad: >- return ASCIILiteral("pad"); >+ return "pad"_s; > case SVGSpreadMethodReflect: >- return ASCIILiteral("reflect"); >+ return "reflect"_s; > case SVGSpreadMethodRepeat: >- return ASCIILiteral("repeat"); >+ return "repeat"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGLocatable.cpp b/Source/WebCore/svg/SVGLocatable.cpp >index 2f866144e2d02fd008a07e855089da9c500082bf..5f98cbdd2c44aa4db2ed4a5886c71fc125606c58 100644 >--- a/Source/WebCore/svg/SVGLocatable.cpp >+++ b/Source/WebCore/svg/SVGLocatable.cpp >@@ -106,7 +106,7 @@ ExceptionOr<Ref<SVGMatrix>> SVGLocatable::getTransformToElement(SVGElement* targ > if (auto inverse = targetCTM.inverse()) > ctm = inverse.value() * ctm; > else >- return Exception { InvalidStateError, ASCIILiteral("Matrix is not invertible") }; >+ return Exception { InvalidStateError, "Matrix is not invertible"_s }; > } > > return SVGMatrix::create(ctm); >diff --git a/Source/WebCore/svg/SVGMarkerTypes.h b/Source/WebCore/svg/SVGMarkerTypes.h >index 47362f70610db577040048a43444328b4523e04c..fac187c322917bb21086ceb9715eb7143fa77596 100644 >--- a/Source/WebCore/svg/SVGMarkerTypes.h >+++ b/Source/WebCore/svg/SVGMarkerTypes.h >@@ -55,9 +55,9 @@ struct SVGPropertyTraits<SVGMarkerUnitsType> { > case SVGMarkerUnitsUnknown: > return emptyString(); > case SVGMarkerUnitsUserSpaceOnUse: >- return ASCIILiteral("userSpaceOnUse"); >+ return "userSpaceOnUse"_s; > case SVGMarkerUnitsStrokeWidth: >- return ASCIILiteral("strokeWidth"); >+ return "strokeWidth"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGMatrixValue.h b/Source/WebCore/svg/SVGMatrixValue.h >index 18400269aa30c61c94620ae2163ebc46decd55b2..1842c650ba4b19e06e35cf91e491f9e6e8f08c3a 100644 >--- a/Source/WebCore/svg/SVGMatrixValue.h >+++ b/Source/WebCore/svg/SVGMatrixValue.h >@@ -106,7 +106,7 @@ class SVGMatrixValue final : public AffineTransform { > if (auto inverse = AffineTransform::inverse()) > return SVGMatrixValue { inverse.value() }; > >- return Exception { InvalidStateError, ASCIILiteral("Matrix is not invertible") }; >+ return Exception { InvalidStateError, "Matrix is not invertible"_s }; > } > > ExceptionOr<SVGMatrixValue> rotateFromVector(double x, double y) >diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp >index e84865c9d4a4c2c500c375551e976311e3e4328e..c5f0af57487d6f24e8ee2eb53b980314a02355e6 100644 >--- a/Source/WebCore/svg/SVGSVGElement.cpp >+++ b/Source/WebCore/svg/SVGSVGElement.cpp >@@ -76,8 +76,8 @@ inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& docu > : SVGGraphicsElement(tagName, document) > , m_x(LengthModeWidth) > , m_y(LengthModeHeight) >- , m_width(LengthModeWidth, ASCIILiteral("100%")) >- , m_height(LengthModeHeight, ASCIILiteral("100%")) >+ , m_width(LengthModeWidth, "100%"_s) >+ , m_height(LengthModeHeight, "100%"_s) > , m_timeContainer(SMILTimeContainer::create(*this)) > { > ASSERT(hasTagName(SVGNames::svgTag)); >@@ -260,7 +260,7 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > if (parseError != NoError || value.isEmpty()) { > // FIXME: This is definitely the correct behavior for a missing/removed attribute. > // Not sure it's correct for the empty string or for something that can't be parsed. >- length = SVGLengthValue(LengthModeWidth, ASCIILiteral("100%")); >+ length = SVGLengthValue(LengthModeWidth, "100%"_s); > } > setWidthBaseValue(length); > } else if (name == SVGNames::heightAttr) { >@@ -268,7 +268,7 @@ void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString > if (parseError != NoError || value.isEmpty()) { > // FIXME: This is definitely the correct behavior for a removed attribute. > // Not sure it's correct for the empty string or for something that can't be parsed. >- length = SVGLengthValue(LengthModeHeight, ASCIILiteral("100%")); >+ length = SVGLengthValue(LengthModeHeight, "100%"_s); > } > setHeightBaseValue(length); > } >diff --git a/Source/WebCore/svg/SVGTextContentElement.h b/Source/WebCore/svg/SVGTextContentElement.h >index ff69523715bc4add20cf778984d6113fe45a55ae..d2f3fb6c0e5841d59bf498b4d8a85405342ab1b3 100644 >--- a/Source/WebCore/svg/SVGTextContentElement.h >+++ b/Source/WebCore/svg/SVGTextContentElement.h >@@ -45,9 +45,9 @@ template<> struct SVGPropertyTraits<SVGLengthAdjustType> { > case SVGLengthAdjustUnknown: > return emptyString(); > case SVGLengthAdjustSpacing: >- return ASCIILiteral("spacing"); >+ return "spacing"_s; > case SVGLengthAdjustSpacingAndGlyphs: >- return ASCIILiteral("spacingAndGlyphs"); >+ return "spacingAndGlyphs"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGTextPathElement.h b/Source/WebCore/svg/SVGTextPathElement.h >index cdd7c20900ac28f815b6370869530616ef41226d..a35519fd9c1a83cbec88014c1de50019f6580ab7 100644 >--- a/Source/WebCore/svg/SVGTextPathElement.h >+++ b/Source/WebCore/svg/SVGTextPathElement.h >@@ -47,9 +47,9 @@ struct SVGPropertyTraits<SVGTextPathMethodType> { > case SVGTextPathMethodUnknown: > return emptyString(); > case SVGTextPathMethodAlign: >- return ASCIILiteral("align"); >+ return "align"_s; > case SVGTextPathMethodStretch: >- return ASCIILiteral("stretch"); >+ return "stretch"_s; > } > > ASSERT_NOT_REACHED(); >@@ -76,9 +76,9 @@ struct SVGPropertyTraits<SVGTextPathSpacingType> { > case SVGTextPathSpacingUnknown: > return emptyString(); > case SVGTextPathSpacingAuto: >- return ASCIILiteral("auto"); >+ return "auto"_s; > case SVGTextPathSpacingExact: >- return ASCIILiteral("exact"); >+ return "exact"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGToOTFFontConversion.cpp b/Source/WebCore/svg/SVGToOTFFontConversion.cpp >index 50abce6a1bc85ebe38465d42bde9b56b427463a5..0cf5591d2d20f0776471bcf9c15c0266c05249bf 100644 >--- a/Source/WebCore/svg/SVGToOTFFontConversion.cpp >+++ b/Source/WebCore/svg/SVGToOTFFontConversion.cpp >@@ -675,7 +675,7 @@ void SVGToOTFFontConverter::appendCFFTable() > ASSERT(m_result.size() == topDictStart + sizeOfTopIndex); > > // String INDEX >- String unknownCharacter = ASCIILiteral("UnknownChar"); >+ String unknownCharacter = "UnknownChar"_s; > append16(2 + (hasWeight ? 1 : 0)); // Number of elements in INDEX > m_result.append(4); // Offsets in this INDEX are 4 bytes long > uint32_t offset = 1; >diff --git a/Source/WebCore/svg/SVGUnitTypes.h b/Source/WebCore/svg/SVGUnitTypes.h >index b0edf76819ee04f1669dcce4b3721cf26f1da511..f44485f7e05df2453faabe69b0c2882fec5004be 100644 >--- a/Source/WebCore/svg/SVGUnitTypes.h >+++ b/Source/WebCore/svg/SVGUnitTypes.h >@@ -46,9 +46,9 @@ struct SVGPropertyTraits<SVGUnitTypes::SVGUnitType> { > case SVGUnitTypes::SVG_UNIT_TYPE_UNKNOWN: > return emptyString(); > case SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE: >- return ASCIILiteral("userSpaceOnUse"); >+ return "userSpaceOnUse"_s; > case SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: >- return ASCIILiteral("objectBoundingBox"); >+ return "objectBoundingBox"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/svg/SVGUseElement.cpp b/Source/WebCore/svg/SVGUseElement.cpp >index c6a15b80379b14c9b5f7cbeb33c4df648eac0380..9b5ffb1e430c6d640d7bef9733a86db1594cf8eb 100644 >--- a/Source/WebCore/svg/SVGUseElement.cpp >+++ b/Source/WebCore/svg/SVGUseElement.cpp >@@ -307,7 +307,7 @@ Path SVGUseElement::toClipPath() > > if (!isDirectReference(*targetClone)) { > // Spec: Indirect references are an error (14.3.5) >- document().accessSVGExtensions().reportError(ASCIILiteral("Not allowed to use indirect reference in <clip-path>")); >+ document().accessSVGExtensions().reportError("Not allowed to use indirect reference in <clip-path>"_s); > return { }; > } > >diff --git a/Source/WebCore/svg/graphics/SVGImage.cpp b/Source/WebCore/svg/graphics/SVGImage.cpp >index 58c25c66c88b574f991e46bc3aa2d4d153c572c0..8d03e2dbbff55219648043acc052cb0d70b9769b 100644 >--- a/Source/WebCore/svg/graphics/SVGImage.cpp >+++ b/Source/WebCore/svg/graphics/SVGImage.cpp >@@ -494,7 +494,7 @@ EncodedDataStatus SVGImage::dataChanged(bool allDataReceived) > > String SVGImage::filenameExtension() const > { >- return ASCIILiteral("svg"); >+ return "svg"_s; > } > > bool isInSVGImage(const Element* element) >diff --git a/Source/WebCore/testing/InternalSettings.cpp b/Source/WebCore/testing/InternalSettings.cpp >index 24e4aaebe3746e0204cb3e7f0affc71e27b54038..8940c79873d6d722d030a3b8ebc481df0f09df2e 100644 >--- a/Source/WebCore/testing/InternalSettings.cpp >+++ b/Source/WebCore/testing/InternalSettings.cpp >@@ -790,9 +790,9 @@ ExceptionOr<String> InternalSettings::userInterfaceDirectionPolicy() > return Exception { InvalidAccessError }; > switch (settings().userInterfaceDirectionPolicy()) { > case UserInterfaceDirectionPolicy::Content: >- return String { ASCIILiteral { "Content" } }; >+ return String { "Content"_s }; > case UserInterfaceDirectionPolicy::System: >- return String { ASCIILiteral { "View" } }; >+ return String { "View"_s }; > } > ASSERT_NOT_REACHED(); > return Exception { InvalidAccessError }; >@@ -819,9 +819,9 @@ ExceptionOr<String> InternalSettings::systemLayoutDirection() > return Exception { InvalidAccessError }; > switch (settings().systemLayoutDirection()) { > case LTR: >- return String { ASCIILiteral { "LTR" } }; >+ return String { "LTR"_s }; > case RTL: >- return String { ASCIILiteral { "RTL" } }; >+ return String { "RTL"_s }; > } > ASSERT_NOT_REACHED(); > return Exception { InvalidAccessError }; >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 1ccacb1b10d1ad09adc98ccc4ede0098ad157f3f..080896b8c0853a42c7422862b133676f7812707a 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -586,10 +586,10 @@ ExceptionOr<bool> Internals::areSVGAnimationsPaused() const > { > auto* document = contextDocument(); > if (!document) >- return Exception { InvalidAccessError, ASCIILiteral("No context document") }; >+ return Exception { InvalidAccessError, "No context document"_s }; > > if (!document->svgExtensions()) >- return Exception { NotFoundError, ASCIILiteral("No SVG animations") }; >+ return Exception { NotFoundError, "No SVG animations"_s }; > > return document->accessSVGExtensions().areAnimationsPaused(); > } >@@ -4232,19 +4232,19 @@ Vector<String> Internals::accessKeyModifiers() const > for (auto modifier : EventHandler::accessKeyModifiers()) { > switch (modifier) { > case PlatformEvent::Modifier::AltKey: >- accessKeyModifierStrings.append(ASCIILiteral("altKey")); >+ accessKeyModifierStrings.append("altKey"_s); > break; > case PlatformEvent::Modifier::CtrlKey: >- accessKeyModifierStrings.append(ASCIILiteral("ctrlKey")); >+ accessKeyModifierStrings.append("ctrlKey"_s); > break; > case PlatformEvent::Modifier::MetaKey: >- accessKeyModifierStrings.append(ASCIILiteral("metaKey")); >+ accessKeyModifierStrings.append("metaKey"_s); > break; > case PlatformEvent::Modifier::ShiftKey: >- accessKeyModifierStrings.append(ASCIILiteral("shiftKey")); >+ accessKeyModifierStrings.append("shiftKey"_s); > break; > case PlatformEvent::Modifier::CapsLockKey: >- accessKeyModifierStrings.append(ASCIILiteral("capsLockKey")); >+ accessKeyModifierStrings.append("capsLockKey"_s); > break; > } > } >@@ -4355,7 +4355,7 @@ ExceptionOr<void> Internals::setMediaDeviceState(const String& id, const String& > { > auto* document = contextDocument(); > if (!document) >- return Exception { InvalidAccessError, ASCIILiteral("No context document") }; >+ return Exception { InvalidAccessError, "No context document"_s }; > > if (!equalLettersIgnoringASCIICase(property, "enabled")) > return Exception { InvalidAccessError, makeString("\"" + property, "\" is not a valid property for this method.") }; >@@ -4403,19 +4403,19 @@ String Internals::audioSessionCategory() const > #if USE(AUDIO_SESSION) > switch (AudioSession::sharedSession().category()) { > case AudioSession::AmbientSound: >- return ASCIILiteral("AmbientSound"); >+ return "AmbientSound"_s; > case AudioSession::SoloAmbientSound: >- return ASCIILiteral("SoloAmbientSound"); >+ return "SoloAmbientSound"_s; > case AudioSession::MediaPlayback: >- return ASCIILiteral("MediaPlayback"); >+ return "MediaPlayback"_s; > case AudioSession::RecordAudio: >- return ASCIILiteral("RecordAudio"); >+ return "RecordAudio"_s; > case AudioSession::PlayAndRecord: >- return ASCIILiteral("PlayAndRecord"); >+ return "PlayAndRecord"_s; > case AudioSession::AudioProcessing: >- return ASCIILiteral("AudioProcessing"); >+ return "AudioProcessing"_s; > case AudioSession::None: >- return ASCIILiteral("None"); >+ return "None"_s; > } > #endif > return emptyString(); >@@ -4545,7 +4545,7 @@ String Internals::systemPreviewRelType() > #if USE(SYSTEM_PREVIEW) && USE(APPLE_INTERNAL_SDK) > return getSystemPreviewRelValue(); > #else >- return ASCIILiteral("system-preview"); >+ return "system-preview"_s; > #endif > } > >diff --git a/Source/WebCore/testing/MockCDMFactory.cpp b/Source/WebCore/testing/MockCDMFactory.cpp >index 070a5e15eb62253b57b5d4db7bbffb258114ca97..9f2b23f4af41b0b7e5c79e36fd44aacbaacfd172 100644 >--- a/Source/WebCore/testing/MockCDMFactory.cpp >+++ b/Source/WebCore/testing/MockCDMFactory.cpp >@@ -199,9 +199,9 @@ RefPtr<SharedBuffer> MockCDM::sanitizeResponse(const SharedBuffer& response) con > return nullptr; > > Vector<String> responseArray; >- String(response.data(), response.size()).split(ASCIILiteral(" "), responseArray); >+ String(response.data(), response.size()).split(" "_s, responseArray); > >- if (!responseArray.contains(String(ASCIILiteral("valid-response")))) >+ if (!responseArray.contains(String("valid-response"_s))) > return nullptr; > > return response.copy(); >@@ -305,15 +305,15 @@ void MockCDMInstance::updateLicense(const String& sessionID, LicenseType, const > } > > Vector<String> responseVector; >- String(response.data(), response.size()).split(ASCIILiteral(" "), responseVector); >+ String(response.data(), response.size()).split(" "_s, responseVector); > >- if (responseVector.contains(String(ASCIILiteral("invalid-format")))) { >+ if (responseVector.contains(String("invalid-format"_s))) { > callback(false, std::nullopt, std::nullopt, std::nullopt, SuccessValue::Failed); > return; > } > > std::optional<KeyStatusVector> changedKeys; >- if (responseVector.contains(String(ASCIILiteral("keys-changed")))) { >+ if (responseVector.contains(String("keys-changed"_s))) { > const auto* keys = factory->keysForSessionWithID(sessionID); > if (keys) { > KeyStatusVector keyStatusVector; >diff --git a/Source/WebCore/testing/MockContentFilter.cpp b/Source/WebCore/testing/MockContentFilter.cpp >index d773f472d0af724b9337e51d5fbce0c54835d95e..648fbd26fac36a65c9957c51157887646f2dc262 100644 >--- a/Source/WebCore/testing/MockContentFilter.cpp >+++ b/Source/WebCore/testing/MockContentFilter.cpp >@@ -134,7 +134,7 @@ ContentFilterUnblockHandler MockContentFilter::unblockHandler() const > > String MockContentFilter::unblockRequestDeniedScript() const > { >- return ASCIILiteral("unblockRequestDenied()"); >+ return "unblockRequestDenied()"_s; > } > > void MockContentFilter::maybeDetermineStatus(DecisionPoint decisionPoint) >diff --git a/Source/WebCore/testing/MockCredentialsMessenger.cpp b/Source/WebCore/testing/MockCredentialsMessenger.cpp >index 32d7080b10abb5ca0cd318f4e9d26bbd11ac8990..102e33b5c5b88a81f1e2a64b7ce0fe3f55014a3f 100644 >--- a/Source/WebCore/testing/MockCredentialsMessenger.cpp >+++ b/Source/WebCore/testing/MockCredentialsMessenger.cpp >@@ -42,7 +42,7 @@ MockCredentialsMessenger::~MockCredentialsMessenger() > { > // Have no effects to original promises. Just to call handlers to avoid any assertion failures. > for (auto messageId : m_timeOutMessageIds) >- exceptionReply(messageId, ExceptionData { NotAllowedError, ASCIILiteral("Operation timed out.") }); >+ exceptionReply(messageId, ExceptionData { NotAllowedError, "Operation timed out."_s }); > } > > void MockCredentialsMessenger::setCreationReturnBundle(const BufferSource& credentialId, const BufferSource& attestationObject) >@@ -81,7 +81,7 @@ void MockCredentialsMessenger::makeCredential(const Vector<uint8_t>&, const Publ > } > if (m_didUserCancel) { > m_didUserCancel = false; >- exceptionReply(messageId, ExceptionData { NotAllowedError, ASCIILiteral("User cancelled.") }); >+ exceptionReply(messageId, ExceptionData { NotAllowedError, "User cancelled."_s }); > return; > } > if (!m_credentialId.isEmpty()) { >@@ -104,7 +104,7 @@ void MockCredentialsMessenger::getAssertion(const Vector<uint8_t>&, const Public > } > if (m_didUserCancel) { > m_didUserCancel = false; >- exceptionReply(messageId, ExceptionData { NotAllowedError, ASCIILiteral("User cancelled.") }); >+ exceptionReply(messageId, ExceptionData { NotAllowedError, "User cancelled."_s }); > return; > } > if (!m_credentialId.isEmpty()) { >diff --git a/Source/WebCore/testing/MockPaymentCoordinator.cpp b/Source/WebCore/testing/MockPaymentCoordinator.cpp >index d405495b5c25c83dbae960c2c4846714d59f20ec..30ce639ee392b4a2630dce930c7f9a7f979e9717 100644 >--- a/Source/WebCore/testing/MockPaymentCoordinator.cpp >+++ b/Source/WebCore/testing/MockPaymentCoordinator.cpp >@@ -112,7 +112,7 @@ bool MockPaymentCoordinator::showPaymentUI(const URL&, const Vector<URL>&, const > ASSERT(showCount == hideCount); > ++showCount; > dispatchIfShowing([page = &m_page]() { >- page->paymentCoordinator().validateMerchant({ URL(), ASCIILiteral("https://webkit.org/") }); >+ page->paymentCoordinator().validateMerchant({ URL(), "https://webkit.org/"_s }); > }); > return true; > } >diff --git a/Source/WebCore/workers/WorkerRunLoop.cpp b/Source/WebCore/workers/WorkerRunLoop.cpp >index f39923df8ec93103c260732e415327ffdb6df778..6038123ddd026df512f3d6c544babb4978921b54 100644 >--- a/Source/WebCore/workers/WorkerRunLoop.cpp >+++ b/Source/WebCore/workers/WorkerRunLoop.cpp >@@ -104,7 +104,7 @@ String WorkerRunLoop::defaultMode() > > String WorkerRunLoop::debuggerMode() > { >- return ASCIILiteral("debugger"); >+ return "debugger"_s; > } > > class RunLoopSetup { >diff --git a/Source/WebCore/workers/WorkerScriptLoader.cpp b/Source/WebCore/workers/WorkerScriptLoader.cpp >index 2a0b7503cdef782abf602433053e5042965f2843..70b13a8e945cf5193b11a1c2750b80d52bc6513c 100644 >--- a/Source/WebCore/workers/WorkerScriptLoader.cpp >+++ b/Source/WebCore/workers/WorkerScriptLoader.cpp >@@ -98,7 +98,7 @@ std::optional<Exception> WorkerScriptLoader::loadSynchronously(ScriptExecutionCo > #if ENABLE(SERVICE_WORKER) > if (isServiceWorkerGlobalScope) { > if (!MIMETypeRegistry::isSupportedJavaScriptMIMEType(responseMIMEType())) >- return Exception { NetworkError, ASCIILiteral("mime type is not a supported JavaScript mime type") }; >+ return Exception { NetworkError, "mime type is not a supported JavaScript mime type"_s }; > > downcast<ServiceWorkerGlobalScope>(workerGlobalScope).setScriptResource(url, ServiceWorkerContextData::ImportedScript { script(), m_responseURL, m_responseMIMEType }); > } >@@ -147,7 +147,7 @@ const URL& WorkerScriptLoader::responseURL() const > std::unique_ptr<ResourceRequest> WorkerScriptLoader::createResourceRequest(const String& initiatorIdentifier) > { > auto request = std::make_unique<ResourceRequest>(m_url); >- request->setHTTPMethod(ASCIILiteral("GET")); >+ request->setHTTPMethod("GET"_s); > request->setInitiatorIdentifier(initiatorIdentifier); > return request; > } >@@ -188,9 +188,9 @@ void WorkerScriptLoader::didReceiveData(const char* data, int len) > > if (!m_decoder) { > if (!m_responseEncoding.isEmpty()) >- m_decoder = TextResourceDecoder::create(ASCIILiteral("text/javascript"), m_responseEncoding); >+ m_decoder = TextResourceDecoder::create("text/javascript"_s, m_responseEncoding); > else >- m_decoder = TextResourceDecoder::create(ASCIILiteral("text/javascript"), "UTF-8"); >+ m_decoder = TextResourceDecoder::create("text/javascript"_s, "UTF-8"); > } > > if (!len) >diff --git a/Source/WebCore/workers/service/ExtendableEvent.cpp b/Source/WebCore/workers/service/ExtendableEvent.cpp >index f49369c1e577d16f442fbf8d37f3ee1054d10d6b..5cc6cef521f89b3c5e70286b90dff91a3032d5c5 100644 >--- a/Source/WebCore/workers/service/ExtendableEvent.cpp >+++ b/Source/WebCore/workers/service/ExtendableEvent.cpp >@@ -51,11 +51,11 @@ ExtendableEvent::~ExtendableEvent() > ExceptionOr<void> ExtendableEvent::waitUntil(Ref<DOMPromise>&& promise) > { > if (!isTrusted()) >- return Exception { InvalidStateError, ASCIILiteral("Event is not trusted") }; >+ return Exception { InvalidStateError, "Event is not trusted"_s }; > > // If the pending promises count is zero and the dispatch flag is unset, throw an "InvalidStateError" DOMException. > if (!m_pendingPromiseCount && !isBeingDispatched()) >- return Exception { InvalidStateError, ASCIILiteral("Event is no longer being dispatched and has no pending promises") }; >+ return Exception { InvalidStateError, "Event is no longer being dispatched and has no pending promises"_s }; > > addExtendLifetimePromise(WTFMove(promise)); > return { }; >diff --git a/Source/WebCore/workers/service/FetchEvent.cpp b/Source/WebCore/workers/service/FetchEvent.cpp >index 18eff9e29e0939ab752851e0a696636464c607d2..7767ac7aabc4fbf6c705ae3e7c0c68eeae797107 100644 >--- a/Source/WebCore/workers/service/FetchEvent.cpp >+++ b/Source/WebCore/workers/service/FetchEvent.cpp >@@ -52,7 +52,7 @@ FetchEvent::FetchEvent(const AtomicString& type, Init&& initializer, IsTrusted i > FetchEvent::~FetchEvent() > { > if (auto callback = WTFMove(m_onResponse)) >- callback(makeUnexpected(ResourceError { errorDomainWebKitServiceWorker, 0, m_request->url(), ASCIILiteral("Fetch event is destroyed."), ResourceError::Type::Cancellation })); >+ callback(makeUnexpected(ResourceError { errorDomainWebKitServiceWorker, 0, m_request->url(), "Fetch event is destroyed."_s, ResourceError::Type::Cancellation })); > } > > ResourceError FetchEvent::createResponseError(const URL& url, const String& errorMessage) >@@ -64,10 +64,10 @@ ResourceError FetchEvent::createResponseError(const URL& url, const String& erro > ExceptionOr<void> FetchEvent::respondWith(Ref<DOMPromise>&& promise) > { > if (!isBeingDispatched()) >- return Exception { InvalidStateError, ASCIILiteral("Event is not being dispatched") }; >+ return Exception { InvalidStateError, "Event is not being dispatched"_s }; > > if (m_respondWithEntered) >- return Exception { InvalidStateError, ASCIILiteral("Event respondWith flag is set") }; >+ return Exception { InvalidStateError, "Event respondWith flag is set"_s }; > > m_respondPromise = WTFMove(promise); > addExtendLifetimePromise(*m_respondPromise); >@@ -118,12 +118,12 @@ void FetchEvent::promiseIsSettled() > ASSERT(m_respondPromise->status() == DOMPromise::Status::Fulfilled); > auto response = JSFetchResponse::toWrapped(m_respondPromise->globalObject()->globalExec()->vm(), m_respondPromise->result()); > if (!response) { >- respondWithError(createResponseError(m_request->url(), ASCIILiteral("Returned response is null."))); >+ respondWithError(createResponseError(m_request->url(), "Returned response is null."_s)); > return; > } > > if (response->isDisturbedOrLocked()) { >- respondWithError(createResponseError(m_request->url(), ASCIILiteral("Response is disturbed or locked."))); >+ respondWithError(createResponseError(m_request->url(), "Response is disturbed or locked."_s)); > return; > } > >diff --git a/Source/WebCore/workers/service/SWClientConnection.cpp b/Source/WebCore/workers/service/SWClientConnection.cpp >index b00975a0dc317cb3d0cc4be1a327c18d72ba0d0b..e56b05cca4d069e5e862263d0c8c558f93b2fa61 100644 >--- a/Source/WebCore/workers/service/SWClientConnection.cpp >+++ b/Source/WebCore/workers/service/SWClientConnection.cpp >@@ -255,7 +255,7 @@ void SWClientConnection::clearPendingJobs() > ScriptExecutionContext::postTaskTo(keyValue.value, [identifier = keyValue.key] (auto& context) { > if (auto* container = context.serviceWorkerContainer()) { > if (auto* job = container->job(identifier)) >- job->failedWithException(Exception { TypeError, ASCIILiteral("Internal error") }); >+ job->failedWithException(Exception { TypeError, "Internal error"_s }); > } > }); > } >diff --git a/Source/WebCore/workers/service/ServiceWorker.cpp b/Source/WebCore/workers/service/ServiceWorker.cpp >index 2d9decedd08251b00cbd0887be1aed2ad05d20ee..c2799f8dc47e4d9ebf99daf06b36eb6d90eb339b 100644 >--- a/Source/WebCore/workers/service/ServiceWorker.cpp >+++ b/Source/WebCore/workers/service/ServiceWorker.cpp >@@ -99,7 +99,7 @@ ExceptionOr<void> ServiceWorker::postMessage(ScriptExecutionContext& context, JS > return Exception { InvalidStateError }; > > if (state() == State::Redundant) >- return Exception { InvalidStateError, ASCIILiteral("Service Worker state is redundant") }; >+ return Exception { InvalidStateError, "Service Worker state is redundant"_s }; > > // FIXME: Invoke Run Service Worker algorithm with serviceWorker as the argument. > >diff --git a/Source/WebCore/workers/service/ServiceWorkerClients.cpp b/Source/WebCore/workers/service/ServiceWorkerClients.cpp >index 68247a288178e40af03470fdc1a76726dee9fad3..9652bd07b12514aa5dc5b64a38f017b685a80a3c 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerClients.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerClients.cpp >@@ -104,7 +104,7 @@ void ServiceWorkerClients::matchAll(ScriptExecutionContext& context, const Clien > void ServiceWorkerClients::openWindow(ScriptExecutionContext&, const String& url, Ref<DeferredPromise>&& promise) > { > UNUSED_PARAM(url); >- promise->reject(Exception { NotSupportedError, ASCIILiteral("clients.openWindow() is not yet supported") }); >+ promise->reject(Exception { NotSupportedError, "clients.openWindow() is not yet supported"_s }); > } > > void ServiceWorkerClients::claim(ScriptExecutionContext& context, Ref<DeferredPromise>&& promise) >@@ -114,7 +114,7 @@ void ServiceWorkerClients::claim(ScriptExecutionContext& context, Ref<DeferredPr > auto serviceWorkerIdentifier = serviceWorkerGlobalScope.thread().identifier(); > > if (!serviceWorkerGlobalScope.registration().active() || serviceWorkerGlobalScope.registration().active()->identifier() != serviceWorkerIdentifier) { >- promise->reject(Exception { InvalidStateError, ASCIILiteral("Service worker is not active") }); >+ promise->reject(Exception { InvalidStateError, "Service worker is not active"_s }); > return; > } > >diff --git a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >index 5edbc53b505b6a0b854d9f852c2f9638762f9f2d..12313af6c959581bcca88073ae32d487b7036b49 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerContainer.cpp >@@ -125,7 +125,7 @@ void ServiceWorkerContainer::addRegistration(const String& relativeScriptURL, co > } > > if (relativeScriptURL.isEmpty()) { >- promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() cannot be called with an empty script URL") }); >+ promise->reject(Exception { TypeError, "serviceWorker.register() cannot be called with an empty script URL"_s }); > return; > } > >@@ -134,20 +134,20 @@ void ServiceWorkerContainer::addRegistration(const String& relativeScriptURL, co > jobData.scriptURL = context->completeURL(relativeScriptURL); > if (!jobData.scriptURL.isValid()) { > CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: Invalid scriptURL"); >- promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a valid relative script URL") }); >+ promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a valid relative script URL"_s }); > return; > } > > if (!SchemeRegistry::canServiceWorkersHandleURLScheme(jobData.scriptURL.protocol().toStringWithoutCopying())) { > CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: Invalid scriptURL scheme is not HTTP or HTTPS"); >- promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS") }); >+ promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS"_s }); > return; > } > > String path = jobData.scriptURL.path(); > if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) { > CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scriptURL contains invalid character"); >- promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'") }); >+ promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'"_s }); > return; > } > >@@ -158,14 +158,14 @@ void ServiceWorkerContainer::addRegistration(const String& relativeScriptURL, co > > if (!jobData.scopeURL.isNull() && !SchemeRegistry::canServiceWorkersHandleURLScheme(jobData.scopeURL.protocol().toStringWithoutCopying())) { > CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scopeURL scheme is not HTTP or HTTPS"); >- promise->reject(Exception { TypeError, ASCIILiteral("Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS") }); >+ promise->reject(Exception { TypeError, "Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS"_s }); > return; > } > > path = jobData.scopeURL.path(); > if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) { > CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scopeURL contains invalid character"); >- promise->reject(Exception { TypeError, ASCIILiteral("Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'") }); >+ promise->reject(Exception { TypeError, "Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'"_s }); > return; > } > >@@ -260,7 +260,7 @@ void ServiceWorkerContainer::getRegistration(const String& clientURL, Ref<Deferr > > URL parsedURL = context->completeURL(clientURL); > if (!protocolHostAndPortAreEqual(parsedURL, context->url())) { >- promise->reject(Exception { SecurityError, ASCIILiteral("Origin of clientURL is not client's origin") }); >+ promise->reject(Exception { SecurityError, "Origin of clientURL is not client's origin"_s }); > return; > } > >@@ -498,7 +498,7 @@ void ServiceWorkerContainer::startScriptFetchForJob(ServiceWorkerJob& job, Fetch > if (!context) { > LOG_ERROR("ServiceWorkerContainer::jobResolvedWithRegistration called but the container's ScriptExecutionContext is gone"); > callOnMainThread([connection = m_swConnection, jobIdentifier = job.identifier(), registrationKey = job.data().registrationKey().isolatedCopy(), scriptURL = job.data().scriptURL.isolatedCopy()] { >- connection->failedFetchingScript(jobIdentifier, registrationKey, { errorDomainWebKitInternal, 0, scriptURL, ASCIILiteral("Attempt to fetch service worker script with no ScriptExecutionContext") }); >+ connection->failedFetchingScript(jobIdentifier, registrationKey, { errorDomainWebKitInternal, 0, scriptURL, "Attempt to fetch service worker script with no ScriptExecutionContext"_s }); > }); > jobDidFinish(job); > return; >diff --git a/Source/WebCore/workers/service/ServiceWorkerJob.cpp b/Source/WebCore/workers/service/ServiceWorkerJob.cpp >index 17b308ecbd3b9fb4a0e319684af9e1bbac2aef95..6d244a04f73ae85ace1ec211fa4421cfd3cc7fce 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerJob.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerJob.cpp >@@ -96,7 +96,7 @@ void ServiceWorkerJob::fetchScriptWithContext(ScriptExecutionContext& context, F > > ResourceRequest request { m_jobData.scriptURL }; > request.setInitiatorIdentifier("serviceWorkerScriptLoad:"); >- request.addHTTPHeaderField(ASCIILiteral("Service-Worker"), ASCIILiteral("script")); >+ request.addHTTPHeaderField("Service-Worker"_s, "script"_s); > > FetchOptions options; > options.mode = FetchOptions::Mode::SameOrigin; >@@ -115,9 +115,9 @@ void ServiceWorkerJob::didReceiveResponse(unsigned long, const ResourceResponse& > // Extract a MIME type from the response's header list. If this MIME type (ignoring parameters) is not a JavaScript MIME type, then: > if (!MIMETypeRegistry::isSupportedJavaScriptMIMEType(response.mimeType())) { > // Invoke Reject Job Promise with job and "SecurityError" DOMException. >- Exception exception { SecurityError, ASCIILiteral("MIME Type is not a JavaScript MIME type") }; >+ Exception exception { SecurityError, "MIME Type is not a JavaScript MIME type"_s }; > // Asynchronously complete these steps with a network error. >- ResourceError error { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Unexpected MIME type") }; >+ ResourceError error { errorDomainWebKitInternal, 0, response.url(), "Unexpected MIME type"_s }; > m_client->jobFailedLoadingScript(*this, WTFMove(error), WTFMove(exception)); > m_scriptLoader = nullptr; > } >@@ -133,8 +133,8 @@ void ServiceWorkerJob::didReceiveResponse(unsigned long, const ResourceResponse& > } > String scopeString = m_jobData.scopeURL.path(); > if (!scopeString.startsWith(maxScopeString)) { >- Exception exception { SecurityError, ASCIILiteral("Scope URL should start with the given script URL") }; >- ResourceError error { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Scope URL should start with the given script URL") }; >+ Exception exception { SecurityError, "Scope URL should start with the given script URL"_s }; >+ ResourceError error { errorDomainWebKitInternal, 0, response.url(), "Scope URL should start with the given script URL"_s }; > m_client->jobFailedLoadingScript(*this, WTFMove(error), WTFMove(exception)); > m_scriptLoader = nullptr; > } >diff --git a/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp b/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp >index f269b8e44a3a46b99f9fbe6caf280f6b554f30fc..515f8606ffa7b6d5f1aefd55ad698a939db35e85 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp >@@ -141,7 +141,7 @@ void ServiceWorkerRegistration::update(Ref<DeferredPromise>&& promise) > > auto* newestWorker = getNewestWorker(); > if (!newestWorker) { >- promise->reject(Exception(InvalidStateError, ASCIILiteral("newestWorker is null"))); >+ promise->reject(Exception(InvalidStateError, "newestWorker is null"_s)); > return; > } > >diff --git a/Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp b/Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp >index 82fbb1f2eee3ccf789b7facd8a3ce0e631c99210..9229ae242f400d50d3fe55e05599a317042a4978 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp >+++ b/Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp >@@ -49,13 +49,13 @@ bool ServiceWorkerWindowClient::isFocused() const > > void ServiceWorkerWindowClient::focus(Ref<DeferredPromise>&& promise) > { >- promise->reject(Exception { NotSupportedError, ASCIILiteral("windowClient.focus() is not yet supported") }); >+ promise->reject(Exception { NotSupportedError, "windowClient.focus() is not yet supported"_s }); > } > > void ServiceWorkerWindowClient::navigate(const String& url, Ref<DeferredPromise>&& promise) > { > UNUSED_PARAM(url); >- promise->reject(Exception { NotSupportedError, ASCIILiteral("windowClient.navigate() is not yet supported") }); >+ promise->reject(Exception { NotSupportedError, "windowClient.navigate() is not yet supported"_s }); > } > > } // namespace WebCore >diff --git a/Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h b/Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h >index dbab71784500ded97165a999cadaded407fe35b6..4bcd0717ec3c6415660d18c6ab80bccaa8c16c80 100644 >--- a/Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h >+++ b/Source/WebCore/workers/service/context/ServiceWorkerDebuggable.h >@@ -45,7 +45,7 @@ class ServiceWorkerDebuggable final : public Inspector::RemoteInspectionTarget { > > Inspector::RemoteControllableTarget::Type type() const final { return Inspector::RemoteControllableTarget::Type::ServiceWorker; } > >- String name() const final { return ASCIILiteral("ServiceWorker"); } >+ String name() const final { return "ServiceWorker"_s; } > String url() const final { return m_scopeURL; } > bool hasLocalDebugger() const final { return false; } > >diff --git a/Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp b/Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp >index ea6e023fd963ded9a417f035b4d1421db573da9e..416b05fef916d895cc60b82150290a71444f7a42 100644 >--- a/Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp >+++ b/Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp >@@ -130,7 +130,7 @@ void dispatchFetchEvent(Ref<Client>&& client, ServiceWorkerGlobalScope& globalSc > > if (!event->respondWithEntered()) { > if (event->defaultPrevented()) { >- client->didFail(ResourceError { errorDomainWebKitInternal, 0, requestURL, ASCIILiteral("Fetch event was canceled") }); >+ client->didFail(ResourceError { errorDomainWebKitInternal, 0, requestURL, "Fetch event was canceled"_s }); > return; > } > client->didNotHandle(); >diff --git a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >index e4c3ae8bfbf96443521f790ed901d513a62b0fa1..265a963d7c8247ef1bb08ce062fbc99495c69ec5 100644 >--- a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >+++ b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >@@ -309,7 +309,7 @@ void RegistrationDatabase::doPushChanges(Vector<ServiceWorkerContextData>&& data > SQLiteTransaction transaction(*m_database); > transaction.begin(); > >- SQLiteStatement sql(*m_database, ASCIILiteral("INSERT INTO Records VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")); >+ SQLiteStatement sql(*m_database, "INSERT INTO Records VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"_s); > if (sql.prepare() != SQLITE_OK) { > RELEASE_LOG_ERROR(ServiceWorker, "Failed to prepare statement to store registration data into records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg()); > return; >@@ -360,7 +360,7 @@ String RegistrationDatabase::importRecords() > { > ASSERT(!isMainThread()); > >- SQLiteStatement sql(*m_database, ASCIILiteral("SELECT * FROM Records;")); >+ 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()); > >diff --git a/Source/WebCore/workers/service/server/SWServerJobQueue.cpp b/Source/WebCore/workers/service/server/SWServerJobQueue.cpp >index 5cab0c8e9be6eccce97da17600d64ce9c7fb2878..d8a85b0ad33c4839d92c5b15341a8be1ee02fe89 100644 >--- a/Source/WebCore/workers/service/server/SWServerJobQueue.cpp >+++ b/Source/WebCore/workers/service/server/SWServerJobQueue.cpp >@@ -255,15 +255,15 @@ void SWServerJobQueue::runRegisterJob(const ServiceWorkerJobData& job) > ASSERT(job.type == ServiceWorkerJobType::Register); > > if (!shouldTreatAsPotentiallyTrustworthy(job.scriptURL) && !SchemeRegistry::isServiceWorkerContainerCustomScheme(job.scriptURL.protocol().toStringWithoutCopying())) >- return rejectCurrentJob(ExceptionData { SecurityError, ASCIILiteral("Script URL is not potentially trustworthy") }); >+ return rejectCurrentJob(ExceptionData { SecurityError, "Script URL is not potentially trustworthy"_s }); > > // If the origin of job's script url is not job's referrer's origin, then: > if (!protocolHostAndPortAreEqual(job.scriptURL, job.clientCreationURL)) >- return rejectCurrentJob(ExceptionData { SecurityError, ASCIILiteral("Script origin does not match the registering client's origin") }); >+ return rejectCurrentJob(ExceptionData { SecurityError, "Script origin does not match the registering client's origin"_s }); > > // If the origin of job's scope url is not job's referrer's origin, then: > if (!protocolHostAndPortAreEqual(job.scopeURL, job.clientCreationURL)) >- return rejectCurrentJob(ExceptionData { SecurityError, ASCIILiteral("Scope origin does not match the registering client's origin") }); >+ return rejectCurrentJob(ExceptionData { SecurityError, "Scope origin does not match the registering client's origin"_s }); > > // If registration is not null (in our parlance "empty"), then: > if (auto* registration = m_server.getRegistration(m_registrationKey)) { >@@ -294,7 +294,7 @@ void SWServerJobQueue::runUnregisterJob(const ServiceWorkerJobData& job) > { > // If the origin of job's scope url is not job's client's origin, then: > if (!protocolHostAndPortAreEqual(job.scopeURL, job.clientCreationURL)) >- return rejectCurrentJob(ExceptionData { SecurityError, ASCIILiteral("Origin of scope URL does not match the client's origin") }); >+ return rejectCurrentJob(ExceptionData { SecurityError, "Origin of scope URL does not match the client's origin"_s }); > > // Let registration be the result of running "Get Registration" algorithm passing job's scope url as the argument. > auto* registration = m_server.getRegistration(m_registrationKey); >@@ -326,16 +326,16 @@ void SWServerJobQueue::runUpdateJob(const ServiceWorkerJobData& job) > > // If registration is null (in our parlance "empty") or registration's uninstalling flag is set, then: > if (!registration) >- return rejectCurrentJob(ExceptionData { TypeError, ASCIILiteral("Cannot update a null/nonexistent service worker registration") }); >+ return rejectCurrentJob(ExceptionData { TypeError, "Cannot update a null/nonexistent service worker registration"_s }); > if (registration->isUninstalling()) >- return rejectCurrentJob(ExceptionData { TypeError, ASCIILiteral("Cannot update a service worker registration that is uninstalling") }); >+ return rejectCurrentJob(ExceptionData { TypeError, "Cannot update a service worker registration that is uninstalling"_s }); > > // Let newestWorker be the result of running Get Newest Worker algorithm passing registration as the argument. > auto* newestWorker = registration->getNewestWorker(); > > // If job's type is update, and newestWorker's script url does not equal job's script url with the exclude fragments flag set, then: > if (job.type == ServiceWorkerJobType::Update && newestWorker && !equalIgnoringFragmentIdentifier(job.scriptURL, newestWorker->scriptURL())) >- return rejectCurrentJob(ExceptionData { TypeError, ASCIILiteral("Cannot update a service worker with a requested script URL whose newest worker has a different script URL") }); >+ return rejectCurrentJob(ExceptionData { TypeError, "Cannot update a service worker with a requested script URL whose newest worker has a different script URL"_s }); > > FetchOptions::Cache cachePolicy = FetchOptions::Cache::Default; > // Set request's cache mode to "no-cache" if any of the following are true: >diff --git a/Source/WebCore/xml/XMLErrors.cpp b/Source/WebCore/xml/XMLErrors.cpp >index b1432d1d09920d044a61777fa2fe57c2c7d33a29..b1c716d0f9938d53adc5d224754b2364ee908ba0 100644 >--- a/Source/WebCore/xml/XMLErrors.cpp >+++ b/Source/WebCore/xml/XMLErrors.cpp >@@ -97,7 +97,7 @@ static inline Ref<Element> createXHTMLParserErrorHeader(Document& document, cons > > auto h3 = HTMLHeadingElement::create(h3Tag, document); > reportElement->parserAppendChild(h3); >- h3->parserAppendChild(Text::create(document, ASCIILiteral("This page contains the following errors:"))); >+ h3->parserAppendChild(Text::create(document, "This page contains the following errors:"_s)); > > auto fixed = HTMLDivElement::create(document); > Vector<Attribute> fixedAttributes; >@@ -109,7 +109,7 @@ static inline Ref<Element> createXHTMLParserErrorHeader(Document& document, cons > > h3 = HTMLHeadingElement::create(h3Tag, document); > reportElement->parserAppendChild(h3); >- h3->parserAppendChild(Text::create(document, ASCIILiteral("Below is a rendering of the page up to the first error."))); >+ h3->parserAppendChild(Text::create(document, "Below is a rendering of the page up to the first error."_s)); > > return reportElement; > } >@@ -133,7 +133,7 @@ void XMLErrors::insertErrorMessageBlock() > auto head = HTMLHeadElement::create(m_document); > auto style = HTMLStyleElement::create(m_document); > head->parserAppendChild(style); >- style->parserAppendChild(m_document.createTextNode(ASCIILiteral("html, body { height: 100% } parsererror + svg { width: 100%; height: 100% }"))); >+ style->parserAppendChild(m_document.createTextNode("html, body { height: 100% } parsererror + svg { width: 100%; height: 100% }"_s)); > style->finishParsingChildren(); > rootElement->parserAppendChild(head); > auto body = HTMLBodyElement::create(m_document); >@@ -157,7 +157,7 @@ void XMLErrors::insertErrorMessageBlock() > attributes.append(Attribute(styleAttr, "white-space: normal")); > auto paragraph = HTMLParagraphElement::create(m_document); > paragraph->parserSetAttributes(attributes); >- paragraph->parserAppendChild(m_document.createTextNode(ASCIILiteral("This document was created as the result of an XSL transformation. The line and column numbers given are from the transformed result."))); >+ paragraph->parserAppendChild(m_document.createTextNode("This document was created as the result of an XSL transformation. The line and column numbers given are from the transformed result."_s)); > reportElement->parserAppendChild(paragraph); > } > #endif >diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp >index 53c0f23ce9254fc862d9df945e210e806f8da20c..e766239dca94029d753f0988511ac5b90c7f7ada 100644 >--- a/Source/WebCore/xml/XMLHttpRequest.cpp >+++ b/Source/WebCore/xml/XMLHttpRequest.cpp >@@ -447,11 +447,11 @@ ExceptionOr<void> XMLHttpRequest::send(Document& document) > if (!m_requestHeaders.contains(HTTPHeaderName::ContentType)) { > #if ENABLE(DASHBOARD_SUPPORT) > if (usesDashboardBackwardCompatibilityMode()) >- m_requestHeaders.set(HTTPHeaderName::ContentType, ASCIILiteral("application/x-www-form-urlencoded")); >+ m_requestHeaders.set(HTTPHeaderName::ContentType, "application/x-www-form-urlencoded"_s); > else > #endif > // FIXME: this should include the charset used for encoding. >- m_requestHeaders.set(HTTPHeaderName::ContentType, document.isHTMLDocument() ? ASCIILiteral("text/html;charset=UTF-8") : ASCIILiteral("application/xml;charset=UTF-8")); >+ m_requestHeaders.set(HTTPHeaderName::ContentType, document.isHTMLDocument() ? "text/html;charset=UTF-8"_s : "application/xml;charset=UTF-8"_s); > } > > // FIXME: According to XMLHttpRequest Level 2, this should use the Document.innerHTML algorithm >@@ -474,7 +474,7 @@ ExceptionOr<void> XMLHttpRequest::send(const String& body) > if (contentType.isNull()) { > #if ENABLE(DASHBOARD_SUPPORT) > if (usesDashboardBackwardCompatibilityMode()) >- m_requestHeaders.set(HTTPHeaderName::ContentType, ASCIILiteral("application/x-www-form-urlencoded")); >+ m_requestHeaders.set(HTTPHeaderName::ContentType, "application/x-www-form-urlencoded"_s); > else > #endif > m_requestHeaders.set(HTTPHeaderName::ContentType, HTTPHeaderValues::textPlainContentType()); >@@ -531,7 +531,7 @@ ExceptionOr<void> XMLHttpRequest::send(DOMFormData& body) > > ExceptionOr<void> XMLHttpRequest::send(ArrayBuffer& body) > { >- ASCIILiteral consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead."); >+ ASCIILiteral consoleMessage { "ArrayBuffer is deprecated in XMLHttpRequest.send(). Use ArrayBufferView instead."_s }; > scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, consoleMessage); > return sendBytesData(body.data(), body.byteLength()); > } >@@ -846,7 +846,7 @@ String XMLHttpRequest::responseMIMEType() const > else > mimeType = m_response.mimeType(); > if (mimeType.isEmpty()) >- mimeType = ASCIILiteral("text/xml"); >+ mimeType = "text/xml"_s; > } > return mimeType; > } >diff --git a/Source/WebCore/xml/XMLTreeViewer.cpp b/Source/WebCore/xml/XMLTreeViewer.cpp >index d641d76cb0d1a2f9e324181218681af07b177dbe..93deb8e6d3c4448e1dabe0c7ee2a403002a5e1c3 100644 >--- a/Source/WebCore/xml/XMLTreeViewer.cpp >+++ b/Source/WebCore/xml/XMLTreeViewer.cpp >@@ -61,7 +61,7 @@ void XMLTreeViewer::transformDocumentToTreeView() > > String cssString = StringImpl::createWithoutCopying(XMLViewer_css, sizeof(XMLViewer_css)); > auto text = m_document.createTextNode(cssString); >- m_document.getElementById(String(ASCIILiteral("xml-viewer-style")))->appendChild(text); >+ m_document.getElementById(String("xml-viewer-style"_s))->appendChild(text); > m_document.styleScope().didChangeActiveStyleSheetCandidates(); > } > >diff --git a/Source/WebCore/xml/XPathPredicate.cpp b/Source/WebCore/xml/XPathPredicate.cpp >index ee7cccdbaad5fea155f0836ea4b67eeadddfb02b..04615c3d5f0313106938faa05fb39c99ce123b5c 100644 >--- a/Source/WebCore/xml/XPathPredicate.cpp >+++ b/Source/WebCore/xml/XPathPredicate.cpp >@@ -263,7 +263,7 @@ bool evaluatePredicate(const Expression& expression) > > // foo[3] means foo[position()=3] > if (result.isNumber()) >- return EqTestOp(EqTestOp::OP_EQ, Function::create(ASCIILiteral("position")), std::make_unique<Number>(result.toNumber())).evaluate().toBoolean(); >+ return EqTestOp(EqTestOp::OP_EQ, Function::create("position"_s), std::make_unique<Number>(result.toNumber())).evaluate().toBoolean(); > > return result.toBoolean(); > } >diff --git a/Source/WebCore/xml/XPathValue.cpp b/Source/WebCore/xml/XPathValue.cpp >index 14095053aeef6a3d7816db319d5368de1744e38d..060512105ceaeb3af90c46ed68fe9c8aee93028d 100644 >--- a/Source/WebCore/xml/XPathValue.cpp >+++ b/Source/WebCore/xml/XPathValue.cpp >@@ -121,14 +121,14 @@ String Value::toString() const > return m_data->string; > case NumberValue: > if (std::isnan(m_number)) >- return ASCIILiteral("NaN"); >+ return "NaN"_s; > if (m_number == 0) >- return ASCIILiteral("0"); >+ return "0"_s; > if (std::isinf(m_number)) >- return ASCIILiteral(std::signbit(m_number) ? "-Infinity" : "Infinity"); >+ return std::signbit(m_number) ? "-Infinity"_s : "Infinity"_s; > return String::number(m_number); > case BooleanValue: >- return ASCIILiteral(m_bool ? "true" : "false"); >+ return m_bool ? "true"_s : "false"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h b/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h >index 76862683fbbdbe9a90dd132180975c81eebe30c1..f08c927b402258157f0740392a105963a7cc0fcd 100644 >--- a/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h >+++ b/Source/WebCore/xml/parser/CharacterReferenceParserInlines.h >@@ -85,21 +85,21 @@ bool consumeCharacterReference(SegmentedString& source, StringBuilder& decodedCh > state = Decimal; > goto Decimal; > } >- source.pushBack(ASCIILiteral("#")); >+ source.pushBack("#"_s); > return false; > case MaybeHexLowerCaseX: > if (isASCIIHexDigit(character)) { > state = Hex; > goto Hex; > } >- source.pushBack(ASCIILiteral("#x")); >+ source.pushBack("#x"_s); > return false; > case MaybeHexUpperCaseX: > if (isASCIIHexDigit(character)) { > state = Hex; > goto Hex; > } >- source.pushBack(ASCIILiteral("#X")); >+ source.pushBack("#X"_s); > return false; > case Hex: > Hex: >diff --git a/Source/WebDriver/CommandResult.cpp b/Source/WebDriver/CommandResult.cpp >index cb9add5da7bfc7ff12dd206d16f370a220f0cf77..e0f85fa3b05768a0083056aac2681229703e7b31 100644 >--- a/Source/WebDriver/CommandResult.cpp >+++ b/Source/WebDriver/CommandResult.cpp >@@ -169,51 +169,51 @@ String CommandResult::errorString() const > > switch (m_errorCode.value()) { > case ErrorCode::ElementClickIntercepted: >- return ASCIILiteral("element click intercepted"); >+ return "element click intercepted"_s; > case ErrorCode::ElementNotSelectable: >- return ASCIILiteral("element not selectable"); >+ return "element not selectable"_s; > case ErrorCode::ElementNotInteractable: >- return ASCIILiteral("element not interactable"); >+ return "element not interactable"_s; > case ErrorCode::InvalidArgument: >- return ASCIILiteral("invalid argument"); >+ return "invalid argument"_s; > case ErrorCode::InvalidElementState: >- return ASCIILiteral("invalid element state"); >+ return "invalid element state"_s; > case ErrorCode::InvalidSelector: >- return ASCIILiteral("invalid selector"); >+ return "invalid selector"_s; > case ErrorCode::InvalidSessionID: >- return ASCIILiteral("invalid session id"); >+ return "invalid session id"_s; > case ErrorCode::JavascriptError: >- return ASCIILiteral("javascript error"); >+ return "javascript error"_s; > case ErrorCode::NoSuchAlert: >- return ASCIILiteral("no such alert"); >+ return "no such alert"_s; > case ErrorCode::NoSuchCookie: >- return ASCIILiteral("no such cookie"); >+ return "no such cookie"_s; > case ErrorCode::NoSuchElement: >- return ASCIILiteral("no such element"); >+ return "no such element"_s; > case ErrorCode::NoSuchFrame: >- return ASCIILiteral("no such frame"); >+ return "no such frame"_s; > case ErrorCode::NoSuchWindow: >- return ASCIILiteral("no such window"); >+ return "no such window"_s; > case ErrorCode::ScriptTimeout: >- return ASCIILiteral("script timeout"); >+ return "script timeout"_s; > case ErrorCode::SessionNotCreated: >- return ASCIILiteral("session not created"); >+ return "session not created"_s; > case ErrorCode::StaleElementReference: >- return ASCIILiteral("stale element reference"); >+ return "stale element reference"_s; > case ErrorCode::Timeout: >- return ASCIILiteral("timeout"); >+ return "timeout"_s; > case ErrorCode::UnableToCaptureScreen: >- return ASCIILiteral("unable to capture screen"); >+ return "unable to capture screen"_s; > case ErrorCode::MoveTargetOutOfBounds: >- return ASCIILiteral("move target out of bounds"); >+ return "move target out of bounds"_s; > case ErrorCode::UnexpectedAlertOpen: >- return ASCIILiteral("unexpected alert open"); >+ return "unexpected alert open"_s; > case ErrorCode::UnknownCommand: >- return ASCIILiteral("unknown command"); >+ return "unknown command"_s; > case ErrorCode::UnknownError: >- return ASCIILiteral("unknown error"); >+ return "unknown error"_s; > case ErrorCode::UnsupportedOperation: >- return ASCIILiteral("unsupported operation"); >+ return "unsupported operation"_s; > } > > ASSERT_NOT_REACHED(); >diff --git a/Source/WebDriver/Session.cpp b/Source/WebDriver/Session.cpp >index 53356965fb1d7a95de51d31fc3fd6bc0ceb0cbfa..5d546f3595ad2cbc1ba3e7f70d502020ab7a0d01 100644 >--- a/Source/WebDriver/Session.cpp >+++ b/Source/WebDriver/Session.cpp >@@ -47,7 +47,7 @@ const String& Session::webElementIdentifier() > { > // The web element identifier is a constant defined by the spec in Section 11 Elements. > // https://www.w3.org/TR/webdriver/#elements >- static NeverDestroyed<String> webElementID { ASCIILiteral("element-6066-11e4-a52e-4f735466cecf") }; >+ static NeverDestroyed<String> webElementID { "element-6066-11e4-a52e-4f735466cecf"_s }; > return webElementID; > } > >@@ -126,9 +126,9 @@ void Session::close(Function<void (CommandResult&&)>&& completionHandler) > void Session::getTimeouts(Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setInteger(ASCIILiteral("script"), m_scriptTimeout.millisecondsAs<int>()); >- parameters->setInteger(ASCIILiteral("pageLoad"), m_pageLoadTimeout.millisecondsAs<int>()); >- parameters->setInteger(ASCIILiteral("implicit"), m_implicitWaitTimeout.millisecondsAs<int>()); >+ parameters->setInteger("script"_s, m_scriptTimeout.millisecondsAs<int>()); >+ parameters->setInteger("pageLoad"_s, m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setInteger("implicit"_s, m_implicitWaitTimeout.millisecondsAs<int>()); > completionHandler(CommandResult::success(WTFMove(parameters))); > } > >@@ -178,13 +178,13 @@ std::optional<String> Session::pageLoadStrategyString() const > void Session::createTopLevelBrowsingContext(Function<void (CommandResult&&)>&& completionHandler) > { > ASSERT(!m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("createBrowsingContext"), nullptr, [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ m_host->sendCommandToBackend("createBrowsingContext"_s, nullptr, [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String handle; >- if (!response.responseObject->getString(ASCIILiteral("handle"), handle)) { >+ if (!response.responseObject->getString("handle"_s, handle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -196,8 +196,8 @@ void Session::createTopLevelBrowsingContext(Function<void (CommandResult&&)>&& c > void Session::handleUserPrompts(Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("isShowingJavaScriptDialog"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("isShowingJavaScriptDialog"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -276,7 +276,7 @@ void Session::reportUnexpectedAlertOpen(Function<void (CommandResult&&)>&& compl > auto errorResult = CommandResult::fail(CommandResult::ErrorCode::UnexpectedAlertOpen); > if (alertText) { > RefPtr<JSON::Object> additonalData = JSON::Object::create(); >- additonalData->setString(ASCIILiteral("text"), alertText.value()); >+ additonalData->setString("text"_s, alertText.value()); > errorResult.setAdditionalErrorData(WTFMove(additonalData)); > } > completionHandler(WTFMove(errorResult)); >@@ -297,12 +297,12 @@ void Session::go(const String& url, Function<void (CommandResult&&)>&& completio > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("url"), url); >- parameters->setInteger(ASCIILiteral("pageLoadTimeout"), m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("url"_s, url); >+ parameters->setInteger("pageLoadTimeout"_s, m_pageLoadTimeout.millisecondsAs<int>()); > if (auto pageLoadStrategy = pageLoadStrategyString()) >- parameters->setString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy.value()); >- m_host->sendCommandToBackend(ASCIILiteral("navigateBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("pageLoadStrategy"_s, pageLoadStrategy.value()); >+ m_host->sendCommandToBackend("navigateBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -327,8 +327,8 @@ void Session::getCurrentURL(Function<void (CommandResult&&)>&& completionHandler > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("getBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("getBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -361,11 +361,11 @@ void Session::back(Function<void (CommandResult&&)>&& completionHandler) > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- parameters->setInteger(ASCIILiteral("pageLoadTimeout"), m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setInteger("pageLoadTimeout"_s, m_pageLoadTimeout.millisecondsAs<int>()); > if (auto pageLoadStrategy = pageLoadStrategyString()) >- parameters->setString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy.value()); >- m_host->sendCommandToBackend(ASCIILiteral("goBackInBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("pageLoadStrategy"_s, pageLoadStrategy.value()); >+ m_host->sendCommandToBackend("goBackInBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -389,11 +389,11 @@ void Session::forward(Function<void (CommandResult&&)>&& completionHandler) > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- parameters->setInteger(ASCIILiteral("pageLoadTimeout"), m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setInteger("pageLoadTimeout"_s, m_pageLoadTimeout.millisecondsAs<int>()); > if (auto pageLoadStrategy = pageLoadStrategyString()) >- parameters->setString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy.value()); >- m_host->sendCommandToBackend(ASCIILiteral("goForwardInBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("pageLoadStrategy"_s, pageLoadStrategy.value()); >+ m_host->sendCommandToBackend("goForwardInBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -417,11 +417,11 @@ void Session::refresh(Function<void (CommandResult&&)>&& completionHandler) > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- parameters->setInteger(ASCIILiteral("pageLoadTimeout"), m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setInteger("pageLoadTimeout"_s, m_pageLoadTimeout.millisecondsAs<int>()); > if (auto pageLoadStrategy = pageLoadStrategyString()) >- parameters->setString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy.value()); >- m_host->sendCommandToBackend(ASCIILiteral("reloadBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("pageLoadStrategy"_s, pageLoadStrategy.value()); >+ m_host->sendCommandToBackend("reloadBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -445,16 +445,16 @@ void Session::getTitle(Function<void (CommandResult&&)>&& completionHandler) > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ASCIILiteral("function() { return document.title; }")); >- parameters->setArray(ASCIILiteral("arguments"), JSON::Array::create()); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("function"_s, "function() { return document.title; }"_s); >+ parameters->setArray("arguments"_s, JSON::Array::create()); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -476,19 +476,19 @@ void Session::getWindowHandle(Function<void (CommandResult&&)>&& completionHandl > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("getBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("getBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > RefPtr<JSON::Object> browsingContext; >- if (!response.responseObject->getObject(ASCIILiteral("context"), browsingContext)) { >+ if (!response.responseObject->getObject("context"_s, browsingContext)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } > String handle; >- if (!browsingContext->getString(ASCIILiteral("handle"), handle)) { >+ if (!browsingContext->getString("handle"_s, handle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -499,8 +499,8 @@ void Session::getWindowHandle(Function<void (CommandResult&&)>&& completionHandl > void Session::closeTopLevelBrowsingContext(const String& toplevelBrowsingContext, Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), toplevelBrowsingContext); >- m_host->sendCommandToBackend(ASCIILiteral("closeBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("handle"_s, toplevelBrowsingContext); >+ m_host->sendCommandToBackend("closeBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (!m_host->isConnected()) { > // Closing the browsing context made the browser quit. > completionHandler(CommandResult::success(JSON::Array::create())); >@@ -542,8 +542,8 @@ void Session::closeWindow(Function<void (CommandResult&&)>&& completionHandler) > void Session::switchToWindow(const String& windowHandle, Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), windowHandle); >- m_host->sendCommandToBackend(ASCIILiteral("switchToBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), windowHandle, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, windowHandle); >+ m_host->sendCommandToBackend("switchToBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), windowHandle, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -555,13 +555,13 @@ void Session::switchToWindow(const String& windowHandle, Function<void (CommandR > > void Session::getWindowHandles(Function<void (CommandResult&&)>&& completionHandler) > { >- m_host->sendCommandToBackend(ASCIILiteral("getBrowsingContexts"), JSON::Object::create(), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ m_host->sendCommandToBackend("getBrowsingContexts"_s, JSON::Object::create(), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > RefPtr<JSON::Array> browsingContextArray; >- if (!response.responseObject->getArray(ASCIILiteral("contexts"), browsingContextArray)) { >+ if (!response.responseObject->getArray("contexts"_s, browsingContextArray)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -575,7 +575,7 @@ void Session::getWindowHandles(Function<void (CommandResult&&)>&& completionHand > } > > String handle; >- if (!browsingContext->getString(ASCIILiteral("handle"), handle)) { >+ if (!browsingContext->getString("handle"_s, handle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -605,9 +605,9 @@ void Session::switchToFrame(RefPtr<JSON::Value>&& frameID, Function<void (Comman > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); > > int frameIndex; > if (frameID->asInteger(frameIndex)) { >@@ -615,28 +615,28 @@ void Session::switchToFrame(RefPtr<JSON::Value>&& frameID, Function<void (Comman > completionHandler(CommandResult::fail(CommandResult::ErrorCode::NoSuchFrame)); > return; > } >- parameters->setInteger(ASCIILiteral("ordinal"), frameIndex); >+ parameters->setInteger("ordinal"_s, frameIndex); > } else { > String frameElementID = extractElementID(*frameID); > if (!frameElementID.isEmpty()) >- parameters->setString(ASCIILiteral("nodeHandle"), frameElementID); >+ parameters->setString("nodeHandle"_s, frameElementID); > else { > String frameName; > if (!frameID->asString(frameName)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::NoSuchFrame)); > return; > } >- parameters->setString(ASCIILiteral("name"), frameName); >+ parameters->setString("name"_s, frameName); > } > } > >- m_host->sendCommandToBackend(ASCIILiteral("resolveChildFrameHandle"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ m_host->sendCommandToBackend("resolveChildFrameHandle"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String frameHandle; >- if (!response.responseObject->getString(ASCIILiteral("result"), frameHandle)) { >+ if (!response.responseObject->getString("result"_s, frameHandle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -664,15 +664,15 @@ void Session::switchToParentFrame(Function<void (CommandResult&&)>&& completionH > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("resolveParentFrameHandle"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ m_host->sendCommandToBackend("resolveParentFrameHandle"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String frameHandle; >- if (!response.responseObject->getString(ASCIILiteral("result"), frameHandle)) { >+ if (!response.responseObject->getString("result"_s, frameHandle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -685,38 +685,38 @@ void Session::switchToParentFrame(Function<void (CommandResult&&)>&& completionH > void Session::getToplevelBrowsingContextRect(Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("getBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("getBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > RefPtr<JSON::Object> browsingContext; >- if (!response.responseObject->getObject(ASCIILiteral("context"), browsingContext)) { >+ if (!response.responseObject->getObject("context"_s, browsingContext)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } > RefPtr<JSON::Object> windowOrigin; > double x, y; >- if (!browsingContext->getObject(ASCIILiteral("windowOrigin"), windowOrigin) >- || !windowOrigin->getDouble(ASCIILiteral("x"), x) >- || !windowOrigin->getDouble(ASCIILiteral("y"), y)) { >+ if (!browsingContext->getObject("windowOrigin"_s, windowOrigin) >+ || !windowOrigin->getDouble("x"_s, x) >+ || !windowOrigin->getDouble("y"_s, y)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } > RefPtr<JSON::Object> windowSize; > double width, height; >- if (!browsingContext->getObject(ASCIILiteral("windowSize"), windowSize) >- || !windowSize->getDouble(ASCIILiteral("width"), width) >- || !windowSize->getDouble(ASCIILiteral("height"), height)) { >+ if (!browsingContext->getObject("windowSize"_s, windowSize) >+ || !windowSize->getDouble("width"_s, width) >+ || !windowSize->getDouble("height"_s, height)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } > auto windowRect = JSON::Object::create(); >- windowRect->setDouble(ASCIILiteral("x"), x); >- windowRect->setDouble(ASCIILiteral("y"), y); >- windowRect->setDouble(ASCIILiteral("width"), width); >- windowRect->setDouble(ASCIILiteral("height"), height); >+ windowRect->setDouble("x"_s, x); >+ windowRect->setDouble("y"_s, y); >+ windowRect->setDouble("width"_s, width); >+ windowRect->setDouble("height"_s, height); > completionHandler(CommandResult::success(WTFMove(windowRect))); > }); > } >@@ -751,20 +751,20 @@ void Session::setWindowRect(std::optional<double> x, std::optional<double> y, st > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); > if (x && y) { > RefPtr<JSON::Object> windowOrigin = JSON::Object::create(); > windowOrigin->setDouble("x", x.value()); > windowOrigin->setDouble("y", y.value()); >- parameters->setObject(ASCIILiteral("origin"), WTFMove(windowOrigin)); >+ parameters->setObject("origin"_s, WTFMove(windowOrigin)); > } > if (width && height) { > RefPtr<JSON::Object> windowSize = JSON::Object::create(); > windowSize->setDouble("width", width.value()); > windowSize->setDouble("height", height.value()); >- parameters->setObject(ASCIILiteral("size"), WTFMove(windowSize)); >+ parameters->setObject("size"_s, WTFMove(windowSize)); > } >- m_host->sendCommandToBackend(ASCIILiteral("setWindowFrameOfBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { >+ m_host->sendCommandToBackend("setWindowFrameOfBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -788,8 +788,8 @@ void Session::maximizeWindow(Function<void (CommandResult&&)>&& completionHandle > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("maximizeWindowOfBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("maximizeWindowOfBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -813,8 +813,8 @@ void Session::minimizeWindow(Function<void (CommandResult&&)>&& completionHandle > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("hideWindowOfBrowsingContext"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("hideWindowOfBrowsingContext"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) mutable { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -838,18 +838,18 @@ void Session::fullscreenWindow(Function<void (CommandResult&&)>&& completionHand > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), EnterFullscreenJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), JSON::Array::create()); >- parameters->setBoolean(ASCIILiteral("expectsImplicitCallbackArgument"), true); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("function"_s, EnterFullscreenJavaScript); >+ parameters->setArray("arguments"_s, JSON::Array::create()); >+ parameters->setBoolean("expectsImplicitCallbackArgument"_s, true); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -910,27 +910,27 @@ void Session::computeElementLayout(const String& elementID, OptionSet<ElementLay > ASSERT(m_toplevelBrowsingContext.value()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value_or(emptyString())); >- parameters->setString(ASCIILiteral("nodeHandle"), elementID); >- parameters->setBoolean(ASCIILiteral("scrollIntoViewIfNeeded"), options.contains(ElementLayoutOption::ScrollIntoViewIfNeeded)); >- parameters->setString(ASCIILiteral("coordinateSystem"), options.contains(ElementLayoutOption::UseViewportCoordinates) ? ASCIILiteral("LayoutViewport") : ASCIILiteral("Page")); >- m_host->sendCommandToBackend(ASCIILiteral("computeElementLayout"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value_or(emptyString())); >+ parameters->setString("nodeHandle"_s, elementID); >+ parameters->setBoolean("scrollIntoViewIfNeeded"_s, options.contains(ElementLayoutOption::ScrollIntoViewIfNeeded)); >+ parameters->setString("coordinateSystem"_s, options.contains(ElementLayoutOption::UseViewportCoordinates) ? "LayoutViewport"_s : "Page"_s); >+ m_host->sendCommandToBackend("computeElementLayout"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(std::nullopt, std::nullopt, false, WTFMove(response.responseObject)); > return; > } > RefPtr<JSON::Object> rectObject; >- if (!response.responseObject->getObject(ASCIILiteral("rect"), rectObject)) { >+ if (!response.responseObject->getObject("rect"_s, rectObject)) { > completionHandler(std::nullopt, std::nullopt, false, nullptr); > return; > } > std::optional<int> elementX; > std::optional<int> elementY; > RefPtr<JSON::Object> elementPosition; >- if (rectObject->getObject(ASCIILiteral("origin"), elementPosition)) { >+ if (rectObject->getObject("origin"_s, elementPosition)) { > int x, y; >- if (elementPosition->getInteger(ASCIILiteral("x"), x) && elementPosition->getInteger(ASCIILiteral("y"), y)) { >+ if (elementPosition->getInteger("x"_s, x) && elementPosition->getInteger("y"_s, y)) { > elementX = x; > elementY = y; > } >@@ -942,9 +942,9 @@ void Session::computeElementLayout(const String& elementID, OptionSet<ElementLay > std::optional<int> elementWidth; > std::optional<int> elementHeight; > RefPtr<JSON::Object> elementSize; >- if (rectObject->getObject(ASCIILiteral("size"), elementSize)) { >+ if (rectObject->getObject("size"_s, elementSize)) { > int width, height; >- if (elementSize->getInteger(ASCIILiteral("width"), width) && elementSize->getInteger(ASCIILiteral("height"), height)) { >+ if (elementSize->getInteger("width"_s, width) && elementSize->getInteger("height"_s, height)) { > elementWidth = width; > elementHeight = height; > } >@@ -956,18 +956,18 @@ void Session::computeElementLayout(const String& elementID, OptionSet<ElementLay > Rect rect = { { elementX.value(), elementY.value() }, { elementWidth.value(), elementHeight.value() } }; > > bool isObscured; >- if (!response.responseObject->getBoolean(ASCIILiteral("isObscured"), isObscured)) { >+ if (!response.responseObject->getBoolean("isObscured"_s, isObscured)) { > completionHandler(std::nullopt, std::nullopt, false, nullptr); > return; > } > RefPtr<JSON::Object> inViewCenterPointObject; >- if (!response.responseObject->getObject(ASCIILiteral("inViewCenterPoint"), inViewCenterPointObject)) { >+ if (!response.responseObject->getObject("inViewCenterPoint"_s, inViewCenterPointObject)) { > completionHandler(rect, std::nullopt, isObscured, nullptr); > return; > } > int inViewCenterPointX, inViewCenterPointY; >- if (!inViewCenterPointObject->getInteger(ASCIILiteral("x"), inViewCenterPointX) >- || !inViewCenterPointObject->getInteger(ASCIILiteral("y"), inViewCenterPointY)) { >+ if (!inViewCenterPointObject->getInteger("x"_s, inViewCenterPointX) >+ || !inViewCenterPointObject->getInteger("y"_s, inViewCenterPointY)) { > completionHandler(std::nullopt, std::nullopt, isObscured, nullptr); > return; > } >@@ -994,23 +994,23 @@ void Session::findElements(const String& strategy, const String& selector, FindE > arguments->pushString(JSON::Value::create(m_implicitWaitTimeout.milliseconds())->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), FindNodesJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- parameters->setBoolean(ASCIILiteral("expectsImplicitCallbackArgument"), true); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, FindNodesJavaScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ parameters->setBoolean("expectsImplicitCallbackArgument"_s, true); > // If there's an implicit wait, use one second more as callback timeout. > if (m_implicitWaitTimeout) >- parameters->setInteger(ASCIILiteral("callbackTimeout"), Seconds(m_implicitWaitTimeout + 1_s).millisecondsAs<int>()); >+ parameters->setInteger("callbackTimeout"_s, Seconds(m_implicitWaitTimeout + 1_s).millisecondsAs<int>()); > >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), mode, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), mode, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1062,16 +1062,16 @@ void Session::getActiveElement(Function<void (CommandResult&&)>&& completionHand > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ASCIILiteral("function() { return document.activeElement; }")); >- parameters->setArray(ASCIILiteral("arguments"), JSON::Array::create()); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("function"_s, "function() { return document.activeElement; }"_s); >+ parameters->setArray("arguments"_s, JSON::Array::create()); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1107,18 +1107,18 @@ void Session::isElementSelected(const String& elementID, Function<void (CommandR > arguments->pushString(JSON::Value::create("selected")->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ElementAttributeJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, ElementAttributeJavaScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1157,19 +1157,19 @@ void Session::getElementText(const String& elementID, Function<void (CommandResu > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); > // FIXME: Add an atom to properly implement this instead of just using innerText. >- parameters->setString(ASCIILiteral("function"), ASCIILiteral("function(element) { return element.innerText.replace(/^[^\\S\\xa0]+|[^\\S\\xa0]+$/g, '') }")); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("function"_s, "function(element) { return element.innerText.replace(/^[^\\S\\xa0]+|[^\\S\\xa0]+$/g, '') }"_s); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1199,18 +1199,18 @@ void Session::getElementTagName(const String& elementID, Function<void (CommandR > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ASCIILiteral("function(element) { return element.tagName.toLowerCase() }")); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, "function(element) { return element.tagName.toLowerCase() }"_s); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1242,10 +1242,10 @@ void Session::getElementRect(const String& elementID, Function<void (CommandResu > return; > } > RefPtr<JSON::Object> rectObject = JSON::Object::create(); >- rectObject->setInteger(ASCIILiteral("x"), rect.value().origin.x); >- rectObject->setInteger(ASCIILiteral("y"), rect.value().origin.y); >- rectObject->setInteger(ASCIILiteral("width"), rect.value().size.width); >- rectObject->setInteger(ASCIILiteral("height"), rect.value().size.height); >+ rectObject->setInteger("x"_s, rect.value().origin.x); >+ rectObject->setInteger("y"_s, rect.value().origin.y); >+ rectObject->setInteger("width"_s, rect.value().size.width); >+ rectObject->setInteger("height"_s, rect.value().size.height); > completionHandler(CommandResult::success(WTFMove(rectObject))); > }); > }); >@@ -1267,18 +1267,18 @@ void Session::isElementEnabled(const String& elementID, Function<void (CommandRe > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ASCIILiteral("function(element) { return element.disabled === undefined ? true : !element.disabled }")); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, "function(element) { return element.disabled === undefined ? true : !element.disabled }"_s); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1308,18 +1308,18 @@ void Session::isElementDisplayed(const String& elementID, Function<void (Command > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ElementDisplayedJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, ElementDisplayedJavaScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1350,18 +1350,18 @@ void Session::getElementAttribute(const String& elementID, const String& attribu > arguments->pushString(JSON::Value::create(attribute)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), ElementAttributeJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, ElementAttributeJavaScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1391,18 +1391,18 @@ void Session::getElementProperty(const String& elementID, const String& property > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), makeString("function(element) { return element.", property, "; }")); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, makeString("function(element) { return element.", property, "; }")); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1432,18 +1432,18 @@ void Session::getElementCSSValue(const String& elementID, const String& cssPrope > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), makeString("function(element) { return document.defaultView.getComputedStyle(element).getPropertyValue('", cssProperty, "'); }")); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, makeString("function(element) { return document.defaultView.getComputedStyle(element).getPropertyValue('", cssProperty, "'); }")); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1465,13 +1465,13 @@ void Session::waitForNavigationToComplete(Function<void (CommandResult&&)>&& com > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setInteger(ASCIILiteral("pageLoadTimeout"), m_pageLoadTimeout.millisecondsAs<int>()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setInteger("pageLoadTimeout"_s, m_pageLoadTimeout.millisecondsAs<int>()); > if (auto pageLoadStrategy = pageLoadStrategyString()) >- parameters->setString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy.value()); >- m_host->sendCommandToBackend(ASCIILiteral("waitForNavigationToComplete"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("pageLoadStrategy"_s, pageLoadStrategy.value()); >+ m_host->sendCommandToBackend("waitForNavigationToComplete"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > auto result = CommandResult::fail(WTFMove(response.responseObject)); > switch (result.errorCode()) { >@@ -1495,10 +1495,10 @@ void Session::waitForNavigationToComplete(Function<void (CommandResult&&)>&& com > void Session::selectOptionElement(const String& elementID, Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value_or(emptyString())); >- parameters->setString(ASCIILiteral("nodeHandle"), elementID); >- m_host->sendCommandToBackend(ASCIILiteral("selectOptionElement"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value_or(emptyString())); >+ parameters->setString("nodeHandle"_s, elementID); >+ m_host->sendCommandToBackend("selectOptionElement"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -1565,12 +1565,12 @@ void Session::elementClear(const String& elementID, Function<void (CommandResult > arguments->pushString(createElement(elementID)->toJSONString()); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), FormElementClearJavaScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, FormElementClearJavaScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -1586,131 +1586,131 @@ String Session::virtualKeyForKeySequence(const String& keySequence, KeyModifier& > modifier = KeyModifier::None; > switch (keySequence[0]) { > case 0xE001U: >- return ASCIILiteral("Cancel"); >+ return "Cancel"_s; > case 0xE002U: >- return ASCIILiteral("Help"); >+ return "Help"_s; > case 0xE003U: >- return ASCIILiteral("Backspace"); >+ return "Backspace"_s; > case 0xE004U: >- return ASCIILiteral("Tab"); >+ return "Tab"_s; > case 0xE005U: >- return ASCIILiteral("Clear"); >+ return "Clear"_s; > case 0xE006U: >- return ASCIILiteral("Return"); >+ return "Return"_s; > case 0xE007U: >- return ASCIILiteral("Enter"); >+ return "Enter"_s; > case 0xE008U: > case 0xE050U: > modifier = KeyModifier::Shift; >- return ASCIILiteral("Shift"); >+ return "Shift"_s; > case 0xE009U: > case 0xE051U: > modifier = KeyModifier::Control; >- return ASCIILiteral("Control"); >+ return "Control"_s; > case 0xE00AU: > case 0xE052U: > modifier = KeyModifier::Alternate; >- return ASCIILiteral("Alternate"); >+ return "Alternate"_s; > case 0xE00BU: >- return ASCIILiteral("Pause"); >+ return "Pause"_s; > case 0xE00CU: >- return ASCIILiteral("Escape"); >+ return "Escape"_s; > case 0xE00DU: >- return ASCIILiteral("Space"); >+ return "Space"_s; > case 0xE00EU: > case 0xE054U: >- return ASCIILiteral("PageUp"); >+ return "PageUp"_s; > case 0xE00FU: > case 0xE055U: >- return ASCIILiteral("PageDown"); >+ return "PageDown"_s; > case 0xE010U: > case 0xE056U: >- return ASCIILiteral("End"); >+ return "End"_s; > case 0xE011U: > case 0xE057U: >- return ASCIILiteral("Home"); >+ return "Home"_s; > case 0xE012U: > case 0xE058U: >- return ASCIILiteral("LeftArrow"); >+ return "LeftArrow"_s; > case 0xE013U: > case 0xE059U: >- return ASCIILiteral("UpArrow"); >+ return "UpArrow"_s; > case 0xE014U: > case 0xE05AU: >- return ASCIILiteral("RightArrow"); >+ return "RightArrow"_s; > case 0xE015U: > case 0xE05BU: >- return ASCIILiteral("DownArrow"); >+ return "DownArrow"_s; > case 0xE016U: > case 0xE05CU: >- return ASCIILiteral("Insert"); >+ return "Insert"_s; > case 0xE017U: > case 0xE05DU: >- return ASCIILiteral("Delete"); >+ return "Delete"_s; > case 0xE018U: >- return ASCIILiteral("Semicolon"); >+ return "Semicolon"_s; > case 0xE019U: >- return ASCIILiteral("Equals"); >+ return "Equals"_s; > case 0xE01AU: >- return ASCIILiteral("NumberPad0"); >+ return "NumberPad0"_s; > case 0xE01BU: >- return ASCIILiteral("NumberPad1"); >+ return "NumberPad1"_s; > case 0xE01CU: >- return ASCIILiteral("NumberPad2"); >+ return "NumberPad2"_s; > case 0xE01DU: >- return ASCIILiteral("NumberPad3"); >+ return "NumberPad3"_s; > case 0xE01EU: >- return ASCIILiteral("NumberPad4"); >+ return "NumberPad4"_s; > case 0xE01FU: >- return ASCIILiteral("NumberPad5"); >+ return "NumberPad5"_s; > case 0xE020U: >- return ASCIILiteral("NumberPad6"); >+ return "NumberPad6"_s; > case 0xE021U: >- return ASCIILiteral("NumberPad7"); >+ return "NumberPad7"_s; > case 0xE022U: >- return ASCIILiteral("NumberPad8"); >+ return "NumberPad8"_s; > case 0xE023U: >- return ASCIILiteral("NumberPad9"); >+ return "NumberPad9"_s; > case 0xE024U: >- return ASCIILiteral("NumberPadMultiply"); >+ return "NumberPadMultiply"_s; > case 0xE025U: >- return ASCIILiteral("NumberPadAdd"); >+ return "NumberPadAdd"_s; > case 0xE026U: >- return ASCIILiteral("NumberPadSeparator"); >+ return "NumberPadSeparator"_s; > case 0xE027U: >- return ASCIILiteral("NumberPadSubtract"); >+ return "NumberPadSubtract"_s; > case 0xE028U: >- return ASCIILiteral("NumberPadDecimal"); >+ return "NumberPadDecimal"_s; > case 0xE029U: >- return ASCIILiteral("NumberPadDivide"); >+ return "NumberPadDivide"_s; > case 0xE031U: >- return ASCIILiteral("Function1"); >+ return "Function1"_s; > case 0xE032U: >- return ASCIILiteral("Function2"); >+ return "Function2"_s; > case 0xE033U: >- return ASCIILiteral("Function3"); >+ return "Function3"_s; > case 0xE034U: >- return ASCIILiteral("Function4"); >+ return "Function4"_s; > case 0xE035U: >- return ASCIILiteral("Function5"); >+ return "Function5"_s; > case 0xE036U: >- return ASCIILiteral("Function6"); >+ return "Function6"_s; > case 0xE037U: >- return ASCIILiteral("Function7"); >+ return "Function7"_s; > case 0xE038U: >- return ASCIILiteral("Function8"); >+ return "Function8"_s; > case 0xE039U: >- return ASCIILiteral("Function9"); >+ return "Function9"_s; > case 0xE03AU: >- return ASCIILiteral("Function10"); >+ return "Function10"_s; > case 0xE03BU: >- return ASCIILiteral("Function11"); >+ return "Function11"_s; > case 0xE03CU: >- return ASCIILiteral("Function12"); >+ return "Function12"_s; > case 0xE03DU: > case 0xE053U: > modifier = KeyModifier::Meta; >- return ASCIILiteral("Meta"); >+ return "Meta"_s; > default: > break; > } >@@ -1746,12 +1746,12 @@ void Session::elementSendKeys(const String& elementID, Vector<String>&& keys, Fu > RefPtr<JSON::Array> arguments = JSON::Array::create(); > arguments->pushString(createElement(elementID)->toJSONString()); > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), focusScript); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), keys = WTFMove(keys), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, focusScript); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), keys = WTFMove(keys), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -1781,13 +1781,13 @@ void Session::elementSendKeys(const String& elementID, Vector<String>&& keys, Fu > // Reset sticky modifiers if needed. > if (stickyModifiers) { > if (stickyModifiers & KeyModifier::Shift) >- interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>(ASCIILiteral("Shift")) }); >+ interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>("Shift"_s) }); > if (stickyModifiers & KeyModifier::Control) >- interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>(ASCIILiteral("Control")) }); >+ interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>("Control"_s) }); > if (stickyModifiers & KeyModifier::Alternate) >- interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>(ASCIILiteral("Alternate")) }); >+ interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>("Alternate"_s) }); > if (stickyModifiers & KeyModifier::Meta) >- interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>(ASCIILiteral("Meta")) }); >+ interactions.append({ KeyboardInteractionType::KeyRelease, std::nullopt, std::optional<String>("Meta"_s) }); > } > > performKeyboardInteractions(WTFMove(interactions), WTFMove(completionHandler)); >@@ -1845,17 +1845,17 @@ void Session::executeScript(const String& script, RefPtr<JSON::Array>&& argument > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >- parameters->setString(ASCIILiteral("function"), "function(){" + script + '}'); >- parameters->setArray(ASCIILiteral("arguments"), WTFMove(arguments)); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); >+ parameters->setString("function"_s, "function(){" + script + '}'); >+ parameters->setArray("arguments"_s, WTFMove(arguments)); > if (mode == ExecuteScriptMode::Async) { >- parameters->setBoolean(ASCIILiteral("expectsImplicitCallbackArgument"), true); >+ parameters->setBoolean("expectsImplicitCallbackArgument"_s, true); > if (m_scriptTimeout) >- parameters->setInteger(ASCIILiteral("callbackTimeout"), m_scriptTimeout.millisecondsAs<int>()); >+ parameters->setInteger("callbackTimeout"_s, m_scriptTimeout.millisecondsAs<int>()); > } >- m_host->sendCommandToBackend(ASCIILiteral("evaluateJavaScriptFunction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ m_host->sendCommandToBackend("evaluateJavaScriptFunction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > auto result = CommandResult::fail(WTFMove(response.responseObject)); > if (result.errorCode() == CommandResult::ErrorCode::UnexpectedAlertOpen) >@@ -1865,7 +1865,7 @@ void Session::executeScript(const String& script, RefPtr<JSON::Array>&& argument > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("result"), valueString)) { >+ if (!response.responseObject->getString("result"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -1883,13 +1883,13 @@ static String mouseButtonForAutomation(MouseButton button) > { > switch (button) { > case MouseButton::None: >- return ASCIILiteral("None"); >+ return "None"_s; > case MouseButton::Left: >- return ASCIILiteral("Left"); >+ return "Left"_s; > case MouseButton::Middle: >- return ASCIILiteral("Middle"); >+ return "Middle"_s; > case MouseButton::Right: >- return ASCIILiteral("Right"); >+ return "Right"_s; > } > > RELEASE_ASSERT_NOT_REACHED(); >@@ -1898,31 +1898,31 @@ static String mouseButtonForAutomation(MouseButton button) > void Session::performMouseInteraction(int x, int y, MouseButton button, MouseInteraction interaction, Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); > RefPtr<JSON::Object> position = JSON::Object::create(); >- position->setInteger(ASCIILiteral("x"), x); >- position->setInteger(ASCIILiteral("y"), y); >- parameters->setObject(ASCIILiteral("position"), WTFMove(position)); >- parameters->setString(ASCIILiteral("button"), mouseButtonForAutomation(button)); >+ position->setInteger("x"_s, x); >+ position->setInteger("y"_s, y); >+ parameters->setObject("position"_s, WTFMove(position)); >+ parameters->setString("button"_s, mouseButtonForAutomation(button)); > switch (interaction) { > case MouseInteraction::Move: >- parameters->setString(ASCIILiteral("interaction"), ASCIILiteral("Move")); >+ parameters->setString("interaction"_s, "Move"_s); > break; > case MouseInteraction::Down: >- parameters->setString(ASCIILiteral("interaction"), ASCIILiteral("Down")); >+ parameters->setString("interaction"_s, "Down"_s); > break; > case MouseInteraction::Up: >- parameters->setString(ASCIILiteral("interaction"), ASCIILiteral("Up")); >+ parameters->setString("interaction"_s, "Up"_s); > break; > case MouseInteraction::SingleClick: >- parameters->setString(ASCIILiteral("interaction"), ASCIILiteral("SingleClick")); >+ parameters->setString("interaction"_s, "SingleClick"_s); > break; > case MouseInteraction::DoubleClick: >- parameters->setString(ASCIILiteral("interaction"), ASCIILiteral("DoubleClick")); >+ parameters->setString("interaction"_s, "DoubleClick"_s); > break; > } >- parameters->setArray(ASCIILiteral("modifiers"), JSON::Array::create()); >- m_host->sendCommandToBackend(ASCIILiteral("performMouseInteraction"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setArray("modifiers"_s, JSON::Array::create()); >+ m_host->sendCommandToBackend("performMouseInteraction"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -1934,29 +1934,29 @@ void Session::performMouseInteraction(int x, int y, MouseButton button, MouseInt > void Session::performKeyboardInteractions(Vector<KeyboardInteraction>&& interactions, Function<void (CommandResult&&)>&& completionHandler) > { > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); > RefPtr<JSON::Array> interactionsArray = JSON::Array::create(); > for (const auto& interaction : interactions) { > RefPtr<JSON::Object> interactionObject = JSON::Object::create(); > switch (interaction.type) { > case KeyboardInteractionType::KeyPress: >- interactionObject->setString(ASCIILiteral("type"), ASCIILiteral("KeyPress")); >+ interactionObject->setString("type"_s, "KeyPress"_s); > break; > case KeyboardInteractionType::KeyRelease: >- interactionObject->setString(ASCIILiteral("type"), ASCIILiteral("KeyRelease")); >+ interactionObject->setString("type"_s, "KeyRelease"_s); > break; > case KeyboardInteractionType::InsertByKey: >- interactionObject->setString(ASCIILiteral("type"), ASCIILiteral("InsertByKey")); >+ interactionObject->setString("type"_s, "InsertByKey"_s); > break; > } > if (interaction.key) >- interactionObject->setString(ASCIILiteral("key"), interaction.key.value()); >+ interactionObject->setString("key"_s, interaction.key.value()); > if (interaction.text) >- interactionObject->setString(ASCIILiteral("text"), interaction.text.value()); >+ interactionObject->setString("text"_s, interaction.text.value()); > interactionsArray->pushObject(WTFMove(interactionObject)); > } >- parameters->setArray(ASCIILiteral("interactions"), WTFMove(interactionsArray)); >- m_host->sendCommandToBackend(ASCIILiteral("performKeyboardInteractions"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setArray("interactions"_s, WTFMove(interactionsArray)); >+ m_host->sendCommandToBackend("performKeyboardInteractions"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -1968,28 +1968,28 @@ void Session::performKeyboardInteractions(Vector<KeyboardInteraction>&& interact > static std::optional<Session::Cookie> parseAutomationCookie(const JSON::Object& cookieObject) > { > Session::Cookie cookie; >- if (!cookieObject.getString(ASCIILiteral("name"), cookie.name)) >+ if (!cookieObject.getString("name"_s, cookie.name)) > return std::nullopt; >- if (!cookieObject.getString(ASCIILiteral("value"), cookie.value)) >+ if (!cookieObject.getString("value"_s, cookie.value)) > return std::nullopt; > > String path; >- if (cookieObject.getString(ASCIILiteral("path"), path)) >+ if (cookieObject.getString("path"_s, path)) > cookie.path = path; > String domain; >- if (cookieObject.getString(ASCIILiteral("domain"), domain)) >+ if (cookieObject.getString("domain"_s, domain)) > cookie.domain = domain; > bool secure; >- if (cookieObject.getBoolean(ASCIILiteral("secure"), secure)) >+ if (cookieObject.getBoolean("secure"_s, secure)) > cookie.secure = secure; > bool httpOnly; >- if (cookieObject.getBoolean(ASCIILiteral("httpOnly"), httpOnly)) >+ if (cookieObject.getBoolean("httpOnly"_s, httpOnly)) > cookie.httpOnly = httpOnly; > bool session = false; >- cookieObject.getBoolean(ASCIILiteral("session"), session); >+ cookieObject.getBoolean("session"_s, session); > if (!session) { > double expiry; >- if (cookieObject.getDouble(ASCIILiteral("expires"), expiry)) >+ if (cookieObject.getDouble("expires"_s, expiry)) > cookie.expiry = expiry; > } > >@@ -1999,32 +1999,32 @@ static std::optional<Session::Cookie> parseAutomationCookie(const JSON::Object& > static RefPtr<JSON::Object> builtAutomationCookie(const Session::Cookie& cookie) > { > RefPtr<JSON::Object> cookieObject = JSON::Object::create(); >- cookieObject->setString(ASCIILiteral("name"), cookie.name); >- cookieObject->setString(ASCIILiteral("value"), cookie.value); >- cookieObject->setString(ASCIILiteral("path"), cookie.path.value_or("/")); >- cookieObject->setString(ASCIILiteral("domain"), cookie.domain.value_or(emptyString())); >- cookieObject->setBoolean(ASCIILiteral("secure"), cookie.secure.value_or(false)); >- cookieObject->setBoolean(ASCIILiteral("httpOnly"), cookie.httpOnly.value_or(false)); >- cookieObject->setBoolean(ASCIILiteral("session"), !cookie.expiry); >- cookieObject->setDouble(ASCIILiteral("expires"), cookie.expiry.value_or(0)); >+ cookieObject->setString("name"_s, cookie.name); >+ cookieObject->setString("value"_s, cookie.value); >+ cookieObject->setString("path"_s, cookie.path.value_or("/")); >+ cookieObject->setString("domain"_s, cookie.domain.value_or(emptyString())); >+ cookieObject->setBoolean("secure"_s, cookie.secure.value_or(false)); >+ cookieObject->setBoolean("httpOnly"_s, cookie.httpOnly.value_or(false)); >+ cookieObject->setBoolean("session"_s, !cookie.expiry); >+ cookieObject->setDouble("expires"_s, cookie.expiry.value_or(0)); > return cookieObject; > } > > static RefPtr<JSON::Object> serializeCookie(const Session::Cookie& cookie) > { > RefPtr<JSON::Object> cookieObject = JSON::Object::create(); >- cookieObject->setString(ASCIILiteral("name"), cookie.name); >- cookieObject->setString(ASCIILiteral("value"), cookie.value); >+ cookieObject->setString("name"_s, cookie.name); >+ cookieObject->setString("value"_s, cookie.value); > if (cookie.path) >- cookieObject->setString(ASCIILiteral("path"), cookie.path.value()); >+ cookieObject->setString("path"_s, cookie.path.value()); > if (cookie.domain) >- cookieObject->setString(ASCIILiteral("domain"), cookie.domain.value()); >+ cookieObject->setString("domain"_s, cookie.domain.value()); > if (cookie.secure) >- cookieObject->setBoolean(ASCIILiteral("secure"), cookie.secure.value()); >+ cookieObject->setBoolean("secure"_s, cookie.secure.value()); > if (cookie.httpOnly) >- cookieObject->setBoolean(ASCIILiteral("httpOnly"), cookie.httpOnly.value()); >+ cookieObject->setBoolean("httpOnly"_s, cookie.httpOnly.value()); > if (cookie.expiry) >- cookieObject->setInteger(ASCIILiteral("expiry"), cookie.expiry.value()); >+ cookieObject->setInteger("expiry"_s, cookie.expiry.value()); > return cookieObject; > } > >@@ -2042,14 +2042,14 @@ void Session::getAllCookies(Function<void (CommandResult&&)>&& completionHandler > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("getAllCookies"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("getAllCookies"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > RefPtr<JSON::Array> cookiesArray; >- if (!response.responseObject->getArray(ASCIILiteral("cookies"), cookiesArray)) { >+ if (!response.responseObject->getArray("cookies"_s, cookiesArray)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -2088,7 +2088,7 @@ void Session::getNamedCookie(const String& name, Function<void (CommandResult&&) > RefPtr<JSON::Object> cookieObject; > cookieValue->asObject(cookieObject); > String cookieName; >- cookieObject->getString(ASCIILiteral("name"), cookieName); >+ cookieObject->getString("name"_s, cookieName); > if (cookieName == name) { > completionHandler(CommandResult::success(WTFMove(cookieObject))); > return; >@@ -2111,9 +2111,9 @@ void Session::addCookie(const Cookie& cookie, Function<void (CommandResult&&)>&& > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setObject(ASCIILiteral("cookie"), WTFMove(cookie)); >- m_host->sendCommandToBackend(ASCIILiteral("addSingleCookie"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setObject("cookie"_s, WTFMove(cookie)); >+ m_host->sendCommandToBackend("addSingleCookie"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2136,9 +2136,9 @@ void Session::deleteCookie(const String& name, Function<void (CommandResult&&)>& > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("cookieName"), name); >- m_host->sendCommandToBackend(ASCIILiteral("deleteSingleCookie"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("cookieName"_s, name); >+ m_host->sendCommandToBackend("deleteSingleCookie"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2161,8 +2161,8 @@ void Session::deleteAllCookies(Function<void (CommandResult&&)>&& completionHand > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("deleteAllCookies"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("deleteAllCookies"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2234,27 +2234,27 @@ void Session::performActions(Vector<Vector<Action>>&& actionsByTick, Function<vo > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); > RefPtr<JSON::Array> inputSources = JSON::Array::create(); > for (const auto& inputSource : m_activeInputSources) { > RefPtr<JSON::Object> inputSourceObject = JSON::Object::create(); >- inputSourceObject->setString(ASCIILiteral("sourceId"), inputSource.key); >- inputSourceObject->setString(ASCIILiteral("sourceType"), automationSourceType(inputSource.value.type)); >+ inputSourceObject->setString("sourceId"_s, inputSource.key); >+ inputSourceObject->setString("sourceType"_s, automationSourceType(inputSource.value.type)); > inputSources->pushObject(WTFMove(inputSourceObject)); > } >- parameters->setArray(ASCIILiteral("inputSources"), WTFMove(inputSources)); >+ parameters->setArray("inputSources"_s, WTFMove(inputSources)); > RefPtr<JSON::Array> steps = JSON::Array::create(); > for (const auto& tick : actionsByTick) { > RefPtr<JSON::Array> states = JSON::Array::create(); > for (const auto& action : tick) { > RefPtr<JSON::Object> state = JSON::Object::create(); > auto& currentState = inputSourceState(action.id); >- state->setString(ASCIILiteral("sourceId"), action.id); >+ state->setString("sourceId"_s, action.id); > switch (action.type) { > case Action::Type::None: >- state->setDouble(ASCIILiteral("duration"), action.duration.value()); >+ state->setDouble("duration"_s, action.duration.value()); > break; > case Action::Type::Pointer: { > switch (action.subtype) { >@@ -2265,18 +2265,18 @@ void Session::performActions(Vector<Vector<Action>>&& actionsByTick, Function<vo > currentState.pressedButton = action.button.value(); > break; > case Action::Subtype::PointerMove: { >- state->setString(ASCIILiteral("origin"), automationOriginType(action.origin->type)); >+ state->setString("origin"_s, automationOriginType(action.origin->type)); > RefPtr<JSON::Object> location = JSON::Object::create(); >- location->setInteger(ASCIILiteral("x"), action.x.value()); >- location->setInteger(ASCIILiteral("y"), action.y.value()); >- state->setObject(ASCIILiteral("location"), WTFMove(location)); >+ location->setInteger("x"_s, action.x.value()); >+ location->setInteger("y"_s, action.y.value()); >+ state->setObject("location"_s, WTFMove(location)); > if (action.origin->type == PointerOrigin::Type::Element) >- state->setString(ASCIILiteral("nodeHandle"), action.origin->elementID.value()); >+ state->setString("nodeHandle"_s, action.origin->elementID.value()); > FALLTHROUGH; > } > case Action::Subtype::Pause: > if (action.duration) >- state->setDouble(ASCIILiteral("duration"), action.duration.value()); >+ state->setDouble("duration"_s, action.duration.value()); > break; > case Action::Subtype::PointerCancel: > currentState.pressedButton = std::nullopt; >@@ -2286,7 +2286,7 @@ void Session::performActions(Vector<Vector<Action>>&& actionsByTick, Function<vo > ASSERT_NOT_REACHED(); > } > if (currentState.pressedButton) >- state->setString(ASCIILiteral("pressedButton"), mouseButtonForAutomation(currentState.pressedButton.value())); >+ state->setString("pressedButton"_s, mouseButtonForAutomation(currentState.pressedButton.value())); > break; > } > case Action::Type::Key: >@@ -2308,7 +2308,7 @@ void Session::performActions(Vector<Vector<Action>>&& actionsByTick, Function<vo > } > case Action::Subtype::Pause: > if (action.duration) >- state->setDouble(ASCIILiteral("duration"), action.duration.value()); >+ state->setDouble("duration"_s, action.duration.value()); > break; > case Action::Subtype::PointerUp: > case Action::Subtype::PointerDown: >@@ -2317,20 +2317,20 @@ void Session::performActions(Vector<Vector<Action>>&& actionsByTick, Function<vo > ASSERT_NOT_REACHED(); > } > if (currentState.pressedKey) >- state->setString(ASCIILiteral("pressedCharKey"), currentState.pressedKey.value()); >+ state->setString("pressedCharKey"_s, currentState.pressedKey.value()); > if (currentState.pressedVirtualKey) >- state->setString(ASCIILiteral("pressedVirtualKey"), currentState.pressedVirtualKey.value()); >+ state->setString("pressedVirtualKey"_s, currentState.pressedVirtualKey.value()); > break; > } > states->pushObject(WTFMove(state)); > } > RefPtr<JSON::Object> stepStates = JSON::Object::create(); >- stepStates->setArray(ASCIILiteral("states"), WTFMove(states)); >+ stepStates->setArray("states"_s, WTFMove(states)); > steps->pushObject(WTFMove(stepStates)); > } > >- parameters->setArray(ASCIILiteral("steps"), WTFMove(steps)); >- m_host->sendCommandToBackend(ASCIILiteral("performInteractionSequence"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) { >+ parameters->setArray("steps"_s, WTFMove(steps)); >+ m_host->sendCommandToBackend("performInteractionSequence"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2351,8 +2351,8 @@ void Session::releaseActions(Function<void (CommandResult&&)>&& completionHandle > m_inputStateTable.clear(); > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("cancelInteractionSequence"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("cancelInteractionSequence"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2369,8 +2369,8 @@ void Session::dismissAlert(Function<void (CommandResult&&)>&& completionHandler) > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("dismissCurrentJavaScriptDialog"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("dismissCurrentJavaScriptDialog"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2387,8 +2387,8 @@ void Session::acceptAlert(Function<void (CommandResult&&)>&& completionHandler) > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("acceptCurrentJavaScriptDialog"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("acceptCurrentJavaScriptDialog"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2405,14 +2405,14 @@ void Session::getAlertText(Function<void (CommandResult&&)>&& completionHandler) > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- m_host->sendCommandToBackend(ASCIILiteral("messageOfCurrentJavaScriptDialog"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ m_host->sendCommandToBackend("messageOfCurrentJavaScriptDialog"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String valueString; >- if (!response.responseObject->getString(ASCIILiteral("message"), valueString)) { >+ if (!response.responseObject->getString("message"_s, valueString)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >@@ -2428,9 +2428,9 @@ void Session::sendAlertText(const String& text, Function<void (CommandResult&&)> > } > > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("browsingContextHandle"), m_toplevelBrowsingContext.value()); >- parameters->setString(ASCIILiteral("userInput"), text); >- m_host->sendCommandToBackend(ASCIILiteral("setUserInputForCurrentJavaScriptPrompt"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { >+ parameters->setString("browsingContextHandle"_s, m_toplevelBrowsingContext.value()); >+ parameters->setString("userInput"_s, text); >+ m_host->sendCommandToBackend("setUserInputForCurrentJavaScriptPrompt"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) { > if (response.isError) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; >@@ -2452,22 +2452,22 @@ void Session::takeScreenshot(std::optional<String> elementID, std::optional<bool > return; > } > RefPtr<JSON::Object> parameters = JSON::Object::create(); >- parameters->setString(ASCIILiteral("handle"), m_toplevelBrowsingContext.value()); >+ parameters->setString("handle"_s, m_toplevelBrowsingContext.value()); > if (m_currentBrowsingContext) >- parameters->setString(ASCIILiteral("frameHandle"), m_currentBrowsingContext.value()); >+ parameters->setString("frameHandle"_s, m_currentBrowsingContext.value()); > if (elementID) >- parameters->setString(ASCIILiteral("nodeHandle"), elementID.value()); >+ parameters->setString("nodeHandle"_s, elementID.value()); > else >- parameters->setBoolean(ASCIILiteral("clipToViewport"), true); >+ parameters->setBoolean("clipToViewport"_s, true); > if (scrollIntoView.value_or(false)) >- parameters->setBoolean(ASCIILiteral("scrollIntoViewIfNeeded"), true); >- m_host->sendCommandToBackend(ASCIILiteral("takeScreenshot"), WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { >+ parameters->setBoolean("scrollIntoViewIfNeeded"_s, true); >+ m_host->sendCommandToBackend("takeScreenshot"_s, WTFMove(parameters), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) mutable { > if (response.isError || !response.responseObject) { > completionHandler(CommandResult::fail(WTFMove(response.responseObject))); > return; > } > String data; >- if (!response.responseObject->getString(ASCIILiteral("data"), data)) { >+ if (!response.responseObject->getString("data"_s, data)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::UnknownError)); > return; > } >diff --git a/Source/WebDriver/SessionHost.cpp b/Source/WebDriver/SessionHost.cpp >index f164929c9d0ed137b0c3621ba86ad88fec11c134..7bd29e0074bfd1a7c200b3cd9f243d5aff990d84 100644 >--- a/Source/WebDriver/SessionHost.cpp >+++ b/Source/WebDriver/SessionHost.cpp >@@ -71,7 +71,7 @@ void SessionHost::dispatchMessage(const String& message) > return; > > long sequenceID; >- if (!messageObject->getInteger(ASCIILiteral("id"), sequenceID)) >+ if (!messageObject->getInteger("id"_s, sequenceID)) > return; > > auto responseHandler = m_commandRequests.take(sequenceID); >@@ -79,12 +79,12 @@ void SessionHost::dispatchMessage(const String& message) > > CommandResponse response; > RefPtr<JSON::Object> errorObject; >- if (messageObject->getObject(ASCIILiteral("error"), errorObject)) { >+ if (messageObject->getObject("error"_s, errorObject)) { > response.responseObject = WTFMove(errorObject); > response.isError = true; > } else { > RefPtr<JSON::Object> resultObject; >- if (messageObject->getObject(ASCIILiteral("result"), resultObject) && resultObject->size()) >+ if (messageObject->getObject("result"_s, resultObject) && resultObject->size()) > response.responseObject = WTFMove(resultObject); > } > >diff --git a/Source/WebDriver/WebDriverService.cpp b/Source/WebDriver/WebDriverService.cpp >index 38d19e4f85edaf04fcc4de94fcf406af4881842c..b29b1f7a7eb248109f0f74f09c6831a0786aee2c 100644 >--- a/Source/WebDriver/WebDriverService.cpp >+++ b/Source/WebDriver/WebDriverService.cpp >@@ -261,12 +261,12 @@ void WebDriverService::sendResponse(Function<void (HTTPRequestHandler::Response& > // https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-an-error > // Let body be a new JSON Object initialised with the following properties: "error", "message", "stacktrace". > auto errorObject = JSON::Object::create(); >- errorObject->setString(ASCIILiteral("error"), result.errorString()); >- errorObject->setString(ASCIILiteral("message"), result.errorMessage().value_or(emptyString())); >- errorObject->setString(ASCIILiteral("stacktrace"), emptyString()); >+ errorObject->setString("error"_s, result.errorString()); >+ errorObject->setString("message"_s, result.errorMessage().value_or(emptyString())); >+ errorObject->setString("stacktrace"_s, emptyString()); > // If the error data dictionary contains any entries, set the "data" field on body to a new JSON Object populated with the dictionary. > if (auto& additionalData = result.additionalErrorData()) >- errorObject->setObject(ASCIILiteral("data"), RefPtr<JSON::Object> { additionalData }); >+ errorObject->setObject("data"_s, RefPtr<JSON::Object> { additionalData }); > // Send a response with status and body as arguments. > resultValue = WTFMove(errorObject); > } else if (auto value = result.result()) >@@ -277,8 +277,8 @@ void WebDriverService::sendResponse(Function<void (HTTPRequestHandler::Response& > // When required to send a response. > // https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response > RefPtr<JSON::Object> responseObject = JSON::Object::create(); >- responseObject->setValue(ASCIILiteral("value"), WTFMove(resultValue)); >- replyHandler({ result.httpStatusCode(), responseObject->toJSONString().utf8(), ASCIILiteral("application/json; charset=utf-8") }); >+ responseObject->setValue("value"_s, WTFMove(resultValue)); >+ replyHandler({ result.httpStatusCode(), responseObject->toJSONString().utf8(), "application/json; charset=utf-8"_s }); > } > > static std::optional<double> valueAsNumberInRange(const JSON::Value& value, double minAllowed = 0, double maxAllowed = std::numeric_limits<int>::max()) >@@ -369,28 +369,28 @@ void WebDriverService::parseCapabilities(const JSON::Object& matchedCapabilities > { > // Matched capabilities have already been validated. > bool acceptInsecureCerts; >- if (matchedCapabilities.getBoolean(ASCIILiteral("acceptInsecureCerts"), acceptInsecureCerts)) >+ if (matchedCapabilities.getBoolean("acceptInsecureCerts"_s, acceptInsecureCerts)) > capabilities.acceptInsecureCerts = acceptInsecureCerts; > bool setWindowRect; >- if (matchedCapabilities.getBoolean(ASCIILiteral("setWindowRect"), setWindowRect)) >+ if (matchedCapabilities.getBoolean("setWindowRect"_s, setWindowRect)) > capabilities.setWindowRect = setWindowRect; > String browserName; >- if (matchedCapabilities.getString(ASCIILiteral("browserName"), browserName)) >+ if (matchedCapabilities.getString("browserName"_s, browserName)) > capabilities.browserName = browserName; > String browserVersion; >- if (matchedCapabilities.getString(ASCIILiteral("browserVersion"), browserVersion)) >+ if (matchedCapabilities.getString("browserVersion"_s, browserVersion)) > capabilities.browserVersion = browserVersion; > String platformName; >- if (matchedCapabilities.getString(ASCIILiteral("platformName"), platformName)) >+ if (matchedCapabilities.getString("platformName"_s, platformName)) > capabilities.platformName = platformName; > RefPtr<JSON::Object> timeouts; >- if (matchedCapabilities.getObject(ASCIILiteral("timeouts"), timeouts)) >+ if (matchedCapabilities.getObject("timeouts"_s, timeouts)) > capabilities.timeouts = deserializeTimeouts(*timeouts); > String pageLoadStrategy; >- if (matchedCapabilities.getString(ASCIILiteral("pageLoadStrategy"), pageLoadStrategy)) >+ if (matchedCapabilities.getString("pageLoadStrategy"_s, pageLoadStrategy)) > capabilities.pageLoadStrategy = deserializePageLoadStrategy(pageLoadStrategy); > String unhandledPromptBehavior; >- if (matchedCapabilities.getString(ASCIILiteral("unhandledPromptBehavior"), unhandledPromptBehavior)) >+ if (matchedCapabilities.getString("unhandledPromptBehavior"_s, unhandledPromptBehavior)) > capabilities.unhandledPromptBehavior = deserializeUnhandledPromptBehavior(unhandledPromptBehavior); > platformParseCapabilities(matchedCapabilities, capabilities); > } >@@ -398,7 +398,7 @@ void WebDriverService::parseCapabilities(const JSON::Object& matchedCapabilities > bool WebDriverService::findSessionOrCompleteWithError(JSON::Object& parameters, Function<void (CommandResult&&)>& completionHandler) > { > String sessionID; >- if (!parameters.getString(ASCIILiteral("sessionId"), sessionID)) { >+ if (!parameters.getString("sessionId"_s, sessionID)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return false; > } >@@ -483,15 +483,15 @@ RefPtr<JSON::Object> WebDriverService::matchCapabilities(const JSON::Object& mer > // so we only reject the known capabilities that don't match. > RefPtr<JSON::Object> matchedCapabilities = JSON::Object::create(); > if (platformCapabilities.browserName) >- matchedCapabilities->setString(ASCIILiteral("browserName"), platformCapabilities.browserName.value()); >+ matchedCapabilities->setString("browserName"_s, platformCapabilities.browserName.value()); > if (platformCapabilities.browserVersion) >- matchedCapabilities->setString(ASCIILiteral("browserVersion"), platformCapabilities.browserVersion.value()); >+ matchedCapabilities->setString("browserVersion"_s, platformCapabilities.browserVersion.value()); > if (platformCapabilities.platformName) >- matchedCapabilities->setString(ASCIILiteral("platformName"), platformCapabilities.platformName.value()); >+ matchedCapabilities->setString("platformName"_s, platformCapabilities.platformName.value()); > if (platformCapabilities.acceptInsecureCerts) >- matchedCapabilities->setBoolean(ASCIILiteral("acceptInsecureCerts"), platformCapabilities.acceptInsecureCerts.value()); >+ matchedCapabilities->setBoolean("acceptInsecureCerts"_s, platformCapabilities.acceptInsecureCerts.value()); > if (platformCapabilities.setWindowRect) >- matchedCapabilities->setBoolean(ASCIILiteral("setWindowRect"), platformCapabilities.setWindowRect.value()); >+ matchedCapabilities->setBoolean("setWindowRect"_s, platformCapabilities.setWindowRect.value()); > > auto end = mergedCapabilities.end(); > for (auto it = mergedCapabilities.begin(); it != end; ++it) { >@@ -532,7 +532,7 @@ Vector<Capabilities> WebDriverService::processCapabilities(const JSON::Object& p > > // 1. Let capabilities request be the result of getting the property "capabilities" from parameters. > RefPtr<JSON::Object> capabilitiesObject; >- if (!parameters.getObject(ASCIILiteral("capabilities"), capabilitiesObject)) { >+ if (!parameters.getObject("capabilities"_s, capabilitiesObject)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return { }; > } >@@ -540,7 +540,7 @@ Vector<Capabilities> WebDriverService::processCapabilities(const JSON::Object& p > // 2. Let required capabilities be the result of getting the property "alwaysMatch" from capabilities request. > RefPtr<JSON::Value> requiredCapabilitiesValue; > RefPtr<JSON::Object> requiredCapabilities; >- if (!capabilitiesObject->getValue(ASCIILiteral("alwaysMatch"), requiredCapabilitiesValue)) >+ if (!capabilitiesObject->getValue("alwaysMatch"_s, requiredCapabilitiesValue)) > // 2.1. If required capabilities is undefined, set the value to an empty JSON Object. > requiredCapabilities = JSON::Object::create(); > else if (!requiredCapabilitiesValue->asObject(requiredCapabilities)) { >@@ -558,7 +558,7 @@ Vector<Capabilities> WebDriverService::processCapabilities(const JSON::Object& p > // 3. Let all first match capabilities be the result of getting the property "firstMatch" from capabilities request. > RefPtr<JSON::Value> firstMatchCapabilitiesValue; > RefPtr<JSON::Array> firstMatchCapabilitiesList; >- if (!capabilitiesObject->getValue(ASCIILiteral("firstMatch"), firstMatchCapabilitiesValue)) { >+ if (!capabilitiesObject->getValue("firstMatch"_s, firstMatchCapabilitiesValue)) { > // 3.1. If all first match capabilities is undefined, set the value to a JSON List with a single entry of an empty JSON Object. > firstMatchCapabilitiesList = JSON::Array::create(); > firstMatchCapabilitiesList->pushObject(JSON::Object::create()); >@@ -686,58 +686,58 @@ void WebDriverService::createSession(Vector<Capabilities>&& capabilitiesList, st > m_session = WTFMove(session); > > RefPtr<JSON::Object> resultObject = JSON::Object::create(); >- resultObject->setString(ASCIILiteral("sessionId"), m_session->id()); >+ resultObject->setString("sessionId"_s, m_session->id()); > RefPtr<JSON::Object> capabilitiesObject = JSON::Object::create(); > const auto& capabilities = m_session->capabilities(); > if (capabilities.browserName) >- capabilitiesObject->setString(ASCIILiteral("browserName"), capabilities.browserName.value()); >+ capabilitiesObject->setString("browserName"_s, capabilities.browserName.value()); > if (capabilities.browserVersion) >- capabilitiesObject->setString(ASCIILiteral("browserVersion"), capabilities.browserVersion.value()); >+ capabilitiesObject->setString("browserVersion"_s, capabilities.browserVersion.value()); > if (capabilities.platformName) >- capabilitiesObject->setString(ASCIILiteral("platformName"), capabilities.platformName.value()); >+ capabilitiesObject->setString("platformName"_s, capabilities.platformName.value()); > if (capabilities.acceptInsecureCerts) >- capabilitiesObject->setBoolean(ASCIILiteral("acceptInsecureCerts"), capabilities.acceptInsecureCerts.value()); >+ capabilitiesObject->setBoolean("acceptInsecureCerts"_s, capabilities.acceptInsecureCerts.value()); > if (capabilities.setWindowRect) >- capabilitiesObject->setBoolean(ASCIILiteral("setWindowRect"), capabilities.setWindowRect.value()); >+ capabilitiesObject->setBoolean("setWindowRect"_s, capabilities.setWindowRect.value()); > if (capabilities.unhandledPromptBehavior) { > switch (capabilities.unhandledPromptBehavior.value()) { > case UnhandledPromptBehavior::Dismiss: >- capabilitiesObject->setString(ASCIILiteral("unhandledPromptBehavior"), "dismiss"); >+ capabilitiesObject->setString("unhandledPromptBehavior"_s, "dismiss"); > break; > case UnhandledPromptBehavior::Accept: >- capabilitiesObject->setString(ASCIILiteral("unhandledPromptBehavior"), "accept"); >+ capabilitiesObject->setString("unhandledPromptBehavior"_s, "accept"); > break; > case UnhandledPromptBehavior::DismissAndNotify: >- capabilitiesObject->setString(ASCIILiteral("unhandledPromptBehavior"), "dismiss and notify"); >+ capabilitiesObject->setString("unhandledPromptBehavior"_s, "dismiss and notify"); > break; > case UnhandledPromptBehavior::AcceptAndNotify: >- capabilitiesObject->setString(ASCIILiteral("unhandledPromptBehavior"), "accept and notify"); >+ capabilitiesObject->setString("unhandledPromptBehavior"_s, "accept and notify"); > break; > case UnhandledPromptBehavior::Ignore: >- capabilitiesObject->setString(ASCIILiteral("unhandledPromptBehavior"), "ignore"); >+ capabilitiesObject->setString("unhandledPromptBehavior"_s, "ignore"); > break; > } > } > switch (capabilities.pageLoadStrategy.value_or(PageLoadStrategy::Normal)) { > case PageLoadStrategy::None: >- capabilitiesObject->setString(ASCIILiteral("pageLoadStrategy"), "none"); >+ capabilitiesObject->setString("pageLoadStrategy"_s, "none"); > break; > case PageLoadStrategy::Normal: >- capabilitiesObject->setString(ASCIILiteral("pageLoadStrategy"), "normal"); >+ capabilitiesObject->setString("pageLoadStrategy"_s, "normal"); > break; > case PageLoadStrategy::Eager: >- capabilitiesObject->setString(ASCIILiteral("pageLoadStrategy"), "eager"); >+ capabilitiesObject->setString("pageLoadStrategy"_s, "eager"); > break; > } > // FIXME: implement proxy support. >- capabilitiesObject->setObject(ASCIILiteral("proxy"), JSON::Object::create()); >+ capabilitiesObject->setObject("proxy"_s, JSON::Object::create()); > RefPtr<JSON::Object> timeoutsObject = JSON::Object::create(); >- timeoutsObject->setInteger(ASCIILiteral("script"), m_session->scriptTimeout().millisecondsAs<int>()); >- timeoutsObject->setInteger(ASCIILiteral("pageLoad"), m_session->pageLoadTimeout().millisecondsAs<int>()); >- timeoutsObject->setInteger(ASCIILiteral("implicit"), m_session->implicitWaitTimeout().millisecondsAs<int>()); >- capabilitiesObject->setObject(ASCIILiteral("timeouts"), WTFMove(timeoutsObject)); >+ timeoutsObject->setInteger("script"_s, m_session->scriptTimeout().millisecondsAs<int>()); >+ timeoutsObject->setInteger("pageLoad"_s, m_session->pageLoadTimeout().millisecondsAs<int>()); >+ timeoutsObject->setInteger("implicit"_s, m_session->implicitWaitTimeout().millisecondsAs<int>()); >+ capabilitiesObject->setObject("timeouts"_s, WTFMove(timeoutsObject)); > >- resultObject->setObject(ASCIILiteral("capabilities"), WTFMove(capabilitiesObject)); >+ resultObject->setObject("capabilities"_s, WTFMove(capabilitiesObject)); > completionHandler(CommandResult::success(WTFMove(resultObject))); > }); > }); >@@ -748,7 +748,7 @@ void WebDriverService::deleteSession(RefPtr<JSON::Object>&& parameters, Function > // §8.2 Delete Session. > // https://www.w3.org/TR/webdriver/#delete-session > String sessionID; >- if (!parameters->getString(ASCIILiteral("sessionId"), sessionID)) { >+ if (!parameters->getString("sessionId"_s, sessionID)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -773,8 +773,8 @@ void WebDriverService::status(RefPtr<JSON::Object>&&, Function<void (CommandResu > // §8.3 Status > // https://w3c.github.io/webdriver/webdriver-spec.html#status > auto body = JSON::Object::create(); >- body->setBoolean(ASCIILiteral("ready"), !m_session); >- body->setString(ASCIILiteral("message"), m_session ? ASCIILiteral("A session already exists") : ASCIILiteral("No sessions")); >+ body->setBoolean("ready"_s, !m_session); >+ body->setString("message"_s, m_session ? "A session already exists"_s : "No sessions"_s); > completionHandler(CommandResult::success(WTFMove(body))); > } > >@@ -812,7 +812,7 @@ void WebDriverService::go(RefPtr<JSON::Object>&& parameters, Function<void (Comm > return; > > String url; >- if (!parameters->getString(ASCIILiteral("url"), url)) { >+ if (!parameters->getString("url"_s, url)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -928,7 +928,7 @@ void WebDriverService::setWindowRect(RefPtr<JSON::Object>&& parameters, Function > // https://w3c.github.io/webdriver/webdriver-spec.html#set-window-rect > RefPtr<JSON::Value> value; > std::optional<double> width; >- if (parameters->getValue(ASCIILiteral("width"), value)) { >+ if (parameters->getValue("width"_s, value)) { > if (auto number = valueAsNumberInRange(*value)) > width = number; > else if (!value->isNull()) { >@@ -937,7 +937,7 @@ void WebDriverService::setWindowRect(RefPtr<JSON::Object>&& parameters, Function > } > } > std::optional<double> height; >- if (parameters->getValue(ASCIILiteral("height"), value)) { >+ if (parameters->getValue("height"_s, value)) { > if (auto number = valueAsNumberInRange(*value)) > height = number; > else if (!value->isNull()) { >@@ -946,7 +946,7 @@ void WebDriverService::setWindowRect(RefPtr<JSON::Object>&& parameters, Function > } > } > std::optional<double> x; >- if (parameters->getValue(ASCIILiteral("x"), value)) { >+ if (parameters->getValue("x"_s, value)) { > if (auto number = valueAsNumberInRange(*value, INT_MIN)) > x = number; > else if (!value->isNull()) { >@@ -955,7 +955,7 @@ void WebDriverService::setWindowRect(RefPtr<JSON::Object>&& parameters, Function > } > } > std::optional<double> y; >- if (parameters->getValue(ASCIILiteral("y"), value)) { >+ if (parameters->getValue("y"_s, value)) { > if (auto number = valueAsNumberInRange(*value, INT_MIN)) > y = number; > else if (!value->isNull()) { >@@ -1024,7 +1024,7 @@ void WebDriverService::switchToWindow(RefPtr<JSON::Object>&& parameters, Functio > return; > > String handle; >- if (!parameters->getString(ASCIILiteral("handle"), handle)) { >+ if (!parameters->getString("handle"_s, handle)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1048,7 +1048,7 @@ void WebDriverService::switchToFrame(RefPtr<JSON::Object>&& parameters, Function > return; > > RefPtr<JSON::Value> frameID; >- if (!parameters->getValue(ASCIILiteral("id"), frameID)) { >+ if (!parameters->getValue("id"_s, frameID)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1081,7 +1081,7 @@ void WebDriverService::switchToParentFrame(RefPtr<JSON::Object>&& parameters, Fu > static std::optional<String> findElementOrCompleteWithError(JSON::Object& parameters, Function<void (CommandResult&&)>& completionHandler) > { > String elementID; >- if (!parameters.getString(ASCIILiteral("elementId"), elementID) || elementID.isEmpty()) { >+ if (!parameters.getString("elementId"_s, elementID) || elementID.isEmpty()) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return std::nullopt; > } >@@ -1101,11 +1101,11 @@ static inline bool isValidStrategy(const String& strategy) > > static bool findStrategyAndSelectorOrCompleteWithError(JSON::Object& parameters, Function<void (CommandResult&&)>& completionHandler, String& strategy, String& selector) > { >- if (!parameters.getString(ASCIILiteral("using"), strategy) || !isValidStrategy(strategy)) { >+ if (!parameters.getString("using"_s, strategy) || !isValidStrategy(strategy)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return false; > } >- if (!parameters.getString(ASCIILiteral("value"), selector)) { >+ if (!parameters.getString("value"_s, selector)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return false; > } >@@ -1230,7 +1230,7 @@ void WebDriverService::getElementAttribute(RefPtr<JSON::Object>&& parameters, Fu > return; > > String attribute; >- if (!parameters->getString(ASCIILiteral("name"), attribute)) { >+ if (!parameters->getString("name"_s, attribute)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1250,7 +1250,7 @@ void WebDriverService::getElementProperty(RefPtr<JSON::Object>&& parameters, Fun > return; > > String attribute; >- if (!parameters->getString(ASCIILiteral("name"), attribute)) { >+ if (!parameters->getString("name"_s, attribute)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1270,7 +1270,7 @@ void WebDriverService::getElementCSSValue(RefPtr<JSON::Object>&& parameters, Fun > return; > > String cssProperty; >- if (!parameters->getString(ASCIILiteral("name"), cssProperty)) { >+ if (!parameters->getString("name"_s, cssProperty)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1388,7 +1388,7 @@ void WebDriverService::elementSendKeys(RefPtr<JSON::Object>&& parameters, Functi > return; > > RefPtr<JSON::Array> valueArray; >- if (!parameters->getArray(ASCIILiteral("value"), valueArray)) { >+ if (!parameters->getArray("value"_s, valueArray)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1417,11 +1417,11 @@ void WebDriverService::elementSendKeys(RefPtr<JSON::Object>&& parameters, Functi > > static bool findScriptAndArgumentsOrCompleteWithError(JSON::Object& parameters, Function<void (CommandResult&&)>& completionHandler, String& script, RefPtr<JSON::Array>& arguments) > { >- if (!parameters.getString(ASCIILiteral("script"), script)) { >+ if (!parameters.getString("script"_s, script)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return false; > } >- if (!parameters.getArray(ASCIILiteral("args"), arguments)) { >+ if (!parameters.getArray("args"_s, arguments)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return false; > } >@@ -1494,7 +1494,7 @@ void WebDriverService::getNamedCookie(RefPtr<JSON::Object>&& parameters, Functio > return; > > String name; >- if (!parameters->getString(ASCIILiteral("name"), name)) { >+ if (!parameters->getString("name"_s, name)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1511,37 +1511,37 @@ void WebDriverService::getNamedCookie(RefPtr<JSON::Object>&& parameters, Functio > static std::optional<Session::Cookie> deserializeCookie(JSON::Object& cookieObject) > { > Session::Cookie cookie; >- if (!cookieObject.getString(ASCIILiteral("name"), cookie.name) || cookie.name.isEmpty()) >+ if (!cookieObject.getString("name"_s, cookie.name) || cookie.name.isEmpty()) > return std::nullopt; >- if (!cookieObject.getString(ASCIILiteral("value"), cookie.value) || cookie.value.isEmpty()) >+ if (!cookieObject.getString("value"_s, cookie.value) || cookie.value.isEmpty()) > return std::nullopt; > > RefPtr<JSON::Value> value; >- if (cookieObject.getValue(ASCIILiteral("path"), value)) { >+ if (cookieObject.getValue("path"_s, value)) { > String path; > if (!value->asString(path)) > return std::nullopt; > cookie.path = path; > } >- if (cookieObject.getValue(ASCIILiteral("domain"), value)) { >+ if (cookieObject.getValue("domain"_s, value)) { > String domain; > if (!value->asString(domain)) > return std::nullopt; > cookie.domain = domain; > } >- if (cookieObject.getValue(ASCIILiteral("secure"), value)) { >+ if (cookieObject.getValue("secure"_s, value)) { > bool secure; > if (!value->asBoolean(secure)) > return std::nullopt; > cookie.secure = secure; > } >- if (cookieObject.getValue(ASCIILiteral("httpOnly"), value)) { >+ if (cookieObject.getValue("httpOnly"_s, value)) { > bool httpOnly; > if (!value->asBoolean(httpOnly)) > return std::nullopt; > cookie.httpOnly = httpOnly; > } >- if (cookieObject.getValue(ASCIILiteral("expiry"), value)) { >+ if (cookieObject.getValue("expiry"_s, value)) { > auto expiry = unsignedValue(*value); > if (!expiry) > return std::nullopt; >@@ -1559,7 +1559,7 @@ void WebDriverService::addCookie(RefPtr<JSON::Object>&& parameters, Function<voi > return; > > RefPtr<JSON::Object> cookieObject; >- if (!parameters->getObject(ASCIILiteral("cookie"), cookieObject)) { >+ if (!parameters->getObject("cookie"_s, cookieObject)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1587,7 +1587,7 @@ void WebDriverService::deleteCookie(RefPtr<JSON::Object>&& parameters, Function< > return; > > String name; >- if (!parameters->getString(ASCIILiteral("name"), name)) { >+ if (!parameters->getString("name"_s, name)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -1620,7 +1620,7 @@ void WebDriverService::deleteAllCookies(RefPtr<JSON::Object>&& parameters, Funct > static bool processPauseAction(JSON::Object& actionItem, Action& action, std::optional<String>& errorMessage) > { > RefPtr<JSON::Value> durationValue; >- if (!actionItem.getValue(ASCIILiteral("duration"), durationValue)) { >+ if (!actionItem.getValue("duration"_s, durationValue)) { > errorMessage = String("The parameter 'duration' is missing in pause action"); > return false; > } >@@ -1638,7 +1638,7 @@ static bool processPauseAction(JSON::Object& actionItem, Action& action, std::op > static std::optional<Action> processNullAction(const String& id, JSON::Object& actionItem, std::optional<String>& errorMessage) > { > String subtype; >- actionItem.getString(ASCIILiteral("type"), subtype); >+ actionItem.getString("type"_s, subtype); > if (subtype != "pause") { > errorMessage = String("The parameter 'type' in null action is invalid or missing"); > return std::nullopt; >@@ -1655,7 +1655,7 @@ static std::optional<Action> processKeyAction(const String& id, JSON::Object& ac > { > Action::Subtype actionSubtype; > String subtype; >- actionItem.getString(ASCIILiteral("type"), subtype); >+ actionItem.getString("type"_s, subtype); > if (subtype == "pause") > actionSubtype = Action::Subtype::Pause; > else if (subtype == "keyUp") >@@ -1677,7 +1677,7 @@ static std::optional<Action> processKeyAction(const String& id, JSON::Object& ac > case Action::Subtype::KeyUp: > case Action::Subtype::KeyDown: { > RefPtr<JSON::Value> keyValue; >- if (!actionItem.getValue(ASCIILiteral("value"), keyValue)) { >+ if (!actionItem.getValue("value"_s, keyValue)) { > errorMessage = String("The paramater 'value' is missing for key up/down action"); > return std::nullopt; > } >@@ -1720,7 +1720,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > { > Action::Subtype actionSubtype; > String subtype; >- actionItem.getString(ASCIILiteral("type"), subtype); >+ actionItem.getString("type"_s, subtype); > if (subtype == "pause") > actionSubtype = Action::Subtype::Pause; > else if (subtype == "pointerUp") >@@ -1747,7 +1747,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > case Action::Subtype::PointerUp: > case Action::Subtype::PointerDown: { > RefPtr<JSON::Value> buttonValue; >- if (!actionItem.getValue(ASCIILiteral("button"), buttonValue)) { >+ if (!actionItem.getValue("button"_s, buttonValue)) { > errorMessage = String("The paramater 'button' is missing for pointer up/down action"); > return std::nullopt; > } >@@ -1761,7 +1761,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > } > case Action::Subtype::PointerMove: { > RefPtr<JSON::Value> durationValue; >- if (actionItem.getValue(ASCIILiteral("duration"), durationValue)) { >+ if (actionItem.getValue("duration"_s, durationValue)) { > auto duration = unsignedValue(*durationValue); > if (!duration) { > errorMessage = String("The parameter 'duration' is invalid in pointer move action"); >@@ -1771,7 +1771,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > } > > RefPtr<JSON::Value> originValue; >- if (actionItem.getValue(ASCIILiteral("origin"), originValue)) { >+ if (actionItem.getValue("origin"_s, originValue)) { > if (originValue->type() == JSON::Value::Type::Object) { > RefPtr<JSON::Object> originObject; > originValue->asObject(originObject); >@@ -1797,7 +1797,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > action.origin = PointerOrigin { PointerOrigin::Type::Viewport, std::nullopt }; > > RefPtr<JSON::Value> xValue; >- if (actionItem.getValue(ASCIILiteral("x"), xValue)) { >+ if (actionItem.getValue("x"_s, xValue)) { > auto x = valueAsNumberInRange(*xValue, INT_MIN); > if (!x) { > errorMessage = String("The paramater 'x' is invalid for pointer move action"); >@@ -1807,7 +1807,7 @@ static std::optional<Action> processPointerAction(const String& id, PointerParam > } > > RefPtr<JSON::Value> yValue; >- if (actionItem.getValue(ASCIILiteral("y"), yValue)) { >+ if (actionItem.getValue("y"_s, yValue)) { > auto y = valueAsNumberInRange(*yValue, INT_MIN); > if (!y) { > errorMessage = String("The paramater 'y' is invalid for pointer move action"); >@@ -1831,7 +1831,7 @@ static std::optional<PointerParameters> processPointerParameters(JSON::Object& a > { > PointerParameters parameters; > RefPtr<JSON::Value> parametersDataValue; >- if (!actionSequence.getValue(ASCIILiteral("parameters"), parametersDataValue)) >+ if (!actionSequence.getValue("parameters"_s, parametersDataValue)) > return parameters; > > RefPtr<JSON::Object> parametersData; >@@ -1841,7 +1841,7 @@ static std::optional<PointerParameters> processPointerParameters(JSON::Object& a > } > > String pointerType; >- if (!parametersData->getString(ASCIILiteral("pointerType"), pointerType)) >+ if (!parametersData->getString("pointerType"_s, pointerType)) > return parameters; > > if (pointerType == "mouse") >@@ -1867,7 +1867,7 @@ static std::optional<Vector<Action>> processInputActionSequence(Session& session > } > > String type; >- actionSequence->getString(ASCIILiteral("type"), type); >+ actionSequence->getString("type"_s, type); > InputSource::Type inputSourceType; > if (type == "key") > inputSourceType = InputSource::Type::Key; >@@ -1881,7 +1881,7 @@ static std::optional<Vector<Action>> processInputActionSequence(Session& session > } > > String id; >- if (!actionSequence->getString(ASCIILiteral("id"), id)) { >+ if (!actionSequence->getString("id"_s, id)) { > errorMessage = String("The parameter 'id' is invalid or missing in action sequence"); > return std::nullopt; > } >@@ -1908,7 +1908,7 @@ static std::optional<Vector<Action>> processInputActionSequence(Session& session > } > > RefPtr<JSON::Array> actionItems; >- if (!actionSequence->getArray(ASCIILiteral("actions"), actionItems)) { >+ if (!actionSequence->getArray("actions"_s, actionItems)) { > errorMessage = String("The parameter 'actions' is invalid or not present in action sequence"); > return std::nullopt; > } >@@ -1947,7 +1947,7 @@ void WebDriverService::performActions(RefPtr<JSON::Object>&& parameters, Functio > return; > > RefPtr<JSON::Array> actionsArray; >- if (!parameters->getArray(ASCIILiteral("actions"), actionsArray)) { >+ if (!parameters->getArray("actions"_s, actionsArray)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument, String("The paramater 'actions' is invalid or not present"))); > return; > } >@@ -2038,7 +2038,7 @@ void WebDriverService::sendAlertText(RefPtr<JSON::Object>&& parameters, Function > return; > > String text; >- if (!parameters->getString(ASCIILiteral("text"), text)) { >+ if (!parameters->getString("text"_s, text)) { > completionHandler(CommandResult::fail(CommandResult::ErrorCode::InvalidArgument)); > return; > } >@@ -2080,7 +2080,7 @@ void WebDriverService::takeElementScreenshot(RefPtr<JSON::Object>&& parameters, > return; > > bool scrollIntoView = true; >- parameters->getBoolean(ASCIILiteral("scroll"), scrollIntoView); >+ parameters->getBoolean("scroll"_s, scrollIntoView); > > m_session->waitForNavigationToComplete([this, elementID, scrollIntoView, completionHandler = WTFMove(completionHandler)](CommandResult&& result) mutable { > if (result.isError()) { >diff --git a/Source/WebDriver/glib/SessionHostGlib.cpp b/Source/WebDriver/glib/SessionHostGlib.cpp >index b78e9e1d01b8e4dbd73e9b434e20eb5f1d1d5717..74581204c471a4c6603ce3c1cd6d2a7df8bab4fe 100644 >--- a/Source/WebDriver/glib/SessionHostGlib.cpp >+++ b/Source/WebDriver/glib/SessionHostGlib.cpp >@@ -376,8 +376,8 @@ void SessionHost::sendMessageToBackend(long messageID, const String& message) > auto responseHandler = messageContext->host->m_commandRequests.take(messageContext->messageID); > if (responseHandler) { > auto errorObject = JSON::Object::create(); >- errorObject->setInteger(ASCIILiteral("code"), -32603); >- errorObject->setString(ASCIILiteral("message"), String::fromUTF8(error->message)); >+ errorObject->setInteger("code"_s, -32603); >+ errorObject->setString("message"_s, String::fromUTF8(error->message)); > responseHandler({ WTFMove(errorObject), true }); > } > } >diff --git a/Source/WebDriver/gtk/WebDriverServiceGtk.cpp b/Source/WebDriver/gtk/WebDriverServiceGtk.cpp >index 41d7b43826c5de0f38da37e5013e69ba745c15d6..0ef1acc077cc3f5bc392ac8e633b3c79cba53903 100644 >--- a/Source/WebDriver/gtk/WebDriverServiceGtk.cpp >+++ b/Source/WebDriver/gtk/WebDriverServiceGtk.cpp >@@ -54,17 +54,17 @@ bool WebDriverService::platformValidateCapability(const String& name, const RefP > > RefPtr<JSON::Value> binaryValue; > String binary; >- if (browserOptions->getValue(ASCIILiteral("binary"), binaryValue) && !binaryValue->asString(binary)) >+ if (browserOptions->getValue("binary"_s, binaryValue) && !binaryValue->asString(binary)) > return false; > > RefPtr<JSON::Value> useOverlayScrollbarsValue; > bool useOverlayScrollbars; >- if (browserOptions->getValue(ASCIILiteral("useOverlayScrollbars"), useOverlayScrollbarsValue) && !useOverlayScrollbarsValue->asBoolean(useOverlayScrollbars)) >+ if (browserOptions->getValue("useOverlayScrollbars"_s, useOverlayScrollbarsValue) && !useOverlayScrollbarsValue->asBoolean(useOverlayScrollbars)) > return false; > > RefPtr<JSON::Value> browserArgumentsValue; > RefPtr<JSON::Array> browserArguments; >- if (browserOptions->getValue(ASCIILiteral("args"), browserArgumentsValue)) { >+ if (browserOptions->getValue("args"_s, browserArgumentsValue)) { > if (!browserArgumentsValue->asArray(browserArguments)) > return false; > >@@ -113,19 +113,19 @@ bool WebDriverService::platformMatchCapability(const String&, const RefPtr<JSON: > void WebDriverService::platformParseCapabilities(const JSON::Object& matchedCapabilities, Capabilities& capabilities) const > { > capabilities.browserBinary = String(LIBEXECDIR "/webkit2gtk-" WEBKITGTK_API_VERSION_STRING "/MiniBrowser"); >- capabilities.browserArguments = Vector<String> { ASCIILiteral("--automation") }; >+ capabilities.browserArguments = Vector<String> { "--automation"_s }; > capabilities.useOverlayScrollbars = true; > > RefPtr<JSON::Object> browserOptions; >- if (!matchedCapabilities.getObject(ASCIILiteral("webkitgtk:browserOptions"), browserOptions)) >+ if (!matchedCapabilities.getObject("webkitgtk:browserOptions"_s, browserOptions)) > return; > > String browserBinary; >- if (browserOptions->getString(ASCIILiteral("binary"), browserBinary)) >+ if (browserOptions->getString("binary"_s, browserBinary)) > capabilities.browserBinary = browserBinary; > > RefPtr<JSON::Array> browserArguments; >- if (browserOptions->getArray(ASCIILiteral("args"), browserArguments) && browserArguments->length()) { >+ if (browserOptions->getArray("args"_s, browserArguments) && browserArguments->length()) { > unsigned browserArgumentsLength = browserArguments->length(); > capabilities.browserArguments = Vector<String>(); > capabilities.browserArguments->reserveInitialCapacity(browserArgumentsLength); >@@ -139,7 +139,7 @@ void WebDriverService::platformParseCapabilities(const JSON::Object& matchedCapa > } > > bool useOverlayScrollbars; >- if (browserOptions->getBoolean(ASCIILiteral("useOverlayScrollbars"), useOverlayScrollbars)) >+ if (browserOptions->getBoolean("useOverlayScrollbars"_s, useOverlayScrollbars)) > capabilities.useOverlayScrollbars = useOverlayScrollbars; > else > capabilities.useOverlayScrollbars = true; >diff --git a/Source/WebDriver/wpe/WebDriverServiceWPE.cpp b/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >index 9275afb0f75c78ee871c91e10714fc26fd33182f..d8e677d5e404b676be9b1b68fef8af6c826c6b36 100644 >--- a/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >+++ b/Source/WebDriver/wpe/WebDriverServiceWPE.cpp >@@ -54,12 +54,12 @@ bool WebDriverService::platformValidateCapability(const String& name, const RefP > > // If browser options are provided, binary is required. > String binary; >- if (!browserOptions->getString(ASCIILiteral("binary"), binary)) >+ if (!browserOptions->getString("binary"_s, binary)) > return false; > > RefPtr<JSON::Value> browserArgumentsValue; > RefPtr<JSON::Array> browserArguments; >- if (browserOptions->getValue(ASCIILiteral("args"), browserArgumentsValue) && !browserArgumentsValue->asArray(browserArguments)) >+ if (browserOptions->getValue("args"_s, browserArgumentsValue) && !browserArgumentsValue->asArray(browserArguments)) > return false; > > unsigned browserArgumentsLength = browserArguments->length(); >@@ -81,18 +81,18 @@ bool WebDriverService::platformMatchCapability(const String&, const RefPtr<JSON: > void WebDriverService::platformParseCapabilities(const JSON::Object& matchedCapabilities, Capabilities& capabilities) const > { > capabilities.browserBinary = String("MiniBrowser"); >- capabilities.browserArguments = Vector<String> { ASCIILiteral("--automation") }; >+ capabilities.browserArguments = Vector<String> { "--automation"_s }; > > RefPtr<JSON::Object> browserOptions; >- if (!matchedCapabilities.getObject(ASCIILiteral("wpe:browserOptions"), browserOptions)) >+ if (!matchedCapabilities.getObject("wpe:browserOptions"_s, browserOptions)) > return; > > String browserBinary; >- if (browserOptions->getString(ASCIILiteral("binary"), browserBinary)) >+ if (browserOptions->getString("binary"_s, browserBinary)) > capabilities.browserBinary = browserBinary; > > RefPtr<JSON::Array> browserArguments; >- if (browserOptions->getArray(ASCIILiteral("args"), browserArguments) && browserArguments->length()) { >+ if (browserOptions->getArray("args"_s, browserArguments) && browserArguments->length()) { > unsigned browserArgumentsLength = browserArguments->length(); > capabilities.browserArguments = Vector<String>(); > capabilities.browserArguments->reserveInitialCapacity(browserArgumentsLength); >diff --git a/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp b/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp >index 6551ff7ade3309c904c83b6c4ad92770721e7749..8e9733cf1880d34cc37d7ad9f9d760cbfbdb2dbf 100644 >--- a/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp >@@ -85,7 +85,7 @@ void NetworkCORSPreflightChecker::willPerformHTTPRedirection(WebCore::ResourceRe > > RELEASE_LOG_IF_ALLOWED("willPerformHTTPRedirection"); > completionHandler({ }); >- m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), ASCIILiteral("Preflight response is not successful"), ResourceError::Type::AccessControl }); >+ m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), "Preflight response is not successful"_s, ResourceError::Type::AccessControl }); > } > > void NetworkCORSPreflightChecker::didReceiveChallenge(const WebCore::AuthenticationChallenge& challenge, ChallengeCompletionHandler&& completionHandler) >@@ -98,7 +98,7 @@ void NetworkCORSPreflightChecker::didReceiveChallenge(const WebCore::Authenticat > } > > completionHandler(AuthenticationChallengeDisposition::Cancel, { }); >- m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), ASCIILiteral("Preflight response is not successful"), ResourceError::Type::AccessControl }); >+ m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), "Preflight response is not successful"_s, ResourceError::Type::AccessControl }); > } > > void NetworkCORSPreflightChecker::didReceiveResponseNetworkSession(WebCore::ResourceResponse&& response, ResponseCompletionHandler&& completionHandler) >@@ -150,13 +150,13 @@ void NetworkCORSPreflightChecker::didSendData(uint64_t totalBytesSent, uint64_t > void NetworkCORSPreflightChecker::wasBlocked() > { > RELEASE_LOG_IF_ALLOWED("wasBlocked"); >- m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), ASCIILiteral("CORS-preflight request was blocked"), ResourceError::Type::AccessControl }); >+ m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), "CORS-preflight request was blocked"_s, ResourceError::Type::AccessControl }); > } > > void NetworkCORSPreflightChecker::cannotShowURL() > { > RELEASE_LOG_IF_ALLOWED("cannotShowURL"); >- m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), ASCIILiteral("Preflight response was blocked"), ResourceError::Type::AccessControl }); >+ m_completionCallback(ResourceError { errorDomainWebKitInternal, 0, m_parameters.originalRequest.url(), "Preflight response was blocked"_s, ResourceError::Type::AccessControl }); > } > > NetworkTransactionInformation NetworkCORSPreflightChecker::takeInformation() >diff --git a/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp b/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp >index 6e1d6fc7e73be0b7a3218f8d75dde3afa03fba01..b5686b593e1d747be0d4c1687d0a2bccbb64846d 100644 >--- a/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp >@@ -458,7 +458,7 @@ String NetworkDataTaskBlob::suggestedFilename() const > if (!m_suggestedFilename.isEmpty()) > return m_suggestedFilename; > >- return ASCIILiteral("unknown"); >+ return "unknown"_s; > } > > void NetworkDataTaskBlob::download() >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >index 757b985c29182308bbe2e1c5fc524e1a484cedd7..ef901601f2930ae8a14d38ae186287b7194a3a11 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >@@ -125,7 +125,7 @@ void NetworkLoadChecker::checkRedirection(ResourceResponse& redirectResponse, Re > // See https://github.com/whatwg/fetch/issues/393 > > if (++m_redirectCount > 20) { >- handler(accessControlErrorForValidationHandler(ASCIILiteral("Load cannot follow more than 20 redirections"))); >+ handler(accessControlErrorForValidationHandler("Load cannot follow more than 20 redirections"_s)); > return; > } > >@@ -181,7 +181,7 @@ void NetworkLoadChecker::checkRequest(ResourceRequest&& request, ValidationHandl > contentSecurityPolicy->upgradeInsecureRequestIfNeeded(request, type); > } > if (!isAllowedByContentSecurityPolicy(request)) { >- handler(accessControlErrorForValidationHandler(ASCIILiteral { "Blocked by Content Security Policy." })); >+ handler(accessControlErrorForValidationHandler("Blocked by Content Security Policy."_s)); > return; > } > } >@@ -194,7 +194,7 @@ void NetworkLoadChecker::checkRequest(ResourceRequest&& request, ValidationHandl > return; > } > if (result.value().status.blockedLoad) { >- handler(this->accessControlErrorForValidationHandler(ASCIILiteral("Blocked by content extension"))); >+ handler(this->accessControlErrorForValidationHandler("Blocked by content extension"_s)); > return; > } > this->continueCheckingRequest(WTFMove(result.value().request), WTFMove(handler)); >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >index 4d51ba75021a58fb5532d412beaeadc9fb6f692f..d9ccb8a89b28c63d348d96ca70a8e154228d6bd4 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >@@ -653,7 +653,7 @@ void NetworkResourceLoader::continueWillSendRequest(ResourceRequest&& newRequest > if (m_networkLoadChecker) { > // FIXME: We should be doing this check when receiving the redirection and not allow about protocol as per fetch spec. > if (!newRequest.url().protocolIsInHTTPFamily() && !newRequest.url().isBlankURL() && m_redirectCount) { >- didFailLoading(ResourceError { String { }, 0, newRequest.url(), ASCIILiteral("Redirection to URL with a scheme that is not HTTP(S)"), ResourceError::Type::AccessControl }); >+ didFailLoading(ResourceError { String { }, 0, newRequest.url(), "Redirection to URL with a scheme that is not HTTP(S)"_s, ResourceError::Type::AccessControl }); > return; > } > } >diff --git a/Source/WebKit/NetworkProcess/PingLoad.cpp b/Source/WebKit/NetworkProcess/PingLoad.cpp >index 1aece4792d2e6ead4b042dbd393c41177b690ac2..0ef51416769d26b23e05ba6966ef43a9356dfca3 100644 >--- a/Source/WebKit/NetworkProcess/PingLoad.cpp >+++ b/Source/WebKit/NetworkProcess/PingLoad.cpp >@@ -103,7 +103,7 @@ void PingLoad::willPerformHTTPRedirection(ResourceResponse&& redirectResponse, R > m_networkLoadChecker->prepareRedirectedRequest(request); > > if (!result.value().url().protocolIsInHTTPFamily()) { >- this->didFinish(ResourceError { String { }, 0, result.value().url(), ASCIILiteral("Redirection to URL with a scheme that is not HTTP(S)"), ResourceError::Type::AccessControl }); >+ this->didFinish(ResourceError { String { }, 0, result.value().url(), "Redirection to URL with a scheme that is not HTTP(S)"_s, ResourceError::Type::AccessControl }); > return; > } > >@@ -115,7 +115,7 @@ void PingLoad::didReceiveChallenge(const AuthenticationChallenge&, ChallengeComp > { > RELEASE_LOG_IF_ALLOWED("didReceiveChallenge"); > completionHandler(AuthenticationChallengeDisposition::Cancel, { }); >- didFinish(ResourceError { String(), 0, currentURL(), ASCIILiteral("Failed HTTP authentication"), ResourceError::Type::AccessControl }); >+ didFinish(ResourceError { String(), 0, currentURL(), "Failed HTTP authentication"_s, ResourceError::Type::AccessControl }); > } > > void PingLoad::didReceiveResponseNetworkSession(ResourceResponse&& response, ResponseCompletionHandler&& completionHandler) >@@ -160,7 +160,7 @@ void PingLoad::cannotShowURL() > void PingLoad::timeoutTimerFired() > { > RELEASE_LOG_IF_ALLOWED("timeoutTimerFired"); >- didFinish(ResourceError { String(), 0, currentURL(), ASCIILiteral("Load timed out"), ResourceError::Type::Timeout }); >+ didFinish(ResourceError { String(), 0, currentURL(), "Load timed out"_s, ResourceError::Type::Timeout }); > } > > const URL& PingLoad::currentURL() const >diff --git a/Source/WebKit/NetworkProcess/PreconnectTask.cpp b/Source/WebKit/NetworkProcess/PreconnectTask.cpp >index 0164bd95a0c7c15b0932c7275e11484af927ff1e..3a54262c4d375559493806fdd6a964ba70f1c4ce 100644 >--- a/Source/WebKit/NetworkProcess/PreconnectTask.cpp >+++ b/Source/WebKit/NetworkProcess/PreconnectTask.cpp >@@ -42,7 +42,7 @@ using namespace WebCore; > > PreconnectTask::PreconnectTask(NetworkLoadParameters&& parameters, WTF::CompletionHandler<void(const ResourceError&)>&& completionHandler) > : m_completionHandler(WTFMove(completionHandler)) >- , m_timeoutTimer([this] { didFinish(ResourceError { String(), 0, m_networkLoad->parameters().request.url(), ASCIILiteral("Preconnection timed out"), ResourceError::Type::Timeout }); }) >+ , m_timeoutTimer([this] { didFinish(ResourceError { String(), 0, m_networkLoad->parameters().request.url(), "Preconnection timed out"_s, ResourceError::Type::Timeout }); }) > { > RELEASE_LOG(Network, "%p - PreconnectTask::PreconnectTask()", this); > >diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp >index e626e23780e7a4f4eaffe18ba55202a7f0e077d0..9bab383b90a9cc55c51f878bfeee07bfd7cd5c0f 100644 >--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp >+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp >@@ -300,7 +300,7 @@ void Engine::initialize(CompletionCallback&& callback) > if (!shouldComputeSalt) > return; > >- String saltPath = WebCore::FileSystem::pathByAppendingComponent(m_rootPath, ASCIILiteral("salt")); >+ String saltPath = WebCore::FileSystem::pathByAppendingComponent(m_rootPath, "salt"_s); > m_ioQueue->dispatch([this, weakThis = makeWeakPtr(this), saltPath = WTFMove(saltPath)] () mutable { > WebCore::FileSystem::makeAllDirectories(m_rootPath); > RunLoop::main().dispatch([this, weakThis = WTFMove(weakThis), salt = readOrMakeSalt(saltPath)]() mutable { >diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp >index d7ed89acc4817200be7630b7d2b76f5eda894f94..a33f02079da1f05d49dc17a482aa60a11dcdf6fd 100644 >--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp >+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp >@@ -97,7 +97,7 @@ static inline void updateVaryInformation(RecordInformation& recordInformation, c > > RecordInformation Cache::toRecordInformation(const Record& record) > { >- Key key { ASCIILiteral("record"), m_uniqueName, { }, createCanonicalUUIDString(), m_caches.salt() }; >+ Key key { "record"_s, m_uniqueName, { }, createCanonicalUUIDString(), m_caches.salt() }; > RecordInformation recordInformation { WTFMove(key), MonotonicTime::now().secondsSinceEpoch().milliseconds(), record.identifier, 0 , record.responseBodySize, record.request.url(), false, { } }; > > updateVaryInformation(recordInformation, record.request, record.response); >diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >index 2b2387bb1b37127f94e1698d890a5ffefcbc9266..787a4b1aaeb4b83a9e78a14d7bbedda4c294a57b 100644 >--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >@@ -42,12 +42,12 @@ namespace CacheStorage { > > static inline String cachesListFilename(const String& cachesRootPath) > { >- return WebCore::FileSystem::pathByAppendingComponent(cachesRootPath, ASCIILiteral("cacheslist")); >+ return WebCore::FileSystem::pathByAppendingComponent(cachesRootPath, "cacheslist"_s); > } > > static inline String cachesOriginFilename(const String& cachesRootPath) > { >- return WebCore::FileSystem::pathByAppendingComponent(cachesRootPath, ASCIILiteral("origin")); >+ return WebCore::FileSystem::pathByAppendingComponent(cachesRootPath, "origin"_s); > } > > Caches::~Caches() >diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCacheStatistics.cpp b/Source/WebKit/NetworkProcess/cache/NetworkCacheStatistics.cpp >index dad8c3c5ffb759f9e74d53b70521e698b32e66e9..8ee745357bc988cb1eb19e0992f126458eba7027 100644 >--- a/Source/WebKit/NetworkProcess/cache/NetworkCacheStatistics.cpp >+++ b/Source/WebKit/NetworkProcess/cache/NetworkCacheStatistics.cpp >@@ -109,10 +109,10 @@ void Statistics::initialize(const String& databasePath) > return; > } > >- executeSQLCommand(m_database, ASCIILiteral("CREATE TABLE IF NOT EXISTS AlreadyRequested (hash TEXT PRIMARY KEY)")); >- executeSQLCommand(m_database, ASCIILiteral("CREATE TABLE IF NOT EXISTS UncachedReason (hash TEXT PRIMARY KEY, reason INTEGER)")); >+ executeSQLCommand(m_database, "CREATE TABLE IF NOT EXISTS AlreadyRequested (hash TEXT PRIMARY KEY)"_s); >+ executeSQLCommand(m_database, "CREATE TABLE IF NOT EXISTS UncachedReason (hash TEXT PRIMARY KEY, reason INTEGER)"_s); > >- WebCore::SQLiteStatement statement(m_database, ASCIILiteral("SELECT count(*) FROM AlreadyRequested")); >+ WebCore::SQLiteStatement statement(m_database, "SELECT count(*) FROM AlreadyRequested"_s); > if (statement.prepareAndStep() != SQLITE_ROW) { > LOG_ERROR("Network cache statistics: Failed to count the number of rows in AlreadyRequested table"); > return; >@@ -146,7 +146,7 @@ void Statistics::bootstrapFromNetworkCache(const String& networkCachePath) > LOG(NetworkCache, "(NetworkProcess) Bootstrapping the network cache statistics database from the network cache..."); > > HashSet<String> hashes; >- traverseRecordsFiles(networkCachePath, ASCIILiteral("Resource"), [&hashes](const String& fileName, const String& hashString, const String& type, bool isBodyBlob, const String& recordDirectoryPath) { >+ traverseRecordsFiles(networkCachePath, "Resource"_s, [&hashes](const String& fileName, const String& hashString, const String& type, bool isBodyBlob, const String& recordDirectoryPath) { > if (isBodyBlob) > return; > >@@ -373,14 +373,14 @@ void Statistics::queryWasEverRequested(const String& hash, NeedUncachedReason ne > std::optional<StoreDecision> storeDecision; > if (m_database.isOpen()) { > if (!wasAlreadyRequested) { >- WebCore::SQLiteStatement statement(m_database, ASCIILiteral("SELECT hash FROM AlreadyRequested WHERE hash=?")); >+ WebCore::SQLiteStatement statement(m_database, "SELECT hash FROM AlreadyRequested WHERE hash=?"_s); > if (statement.prepare() == SQLITE_OK) { > statement.bindText(1, query.hash); > wasAlreadyRequested = (statement.step() == SQLITE_ROW); > } > } > if (wasAlreadyRequested && query.needUncachedReason) { >- WebCore::SQLiteStatement statement(m_database, ASCIILiteral("SELECT reason FROM UncachedReason WHERE hash=?")); >+ WebCore::SQLiteStatement statement(m_database, "SELECT reason FROM UncachedReason WHERE hash=?"_s); > storeDecision = StoreDecision::Yes; > if (statement.prepare() == SQLITE_OK) { > statement.bindText(1, query.hash); >@@ -405,8 +405,8 @@ void Statistics::clear() > WebCore::SQLiteTransactionInProgressAutoCounter transactionCounter; > WebCore::SQLiteTransaction deleteTransaction(m_database); > deleteTransaction.begin(); >- executeSQLCommand(m_database, ASCIILiteral("DELETE FROM AlreadyRequested")); >- executeSQLCommand(m_database, ASCIILiteral("DELETE FROM UncachedReason")); >+ executeSQLCommand(m_database, "DELETE FROM AlreadyRequested"_s); >+ executeSQLCommand(m_database, "DELETE FROM UncachedReason"_s); > deleteTransaction.commit(); > m_approximateEntryCount = 0; > } >@@ -419,7 +419,7 @@ void Statistics::addHashesToDatabase(const HashSet<String>& hashes) > ASSERT(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress()); > ASSERT(m_database.isOpen()); > >- WebCore::SQLiteStatement statement(m_database, ASCIILiteral("INSERT OR IGNORE INTO AlreadyRequested (hash) VALUES (?)")); >+ WebCore::SQLiteStatement statement(m_database, "INSERT OR IGNORE INTO AlreadyRequested (hash) VALUES (?)"_s); > if (statement.prepare() != SQLITE_OK) > return; > >@@ -437,7 +437,7 @@ void Statistics::addStoreDecisionsToDatabase(const HashMap<String, NetworkCache: > ASSERT(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress()); > ASSERT(m_database.isOpen()); > >- WebCore::SQLiteStatement statement(m_database, ASCIILiteral("INSERT OR REPLACE INTO UncachedReason (hash, reason) VALUES (?, ?)")); >+ WebCore::SQLiteStatement statement(m_database, "INSERT OR REPLACE INTO UncachedReason (hash, reason) VALUES (?, ?)"_s); > if (statement.prepare() != SQLITE_OK) > return; > >diff --git a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >index 209e20a75493410ee8f967b45bfdd42f57b2fdef..5e7ca9ec942f92c2a999d8ca8a5c429fbb9dc7f3 100644 >--- a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >+++ b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >@@ -108,7 +108,7 @@ void XPCServiceInitializer(OSObjectPtr<xpc_connection_t> connection, xpc_object_ > #endif > > #if HAVE(QOS_CLASSES) >- if (parameters.extraInitializationData.contains(ASCIILiteral("always-runs-at-background-priority"))) >+ if (parameters.extraInitializationData.contains("always-runs-at-background-priority"_s)) > Thread::setGlobalMaxQOSClass(QOS_CLASS_UTILITY); > #endif > >diff --git a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm >index 3341fb0d76b9104247521cb7c3fb2e3cd869cd71..778c833d97d1d6efa264c9f6e232efd2ce324211 100644 >--- a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm >+++ b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm >@@ -113,27 +113,27 @@ bool XPCServiceInitializerDelegate::getExtraInitializationData(HashMap<String, S > > String inspectorProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "inspector-process"); > if (!inspectorProcess.isEmpty()) >- extraInitializationData.add(ASCIILiteral("inspector-process"), inspectorProcess); >+ extraInitializationData.add("inspector-process"_s, inspectorProcess); > > #if ENABLE(SERVICE_WORKER) > String serviceWorkerProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "service-worker-process"); > if (!serviceWorkerProcess.isEmpty()) >- extraInitializationData.add(ASCIILiteral("service-worker-process"), serviceWorkerProcess); >+ extraInitializationData.add("service-worker-process"_s, serviceWorkerProcess); > #endif > > String securityOrigin = xpc_dictionary_get_string(extraDataInitializationDataObject, "security-origin"); > if (!securityOrigin.isEmpty()) >- extraInitializationData.add(ASCIILiteral("security-origin"), securityOrigin); >+ extraInitializationData.add("security-origin"_s, securityOrigin); > > if (!isClientSandboxed()) { > String userDirectorySuffix = xpc_dictionary_get_string(extraDataInitializationDataObject, "user-directory-suffix"); > if (!userDirectorySuffix.isEmpty()) >- extraInitializationData.add(ASCIILiteral("user-directory-suffix"), userDirectorySuffix); >+ extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); > } > > String alwaysRunsAtBackgroundPriority = xpc_dictionary_get_string(extraDataInitializationDataObject, "always-runs-at-background-priority"); > if (!alwaysRunsAtBackgroundPriority.isEmpty()) >- extraInitializationData.add(ASCIILiteral("always-runs-at-background-priority"), alwaysRunsAtBackgroundPriority); >+ extraInitializationData.add("always-runs-at-background-priority"_s, alwaysRunsAtBackgroundPriority); > > return true; > } >diff --git a/Source/WebKit/Shared/Plugins/Netscape/PluginInformation.cpp b/Source/WebKit/Shared/Plugins/Netscape/PluginInformation.cpp >index cc39e559cfcdb9472e223aa46d6bb50b53bd7e2f..667734b4a3a59935bf08d9452abba03d0c697990 100644 >--- a/Source/WebKit/Shared/Plugins/Netscape/PluginInformation.cpp >+++ b/Source/WebKit/Shared/Plugins/Netscape/PluginInformation.cpp >@@ -40,72 +40,72 @@ namespace WebKit { > > String pluginInformationBundleIdentifierKey() > { >- return ASCIILiteral("PluginInformationBundleIdentifier"); >+ return "PluginInformationBundleIdentifier"_s; > } > > String pluginInformationBundleVersionKey() > { >- return ASCIILiteral("PluginInformationBundleVersion"); >+ return "PluginInformationBundleVersion"_s; > } > > String pluginInformationBundleShortVersionKey() > { >- return ASCIILiteral("PluginInformationBundleShortVersion"); >+ return "PluginInformationBundleShortVersion"_s; > } > > String pluginInformationPathKey() > { >- return ASCIILiteral("PluginInformationPath"); >+ return "PluginInformationPath"_s; > } > > String pluginInformationDisplayNameKey() > { >- return ASCIILiteral("PluginInformationDisplayName"); >+ return "PluginInformationDisplayName"_s; > } > > String pluginInformationDefaultLoadPolicyKey() > { >- return ASCIILiteral("PluginInformationDefaultLoadPolicy"); >+ return "PluginInformationDefaultLoadPolicy"_s; > } > > String pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey() > { >- return ASCIILiteral("PluginInformationUpdatePastLastBlockedVersionIsKnownAvailable"); >+ return "PluginInformationUpdatePastLastBlockedVersionIsKnownAvailable"_s; > } > > String pluginInformationHasSandboxProfileKey() > { >- return ASCIILiteral("PluginInformationHasSandboxProfile"); >+ return "PluginInformationHasSandboxProfile"_s; > } > > String pluginInformationFrameURLKey() > { >- return ASCIILiteral("PluginInformationFrameURL"); >+ return "PluginInformationFrameURL"_s; > } > > String pluginInformationMIMETypeKey() > { >- return ASCIILiteral("PluginInformationMIMEType"); >+ return "PluginInformationMIMEType"_s; > } > > String pluginInformationPageURLKey() > { >- return ASCIILiteral("PluginInformationPageURL"); >+ return "PluginInformationPageURL"_s; > } > > String pluginInformationPluginspageAttributeURLKey() > { >- return ASCIILiteral("PluginInformationPluginspageAttributeURL"); >+ return "PluginInformationPluginspageAttributeURL"_s; > } > > String pluginInformationPluginURLKey() > { >- return ASCIILiteral("PluginInformationPluginURL"); >+ return "PluginInformationPluginURL"_s; > } > > String plugInInformationReplacementObscuredKey() > { >- return ASCIILiteral("PlugInInformationReplacementObscured"); >+ return "PlugInInformationReplacementObscured"_s; > } > > void getPluginModuleInformation(const PluginModuleInfo& plugin, API::Dictionary::MapType& map) >diff --git a/Source/WebKit/Shared/ios/WebIOSEventFactory.mm b/Source/WebKit/Shared/ios/WebIOSEventFactory.mm >index 171b1c0e10add45c7e259e661b5171640e34444f..503678b6f5fdd7cfbaf4f18135bced909383eec6 100644 >--- a/Source/WebKit/Shared/ios/WebIOSEventFactory.mm >+++ b/Source/WebKit/Shared/ios/WebIOSEventFactory.mm >@@ -68,7 +68,7 @@ WebKit::WebKeyboardEvent WebIOSEventFactory::createWebKeyboardEvent(::WebEvent * > double timestamp = event.timestamp; > > if (windowsVirtualKeyCode == '\r') { >- text = ASCIILiteral("\r"); >+ text = "\r"_s; > unmodifiedText = text; > } > >@@ -76,12 +76,12 @@ WebKit::WebKeyboardEvent WebIOSEventFactory::createWebKeyboardEvent(::WebEvent * > > // Turn 0x7F into 8, because backspace needs to always be 8. > if (text == "\x7F") >- text = ASCIILiteral("\x8"); >+ text = "\x8"_s; > if (unmodifiedText == "\x7F") >- unmodifiedText = ASCIILiteral("\x8"); >+ unmodifiedText = "\x8"_s; > // Always use 9 for tab. > if (windowsVirtualKeyCode == 9) { >- text = ASCIILiteral("\x9"); >+ text = "\x9"_s; > unmodifiedText = text; > } > >diff --git a/Source/WebKit/Shared/linux/WebMemorySamplerLinux.cpp b/Source/WebKit/Shared/linux/WebMemorySamplerLinux.cpp >index aa8400193faaccc29228fbf566510a8211049d1e..aca0a0a9ba5d8499d23d80b1a71bf001f8d62955 100644 >--- a/Source/WebKit/Shared/linux/WebMemorySamplerLinux.cpp >+++ b/Source/WebKit/Shared/linux/WebMemorySamplerLinux.cpp >@@ -97,18 +97,18 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const > > WallTime now = WallTime::now(); > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Timestamp"), now.secondsSinceEpoch().seconds()); >+ appendKeyValuePair(webKitMemoryStats, "Timestamp"_s, now.secondsSinceEpoch().seconds()); > > ProcessMemoryStatus processMemoryStatus; > currentProcessMemoryStatus(processMemoryStatus); > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Program Bytes"), processMemoryStatus.size); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Resident Set Bytes"), processMemoryStatus.resident); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Resident Shared Bytes"), processMemoryStatus.shared); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Text Bytes"), processMemoryStatus.text); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Library Bytes"), processMemoryStatus.lib); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Data + Stack Bytes"), processMemoryStatus.data); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Dirty Bytes"), processMemoryStatus.dt); >+ appendKeyValuePair(webKitMemoryStats, "Total Program Bytes"_s, processMemoryStatus.size); >+ appendKeyValuePair(webKitMemoryStats, "Resident Set Bytes"_s, processMemoryStatus.resident); >+ appendKeyValuePair(webKitMemoryStats, "Resident Shared Bytes"_s, processMemoryStatus.shared); >+ appendKeyValuePair(webKitMemoryStats, "Text Bytes"_s, processMemoryStatus.text); >+ appendKeyValuePair(webKitMemoryStats, "Library Bytes"_s, processMemoryStatus.lib); >+ appendKeyValuePair(webKitMemoryStats, "Data + Stack Bytes"_s, processMemoryStatus.data); >+ appendKeyValuePair(webKitMemoryStats, "Dirty Bytes"_s, processMemoryStatus.dt); > > size_t totalBytesInUse = 0; > size_t totalBytesCommitted = 0; >@@ -119,8 +119,8 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const > totalBytesInUse += fastMallocBytesInUse; > totalBytesCommitted += fastMallocBytesCommitted; > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Fast Malloc In Use"), fastMallocBytesInUse); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Fast Malloc Committed Memory"), fastMallocBytesCommitted); >+ appendKeyValuePair(webKitMemoryStats, "Fast Malloc In Use"_s, fastMallocBytesInUse); >+ appendKeyValuePair(webKitMemoryStats, "Fast Malloc Committed Memory"_s, fastMallocBytesCommitted); > > size_t jscHeapBytesInUse = commonVM().heap.size(); > size_t jscHeapBytesCommitted = commonVM().heap.capacity(); >@@ -131,23 +131,23 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const > totalBytesInUse += globalMemoryStats.stackBytes + globalMemoryStats.JITBytes; > totalBytesCommitted += globalMemoryStats.stackBytes + globalMemoryStats.JITBytes; > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript Heap In Use"), jscHeapBytesInUse); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript Heap Committed Memory"), jscHeapBytesCommitted); >+ appendKeyValuePair(webKitMemoryStats, "JavaScript Heap In Use"_s, jscHeapBytesInUse); >+ appendKeyValuePair(webKitMemoryStats, "JavaScript Heap Committed Memory"_s, jscHeapBytesCommitted); > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript Stack Bytes"), globalMemoryStats.stackBytes); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript JIT Bytes"), globalMemoryStats.JITBytes); >+ appendKeyValuePair(webKitMemoryStats, "JavaScript Stack Bytes"_s, globalMemoryStats.stackBytes); >+ appendKeyValuePair(webKitMemoryStats, "JavaScript JIT Bytes"_s, globalMemoryStats.JITBytes); > >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Memory In Use"), totalBytesInUse); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Committed Memory"), totalBytesCommitted); >+ appendKeyValuePair(webKitMemoryStats, "Total Memory In Use"_s, totalBytesInUse); >+ appendKeyValuePair(webKitMemoryStats, "Total Committed Memory"_s, totalBytesCommitted); > > struct sysinfo systemInfo; > if (!sysinfo(&systemInfo)) { >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("System Total Bytes"), systemInfo.totalram); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Available Bytes"), systemInfo.freeram); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Shared Bytes"), systemInfo.sharedram); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Buffer Bytes"), systemInfo.bufferram); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Swap Bytes"), systemInfo.totalswap); >- appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Available Swap Bytes"), systemInfo.freeswap); >+ appendKeyValuePair(webKitMemoryStats, "System Total Bytes"_s, systemInfo.totalram); >+ appendKeyValuePair(webKitMemoryStats, "Available Bytes"_s, systemInfo.freeram); >+ appendKeyValuePair(webKitMemoryStats, "Shared Bytes"_s, systemInfo.sharedram); >+ appendKeyValuePair(webKitMemoryStats, "Buffer Bytes"_s, systemInfo.bufferram); >+ appendKeyValuePair(webKitMemoryStats, "Total Swap Bytes"_s, systemInfo.totalswap); >+ appendKeyValuePair(webKitMemoryStats, "Available Swap Bytes"_s, systemInfo.freeswap); > } > > return webKitMemoryStats; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm >index bc9ce7850db7db39ad5a3dfe74f6887383d56620..69bd36d84dbf9d4910609762f0df51987caae11a 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm >@@ -97,11 +97,11 @@ static String debuggableTypeString(WKRemoteWebInspectorDebuggableType debuggable > { > switch (debuggableType) { > case WKRemoteWebInspectorDebuggableTypeJavaScript: >- return ASCIILiteral("javascript"); >+ return "javascript"_s; > case WKRemoteWebInspectorDebuggableTypeServiceWorker: >- return ASCIILiteral("service-worker"); >+ return "service-worker"_s; > case WKRemoteWebInspectorDebuggableTypeWeb: >- return ASCIILiteral("web"); >+ return "web"_s; > } > } > >diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >index 729d5f87ab83fa5cc718056c84258b2c7585f9c6..7b7f037e0a2e0a3a0042ecb7bc591e831c6594ea 100644 >--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp >@@ -1267,7 +1267,7 @@ void webkit_web_context_set_preferred_languages(WebKitWebContext* context, const > for (size_t i = 0; languageList[i]; ++i) { > // Do not propagate the C locale to WebCore. > if (!g_ascii_strcasecmp(languageList[i], "C") || !g_ascii_strcasecmp(languageList[i], "POSIX")) >- languages.append(ASCIILiteral("en-us")); >+ languages.append("en-us"_s); > else > languages.append(String::fromUTF8(languageList[i]).convertToASCIILowercase().replace("_", "-")); > } >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >index 149d02c5c8df3365334d321bf0e9a2a1a7348f2d..86a5d06f4ff723f1870e3a517bc5b4526bcf2adf 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >@@ -338,10 +338,10 @@ void WebAutomationSession::setWindowFrameOfBrowsingContext(const String& handle, > std::optional<float> x; > std::optional<float> y; > if (optionalOriginObject) { >- if (!(x = optionalOriginObject->getNumber<float>(WTF::ASCIILiteral("x")))) >+ if (!(x = optionalOriginObject->getNumber<float>("x"_s))) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The 'x' parameter was not found or invalid."); > >- if (!(y = optionalOriginObject->getNumber<float>(WTF::ASCIILiteral("y")))) >+ if (!(y = optionalOriginObject->getNumber<float>("y"_s))) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The 'y' parameter was not found or invalid."); > > if (x.value() < 0) >@@ -354,10 +354,10 @@ void WebAutomationSession::setWindowFrameOfBrowsingContext(const String& handle, > std::optional<float> width; > std::optional<float> height; > if (optionalSizeObject) { >- if (!(width = optionalSizeObject->getNumber<float>(WTF::ASCIILiteral("width")))) >+ if (!(width = optionalSizeObject->getNumber<float>("width"_s))) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The 'width' parameter was not found or invalid."); > >- if (!(height = optionalSizeObject->getNumber<float>(WTF::ASCIILiteral("height")))) >+ if (!(height = optionalSizeObject->getNumber<float>("height"_s))) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The 'height' parameter was not found or invalid."); > > if (width.value() < 0) >@@ -1305,14 +1305,14 @@ void WebAutomationSession::addSingleCookie(const String& browsingContextHandle, > > WebCore::Cookie cookie; > >- if (!cookieObject.getString(WTF::ASCIILiteral("name"), cookie.name)) >+ if (!cookieObject.getString("name"_s, cookie.name)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'name' was not found."); > >- if (!cookieObject.getString(WTF::ASCIILiteral("value"), cookie.value)) >+ if (!cookieObject.getString("value"_s, cookie.value)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'value' was not found."); > > String domain; >- if (!cookieObject.getString(WTF::ASCIILiteral("domain"), domain)) >+ if (!cookieObject.getString("domain"_s, domain)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'domain' was not found."); > > // Inherit the domain/host from the main frame's URL if it is not explicitly set. >@@ -1321,22 +1321,22 @@ void WebAutomationSession::addSingleCookie(const String& browsingContextHandle, > > cookie.domain = domainByAddingDotPrefixIfNeeded(domain); > >- if (!cookieObject.getString(WTF::ASCIILiteral("path"), cookie.path)) >+ if (!cookieObject.getString("path"_s, cookie.path)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'path' was not found."); > > double expires; >- if (!cookieObject.getDouble(WTF::ASCIILiteral("expires"), expires)) >+ if (!cookieObject.getDouble("expires"_s, expires)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'expires' was not found."); > > cookie.expires = expires * 1000.0; > >- if (!cookieObject.getBoolean(WTF::ASCIILiteral("secure"), cookie.secure)) >+ if (!cookieObject.getBoolean("secure"_s, cookie.secure)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'secure' was not found."); > >- if (!cookieObject.getBoolean(WTF::ASCIILiteral("session"), cookie.session)) >+ if (!cookieObject.getBoolean("session"_s, cookie.session)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'session' was not found."); > >- if (!cookieObject.getBoolean(WTF::ASCIILiteral("httpOnly"), cookie.httpOnly)) >+ if (!cookieObject.getBoolean("httpOnly"_s, cookie.httpOnly)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'httpOnly' was not found."); > > WebCookieManagerProxy* cookieManager = m_processPool->supplement<WebCookieManagerProxy>(); >@@ -1384,7 +1384,7 @@ void WebAutomationSession::setSessionPermissions(ErrorString& errorString, const > SYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The parameter 'permissions' is invalid."); > > String permissionName; >- if (!permission->getString(WTF::ASCIILiteral("permission"), permissionName)) >+ if (!permission->getString("permission"_s, permissionName)) > SYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The parameter 'permission' is missing or invalid."); > > auto parsedPermissionName = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::SessionPermission>(permissionName); >@@ -1392,7 +1392,7 @@ void WebAutomationSession::setSessionPermissions(ErrorString& errorString, const > SYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The parameter 'permission' has an unknown value."); > > bool permissionValue; >- if (!permission->getBoolean(WTF::ASCIILiteral("value"), permissionValue)) >+ if (!permission->getBoolean("value"_s, permissionValue)) > SYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "The parameter 'value' is missing or invalid."); > > switch (parsedPermissionName.value()) { >@@ -1542,11 +1542,11 @@ void WebAutomationSession::performMouseInteraction(const String& handle, const J > ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); > > float x; >- if (!requestedPositionObject.getDouble(WTF::ASCIILiteral("x"), x)) >+ if (!requestedPositionObject.getDouble("x"_s, x)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'x' was not found."); > > float y; >- if (!requestedPositionObject.getDouble(WTF::ASCIILiteral("y"), y)) >+ if (!requestedPositionObject.getDouble("y"_s, y)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(MissingParameter, "The parameter 'y' was not found."); > > WebEvent::Modifiers keyModifiers = (WebEvent::Modifiers)0; >@@ -1628,14 +1628,14 @@ void WebAutomationSession::performKeyboardInteractions(const String& handle, con > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An interaction in the 'interactions' parameter was invalid."); > > String interactionTypeString; >- if (!interactionObject->getString(ASCIILiteral("type"), interactionTypeString)) >+ if (!interactionObject->getString("type"_s, interactionTypeString)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An interaction in the 'interactions' parameter is missing the 'type' key."); > auto interactionType = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::KeyboardInteractionType>(interactionTypeString); > if (!interactionType) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An interaction in the 'interactions' parameter has an invalid 'type' key."); > > String virtualKeyString; >- bool foundVirtualKey = interactionObject->getString(ASCIILiteral("key"), virtualKeyString); >+ bool foundVirtualKey = interactionObject->getString("key"_s, virtualKeyString); > if (foundVirtualKey) { > auto virtualKey = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::VirtualKey>(virtualKeyString); > if (!virtualKey) >@@ -1647,7 +1647,7 @@ void WebAutomationSession::performKeyboardInteractions(const String& handle, con > } > > String keySequence; >- bool foundKeySequence = interactionObject->getString(ASCIILiteral("text"), keySequence); >+ bool foundKeySequence = interactionObject->getString("text"_s, keySequence); > if (foundKeySequence) { > switch (interactionType.value()) { > case Inspector::Protocol::Automation::KeyboardInteractionType::KeyPress: >@@ -1735,11 +1735,11 @@ void WebAutomationSession::performInteractionSequence(const String& handle, cons > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An input source in the 'inputSources' parameter was invalid."); > > String sourceId; >- if (!inputSourceObject->getString(ASCIILiteral("sourceId"), sourceId)) >+ if (!inputSourceObject->getString("sourceId"_s, sourceId)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An input source in the 'inputSources' parameter is missing a 'sourceId'."); > > String sourceType; >- if (!inputSourceObject->getString(ASCIILiteral("sourceType"), sourceType)) >+ if (!inputSourceObject->getString("sourceType"_s, sourceType)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "An input source in the 'inputSources' parameter is missing a 'sourceType'."); > > auto parsedInputSourceType = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::InputSourceType>(sourceType); >@@ -1770,7 +1770,7 @@ void WebAutomationSession::performInteractionSequence(const String& handle, cons > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "A step in the 'steps' parameter was not an object."); > > RefPtr<JSON::Array> stepStates; >- if (!stepObject->getArray(ASCIILiteral("states"), stepStates)) >+ if (!stepObject->getArray("states"_s, stepStates)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "A step is missing the 'states' property."); > > Vector<SimulatedInputKeyFrame::StateEntry> entries; >@@ -1782,7 +1782,7 @@ void WebAutomationSession::performInteractionSequence(const String& handle, cons > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "Encountered a non-object step state."); > > String sourceId; >- if (!stateObject->getString(ASCIILiteral("sourceId"), sourceId)) >+ if (!stateObject->getString("sourceId"_s, sourceId)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "Step state lacks required 'sourceId' property."); > > if (!sourceIdToInputSourceMap.contains(sourceId)) >@@ -1792,39 +1792,39 @@ void WebAutomationSession::performInteractionSequence(const String& handle, cons > SimulatedInputSourceState sourceState { }; > > String pressedCharKeyString; >- if (stateObject->getString(ASCIILiteral("pressedCharKey"), pressedCharKeyString)) >+ if (stateObject->getString("pressedCharKey"_s, pressedCharKeyString)) > sourceState.pressedCharKey = pressedCharKeyString.characterAt(0); > > String pressedVirtualKeyString; >- if (stateObject->getString(ASCIILiteral("pressedVirtualKey"), pressedVirtualKeyString)) >+ if (stateObject->getString("pressedVirtualKey"_s, pressedVirtualKeyString)) > sourceState.pressedVirtualKey = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::VirtualKey>(pressedVirtualKeyString); > > String pressedButtonString; >- if (stateObject->getString(ASCIILiteral("pressedButton"), pressedButtonString)) { >+ if (stateObject->getString("pressedButton"_s, pressedButtonString)) { > auto protocolButton = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::MouseButton>(pressedButtonString); > sourceState.pressedMouseButton = protocolMouseButtonToWebMouseEventButton(protocolButton.value_or(Inspector::Protocol::Automation::MouseButton::None)); > } > > String originString; >- if (stateObject->getString(ASCIILiteral("origin"), originString)) >+ if (stateObject->getString("origin"_s, originString)) > sourceState.origin = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::MouseMoveOrigin>(originString); > > if (sourceState.origin && sourceState.origin.value() == Inspector::Protocol::Automation::MouseMoveOrigin::Element) { > String nodeHandleString; >- if (!stateObject->getString(ASCIILiteral("nodeHandle"), nodeHandleString)) >+ if (!stateObject->getString("nodeHandle"_s, nodeHandleString)) > ASYNC_FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InvalidParameter, "Node handle not provided for 'Element' origin"); > sourceState.nodeHandle = nodeHandleString; > } > > RefPtr<JSON::Object> locationObject; >- if (stateObject->getObject(ASCIILiteral("location"), locationObject)) { >+ if (stateObject->getObject("location"_s, locationObject)) { > int x, y; >- if (locationObject->getInteger(ASCIILiteral("x"), x) && locationObject->getInteger(ASCIILiteral("y"), y)) >+ if (locationObject->getInteger("x"_s, x) && locationObject->getInteger("y"_s, y)) > sourceState.location = WebCore::IntPoint(x, y); > } > > int parsedDuration; >- if (stateObject->getInteger(ASCIILiteral("duration"), parsedDuration)) >+ if (stateObject->getInteger("duration"_s, parsedDuration)) > sourceState.duration = Seconds::fromMilliseconds(parsedDuration); > > entries.uncheckedAppend(std::pair<SimulatedInputSource&, SimulatedInputSourceState> { inputSource, sourceState }); >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >index 12b7335b863a9c29123b82946ecd2e9527661073..5fa0bb781b68380f09637b4dca4ff86488000c09 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >@@ -250,7 +250,7 @@ class WebAutomationSession final : public API::ObjectImpl<API::Object::Type::Aut > WebProcessPool* m_processPool { nullptr }; > > std::unique_ptr<API::AutomationSessionClient> m_client; >- String m_sessionIdentifier { ASCIILiteral("Untitled Session") }; >+ String m_sessionIdentifier { "Untitled Session"_s }; > Ref<Inspector::FrontendRouter> m_frontendRouter; > Ref<Inspector::BackendDispatcher> m_backendDispatcher; > Ref<Inspector::AutomationBackendDispatcher> m_domainDispatcher; >diff --git a/Source/WebKit/UIProcess/ChildProcessProxy.cpp b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >index bdff583d3b1b92240f272775e14b03ecc017e40e..9e8eff4869096c3de659b6b1036ecc47270e84cd 100644 >--- a/Source/WebKit/UIProcess/ChildProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ChildProcessProxy.cpp >@@ -52,10 +52,10 @@ void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchO > launchOptions.processIdentifier = m_processIdentifier; > > if (const char* userDirectorySuffix = getenv("DIRHELPER_USER_DIR_SUFFIX")) >- launchOptions.extraInitializationData.add(ASCIILiteral("user-directory-suffix"), userDirectorySuffix); >+ launchOptions.extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); > > if (m_alwaysRunsAtBackgroundPriority) >- launchOptions.extraInitializationData.add(ASCIILiteral("always-runs-at-background-priority"), "true"); >+ launchOptions.extraInitializationData.add("always-runs-at-background-priority"_s, "true"); > > #if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) > const char* varname; >diff --git a/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm b/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >index 31c1321c09a076fa757b72db098959e2a045f54d..31e16e4a358789e19ede92d0cd97e12a8a3591f2 100644 >--- a/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >+++ b/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm >@@ -78,7 +78,7 @@ void DownloadClient::didStart(WebProcessPool&, DownloadProxy& downloadProxy) > if (downloadProxy.isSystemPreviewDownload()) { > if (auto* webPage = downloadProxy.originatingPage()) { > // FIXME: Update the MIME-type once it is known in the ResourceResponse. >- webPage->systemPreviewController()->start(ASCIILiteral { "application/octet-stream" }, downloadProxy.systemPreviewDownloadRect()); >+ webPage->systemPreviewController()->start("application/octet-stream"_s, downloadProxy.systemPreviewDownloadRect()); > } > takeActivityToken(downloadProxy); > return; >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 939c050eb6cd1cc8ac28614d79b100a7a0c48116..3870b1660454d180e56a5a14c5bb6b2db3c76930 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -2518,15 +2518,15 @@ static const SelectorNameMap& selectorExceptionMap() > }; > > static const SelectorAndCommandName names[] = { >- { @selector(insertNewlineIgnoringFieldEditor:), ASCIILiteral("InsertNewline") }, >- { @selector(insertParagraphSeparator:), ASCIILiteral("InsertNewline") }, >- { @selector(insertTabIgnoringFieldEditor:), ASCIILiteral("InsertTab") }, >- { @selector(pageDown:), ASCIILiteral("MovePageDown") }, >- { @selector(pageDownAndModifySelection:), ASCIILiteral("MovePageDownAndModifySelection") }, >- { @selector(pageUp:), ASCIILiteral("MovePageUp") }, >- { @selector(pageUpAndModifySelection:), ASCIILiteral("MovePageUpAndModifySelection") }, >- { @selector(scrollPageDown:), ASCIILiteral("ScrollPageForward") }, >- { @selector(scrollPageUp:), ASCIILiteral("ScrollPageBackward") } >+ { @selector(insertNewlineIgnoringFieldEditor:), "InsertNewline"_s }, >+ { @selector(insertParagraphSeparator:), "InsertNewline"_s }, >+ { @selector(insertTabIgnoringFieldEditor:), "InsertTab"_s }, >+ { @selector(pageDown:), "MovePageDown"_s }, >+ { @selector(pageDownAndModifySelection:), "MovePageDownAndModifySelection"_s }, >+ { @selector(pageUp:), "MovePageUp"_s }, >+ { @selector(pageUpAndModifySelection:), "MovePageUpAndModifySelection"_s }, >+ { @selector(scrollPageDown:), "ScrollPageForward"_s }, >+ { @selector(scrollPageUp:), "ScrollPageBackward"_s } > }; > > for (auto& name : names) >diff --git a/Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp b/Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp >index 48a60eba13042f22fc16a57627ca55c59ad92d5a..9cbcfbf2cd9041af48d09c2d0e6f0e4de2020568 100644 >--- a/Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp >+++ b/Source/WebKit/UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp >@@ -53,7 +53,7 @@ void WebCredentialsMessengerProxy::makeCredential(uint64_t messageId, const Vect > { > // FIXME(182767) > if (!m_authenticator) { >- exceptionReply(messageId, { WebCore::NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionReply(messageId, { WebCore::NotAllowedError, "No avaliable authenticators."_s }); > return; > } > // FIXME(183534): Weak pointers doesn't work in another thread because of race condition. >@@ -76,7 +76,7 @@ void WebCredentialsMessengerProxy::getAssertion(uint64_t messageId, const Vector > { > // FIXME(182767) > if (!m_authenticator) >- exceptionReply(messageId, { WebCore::NotAllowedError, ASCIILiteral("No avaliable authenticators.") }); >+ exceptionReply(messageId, { WebCore::NotAllowedError, "No avaliable authenticators."_s }); > // FIXME(183534): Weak pointers doesn't work in another thread because of race condition. > // FIXME(183534): Unify callbacks. > auto weakThis = makeWeakPtr(*this); >diff --git a/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm b/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >index 723d44423d3f2b7328d8a78343ad442bbc260f2d..c82c20938b402d4eae997cadc5bf7bc6b45435da 100644 >--- a/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >+++ b/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >@@ -46,7 +46,7 @@ Vector<String> PluginInfoStore::pluginsDirectories() > Vector<String> pluginsDirectories; > pluginsDirectories.reserveInitialCapacity(2); > >- ASCIILiteral pluginPath { "/Library/Internet Plug-Ins" }; >+ ASCIILiteral pluginPath { "/Library/Internet Plug-Ins"_s }; > > if (auto* pw = getpwuid(getuid())) > pluginsDirectories.uncheckedAppend(makeString(pw->pw_dir, pluginPath)); >diff --git a/Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp b/Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp >index b67cade25dfcc9bacf579c66b5507fef0accbb7c..757740fe0d30d96e552e891468d099991ad007d6 100644 >--- a/Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp >+++ b/Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp >@@ -234,7 +234,7 @@ void ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk() > > m_lastStatisticsFileSyncTime = readTime; > >- m_memoryStore.logTestingEvent(ASCIILiteral("PopulatedWithoutGrandfathering")); >+ m_memoryStore.logTestingEvent("PopulatedWithoutGrandfathering"_s); > } > > void ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired() >diff --git a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >index c37b9509eba3b6a2bd91ac72adf1b32a48961079..7953d13f35a52460e3d69ead04b82c93ee36492e 100644 >--- a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >@@ -70,8 +70,8 @@ void ServiceWorkerProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& > { > WebProcessProxy::getLaunchOptions(launchOptions); > >- launchOptions.extraInitializationData.add(ASCIILiteral("service-worker-process"), ASCIILiteral("1")); >- launchOptions.extraInitializationData.add(ASCIILiteral("security-origin"), securityOrigin().toString()); >+ launchOptions.extraInitializationData.add("service-worker-process"_s, "1"_s); >+ launchOptions.extraInitializationData.add("security-origin"_s, securityOrigin().toString()); > } > > void ServiceWorkerProcessProxy::start(const WebPreferencesStore& store, std::optional<PAL::SessionID> initialSessionID) >@@ -97,7 +97,7 @@ void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(uint64_t pageI > // FIXME: Expose an API to delegate the actual decision to the application layer. > auto& protectionSpace = challenge->core().protectionSpace(); > if (protectionSpace.authenticationScheme() == WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested && processPool().allowsAnySSLCertificateForServiceWorker()) { >- auto credential = WebCore::Credential(ASCIILiteral("accept server trust"), emptyString(), WebCore::CredentialPersistenceNone); >+ auto credential = WebCore::Credential("accept server trust"_s, emptyString(), WebCore::CredentialPersistenceNone); > challenge->useCredential(WebCredential::create(credential).ptr()); > return; > } >diff --git a/Source/WebKit/UIProcess/UserMediaProcessManager.cpp b/Source/WebKit/UIProcess/UserMediaProcessManager.cpp >index cd0a55b88d93f4a633e77c13c65e96f58de887b6..ae6df743a9f0130f3d94371b9fcec533098f6478 100644 >--- a/Source/WebKit/UIProcess/UserMediaProcessManager.cpp >+++ b/Source/WebKit/UIProcess/UserMediaProcessManager.cpp >@@ -31,8 +31,8 @@ > namespace WebKit { > > #if ENABLE(SANDBOX_EXTENSIONS) >-static const char* const audioExtensionPath = "com.apple.webkit.microphone"; >-static const char* const videoExtensionPath = "com.apple.webkit.camera"; >+static const ASCIILiteral audioExtensionPath { "com.apple.webkit.microphone"_s }; >+static const ASCIILiteral videoExtensionPath { "com.apple.webkit.camera"_s }; > #endif > > class ProcessState { >@@ -165,14 +165,14 @@ bool UserMediaProcessManager::willCreateMediaStream(UserMediaPermissionRequestMa > > if (withAudio && requiredExtensions & ProcessState::SandboxExtensionsGranted::Audio) { > if (SandboxExtension::createHandleForGenericExtension(audioExtensionPath, handles[--extensionCount])) { >- ids.append(ASCIILiteral(audioExtensionPath)); >+ ids.append(audioExtensionPath); > currentExtensions |= ProcessState::SandboxExtensionsGranted::Audio; > } > } > > if (withVideo && requiredExtensions & ProcessState::SandboxExtensionsGranted::Video) { > if (SandboxExtension::createHandleForGenericExtension(videoExtensionPath, handles[--extensionCount])) { >- ids.append(ASCIILiteral(videoExtensionPath)); >+ ids.append(videoExtensionPath); > currentExtensions |= ProcessState::SandboxExtensionsGranted::Video; > } > } >@@ -222,11 +222,11 @@ void UserMediaProcessManager::endedCaptureSession(UserMediaPermissionRequestMana > Vector<String> params; > unsigned currentExtensions = state.sandboxExtensionsGranted(); > if (!hasAudioCapture && currentExtensions & ProcessState::SandboxExtensionsGranted::Audio) { >- params.append(ASCIILiteral(audioExtensionPath)); >+ params.append(audioExtensionPath); > currentExtensions &= ~ProcessState::SandboxExtensionsGranted::Audio; > } > if (!hasVideoCapture && currentExtensions & ProcessState::SandboxExtensionsGranted::Video) { >- params.append(ASCIILiteral(videoExtensionPath)); >+ params.append(videoExtensionPath); > currentExtensions &= ~ProcessState::SandboxExtensionsGranted::Video; > } > >diff --git a/Source/WebKit/UIProcess/WebBackForwardList.cpp b/Source/WebKit/UIProcess/WebBackForwardList.cpp >index 6006a02324b0b75cb032fa824109c86be238bca5..0808a1a600fe1108896e7a9a67f087362308691c 100644 >--- a/Source/WebKit/UIProcess/WebBackForwardList.cpp >+++ b/Source/WebKit/UIProcess/WebBackForwardList.cpp >@@ -191,7 +191,7 @@ void WebBackForwardList::goToItem(WebBackForwardListItem& item) > > if (targetIndex < m_currentIndex) { > unsigned delta = m_entries.size() - targetIndex - 1; >- String deltaValue = delta > 10 ? ASCIILiteral("over10") : String::number(delta); >+ String deltaValue = delta > 10 ? "over10"_s : String::number(delta); > m_page->logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey(), deltaValue, ShouldSample::No); > } > >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index b9af1d6bff9884bdda6040ce7980761628fc1899..bcd144554a6ac7151739a29bf2e11f99df4ad321 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -1010,7 +1010,7 @@ RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, cons > > URL resourceDirectoryURL; > if (resourceDirectoryURLString.isNull()) >- resourceDirectoryURL = URL(ParsedURLString, ASCIILiteral("file:///")); >+ resourceDirectoryURL = URL(ParsedURLString, "file:///"_s); > else { > resourceDirectoryURL = URL(URL(), resourceDirectoryURLString); > if (!resourceDirectoryURL.isLocalFile()) >@@ -1088,7 +1088,7 @@ RefPtr<API::Navigation> WebPageProxy::loadHTMLString(const String& htmlString, c > LoadParameters loadParameters; > loadParameters.navigationID = navigation->navigationID(); > loadParameters.string = htmlString; >- loadParameters.MIMEType = ASCIILiteral("text/html"); >+ loadParameters.MIMEType = "text/html"_s; > loadParameters.baseURLString = baseURL; > loadParameters.userData = UserData(process().transformObjectsToHandles(userData).get()); > addPlatformLoadParameters(loadParameters); >@@ -1151,7 +1151,7 @@ void WebPageProxy::loadPlainTextString(const String& string, API::Object* userDa > LoadParameters loadParameters; > loadParameters.navigationID = 0; > loadParameters.string = string; >- loadParameters.MIMEType = ASCIILiteral("text/plain"); >+ loadParameters.MIMEType = "text/plain"_s; > loadParameters.userData = UserData(process().transformObjectsToHandles(userData).get()); > addPlatformLoadParameters(loadParameters); > >@@ -1173,8 +1173,8 @@ void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* us > LoadParameters loadParameters; > loadParameters.navigationID = 0; > loadParameters.data = webArchiveData->dataReference(); >- loadParameters.MIMEType = ASCIILiteral("application/x-webarchive"); >- loadParameters.encodingName = ASCIILiteral("utf-16"); >+ loadParameters.MIMEType = "application/x-webarchive"_s; >+ loadParameters.encodingName = "utf-16"_s; > loadParameters.userData = UserData(process().transformObjectsToHandles(userData).get()); > addPlatformLoadParameters(loadParameters); > >@@ -6674,7 +6674,7 @@ void WebPageProxy::savePDFToFileInDownloadsFolder(String&& suggestedFilename, UR > if (!suggestedFilename.endsWithIgnoringASCIICase(".pdf")) > return; > >- saveDataToFileInDownloadsFolder(WTFMove(suggestedFilename), ASCIILiteral("application/pdf"), WTFMove(originatingURL), >+ saveDataToFileInDownloadsFolder(WTFMove(suggestedFilename), "application/pdf"_s, WTFMove(originatingURL), > API::Data::create(dataReference.data(), dataReference.size()).get()); > } > >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp >index 5457eb47f72efacf84205abcaaf3bdf2a8d3ef1b..2e9063dd3d2f60c5c5db1e8094eb0f51a16523e5 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp >@@ -160,7 +160,7 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt > ChildProcessProxy::getLaunchOptions(launchOptions); > > if (WebKit::isInspectorProcessPool(m_processPool)) >- launchOptions.extraInitializationData.add(ASCIILiteral("inspector-process"), ASCIILiteral("1")); >+ launchOptions.extraInitializationData.add("inspector-process"_s, "1"_s); > > auto overrideLanguages = m_processPool->configuration().overrideLanguages(); > if (overrideLanguages.size()) { >@@ -170,7 +170,7 @@ void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOpt > languageString.append(','); > languageString.append(overrideLanguages[i]); > } >- launchOptions.extraInitializationData.add(ASCIILiteral("OverrideLanguages"), languageString.toString()); >+ launchOptions.extraInitializationData.add("OverrideLanguages"_s, languageString.toString()); > } > > launchOptions.nonValidInjectedCodeAllowed = shouldAllowNonValidInjectedCode(); >diff --git a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >index 6dab2637b9a8857c8db23714453167d8ef6dbc09..34f240bef922b4f8bdff02a2400c8e4f8d52d35e 100644 >--- a/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp >@@ -536,7 +536,7 @@ void WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData(CompletionHa > m_endOfGrandfatheringTimestamp = WallTime::now() + m_parameters.grandfatheringTime; > m_persistentStorage.scheduleOrWriteMemoryStore(ResourceLoadStatisticsPersistentStorage::ForceImmediateWrite::Yes); > callback(); >- logTestingEvent(ASCIILiteral("Grandfathered")); >+ logTestingEvent("Grandfathered"_s); > }); > }); > }); >diff --git a/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp b/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp >index bb7440c01e6adce1dc088a7e788820dc297ceecd..0b9f7863bb601178c563ff9dc36c4871937e58e2 100644 >--- a/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp >+++ b/Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp >@@ -223,9 +223,9 @@ void static notifyPages(unsigned totalPrevalentResources, unsigned totalPrevalen > { > RunLoop::main().dispatch([totalPrevalentResources, totalPrevalentResourcesWithUserInteraction, top3SubframeUnderTopFrameOrigins] { > API::Dictionary::MapType messageBody; >- messageBody.set(ASCIILiteral("TotalPrevalentResources"), API::UInt64::create(totalPrevalentResources)); >- messageBody.set(ASCIILiteral("TotalPrevalentResourcesWithUserInteraction"), API::UInt64::create(totalPrevalentResourcesWithUserInteraction)); >- messageBody.set(ASCIILiteral("Top3SubframeUnderTopFrameOrigins"), API::UInt64::create(top3SubframeUnderTopFrameOrigins)); >+ messageBody.set("TotalPrevalentResources"_s, API::UInt64::create(totalPrevalentResources)); >+ messageBody.set("TotalPrevalentResourcesWithUserInteraction"_s, API::UInt64::create(totalPrevalentResourcesWithUserInteraction)); >+ messageBody.set("Top3SubframeUnderTopFrameOrigins"_s, API::UInt64::create(top3SubframeUnderTopFrameOrigins)); > WebProcessProxy::notifyPageStatisticsTelemetryFinished(API::Dictionary::create(messageBody).ptr()); > }); > } >@@ -276,13 +276,13 @@ void WebResourceLoadStatisticsTelemetry::calculateAndSubmit(const WebResourceLoa > return; > } > >- webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResources"), sortedPrevalentResources.size(), significantFiguresForLoggedValues, ShouldSample::No); >- webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("totalNumberOfPrevalentResourcesWithUserInteraction"), prevalentResourcesDaysSinceUserInteraction.size(), significantFiguresForLoggedValues, ShouldSample::No); >+ webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "totalNumberOfPrevalentResources"_s, sortedPrevalentResources.size(), significantFiguresForLoggedValues, ShouldSample::No); >+ webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "totalNumberOfPrevalentResourcesWithUserInteraction"_s, prevalentResourcesDaysSinceUserInteraction.size(), significantFiguresForLoggedValues, ShouldSample::No); > > if (prevalentResourcesDaysSinceUserInteraction.size() > 0) >- webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"), prevalentResourcesDaysSinceUserInteraction[0], significantFiguresForLoggedValues, ShouldSample::No); >+ webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "topPrevalentResourceWithUserInteractionDaysSinceUserInteraction"_s, prevalentResourcesDaysSinceUserInteraction[0], significantFiguresForLoggedValues, ShouldSample::No); > if (prevalentResourcesDaysSinceUserInteraction.size() > 1) >- webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), ASCIILiteral("medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"), median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No); >+ webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"_s, median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No); > > submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, *webPageProxy); > }); >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 266926d0b0009658f2c6c21a5739aef530dae6a8..2342fe1bc648a6948bbc7b4c602dd8e3551a4d88 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -2349,17 +2349,17 @@ - (void)_resetShowingTextStyle:(NSNotification *)notification > > - (void)copyForWebView:(id)sender > { >- _page->executeEditCommand(ASCIILiteral("copy")); >+ _page->executeEditCommand("copy"_s); > } > > - (void)cutForWebView:(id)sender > { >- _page->executeEditCommand(ASCIILiteral("cut")); >+ _page->executeEditCommand("cut"_s); > } > > - (void)pasteForWebView:(id)sender > { >- _page->executeEditCommand(ASCIILiteral("paste")); >+ _page->executeEditCommand("paste"_s); > } > > - (void)selectForWebView:(id)sender >@@ -2372,7 +2372,7 @@ - (void)selectForWebView:(id)sender > - (void)selectAllForWebView:(id)sender > { > [_textSelectionAssistant selectAll:sender]; >- _page->executeEditCommand(ASCIILiteral("selectAll")); >+ _page->executeEditCommand("selectAll"_s); > } > > - (void)toggleBoldfaceForWebView:(id)sender >@@ -3334,7 +3334,7 @@ - (UITextRange *)characterRangeAtPoint:(CGPoint)point > > - (void)deleteBackward > { >- _page->executeEditCommand(ASCIILiteral("deleteBackward")); >+ _page->executeEditCommand("deleteBackward"_s); > } > > // Inserts the given string, replacing any selected or marked text. >@@ -3749,7 +3749,7 @@ - (BOOL)_interpretKeyEvent:(::WebEvent *)event isCharEvent:(BOOL)isCharEvent > break; > > case kWebDeleteForwardKey: >- _page->executeEditCommand(ASCIILiteral("deleteForward")); >+ _page->executeEditCommand("deleteForward"_s); > return YES; > > default: >diff --git a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >index 30bf99d5d11731b9a05f9deeac4853ffd0f97226..8f7395669fe541a6e586e30f039329434f1216bb 100644 >--- a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >+++ b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >@@ -490,7 +490,7 @@ - (NSURL *)_URLForLinkAnnotation:(UIPDFLinkAnnotation *)linkAnnotation > return [NSURL URLWithString:url.relativeString relativeToURL:documentURL]; > > if (NSUInteger pageNumber = linkAnnotation.pageNumber) { >- String anchorString = ASCIILiteral("#page"); >+ String anchorString = "#page"_s; > anchorString.append(String::number(pageNumber)); > return [NSURL URLWithString:anchorString relativeToURL:documentURL]; > } >diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >index b316c3e642258fbe7c8827a6ce83467e1fce1781..418de23a37d7c519a5e9675d917ea4c7325ab4d8 100644 >--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >@@ -211,7 +211,7 @@ WebCore::Element* WebAutomationSessionProxy::elementForNodeHandle(WebFrame& fram > toJSValue(context, nodeHandle) > }; > >- JSValueRef result = callPropertyFunction(context, scriptObject, ASCIILiteral("nodeForIdentifier"), WTF_ARRAY_LENGTH(functionArguments), functionArguments, nullptr); >+ JSValueRef result = callPropertyFunction(context, scriptObject, "nodeForIdentifier"_s, WTF_ARRAY_LENGTH(functionArguments), functionArguments, nullptr); > JSObjectRef element = JSValueToObject(context, result, nullptr); > if (!element) > return nullptr; >@@ -229,7 +229,7 @@ void WebAutomationSessionProxy::didClearWindowObjectForFrame(WebFrame& frame) > if (JSObjectRef scriptObject = m_webFrameScriptObjectMap.take(frameID)) > JSValueUnprotect(frame.jsContext(), scriptObject); > >- String errorMessage = ASCIILiteral("Callback was not called before the unload event."); >+ String errorMessage = "Callback was not called before the unload event."_s; > String errorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::JavaScriptError); > > auto pendingFrameCallbacks = m_webFramePendingEvaluateJavaScriptCallbacksMap.take(frameID); >@@ -276,7 +276,7 @@ void WebAutomationSessionProxy::evaluateJavaScriptFunction(uint64_t pageID, uint > > { > WebCore::UserGestureIndicator gestureIndicator(WebCore::ProcessingUserGesture, frame->coreFrame()->document()); >- callPropertyFunction(context, scriptObject, ASCIILiteral("evaluateJavaScriptFunction"), WTF_ARRAY_LENGTH(functionArguments), functionArguments, &exception); >+ callPropertyFunction(context, scriptObject, "evaluateJavaScriptFunction"_s, WTF_ARRAY_LENGTH(functionArguments), functionArguments, &exception); > } > > if (!exception) >@@ -286,7 +286,7 @@ void WebAutomationSessionProxy::evaluateJavaScriptFunction(uint64_t pageID, uint > > JSRetainPtr<JSStringRef> exceptionMessage; > if (JSValueIsObject(context, exception)) { >- JSValueRef nameValue = JSObjectGetProperty(context, const_cast<JSObjectRef>(exception), toJSString(ASCIILiteral("name")).get(), nullptr); >+ JSValueRef nameValue = JSObjectGetProperty(context, const_cast<JSObjectRef>(exception), toJSString("name"_s).get(), nullptr); > JSRetainPtr<JSStringRef> exceptionName(Adopt, JSValueToStringCopy(context, nameValue, nullptr)); > if (exceptionName->string() == "NodeNotFound") > errorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::NodeNotFound); >@@ -297,7 +297,7 @@ void WebAutomationSessionProxy::evaluateJavaScriptFunction(uint64_t pageID, uint > else if (exceptionName->string() == "InvalidSelector") > errorType = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(Inspector::Protocol::Automation::ErrorMessage::InvalidSelector); > >- JSValueRef messageValue = JSObjectGetProperty(context, const_cast<JSObjectRef>(exception), toJSString(ASCIILiteral("message")).get(), nullptr); >+ JSValueRef messageValue = JSObjectGetProperty(context, const_cast<JSObjectRef>(exception), toJSString("message"_s).get(), nullptr); > exceptionMessage.adopt(JSValueToStringCopy(context, messageValue, nullptr)); > } else > exceptionMessage.adopt(JSValueToStringCopy(context, exception, nullptr)); >diff --git a/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp b/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp >index 9140bc8cdcdc92d3f038c8482465201e0a67eed8..6302ea46aceae9ebc6e9117272e4d4ac74b3a646 100644 >--- a/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp >+++ b/Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp >@@ -362,7 +362,7 @@ void WebIDBConnectionToServer::didGetAllDatabaseNames(uint64_t callbackID, const > > void WebIDBConnectionToServer::connectionToServerLost() > { >- m_connectionToServer->connectionToServerLost(IDBError { WebCore::UnknownError, ASCIILiteral("An internal error was encountered in the Indexed Database server") }); >+ m_connectionToServer->connectionToServerLost(IDBError { WebCore::UnknownError, "An internal error was encountered in the Indexed Database server"_s }); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >index 57e01988b2b54d0ca9a4c5f8905997a0045384ba..b68bc409f4bae998a6baa49a7ef478178d78ff69 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >@@ -1767,11 +1767,11 @@ gchar* webkit_dom_document_get_ready_state(WebKitDOMDocument* self) > auto readyState = WebKit::core(self)->readyState(); > switch (readyState) { > case WebCore::Document::Loading: >- return convertToUTF8String(ASCIILiteral("loading")); >+ return convertToUTF8String("loading"_s); > case WebCore::Document::Interactive: >- return convertToUTF8String(ASCIILiteral("interactive")); >+ return convertToUTF8String("interactive"_s); > case WebCore::Document::Complete: >- return convertToUTF8String(ASCIILiteral("complete")); >+ return convertToUTF8String("complete"_s); > } > return 0; > } >diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >index 323b6004d94f6bc02d25ad3076e2899802607fce..fcd3208b535cbc2c68b89ee0844fb8249712e4ae 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >@@ -48,7 +48,7 @@ static WorldMap& allWorlds() > static String uniqueWorldName() > { > static uint64_t uniqueWorldNameNumber = 0; >- return makeString(ASCIILiteral("UniqueWorld_"), String::number(uniqueWorldNameNumber++)); >+ return makeString("UniqueWorld_"_s, String::number(uniqueWorldNameNumber++)); > } > > Ref<InjectedBundleScriptWorld> InjectedBundleScriptWorld::create() >diff --git a/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp b/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp >index 3087ca6855549667b83a73a62e329f6e25f4fa3a..e2a6978fe283ad53c348bf0707ab68df7d962362 100644 >--- a/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp >+++ b/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp >@@ -64,7 +64,7 @@ Vector<SecurityOriginData> WebMediaKeyStorageManager::getMediaKeyOrigins() > Vector<String> originPaths = FileSystem::listDirectory(m_mediaKeyStorageDirectory, "*"); > for (const auto& originPath : originPaths) { > URL url; >- url.setProtocol(ASCIILiteral("file")); >+ url.setProtocol("file"_s); > url.setPath(originPath); > > String mediaKeyIdentifier = url.lastPathComponent(); >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index 203db1a4740f733cf518c7b69c1b57ac57f5732b..88340af24ab88881f59e953bfb9a85c966aafde5 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -651,7 +651,7 @@ PluginInfo PDFPlugin::pluginInfo() > info.name = builtInPDFPluginName(); > info.isApplicationPlugin = true; > info.clientLoadPolicy = PluginLoadClientPolicyUndefined; >- info.bundleIdentifier = ASCIILiteral("com.apple.webkit.builtinpdfplugin"); >+ info.bundleIdentifier = "com.apple.webkit.builtinpdfplugin"_s; > > MimeClassInfo pdfMimeClassInfo; > pdfMimeClassInfo.type = "application/pdf"; >diff --git a/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp b/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp >index 5518fa28312424353883add70bbd0f5549cf8adf..fffc5c23ae7dcc5940f823bb9ce629426002ab4e 100644 >--- a/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp >+++ b/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp >@@ -92,14 +92,14 @@ std::optional<ResourceError> ServiceWorkerClientFetch::validateResponse(const Re > > auto& options = m_loader->options(); > if (options.mode != FetchOptions::Mode::NoCors && response.tainting() == ResourceResponse::Tainting::Opaque) >- return ResourceError { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Response served by service worker is opaque"), ResourceError::Type::AccessControl }; >+ return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque"_s, ResourceError::Type::AccessControl }; > > // Navigate mode induces manual redirect. > if (options.redirect != FetchOptions::Redirect::Manual && options.mode != FetchOptions::Mode::Navigate && response.tainting() == ResourceResponse::Tainting::Opaqueredirect) >- return ResourceError { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Response served by service worker is opaque redirect"), ResourceError::Type::AccessControl }; >+ return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker is opaque redirect"_s, ResourceError::Type::AccessControl }; > > if ((options.redirect != FetchOptions::Redirect::Follow || options.mode == FetchOptions::Mode::Navigate) && response.isRedirected()) >- return ResourceError { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Response served by service worker has redirections"), ResourceError::Type::AccessControl }; >+ return ResourceError { errorDomainWebKitInternal, 0, response.url(), "Response served by service worker has redirections"_s, ResourceError::Type::AccessControl }; > > return std::nullopt; > } >@@ -145,8 +145,8 @@ void ServiceWorkerClientFetch::didReceiveResponse(ResourceResponse&& response) > // FIXME: We should refine our MIME type sniffing strategy for synthetic responses. > if (m_loader->originalRequest().requester() == ResourceRequest::Requester::Main) { > if (response.mimeType() == defaultMIMEType()) { >- response.setMimeType(ASCIILiteral("text/html")); >- response.setTextEncodingName(ASCIILiteral("UTF-8")); >+ response.setMimeType("text/html"_s); >+ response.setTextEncodingName("UTF-8"_s); > } > } > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp >index ce5ac2850a686e5bed5094109ac52fe2e6d33f66..49f3652b59568334df342818bccdfeec5620d238 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp >@@ -62,7 +62,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame) > String searchString = frame->editor().selectedText(); > searchString.stripWhiteSpace(); > String encoded = encodeWithURLEscapeSequences(searchString); >- encoded.replace(ASCIILiteral { "%20" }, ASCIILiteral { "+" }); >+ encoded.replace("%20"_s, "+"_s); > > String url = "https://www.google.com/search?q=" + encoded + "&ie=UTF-8&oe=UTF-8"; > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp >index 0f1d53c4412a931e895799e890b1c31a0861ca91..22c43526b22c6b90ce4341fbd8d60453cf2cb7de 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp >@@ -169,7 +169,7 @@ void WebInspectorClient::showPaintRect(const FloatRect& rect) > RefPtr<Animation> opacityAnimation = Animation::create(); > opacityAnimation->setDuration(0.25); > >- paintLayer->addAnimation(fadeKeyframes, FloatSize(), opacityAnimation.get(), ASCIILiteral("opacity"), 0); >+ paintLayer->addAnimation(fadeKeyframes, FloatSize(), opacityAnimation.get(), "opacity"_s, 0); > > m_paintRectLayers.add(paintLayer.get()); > >diff --git a/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp b/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >index da8e900c035dce10e9dd1adf6ab59c6cb65d89b4..cfec739697bddc74cd7fcae1e6199b582d40be04 100644 >--- a/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >+++ b/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >@@ -57,17 +57,17 @@ void RemoteWebInspectorUI::initialize(const String& debuggableType, const String > m_page.corePage()->inspectorController().setInspectorFrontendClient(this); > > m_frontendAPIDispatcher.reset(); >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setDockingUnavailable"), true); >+ m_frontendAPIDispatcher.dispatchCommand("setDockingUnavailable"_s, true); > } > > void RemoteWebInspectorUI::didSave(const String& url) > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("savedURL"), url); >+ m_frontendAPIDispatcher.dispatchCommand("savedURL"_s, url); > } > > void RemoteWebInspectorUI::didAppend(const String& url) > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("appendedToURL"), url); >+ m_frontendAPIDispatcher.dispatchCommand("appendedToURL"_s, url); > } > > void RemoteWebInspectorUI::sendMessageToFrontend(const String& message) >@@ -93,7 +93,7 @@ void RemoteWebInspectorUI::frontendLoaded() > { > m_frontendAPIDispatcher.frontendLoaded(); > >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setIsVisible"), true); >+ m_frontendAPIDispatcher.dispatchCommand("setIsVisible"_s, true); > > bringToFront(); > } >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspector.cpp b/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >index bbe5be561efca8976b7a8444b2c3976352995034..e67930afd59b83f4491251578938badfd0829c12 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >@@ -152,7 +152,7 @@ void WebInspector::openInNewTab(const String& urlString) > return; > > Frame& inspectedMainFrame = inspectedPage->mainFrame(); >- FrameLoadRequest frameLoadRequest { *inspectedMainFrame.document(), inspectedMainFrame.document()->securityOrigin(), { urlString }, ASCIILiteral("_blank"), LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; >+ FrameLoadRequest frameLoadRequest { *inspectedMainFrame.document(), inspectedMainFrame.document()->securityOrigin(), { urlString }, "_blank"_s, LockHistory::No, LockBackForwardList::No, MaybeSendReferrer, AllowNavigationToInvalidURL::Yes, NewFrameOpenerPolicy::Allow, ShouldOpenExternalURLsPolicy::ShouldNotAllow, InitiatedByMainFrame::Unknown }; > > NavigationAction action { *inspectedMainFrame.document(), frameLoadRequest.resourceRequest(), frameLoadRequest.initiatedByMainFrame(), NavigationType::LinkClicked }; > Page* newPage = inspectedPage->chrome().createWindow(inspectedMainFrame, frameLoadRequest, { }, action); >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >index 008041129302d9682d42cf2e75c3e32e6b872ef6..c2289eb7c7aad30476a2fcb10a8cae83d049951d 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >@@ -167,43 +167,43 @@ void WebInspectorUI::requestSetDockSide(DockSide side) > > void WebInspectorUI::setDockSide(DockSide side) > { >- const char* sideString; >+ ASCIILiteral sideString { ASCIILiteral::null() }; > > switch (side) { > case DockSide::Undocked: >- sideString = "undocked"; >+ sideString = "undocked"_s; > break; > > case DockSide::Right: >- sideString = "right"; >+ sideString = "right"_s; > break; > > case DockSide::Left: >- sideString = "left"; >+ sideString = "left"_s; > break; > > case DockSide::Bottom: >- sideString = "bottom"; >+ sideString = "bottom"_s; > break; > } > > m_dockSide = side; > >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setDockSide"), String(ASCIILiteral(sideString))); >+ m_frontendAPIDispatcher.dispatchCommand("setDockSide"_s, String(sideString)); > } > > void WebInspectorUI::setDockingUnavailable(bool unavailable) > { > m_dockingUnavailable = unavailable; > >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setDockingUnavailable"), unavailable); >+ m_frontendAPIDispatcher.dispatchCommand("setDockingUnavailable"_s, unavailable); > } > > void WebInspectorUI::setIsVisible(bool visible) > { > m_isVisible = visible; > >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setIsVisible"), visible); >+ m_frontendAPIDispatcher.dispatchCommand("setIsVisible"_s, visible); > } > > void WebInspectorUI::changeAttachedWindowHeight(unsigned height) >@@ -239,52 +239,52 @@ void WebInspectorUI::inspectedURLChanged(const String& urlString) > > void WebInspectorUI::showConsole() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showConsole")); >+ m_frontendAPIDispatcher.dispatchCommand("showConsole"_s); > } > > void WebInspectorUI::showResources() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showResources")); >+ m_frontendAPIDispatcher.dispatchCommand("showResources"_s); > } > > void WebInspectorUI::showTimelines() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showTimelines")); >+ m_frontendAPIDispatcher.dispatchCommand("showTimelines"_s); > } > > void WebInspectorUI::showMainResourceForFrame(const String& frameIdentifier) > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showMainResourceForFrame"), frameIdentifier); >+ m_frontendAPIDispatcher.dispatchCommand("showMainResourceForFrame"_s, frameIdentifier); > } > > void WebInspectorUI::startPageProfiling() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setTimelineProfilingEnabled"), true); >+ m_frontendAPIDispatcher.dispatchCommand("setTimelineProfilingEnabled"_s, true); > } > > void WebInspectorUI::stopPageProfiling() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setTimelineProfilingEnabled"), false); >+ m_frontendAPIDispatcher.dispatchCommand("setTimelineProfilingEnabled"_s, false); > } > > void WebInspectorUI::startElementSelection() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setElementSelectionEnabled"), true); >+ m_frontendAPIDispatcher.dispatchCommand("setElementSelectionEnabled"_s, true); > } > > void WebInspectorUI::stopElementSelection() > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setElementSelectionEnabled"), false); >+ m_frontendAPIDispatcher.dispatchCommand("setElementSelectionEnabled"_s, false); > } > > void WebInspectorUI::didSave(const String& url) > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("savedURL"), url); >+ m_frontendAPIDispatcher.dispatchCommand("savedURL"_s, url); > } > > void WebInspectorUI::didAppend(const String& url) > { >- m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("appendedToURL"), url); >+ m_frontendAPIDispatcher.dispatchCommand("appendedToURL"_s, url); > } > > void WebInspectorUI::sendMessageToFrontend(const String& message) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 43bd0c08708042f4505165744b85446d886e6ee7..d9e0912e5007d5bfeacaf9962a7a60f683c81292 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -1297,10 +1297,10 @@ void WebPage::loadStringImpl(uint64_t navigationID, const String& htmlString, co > { > if (!htmlString.isNull() && htmlString.is8Bit()) { > auto sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters8()), htmlString.length() * sizeof(LChar)); >- loadDataImpl(navigationID, WTFMove(sharedBuffer), MIMEType, ASCIILiteral("latin1"), baseURL, unreachableURL, userData); >+ loadDataImpl(navigationID, WTFMove(sharedBuffer), MIMEType, "latin1"_s, baseURL, unreachableURL, userData); > } else { > auto sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters16()), htmlString.length() * sizeof(UChar)); >- loadDataImpl(navigationID, WTFMove(sharedBuffer), MIMEType, ASCIILiteral("utf-16"), baseURL, unreachableURL, userData); >+ loadDataImpl(navigationID, WTFMove(sharedBuffer), MIMEType, "utf-16"_s, baseURL, unreachableURL, userData); > } > } > >@@ -1329,7 +1329,7 @@ void WebPage::loadAlternateHTMLString(const LoadParameters& loadParameters) > URL unreachableURL = loadParameters.unreachableURLString.isEmpty() ? URL() : URL(URL(), loadParameters.unreachableURLString); > URL provisionalLoadErrorURL = loadParameters.provisionalLoadErrorURLString.isEmpty() ? URL() : URL(URL(), loadParameters.provisionalLoadErrorURLString); > m_mainFrame->coreFrame()->loader().setProvisionalLoadErrorBeingHandledURL(provisionalLoadErrorURL); >- loadStringImpl(0, loadParameters.string, ASCIILiteral("text/html"), baseURL, unreachableURL, loadParameters.userData); >+ loadStringImpl(0, loadParameters.string, "text/html"_s, baseURL, unreachableURL, loadParameters.userData); > m_mainFrame->coreFrame()->loader().setProvisionalLoadErrorBeingHandledURL({ }); > } > >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 69d80aa852f59398d7c4c87fbe552aa4fe896a68..1ffaee0e2671de5e6b5dc5a4cb0808067fd63f3a 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -1964,7 +1964,7 @@ static void computeAutocorrectionContext(Frame& frame, String& contextBefore, St > if (currentPosition.isNotNull() && currentPosition != startPosition) { > contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), currentPosition, startPosition).ptr()); > if (atBoundaryOfGranularity(currentPosition, ParagraphGranularity, DirectionBackward)) >- contextBefore = ASCIILiteral("\n ") + contextBefore; >+ contextBefore = "\n "_s + contextBefore; > } > } > >diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp >index 6492bebbfe86f5e42e1e53f4b1ab6b35887d1630..8fa86ad2634216833021558f476f7e00bea04612 100644 >--- a/Source/WebKit/WebProcess/WebProcess.cpp >+++ b/Source/WebKit/WebProcess/WebProcess.cpp >@@ -928,10 +928,10 @@ static void fromCountedSetToHashMap(TypeCountSet* countedSet, HashMap<String, ui > > static void getWebCoreMemoryCacheStatistics(Vector<HashMap<String, uint64_t>>& result) > { >- String imagesString(ASCIILiteral("Images")); >- String cssString(ASCIILiteral("CSS")); >- String xslString(ASCIILiteral("XSL")); >- String javaScriptString(ASCIILiteral("JavaScript")); >+ String imagesString("Images"_s); >+ String cssString("CSS"_s); >+ String xslString("XSL"_s); >+ String javaScriptString("JavaScript"_s); > > MemoryCache::Statistics memoryCacheStatistics = MemoryCache::singleton().getStatistics(); > >@@ -971,10 +971,10 @@ void WebProcess::getWebCoreStatistics(uint64_t callbackID) > // Gather JavaScript statistics. > { > JSLockHolder lock(commonVM()); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptObjectsCount"), commonVM().heap.objectCount()); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptGlobalObjectsCount"), commonVM().heap.globalObjectCount()); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptProtectedObjectsCount"), commonVM().heap.protectedObjectCount()); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptProtectedGlobalObjectsCount"), commonVM().heap.protectedGlobalObjectCount()); >+ data.statisticsNumbers.set("JavaScriptObjectsCount"_s, commonVM().heap.objectCount()); >+ data.statisticsNumbers.set("JavaScriptGlobalObjectsCount"_s, commonVM().heap.globalObjectCount()); >+ data.statisticsNumbers.set("JavaScriptProtectedObjectsCount"_s, commonVM().heap.protectedObjectCount()); >+ data.statisticsNumbers.set("JavaScriptProtectedGlobalObjectsCount"_s, commonVM().heap.protectedGlobalObjectCount()); > > std::unique_ptr<TypeCountSet> protectedObjectTypeCounts(commonVM().heap.protectedObjectTypeCounts()); > fromCountedSetToHashMap(protectedObjectTypeCounts.get(), data.javaScriptProtectedObjectTypeCounts); >@@ -983,22 +983,22 @@ void WebProcess::getWebCoreStatistics(uint64_t callbackID) > fromCountedSetToHashMap(objectTypeCounts.get(), data.javaScriptObjectTypeCounts); > > uint64_t javaScriptHeapSize = commonVM().heap.size(); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptHeapSize"), javaScriptHeapSize); >- data.statisticsNumbers.set(ASCIILiteral("JavaScriptFreeSize"), commonVM().heap.capacity() - javaScriptHeapSize); >+ data.statisticsNumbers.set("JavaScriptHeapSize"_s, javaScriptHeapSize); >+ data.statisticsNumbers.set("JavaScriptFreeSize"_s, commonVM().heap.capacity() - javaScriptHeapSize); > } > > WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics(); >- data.statisticsNumbers.set(ASCIILiteral("FastMallocReservedVMBytes"), fastMallocStatistics.reservedVMBytes); >- data.statisticsNumbers.set(ASCIILiteral("FastMallocCommittedVMBytes"), fastMallocStatistics.committedVMBytes); >- data.statisticsNumbers.set(ASCIILiteral("FastMallocFreeListBytes"), fastMallocStatistics.freeListBytes); >+ data.statisticsNumbers.set("FastMallocReservedVMBytes"_s, fastMallocStatistics.reservedVMBytes); >+ data.statisticsNumbers.set("FastMallocCommittedVMBytes"_s, fastMallocStatistics.committedVMBytes); >+ data.statisticsNumbers.set("FastMallocFreeListBytes"_s, fastMallocStatistics.freeListBytes); > > // Gather font statistics. > auto& fontCache = FontCache::singleton(); >- data.statisticsNumbers.set(ASCIILiteral("CachedFontDataCount"), fontCache.fontCount()); >- data.statisticsNumbers.set(ASCIILiteral("CachedFontDataInactiveCount"), fontCache.inactiveFontCount()); >+ data.statisticsNumbers.set("CachedFontDataCount"_s, fontCache.fontCount()); >+ data.statisticsNumbers.set("CachedFontDataInactiveCount"_s, fontCache.inactiveFontCount()); > > // Gather glyph page statistics. >- data.statisticsNumbers.set(ASCIILiteral("GlyphPageCount"), GlyphPage::count()); >+ data.statisticsNumbers.set("GlyphPageCount"_s, GlyphPage::count()); > > // Get WebCore memory cache statistics > getWebCoreMemoryCacheStatistics(data.webCoreCacheStatistics); >diff --git a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >index 7ec3c74bc6bcfc3833b3013fb825983433943860..6935e806a7905cabdfbebc5ce8a4eaa8c547be7e 100644 >--- a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >+++ b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >@@ -201,11 +201,11 @@ void WebProcess::initializeProcessName(const ChildProcessInitializationParameter > { > #if !PLATFORM(IOS) > NSString *applicationName; >- if (parameters.extraInitializationData.get(ASCIILiteral("inspector-process")) == "1") >+ if (parameters.extraInitializationData.get("inspector-process"_s) == "1") > applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Web Inspector", "Visible name of Web Inspector's web process. The argument is the application name."), (NSString *)parameters.uiProcessName]; > #if ENABLE(SERVICE_WORKER) >- else if (parameters.extraInitializationData.get(ASCIILiteral("service-worker-process")) == "1") >- applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Service Worker (%@)", "Visible name of Service Worker process. The argument is the application name."), (NSString *)parameters.uiProcessName, (NSString *)parameters.extraInitializationData.get(ASCIILiteral("security-origin"))]; >+ else if (parameters.extraInitializationData.get("service-worker-process"_s) == "1") >+ applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Service Worker (%@)", "Visible name of Service Worker process. The argument is the application name."), (NSString *)parameters.uiProcessName, (NSString *)parameters.extraInitializationData.get("security-origin"_s)]; > #endif > else > applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Web Content", "Visible name of the web process. The argument is the application name."), (NSString *)parameters.uiProcessName]; >diff --git a/Source/WebKitLegacy/Storage/StorageTracker.cpp b/Source/WebKitLegacy/Storage/StorageTracker.cpp >index ddbdb22ea0fa0dc4b1cbd5a6fc6f8865b8aea107..6dec5303e1757c9a3e8d6b3515abb95abc5dcf50 100644 >--- a/Source/WebKitLegacy/Storage/StorageTracker.cpp >+++ b/Source/WebKitLegacy/Storage/StorageTracker.cpp >@@ -250,7 +250,7 @@ void StorageTracker::syncFileSystemAndTrackerDatabase() > > // Add missing StorageTracker records. > OriginSet foundOrigins; >- String fileExtension = ASCIILiteral(".localstorage"); >+ String fileExtension = ".localstorage"_s; > > for (Vector<String>::const_iterator it = paths.begin(), end = paths.end(); it != end; ++it) { > const String& path = *it; >diff --git a/Source/WebKitLegacy/WebCoreSupport/PingHandle.h b/Source/WebKitLegacy/WebCoreSupport/PingHandle.h >index 8cc3a5967eefb280b148335a0657280b2b8678cb..175954c98f4662cb3dafe00cfac4ff8c95ab4e75 100644 >--- a/Source/WebKitLegacy/WebCoreSupport/PingHandle.h >+++ b/Source/WebKitLegacy/WebCoreSupport/PingHandle.h >@@ -66,7 +66,7 @@ class PingHandle final : private WebCore::ResourceHandleClient { > return; > } > completionHandler({ }); >- pingLoadComplete(WebCore::ResourceError { String(), 0, m_currentRequest.url(), ASCIILiteral("Not allowed to follow redirects"), WebCore::ResourceError::Type::AccessControl }); >+ pingLoadComplete(WebCore::ResourceError { String(), 0, m_currentRequest.url(), "Not allowed to follow redirects"_s, WebCore::ResourceError::Type::AccessControl }); > } > void didReceiveResponseAsync(WebCore::ResourceHandle*, WebCore::ResourceResponse&& response, CompletionHandler<void()>&& completionHandler) final > { >@@ -77,12 +77,12 @@ class PingHandle final : private WebCore::ResourceHandleClient { > void didFinishLoading(WebCore::ResourceHandle*) final { pingLoadComplete(); } > void didFail(WebCore::ResourceHandle*, const WebCore::ResourceError& error) final { pingLoadComplete(error); } > bool shouldUseCredentialStorage(WebCore::ResourceHandle*) final { return m_shouldUseCredentialStorage; } >- void timeoutTimerFired() { pingLoadComplete(WebCore::ResourceError { String(), 0, m_currentRequest.url(), ASCIILiteral("Load timed out"), WebCore::ResourceError::Type::Timeout }); } >+ void timeoutTimerFired() { pingLoadComplete(WebCore::ResourceError { String(), 0, m_currentRequest.url(), "Load timed out"_s, WebCore::ResourceError::Type::Timeout }); } > #if USE(PROTECTION_SPACE_AUTH_CALLBACK) > void canAuthenticateAgainstProtectionSpaceAsync(WebCore::ResourceHandle*, const WebCore::ProtectionSpace&, CompletionHandler<void(bool)>&& completionHandler) > { > completionHandler(false); >- pingLoadComplete(WebCore::ResourceError { String { }, 0, m_currentRequest.url(), ASCIILiteral("Not allowed to authenticate"), WebCore::ResourceError::Type::AccessControl }); >+ pingLoadComplete(WebCore::ResourceError { String { }, 0, m_currentRequest.url(), "Not allowed to authenticate"_s, WebCore::ResourceError::Type::AccessControl }); > } > #endif > >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >index 3687bc1bc2fc54bf9855f352bbccdf1f91160338..0d326c256676739ba7f12273c7b7b0ddbd4ac42c 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >@@ -224,7 +224,7 @@ JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtime > auto scope = DECLARE_THROW_SCOPE(vm); > > if (!asObject(runtimeMethod)->inherits<ProxyRuntimeMethod>(vm)) >- return throwTypeError(exec, scope, ASCIILiteral("Attempt to invoke non-plug-in method on plug-in object.")); >+ return throwTypeError(exec, scope, "Attempt to invoke non-plug-in method on plug-in object."_s); > > ProxyMethod* method = static_cast<ProxyMethod*>(runtimeMethod->method()); > ASSERT(method); >diff --git a/Source/WebKitLegacy/mac/Storage/WebDatabaseProvider.mm b/Source/WebKitLegacy/mac/Storage/WebDatabaseProvider.mm >index 099298be29fe8a8424edb4c97eb7bd51f128d5ce..7495b175fff45dc5a54b014f8d5bf03e543943cc 100644 >--- a/Source/WebKitLegacy/mac/Storage/WebDatabaseProvider.mm >+++ b/Source/WebKitLegacy/mac/Storage/WebDatabaseProvider.mm >@@ -33,9 +33,9 @@ String WebDatabaseProvider::indexedDatabaseDirectoryPath() > NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; > NSString *databasesDirectory = [defaults objectForKey:WebDatabaseDirectoryDefaultsKey]; > if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]]) >- databasesDirectory = WebCore::FileSystem::pathByAppendingComponent(ASCIILiteral("~/Library/WebKit/Databases/___IndexedDB"), [[NSBundle mainBundle] bundleIdentifier]); >+ databasesDirectory = WebCore::FileSystem::pathByAppendingComponent("~/Library/WebKit/Databases/___IndexedDB"_s, [[NSBundle mainBundle] bundleIdentifier]); > else >- databasesDirectory = WebCore::FileSystem::pathByAppendingComponent(databasesDirectory, ASCIILiteral("___IndexedDB")); >+ databasesDirectory = WebCore::FileSystem::pathByAppendingComponent(databasesDirectory, "___IndexedDB"_s); > > return [databasesDirectory stringByStandardizingPath]; > } >diff --git a/Source/WebKitLegacy/win/Plugins/PluginStream.cpp b/Source/WebKitLegacy/win/Plugins/PluginStream.cpp >index f25664dc11e8624ebcda0f7e2cc04d4042b51f80..aba63dab8b31e47abd8088b3783a80ec54c10218 100644 >--- a/Source/WebKitLegacy/win/Plugins/PluginStream.cpp >+++ b/Source/WebKitLegacy/win/Plugins/PluginStream.cpp >@@ -154,7 +154,7 @@ void PluginStream::startStream() > > if (m_resourceResponse.isHTTP()) { > StringBuilder stringBuilder; >- String separator = ASCIILiteral(": "); >+ String separator = ": "_s; > > String statusLine = "HTTP " + String::number(m_resourceResponse.httpStatusCode()) + " OK\n"; > stringBuilder.append(statusLine); >diff --git a/Source/WebKitLegacy/win/WebCoreSupport/WebContextMenuClient.cpp b/Source/WebKitLegacy/win/WebCoreSupport/WebContextMenuClient.cpp >index 498d036f13e2dc6bb4e19efc50ab8c18299b3e7f..0689c3955f1b4989b48db285504c9c0e9ab16d9d 100644 >--- a/Source/WebKitLegacy/win/WebCoreSupport/WebContextMenuClient.cpp >+++ b/Source/WebKitLegacy/win/WebCoreSupport/WebContextMenuClient.cpp >@@ -60,7 +60,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame) > String searchString = frame->editor().selectedText(); > searchString.stripWhiteSpace(); > String encoded = encodeWithURLEscapeSequences(searchString); >- encoded.replace(ASCIILiteral { "%20" }, ASCIILiteral { "+" }); >+ encoded.replace("%20"_s, "+"_s); > > String url = "https://www.google.com/search?q=" + encoded + "&ie=UTF-8&oe=UTF-8"; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 3c87fc1987ca23bb953bac04bc0a5fabf1301562..4dd0180adad06c575eb73d694272d6730c75b3dc 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,32 @@ >+2018-06-22 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [WTF] Add user-defined literal for ASCIILiteral >+ https://bugs.webkit.org/show_bug.cgi?id=186839 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/StringOperators.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WTF/WTFString.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WTF/WorkerPool.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp: >+ (TEST_F): >+ * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: >+ (TestWebKitAPI::TEST_F): >+ * TestWebKitAPI/Tests/WebCore/URL.cpp: >+ (TestWebKitAPI::TEST_F): >+ * TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: >+ (TestWebKitAPI::TEST_F): >+ * TestWebKitAPI/Tests/WebCore/mac/GPUTest.h: >+ * TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm: >+ (-[MockContentFilterEnabler initWithCoder:]): >+ * TestWebKitAPI/Tests/mac/ContentFiltering.mm: >+ (TestWebKitAPI::loadAlternateTest): >+ > 2018-06-22 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix GLib test /webkit/WebKitSecurityManager/file-xhr after r231000 >diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp >index 7a1d9297f6cd9885abea7c2e2f0551f3c5154bad..595afb054a4561ee605289b89ead4ebd977c7f26 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp >@@ -45,7 +45,7 @@ TEST(WTF, StringOperators) > { > String string("String"); > AtomicString atomicString("AtomicString"); >- ASCIILiteral literal("ASCIILiteral"); >+ ASCIILiteral literal { "ASCIILiteral"_s }; > > EXPECT_EQ(0, wtfStringCopyCount); > >diff --git a/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp b/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp >index 7f66c181b9dbfea144a09be134d74486b421fd60..5cb6c76e6c3bd4f29708679e775a718351944792 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp >@@ -35,7 +35,7 @@ namespace TestWebKitAPI { > > TEST(WTF, StringCreationFromLiteral) > { >- String stringFromLiteral(ASCIILiteral("Explicit construction syntax")); >+ String stringFromLiteral("Explicit construction syntax"_s); > EXPECT_EQ(strlen("Explicit construction syntax"), stringFromLiteral.length()); > EXPECT_EQ("Explicit construction syntax", stringFromLiteral); > EXPECT_TRUE(stringFromLiteral.is8Bit()); >@@ -61,7 +61,7 @@ TEST(WTF, StringASCII) > EXPECT_STREQ("", output.data()); > > // Regular String. >- output = String(ASCIILiteral("foobar")).ascii(); >+ output = String("foobar"_s).ascii(); > EXPECT_STREQ("foobar", output.data()); > } > >diff --git a/Tools/TestWebKitAPI/Tests/WTF/WorkerPool.cpp b/Tools/TestWebKitAPI/Tests/WTF/WorkerPool.cpp >index 3f9b74e6bfc2952d4622cd24cf4b186e9d2c8e2b..5641c108fa163c481afeba4418850fddf77fe193 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/WorkerPool.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/WorkerPool.cpp >@@ -36,7 +36,7 @@ TEST(WTF, WorkerPoolDecrease) > { > std::atomic<unsigned> counter { 0 }; > { >- Ref<WorkerPool> pool = WorkerPool::create(ASCIILiteral("Worker Pool")); >+ Ref<WorkerPool> pool = WorkerPool::create("Worker Pool"_s); > for (int i = 0; i < 10000; ++i) { > pool->postTask([&] { > ++counter; >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp b/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp >index 261433d5849cc628cd4e5a705c852140ce82f947..e993ffbaae35eff9e94b87aeeaa33094a56de7b4 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp >@@ -292,7 +292,7 @@ TEST_F(ApplicationManifestParserTest, Scope) > > TEST_F(ApplicationManifestParserTest, Whitespace) > { >- auto manifest = parseString(ASCIILiteral(" { \"name\": \"PASS\" }\n")); >+ auto manifest = parseString(" { \"name\": \"PASS\" }\n"_s); > > EXPECT_STREQ("PASS", manifest.name.utf8().data()); > } >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp b/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp >index dcce4688c52266f6549c6aa1b21963ec805e7f33..6021e525d3087b5711d4ea88ffb8480477d09694 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp >@@ -1383,34 +1383,34 @@ TEST_F(ContentExtensionTest, MatchesEverything) > // should go in the global display:none stylesheet. css-display-none rules with domain rules or flags > // are applied separately on pages where they apply. > auto backend1 = makeBackend("[{\"action\":{\"type\":\"css-display-none\",\"selector\":\".hidden\"},\"trigger\":{\"url-filter\":\".*\"}}]"); >- EXPECT_TRUE(nullptr != backend1.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_TRUE(nullptr != backend1.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend1, mainDocumentRequest("http://webkit.org"), { }); // Selector is in global stylesheet. > > auto backend2 = makeBackend("[{\"action\":{\"type\":\"css-display-none\",\"selector\":\".hidden\"},\"trigger\":{\"url-filter\":\".*\",\"if-domain\":[\"webkit.org\"]}}]"); >- EXPECT_EQ(nullptr, backend2.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_EQ(nullptr, backend2.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend2, mainDocumentRequest("http://webkit.org"), { ContentExtensions::ActionType::CSSDisplayNoneSelector }); > testRequest(backend2, mainDocumentRequest("http://w3c.org"), { }); > > auto backend3 = makeBackend("[{\"action\":{\"type\":\"css-display-none\",\"selector\":\".hidden\"},\"trigger\":{\"url-filter\":\".*\",\"unless-domain\":[\"webkit.org\"]}}]"); >- EXPECT_EQ(nullptr, backend3.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_EQ(nullptr, backend3.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend3, mainDocumentRequest("http://webkit.org"), { }); > testRequest(backend3, mainDocumentRequest("http://w3c.org"), { ContentExtensions::ActionType::CSSDisplayNoneSelector }); > > auto backend4 = makeBackend("[{\"action\":{\"type\":\"css-display-none\",\"selector\":\".hidden\"},\"trigger\":{\"url-filter\":\".*\",\"load-type\":[\"third-party\"]}}]"); >- EXPECT_EQ(nullptr, backend4.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_EQ(nullptr, backend4.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend4, mainDocumentRequest("http://webkit.org"), { }); > testRequest(backend4, subResourceRequest("http://not_webkit.org", "http://webkit.org"), { ContentExtensions::ActionType::CSSDisplayNoneSelector }); > > // css-display-none rules after ignore-previous-rules should not be put in the default stylesheet. > auto backend5 = makeBackend("[{\"action\":{\"type\":\"ignore-previous-rules\"},\"trigger\":{\"url-filter\":\".*\"}}," > "{\"action\":{\"type\":\"css-display-none\",\"selector\":\".hidden\"},\"trigger\":{\"url-filter\":\".*\"}}]"); >- EXPECT_EQ(nullptr, backend5.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_EQ(nullptr, backend5.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend5, mainDocumentRequest("http://webkit.org"), { ContentExtensions::ActionType::CSSDisplayNoneSelector }, 0); > > auto backend6 = makeBackend("[{\"action\":{\"type\":\"block\"},\"trigger\":{\"url-filter\":\".*\",\"if-domain\":[\"webkit.org\",\"*w3c.org\"],\"resource-type\":[\"document\",\"script\"]}}," > "{\"action\":{\"type\":\"ignore-previous-rules\"},\"trigger\":{\"url-filter\":\"ignore\",\"if-domain\":[\"*webkit.org\",\"w3c.org\"]}}," > "{\"action\":{\"type\":\"block-cookies\"},\"trigger\":{\"url-filter\":\".*\",\"unless-domain\":[\"webkit.org\",\"whatwg.org\"],\"resource-type\":[\"script\",\"image\"],\"load-type\":[\"third-party\"]}}]"); >- EXPECT_EQ(nullptr, backend6.globalDisplayNoneStyleSheet(ASCIILiteral("testFilter"))); >+ EXPECT_EQ(nullptr, backend6.globalDisplayNoneStyleSheet("testFilter"_s)); > testRequest(backend6, mainDocumentRequest("http://webkit.org"), { ContentExtensions::ActionType::BlockLoad }); > testRequest(backend6, mainDocumentRequest("http://w3c.org"), { ContentExtensions::ActionType::BlockLoad }); > testRequest(backend6, mainDocumentRequest("http://whatwg.org"), { }); >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp b/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp >index 9688cdbc0612b19f43b4ffe2daa56e8e606ff463..98353e6bd5ad8029774b82b697bc57be5f688ca0 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebCore/URL.cpp >@@ -372,22 +372,22 @@ TEST_F(URLTest, HostIsMatchingDomain) > > EXPECT_TRUE(url.isMatchingDomain(String { })); > EXPECT_TRUE(url.isMatchingDomain(emptyString())); >- EXPECT_TRUE(url.isMatchingDomain(ASCIILiteral("org"))); >- EXPECT_TRUE(url.isMatchingDomain(ASCIILiteral("webkit.org"))); >- EXPECT_TRUE(url.isMatchingDomain(ASCIILiteral("www.webkit.org"))); >+ EXPECT_TRUE(url.isMatchingDomain("org"_s)); >+ EXPECT_TRUE(url.isMatchingDomain("webkit.org"_s)); >+ EXPECT_TRUE(url.isMatchingDomain("www.webkit.org"_s)); > >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("rg"))); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral(".org"))); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("ww.webkit.org"))); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("http://www.webkit.org"))); >+ EXPECT_FALSE(url.isMatchingDomain("rg"_s)); >+ EXPECT_FALSE(url.isMatchingDomain(".org"_s)); >+ EXPECT_FALSE(url.isMatchingDomain("ww.webkit.org"_s)); >+ EXPECT_FALSE(url.isMatchingDomain("http://www.webkit.org"_s)); > > url = createURL("file:///www.webkit.org"); > > EXPECT_TRUE(url.isMatchingDomain(String { })); > EXPECT_TRUE(url.isMatchingDomain(emptyString())); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("org"))); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("webkit.org"))); >- EXPECT_FALSE(url.isMatchingDomain(ASCIILiteral("www.webkit.org"))); >+ EXPECT_FALSE(url.isMatchingDomain("org"_s)); >+ EXPECT_FALSE(url.isMatchingDomain("webkit.org"_s)); >+ EXPECT_FALSE(url.isMatchingDomain("www.webkit.org"_s)); > > URL emptyURL; > EXPECT_FALSE(emptyURL.isMatchingDomain(String { })); >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp b/Tools/TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp >index 7949ecaa6309a4165f7446f749a30e8f53858e76..1bef56e627d2c6447ee95a8b6f3f77885857008a 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp >@@ -39,7 +39,7 @@ TEST(QuickLook, ShouldCreateForMIMEType) > // FIXME: Expand this to cover all the MIME types we expect to support. > EXPECT_FALSE(PreviewLoader::shouldCreateForMIMEType(String())); > EXPECT_FALSE(PreviewLoader::shouldCreateForMIMEType(emptyString())); >- EXPECT_TRUE(PreviewLoader::shouldCreateForMIMEType(ASCIILiteral("application/vnd.ms-excel.sheet.macroEnabled.12"))); >+ EXPECT_TRUE(PreviewLoader::shouldCreateForMIMEType("application/vnd.ms-excel.sheet.macroEnabled.12"_s)); > } > > } // namespace TestWebKitAPI >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm b/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm >index a13db34805bc71f37ae51f2df49526a54947deb2..156d8fb7ed3db037d5c4ff06cb34daa40c5d58b8 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm >+++ b/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm >@@ -56,7 +56,7 @@ TEST_F(GPU, CommandQueueCreate) > // If you haven't set a label, we just use the prefix. > EXPECT_STREQ("com.apple.WebKit", [mtlCommandQueue.label UTF8String]); > >- String testLabel(ASCIILiteral("this.is.a.test")); >+ String testLabel("this.is.a.test"_s); > commandQueue->setLabel(testLabel); > > // The WebKit API doesn't prefix. >diff --git a/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUTest.h b/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUTest.h >index fcd0386f095878242571dfa223341bc01fb18d2d..841714541207820a51a47c9bd21a38b654bccb09 100644 >--- a/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUTest.h >+++ b/Tools/TestWebKitAPI/Tests/WebCore/mac/GPUTest.h >@@ -37,7 +37,7 @@ class GPU : public testing::Test { > { > WTF::initializeMainThread(); > >- m_librarySourceCode = ASCIILiteral("using namespace metal;\n\ >+ m_librarySourceCode = "using namespace metal;\n\ > struct Vertex\n\ > {\n\ > float4 position [[position]];\n\ >@@ -51,7 +51,7 @@ class GPU : public testing::Test { > fragment float4 fragment_main(Vertex inVertex [[stage_in]])\n\ > {\n\ > return inVertex.color;\n\ >- }"); >+ }"_s; > } > > const String& librarySourceCode() { return m_librarySourceCode; } >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm >index 5ae004853aadd317907cb3b6a347c0feae004446..1e1c061e2b1438616bfcfff1bf24ead04a59e196 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm >@@ -63,7 +63,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder > settings.setEnabled(true); > settings.setDecision(static_cast<Decision>([decoder decodeIntForKey:@"Decision"])); > settings.setDecisionPoint(static_cast<DecisionPoint>([decoder decodeIntForKey:@"DecisionPoint"])); >- settings.setBlockedString(ASCIILiteral("blocked")); >+ settings.setBlockedString("blocked"_s); > return self; > } > >diff --git a/Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm b/Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm >index 4957c7f010bff9732b240a10741d82006581312c..504bbe1a057ad1bea8a41d57b24a3bd3c7fa6826 100644 >--- a/Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm >+++ b/Tools/TestWebKitAPI/Tests/mac/ContentFiltering.mm >@@ -65,7 +65,7 @@ static void loadAlternateTest(Decision decision, DecisionPoint decisionPoint) > settings.setEnabled(true); > settings.setDecision(decision); > settings.setDecisionPoint(decisionPoint); >- settings.setBlockedString(ASCIILiteral("blocked")); >+ settings.setBlockedString("blocked"_s); > [TestProtocol registerWithScheme:@"http"]; > > auto webView = adoptNS([[WebView alloc] initWithFrame:NSZeroRect]);
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 186839
:
343151
|
343224
|
343319
|
343321
|
343426