haikuwebkit/Source/WTF/wtf/Logger.h

387 lines
15 KiB
C
Raw Permalink Normal View History

/*
Use constexpr instead of const in symbol definitions that are obviously constexpr. https://bugs.webkit.org/show_bug.cgi?id=201879 Rubber-stamped by Joseph Pecoraro. Source/bmalloc: * bmalloc/AvailableMemory.cpp: * bmalloc/IsoTLS.h: * bmalloc/Map.h: * bmalloc/Mutex.cpp: (bmalloc::Mutex::lockSlowCase): * bmalloc/PerThread.h: * bmalloc/Vector.h: * bmalloc/Zone.h: Source/JavaScriptCore: const may require external storage (at the compiler's whim) though these currently do not. constexpr makes it clear that the value is a literal constant that can be inlined. In most cases in the code, when we say static const, we actually mean static constexpr. I'm changing the code to reflect this. * API/JSAPIValueWrapper.h: * API/JSCallbackConstructor.h: * API/JSCallbackObject.h: * API/JSContextRef.cpp: * API/JSWrapperMap.mm: * API/tests/CompareAndSwapTest.cpp: * API/tests/TypedArrayCTest.cpp: * API/tests/testapi.mm: (testObjectiveCAPIMain): * KeywordLookupGenerator.py: (Trie.printAsC): * assembler/ARMv7Assembler.h: * assembler/AssemblerBuffer.h: * assembler/AssemblerCommon.h: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: * assembler/MacroAssemblerARM64E.h: * assembler/MacroAssemblerARMv7.h: * assembler/MacroAssemblerCodeRef.h: * assembler/MacroAssemblerMIPS.h: * assembler/MacroAssemblerX86.h: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::absDouble): (JSC::MacroAssemblerX86Common::negateDouble): * assembler/MacroAssemblerX86_64.h: * assembler/X86Assembler.h: * b3/B3Bank.h: * b3/B3CheckSpecial.h: * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3Kind.h: * b3/B3LowerToAir.cpp: * b3/B3NativeTraits.h: * b3/B3ReduceDoubleToFloat.cpp: * b3/B3ReduceLoopStrength.cpp: * b3/B3ReduceStrength.cpp: * b3/B3ValueKey.h: * b3/air/AirAllocateRegistersByGraphColoring.cpp: * b3/air/AirAllocateStackByGraphColoring.cpp: * b3/air/AirArg.h: * b3/air/AirCCallSpecial.h: * b3/air/AirEmitShuffle.cpp: * b3/air/AirFixObviousSpills.cpp: * b3/air/AirFormTable.h: * b3/air/AirLowerAfterRegAlloc.cpp: * b3/air/AirPrintSpecial.h: * b3/air/AirStackAllocation.cpp: * b3/air/AirTmp.h: * b3/testb3_6.cpp: (testInterpreter): * bytecode/AccessCase.cpp: * bytecode/CallLinkStatus.cpp: * bytecode/CallVariant.h: * bytecode/CodeBlock.h: * bytecode/CodeOrigin.h: * bytecode/DFGExitProfile.h: * bytecode/DirectEvalCodeCache.h: * bytecode/ExecutableToCodeBlockEdge.h: * bytecode/GetterSetterAccessCase.cpp: * bytecode/LazyOperandValueProfile.h: * bytecode/ObjectPropertyCondition.h: * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: * bytecode/PropertyCondition.h: * bytecode/SpeculatedType.h: * bytecode/StructureStubInfo.cpp: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedEvalCodeBlock.h: * bytecode/UnlinkedFunctionCodeBlock.h: * bytecode/UnlinkedFunctionExecutable.h: * bytecode/UnlinkedModuleProgramCodeBlock.h: * bytecode/UnlinkedProgramCodeBlock.h: * bytecode/ValueProfile.h: * bytecode/VirtualRegister.h: * bytecode/Watchpoint.h: * bytecompiler/BytecodeGenerator.h: * bytecompiler/Label.h: * bytecompiler/NodesCodegen.cpp: (JSC::ThisNode::emitBytecode): * bytecompiler/RegisterID.h: * debugger/Breakpoint.h: * debugger/DebuggerParseData.cpp: * debugger/DebuggerPrimitives.h: * debugger/DebuggerScope.h: * dfg/DFGAbstractHeap.h: * dfg/DFGAbstractValue.h: * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: * dfg/DFGCSEPhase.cpp: * dfg/DFGCommon.h: * dfg/DFGCompilationKey.h: * dfg/DFGDesiredGlobalProperty.h: * dfg/DFGEdgeDominates.h: * dfg/DFGEpoch.h: * dfg/DFGForAllKills.h: (JSC::DFG::forAllKilledNodesAtNodeIndex): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::isLiveInBytecode): * dfg/DFGHeapLocation.h: * dfg/DFGInPlaceAbstractState.cpp: * dfg/DFGIntegerCheckCombiningPhase.cpp: * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGInvalidationPointInjectionPhase.cpp: * dfg/DFGLICMPhase.cpp: * dfg/DFGLazyNode.h: * dfg/DFGMinifiedID.h: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGNodeFlowProjection.h: * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPromotedHeapLocation.h: * dfg/DFGPropertyTypeKey.h: * dfg/DFGPureValue.h: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGRegisterBank.h: * dfg/DFGSSAConversionPhase.cpp: * dfg/DFGSSALoweringPhase.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileDoubleRep): (JSC::DFG::compileClampDoubleToByte): (JSC::DFG::SpeculativeJIT::compileArithRounding): (JSC::DFG::compileArithPowIntegerFastPath): (JSC::DFG::SpeculativeJIT::compileArithPow): (JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse): * dfg/DFGStackLayoutPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: * dfg/DFGStructureAbstractValue.h: * dfg/DFGVarargsForwardingPhase.cpp: * dfg/DFGVariableEventStream.cpp: (JSC::DFG::VariableEventStream::reconstruct const): * dfg/DFGWatchpointCollectionPhase.cpp: * disassembler/ARM64/A64DOpcode.h: * ftl/FTLLocation.h: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileArithRandom): * ftl/FTLSlowPathCall.cpp: * ftl/FTLSlowPathCallKey.h: * heap/CellContainer.h: * heap/CellState.h: * heap/ConservativeRoots.h: * heap/GCSegmentedArray.h: * heap/HandleBlock.h: * heap/Heap.cpp: (JSC::Heap::updateAllocationLimits): * heap/Heap.h: * heap/HeapSnapshot.h: * heap/HeapUtil.h: (JSC::HeapUtil::findGCObjectPointersForMarking): * heap/IncrementalSweeper.cpp: * heap/LargeAllocation.h: * heap/MarkedBlock.cpp: * heap/Strong.h: * heap/VisitRaceKey.h: * heap/Weak.h: * heap/WeakBlock.h: * inspector/JSInjectedScriptHost.h: * inspector/JSInjectedScriptHostPrototype.h: * inspector/JSJavaScriptCallFrame.h: * inspector/JSJavaScriptCallFramePrototype.h: * inspector/agents/InspectorConsoleAgent.cpp: * inspector/agents/InspectorRuntimeAgent.cpp: (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: (CppProtocolTypesHeaderGenerator._generate_versions): * inspector/scripts/tests/generic/expected/version.json-result: * interpreter/Interpreter.h: * interpreter/ShadowChicken.cpp: * jit/BinarySwitch.cpp: * jit/CallFrameShuffler.h: * jit/ExecutableAllocator.h: * jit/FPRInfo.h: * jit/GPRInfo.h: * jit/ICStats.h: * jit/JITThunks.h: * jit/Reg.h: * jit/RegisterSet.h: * jit/TempRegisterSet.h: * jsc.cpp: * parser/ASTBuilder.h: * parser/Nodes.h: * parser/SourceCodeKey.h: * parser/SyntaxChecker.h: * parser/VariableEnvironment.h: * profiler/ProfilerOrigin.h: * profiler/ProfilerOriginStack.h: * profiler/ProfilerUID.h: * runtime/AbstractModuleRecord.cpp: * runtime/ArrayBufferNeuteringWatchpointSet.h: * runtime/ArrayConstructor.h: * runtime/ArrayConventions.h: * runtime/ArrayIteratorPrototype.h: * runtime/ArrayPrototype.cpp: (JSC::setLength): * runtime/AsyncFromSyncIteratorPrototype.h: * runtime/AsyncGeneratorFunctionPrototype.h: * runtime/AsyncGeneratorPrototype.h: * runtime/AsyncIteratorPrototype.h: * runtime/AtomicsObject.cpp: * runtime/BigIntConstructor.h: * runtime/BigIntPrototype.h: * runtime/BooleanPrototype.h: * runtime/ClonedArguments.h: * runtime/CodeCache.h: * runtime/ControlFlowProfiler.h: * runtime/CustomGetterSetter.h: * runtime/DateConstructor.h: * runtime/DatePrototype.h: * runtime/DefinePropertyAttributes.h: * runtime/ErrorPrototype.h: * runtime/EvalExecutable.h: * runtime/Exception.h: * runtime/ExceptionHelpers.cpp: (JSC::invalidParameterInSourceAppender): (JSC::invalidParameterInstanceofSourceAppender): * runtime/ExceptionHelpers.h: * runtime/ExecutableBase.h: * runtime/FunctionExecutable.h: * runtime/FunctionRareData.h: * runtime/GeneratorPrototype.h: * runtime/GenericArguments.h: * runtime/GenericOffset.h: * runtime/GetPutInfo.h: * runtime/GetterSetter.h: * runtime/GlobalExecutable.h: * runtime/Identifier.h: * runtime/InspectorInstrumentationObject.h: * runtime/InternalFunction.h: * runtime/IntlCollatorConstructor.h: * runtime/IntlCollatorPrototype.h: * runtime/IntlDateTimeFormatConstructor.h: * runtime/IntlDateTimeFormatPrototype.h: * runtime/IntlNumberFormatConstructor.h: * runtime/IntlNumberFormatPrototype.h: * runtime/IntlObject.h: * runtime/IntlPluralRulesConstructor.h: * runtime/IntlPluralRulesPrototype.h: * runtime/IteratorPrototype.h: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitializedRestricted): * runtime/JSArray.h: * runtime/JSArrayBuffer.h: * runtime/JSArrayBufferView.h: * runtime/JSBigInt.h: * runtime/JSCJSValue.h: * runtime/JSCell.h: * runtime/JSCustomGetterSetterFunction.h: * runtime/JSDataView.h: * runtime/JSDataViewPrototype.h: * runtime/JSDestructibleObject.h: * runtime/JSFixedArray.h: * runtime/JSGenericTypedArrayView.h: * runtime/JSGlobalLexicalEnvironment.h: * runtime/JSGlobalObject.h: * runtime/JSImmutableButterfly.h: * runtime/JSInternalPromiseConstructor.h: * runtime/JSInternalPromiseDeferred.h: * runtime/JSInternalPromisePrototype.h: * runtime/JSLexicalEnvironment.h: * runtime/JSModuleEnvironment.h: * runtime/JSModuleLoader.h: * runtime/JSModuleNamespaceObject.h: * runtime/JSNonDestructibleProxy.h: * runtime/JSONObject.cpp: * runtime/JSONObject.h: * runtime/JSObject.h: * runtime/JSPromiseConstructor.h: * runtime/JSPromiseDeferred.h: * runtime/JSPromisePrototype.h: * runtime/JSPropertyNameEnumerator.h: * runtime/JSProxy.h: * runtime/JSScope.h: * runtime/JSScriptFetchParameters.h: * runtime/JSScriptFetcher.h: * runtime/JSSegmentedVariableObject.h: * runtime/JSSourceCode.h: * runtime/JSString.cpp: * runtime/JSString.h: * runtime/JSSymbolTableObject.h: * runtime/JSTemplateObjectDescriptor.h: * runtime/JSTypeInfo.h: * runtime/MapPrototype.h: * runtime/MinimumReservedZoneSize.h: * runtime/ModuleProgramExecutable.h: * runtime/NativeExecutable.h: * runtime/NativeFunction.h: * runtime/NativeStdFunctionCell.h: * runtime/NumberConstructor.h: * runtime/NumberPrototype.h: * runtime/ObjectConstructor.h: * runtime/ObjectPrototype.h: * runtime/ProgramExecutable.h: * runtime/PromiseDeferredTimer.cpp: * runtime/PropertyMapHashTable.h: * runtime/PropertyNameArray.h: (JSC::PropertyNameArray::add): * runtime/PrototypeKey.h: * runtime/ProxyConstructor.h: * runtime/ProxyObject.cpp: (JSC::ProxyObject::performGetOwnPropertyNames): * runtime/ProxyRevoke.h: * runtime/ReflectObject.h: * runtime/RegExp.h: * runtime/RegExpCache.h: * runtime/RegExpConstructor.h: * runtime/RegExpKey.h: * runtime/RegExpObject.h: * runtime/RegExpPrototype.h: * runtime/RegExpStringIteratorPrototype.h: * runtime/SamplingProfiler.cpp: * runtime/ScopedArgumentsTable.h: * runtime/ScriptExecutable.h: * runtime/SetPrototype.h: * runtime/SmallStrings.h: * runtime/SparseArrayValueMap.h: * runtime/StringConstructor.h: * runtime/StringIteratorPrototype.h: * runtime/StringObject.h: * runtime/StringPrototype.h: * runtime/Structure.h: * runtime/StructureChain.h: * runtime/StructureRareData.h: * runtime/StructureTransitionTable.h: * runtime/Symbol.h: * runtime/SymbolConstructor.h: * runtime/SymbolPrototype.h: * runtime/SymbolTable.h: * runtime/TemplateObjectDescriptor.h: * runtime/TypeProfiler.cpp: * runtime/TypeProfiler.h: * runtime/TypeProfilerLog.cpp: * runtime/VarOffset.h: * testRegExp.cpp: * tools/HeapVerifier.cpp: (JSC::HeapVerifier::checkIfRecorded): * tools/JSDollarVM.cpp: * wasm/WasmB3IRGenerator.cpp: * wasm/WasmBBQPlan.cpp: * wasm/WasmFaultSignalHandler.cpp: * wasm/WasmFunctionParser.h: * wasm/WasmOMGForOSREntryPlan.cpp: * wasm/WasmOMGPlan.cpp: * wasm/WasmPlan.cpp: * wasm/WasmSignature.cpp: * wasm/WasmSignature.h: * wasm/WasmWorklist.cpp: * wasm/js/JSWebAssembly.h: * wasm/js/JSWebAssemblyCodeBlock.h: * wasm/js/WebAssemblyCompileErrorConstructor.h: * wasm/js/WebAssemblyCompileErrorPrototype.h: * wasm/js/WebAssemblyFunction.h: * wasm/js/WebAssemblyInstanceConstructor.h: * wasm/js/WebAssemblyInstancePrototype.h: * wasm/js/WebAssemblyLinkErrorConstructor.h: * wasm/js/WebAssemblyLinkErrorPrototype.h: * wasm/js/WebAssemblyMemoryConstructor.h: * wasm/js/WebAssemblyMemoryPrototype.h: * wasm/js/WebAssemblyModuleConstructor.h: * wasm/js/WebAssemblyModulePrototype.h: * wasm/js/WebAssemblyRuntimeErrorConstructor.h: * wasm/js/WebAssemblyRuntimeErrorPrototype.h: * wasm/js/WebAssemblyTableConstructor.h: * wasm/js/WebAssemblyTablePrototype.h: * wasm/js/WebAssemblyToJSCallee.h: * yarr/Yarr.h: * yarr/YarrParser.h: * yarr/generateYarrCanonicalizeUnicode: Source/WebCore: No new tests. Covered by existing tests. * bindings/js/JSDOMConstructorBase.h: * bindings/js/JSDOMWindowProperties.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GeneratePrototypeDeclaration): * bindings/scripts/test/JS/JSTestActiveDOMObject.h: * bindings/scripts/test/JS/JSTestEnabledBySetting.h: * bindings/scripts/test/JS/JSTestEnabledForContext.h: * bindings/scripts/test/JS/JSTestEventTarget.h: * bindings/scripts/test/JS/JSTestGlobalObject.h: * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestPluginInterface.h: * bindings/scripts/test/JS/JSTestTypedefs.h: * bridge/objc/objc_runtime.h: * bridge/runtime_array.h: * bridge/runtime_method.h: * bridge/runtime_object.h: Source/WebKit: * WebProcess/Plugins/Netscape/JSNPObject.h: Source/WTF: * wtf/Assertions.cpp: * wtf/AutomaticThread.cpp: * wtf/BitVector.h: * wtf/Bitmap.h: * wtf/BloomFilter.h: * wtf/Brigand.h: * wtf/CheckedArithmetic.h: * wtf/CrossThreadCopier.h: * wtf/CurrentTime.cpp: * wtf/DataLog.cpp: * wtf/DateMath.cpp: (WTF::daysFrom1970ToYear): * wtf/DeferrableRefCounted.h: * wtf/GetPtr.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashTable.h: * wtf/HashTraits.h: * wtf/JSONValues.cpp: * wtf/JSONValues.h: * wtf/ListHashSet.h: * wtf/Lock.h: * wtf/LockAlgorithm.h: * wtf/LockAlgorithmInlines.h: (WTF::Hooks>::lockSlow): * wtf/Logger.h: * wtf/LoggerHelper.h: (WTF::LoggerHelper::childLogIdentifier const): * wtf/MainThread.cpp: * wtf/MetaAllocatorPtr.h: * wtf/MonotonicTime.h: * wtf/NaturalLoops.h: (WTF::NaturalLoops::NaturalLoops): * wtf/ObjectIdentifier.h: * wtf/RAMSize.cpp: * wtf/Ref.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/SchedulePair.h: * wtf/StackShot.h: * wtf/StdLibExtras.h: * wtf/TinyPtrSet.h: * wtf/URL.cpp: * wtf/URLHash.h: * wtf/URLParser.cpp: (WTF::URLParser::defaultPortForProtocol): * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/WallTime.h: * wtf/WeakHashSet.h: * wtf/WordLock.h: * wtf/cocoa/CPUTimeCocoa.cpp: * wtf/cocoa/MemoryPressureHandlerCocoa.mm: * wtf/persistence/PersistentDecoder.h: * wtf/persistence/PersistentEncoder.h: * wtf/text/AtomStringHash.h: * wtf/text/CString.h: * wtf/text/StringBuilder.cpp: (WTF::expandedCapacity): * wtf/text/StringHash.h: * wtf/text/StringImpl.h: * wtf/text/StringToIntegerConversion.h: (WTF::toIntegralType): * wtf/text/SymbolRegistry.h: * wtf/text/TextStream.cpp: (WTF::hasFractions): * wtf/text/WTFString.h: * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: Canonical link: https://commits.webkit.org/215538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-18 00:36:19 +00:00
* Copyright (C) 2017-2019 Apple Inc. All rights reserved.
*
* 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
Drop CheckedLock / CheckedCondition aliases https://bugs.webkit.org/show_bug.cgi?id=226176 Reviewed by Kate Cheney. Drop CheckedLock / CheckedCondition aliases now that they are the default. Source/JavaScriptCore: * API/JSVirtualMachine.mm: * API/glib/JSCVirtualMachine.cpp: * assembler/PerfLog.h: * assembler/testmasm.cpp: * bytecode/StructureStubInfo.h: * bytecode/SuperSampler.cpp: * dfg/DFGCommon.cpp: * dfg/DFGCommonData.cpp: * dfg/DFGPlan.h: * dfg/DFGThreadData.h: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::Worklist): * dfg/DFGWorklist.h: * disassembler/Disassembler.cpp: * dynbench.cpp: * heap/BlockDirectory.cpp: (JSC::BlockDirectory::parallelNotEmptyBlockSource): * heap/BlockDirectory.h: (JSC::BlockDirectory::bitvectorLock): * heap/CodeBlockSet.h: (JSC::CodeBlockSet::getLock): * heap/Heap.cpp: (JSC::Heap::Heap): * heap/Heap.h: * heap/IsoSubspacePerVM.h: * heap/MarkedSpace.h: (JSC::MarkedSpace::directoryLock): * heap/MarkingConstraintSolver.h: * heap/SlotVisitor.cpp: (JSC::SlotVisitor::donateKnownParallel): * heap/SlotVisitor.h: * inspector/remote/socket/RemoteInspectorConnectionClient.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::getLock const): (JSC::dumpJITMemory): * jit/ExecutableAllocator.h: (JSC::ExecutableAllocatorBase::getLock const): * jit/JITWorklist.cpp: (JSC::JITWorklist::JITWorklist): * jit/JITWorklist.h: * jsc.cpp: * profiler/ProfilerDatabase.h: * runtime/ConcurrentJSLock.h: * runtime/DeferredWorkTimer.h: * runtime/JSLock.h: * runtime/SamplingProfiler.cpp: (JSC::FrameWalker::FrameWalker): (JSC::CFrameWalker::CFrameWalker): (JSC::SamplingProfiler::takeSample): * runtime/SamplingProfiler.h: (JSC::SamplingProfiler::getLock): * runtime/VM.h: * runtime/VMTraps.cpp: (JSC::VMTraps::invalidateCodeBlocksOnStack): (JSC::VMTraps::VMTraps): * runtime/VMTraps.h: * tools/FunctionOverrides.h: * tools/VMInspector.cpp: (JSC::ensureIsSafeToLock): * tools/VMInspector.h: (JSC::VMInspector::getLock): * wasm/WasmCalleeRegistry.h: (JSC::Wasm::CalleeRegistry::getLock): * wasm/WasmPlan.h: * wasm/WasmStreamingCompiler.h: * wasm/WasmThunks.h: * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/WasmWorklist.h: Source/WebCore: * Modules/indexeddb/IDBObjectStore.h: * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/client/IDBConnectionProxy.h: * Modules/indexeddb/server/IDBSerializationContext.cpp: * Modules/indexeddb/server/IDBServer.cpp: * Modules/mediastream/RTCDataChannel.cpp: * Modules/mediastream/RTCRtpSFrameTransformer.h: * Modules/mediastream/RTCRtpScriptTransform.h: * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h: * Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.h: * Modules/speech/SpeechRecognitionCaptureSourceImpl.h: * Modules/webaudio/AudioParamTimeline.h: * Modules/webaudio/MediaElementAudioSourceNode.h: * Modules/webdatabase/Database.cpp: * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseTask.h: * Modules/webdatabase/DatabaseThread.h: * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::openDatabaseMutex): * Modules/webdatabase/DatabaseTracker.h: * Modules/webdatabase/OriginLock.cpp: * Modules/webdatabase/SQLCallbackWrapper.h: * Modules/webdatabase/SQLTransaction.h: * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::instancesLock): * Modules/webgpu/WebGPUDevice.h: * Modules/webgpu/WebGPUPipeline.cpp: (WebCore::WebGPUPipeline::instancesLock): * Modules/webgpu/WebGPUPipeline.h: * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::allActiveWebSocketsLock): * Modules/websockets/WebSocket.h: * accessibility/isolatedtree/AXIsolatedTree.cpp: * accessibility/isolatedtree/AXIsolatedTree.h: * bindings/js/JSDOMGlobalObject.h: * bridge/objc/WebScriptObject.mm: * crypto/CryptoAlgorithmRegistry.h: * dom/MessagePort.cpp: * dom/Node.cpp: * dom/ScriptExecutionContext.cpp: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaPlayer): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::instancesLock): * html/canvas/CanvasRenderingContext.h: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::objectGraphLockForAContext): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::objectGraphLockForContext): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::instancesLock): * html/canvas/WebGLProgram.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::objectGraphLock): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::objectGraphLockForContext): * html/canvas/WebGLSharedObject.h: * inspector/agents/WebHeapAgent.cpp: * page/ResourceUsageThread.h: * page/SecurityPolicy.cpp: * page/WheelEventTestMonitor.h: * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/ScrollingTreeLatchingController.h: * page/scrolling/ThreadedScrollingTree.h: (WebCore::ThreadedScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/mac/ScrollingTreeMac.h: * platform/AbortableTaskQueue.h: * platform/GenericTaskQueue.cpp: * platform/GenericTaskQueue.h: * platform/LegacySchemeRegistry.cpp: * platform/audio/AudioDestination.h: * platform/audio/HRTFDatabaseLoader.h: * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::backgroundThreadEntry): * platform/audio/cocoa/AudioDestinationCocoa.h: * platform/audio/gstreamer/AudioSourceProviderGStreamer.h: * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: * platform/audio/mac/FFTFrameMac.cpp: * platform/encryptedmedia/CDMProxy.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::lock): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/SubimageCacheWithTimer.h: * platform/graphics/cocoa/FontCacheCoreText.cpp: * platform/graphics/gstreamer/ImageDecoderGStreamer.h: * platform/graphics/gstreamer/MainThreadNotifier.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: (WebCore::TextureMapperPlatformLayerProxy::WTF_RETURNS_LOCK): * platform/image-decoders/ScalableImageDecoder.h: * platform/ios/QuickLook.mm: * platform/ios/WebSQLiteDatabaseTrackerClient.mm: * platform/ios/wak/WebCoreThreadRun.cpp: * platform/mediarecorder/MediaRecorderPrivateMock.h: * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: * platform/mediastream/RealtimeMediaSource.h: * platform/mediastream/RealtimeOutgoingAudioSource.h: * platform/mediastream/RealtimeOutgoingVideoSource.h: * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h: * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::loaderRunLoop): * platform/network/cocoa/WebCoreNSURLSession.mm: * platform/network/mac/UTIUtilities.mm: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteDatabaseTracker.cpp: * platform/text/TextEncodingRegistry.cpp: * storage/StorageQuotaManager.h: * workers/WorkerGlobalScope.cpp: * workers/WorkerOrWorkletScriptController.h: * workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::workerOrWorkletThreadsLock): * workers/WorkerOrWorkletThread.h: * worklets/PaintWorkletGlobalScope.h: Source/WebKit: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: (WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer): * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: * NetworkProcess/NetworkProcess.h: * NetworkProcess/WebStorage/StorageManagerSet.h: * NetworkProcess/cache/NetworkCacheStorage.cpp: * NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h: * NetworkProcess/glib/DNSCache.h: * Platform/IPC/Connection.cpp: * Platform/IPC/Connection.h: * Platform/IPC/StreamConnectionWorkQueue.h: * Platform/IPC/StreamServerConnection.h: * Shared/BlockingResponseMap.h: * Shared/Cocoa/XPCEndpointClient.h: * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: * Shared/mac/MediaFormatReader/MediaFormatReader.h: * Shared/mac/MediaFormatReader/MediaSampleCursor.h: * Shared/mac/MediaFormatReader/MediaTrackReader.h: * UIProcess/API/glib/IconDatabase.h: * UIProcess/WebURLSchemeTask.h: * UIProcess/mac/DisplayLink.h: * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView knowsPageRange:]): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Plugins/PluginProcessConnectionManager.h: * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/ViewUpdateDispatcher.h: Source/WebKitLegacy: * Storage/StorageAreaSync.h: Source/WebKitLegacy/mac: * DOM/DOMInternal.mm: Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Assertions.cpp: * wtf/AutomaticThread.cpp: (WTF::AutomaticThreadCondition::wait): (WTF::AutomaticThreadCondition::waitFor): (WTF::AutomaticThread::AutomaticThread): * wtf/AutomaticThread.h: * wtf/CMakeLists.txt: * wtf/CheckedCondition.h: Removed. * wtf/CheckedLock.h: Removed. * wtf/Condition.h: * wtf/CrossThreadQueue.h: * wtf/CrossThreadTaskHandler.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/FastMalloc.cpp: * wtf/Forward.h: * wtf/Language.cpp: * wtf/Lock.cpp: (WTF::UncheckedLock::lockSlow): (WTF::UncheckedLock::unlockSlow): (WTF::UncheckedLock::unlockFairlySlow): (WTF::UncheckedLock::safepointSlow): * wtf/Lock.h: (WTF::WTF_ASSERTS_ACQUIRED_LOCK): * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::WTF_RETURNS_LOCK): * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: (WTF::MetaAllocator::release): (WTF::MetaAllocator::MetaAllocator): (WTF::MetaAllocator::allocate): (WTF::MetaAllocator::currentStatistics): * wtf/MetaAllocator.h: * wtf/OSLogPrintStream.h: * wtf/ParallelHelperPool.cpp: (WTF::ParallelHelperPool::ParallelHelperPool): * wtf/ParallelHelperPool.h: * wtf/ParallelJobsGeneric.h: * wtf/ParallelVectorIterator.h: * wtf/ReadWriteLock.h: * wtf/RecursiveLockAdapter.h: * wtf/RunLoop.h: * wtf/SynchronizedFixedQueue.h: * wtf/Threading.cpp: (WTF::Thread::allThreadsLock): * wtf/Threading.h: * wtf/TimingScope.cpp: * wtf/URL.cpp: * wtf/WTFSemaphore.h: * wtf/WorkQueue.cpp: (WTF::WorkQueue::concurrentApply): * wtf/WorkerPool.cpp: (WTF::WorkerPool::WorkerPool): * wtf/WorkerPool.h: * wtf/cf/LanguageCF.cpp: * wtf/text/AtomStringImpl.cpp: (WTF::AtomStringTableLocker::AtomStringTableLocker): * wtf/text/StringView.cpp: * wtf/threads/BinarySemaphore.h: * wtf/unicode/icu/CollatorICU.cpp: Tools: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/Condition.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::createThreadIfNeeded): Canonical link: https://commits.webkit.org/238085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-24 18:29:01 +00:00
#include <wtf/Lock.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/text/StringBuilder.h>
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
#if USE(JOURNALD)
#define SD_JOURNAL_SUPPRESS_LOCATION
#include <systemd/sd-journal.h>
#endif
Move Logger from PAL to WTF so it can be used outside of WebCore https://bugs.webkit.org/show_bug.cgi?id=180561 Reviewed by Alex Christensen. Source/WebCore: No new tests, existing API test updated. * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: (PAL::LogArgument<webrtc::RTCStats>::toString): Deleted. * dom/Document.cpp: * dom/Document.h: * html/HTMLMediaElement.cpp: (PAL::LogArgument<WebCore::URL>::toString): Deleted. * html/HTMLMediaElement.h: * html/HTMLMediaElementEnums.h: (PAL::LogArgument<WebCore::HTMLMediaElementEnums::ReadyState>::toString): Deleted. (PAL::LogArgument<WebCore::HTMLMediaElementEnums::NetworkState>::toString): Deleted. * html/MediaElementSession.cpp: (WebCore::MediaElementSession::logger const): * html/MediaElementSession.h: * html/track/DataCue.h: (PAL::LogArgument<WebCore::DataCue>::toString): Deleted. * html/track/TextTrackCue.h: (PAL::LogArgument<WebCore::TextTrackCue>::toString): Deleted. * html/track/TextTrackCueGeneric.h: (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): Deleted. * html/track/TrackBase.cpp: (WebCore::nullLogger): (WebCore::TrackBase::TrackBase): * html/track/TrackBase.h: * html/track/VTTCue.h: (PAL::LogArgument<WebCore::VTTCue>::toString): Deleted. * platform/graphics/InbandTextTrackPrivate.h: * platform/graphics/InbandTextTrackPrivateClient.h: (PAL::LogArgument<WebCore::GenericCueData>::toString): Deleted. * platform/graphics/MediaPlayer.cpp: (WebCore::nullLogger): (WebCore::MediaPlayer::mediaPlayerLogger): * platform/graphics/MediaPlayer.h: (WTF::LogArgument<MediaTime>::toString): (PAL::LogArgument<WTF::MediaTime>::toString): Deleted. * platform/graphics/MediaPlayerEnums.h: (PAL::LogArgument<WebCore::MediaPlayerEnums::ReadyState>::toString): Deleted. (PAL::LogArgument<WebCore::MediaPlayerEnums::NetworkState>::toString): Deleted. * platform/graphics/TrackPrivateBase.cpp: (WebCore::TrackPrivateBase::setLogger): * platform/graphics/TrackPrivateBase.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/mediastream/RTCIceConnectionState.h: (PAL::LogArgument<WebCore::RTCIceConnectionState>::toString): Deleted. * platform/mediastream/RTCIceGatheringState.h: (PAL::LogArgument<WebCore::RTCIceGatheringState>::toString): Deleted. * platform/mediastream/RTCPeerConnectionState.h: (PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString): Deleted. * platform/mediastream/RTCSignalingState.h: (PAL::LogArgument<WebCore::RTCSignalingState>::toString): Deleted. * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: Source/WebCore/PAL: * PAL.xcodeproj/project.pbxproj: * pal/Logger.h: Removed. * pal/LoggerHelper.h: Removed. Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Logger.h: Copied from Source/WebCore/PAL/pal/Logger.h. (PAL::LogArgument::toString): Deleted. (PAL::Logger::create): Deleted. (PAL::Logger::logAlways const): Deleted. (PAL::Logger::error const): Deleted. (PAL::Logger::warning const): Deleted. (PAL::Logger::info const): Deleted. (PAL::Logger::debug const): Deleted. (PAL::Logger::willLog const): Deleted. (PAL::Logger::enabled const): Deleted. (PAL::Logger::setEnabled): Deleted. (PAL::Logger::LogSiteIdentifier::LogSiteIdentifier): Deleted. (PAL::Logger::addObserver): Deleted. (PAL::Logger::removeObserver): Deleted. (PAL::Logger::Logger): Deleted. (PAL::Logger::log): Deleted. (PAL::Logger::observers): Deleted. (PAL::LogArgument<Logger::LogSiteIdentifier>::toString): Deleted. * wtf/LoggerHelper.h: Copied from Source/WebCore/PAL/pal/LoggerHelper.h. Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/196512@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 20:33:53 +00:00
namespace WTF {
template<typename T>
struct LogArgument {
[WTF] Add user-defined literal for ASCIILiteral https://bugs.webkit.org/show_bug.cgi?id=186839 Reviewed by Darin Adler. Source/JavaScriptCore: * 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): Source/WebCore: No behavior change. * Modules/applicationmanifest/ApplicationManifestParser.cpp: (WebCore::ApplicationManifestParser::parseManifest): (WebCore::ApplicationManifestParser::logManifestPropertyNotAString): (WebCore::ApplicationManifestParser::logManifestPropertyInvalidURL): (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): Source/WebCore/PAL: * pal/unix/LoggingUnix.cpp: (PAL::logLevelString): Source/WebDriver: * 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): Source/WebKit: * 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): Source/WebKitLegacy: * Storage/StorageTracker.cpp: (WebKit::StorageTracker::syncFileSystemAndTrackerDatabase): * WebCoreSupport/PingHandle.h: Source/WebKitLegacy/mac: * DOM/ExceptionHandlers.mm: (raiseDOMErrorException): * Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyInstance::invokeMethod): * Storage/WebDatabaseProvider.mm: (WebDatabaseProvider::indexedDatabaseDirectoryPath): Source/WebKitLegacy/win: * Plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): * WebCoreSupport/WebContextMenuClient.cpp: (WebContextMenuClient::searchWithGoogle): Source/WTF: 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::StringLiterals::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): Tools: * 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): Canonical link: https://commits.webkit.org/202214@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-06-23 08:39:34 +00:00
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); }
Switch MediaPlayerPrivateAVFoundation to release logging https://bugs.webkit.org/show_bug.cgi?id=176621 <rdar://problem/34335311> Reviewed by Jer Noble. Source/WebCore: * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (WebCore::nullLogger): (WebCore::MediaPlayer::mediaPlayerLogger): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerLogIdentifier): (WebCore::MediaPlayerClient::mediaPlayerLogger): (WebCore::MediaPlayer::mediaPlayerLogIdentifier): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::~MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering): (WebCore::MediaPlayerPrivateAVFoundation::tearDownVideoRendering): (WebCore::MediaPlayerPrivateAVFoundation::load): (WebCore::MediaPlayerPrivateAVFoundation::playabilityKnown): (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): (WebCore::MediaPlayerPrivateAVFoundation::play): (WebCore::MediaPlayerPrivateAVFoundation::pause): (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime const): (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize): (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): (WebCore::MediaPlayerPrivateAVFoundation::updateStates): (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): (WebCore::MediaPlayerPrivateAVFoundation::timeChanged): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): (WebCore::MediaPlayerPrivateAVFoundation::setPreload): (WebCore::MediaPlayerPrivateAVFoundation::mainThreadCallback): (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): (WebCore::MediaPlayerPrivateAVFoundation::logChannel const): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::logClassName const): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins): (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyImageGenerator): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): (WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMedia const): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration const): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): (WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted): (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus const): (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::createOpenGLVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyOpenGLVideoOutput): (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const): (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless const): (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName const): (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled const): (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::boolString): Deleted. Source/WebCore/PAL: * pal/Logger.h: (PAL::LogArgument::toString): * pal/LoggerHelper.h: Canonical link: https://commits.webkit.org/193269@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-12 18:34:22 +00:00
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); }
Switch text tracks to release logging https://bugs.webkit.org/show_bug.cgi?id=176809 <rdar://problem/34397605> Reviewed by Jer Noble. Source/WebCore: Make all track objects use the same logger and log identifier as the media element they "belong" to. Convert all track logging from debug-only to release logging. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): * html/HTMLMediaElement.h: * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::setPrivate): (WebCore::AudioTrack::setMediaElement): * html/track/AudioTrack.h: * html/track/DataCue.cpp: (WebCore::DataCue::toString const): * html/track/DataCue.h: (PAL::LogArgument<WebCore::DataCue>::toString): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): (WebCore::InbandGenericTextTrack::removeGenericCue): (WebCore::InbandGenericTextTrack::newCuesParsed): (WebCore::InbandGenericTextTrack::fileFailedToParse): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::InbandTextTrack::setMediaElement): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): (WebCore::InbandWebVTTTextTrack::fileFailedToParse): * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::newCuesAvailable): (WebCore::LoadableTextTrack::cueLoadingCompleted): * html/track/LoadableTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): (WebCore::TextTrack::removeCue): (WebCore::TextTrack::setLanguage): * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toString const): * html/track/TextTrackCue.h: (PAL::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::setFontSize): (WebCore::TextTrackCueGeneric::toString const): * html/track/TextTrackCueGeneric.h: (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/TrackBase.cpp: (WebCore::nextLogIdentifier): (WebCore::nullLogger): (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::logChannel const): (WebCore::TrackBase::~TrackBase): Deleted. * html/track/TrackBase.h: (WebCore::TrackBase::setMediaElement): Deleted. * html/track/VTTCue.cpp: (WebCore::VTTCue::setFontSize): (WebCore::VTTCue::toString const): * html/track/VTTCue.h: (PAL::LogArgument<WebCore::VTTCue>::toString): * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setPrivate): (WebCore::VideoTrack::setMediaElement): * html/track/VideoTrack.h: * platform/graphics/AudioTrackPrivate.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::setClient): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toString const): (PAL::LogArgument<WebCore::GenericCueData>::toString): * platform/graphics/TrackPrivateBase.cpp: Added. (WebCore::TrackPrivateBase::setLogger): (WebCore::TrackPrivateBase::logChannel const): * platform/graphics/TrackPrivateBase.h: * platform/graphics/VideoTrackPrivate.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): (WebCore::InbandTextTrackPrivateAVF::resetCueValues): (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::LogArgument::toString): (PAL::Logger::willLog const): Canonical link: https://commits.webkit.org/193413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-15 16:20:07 +00:00
template<typename U = T> static typename std::enable_if<std::is_same<U, long>::value, String>::type toString(long argument) { return String::number(argument); }
template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned long long>::value, String>::type toString(unsigned long long argument) { return String::number(argument); }
template<typename U = T> static typename std::enable_if<std::is_same<U, long long>::value, String>::type toString(long long argument) { return String::number(argument); }
template<typename U = T> static typename std::enable_if<std::is_enum<U>::value, String>::type toString(U argument) { return String::number(static_cast<typename std::underlying_type<U>::type>(argument)); }
Use even more "shortest form" formatting, and less "fixed precision" and "fixed width" https://bugs.webkit.org/show_bug.cgi?id=198918 Reviewed by Sam Weinig. Source/JavaScriptCore: * API/tests/ExecutionTimeLimitTest.cpp: (testExecutionTimeLimit): Rewrote the string creation code to use makeString instead of StringBuilder and no longer use any fixed precision. * runtime/Options.cpp: (JSC::OptionReader::Option::dump const): Dump doubles with shortest form instead of fixed precision. Source/WebCore: The places left untouched are the ones where changing behavior has some kind of unwanted observable effect for one of two reasons. Otherwise, switched almost all call sites. 1) Substantial number of test results that depend on the current behavior. 2) Poor rounding resulting in conversion from float to double and back (or similar) that results in values with tiny fractional residue like "6.000001". * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::changeValueByStep): Use shortest instead of fixed. (WebCore::AccessibilityNodeObject::changeValueByPercent): Ditto. * css/CSSAspectRatioValue.cpp: (WebCore::CSSAspectRatioValue::customCSSText const): Ditto. * css/CSSFontVariationValue.cpp: (WebCore::CSSFontVariationValue::customCSSText const): Ditto. Also use makeString instead of StringBuilder for better efficiency. * css/CSSGradientValue.cpp: (WebCore::appendGradientStops): Ditto. * css/CSSKeyframeRule.cpp: (WebCore::StyleRuleKeyframe::keyText const): Ditto. * css/CSSTimingFunctionValue.cpp: (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const): Ditto. * css/MediaQueryEvaluator.cpp: (WebCore::aspectRatioValueAsString): Ditto. * css/TransformFunctions.h: Removed unnneeded forward declarations. * css/parser/CSSParserToken.cpp: (WebCore::CSSParserToken::serialize const): Use shortest instead of fixed. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::completeURLsInAttributeValue const): Ditto. * html/track/VTTCue.cpp: (WebCore::VTTCueBox::applyCSSProperties): Use shortest instead of fixed. Also wrote a FIXME abot this strange code that uses "calc()" to do math on two numbers, math that could instead be done by the code converting the numbers to a style string. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::drawRulers): Use shortest instead of fixed. * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const): Ditto. * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::snapOffsetsToString): Ditto. (WebCore::snapOffsetRangesToString): Ditto. (WebCore::snapPortOrAreaToString): Ditto. * platform/graphics/Color.cpp: (WebCore::decimalDigit): Added. (WebCore::serializedFractionDigitsForFractionalAlphaValue): Added. (WebCore::Color::cssText const): Rewrote to generate the same results using makeString rather than StringBuilder, and integer math rather than converting from integer to floating point and then doing floating point math. * platform/graphics/ExtendedColor.cpp: (WebCore::ExtendedColor::cssText const): Use shortest instead of fixed. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::logLayerInfo): Ditto. * svg/SVGAngleValue.cpp: (WebCore::SVGAngleValue::valueAsString const): Ditto. * svg/SVGLengthList.h: Added now-needed include of StringBuilder.h. * svg/SVGLengthValue.cpp: (WebCore::SVGLengthValue::valueAsString const): Use shortest instead of fixed. * svg/SVGNumberList.h: Ditto. * svg/SVGPathStringBuilder.cpp: (WebCore::appendFlag): Use multiple-argument append for better efficiency. (WebCore::appendNumber): Added a comment about why we can't yet convert this to use shortest instead of fixed: code that parses floats but then creates a CG path that stores things as double and does math as double then converts back to float results in float values that didn't round trip well and have fractions. This is smoothed away (hidden) by using fixed precision to conver them to strings. (WebCore::appendPoint): Call appendNumber to cut down on repeated code. * svg/SVGPointList.h: Use shortest instead of fixed. * svg/SVGTransformValue.h: (WebCore::SVGTransformValue::prefixForTransfromType): Return a string literal instead of a WTF::String to avoid creating and destroying an object each time. (WebCore::SVGTransformValue::appendFixedPrecisionNumbers): Added a comment explaining why we need to continue to use fixed precision here. Same issue with CGAffineTransform using double as we have with CGPath above. * svg/properties/SVGPropertyTraits.h: (WebCore::SVGPropertyTraits<float>::toString): Use shortest instead of fixed. (WebCore::SVGPropertyTraits<FloatPoint>::toString): Ditto. (WebCore::SVGPropertyTraits<FloatRect>::toString): Ditto. * testing/Internals.cpp: (WebCore::Internals::dumpMarkerRects): Added a comment explaining why we have to use fixed precision here. There are many test results that we would need to update. (WebCore::Internals::configurationForViewport): Ditto. (WebCore::Internals::getCurrentCursorInfo): Use shortest instead of fixed. * xml/XPathValue.cpp: (WebCore::XPath::Value::toString const): Ditto. Source/WebKit: * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::dumpContentsToFile): Use shortest instead of fixed. Also use makeString instead of StringBuilder. * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::asJSON const): Use shortest instead of fixed. Also use multiple-argument append on StringBuilder to make the function shorter and easier to read. * Shared/Gamepad/GamepadData.cpp: (WebKit::GamepadData::loggingString const): Ditto. * UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog): Use shortest instead of fixed. Source/WTF: * wtf/Logger.h: (WTF::LogArgument::toString): Log floating point numbers as shortest form instead of fixed precision. * wtf/MediaTime.cpp: (WTF::MediaTime::toString const): Convert time to string as shortest form instead of fixed precision. Also use multiple-argument append for great simplicity and clarity. LayoutTests: * platform/mac/svg/dom/length-list-parser-expected.png: Removed. Not sure how many other pixel results we have like this, but this included an ancient style Aqua scrollbar so hasn't matched anything for years and would clearly not have any value for regression testing. * svg/dom/length-list-parser-expected.txt: Updated to expect logging of a 7 digit length as an integer rather than rounded as "d.ddddd+6". Canonical link: https://commits.webkit.org/219329@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-14 17:16:03 +00:00
template<typename U = T> static typename std::enable_if<std::is_same<U, float>::value, String>::type toString(float argument) { return String::number(argument); }
template<typename U = T> static typename std::enable_if<std::is_same<U, double>::value, String>::type toString(double argument) { return String::number(argument); }
template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, AtomString>::value, String>::type toString(const AtomString& argument) { return argument.string(); }
template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, String>::value, String>::type toString(String argument) { return argument; }
Switch text tracks to release logging https://bugs.webkit.org/show_bug.cgi?id=176809 <rdar://problem/34397605> Reviewed by Jer Noble. Source/WebCore: Make all track objects use the same logger and log identifier as the media element they "belong" to. Convert all track logging from debug-only to release logging. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): * html/HTMLMediaElement.h: * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::setPrivate): (WebCore::AudioTrack::setMediaElement): * html/track/AudioTrack.h: * html/track/DataCue.cpp: (WebCore::DataCue::toString const): * html/track/DataCue.h: (PAL::LogArgument<WebCore::DataCue>::toString): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): (WebCore::InbandGenericTextTrack::removeGenericCue): (WebCore::InbandGenericTextTrack::newCuesParsed): (WebCore::InbandGenericTextTrack::fileFailedToParse): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::InbandTextTrack::setMediaElement): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): (WebCore::InbandWebVTTTextTrack::fileFailedToParse): * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::newCuesAvailable): (WebCore::LoadableTextTrack::cueLoadingCompleted): * html/track/LoadableTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): (WebCore::TextTrack::removeCue): (WebCore::TextTrack::setLanguage): * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toString const): * html/track/TextTrackCue.h: (PAL::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::setFontSize): (WebCore::TextTrackCueGeneric::toString const): * html/track/TextTrackCueGeneric.h: (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/TrackBase.cpp: (WebCore::nextLogIdentifier): (WebCore::nullLogger): (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::logChannel const): (WebCore::TrackBase::~TrackBase): Deleted. * html/track/TrackBase.h: (WebCore::TrackBase::setMediaElement): Deleted. * html/track/VTTCue.cpp: (WebCore::VTTCue::setFontSize): (WebCore::VTTCue::toString const): * html/track/VTTCue.h: (PAL::LogArgument<WebCore::VTTCue>::toString): * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setPrivate): (WebCore::VideoTrack::setMediaElement): * html/track/VideoTrack.h: * platform/graphics/AudioTrackPrivate.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::setClient): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toString const): (PAL::LogArgument<WebCore::GenericCueData>::toString): * platform/graphics/TrackPrivateBase.cpp: Added. (WebCore::TrackPrivateBase::setLogger): (WebCore::TrackPrivateBase::logChannel const): * platform/graphics/TrackPrivateBase.h: * platform/graphics/VideoTrackPrivate.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): (WebCore::InbandTextTrackPrivateAVF::resetCueValues): (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::LogArgument::toString): (PAL::Logger::willLog const): Canonical link: https://commits.webkit.org/193413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-15 16:20:07 +00:00
template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, StringBuilder*>::value, String>::type toString(StringBuilder* argument) { return argument->toString(); }
template<typename U = T> static typename std::enable_if<std::is_same<U, const char*>::value, String>::type toString(const char* argument) { return String(argument); }
template<size_t length> static String toString(const char (&argument)[length]) { return String(argument); }
};
Web Inspector: Optionally log WebKit log parameters as JSON https://bugs.webkit.org/show_bug.cgi?id=180529 <rdar://problem/35909462> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): New constructor that takes a vector of JSON log values. Concatenate all adjacent strings to make logging cleaner. (Inspector::ConsoleMessage::addToFrontend): Process WebKit logging arguments. (Inspector::ConsoleMessage::scriptState const): * inspector/ConsoleMessage.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::wrapJSONString const): Wrap JSON string log arguments. * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.wrapJSONString): Source/WebCore: * dom/Document.cpp: (WebCore::Document::didLogMessage):Update for API change. Don't check for main thread, that is already done in addConsoleMessage. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Cleanup logging. * html/track/DataCue.cpp: (WebCore::DataCue::toJSONString const): Serialize to JSON string. (WebCore::DataCue::toString const): Deleted. * html/track/DataCue.h: (WTF::LogArgument<WebCore::DataCue>::toString): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toJSON const): Ditto. (WebCore::TextTrackCue::toJSONString const): (WebCore::TextTrackCue::toString const): Deleted. * html/track/TextTrackCue.h: (WTF::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::toJSONString const): Ditto. (WebCore::TextTrackCueGeneric::toString const): Deleted. * html/track/TextTrackCueGeneric.h: (WTF::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/VTTCue.cpp: (WebCore::VTTCue::toJSONString const): Ditto. (WebCore::VTTCue::toString const): Deleted. * html/track/VTTCue.h: (WTF::LogArgument<WebCore::VTTCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toJSONString const): Ditto. (WTF::LogArgument<WebCore::GenericCueData>::toString): (WebCore::GenericCueData::toString const): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Cleanup logging. (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Log the entire cue. (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Cleanup logging. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): Don't log, it isn't interesting and happens frequently. (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): Ditto. * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::toJSONString const): Serialize to JSON string. * platform/graphics/iso/ISOVTTCue.h: (WTF::LogArgument<WebCore::ISOWebVTTCue>::toString): Ditto. Source/WTF: * wtf/Logger.h: (WTF::Logger::log): (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): * wtf/MediaTime.cpp: (WTF::MediaTime::toJSONString const): Serialize to JSON string. * wtf/MediaTime.h: LayoutTests: * inspector/canvas/recording-2d-expected.txt: * inspector/canvas/recording-webgl-expected.txt: * inspector/canvas/recording-webgl-snapshots-expected.txt: Canonical link: https://commits.webkit.org/196579@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 00:41:54 +00:00
struct JSONLogValue {
enum class Type { String, JSON };
Type type { Type::JSON };
String value;
};
template<class C>
class HasToJSONString {
template <class T> static std::true_type testSignature(String (T::*)() const);
template <class T> static decltype(testSignature(&T::toJSONString)) test(std::nullptr_t);
template <class T> static std::false_type test(...);
public:
Use constexpr instead of const in symbol definitions that are obviously constexpr. https://bugs.webkit.org/show_bug.cgi?id=201879 Rubber-stamped by Joseph Pecoraro. Source/bmalloc: * bmalloc/AvailableMemory.cpp: * bmalloc/IsoTLS.h: * bmalloc/Map.h: * bmalloc/Mutex.cpp: (bmalloc::Mutex::lockSlowCase): * bmalloc/PerThread.h: * bmalloc/Vector.h: * bmalloc/Zone.h: Source/JavaScriptCore: const may require external storage (at the compiler's whim) though these currently do not. constexpr makes it clear that the value is a literal constant that can be inlined. In most cases in the code, when we say static const, we actually mean static constexpr. I'm changing the code to reflect this. * API/JSAPIValueWrapper.h: * API/JSCallbackConstructor.h: * API/JSCallbackObject.h: * API/JSContextRef.cpp: * API/JSWrapperMap.mm: * API/tests/CompareAndSwapTest.cpp: * API/tests/TypedArrayCTest.cpp: * API/tests/testapi.mm: (testObjectiveCAPIMain): * KeywordLookupGenerator.py: (Trie.printAsC): * assembler/ARMv7Assembler.h: * assembler/AssemblerBuffer.h: * assembler/AssemblerCommon.h: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.h: * assembler/MacroAssemblerARM64E.h: * assembler/MacroAssemblerARMv7.h: * assembler/MacroAssemblerCodeRef.h: * assembler/MacroAssemblerMIPS.h: * assembler/MacroAssemblerX86.h: * assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::absDouble): (JSC::MacroAssemblerX86Common::negateDouble): * assembler/MacroAssemblerX86_64.h: * assembler/X86Assembler.h: * b3/B3Bank.h: * b3/B3CheckSpecial.h: * b3/B3DuplicateTails.cpp: * b3/B3EliminateCommonSubexpressions.cpp: * b3/B3FixSSA.cpp: * b3/B3FoldPathConstants.cpp: * b3/B3InferSwitches.cpp: * b3/B3Kind.h: * b3/B3LowerToAir.cpp: * b3/B3NativeTraits.h: * b3/B3ReduceDoubleToFloat.cpp: * b3/B3ReduceLoopStrength.cpp: * b3/B3ReduceStrength.cpp: * b3/B3ValueKey.h: * b3/air/AirAllocateRegistersByGraphColoring.cpp: * b3/air/AirAllocateStackByGraphColoring.cpp: * b3/air/AirArg.h: * b3/air/AirCCallSpecial.h: * b3/air/AirEmitShuffle.cpp: * b3/air/AirFixObviousSpills.cpp: * b3/air/AirFormTable.h: * b3/air/AirLowerAfterRegAlloc.cpp: * b3/air/AirPrintSpecial.h: * b3/air/AirStackAllocation.cpp: * b3/air/AirTmp.h: * b3/testb3_6.cpp: (testInterpreter): * bytecode/AccessCase.cpp: * bytecode/CallLinkStatus.cpp: * bytecode/CallVariant.h: * bytecode/CodeBlock.h: * bytecode/CodeOrigin.h: * bytecode/DFGExitProfile.h: * bytecode/DirectEvalCodeCache.h: * bytecode/ExecutableToCodeBlockEdge.h: * bytecode/GetterSetterAccessCase.cpp: * bytecode/LazyOperandValueProfile.h: * bytecode/ObjectPropertyCondition.h: * bytecode/ObjectPropertyConditionSet.cpp: * bytecode/PolymorphicAccess.cpp: * bytecode/PropertyCondition.h: * bytecode/SpeculatedType.h: * bytecode/StructureStubInfo.cpp: * bytecode/UnlinkedCodeBlock.cpp: (JSC::UnlinkedCodeBlock::typeProfilerExpressionInfoForBytecodeOffset): * bytecode/UnlinkedCodeBlock.h: * bytecode/UnlinkedEvalCodeBlock.h: * bytecode/UnlinkedFunctionCodeBlock.h: * bytecode/UnlinkedFunctionExecutable.h: * bytecode/UnlinkedModuleProgramCodeBlock.h: * bytecode/UnlinkedProgramCodeBlock.h: * bytecode/ValueProfile.h: * bytecode/VirtualRegister.h: * bytecode/Watchpoint.h: * bytecompiler/BytecodeGenerator.h: * bytecompiler/Label.h: * bytecompiler/NodesCodegen.cpp: (JSC::ThisNode::emitBytecode): * bytecompiler/RegisterID.h: * debugger/Breakpoint.h: * debugger/DebuggerParseData.cpp: * debugger/DebuggerPrimitives.h: * debugger/DebuggerScope.h: * dfg/DFGAbstractHeap.h: * dfg/DFGAbstractValue.h: * dfg/DFGArgumentsEliminationPhase.cpp: * dfg/DFGByteCodeParser.cpp: * dfg/DFGCSEPhase.cpp: * dfg/DFGCommon.h: * dfg/DFGCompilationKey.h: * dfg/DFGDesiredGlobalProperty.h: * dfg/DFGEdgeDominates.h: * dfg/DFGEpoch.h: * dfg/DFGForAllKills.h: (JSC::DFG::forAllKilledNodesAtNodeIndex): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::isLiveInBytecode): * dfg/DFGHeapLocation.h: * dfg/DFGInPlaceAbstractState.cpp: * dfg/DFGIntegerCheckCombiningPhase.cpp: * dfg/DFGIntegerRangeOptimizationPhase.cpp: * dfg/DFGInvalidationPointInjectionPhase.cpp: * dfg/DFGLICMPhase.cpp: * dfg/DFGLazyNode.h: * dfg/DFGMinifiedID.h: * dfg/DFGMovHintRemovalPhase.cpp: * dfg/DFGNodeFlowProjection.h: * dfg/DFGNodeType.h: * dfg/DFGObjectAllocationSinkingPhase.cpp: * dfg/DFGPhantomInsertionPhase.cpp: * dfg/DFGPromotedHeapLocation.h: * dfg/DFGPropertyTypeKey.h: * dfg/DFGPureValue.h: * dfg/DFGPutStackSinkingPhase.cpp: * dfg/DFGRegisterBank.h: * dfg/DFGSSAConversionPhase.cpp: * dfg/DFGSSALoweringPhase.cpp: * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileDoubleRep): (JSC::DFG::compileClampDoubleToByte): (JSC::DFG::SpeculativeJIT::compileArithRounding): (JSC::DFG::compileArithPowIntegerFastPath): (JSC::DFG::SpeculativeJIT::compileArithPow): (JSC::DFG::SpeculativeJIT::emitBinarySwitchStringRecurse): * dfg/DFGStackLayoutPhase.cpp: * dfg/DFGStoreBarrierInsertionPhase.cpp: * dfg/DFGStrengthReductionPhase.cpp: * dfg/DFGStructureAbstractValue.h: * dfg/DFGVarargsForwardingPhase.cpp: * dfg/DFGVariableEventStream.cpp: (JSC::DFG::VariableEventStream::reconstruct const): * dfg/DFGWatchpointCollectionPhase.cpp: * disassembler/ARM64/A64DOpcode.h: * ftl/FTLLocation.h: * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileArithRandom): * ftl/FTLSlowPathCall.cpp: * ftl/FTLSlowPathCallKey.h: * heap/CellContainer.h: * heap/CellState.h: * heap/ConservativeRoots.h: * heap/GCSegmentedArray.h: * heap/HandleBlock.h: * heap/Heap.cpp: (JSC::Heap::updateAllocationLimits): * heap/Heap.h: * heap/HeapSnapshot.h: * heap/HeapUtil.h: (JSC::HeapUtil::findGCObjectPointersForMarking): * heap/IncrementalSweeper.cpp: * heap/LargeAllocation.h: * heap/MarkedBlock.cpp: * heap/Strong.h: * heap/VisitRaceKey.h: * heap/Weak.h: * heap/WeakBlock.h: * inspector/JSInjectedScriptHost.h: * inspector/JSInjectedScriptHostPrototype.h: * inspector/JSJavaScriptCallFrame.h: * inspector/JSJavaScriptCallFramePrototype.h: * inspector/agents/InspectorConsoleAgent.cpp: * inspector/agents/InspectorRuntimeAgent.cpp: (Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): * inspector/scripts/codegen/generate_cpp_protocol_types_header.py: (CppProtocolTypesHeaderGenerator._generate_versions): * inspector/scripts/tests/generic/expected/version.json-result: * interpreter/Interpreter.h: * interpreter/ShadowChicken.cpp: * jit/BinarySwitch.cpp: * jit/CallFrameShuffler.h: * jit/ExecutableAllocator.h: * jit/FPRInfo.h: * jit/GPRInfo.h: * jit/ICStats.h: * jit/JITThunks.h: * jit/Reg.h: * jit/RegisterSet.h: * jit/TempRegisterSet.h: * jsc.cpp: * parser/ASTBuilder.h: * parser/Nodes.h: * parser/SourceCodeKey.h: * parser/SyntaxChecker.h: * parser/VariableEnvironment.h: * profiler/ProfilerOrigin.h: * profiler/ProfilerOriginStack.h: * profiler/ProfilerUID.h: * runtime/AbstractModuleRecord.cpp: * runtime/ArrayBufferNeuteringWatchpointSet.h: * runtime/ArrayConstructor.h: * runtime/ArrayConventions.h: * runtime/ArrayIteratorPrototype.h: * runtime/ArrayPrototype.cpp: (JSC::setLength): * runtime/AsyncFromSyncIteratorPrototype.h: * runtime/AsyncGeneratorFunctionPrototype.h: * runtime/AsyncGeneratorPrototype.h: * runtime/AsyncIteratorPrototype.h: * runtime/AtomicsObject.cpp: * runtime/BigIntConstructor.h: * runtime/BigIntPrototype.h: * runtime/BooleanPrototype.h: * runtime/ClonedArguments.h: * runtime/CodeCache.h: * runtime/ControlFlowProfiler.h: * runtime/CustomGetterSetter.h: * runtime/DateConstructor.h: * runtime/DatePrototype.h: * runtime/DefinePropertyAttributes.h: * runtime/ErrorPrototype.h: * runtime/EvalExecutable.h: * runtime/Exception.h: * runtime/ExceptionHelpers.cpp: (JSC::invalidParameterInSourceAppender): (JSC::invalidParameterInstanceofSourceAppender): * runtime/ExceptionHelpers.h: * runtime/ExecutableBase.h: * runtime/FunctionExecutable.h: * runtime/FunctionRareData.h: * runtime/GeneratorPrototype.h: * runtime/GenericArguments.h: * runtime/GenericOffset.h: * runtime/GetPutInfo.h: * runtime/GetterSetter.h: * runtime/GlobalExecutable.h: * runtime/Identifier.h: * runtime/InspectorInstrumentationObject.h: * runtime/InternalFunction.h: * runtime/IntlCollatorConstructor.h: * runtime/IntlCollatorPrototype.h: * runtime/IntlDateTimeFormatConstructor.h: * runtime/IntlDateTimeFormatPrototype.h: * runtime/IntlNumberFormatConstructor.h: * runtime/IntlNumberFormatPrototype.h: * runtime/IntlObject.h: * runtime/IntlPluralRulesConstructor.h: * runtime/IntlPluralRulesPrototype.h: * runtime/IteratorPrototype.h: * runtime/JSArray.cpp: (JSC::JSArray::tryCreateUninitializedRestricted): * runtime/JSArray.h: * runtime/JSArrayBuffer.h: * runtime/JSArrayBufferView.h: * runtime/JSBigInt.h: * runtime/JSCJSValue.h: * runtime/JSCell.h: * runtime/JSCustomGetterSetterFunction.h: * runtime/JSDataView.h: * runtime/JSDataViewPrototype.h: * runtime/JSDestructibleObject.h: * runtime/JSFixedArray.h: * runtime/JSGenericTypedArrayView.h: * runtime/JSGlobalLexicalEnvironment.h: * runtime/JSGlobalObject.h: * runtime/JSImmutableButterfly.h: * runtime/JSInternalPromiseConstructor.h: * runtime/JSInternalPromiseDeferred.h: * runtime/JSInternalPromisePrototype.h: * runtime/JSLexicalEnvironment.h: * runtime/JSModuleEnvironment.h: * runtime/JSModuleLoader.h: * runtime/JSModuleNamespaceObject.h: * runtime/JSNonDestructibleProxy.h: * runtime/JSONObject.cpp: * runtime/JSONObject.h: * runtime/JSObject.h: * runtime/JSPromiseConstructor.h: * runtime/JSPromiseDeferred.h: * runtime/JSPromisePrototype.h: * runtime/JSPropertyNameEnumerator.h: * runtime/JSProxy.h: * runtime/JSScope.h: * runtime/JSScriptFetchParameters.h: * runtime/JSScriptFetcher.h: * runtime/JSSegmentedVariableObject.h: * runtime/JSSourceCode.h: * runtime/JSString.cpp: * runtime/JSString.h: * runtime/JSSymbolTableObject.h: * runtime/JSTemplateObjectDescriptor.h: * runtime/JSTypeInfo.h: * runtime/MapPrototype.h: * runtime/MinimumReservedZoneSize.h: * runtime/ModuleProgramExecutable.h: * runtime/NativeExecutable.h: * runtime/NativeFunction.h: * runtime/NativeStdFunctionCell.h: * runtime/NumberConstructor.h: * runtime/NumberPrototype.h: * runtime/ObjectConstructor.h: * runtime/ObjectPrototype.h: * runtime/ProgramExecutable.h: * runtime/PromiseDeferredTimer.cpp: * runtime/PropertyMapHashTable.h: * runtime/PropertyNameArray.h: (JSC::PropertyNameArray::add): * runtime/PrototypeKey.h: * runtime/ProxyConstructor.h: * runtime/ProxyObject.cpp: (JSC::ProxyObject::performGetOwnPropertyNames): * runtime/ProxyRevoke.h: * runtime/ReflectObject.h: * runtime/RegExp.h: * runtime/RegExpCache.h: * runtime/RegExpConstructor.h: * runtime/RegExpKey.h: * runtime/RegExpObject.h: * runtime/RegExpPrototype.h: * runtime/RegExpStringIteratorPrototype.h: * runtime/SamplingProfiler.cpp: * runtime/ScopedArgumentsTable.h: * runtime/ScriptExecutable.h: * runtime/SetPrototype.h: * runtime/SmallStrings.h: * runtime/SparseArrayValueMap.h: * runtime/StringConstructor.h: * runtime/StringIteratorPrototype.h: * runtime/StringObject.h: * runtime/StringPrototype.h: * runtime/Structure.h: * runtime/StructureChain.h: * runtime/StructureRareData.h: * runtime/StructureTransitionTable.h: * runtime/Symbol.h: * runtime/SymbolConstructor.h: * runtime/SymbolPrototype.h: * runtime/SymbolTable.h: * runtime/TemplateObjectDescriptor.h: * runtime/TypeProfiler.cpp: * runtime/TypeProfiler.h: * runtime/TypeProfilerLog.cpp: * runtime/VarOffset.h: * testRegExp.cpp: * tools/HeapVerifier.cpp: (JSC::HeapVerifier::checkIfRecorded): * tools/JSDollarVM.cpp: * wasm/WasmB3IRGenerator.cpp: * wasm/WasmBBQPlan.cpp: * wasm/WasmFaultSignalHandler.cpp: * wasm/WasmFunctionParser.h: * wasm/WasmOMGForOSREntryPlan.cpp: * wasm/WasmOMGPlan.cpp: * wasm/WasmPlan.cpp: * wasm/WasmSignature.cpp: * wasm/WasmSignature.h: * wasm/WasmWorklist.cpp: * wasm/js/JSWebAssembly.h: * wasm/js/JSWebAssemblyCodeBlock.h: * wasm/js/WebAssemblyCompileErrorConstructor.h: * wasm/js/WebAssemblyCompileErrorPrototype.h: * wasm/js/WebAssemblyFunction.h: * wasm/js/WebAssemblyInstanceConstructor.h: * wasm/js/WebAssemblyInstancePrototype.h: * wasm/js/WebAssemblyLinkErrorConstructor.h: * wasm/js/WebAssemblyLinkErrorPrototype.h: * wasm/js/WebAssemblyMemoryConstructor.h: * wasm/js/WebAssemblyMemoryPrototype.h: * wasm/js/WebAssemblyModuleConstructor.h: * wasm/js/WebAssemblyModulePrototype.h: * wasm/js/WebAssemblyRuntimeErrorConstructor.h: * wasm/js/WebAssemblyRuntimeErrorPrototype.h: * wasm/js/WebAssemblyTableConstructor.h: * wasm/js/WebAssemblyTablePrototype.h: * wasm/js/WebAssemblyToJSCallee.h: * yarr/Yarr.h: * yarr/YarrParser.h: * yarr/generateYarrCanonicalizeUnicode: Source/WebCore: No new tests. Covered by existing tests. * bindings/js/JSDOMConstructorBase.h: * bindings/js/JSDOMWindowProperties.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GeneratePrototypeDeclaration): * bindings/scripts/test/JS/JSTestActiveDOMObject.h: * bindings/scripts/test/JS/JSTestEnabledBySetting.h: * bindings/scripts/test/JS/JSTestEnabledForContext.h: * bindings/scripts/test/JS/JSTestEventTarget.h: * bindings/scripts/test/JS/JSTestGlobalObject.h: * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: * bindings/scripts/test/JS/JSTestPluginInterface.h: * bindings/scripts/test/JS/JSTestTypedefs.h: * bridge/objc/objc_runtime.h: * bridge/runtime_array.h: * bridge/runtime_method.h: * bridge/runtime_object.h: Source/WebKit: * WebProcess/Plugins/Netscape/JSNPObject.h: Source/WTF: * wtf/Assertions.cpp: * wtf/AutomaticThread.cpp: * wtf/BitVector.h: * wtf/Bitmap.h: * wtf/BloomFilter.h: * wtf/Brigand.h: * wtf/CheckedArithmetic.h: * wtf/CrossThreadCopier.h: * wtf/CurrentTime.cpp: * wtf/DataLog.cpp: * wtf/DateMath.cpp: (WTF::daysFrom1970ToYear): * wtf/DeferrableRefCounted.h: * wtf/GetPtr.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashTable.h: * wtf/HashTraits.h: * wtf/JSONValues.cpp: * wtf/JSONValues.h: * wtf/ListHashSet.h: * wtf/Lock.h: * wtf/LockAlgorithm.h: * wtf/LockAlgorithmInlines.h: (WTF::Hooks>::lockSlow): * wtf/Logger.h: * wtf/LoggerHelper.h: (WTF::LoggerHelper::childLogIdentifier const): * wtf/MainThread.cpp: * wtf/MetaAllocatorPtr.h: * wtf/MonotonicTime.h: * wtf/NaturalLoops.h: (WTF::NaturalLoops::NaturalLoops): * wtf/ObjectIdentifier.h: * wtf/RAMSize.cpp: * wtf/Ref.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/SchedulePair.h: * wtf/StackShot.h: * wtf/StdLibExtras.h: * wtf/TinyPtrSet.h: * wtf/URL.cpp: * wtf/URLHash.h: * wtf/URLParser.cpp: (WTF::URLParser::defaultPortForProtocol): * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/WallTime.h: * wtf/WeakHashSet.h: * wtf/WordLock.h: * wtf/cocoa/CPUTimeCocoa.cpp: * wtf/cocoa/MemoryPressureHandlerCocoa.mm: * wtf/persistence/PersistentDecoder.h: * wtf/persistence/PersistentEncoder.h: * wtf/text/AtomStringHash.h: * wtf/text/CString.h: * wtf/text/StringBuilder.cpp: (WTF::expandedCapacity): * wtf/text/StringHash.h: * wtf/text/StringImpl.h: * wtf/text/StringToIntegerConversion.h: (WTF::toIntegralType): * wtf/text/SymbolRegistry.h: * wtf/text/TextStream.cpp: (WTF::hasFractions): * wtf/text/WTFString.h: * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: Canonical link: https://commits.webkit.org/215538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-18 00:36:19 +00:00
static constexpr bool value = decltype(test<C>(nullptr))::value;
Web Inspector: Optionally log WebKit log parameters as JSON https://bugs.webkit.org/show_bug.cgi?id=180529 <rdar://problem/35909462> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): New constructor that takes a vector of JSON log values. Concatenate all adjacent strings to make logging cleaner. (Inspector::ConsoleMessage::addToFrontend): Process WebKit logging arguments. (Inspector::ConsoleMessage::scriptState const): * inspector/ConsoleMessage.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::wrapJSONString const): Wrap JSON string log arguments. * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.wrapJSONString): Source/WebCore: * dom/Document.cpp: (WebCore::Document::didLogMessage):Update for API change. Don't check for main thread, that is already done in addConsoleMessage. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Cleanup logging. * html/track/DataCue.cpp: (WebCore::DataCue::toJSONString const): Serialize to JSON string. (WebCore::DataCue::toString const): Deleted. * html/track/DataCue.h: (WTF::LogArgument<WebCore::DataCue>::toString): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toJSON const): Ditto. (WebCore::TextTrackCue::toJSONString const): (WebCore::TextTrackCue::toString const): Deleted. * html/track/TextTrackCue.h: (WTF::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::toJSONString const): Ditto. (WebCore::TextTrackCueGeneric::toString const): Deleted. * html/track/TextTrackCueGeneric.h: (WTF::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/VTTCue.cpp: (WebCore::VTTCue::toJSONString const): Ditto. (WebCore::VTTCue::toString const): Deleted. * html/track/VTTCue.h: (WTF::LogArgument<WebCore::VTTCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toJSONString const): Ditto. (WTF::LogArgument<WebCore::GenericCueData>::toString): (WebCore::GenericCueData::toString const): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Cleanup logging. (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Log the entire cue. (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Cleanup logging. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): Don't log, it isn't interesting and happens frequently. (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): Ditto. * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::toJSONString const): Serialize to JSON string. * platform/graphics/iso/ISOVTTCue.h: (WTF::LogArgument<WebCore::ISOWebVTTCue>::toString): Ditto. Source/WTF: * wtf/Logger.h: (WTF::Logger::log): (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): * wtf/MediaTime.cpp: (WTF::MediaTime::toJSONString const): Serialize to JSON string. * wtf/MediaTime.h: LayoutTests: * inspector/canvas/recording-2d-expected.txt: * inspector/canvas/recording-webgl-expected.txt: * inspector/canvas/recording-webgl-snapshots-expected.txt: Canonical link: https://commits.webkit.org/196579@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 00:41:54 +00:00
};
template<typename Argument, bool hasJSON = HasToJSONString<Argument>::value>
struct ConsoleLogValueImpl;
template<typename Argument>
struct ConsoleLogValueImpl<Argument, true> {
static JSONLogValue toValue(const Argument& value)
{
return JSONLogValue { JSONLogValue::Type::JSON, value.toJSONString() };
}
};
template<typename Argument>
struct ConsoleLogValueImpl<Argument, false> {
static JSONLogValue toValue(const Argument& value)
{
return JSONLogValue { JSONLogValue::Type::String, LogArgument<Argument>::toString(value) };
}
};
template<typename Argument, bool hasJSON = std::is_class<Argument>::value>
struct ConsoleLogValue;
template<typename Argument>
struct ConsoleLogValue<Argument, true> {
static JSONLogValue toValue(const Argument& value)
{
return ConsoleLogValueImpl<Argument>::toValue(value);
}
};
// Specialization for non-class types
template<typename Argument>
struct ConsoleLogValue<Argument, false> {
template<typename T>
static JSONLogValue toValue(T value)
{
return JSONLogValue { JSONLogValue::Type::String, LogArgument<T>::toString(value) };
}
};
Drop CheckedLock / CheckedCondition aliases https://bugs.webkit.org/show_bug.cgi?id=226176 Reviewed by Kate Cheney. Drop CheckedLock / CheckedCondition aliases now that they are the default. Source/JavaScriptCore: * API/JSVirtualMachine.mm: * API/glib/JSCVirtualMachine.cpp: * assembler/PerfLog.h: * assembler/testmasm.cpp: * bytecode/StructureStubInfo.h: * bytecode/SuperSampler.cpp: * dfg/DFGCommon.cpp: * dfg/DFGCommonData.cpp: * dfg/DFGPlan.h: * dfg/DFGThreadData.h: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::Worklist): * dfg/DFGWorklist.h: * disassembler/Disassembler.cpp: * dynbench.cpp: * heap/BlockDirectory.cpp: (JSC::BlockDirectory::parallelNotEmptyBlockSource): * heap/BlockDirectory.h: (JSC::BlockDirectory::bitvectorLock): * heap/CodeBlockSet.h: (JSC::CodeBlockSet::getLock): * heap/Heap.cpp: (JSC::Heap::Heap): * heap/Heap.h: * heap/IsoSubspacePerVM.h: * heap/MarkedSpace.h: (JSC::MarkedSpace::directoryLock): * heap/MarkingConstraintSolver.h: * heap/SlotVisitor.cpp: (JSC::SlotVisitor::donateKnownParallel): * heap/SlotVisitor.h: * inspector/remote/socket/RemoteInspectorConnectionClient.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::getLock const): (JSC::dumpJITMemory): * jit/ExecutableAllocator.h: (JSC::ExecutableAllocatorBase::getLock const): * jit/JITWorklist.cpp: (JSC::JITWorklist::JITWorklist): * jit/JITWorklist.h: * jsc.cpp: * profiler/ProfilerDatabase.h: * runtime/ConcurrentJSLock.h: * runtime/DeferredWorkTimer.h: * runtime/JSLock.h: * runtime/SamplingProfiler.cpp: (JSC::FrameWalker::FrameWalker): (JSC::CFrameWalker::CFrameWalker): (JSC::SamplingProfiler::takeSample): * runtime/SamplingProfiler.h: (JSC::SamplingProfiler::getLock): * runtime/VM.h: * runtime/VMTraps.cpp: (JSC::VMTraps::invalidateCodeBlocksOnStack): (JSC::VMTraps::VMTraps): * runtime/VMTraps.h: * tools/FunctionOverrides.h: * tools/VMInspector.cpp: (JSC::ensureIsSafeToLock): * tools/VMInspector.h: (JSC::VMInspector::getLock): * wasm/WasmCalleeRegistry.h: (JSC::Wasm::CalleeRegistry::getLock): * wasm/WasmPlan.h: * wasm/WasmStreamingCompiler.h: * wasm/WasmThunks.h: * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/WasmWorklist.h: Source/WebCore: * Modules/indexeddb/IDBObjectStore.h: * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/client/IDBConnectionProxy.h: * Modules/indexeddb/server/IDBSerializationContext.cpp: * Modules/indexeddb/server/IDBServer.cpp: * Modules/mediastream/RTCDataChannel.cpp: * Modules/mediastream/RTCRtpSFrameTransformer.h: * Modules/mediastream/RTCRtpScriptTransform.h: * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h: * Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.h: * Modules/speech/SpeechRecognitionCaptureSourceImpl.h: * Modules/webaudio/AudioParamTimeline.h: * Modules/webaudio/MediaElementAudioSourceNode.h: * Modules/webdatabase/Database.cpp: * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseTask.h: * Modules/webdatabase/DatabaseThread.h: * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::openDatabaseMutex): * Modules/webdatabase/DatabaseTracker.h: * Modules/webdatabase/OriginLock.cpp: * Modules/webdatabase/SQLCallbackWrapper.h: * Modules/webdatabase/SQLTransaction.h: * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::instancesLock): * Modules/webgpu/WebGPUDevice.h: * Modules/webgpu/WebGPUPipeline.cpp: (WebCore::WebGPUPipeline::instancesLock): * Modules/webgpu/WebGPUPipeline.h: * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::allActiveWebSocketsLock): * Modules/websockets/WebSocket.h: * accessibility/isolatedtree/AXIsolatedTree.cpp: * accessibility/isolatedtree/AXIsolatedTree.h: * bindings/js/JSDOMGlobalObject.h: * bridge/objc/WebScriptObject.mm: * crypto/CryptoAlgorithmRegistry.h: * dom/MessagePort.cpp: * dom/Node.cpp: * dom/ScriptExecutionContext.cpp: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaPlayer): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::instancesLock): * html/canvas/CanvasRenderingContext.h: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::objectGraphLockForAContext): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::objectGraphLockForContext): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::instancesLock): * html/canvas/WebGLProgram.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::objectGraphLock): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::objectGraphLockForContext): * html/canvas/WebGLSharedObject.h: * inspector/agents/WebHeapAgent.cpp: * page/ResourceUsageThread.h: * page/SecurityPolicy.cpp: * page/WheelEventTestMonitor.h: * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/ScrollingTreeLatchingController.h: * page/scrolling/ThreadedScrollingTree.h: (WebCore::ThreadedScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/mac/ScrollingTreeMac.h: * platform/AbortableTaskQueue.h: * platform/GenericTaskQueue.cpp: * platform/GenericTaskQueue.h: * platform/LegacySchemeRegistry.cpp: * platform/audio/AudioDestination.h: * platform/audio/HRTFDatabaseLoader.h: * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::backgroundThreadEntry): * platform/audio/cocoa/AudioDestinationCocoa.h: * platform/audio/gstreamer/AudioSourceProviderGStreamer.h: * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: * platform/audio/mac/FFTFrameMac.cpp: * platform/encryptedmedia/CDMProxy.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::lock): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/SubimageCacheWithTimer.h: * platform/graphics/cocoa/FontCacheCoreText.cpp: * platform/graphics/gstreamer/ImageDecoderGStreamer.h: * platform/graphics/gstreamer/MainThreadNotifier.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: (WebCore::TextureMapperPlatformLayerProxy::WTF_RETURNS_LOCK): * platform/image-decoders/ScalableImageDecoder.h: * platform/ios/QuickLook.mm: * platform/ios/WebSQLiteDatabaseTrackerClient.mm: * platform/ios/wak/WebCoreThreadRun.cpp: * platform/mediarecorder/MediaRecorderPrivateMock.h: * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: * platform/mediastream/RealtimeMediaSource.h: * platform/mediastream/RealtimeOutgoingAudioSource.h: * platform/mediastream/RealtimeOutgoingVideoSource.h: * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h: * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::loaderRunLoop): * platform/network/cocoa/WebCoreNSURLSession.mm: * platform/network/mac/UTIUtilities.mm: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteDatabaseTracker.cpp: * platform/text/TextEncodingRegistry.cpp: * storage/StorageQuotaManager.h: * workers/WorkerGlobalScope.cpp: * workers/WorkerOrWorkletScriptController.h: * workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::workerOrWorkletThreadsLock): * workers/WorkerOrWorkletThread.h: * worklets/PaintWorkletGlobalScope.h: Source/WebKit: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: (WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer): * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: * NetworkProcess/NetworkProcess.h: * NetworkProcess/WebStorage/StorageManagerSet.h: * NetworkProcess/cache/NetworkCacheStorage.cpp: * NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h: * NetworkProcess/glib/DNSCache.h: * Platform/IPC/Connection.cpp: * Platform/IPC/Connection.h: * Platform/IPC/StreamConnectionWorkQueue.h: * Platform/IPC/StreamServerConnection.h: * Shared/BlockingResponseMap.h: * Shared/Cocoa/XPCEndpointClient.h: * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: * Shared/mac/MediaFormatReader/MediaFormatReader.h: * Shared/mac/MediaFormatReader/MediaSampleCursor.h: * Shared/mac/MediaFormatReader/MediaTrackReader.h: * UIProcess/API/glib/IconDatabase.h: * UIProcess/WebURLSchemeTask.h: * UIProcess/mac/DisplayLink.h: * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView knowsPageRange:]): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Plugins/PluginProcessConnectionManager.h: * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/ViewUpdateDispatcher.h: Source/WebKitLegacy: * Storage/StorageAreaSync.h: Source/WebKitLegacy/mac: * DOM/DOMInternal.mm: Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Assertions.cpp: * wtf/AutomaticThread.cpp: (WTF::AutomaticThreadCondition::wait): (WTF::AutomaticThreadCondition::waitFor): (WTF::AutomaticThread::AutomaticThread): * wtf/AutomaticThread.h: * wtf/CMakeLists.txt: * wtf/CheckedCondition.h: Removed. * wtf/CheckedLock.h: Removed. * wtf/Condition.h: * wtf/CrossThreadQueue.h: * wtf/CrossThreadTaskHandler.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/FastMalloc.cpp: * wtf/Forward.h: * wtf/Language.cpp: * wtf/Lock.cpp: (WTF::UncheckedLock::lockSlow): (WTF::UncheckedLock::unlockSlow): (WTF::UncheckedLock::unlockFairlySlow): (WTF::UncheckedLock::safepointSlow): * wtf/Lock.h: (WTF::WTF_ASSERTS_ACQUIRED_LOCK): * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::WTF_RETURNS_LOCK): * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: (WTF::MetaAllocator::release): (WTF::MetaAllocator::MetaAllocator): (WTF::MetaAllocator::allocate): (WTF::MetaAllocator::currentStatistics): * wtf/MetaAllocator.h: * wtf/OSLogPrintStream.h: * wtf/ParallelHelperPool.cpp: (WTF::ParallelHelperPool::ParallelHelperPool): * wtf/ParallelHelperPool.h: * wtf/ParallelJobsGeneric.h: * wtf/ParallelVectorIterator.h: * wtf/ReadWriteLock.h: * wtf/RecursiveLockAdapter.h: * wtf/RunLoop.h: * wtf/SynchronizedFixedQueue.h: * wtf/Threading.cpp: (WTF::Thread::allThreadsLock): * wtf/Threading.h: * wtf/TimingScope.cpp: * wtf/URL.cpp: * wtf/WTFSemaphore.h: * wtf/WorkQueue.cpp: (WTF::WorkQueue::concurrentApply): * wtf/WorkerPool.cpp: (WTF::WorkerPool::WorkerPool): * wtf/WorkerPool.h: * wtf/cf/LanguageCF.cpp: * wtf/text/AtomStringImpl.cpp: (WTF::AtomStringTableLocker::AtomStringTableLocker): * wtf/text/StringView.cpp: * wtf/threads/BinarySemaphore.h: * wtf/unicode/icu/CollatorICU.cpp: Tools: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/Condition.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::createThreadIfNeeded): Canonical link: https://commits.webkit.org/238085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-24 18:29:01 +00:00
WTF_EXPORT_PRIVATE extern Lock loggerObserverLock;
Use std::call_once + LazyNeverDestroyed to initialize complex data structures https://bugs.webkit.org/show_bug.cgi?id=215535 <rdar://problem/66774266> Reviewed by Mark Lam. NeverDestroyed<> is not thread-safe in Darwin build since it is not using C++11 thread-safe static variable semantics. This patch uses LazyNeverDestroyed and call_once to initialize complex data structures so that we can ensure they are initialized atomically. We also move some of `singleton` definitions from headers to cpp files. This is important since this ensures that singleton is only one instance which is generated in one translation unit. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/FastMalloc.cpp: (WTF::MallocCallTracker::singleton): * wtf/Language.cpp: (WTF::observerMap): (WTF::preferredLanguagesOverride): * wtf/Logger.cpp: (WTF::Logger::observers): * wtf/Logger.h: (WTF::Logger::observerLock): (WTF::Logger::observers): Deleted. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::singleton): * wtf/MemoryPressureHandler.h: * wtf/RunLoop.cpp: (WTF::RunLoop::current): * wtf/Threading.cpp: (WTF::Thread::initializeInThread): * wtf/URL.cpp: (WTF::aboutBlankURL): (WTF::aboutSrcDocURL): * wtf/cf/LanguageCF.cpp: (WTF::preferredLanguages): * wtf/cocoa/NSURLExtras.mm: (WTF::rangeOfURLScheme): * wtf/text/LineBreakIteratorPoolICU.cpp: Copied from Source/WTF/wtf/Logger.cpp. (WTF::LineBreakIteratorPool::sharedPool): * wtf/text/LineBreakIteratorPoolICU.h: (WTF::LineBreakIteratorPool::sharedPool): Deleted. * wtf/text/StringView.cpp: * wtf/text/TextBreakIterator.cpp: (WTF::TextBreakIteratorCache::singleton): * wtf/text/TextBreakIterator.h: (WTF::TextBreakIteratorCache::singleton): Deleted. * wtf/threads/Signals.cpp: (WTF::activeThreads): Canonical link: https://commits.webkit.org/228310@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-15 18:40:50 +00:00
class Logger : public ThreadSafeRefCounted<Logger> {
WTF_MAKE_NONCOPYABLE(Logger);
public:
class Observer {
public:
Use "= default" to denote default constructor or destructor https://bugs.webkit.org/show_bug.cgi?id=178528 Rubber-stamped by Andy Estes. Source/WebCore: * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h: * Modules/applepay/ApplePayError.cpp: * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp: * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp: * Modules/applepay/ApplePaySession.cpp: * Modules/applepay/ApplePaySessionPaymentRequest.cpp: * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp: * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp: * Modules/applepay/ApplePayValidateMerchantEvent.cpp: * Modules/applepay/Payment.h: * Modules/applepay/PaymentCoordinatorClient.h: * Modules/credentials/BasicCredential.cpp: * Modules/credentials/FederatedCredential.cpp: * Modules/credentials/NavigatorCredentials.cpp: * Modules/credentials/PasswordCredential.cpp: * Modules/encryptedmedia/CDMClient.h: * Modules/encryptedmedia/legacy/LegacyCDM.cpp: * Modules/encryptedmedia/legacy/LegacyCDM.h: * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h: * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h: * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: * Modules/entriesapi/DOMFileSystem.cpp: * Modules/entriesapi/FileSystemDirectoryReader.cpp: * Modules/entriesapi/FileSystemEntry.cpp: * Modules/fetch/FetchLoaderClient.h: * Modules/gamepad/Gamepad.cpp: * Modules/gamepad/GamepadEvent.h: * Modules/gamepad/deprecated/Gamepad.cpp: [ truncated ] Source/WebCore/PAL: * pal/Logger.h: (PAL::Logger::Observer::~Observer): Deleted. * pal/crypto/gcrypt/CryptoDigestGCrypt.cpp: * pal/system/SleepDisabler.cpp: * pal/system/SystemSleepListener.h: Canonical link: https://commits.webkit.org/194740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-19 23:48:45 +00:00
virtual ~Observer() = default;
// Can be called on any thread.
Web Inspector: Optionally log WebKit log parameters as JSON https://bugs.webkit.org/show_bug.cgi?id=180529 <rdar://problem/35909462> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): New constructor that takes a vector of JSON log values. Concatenate all adjacent strings to make logging cleaner. (Inspector::ConsoleMessage::addToFrontend): Process WebKit logging arguments. (Inspector::ConsoleMessage::scriptState const): * inspector/ConsoleMessage.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::wrapJSONString const): Wrap JSON string log arguments. * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.wrapJSONString): Source/WebCore: * dom/Document.cpp: (WebCore::Document::didLogMessage):Update for API change. Don't check for main thread, that is already done in addConsoleMessage. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Cleanup logging. * html/track/DataCue.cpp: (WebCore::DataCue::toJSONString const): Serialize to JSON string. (WebCore::DataCue::toString const): Deleted. * html/track/DataCue.h: (WTF::LogArgument<WebCore::DataCue>::toString): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toJSON const): Ditto. (WebCore::TextTrackCue::toJSONString const): (WebCore::TextTrackCue::toString const): Deleted. * html/track/TextTrackCue.h: (WTF::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::toJSONString const): Ditto. (WebCore::TextTrackCueGeneric::toString const): Deleted. * html/track/TextTrackCueGeneric.h: (WTF::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/VTTCue.cpp: (WebCore::VTTCue::toJSONString const): Ditto. (WebCore::VTTCue::toString const): Deleted. * html/track/VTTCue.h: (WTF::LogArgument<WebCore::VTTCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toJSONString const): Ditto. (WTF::LogArgument<WebCore::GenericCueData>::toString): (WebCore::GenericCueData::toString const): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Cleanup logging. (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Log the entire cue. (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Cleanup logging. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): Don't log, it isn't interesting and happens frequently. (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): Ditto. * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::toJSONString const): Serialize to JSON string. * platform/graphics/iso/ISOVTTCue.h: (WTF::LogArgument<WebCore::ISOWebVTTCue>::toString): Ditto. Source/WTF: * wtf/Logger.h: (WTF::Logger::log): (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): * wtf/MediaTime.cpp: (WTF::MediaTime::toJSONString const): Serialize to JSON string. * wtf/MediaTime.h: LayoutTests: * inspector/canvas/recording-2d-expected.txt: * inspector/canvas/recording-webgl-expected.txt: * inspector/canvas/recording-webgl-snapshots-expected.txt: Canonical link: https://commits.webkit.org/196579@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 00:41:54 +00:00
virtual void didLogMessage(const WTFLogChannel&, WTFLogLevel, Vector<JSONLogValue>&&) = 0;
};
static Ref<Logger> create(const void* owner)
{
return adoptRef(*new Logger(owner));
}
template<typename... Arguments>
inline void logAlways(WTFLogChannel& channel, UNUSED_FUNCTION const Arguments&... arguments) const
{
#if RELEASE_LOG_DISABLED
// "Standard" WebCore logging goes to stderr, which is captured in layout test output and can generally be a problem
// on some systems, so don't allow it.
UNUSED_PARAM(channel);
#else
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (!willLog(channel, WTFLogLevel::Always))
return;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
log(channel, WTFLogLevel::Always, arguments...);
#endif
}
template<typename... Arguments>
inline void error(WTFLogChannel& channel, const Arguments&... arguments) const
{
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (!willLog(channel, WTFLogLevel::Error))
return;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
log(channel, WTFLogLevel::Error, arguments...);
}
template<typename... Arguments>
inline void warning(WTFLogChannel& channel, const Arguments&... arguments) const
{
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (!willLog(channel, WTFLogLevel::Warning))
return;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
log(channel, WTFLogLevel::Warning, arguments...);
}
template<typename... Arguments>
inline void info(WTFLogChannel& channel, const Arguments&... arguments) const
{
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (!willLog(channel, WTFLogLevel::Info))
return;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
log(channel, WTFLogLevel::Info, arguments...);
}
template<typename... Arguments>
inline void debug(WTFLogChannel& channel, const Arguments&... arguments) const
{
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (!willLog(channel, WTFLogLevel::Debug))
return;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
log(channel, WTFLogLevel::Debug, arguments...);
}
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
template<typename... Arguments>
inline void logAlwaysVerbose(WTFLogChannel& channel, const char* file, const char* function, int line, UNUSED_FUNCTION const Arguments&... arguments) const
{
#if RELEASE_LOG_DISABLED
// "Standard" WebCore logging goes to stderr, which is captured in layout test output and can generally be a problem
// on some systems, so don't allow it.
UNUSED_PARAM(channel);
UNUSED_PARAM(file);
UNUSED_PARAM(function);
UNUSED_PARAM(line);
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
#else
if (!willLog(channel, WTFLogLevel::Always))
return;
logVerbose(channel, WTFLogLevel::Always, file, function, line, arguments...);
#endif
}
template<typename... Arguments>
inline void errorVerbose(WTFLogChannel& channel, const char* file, const char* function, int line, const Arguments&... arguments) const
{
if (!willLog(channel, WTFLogLevel::Error))
return;
logVerbose(channel, WTFLogLevel::Error, file, function, line, arguments...);
}
template<typename... Arguments>
inline void warningVerbose(WTFLogChannel& channel, const char* file, const char* function, int line, const Arguments&... arguments) const
{
if (!willLog(channel, WTFLogLevel::Warning))
return;
logVerbose(channel, WTFLogLevel::Warning, file, function, line, arguments...);
}
template<typename... Arguments>
inline void infoVerbose(WTFLogChannel& channel, const char* file, const char* function, int line, const Arguments&... arguments) const
{
if (!willLog(channel, WTFLogLevel::Info))
return;
logVerbose(channel, WTFLogLevel::Info, file, function, line, arguments...);
}
template<typename... Arguments>
inline void debugVerbose(WTFLogChannel& channel, const char* file, const char* function, int line, const Arguments&... arguments) const
{
if (!willLog(channel, WTFLogLevel::Debug))
return;
logVerbose(channel, WTFLogLevel::Debug, file, function, line, arguments...);
}
inline bool willLog(const WTFLogChannel& channel, WTFLogLevel level) const
{
Web Inspector: Enable WebKit logging configuration and display https://bugs.webkit.org/show_bug.cgi?id=177027 <rdar://problem/33964767> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::messageSourceValue): Inspector::Protocol::Console::ConsoleMessage -> Inspector::Protocol::Console::ChannelSource. * inspector/agents/JSGlobalObjectConsoleAgent.cpp: (Inspector::JSGlobalObjectConsoleAgent::getLoggingChannels): There are no logging channels specific to a JSContext yet, so return an empty channel array. (Inspector::JSGlobalObjectConsoleAgent::setLoggingChannelLevel): No channels, return an error. * inspector/agents/JSGlobalObjectConsoleAgent.h: * inspector/protocol/Console.json: Add ChannelSource, ChannelLevel, and Channel. Add getLoggingChannels and setLoggingChannelLevel. * inspector/scripts/codegen/generator.py: Special case "webrtc"-> "WebRTC". * inspector/scripts/tests/generic/expected/enum-values.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: * runtime/ConsoleTypes.h: Add Media and WebRTC. Source/WebCore: Test: inspector/console/webcore-logging.html * dom/Document.cpp: (WebCore::Document::~Document): Stop observing the logger. (WebCore::Document::logger): Observe the logger. (WebCore::Document::didLogMessage): Forward logging messages to the inspector. * dom/Document.h: * inspector/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): New, return the state of log runtime channels. (WebCore::WebConsoleAgent::setLoggingChannelLevel): New, set the state of a channel. * inspector/WebConsoleAgent.h: * platform/Logging.cpp: (WebCore::getLogChannel): New, get a log channel by name. * platform/Logging.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::Logger::willLog const): Always return true for Always and Error so those messages are always logged to the system. (PAL::Logger::log): Always log Always and Error to the system, but pay strict attention to level and channel state for logging to observers so logging only shows up in the inspector when explicitly enabled by the user. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: Add new localized strings. * UserInterface/Controllers/LogManager.js: (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels. (WI.LogManager.supportsLogChannels): New. (WI.LogManager.prototype.get customLoggingChannels): New. (WI.LogManager.prototype.get logChannelSources): New. * UserInterface/Main.html: * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC. * UserInterface/Models/IssueMessage.js: (WI.IssueMessage): Add media and webrtc. * UserInterface/Models/LoggingChannel.js: Added. (WI.LoggingChannel): (WI.LoggingChannel.fromPayload): (WI.LoggingChannel.prototype.get source): (WI.LoggingChannel.prototype.get level): * UserInterface/Views/LogContentView.js: (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel scope buttons once logging has started. (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary. (WI.LogContentView.prototype._scopeFromMessageSource): New. (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug. (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log message is added. (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons. (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New. (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus for each log channel. Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.mm: (stringForMessageSource): Deal with Media and WebRTC message sources. Tools: Allow new 'dumpJSConsoleLogInStdErr' test header to redirect log console output to stderr. * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestOptions.mm: (TestOptions::TestOptions): * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::runTest): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): LayoutTests: * inspector/console/webcore-logging-expected.txt: Added. * inspector/console/webcore-logging.html: Added. * platform/mac/TestExpectations: Skip new test on Yosemite and ElCapitan. * platform/win/TestExpectations: Skip new test. Canonical link: https://commits.webkit.org/194925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-24 22:00:53 +00:00
if (!m_enabled)
return false;
#if USE(SYSTEMD)
if (channel.state == WTFLogChannelState::Off)
return false;
#endif
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (level <= WTFLogLevel::Error)
Web Inspector: Enable WebKit logging configuration and display https://bugs.webkit.org/show_bug.cgi?id=177027 <rdar://problem/33964767> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::messageSourceValue): Inspector::Protocol::Console::ConsoleMessage -> Inspector::Protocol::Console::ChannelSource. * inspector/agents/JSGlobalObjectConsoleAgent.cpp: (Inspector::JSGlobalObjectConsoleAgent::getLoggingChannels): There are no logging channels specific to a JSContext yet, so return an empty channel array. (Inspector::JSGlobalObjectConsoleAgent::setLoggingChannelLevel): No channels, return an error. * inspector/agents/JSGlobalObjectConsoleAgent.h: * inspector/protocol/Console.json: Add ChannelSource, ChannelLevel, and Channel. Add getLoggingChannels and setLoggingChannelLevel. * inspector/scripts/codegen/generator.py: Special case "webrtc"-> "WebRTC". * inspector/scripts/tests/generic/expected/enum-values.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: * runtime/ConsoleTypes.h: Add Media and WebRTC. Source/WebCore: Test: inspector/console/webcore-logging.html * dom/Document.cpp: (WebCore::Document::~Document): Stop observing the logger. (WebCore::Document::logger): Observe the logger. (WebCore::Document::didLogMessage): Forward logging messages to the inspector. * dom/Document.h: * inspector/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): New, return the state of log runtime channels. (WebCore::WebConsoleAgent::setLoggingChannelLevel): New, set the state of a channel. * inspector/WebConsoleAgent.h: * platform/Logging.cpp: (WebCore::getLogChannel): New, get a log channel by name. * platform/Logging.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::Logger::willLog const): Always return true for Always and Error so those messages are always logged to the system. (PAL::Logger::log): Always log Always and Error to the system, but pay strict attention to level and channel state for logging to observers so logging only shows up in the inspector when explicitly enabled by the user. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: Add new localized strings. * UserInterface/Controllers/LogManager.js: (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels. (WI.LogManager.supportsLogChannels): New. (WI.LogManager.prototype.get customLoggingChannels): New. (WI.LogManager.prototype.get logChannelSources): New. * UserInterface/Main.html: * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC. * UserInterface/Models/IssueMessage.js: (WI.IssueMessage): Add media and webrtc. * UserInterface/Models/LoggingChannel.js: Added. (WI.LoggingChannel): (WI.LoggingChannel.fromPayload): (WI.LoggingChannel.prototype.get source): (WI.LoggingChannel.prototype.get level): * UserInterface/Views/LogContentView.js: (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel scope buttons once logging has started. (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary. (WI.LogContentView.prototype._scopeFromMessageSource): New. (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug. (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log message is added. (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons. (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New. (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus for each log channel. Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.mm: (stringForMessageSource): Deal with Media and WebRTC message sources. Tools: Allow new 'dumpJSConsoleLogInStdErr' test header to redirect log console output to stderr. * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestOptions.mm: (TestOptions::TestOptions): * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::runTest): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): LayoutTests: * inspector/console/webcore-logging-expected.txt: Added. * inspector/console/webcore-logging.html: Added. * platform/mac/TestExpectations: Skip new test on Yosemite and ElCapitan. * platform/win/TestExpectations: Skip new test. Canonical link: https://commits.webkit.org/194925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-24 22:00:53 +00:00
return true;
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (channel.state == WTFLogChannelState::Off || level > channel.level)
return false;
return true;
}
bool enabled() const { return m_enabled; }
void setEnabled(const void* owner, bool enabled)
{
ASSERT(owner == m_owner);
if (owner == m_owner)
m_enabled = enabled;
}
struct LogSiteIdentifier {
LogSiteIdentifier(const char* methodName, const void* objectPtr)
: methodName { methodName }
, objectPtr { reinterpret_cast<uintptr_t>(objectPtr) }
{
}
LogSiteIdentifier(const char* className, const char* methodName, const void* objectPtr)
: className { className }
, methodName { methodName }
, objectPtr { reinterpret_cast<uintptr_t>(objectPtr) }
{
}
WTF_EXPORT_PRIVATE String toString() const;
Continue reducing use of String::format, now focusing on hex: "%p", "%x", etc. https://bugs.webkit.org/show_bug.cgi?id=194752 Reviewed by Daniel Bates. Source/JavaScriptCore: * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::json): Added back the "0x" that was removed when changing this file to use appendUnsignedAsHex instead of "%p". The intent at that time was to keep behavior the same, so let's do that. * parser/Lexer.cpp: (JSC::Lexer<T>::invalidCharacterMessage const): Use makeString and hex instead of String::format and "%04x". Source/WebCore: * Modules/websockets/WebSocket.cpp: Added an include of HexNumber.h. This previously got included because of Logger.h, but that no longer pulls in HexNumber.h. * css/CSSMarkup.cpp: Removed unneeded include of StringBuffer.h. * css/CSSPrimitiveValue.cpp: Ditto. * css/CSSUnicodeRangeValue.cpp: (WebCore::CSSUnicodeRangeValue::customCSSText const): Use makeString and hex instead of String::format and "%x". * html/HTMLMediaElement.h: (WTF::ValueToString<WebCore::TextTrackCue::string): Use a non-template function, TextTrackCure::debugString, so we don't need to use HextNumber.h in a header. * html/canvas/WebGLRenderingContextBase.cpp: (GetErrorString): Use makeString and hex instead of String::format and "%04x". * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::debugString const): Added. Moved string conversion here from HTMLMediaElement.h and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * html/track/TextTrackCue.h: Added TextTrackCue::debugString. * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::formatByteNumber): Use makeString and FormattedNumber::fixedWidth instead of String::format and "%.1f" etc. * platform/cocoa/KeyEventCocoa.mm: (WebCore::keyIdentifierForCharCode): Use the new hex function here instead of the old code that did each of the four characters explicitly. * platform/gamepad/mac/HIDGamepad.cpp: (WebCore::HIDGamepad::HIDGamepad): Use makeString instead of String::format. * platform/graphics/Color.cpp: (WebCore::Color::nameForRenderTreeAsText const): Use hex instead of doing each digit separately. * platform/graphics/FloatPolygon.cpp: (WebCore::FloatPolygonEdge::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * platform/graphics/FloatPolygon.h: Updated for the above. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setName): Use makeString instead of String::format. (WebCore::GraphicsLayerCA::recursiveCommitChanges): DItto. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): Ditto. (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Ditto. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode): Ditto. * platform/libwpe/PlatformKeyboardEventLibWPE.cpp: (WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode): Ditto. * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoder::makeElement): Ditto. (WebCore::GStreamerVideoEncoder::InitEncode): Ditto. * platform/text/TextCodecLatin1.cpp: Removed unneeded include of StringBuffer.h and "using namespace WTF". * platform/win/GDIObjectCounter.cpp: (WebCore::GDIObjectCounter::GDIObjectCounter): Use makeString instead of String::format. * platform/win/KeyEventWin.cpp: (WebCore::keyIdentifierForWindowsKeyCode): Ditto. * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * rendering/FloatingObjects.h: Updated for the above. * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * rendering/RenderFragmentContainer.h: Updated for the above. * rendering/RenderFragmentedFlow.h: Ditto. * testing/Internals.cpp: (WebCore::Internals::address): Use makeString instead of String::format. Source/WebCore/PAL: * pal/FileSizeFormatter.cpp: (fileSizeDescription): Use makeString instead of String::format. Source/WebKit: * Platform/IPC/win/ConnectionWin.cpp: (IPC::Connection::createServerAndClientIdentifiers): Use makeString instead of String::format. * Shared/win/WebEventFactory.cpp: (WebKit::keyIdentifierFromEvent): Ditto. * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): Use hex instead of String::format. * UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::loggingString const): Ditto. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::loggingString): Added a "0x". * UIProcess/gtk/InputMethodFilter.cpp: (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting): Use makeString and hex instead of String::format and "%x". (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting): Ditto. Source/WTF: * WTF.xcodeproj/project.pbxproj: Added HexNumber.cpp and Logger.cpp. * wtf/CMakeLists.txt: Ditto. * wtf/HexNumber.cpp: Added. (WTF::Internal::appendHex): Non-inline, non-template hex formatting logic. * wtf/HexNumber.h: (WTF::Internal::appendHex): Refactored main logic of appendUnsignedAsHex and appendUnsignedAsHexFixedSize so they can be reused in a function named hex for use with StringTypeAdapter. (WTF::appendUnsignedAsHex): Ditto. (WTF::appendUnsignedAsHexFixedSize): Ditto. (WTF::hex): Added. (WTF::StringTypeAdapter<HexNumberBuffer>): Added. * wtf/Logger.cpp: Added. (WTF::Logger::LogSiteIdentifier::toString const): Made this a non-template function and moved it here so that we don't need to include HexNumber.h in Logger.h. Since HexNumber.h has substantial code in it, it's good if we don't include it in any other headers. * wtf/Logger.h: (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): Changed to call a non-template function, LogSiteIdentifier::toString. * wtf/text/StringConcatenateNumbers.h: Replaced overloaded writeTo functions with function templates and used StringImpl::copyCharacters instead of hand-written loops. Canonical link: https://commits.webkit.org/209182@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-19 02:04:33 +00:00
const char* className { nullptr };
const char* methodName { nullptr };
const uintptr_t objectPtr { 0 };
};
static inline void addObserver(Observer& observer)
{
Use CheckedLock more in cases where we try-lock https://bugs.webkit.org/show_bug.cgi?id=226056 Reviewed by Alex Christensen. Use CheckedLock more in cases where we try-lock to benefit from Clang Thread Safety Analysis. Source/WebCore: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::cancelAndHoldAtTime): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForFrameRange): (WebCore::AudioParamTimeline::hasValues const): * Modules/webaudio/AudioParamTimeline.h: * platform/audio/AudioDestination.h: (WebCore::AudioDestination::WTF_GUARDED_BY_LOCK): (WebCore::AudioDestination::AudioDestination): (WebCore::AudioDestination::clearCallback): (WebCore::AudioDestination::callRenderCallback): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Source/WebKit: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::completedDecoding): (WebKit::LibWebRTCCodecs::releaseEncoder): (WebKit::LibWebRTCCodecs::registerEncodeFrameCallback): (WebKit::LibWebRTCCodecs::completedEncoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::Decoder::WTF_GUARDED_BY_LOCK): (WebKit::LibWebRTCCodecs::Encoder::WTF_GUARDED_BY_LOCK): Source/WTF: * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::addObserver): (WTF::Logger::removeObserver): (WTF::Logger::log): (WTF::Logger::logVerbose): (WTF::Logger::WTF_RETURNS_LOCK): Canonical link: https://commits.webkit.org/238013@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 19:24:05 +00:00
Locker locker { observerLock() };
observers().append(observer);
}
static inline void removeObserver(Observer& observer)
{
Use CheckedLock more in cases where we try-lock https://bugs.webkit.org/show_bug.cgi?id=226056 Reviewed by Alex Christensen. Use CheckedLock more in cases where we try-lock to benefit from Clang Thread Safety Analysis. Source/WebCore: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::cancelAndHoldAtTime): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForFrameRange): (WebCore::AudioParamTimeline::hasValues const): * Modules/webaudio/AudioParamTimeline.h: * platform/audio/AudioDestination.h: (WebCore::AudioDestination::WTF_GUARDED_BY_LOCK): (WebCore::AudioDestination::AudioDestination): (WebCore::AudioDestination::clearCallback): (WebCore::AudioDestination::callRenderCallback): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Source/WebKit: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::completedDecoding): (WebKit::LibWebRTCCodecs::releaseEncoder): (WebKit::LibWebRTCCodecs::registerEncodeFrameCallback): (WebKit::LibWebRTCCodecs::completedEncoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::Decoder::WTF_GUARDED_BY_LOCK): (WebKit::LibWebRTCCodecs::Encoder::WTF_GUARDED_BY_LOCK): Source/WTF: * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::addObserver): (WTF::Logger::removeObserver): (WTF::Logger::log): (WTF::Logger::logVerbose): (WTF::Logger::WTF_RETURNS_LOCK): Canonical link: https://commits.webkit.org/238013@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 19:24:05 +00:00
Locker locker { observerLock() };
observers().removeFirstMatching([&observer](auto anObserver) {
return &anObserver.get() == &observer;
});
}
private:
Add AggregateLogger, a Logger specialization for singleton classes. https://bugs.webkit.org/show_bug.cgi?id=195644 Reviewed by Eric Carlson. Source/WebCore: Convert debug logging over to release logging through the use of AggregateLogger. * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::client const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager): (WebCore::PlatformMediaSessionManager::beginInterruption): (WebCore::PlatformMediaSessionManager::endInterruption): (WebCore::PlatformMediaSessionManager::addSession): (WebCore::PlatformMediaSessionManager::removeSession): (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback): (WebCore::PlatformMediaSessionManager::setCurrentSession): (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const): (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const): (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const): (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const): (WebCore::PlatformMediaSessionManager::logChannel const): * platform/audio/PlatformMediaSessionManager.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (MediaSessionManagerCocoa::updateSessionState): (MediaSessionManagerCocoa::sessionWillBeginPlayback): (MediaSessionManagerCocoa::removeSession): (MediaSessionManagerCocoa::sessionWillEndPlayback): (MediaSessionManagerCocoa::clientCharacteristicsChanged): (MediaSessionManagerCocoa::updateNowPlayingInfo): * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Source/WTF: Add a new class, AggregateLogger, which will log messages to each of its aggregated loggers. Drive-by fixes: allow "const void*" to be directly logged by converting the pointer to a hex string. * WTF.xcodeproj/project.pbxproj: * wtf/AggregateLogger.h: Added. (WTF::AggregateLogger::create): (WTF::AggregateLogger::addLogger): (WTF::AggregateLogger::removeLogger): (WTF::AggregateLogger::logAlways const): (WTF::AggregateLogger::error const): (WTF::AggregateLogger::warning const): (WTF::AggregateLogger::info const): (WTF::AggregateLogger::debug const): (WTF::AggregateLogger::willLog const): (WTF::AggregateLogger::AggregateLogger): (WTF::AggregateLogger::log const): * wtf/CMakeLists.h: * wtf/Logger.cpp: (WTF::>::toString): * wtf/Logger.h: Canonical link: https://commits.webkit.org/209992@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-13 20:18:08 +00:00
friend class AggregateLogger;
Logger(const void* owner)
: m_owner { owner }
{
}
template<typename... Argument>
static inline void log(WTFLogChannel& channel, WTFLogLevel level, const Argument&... arguments)
{
Remove StringBuilder::appendLiteral https://bugs.webkit.org/show_bug.cgi?id=226137 Reviewed by Chris Dumez. Source/JavaScriptCore: * API/tests/PingPongStackOverflowTest.cpp: (PingPongStackOverflowObject_hasInstance): Use append instead of appendLiteral. * bindings/ScriptFunctionCall.cpp: (Deprecated::ScriptCallArgumentHandler::appendArgument): Remove unnecessary cast from const char* to String, which defeats optimization and has no benefit. * bytecompiler/NodesCodegen.cpp: (JSC::ArrayPatternNode::toString const): Use append instead of appendLiteral. (JSC::RestParameterNode::toString const): Ditto. * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::json): Use append instead of appendLiteral. Removed unnecesary use of appendQuotedJSONString to append the result of snapshotTypeToString and edgeTypeToString, which return a const char* that never contains characters that require special quoting consideration, so can be appended efficiently with the normal append function. * inspector/agents/InspectorAuditAgent.cpp: (Inspector::InspectorAuditAgent::run): Use makeString instead of StringBuilder. * inspector/agents/InspectorConsoleAgent.cpp: Use auto for the result of makeString. * jsc.cpp: Use appned instead of appendLiteral. * parser/ParserArena.cpp: (JSC::IdentifierArena::makePrivateIdentifier): Use auto for the result of makeString. * runtime/ConsoleClient.cpp: (JSC::ConsoleClient::printConsoleMessage): Use append instead of appendLiteral. Also use variadic append when practical for better efficiency. (JSC::ConsoleClient::printConsoleMessageWithArguments): Ditto. * runtime/DateConversion.cpp: (JSC::formatDateTime): Ditto. * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::sanitizedToString): Use makeString instead of StringBuilder. * runtime/ExceptionHelpers.cpp: (JSC::notAFunctionSourceAppender): Use append instead of appendLiteral. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): Ditto. * runtime/IntlNumberFormat.cpp: (JSC::IntlNumberFormat::initializeNumberFormat): Ditto. * runtime/JSCustomGetterFunction.cpp: (JSC::JSCustomGetterFunction::create): Use auto and cut down on reference count churn by using passing the StringImpl to makeString. * runtime/JSCustomSetterFunction.cpp: (JSC::JSCustomSetterFunction::create): Ditto. * runtime/JSGlobalObjectFunctions.cpp: Use more const and use variadic append for better efficiency. * runtime/JSONObject.cpp: (JSC::Stringifier::appendStringifiedValue): Use append instead of appendLiteral. (JSC::Stringifier::Holder::appendNextProperty): Ditto. * runtime/JSStringJoiner.h: Deleted unused appendLiteral function. Unrelated to StringBuilder::appendLiteral, but dead code. * runtime/Options.cpp: (JSC::Options::dumpOption): Use append instead of appendLiteral. * runtime/RegExpPrototype.cpp: (JSC::appendLineTerminatorEscape<UChar>): Ditto. * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::reportTopFunctions): Use auto for the result of makeString. (JSC::SamplingProfiler::reportTopBytecodes): Ditto. * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::typeInformationForExpressionAtOffset): Use append instead of appendLiteral. * runtime/TypeSet.cpp: (JSC::TypeSet::dumpTypes const): Use append instead of appendLiteral. (JSC::TypeSet::toJSONString const): Ditto. (JSC::StructureShape::propertyHash): Ditto. (JSC::StructureShape::toJSONString const): Ditto. Source/WebCore: * Modules/fetch/FetchBodyConsumer.cpp: (WebCore::packageFormData): Use auto for the result of makeString. * Modules/indexeddb/IDBKeyData.cpp: (WebCore::IDBKeyData::loggingString const): Use append instead of appendLiteral. * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use auto for the result of makeString. * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::buildPreIndexStatement): Use makeString instead of StringBuilder. (WebCore::IDBServer::buildIndexStatement): Ditto. (WebCore::IDBServer::buildObjectStoreStatement): Ditto. * Modules/websockets/WebSocket.cpp: (WebCore::encodeProtocolString): Use append instead of appendLiteral. * Modules/websockets/WebSocketExtensionDispatcher.cpp: (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto. * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage const): Use makeString instead of StringBuilder. (WebCore::WebSocketHandshake::clientHandshakeRequest const): Tweak to match the function above more closely, and use ASCIILiteral. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (formatForDebugger): Use makeString instead of StringBuilder. * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::prefixTreeVertexToString): Use append instead of appendLiteral. * css/CSSBasicShapes.cpp: (WebCore::buildCircleString): Ditto. (WebCore::buildEllipseString): Ditto. (WebCore::buildPathString): Ditto. (WebCore::buildPolygonString): Ditto. (WebCore::buildInsetString): Ditto. * css/CSSGradientValue.cpp: (WebCore::CSSLinearGradientValue::customCSSText const): Ditto. (WebCore::CSSRadialGradientValue::customCSSText const): Ditto. (WebCore::CSSConicGradientValue::customCSSText const): Ditto. * css/CSSGridIntegerRepeatValue.cpp: (WebCore::CSSGridIntegerRepeatValue::customCSSText const): Use makeString instead of StringBuilder. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::customCSSText const): Use append instead of appendLiteral. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::cssText const): Use makeString instead of StringBuilder. * css/CSSKeyframeRule.cpp: (WebCore::StyleRuleKeyframe::cssText const): Ditto. * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssText const): Use variadic append. * css/CSSLineBoxContainValue.cpp: (WebCore::CSSLineBoxContainValue::customCSSText const): Use append instead of appendLiteral. * css/CSSNamespaceRule.cpp: (WebCore::CSSNamespaceRule::cssText const): Ditto. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::cssText const): Use makeString instead of StringBuilder. * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::customCSSText const): Ditto. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): Use append instead of appendLiteral. * css/CSSSelector.cpp: (WebCore::appendLangArgumentList): Use variadic append. (WebCore::CSSSelector::selectorText const): Ditto. Also use append instead of appendLiteral and make some improvements to cut down on allocations a little. * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::buildSelectorsText const): Use append instead of appendLiteral. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::CSSStyleSheet): Moved more of the data member initialization to the class definition. (WebCore::CSSStyleSheet::addRule): Use makeString instead of StringBuilder. * css/CSSStyleSheet.h: Moved initialization here. * css/CSSTimingFunctionValue.cpp: (WebCore::CSSStepsTimingFunctionValue::customCSSText const): Use makeString instead of StringBuilder. (WebCore::CSSSpringTimingFunctionValue::customCSSText const): Ditto. * css/MediaList.cpp: (WebCore::MediaQuerySet::mediaText const): Use append instead of appendLiteral. * css/MediaQuery.cpp: (WebCore::MediaQuery::serialize const): Ditto. * css/MediaQueryExpression.cpp: (WebCore::MediaQueryExpression::serialize const): Use makeString instead of StringBuilder. * css/StyleProperties.cpp: (WebCore::StyleProperties::getLayeredShorthandValue const): Use append instead of appendLiteral. * css/parser/CSSParserToken.cpp: (WebCore::CSSParserToken::serialize const): Removed a lot of unnecessary braces. Use variadic append and append instead of appendLiteral. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Use auto for the result of makeString. * dom/Element.cpp: (WebCore::appendAttributes): Use variadic append and append instead of appendLiteral. * dom/SecurityContext.cpp: (WebCore::SecurityContext::parseSandboxPolicy): Ditto. * editing/HTMLInterchange.cpp: (WebCore::convertHTMLTextToInterchangeFormat): Ditto. * editing/TextIterator.cpp: (WebCore::createSearcher): Use auto for the result of makeString. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): Use append instead of appendLiteral. (WebCore::StyledMarkupAccumulator::appendStartTag): Ditto. (WebCore::urlToMarkup): Ditto. * html/FormController.cpp: (WebCore::recordFormStructure): Ditto. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::reportValidity): Use auto for the result of makeString. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::validateInteractively): Ditto. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::completeURLsInAttributeValue const): Use append insteaed of appendLiteral. * html/MediaElementSession.cpp: (WebCore::restrictionNames): Use auto for the result of makeString. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::getUniformLocation): Ditto. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Ditto. * html/parser/XSSAuditorDelegate.cpp: (WebCore::buildConsoleError): Use makeString instead of StringBuilder. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::rebuildDisplayTree): Ditto. * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::expressionForEvaluatingCommand): Use append instead of appendLiteral. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::drawElementTitle): Use auto for the result of makeString. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::addRule): Use append instead of appendLiteral. * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): Use makeString instead of StringBuilder. * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): Use auto for the result of makeString. (WebCore::WebConsoleAgent::didFailLoading): Ditto. * loader/MixedContentChecker.cpp: (WebCore::logWarning): Ditto (WebCore::MixedContentChecker::checkFormForMixedContent): Ditto * loader/PrivateClickMeasurement.cpp: (WebCore::makeValidURL): Added. Used for various cases below that all construct URLs in the same way with the same kinds of checks. Use makeString here instead of StringBuilder. (WebCore::attributionReportURL): Call makeValidURL. (WebCore::PrivateClickMeasurement::tokenSignatureURL const): Ditto. (WebCore::PrivateClickMeasurement::tokenPublicKeyURL const): Ditto. * loader/ResourceLoadStatistics.cpp: (WebCore::appendBoolean): Use append instead of appendLiteral. (WebCore::appendHashSet): Ditto. (WebCore::appendNavigatorAPIOptionSet): Ditto. (WebCore::appendScreenAPIOptionSet): Ditto. (WebCore::ResourceLoadStatistics::toString const): Ditto. * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Use auto for the result of makeString. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): Ditto. * page/Frame.cpp: (WebCore::createRegExpForLabels): Use append instead of appendLiteral. Also tweak coding style a bit. * page/FrameView.cpp: (WebCore::FrameView::logMockScrollAnimatorMessage const): Use makeString instead of StringBuilder. * page/PageSerializer.cpp: (WebCore::PageSerializer::SerializerMarkupAccumulator::appendStartTag): Use append instead of appendLiteral. (WebCore::PageSerializer::serializeCSSStyleSheet): Ditto. (WebCore::PageSerializer::urlForBlankFrame): Use auto for the result of makeString. * page/PerformanceLoggingClient.cpp: (WebCore::PerformanceLoggingClient::synchronousScrollingReasonsAsString): Use makeString instead of StringBuilder. * page/cocoa/ResourceUsageOverlayCocoa.mm: (WebCore::ResourceUsageOverlay::platformDraw): Use auto for the result of makeString. * page/csp/ContentSecurityPolicy.cpp: (WebCore::consoleMessageForViolation): Use makeString instsead of StringBuilder. (WebCore::ContentSecurityPolicy::allowRunningOrDisplayingInsecureContent): Ditto. (WebCore::ContentSecurityPolicy::reportInvalidDirectiveValueCharacter const): Get rid of local variable for result of makeString. (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter const): Ditto. (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression const): Ditto. * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): Get rid of local variable for result of makeString. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText): Use makeString instead of StringBulder. * platform/Decimal.cpp: (WebCore::Decimal::toString const): Use append instead of appendLiteral. * platform/animation/TimingFunction.cpp: (WebCore::TimingFunction::createFromCSSText): Use makeString instead of StringBuilder. * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation): Use auto for the result of makeString. * platform/glib/UserAgentGLib.cpp: (WebCore::buildUserAgentString): Use append instead of appendLiteral. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Use append instead of appendLiteral. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): Got rid of local variable for result of makeString. (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Use auto for result of makeString. * platform/graphics/ca/TileController.cpp: (WebCore::TileController::tileRevalidationTimerFired): Update to use OptionSet. * platform/graphics/ca/TileGrid.cpp: (WebCore::validationPolicyAsString): Use OptionSet. (WebCore::TileGrid::setNeedsDisplayInRect): Use auto for iterator and range-based for loop. (WebCore::TileGrid::updateTileLayerProperties): Ditto. (WebCore::TileGrid::blankPixelCount const): Ditto. (WebCore::TileGrid::removeTiles): Use HashCountedSet. (WebCore::TileGrid::revalidateTiles): Use OptionSet. (WebCore::TileGrid::retainedTileBackingStoreMemory const): Use ranged-based for loop. (WebCore::TileGrid::drawTileMapContents const): Use range-based for loop and use writeIntegerToBuffer instead of String::number. (WebCore::TileGrid::platformCALayerRepaintCount const): Use HashCountedSet. (WebCore::TileGrid::platformCALayerIncrementRepaintCount): Ditto. This cuts us down from 3 hash table lookups to 1. (WebCore::TileGrid::removeUnparentedTilesNow): Removed local variable to make code a little tighter. * platform/graphics/ca/TileGrid.h: Use OptionSet and HashCountedSet. Removed some type names. * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: (WebCore::PlatformCAFilters::setFiltersOnLayer): Use auto for reuslt of makeString. * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::drawText): Ditto. * platform/mock/ScrollAnimatorMock.cpp: (WebCore::ScrollAnimatorMock::scrollbarPrefix const): Added helper function for use below. (WebCore::ScrollAnimatorMock::mouseEnteredScrollbar const): Use makeString instead of StringBuilder. (WebCore::ScrollAnimatorMock::mouseExitedScrollbar const): Ditto. (WebCore::ScrollAnimatorMock::mouseIsDownInScrollbar const): Ditto. * platform/mock/ScrollAnimatorMock.h: Ditto. * platform/network/ProxyServer.cpp: (WebCore::appendProxyServerString): Use append instead of appendLiteral. (WebCore::toString): Ditto. * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::sanitizeSuggestedFilename): Get rid of local variable with result of maekString in it. * platform/playstation/UserAgentPlayStation.cpp: (WebCore::platformForUAString): Deleted. No need for a global variable to hold the result of something called only once. (WebCore::platformVersionForUAString): Ditto. (WebCore::buildUserAgentString): Deleted. (WebCore::standardUserAgentStatic): Moved the logic from buildUserAgentString here, using makeString instead of StringBuilder. * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::open): Use auto for result of makeString. * platform/sql/SQLiteFileSystem.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): Ditto. * platform/text/DateTimeFormat.cpp: (WebCore::DateTimeFormat::quoteAndAppendLiteral): Use append instead of appendLiteral and StringView::substring instead of String::substring. * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::replaceNewlinesWithWindowsStyleNewlines): Use append instead of appendLiteral. * platform/win/UserAgentWin.cpp: (WebCore::standardUserAgent): Use makeString instead of StringBuildeer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::name const): Ditto. (WebCore::RenderLayer::debugDescription const): Ditto. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::logLayerInfo): Use append instead of appendLiteral. * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): Ditto. (WebCore::nodePosition): Ditto. * svg/SVGPathStringBuilder.cpp: (WebCore::SVGPathStringBuilder::moveTo): Ditto. (WebCore::SVGPathStringBuilder::lineTo): Ditto. (WebCore::SVGPathStringBuilder::lineToHorizontal): Ditto. (WebCore::SVGPathStringBuilder::lineToVertical): Ditto. (WebCore::SVGPathStringBuilder::curveToCubic): Ditto. (WebCore::SVGPathStringBuilder::curveToCubicSmooth): Ditto. (WebCore::SVGPathStringBuilder::curveToQuadratic): Ditto. (WebCore::SVGPathStringBuilder::curveToQuadraticSmooth): Ditto. (WebCore::SVGPathStringBuilder::arcTo): Ditto. (WebCore::SVGPathStringBuilder::closePath): Ditto. * testing/Internals.cpp: (WebCore::Internals::dumpMarkerRects): Ditto. (WebCore::appendOffsets): (WebCore::Internals::scrollSnapOffsets): Ditto. * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::validateWorkerResponse): Use auto for reuslt of makeString. Source/WebKit: * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList): Use append instead of appendLiteral. (WebKit::domainsToString): Ditto. (WebKit::buildList): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics): Ditto. (WebKit::appendBoolean): Ditto. (WebKit::appendNextEntry): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::appendSubStatisticList const): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics): Ditto. * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: Ditto. (WebKit::domainsToString): Ditto. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::create): Moved this here from the header. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::toString const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::encode const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::decode): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::operator== const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::toString const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::encode const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::decode): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::operator< const): Ditto. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Moved member functions of the nested structures into the implementation file and fixed the indentation of the structures to indicate the nesting. * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::continueCheckingRequest): Do not use a local variable for the reuslt of makeString. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::newTestingSession): Ditto. * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::dumpContentsToFile): Use append instead of appendLiteral * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::asJSON const): Ditto. * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::makeVersionedDirectoryPath): Do not use a local variable for the result of makeString. * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::buildAcceptLanguages): Use append instead of appendLiteral. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::acceptedExtensions const): Ditto. * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: (WebKit::NetworkMDNSRegister::registerMDNSName): Use auto for the result of makeString. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::writeHeaders): Ditto. * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::initializeSandboxParameters): Do not use a local variable for the result of makeString. Also, take advantage of the support for concatenating an NSString instead of converting it to a WTF::String. * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): Use ASCIILiteral and remove explicit conversion to String. * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewRunJavaScriptCallback): Use append instead of appendLiteral. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::fileCanBeAcceptedForUpload): Use auto for result of makeString. * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Use makeString instead of StringBuilder. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::requestStorageSpace): Use auto for result of makeString. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::loggingString): Use append instead of appendLiteral. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): Use auto for result of makeString. (WebKit::WebProcessPool::startMemorySampler): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::dumpHistoryItem): Use append instead of appendLiteral. (WebKit::WebPage::getContentsAsString): Ditto. Source/WebKitLegacy: * WebCoreSupport/NetworkStorageSessionMap.cpp: (NetworkStorageSessionMap::switchToNewTestingSession): Do not use local for return value of makeString. Source/WebKitLegacy/mac: * WebView/WebHTMLRepresentation.mm: (regExpForLabels): Use append instead of appendLiteral. Also imrpove local variable names a bit. Source/WebKitLegacy/win: * AccessibleBase.cpp: (AccessibleBase::get_accKeyboardShortcut): Use append instead of appnedLiteral. * WebView.cpp: Ditto. Source/WTF: The optimization done by appendLiteral has minimal value and is something we can do without. It does not cut down the number of allocations, which is the main cost of the StringBuilder class. Getting rid of the differently named appendLiteral improves the design of the StringBuilder class for callers. Our goal is to get as close as possible to a single append function. If we decide we need an optimization for literals, we can come up with a different way that is compatible with append. For example, we could assume that any char array is a literal and check that at compile time in StringConcatenate; that optimization would work for both makeString and StringBuilder. Or we could use a strategy like ASCIILiteral. * wtf/FileSystem.cpp: (WTF::FileSystemImpl::encodeForFileName): Streamline logic, and use variadic append to make this more efficient. * wtf/JSONValues.cpp: (WTF::JSONImpl::Value::escapeString): Use append instead of appendLiteral. (WTF::JSONImpl::Value::writeJSON const): Ditto. * wtf/Logger.h: (WTF::Logger::log): Use auto for result of makeString. (WTF::Logger::logVerbose): Ditto. * wtf/MediaTime.cpp: (WTF::MediaTime::toString const): Use makeString instead of StringBuilder. * wtf/text/IntegerToStringConversion.h: Made lengthOfIntegerAsString a constexpr function so we can use it to compute the required size of arrays for conversion. Added using for both lengthOfIntegerAsString and writeIntegerToBuffer so we can use them without the WTF prefix as is customary for functions in WTF. * wtf/text/StringBuilder.h: (WTF::StringBuilder::appendLiteral): Deleted. * wtf/text/StringConcatenate.h: Added support for appending StringImpl&, StringImpl*, AtomStringImpl&, and AtomStringImpl*. Tools: * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Use append instead of appendLiteral. * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::createCommand): Use makeString instead of StringBuilder. * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Made lots of fixes to code inside #if TEST_OUTPUT, which hasn't compiled in a long time. Still not 100% there, but closer. * TestWebKitAPI/Tests/WebCore/TextCodec.cpp: (TestWebKitAPI::testDecode): Use append instead of appendLiteral. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::helpText const): Ditto. Canonical link: https://commits.webkit.org/238091@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-24 21:51:47 +00:00
auto logMessage = makeString(LogArgument<Argument>::toString(arguments)...);
#if RELEASE_LOG_DISABLED
WTFLog(&channel, "%s", logMessage.utf8().data());
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
#endif
#if USE(OS_LOG) && !RELEASE_LOG_DISABLED
os_log(channel.osLogChannel, "%{public}s", logMessage.utf8().data());
#endif
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
#if USE(JOURNALD) && !RELEASE_LOG_DISABLED
sd_journal_send("WEBKIT_SUBSYSTEM=%s", channel.subsystem, "WEBKIT_CHANNEL=%s", channel.name, "MESSAGE=%s", logMessage.utf8().data(), nullptr);
#endif
if (channel.state == WTFLogChannelState::Off || level > channel.level)
return;
Use CheckedLock more in cases where we try-lock https://bugs.webkit.org/show_bug.cgi?id=226056 Reviewed by Alex Christensen. Use CheckedLock more in cases where we try-lock to benefit from Clang Thread Safety Analysis. Source/WebCore: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::cancelAndHoldAtTime): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForFrameRange): (WebCore::AudioParamTimeline::hasValues const): * Modules/webaudio/AudioParamTimeline.h: * platform/audio/AudioDestination.h: (WebCore::AudioDestination::WTF_GUARDED_BY_LOCK): (WebCore::AudioDestination::AudioDestination): (WebCore::AudioDestination::clearCallback): (WebCore::AudioDestination::callRenderCallback): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Source/WebKit: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::completedDecoding): (WebKit::LibWebRTCCodecs::releaseEncoder): (WebKit::LibWebRTCCodecs::registerEncodeFrameCallback): (WebKit::LibWebRTCCodecs::completedEncoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::Decoder::WTF_GUARDED_BY_LOCK): (WebKit::LibWebRTCCodecs::Encoder::WTF_GUARDED_BY_LOCK): Source/WTF: * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::addObserver): (WTF::Logger::removeObserver): (WTF::Logger::log): (WTF::Logger::logVerbose): (WTF::Logger::WTF_RETURNS_LOCK): Canonical link: https://commits.webkit.org/238013@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 19:24:05 +00:00
if (!observerLock().tryLock())
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
return;
Drop WTF::tryHoldLock() as it is incompatible with Clang Thread Safety Analysis https://bugs.webkit.org/show_bug.cgi?id=226145 Reviewed by Darin Adler. Drop WTF::tryHoldLock() as it is incompatible with Clang Thread Safety Analysis. Instead, use the following pattern which is supported: ``` if (lock.tryLock()) { Locker locker { AdoptLock, lock }; // ... } ``` Source/JavaScriptCore: * heap/Heap.cpp: (JSC::Heap::resumeThePeriphery): * runtime/VMTraps.cpp: (JSC::VMTraps::tryInstallTrapBreakpoints): Source/WebCore: * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::process): * Modules/webaudio/AudioWorkletNode.cpp: (WebCore::AudioWorkletNode::process): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::process): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::process): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::process): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::process): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::process): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::process): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::process): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::process): * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::purgeTimerFired): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::provideInput): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/mac/WebAudioSourceProviderCocoa.mm: (WebCore::WebAudioSourceProviderCocoa::provideInput): * workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::stop): Source/WTF: * wtf/CheckedLock.h: * wtf/Lock.h: * wtf/Locker.h: (WTF::Locker::Locker): Canonical link: https://commits.webkit.org/238062@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-23 19:55:32 +00:00
Locker locker { AdoptLock, observerLock() };
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
for (Observer& observer : observers())
observer.didLogMessage(channel, level, { ConsoleLogValue<Argument>::toValue(arguments)... });
}
template<typename... Argument>
static inline void logVerbose(WTFLogChannel& channel, WTFLogLevel level, const char* file, const char* function, int line, const Argument&... arguments)
{
Remove StringBuilder::appendLiteral https://bugs.webkit.org/show_bug.cgi?id=226137 Reviewed by Chris Dumez. Source/JavaScriptCore: * API/tests/PingPongStackOverflowTest.cpp: (PingPongStackOverflowObject_hasInstance): Use append instead of appendLiteral. * bindings/ScriptFunctionCall.cpp: (Deprecated::ScriptCallArgumentHandler::appendArgument): Remove unnecessary cast from const char* to String, which defeats optimization and has no benefit. * bytecompiler/NodesCodegen.cpp: (JSC::ArrayPatternNode::toString const): Use append instead of appendLiteral. (JSC::RestParameterNode::toString const): Ditto. * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::json): Use append instead of appendLiteral. Removed unnecesary use of appendQuotedJSONString to append the result of snapshotTypeToString and edgeTypeToString, which return a const char* that never contains characters that require special quoting consideration, so can be appended efficiently with the normal append function. * inspector/agents/InspectorAuditAgent.cpp: (Inspector::InspectorAuditAgent::run): Use makeString instead of StringBuilder. * inspector/agents/InspectorConsoleAgent.cpp: Use auto for the result of makeString. * jsc.cpp: Use appned instead of appendLiteral. * parser/ParserArena.cpp: (JSC::IdentifierArena::makePrivateIdentifier): Use auto for the result of makeString. * runtime/ConsoleClient.cpp: (JSC::ConsoleClient::printConsoleMessage): Use append instead of appendLiteral. Also use variadic append when practical for better efficiency. (JSC::ConsoleClient::printConsoleMessageWithArguments): Ditto. * runtime/DateConversion.cpp: (JSC::formatDateTime): Ditto. * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::sanitizedToString): Use makeString instead of StringBuilder. * runtime/ExceptionHelpers.cpp: (JSC::notAFunctionSourceAppender): Use append instead of appendLiteral. * runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::initializeDateTimeFormat): Ditto. * runtime/IntlNumberFormat.cpp: (JSC::IntlNumberFormat::initializeNumberFormat): Ditto. * runtime/JSCustomGetterFunction.cpp: (JSC::JSCustomGetterFunction::create): Use auto and cut down on reference count churn by using passing the StringImpl to makeString. * runtime/JSCustomSetterFunction.cpp: (JSC::JSCustomSetterFunction::create): Ditto. * runtime/JSGlobalObjectFunctions.cpp: Use more const and use variadic append for better efficiency. * runtime/JSONObject.cpp: (JSC::Stringifier::appendStringifiedValue): Use append instead of appendLiteral. (JSC::Stringifier::Holder::appendNextProperty): Ditto. * runtime/JSStringJoiner.h: Deleted unused appendLiteral function. Unrelated to StringBuilder::appendLiteral, but dead code. * runtime/Options.cpp: (JSC::Options::dumpOption): Use append instead of appendLiteral. * runtime/RegExpPrototype.cpp: (JSC::appendLineTerminatorEscape<UChar>): Ditto. * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::reportTopFunctions): Use auto for the result of makeString. (JSC::SamplingProfiler::reportTopBytecodes): Ditto. * runtime/TypeProfiler.cpp: (JSC::TypeProfiler::typeInformationForExpressionAtOffset): Use append instead of appendLiteral. * runtime/TypeSet.cpp: (JSC::TypeSet::dumpTypes const): Use append instead of appendLiteral. (JSC::TypeSet::toJSONString const): Ditto. (JSC::StructureShape::propertyHash): Ditto. (JSC::StructureShape::toJSONString const): Ditto. Source/WebCore: * Modules/fetch/FetchBodyConsumer.cpp: (WebCore::packageFormData): Use auto for the result of makeString. * Modules/indexeddb/IDBKeyData.cpp: (WebCore::IDBKeyData::loggingString const): Use append instead of appendLiteral. * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use auto for the result of makeString. * Modules/indexeddb/server/SQLiteIDBCursor.cpp: (WebCore::IDBServer::buildPreIndexStatement): Use makeString instead of StringBuilder. (WebCore::IDBServer::buildIndexStatement): Ditto. (WebCore::IDBServer::buildObjectStoreStatement): Ditto. * Modules/websockets/WebSocket.cpp: (WebCore::encodeProtocolString): Use append instead of appendLiteral. * Modules/websockets/WebSocketExtensionDispatcher.cpp: (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto. * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage const): Use makeString instead of StringBuilder. (WebCore::WebSocketHandshake::clientHandshakeRequest const): Tweak to match the function above more closely, and use ASCIILiteral. * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (formatForDebugger): Use makeString instead of StringBuilder. * contentextensions/CombinedURLFilters.cpp: (WebCore::ContentExtensions::prefixTreeVertexToString): Use append instead of appendLiteral. * css/CSSBasicShapes.cpp: (WebCore::buildCircleString): Ditto. (WebCore::buildEllipseString): Ditto. (WebCore::buildPathString): Ditto. (WebCore::buildPolygonString): Ditto. (WebCore::buildInsetString): Ditto. * css/CSSGradientValue.cpp: (WebCore::CSSLinearGradientValue::customCSSText const): Ditto. (WebCore::CSSRadialGradientValue::customCSSText const): Ditto. (WebCore::CSSConicGradientValue::customCSSText const): Ditto. * css/CSSGridIntegerRepeatValue.cpp: (WebCore::CSSGridIntegerRepeatValue::customCSSText const): Use makeString instead of StringBuilder. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::customCSSText const): Use append instead of appendLiteral. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::cssText const): Use makeString instead of StringBuilder. * css/CSSKeyframeRule.cpp: (WebCore::StyleRuleKeyframe::cssText const): Ditto. * css/CSSKeyframesRule.cpp: (WebCore::CSSKeyframesRule::cssText const): Use variadic append. * css/CSSLineBoxContainValue.cpp: (WebCore::CSSLineBoxContainValue::customCSSText const): Use append instead of appendLiteral. * css/CSSNamespaceRule.cpp: (WebCore::CSSNamespaceRule::cssText const): Ditto. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::cssText const): Use makeString instead of StringBuilder. * css/CSSPaintImageValue.cpp: (WebCore::CSSPaintImageValue::customCSSText const): Ditto. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): Use append instead of appendLiteral. * css/CSSSelector.cpp: (WebCore::appendLangArgumentList): Use variadic append. (WebCore::CSSSelector::selectorText const): Ditto. Also use append instead of appendLiteral and make some improvements to cut down on allocations a little. * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::buildSelectorsText const): Use append instead of appendLiteral. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::CSSStyleSheet): Moved more of the data member initialization to the class definition. (WebCore::CSSStyleSheet::addRule): Use makeString instead of StringBuilder. * css/CSSStyleSheet.h: Moved initialization here. * css/CSSTimingFunctionValue.cpp: (WebCore::CSSStepsTimingFunctionValue::customCSSText const): Use makeString instead of StringBuilder. (WebCore::CSSSpringTimingFunctionValue::customCSSText const): Ditto. * css/MediaList.cpp: (WebCore::MediaQuerySet::mediaText const): Use append instead of appendLiteral. * css/MediaQuery.cpp: (WebCore::MediaQuery::serialize const): Ditto. * css/MediaQueryExpression.cpp: (WebCore::MediaQueryExpression::serialize const): Use makeString instead of StringBuilder. * css/StyleProperties.cpp: (WebCore::StyleProperties::getLayeredShorthandValue const): Use append instead of appendLiteral. * css/parser/CSSParserToken.cpp: (WebCore::CSSParserToken::serialize const): Removed a lot of unnecessary braces. Use variadic append and append instead of appendLiteral. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Use auto for the result of makeString. * dom/Element.cpp: (WebCore::appendAttributes): Use variadic append and append instead of appendLiteral. * dom/SecurityContext.cpp: (WebCore::SecurityContext::parseSandboxPolicy): Ditto. * editing/HTMLInterchange.cpp: (WebCore::convertHTMLTextToInterchangeFormat): Ditto. * editing/TextIterator.cpp: (WebCore::createSearcher): Use auto for the result of makeString. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): Use append instead of appendLiteral. (WebCore::StyledMarkupAccumulator::appendStartTag): Ditto. (WebCore::urlToMarkup): Ditto. * html/FormController.cpp: (WebCore::recordFormStructure): Ditto. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::reportValidity): Use auto for the result of makeString. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::validateInteractively): Ditto. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::completeURLsInAttributeValue const): Use append insteaed of appendLiteral. * html/MediaElementSession.cpp: (WebCore::restrictionNames): Use auto for the result of makeString. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::getUniformLocation): Ditto. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Ditto. * html/parser/XSSAuditorDelegate.cpp: (WebCore::buildConsoleError): Use makeString instead of StringBuilder. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::rebuildDisplayTree): Ditto. * inspector/InspectorFrontendAPIDispatcher.cpp: (WebCore::expressionForEvaluatingCommand): Use append instead of appendLiteral. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::drawElementTitle): Use auto for the result of makeString. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::addRule): Use append instead of appendLiteral. * inspector/agents/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): Use makeString instead of StringBuilder. * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::didReceiveResponse): Use auto for the result of makeString. (WebCore::WebConsoleAgent::didFailLoading): Ditto. * loader/MixedContentChecker.cpp: (WebCore::logWarning): Ditto (WebCore::MixedContentChecker::checkFormForMixedContent): Ditto * loader/PrivateClickMeasurement.cpp: (WebCore::makeValidURL): Added. Used for various cases below that all construct URLs in the same way with the same kinds of checks. Use makeString here instead of StringBuilder. (WebCore::attributionReportURL): Call makeValidURL. (WebCore::PrivateClickMeasurement::tokenSignatureURL const): Ditto. (WebCore::PrivateClickMeasurement::tokenPublicKeyURL const): Ditto. * loader/ResourceLoadStatistics.cpp: (WebCore::appendBoolean): Use append instead of appendLiteral. (WebCore::appendHashSet): Ditto. (WebCore::appendNavigatorAPIOptionSet): Ditto. (WebCore::appendScreenAPIOptionSet): Ditto. (WebCore::ResourceLoadStatistics::toString const): Ditto. * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Use auto for the result of makeString. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): Ditto. * page/Frame.cpp: (WebCore::createRegExpForLabels): Use append instead of appendLiteral. Also tweak coding style a bit. * page/FrameView.cpp: (WebCore::FrameView::logMockScrollAnimatorMessage const): Use makeString instead of StringBuilder. * page/PageSerializer.cpp: (WebCore::PageSerializer::SerializerMarkupAccumulator::appendStartTag): Use append instead of appendLiteral. (WebCore::PageSerializer::serializeCSSStyleSheet): Ditto. (WebCore::PageSerializer::urlForBlankFrame): Use auto for the result of makeString. * page/PerformanceLoggingClient.cpp: (WebCore::PerformanceLoggingClient::synchronousScrollingReasonsAsString): Use makeString instead of StringBuilder. * page/cocoa/ResourceUsageOverlayCocoa.mm: (WebCore::ResourceUsageOverlay::platformDraw): Use auto for the result of makeString. * page/csp/ContentSecurityPolicy.cpp: (WebCore::consoleMessageForViolation): Use makeString instsead of StringBuilder. (WebCore::ContentSecurityPolicy::allowRunningOrDisplayingInsecureContent): Ditto. (WebCore::ContentSecurityPolicy::reportInvalidDirectiveValueCharacter const): Get rid of local variable for result of makeString. (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter const): Ditto. (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression const): Ditto. * page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::create): Get rid of local variable for result of makeString. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText): Use makeString instead of StringBulder. * platform/Decimal.cpp: (WebCore::Decimal::toString const): Use append instead of appendLiteral. * platform/animation/TimingFunction.cpp: (WebCore::TimingFunction::createFromCSSText): Use makeString instead of StringBuilder. * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation): Use auto for the result of makeString. * platform/glib/UserAgentGLib.cpp: (WebCore::buildUserAgentString): Use append instead of appendLiteral. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Use append instead of appendLiteral. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): Got rid of local variable for result of makeString. (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Use auto for result of makeString. * platform/graphics/ca/TileController.cpp: (WebCore::TileController::tileRevalidationTimerFired): Update to use OptionSet. * platform/graphics/ca/TileGrid.cpp: (WebCore::validationPolicyAsString): Use OptionSet. (WebCore::TileGrid::setNeedsDisplayInRect): Use auto for iterator and range-based for loop. (WebCore::TileGrid::updateTileLayerProperties): Ditto. (WebCore::TileGrid::blankPixelCount const): Ditto. (WebCore::TileGrid::removeTiles): Use HashCountedSet. (WebCore::TileGrid::revalidateTiles): Use OptionSet. (WebCore::TileGrid::retainedTileBackingStoreMemory const): Use ranged-based for loop. (WebCore::TileGrid::drawTileMapContents const): Use range-based for loop and use writeIntegerToBuffer instead of String::number. (WebCore::TileGrid::platformCALayerRepaintCount const): Use HashCountedSet. (WebCore::TileGrid::platformCALayerIncrementRepaintCount): Ditto. This cuts us down from 3 hash table lookups to 1. (WebCore::TileGrid::removeUnparentedTilesNow): Removed local variable to make code a little tighter. * platform/graphics/ca/TileGrid.h: Use OptionSet and HashCountedSet. Removed some type names. * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: (WebCore::PlatformCAFilters::setFiltersOnLayer): Use auto for reuslt of makeString. * platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::drawText): Ditto. * platform/mock/ScrollAnimatorMock.cpp: (WebCore::ScrollAnimatorMock::scrollbarPrefix const): Added helper function for use below. (WebCore::ScrollAnimatorMock::mouseEnteredScrollbar const): Use makeString instead of StringBuilder. (WebCore::ScrollAnimatorMock::mouseExitedScrollbar const): Ditto. (WebCore::ScrollAnimatorMock::mouseIsDownInScrollbar const): Ditto. * platform/mock/ScrollAnimatorMock.h: Ditto. * platform/network/ProxyServer.cpp: (WebCore::appendProxyServerString): Use append instead of appendLiteral. (WebCore::toString): Ditto. * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::sanitizeSuggestedFilename): Get rid of local variable with result of maekString in it. * platform/playstation/UserAgentPlayStation.cpp: (WebCore::platformForUAString): Deleted. No need for a global variable to hold the result of something called only once. (WebCore::platformVersionForUAString): Ditto. (WebCore::buildUserAgentString): Deleted. (WebCore::standardUserAgentStatic): Moved the logic from buildUserAgentString here, using makeString instead of StringBuilder. * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::open): Use auto for result of makeString. * platform/sql/SQLiteFileSystem.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): Ditto. * platform/text/DateTimeFormat.cpp: (WebCore::DateTimeFormat::quoteAndAppendLiteral): Use append instead of appendLiteral and StringView::substring instead of String::substring. * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::replaceNewlinesWithWindowsStyleNewlines): Use append instead of appendLiteral. * platform/win/UserAgentWin.cpp: (WebCore::standardUserAgent): Use makeString instead of StringBuildeer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::name const): Ditto. (WebCore::RenderLayer::debugDescription const): Ditto. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::logLayerInfo): Use append instead of appendLiteral. * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): Ditto. (WebCore::nodePosition): Ditto. * svg/SVGPathStringBuilder.cpp: (WebCore::SVGPathStringBuilder::moveTo): Ditto. (WebCore::SVGPathStringBuilder::lineTo): Ditto. (WebCore::SVGPathStringBuilder::lineToHorizontal): Ditto. (WebCore::SVGPathStringBuilder::lineToVertical): Ditto. (WebCore::SVGPathStringBuilder::curveToCubic): Ditto. (WebCore::SVGPathStringBuilder::curveToCubicSmooth): Ditto. (WebCore::SVGPathStringBuilder::curveToQuadratic): Ditto. (WebCore::SVGPathStringBuilder::curveToQuadraticSmooth): Ditto. (WebCore::SVGPathStringBuilder::arcTo): Ditto. (WebCore::SVGPathStringBuilder::closePath): Ditto. * testing/Internals.cpp: (WebCore::Internals::dumpMarkerRects): Ditto. (WebCore::appendOffsets): (WebCore::Internals::scrollSnapOffsets): Ditto. * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::validateWorkerResponse): Use auto for reuslt of makeString. Source/WebKit: * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList): Use append instead of appendLiteral. (WebKit::domainsToString): Ditto. (WebKit::buildList): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics): Ditto. (WebKit::appendBoolean): Ditto. (WebKit::appendNextEntry): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::appendSubStatisticList const): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto. (WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics): Ditto. * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: Ditto. (WebKit::domainsToString): Ditto. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::create): Moved this here from the header. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::toString const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::encode const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::decode): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty::operator== const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::toString const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::encode const): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::decode): Ditto. (WebKit::WebResourceLoadStatisticsStore::ThirdPartyData::operator< const): Ditto. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Moved member functions of the nested structures into the implementation file and fixed the indentation of the structures to indicate the nesting. * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::continueCheckingRequest): Do not use a local variable for the reuslt of makeString. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::newTestingSession): Ditto. * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::Cache::dumpContentsToFile): Use append instead of appendLiteral * NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::asJSON const): Ditto. * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::makeVersionedDirectoryPath): Do not use a local variable for the result of makeString. * NetworkProcess/soup/NetworkProcessSoup.cpp: (WebKit::buildAcceptLanguages): Use append instead of appendLiteral. * NetworkProcess/soup/WebSocketTaskSoup.cpp: (WebKit::WebSocketTask::acceptedExtensions const): Ditto. * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: (WebKit::NetworkMDNSRegister::registerMDNSName): Use auto for the result of makeString. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::writeHeaders): Ditto. * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::initializeSandboxParameters): Do not use a local variable for the result of makeString. Also, take advantage of the support for concatenating an NSString instead of converting it to a WTF::String. * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): Use ASCIILiteral and remove explicit conversion to String. * UIProcess/API/glib/WebKitWebView.cpp: (webkitWebViewRunJavaScriptCallback): Use append instead of appendLiteral. * UIProcess/Automation/WebAutomationSession.cpp: (WebKit::fileCanBeAcceptedForUpload): Use auto for result of makeString. * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Use makeString instead of StringBuilder. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::requestStorageSpace): Use auto for result of makeString. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::loggingString): Use append instead of appendLiteral. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::processDidFinishLaunching): Use auto for result of makeString. (WebKit::WebProcessPool::startMemorySampler): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::dumpHistoryItem): Use append instead of appendLiteral. (WebKit::WebPage::getContentsAsString): Ditto. Source/WebKitLegacy: * WebCoreSupport/NetworkStorageSessionMap.cpp: (NetworkStorageSessionMap::switchToNewTestingSession): Do not use local for return value of makeString. Source/WebKitLegacy/mac: * WebView/WebHTMLRepresentation.mm: (regExpForLabels): Use append instead of appendLiteral. Also imrpove local variable names a bit. Source/WebKitLegacy/win: * AccessibleBase.cpp: (AccessibleBase::get_accKeyboardShortcut): Use append instead of appnedLiteral. * WebView.cpp: Ditto. Source/WTF: The optimization done by appendLiteral has minimal value and is something we can do without. It does not cut down the number of allocations, which is the main cost of the StringBuilder class. Getting rid of the differently named appendLiteral improves the design of the StringBuilder class for callers. Our goal is to get as close as possible to a single append function. If we decide we need an optimization for literals, we can come up with a different way that is compatible with append. For example, we could assume that any char array is a literal and check that at compile time in StringConcatenate; that optimization would work for both makeString and StringBuilder. Or we could use a strategy like ASCIILiteral. * wtf/FileSystem.cpp: (WTF::FileSystemImpl::encodeForFileName): Streamline logic, and use variadic append to make this more efficient. * wtf/JSONValues.cpp: (WTF::JSONImpl::Value::escapeString): Use append instead of appendLiteral. (WTF::JSONImpl::Value::writeJSON const): Ditto. * wtf/Logger.h: (WTF::Logger::log): Use auto for result of makeString. (WTF::Logger::logVerbose): Ditto. * wtf/MediaTime.cpp: (WTF::MediaTime::toString const): Use makeString instead of StringBuilder. * wtf/text/IntegerToStringConversion.h: Made lengthOfIntegerAsString a constexpr function so we can use it to compute the required size of arrays for conversion. Added using for both lengthOfIntegerAsString and writeIntegerToBuffer so we can use them without the WTF prefix as is customary for functions in WTF. * wtf/text/StringBuilder.h: (WTF::StringBuilder::appendLiteral): Deleted. * wtf/text/StringConcatenate.h: Added support for appending StringImpl&, StringImpl*, AtomStringImpl&, and AtomStringImpl*. Tools: * TestWebKitAPI/Tests/WTF/StringBuilder.cpp: Use append instead of appendLiteral. * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::createCommand): Use makeString instead of StringBuilder. * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Made lots of fixes to code inside #if TEST_OUTPUT, which hasn't compiled in a long time. Still not 100% there, but closer. * TestWebKitAPI/Tests/WebCore/TextCodec.cpp: (TestWebKitAPI::testDecode): Use append instead of appendLiteral. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::helpText const): Ditto. Canonical link: https://commits.webkit.org/238091@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-24 21:51:47 +00:00
auto logMessage = makeString(LogArgument<Argument>::toString(arguments)...);
RELEASE_LOG should not be Cocoa specific https://bugs.webkit.org/show_bug.cgi?id=195182 Reviewed by Konstantin Tokarev. .: Add a Systemd Journald Logger implementation, enabled by default in the GTK and WPE ports. When this is enabled, release logs will be sent to the Systemd Journal. To retrieve media logs for instance, this command can be used: $ journalctl WEBKIT_SUBSYSTEM=WebKitGTK WEBKIT_CHANNEL=Media * Source/cmake/FindSystemd.cmake: Added. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: Source/WebCore: WPE/GTK build fixes related with Release logging support. * bridge/npruntime_internal.h: * dom/ScriptedAnimationController.cpp: (WebCore::throttlingReasonToString): * page/PerformanceLogging.cpp: (WebCore::toString): * page/PerformanceMonitor.cpp: (WebCore::stringForCPUSamplingActivityState): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier): (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger): * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: (WebCore::CDMProxyClearKey::cencDecryptSubsampled): (WebCore::CDMProxyClearKey::initializeGcrypt): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer): (WebCore::MediaSourceGStreamer::addSourceBuffer): (WebCore::MediaSourceGStreamer::logChannel const): * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h: * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer): (WebCore::SourceBufferPrivateGStreamer::logChannel const): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::computeLogLevel): * platform/network/soup/NetworkStorageSessionSoup.cpp: (WebCore::NetworkStorageSession::getRawCookies const): Source/WTF: Add sd-journal logging support and wrap the os_log calls with the USE(OS_LOG) guard. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: (WTF::toString): * wtf/PlatformGTK.cmake: * wtf/PlatformWPE.cmake: * wtf/RefCountedLeakCounter.cpp: Canonical link: https://commits.webkit.org/222085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-17 14:56:07 +00:00
#if RELEASE_LOG_DISABLED
WTFLogVerbose(file, line, function, &channel, "%s", logMessage.utf8().data());
#endif
#if USE(OS_LOG) && !RELEASE_LOG_DISABLED
os_log(channel.osLogChannel, "%{public}s", logMessage.utf8().data());
UNUSED_PARAM(file);
UNUSED_PARAM(line);
UNUSED_PARAM(function);
#endif
#if USE(JOURNALD) && !RELEASE_LOG_DISABLED
auto fileString = makeString("CODE_FILE=", file);
auto lineString = makeString("CODE_LINE=", line);
sd_journal_send_with_location(fileString.utf8().data(), lineString.utf8().data(), function, "WEBKIT_SUBSYSTEM=%s", channel.subsystem, "WEBKIT_CHANNEL=%s", channel.name, "MESSAGE=%s", logMessage.utf8().data(), nullptr);
#endif
Make WTFLogChannelState and WTFLogLevel enum classes https://bugs.webkit.org/show_bug.cgi?id=195904 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-19 Reviewed by Eric Carlson. Source/WebCore: * Modules/mediasource/SourceBuffer.cpp: (WebCore::removeSamplesFromTrackBuffer): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const): * dom/Document.cpp: (WebCore::messageLevelFromWTFLogLevel): * html/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seekTask): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * inspector/agents/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): (WebCore::channelConfigurationForString): * platform/Logging.cpp: (WebCore::isLogChannelEnabled): (WebCore::setLogChannelToAccumulate): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::initializePeerConnectionFactoryAndThreads): * rendering/RenderLayerCompositor.cpp: (WebCore::compositingLogEnabled): Source/WebKit: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::NetworkRTCProvider): Source/WTF: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Logger.h: (WTF::Logger::logAlways const): (WTF::Logger::error const): (WTF::Logger::warning const): (WTF::Logger::info const): (WTF::Logger::debug const): (WTF::Logger::willLog const): (WTF::Logger::log): * wtf/MemoryPressureHandler.cpp: * wtf/RefCountedLeakCounter.cpp: Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/210210@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-19 16:47:04 +00:00
if (channel.state == WTFLogChannelState::Off || level > channel.level)
Web Inspector: Enable WebKit logging configuration and display https://bugs.webkit.org/show_bug.cgi?id=177027 <rdar://problem/33964767> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::messageSourceValue): Inspector::Protocol::Console::ConsoleMessage -> Inspector::Protocol::Console::ChannelSource. * inspector/agents/JSGlobalObjectConsoleAgent.cpp: (Inspector::JSGlobalObjectConsoleAgent::getLoggingChannels): There are no logging channels specific to a JSContext yet, so return an empty channel array. (Inspector::JSGlobalObjectConsoleAgent::setLoggingChannelLevel): No channels, return an error. * inspector/agents/JSGlobalObjectConsoleAgent.h: * inspector/protocol/Console.json: Add ChannelSource, ChannelLevel, and Channel. Add getLoggingChannels and setLoggingChannelLevel. * inspector/scripts/codegen/generator.py: Special case "webrtc"-> "WebRTC". * inspector/scripts/tests/generic/expected/enum-values.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: * runtime/ConsoleTypes.h: Add Media and WebRTC. Source/WebCore: Test: inspector/console/webcore-logging.html * dom/Document.cpp: (WebCore::Document::~Document): Stop observing the logger. (WebCore::Document::logger): Observe the logger. (WebCore::Document::didLogMessage): Forward logging messages to the inspector. * dom/Document.h: * inspector/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::getLoggingChannels): New, return the state of log runtime channels. (WebCore::WebConsoleAgent::setLoggingChannelLevel): New, set the state of a channel. * inspector/WebConsoleAgent.h: * platform/Logging.cpp: (WebCore::getLogChannel): New, get a log channel by name. * platform/Logging.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::Logger::willLog const): Always return true for Always and Error so those messages are always logged to the system. (PAL::Logger::log): Always log Always and Error to the system, but pay strict attention to level and channel state for logging to observers so logging only shows up in the inspector when explicitly enabled by the user. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: Add new localized strings. * UserInterface/Controllers/LogManager.js: (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels. (WI.LogManager.supportsLogChannels): New. (WI.LogManager.prototype.get customLoggingChannels): New. (WI.LogManager.prototype.get logChannelSources): New. * UserInterface/Main.html: * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC. * UserInterface/Models/IssueMessage.js: (WI.IssueMessage): Add media and webrtc. * UserInterface/Models/LoggingChannel.js: Added. (WI.LoggingChannel): (WI.LoggingChannel.fromPayload): (WI.LoggingChannel.prototype.get source): (WI.LoggingChannel.prototype.get level): * UserInterface/Views/LogContentView.js: (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel scope buttons once logging has started. (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary. (WI.LogContentView.prototype._scopeFromMessageSource): New. (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug. (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log message is added. (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons. (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New. (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus for each log channel. Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.mm: (stringForMessageSource): Deal with Media and WebRTC message sources. Tools: Allow new 'dumpJSConsoleLogInStdErr' test header to redirect log console output to stderr. * DumpRenderTree/TestOptions.h: * DumpRenderTree/TestOptions.mm: (TestOptions::TestOptions): * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader): (WTR::TestController::runTest): * WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const): LayoutTests: * inspector/console/webcore-logging-expected.txt: Added. * inspector/console/webcore-logging.html: Added. * platform/mac/TestExpectations: Skip new test on Yosemite and ElCapitan. * platform/win/TestExpectations: Skip new test. Canonical link: https://commits.webkit.org/194925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-24 22:00:53 +00:00
return;
Use CheckedLock more in cases where we try-lock https://bugs.webkit.org/show_bug.cgi?id=226056 Reviewed by Alex Christensen. Use CheckedLock more in cases where we try-lock to benefit from Clang Thread Safety Analysis. Source/WebCore: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::cancelAndHoldAtTime): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForFrameRange): (WebCore::AudioParamTimeline::hasValues const): * Modules/webaudio/AudioParamTimeline.h: * platform/audio/AudioDestination.h: (WebCore::AudioDestination::WTF_GUARDED_BY_LOCK): (WebCore::AudioDestination::AudioDestination): (WebCore::AudioDestination::clearCallback): (WebCore::AudioDestination::callRenderCallback): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Source/WebKit: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::completedDecoding): (WebKit::LibWebRTCCodecs::releaseEncoder): (WebKit::LibWebRTCCodecs::registerEncodeFrameCallback): (WebKit::LibWebRTCCodecs::completedEncoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::Decoder::WTF_GUARDED_BY_LOCK): (WebKit::LibWebRTCCodecs::Encoder::WTF_GUARDED_BY_LOCK): Source/WTF: * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::addObserver): (WTF::Logger::removeObserver): (WTF::Logger::log): (WTF::Logger::logVerbose): (WTF::Logger::WTF_RETURNS_LOCK): Canonical link: https://commits.webkit.org/238013@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 19:24:05 +00:00
if (!observerLock().tryLock())
return;
Drop WTF::tryHoldLock() as it is incompatible with Clang Thread Safety Analysis https://bugs.webkit.org/show_bug.cgi?id=226145 Reviewed by Darin Adler. Drop WTF::tryHoldLock() as it is incompatible with Clang Thread Safety Analysis. Instead, use the following pattern which is supported: ``` if (lock.tryLock()) { Locker locker { AdoptLock, lock }; // ... } ``` Source/JavaScriptCore: * heap/Heap.cpp: (JSC::Heap::resumeThePeriphery): * runtime/VMTraps.cpp: (JSC::VMTraps::tryInstallTrapBreakpoints): Source/WebCore: * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::process): * Modules/webaudio/AudioWorkletNode.cpp: (WebCore::AudioWorkletNode::process): * Modules/webaudio/ConvolverNode.cpp: (WebCore::ConvolverNode::process): * Modules/webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::process): * Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::process): * Modules/webaudio/OscillatorNode.cpp: (WebCore::OscillatorNode::process): * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::process): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::process): * Modules/webaudio/WaveShaperProcessor.cpp: (WebCore::WaveShaperProcessor::process): * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::process): * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::purgeTimerFired): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: (WebCore::AudioSourceProviderAVFObjC::provideInput): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): * platform/mediastream/mac/WebAudioSourceProviderCocoa.mm: (WebCore::WebAudioSourceProviderCocoa::provideInput): * workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::stop): Source/WTF: * wtf/CheckedLock.h: * wtf/Lock.h: * wtf/Locker.h: (WTF::Locker::Locker): Canonical link: https://commits.webkit.org/238062@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-23 19:55:32 +00:00
Locker locker { AdoptLock, observerLock() };
for (Observer& observer : observers())
Web Inspector: Optionally log WebKit log parameters as JSON https://bugs.webkit.org/show_bug.cgi?id=180529 <rdar://problem/35909462> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): New constructor that takes a vector of JSON log values. Concatenate all adjacent strings to make logging cleaner. (Inspector::ConsoleMessage::addToFrontend): Process WebKit logging arguments. (Inspector::ConsoleMessage::scriptState const): * inspector/ConsoleMessage.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::wrapJSONString const): Wrap JSON string log arguments. * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.wrapJSONString): Source/WebCore: * dom/Document.cpp: (WebCore::Document::didLogMessage):Update for API change. Don't check for main thread, that is already done in addConsoleMessage. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Cleanup logging. * html/track/DataCue.cpp: (WebCore::DataCue::toJSONString const): Serialize to JSON string. (WebCore::DataCue::toString const): Deleted. * html/track/DataCue.h: (WTF::LogArgument<WebCore::DataCue>::toString): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toJSON const): Ditto. (WebCore::TextTrackCue::toJSONString const): (WebCore::TextTrackCue::toString const): Deleted. * html/track/TextTrackCue.h: (WTF::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::toJSONString const): Ditto. (WebCore::TextTrackCueGeneric::toString const): Deleted. * html/track/TextTrackCueGeneric.h: (WTF::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/VTTCue.cpp: (WebCore::VTTCue::toJSONString const): Ditto. (WebCore::VTTCue::toString const): Deleted. * html/track/VTTCue.h: (WTF::LogArgument<WebCore::VTTCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toJSONString const): Ditto. (WTF::LogArgument<WebCore::GenericCueData>::toString): (WebCore::GenericCueData::toString const): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Cleanup logging. (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Log the entire cue. (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Cleanup logging. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): Don't log, it isn't interesting and happens frequently. (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): Ditto. * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::toJSONString const): Serialize to JSON string. * platform/graphics/iso/ISOVTTCue.h: (WTF::LogArgument<WebCore::ISOWebVTTCue>::toString): Ditto. Source/WTF: * wtf/Logger.h: (WTF::Logger::log): (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): * wtf/MediaTime.cpp: (WTF::MediaTime::toJSONString const): Serialize to JSON string. * wtf/MediaTime.h: LayoutTests: * inspector/canvas/recording-2d-expected.txt: * inspector/canvas/recording-webgl-expected.txt: * inspector/canvas/recording-webgl-snapshots-expected.txt: Canonical link: https://commits.webkit.org/196579@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 00:41:54 +00:00
observer.didLogMessage(channel, level, { ConsoleLogValue<Argument>::toValue(arguments)... });
}
Use CheckedLock more in cases where we try-lock https://bugs.webkit.org/show_bug.cgi?id=226056 Reviewed by Alex Christensen. Use CheckedLock more in cases where we try-lock to benefit from Clang Thread Safety Analysis. Source/WebCore: * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::cancelAndHoldAtTime): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForFrameRange): (WebCore::AudioParamTimeline::hasValues const): * Modules/webaudio/AudioParamTimeline.h: * platform/audio/AudioDestination.h: (WebCore::AudioDestination::WTF_GUARDED_BY_LOCK): (WebCore::AudioDestination::AudioDestination): (WebCore::AudioDestination::clearCallback): (WebCore::AudioDestination::callRenderCallback): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Source/WebKit: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::completedDecoding): (WebKit::LibWebRTCCodecs::releaseEncoder): (WebKit::LibWebRTCCodecs::registerEncodeFrameCallback): (WebKit::LibWebRTCCodecs::completedEncoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::Decoder::WTF_GUARDED_BY_LOCK): (WebKit::LibWebRTCCodecs::Encoder::WTF_GUARDED_BY_LOCK): Source/WTF: * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::addObserver): (WTF::Logger::removeObserver): (WTF::Logger::log): (WTF::Logger::logVerbose): (WTF::Logger::WTF_RETURNS_LOCK): Canonical link: https://commits.webkit.org/238013@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 19:24:05 +00:00
WTF_EXPORT_PRIVATE static Vector<std::reference_wrapper<Observer>>& observers() WTF_REQUIRES_LOCK(observerLock());
Drop CheckedLock / CheckedCondition aliases https://bugs.webkit.org/show_bug.cgi?id=226176 Reviewed by Kate Cheney. Drop CheckedLock / CheckedCondition aliases now that they are the default. Source/JavaScriptCore: * API/JSVirtualMachine.mm: * API/glib/JSCVirtualMachine.cpp: * assembler/PerfLog.h: * assembler/testmasm.cpp: * bytecode/StructureStubInfo.h: * bytecode/SuperSampler.cpp: * dfg/DFGCommon.cpp: * dfg/DFGCommonData.cpp: * dfg/DFGPlan.h: * dfg/DFGThreadData.h: * dfg/DFGWorklist.cpp: (JSC::DFG::Worklist::Worklist): * dfg/DFGWorklist.h: * disassembler/Disassembler.cpp: * dynbench.cpp: * heap/BlockDirectory.cpp: (JSC::BlockDirectory::parallelNotEmptyBlockSource): * heap/BlockDirectory.h: (JSC::BlockDirectory::bitvectorLock): * heap/CodeBlockSet.h: (JSC::CodeBlockSet::getLock): * heap/Heap.cpp: (JSC::Heap::Heap): * heap/Heap.h: * heap/IsoSubspacePerVM.h: * heap/MarkedSpace.h: (JSC::MarkedSpace::directoryLock): * heap/MarkingConstraintSolver.h: * heap/SlotVisitor.cpp: (JSC::SlotVisitor::donateKnownParallel): * heap/SlotVisitor.h: * inspector/remote/socket/RemoteInspectorConnectionClient.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::getLock const): (JSC::dumpJITMemory): * jit/ExecutableAllocator.h: (JSC::ExecutableAllocatorBase::getLock const): * jit/JITWorklist.cpp: (JSC::JITWorklist::JITWorklist): * jit/JITWorklist.h: * jsc.cpp: * profiler/ProfilerDatabase.h: * runtime/ConcurrentJSLock.h: * runtime/DeferredWorkTimer.h: * runtime/JSLock.h: * runtime/SamplingProfiler.cpp: (JSC::FrameWalker::FrameWalker): (JSC::CFrameWalker::CFrameWalker): (JSC::SamplingProfiler::takeSample): * runtime/SamplingProfiler.h: (JSC::SamplingProfiler::getLock): * runtime/VM.h: * runtime/VMTraps.cpp: (JSC::VMTraps::invalidateCodeBlocksOnStack): (JSC::VMTraps::VMTraps): * runtime/VMTraps.h: * tools/FunctionOverrides.h: * tools/VMInspector.cpp: (JSC::ensureIsSafeToLock): * tools/VMInspector.h: (JSC::VMInspector::getLock): * wasm/WasmCalleeRegistry.h: (JSC::Wasm::CalleeRegistry::getLock): * wasm/WasmPlan.h: * wasm/WasmStreamingCompiler.h: * wasm/WasmThunks.h: * wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * wasm/WasmWorklist.h: Source/WebCore: * Modules/indexeddb/IDBObjectStore.h: * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/client/IDBConnectionProxy.h: * Modules/indexeddb/server/IDBSerializationContext.cpp: * Modules/indexeddb/server/IDBServer.cpp: * Modules/mediastream/RTCDataChannel.cpp: * Modules/mediastream/RTCRtpSFrameTransformer.h: * Modules/mediastream/RTCRtpScriptTransform.h: * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h: * Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.h: * Modules/speech/SpeechRecognitionCaptureSourceImpl.h: * Modules/webaudio/AudioParamTimeline.h: * Modules/webaudio/MediaElementAudioSourceNode.h: * Modules/webdatabase/Database.cpp: * Modules/webdatabase/Database.h: * Modules/webdatabase/DatabaseManager.h: * Modules/webdatabase/DatabaseTask.h: * Modules/webdatabase/DatabaseThread.h: * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::openDatabaseMutex): * Modules/webdatabase/DatabaseTracker.h: * Modules/webdatabase/OriginLock.cpp: * Modules/webdatabase/SQLCallbackWrapper.h: * Modules/webdatabase/SQLTransaction.h: * Modules/webgpu/WebGPUDevice.cpp: (WebCore::WebGPUDevice::instancesLock): * Modules/webgpu/WebGPUDevice.h: * Modules/webgpu/WebGPUPipeline.cpp: (WebCore::WebGPUPipeline::instancesLock): * Modules/webgpu/WebGPUPipeline.h: * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::allActiveWebSocketsLock): * Modules/websockets/WebSocket.h: * accessibility/isolatedtree/AXIsolatedTree.cpp: * accessibility/isolatedtree/AXIsolatedTree.h: * bindings/js/JSDOMGlobalObject.h: * bridge/objc/WebScriptObject.mm: * crypto/CryptoAlgorithmRegistry.h: * dom/MessagePort.cpp: * dom/Node.cpp: * dom/ScriptExecutionContext.cpp: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaPlayer): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::instancesLock): * html/canvas/CanvasRenderingContext.h: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::objectGraphLockForAContext): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::objectGraphLockForContext): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::instancesLock): * html/canvas/WebGLProgram.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::objectGraphLock): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::objectGraphLockForContext): * html/canvas/WebGLSharedObject.h: * inspector/agents/WebHeapAgent.cpp: * page/ResourceUsageThread.h: * page/SecurityPolicy.cpp: * page/WheelEventTestMonitor.h: * page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/ScrollingTreeLatchingController.h: * page/scrolling/ThreadedScrollingTree.h: (WebCore::ThreadedScrollingTree::WTF_RETURNS_LOCK): * page/scrolling/mac/ScrollingTreeMac.h: * platform/AbortableTaskQueue.h: * platform/GenericTaskQueue.cpp: * platform/GenericTaskQueue.h: * platform/LegacySchemeRegistry.cpp: * platform/audio/AudioDestination.h: * platform/audio/HRTFDatabaseLoader.h: * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::backgroundThreadEntry): * platform/audio/cocoa/AudioDestinationCocoa.h: * platform/audio/gstreamer/AudioSourceProviderGStreamer.h: * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: * platform/audio/mac/FFTFrameMac.cpp: * platform/encryptedmedia/CDMProxy.h: * platform/graphics/MediaPlayer.cpp: * platform/graphics/ShadowBlur.cpp: (WebCore::ScratchBuffer::lock): (WebCore::ShadowBlur::drawRectShadowWithTiling): (WebCore::ShadowBlur::drawInsetShadowWithTiling): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: * platform/graphics/cg/IOSurfacePool.h: * platform/graphics/cg/SubimageCacheWithTimer.h: * platform/graphics/cocoa/FontCacheCoreText.cpp: * platform/graphics/gstreamer/ImageDecoderGStreamer.h: * platform/graphics/gstreamer/MainThreadNotifier.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: (WebCore::TextureMapperPlatformLayerProxy::WTF_RETURNS_LOCK): * platform/image-decoders/ScalableImageDecoder.h: * platform/ios/QuickLook.mm: * platform/ios/WebSQLiteDatabaseTrackerClient.mm: * platform/ios/wak/WebCoreThreadRun.cpp: * platform/mediarecorder/MediaRecorderPrivateMock.h: * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: * platform/mediastream/RealtimeMediaSource.h: * platform/mediastream/RealtimeOutgoingAudioSource.h: * platform/mediastream/RealtimeOutgoingVideoSource.h: * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h: * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::loaderRunLoop): * platform/network/cocoa/WebCoreNSURLSession.mm: * platform/network/mac/UTIUtilities.mm: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteDatabaseTracker.cpp: * platform/text/TextEncodingRegistry.cpp: * storage/StorageQuotaManager.h: * workers/WorkerGlobalScope.cpp: * workers/WorkerOrWorkletScriptController.h: * workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::workerOrWorkletThreadsLock): * workers/WorkerOrWorkletThread.h: * worklets/PaintWorkletGlobalScope.h: Source/WebKit: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: (WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer): * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: * NetworkProcess/NetworkProcess.h: * NetworkProcess/WebStorage/StorageManagerSet.h: * NetworkProcess/cache/NetworkCacheStorage.cpp: * NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h: * NetworkProcess/glib/DNSCache.h: * Platform/IPC/Connection.cpp: * Platform/IPC/Connection.h: * Platform/IPC/StreamConnectionWorkQueue.h: * Platform/IPC/StreamServerConnection.h: * Shared/BlockingResponseMap.h: * Shared/Cocoa/XPCEndpointClient.h: * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: * Shared/mac/MediaFormatReader/MediaFormatReader.h: * Shared/mac/MediaFormatReader/MediaSampleCursor.h: * Shared/mac/MediaFormatReader/MediaTrackReader.h: * UIProcess/API/glib/IconDatabase.h: * UIProcess/WebURLSchemeTask.h: * UIProcess/mac/DisplayLink.h: * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView knowsPageRange:]): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Plugins/PluginProcessConnectionManager.h: * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/ViewUpdateDispatcher.h: Source/WebKitLegacy: * Storage/StorageAreaSync.h: Source/WebKitLegacy/mac: * DOM/DOMInternal.mm: Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Assertions.cpp: * wtf/AutomaticThread.cpp: (WTF::AutomaticThreadCondition::wait): (WTF::AutomaticThreadCondition::waitFor): (WTF::AutomaticThread::AutomaticThread): * wtf/AutomaticThread.h: * wtf/CMakeLists.txt: * wtf/CheckedCondition.h: Removed. * wtf/CheckedLock.h: Removed. * wtf/Condition.h: * wtf/CrossThreadQueue.h: * wtf/CrossThreadTaskHandler.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/FastMalloc.cpp: * wtf/Forward.h: * wtf/Language.cpp: * wtf/Lock.cpp: (WTF::UncheckedLock::lockSlow): (WTF::UncheckedLock::unlockSlow): (WTF::UncheckedLock::unlockFairlySlow): (WTF::UncheckedLock::safepointSlow): * wtf/Lock.h: (WTF::WTF_ASSERTS_ACQUIRED_LOCK): * wtf/Logger.cpp: * wtf/Logger.h: (WTF::Logger::WTF_RETURNS_LOCK): * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: (WTF::MetaAllocator::release): (WTF::MetaAllocator::MetaAllocator): (WTF::MetaAllocator::allocate): (WTF::MetaAllocator::currentStatistics): * wtf/MetaAllocator.h: * wtf/OSLogPrintStream.h: * wtf/ParallelHelperPool.cpp: (WTF::ParallelHelperPool::ParallelHelperPool): * wtf/ParallelHelperPool.h: * wtf/ParallelJobsGeneric.h: * wtf/ParallelVectorIterator.h: * wtf/ReadWriteLock.h: * wtf/RecursiveLockAdapter.h: * wtf/RunLoop.h: * wtf/SynchronizedFixedQueue.h: * wtf/Threading.cpp: (WTF::Thread::allThreadsLock): * wtf/Threading.h: * wtf/TimingScope.cpp: * wtf/URL.cpp: * wtf/WTFSemaphore.h: * wtf/WorkQueue.cpp: (WTF::WorkQueue::concurrentApply): * wtf/WorkerPool.cpp: (WTF::WorkerPool::WorkerPool): * wtf/WorkerPool.h: * wtf/cf/LanguageCF.cpp: * wtf/text/AtomStringImpl.cpp: (WTF::AtomStringTableLocker::AtomStringTableLocker): * wtf/text/StringView.cpp: * wtf/threads/BinarySemaphore.h: * wtf/unicode/icu/CollatorICU.cpp: Tools: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/CheckedConditionTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/CheckedLockTest.cpp: Removed. * TestWebKitAPI/Tests/WTF/Condition.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/Lock.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp: * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR::AXThread::createThreadIfNeeded): Canonical link: https://commits.webkit.org/238085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-24 18:29:01 +00:00
static Lock& observerLock() WTF_RETURNS_LOCK(loggerObserverLock)
{
Use std::call_once + LazyNeverDestroyed to initialize complex data structures https://bugs.webkit.org/show_bug.cgi?id=215535 <rdar://problem/66774266> Reviewed by Mark Lam. NeverDestroyed<> is not thread-safe in Darwin build since it is not using C++11 thread-safe static variable semantics. This patch uses LazyNeverDestroyed and call_once to initialize complex data structures so that we can ensure they are initialized atomically. We also move some of `singleton` definitions from headers to cpp files. This is important since this ensures that singleton is only one instance which is generated in one translation unit. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/FastMalloc.cpp: (WTF::MallocCallTracker::singleton): * wtf/Language.cpp: (WTF::observerMap): (WTF::preferredLanguagesOverride): * wtf/Logger.cpp: (WTF::Logger::observers): * wtf/Logger.h: (WTF::Logger::observerLock): (WTF::Logger::observers): Deleted. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::singleton): * wtf/MemoryPressureHandler.h: * wtf/RunLoop.cpp: (WTF::RunLoop::current): * wtf/Threading.cpp: (WTF::Thread::initializeInThread): * wtf/URL.cpp: (WTF::aboutBlankURL): (WTF::aboutSrcDocURL): * wtf/cf/LanguageCF.cpp: (WTF::preferredLanguages): * wtf/cocoa/NSURLExtras.mm: (WTF::rangeOfURLScheme): * wtf/text/LineBreakIteratorPoolICU.cpp: Copied from Source/WTF/wtf/Logger.cpp. (WTF::LineBreakIteratorPool::sharedPool): * wtf/text/LineBreakIteratorPoolICU.h: (WTF::LineBreakIteratorPool::sharedPool): Deleted. * wtf/text/StringView.cpp: * wtf/text/TextBreakIterator.cpp: (WTF::TextBreakIteratorCache::singleton): * wtf/text/TextBreakIterator.h: (WTF::TextBreakIteratorCache::singleton): Deleted. * wtf/threads/Signals.cpp: (WTF::activeThreads): Canonical link: https://commits.webkit.org/228310@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-15 18:40:50 +00:00
return loggerObserverLock;
}
bool m_enabled { true };
A lot more classes have padding that can be reduced by reordering their fields https://bugs.webkit.org/show_bug.cgi?id=195579 Reviewed by Mark Lam. Source/bmalloc: * bmalloc/Heap.h: * bmalloc/Scavenger.h: Source/JavaScriptCore: * assembler/LinkBuffer.h: * dfg/DFGArrayifySlowPathGenerator.h: (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator): * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator): (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator): * dfg/DFGGraph.h: * dfg/DFGNode.h: (JSC::DFG::SwitchData::SwitchData): * dfg/DFGPlan.cpp: (JSC::DFG::Plan::Plan): * dfg/DFGPlan.h: * dfg/DFGSlowPathGenerator.h: (JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::SpeculativeJIT): * dfg/DFGSpeculativeJIT.h: * domjit/DOMJITSignature.h: (JSC::DOMJIT::Signature::Signature): (JSC::DOMJIT::Signature::effect): (JSC::DOMJIT::Signature::argumentCount): Deleted. * heap/MarkingConstraintSolver.h: * heap/SlotVisitor.h: * jit/CallFrameShuffleData.h: * jit/JITDivGenerator.h: * jit/SpillRegistersMode.h: * parser/Nodes.h: * profiler/ProfilerOSRExit.cpp: (JSC::Profiler::OSRExit::OSRExit): * profiler/ProfilerOSRExit.h: * runtime/ArrayBufferView.h: * runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::SamplingProfiler): * runtime/SamplingProfiler.h: * runtime/TypeSet.cpp: (JSC::StructureShape::StructureShape): * runtime/TypeSet.h: * runtime/Watchdog.h: Source/WTF: * wtf/CrossThreadQueue.h: * wtf/Logger.h: * wtf/MemoryPressureHandler.h: * wtf/MetaAllocator.h: * wtf/Threading.cpp: Canonical link: https://commits.webkit.org/209940@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-12 19:07:04 +00:00
const void* m_owner;
};
Continue reducing use of String::format, now focusing on hex: "%p", "%x", etc. https://bugs.webkit.org/show_bug.cgi?id=194752 Reviewed by Daniel Bates. Source/JavaScriptCore: * heap/HeapSnapshotBuilder.cpp: (JSC::HeapSnapshotBuilder::json): Added back the "0x" that was removed when changing this file to use appendUnsignedAsHex instead of "%p". The intent at that time was to keep behavior the same, so let's do that. * parser/Lexer.cpp: (JSC::Lexer<T>::invalidCharacterMessage const): Use makeString and hex instead of String::format and "%04x". Source/WebCore: * Modules/websockets/WebSocket.cpp: Added an include of HexNumber.h. This previously got included because of Logger.h, but that no longer pulls in HexNumber.h. * css/CSSMarkup.cpp: Removed unneeded include of StringBuffer.h. * css/CSSPrimitiveValue.cpp: Ditto. * css/CSSUnicodeRangeValue.cpp: (WebCore::CSSUnicodeRangeValue::customCSSText const): Use makeString and hex instead of String::format and "%x". * html/HTMLMediaElement.h: (WTF::ValueToString<WebCore::TextTrackCue::string): Use a non-template function, TextTrackCure::debugString, so we don't need to use HextNumber.h in a header. * html/canvas/WebGLRenderingContextBase.cpp: (GetErrorString): Use makeString and hex instead of String::format and "%04x". * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::debugString const): Added. Moved string conversion here from HTMLMediaElement.h and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * html/track/TextTrackCue.h: Added TextTrackCue::debugString. * page/linux/ResourceUsageOverlayLinux.cpp: (WebCore::formatByteNumber): Use makeString and FormattedNumber::fixedWidth instead of String::format and "%.1f" etc. * platform/cocoa/KeyEventCocoa.mm: (WebCore::keyIdentifierForCharCode): Use the new hex function here instead of the old code that did each of the four characters explicitly. * platform/gamepad/mac/HIDGamepad.cpp: (WebCore::HIDGamepad::HIDGamepad): Use makeString instead of String::format. * platform/graphics/Color.cpp: (WebCore::Color::nameForRenderTreeAsText const): Use hex instead of doing each digit separately. * platform/graphics/FloatPolygon.cpp: (WebCore::FloatPolygonEdge::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * platform/graphics/FloatPolygon.h: Updated for the above. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setName): Use makeString instead of String::format. (WebCore::GraphicsLayerCA::recursiveCommitChanges): DItto. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): Ditto. (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Ditto. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode): Ditto. * platform/libwpe/PlatformKeyboardEventLibWPE.cpp: (WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode): Ditto. * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: (WebCore::GStreamerVideoEncoder::makeElement): Ditto. (WebCore::GStreamerVideoEncoder::InitEncode): Ditto. * platform/text/TextCodecLatin1.cpp: Removed unneeded include of StringBuffer.h and "using namespace WTF". * platform/win/GDIObjectCounter.cpp: (WebCore::GDIObjectCounter::GDIObjectCounter): Use makeString instead of String::format. * platform/win/KeyEventWin.cpp: (WebCore::keyIdentifierForWindowsKeyCode): Ditto. * rendering/FloatingObjects.cpp: (WebCore::FloatingObject::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * rendering/FloatingObjects.h: Updated for the above. * rendering/RenderFragmentContainer.cpp: (WebCore::RenderFragmentContainer::debugString const): Added. Moved string conversion here from the header and use makeString instead of String::format. Also use the word "debug" to make it clear that it's not OK to use this string, with a pointer value serialized into it, outside of debugging. * rendering/RenderFragmentContainer.h: Updated for the above. * rendering/RenderFragmentedFlow.h: Ditto. * testing/Internals.cpp: (WebCore::Internals::address): Use makeString instead of String::format. Source/WebCore/PAL: * pal/FileSizeFormatter.cpp: (fileSizeDescription): Use makeString instead of String::format. Source/WebKit: * Platform/IPC/win/ConnectionWin.cpp: (IPC::Connection::createServerAndClientIdentifiers): Use makeString instead of String::format. * Shared/win/WebEventFactory.cpp: (WebKit::keyIdentifierFromEvent): Ditto. * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): Use hex instead of String::format. * UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::loggingString const): Ditto. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::loggingString): Added a "0x". * UIProcess/gtk/InputMethodFilter.cpp: (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting): Use makeString and hex instead of String::format and "%x". (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting): Ditto. Source/WTF: * WTF.xcodeproj/project.pbxproj: Added HexNumber.cpp and Logger.cpp. * wtf/CMakeLists.txt: Ditto. * wtf/HexNumber.cpp: Added. (WTF::Internal::appendHex): Non-inline, non-template hex formatting logic. * wtf/HexNumber.h: (WTF::Internal::appendHex): Refactored main logic of appendUnsignedAsHex and appendUnsignedAsHexFixedSize so they can be reused in a function named hex for use with StringTypeAdapter. (WTF::appendUnsignedAsHex): Ditto. (WTF::appendUnsignedAsHexFixedSize): Ditto. (WTF::hex): Added. (WTF::StringTypeAdapter<HexNumberBuffer>): Added. * wtf/Logger.cpp: Added. (WTF::Logger::LogSiteIdentifier::toString const): Made this a non-template function and moved it here so that we don't need to include HexNumber.h in Logger.h. Since HexNumber.h has substantial code in it, it's good if we don't include it in any other headers. * wtf/Logger.h: (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): Changed to call a non-template function, LogSiteIdentifier::toString. * wtf/text/StringConcatenateNumbers.h: Replaced overloaded writeTo functions with function templates and used StringImpl::copyCharacters instead of hand-written loops. Canonical link: https://commits.webkit.org/209182@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-19 02:04:33 +00:00
template<> struct LogArgument<Logger::LogSiteIdentifier> {
static String toString(const Logger::LogSiteIdentifier& value) { return value.toString(); }
};
Add AggregateLogger, a Logger specialization for singleton classes. https://bugs.webkit.org/show_bug.cgi?id=195644 Reviewed by Eric Carlson. Source/WebCore: Convert debug logging over to release logging through the use of AggregateLogger. * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::client const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager): (WebCore::PlatformMediaSessionManager::beginInterruption): (WebCore::PlatformMediaSessionManager::endInterruption): (WebCore::PlatformMediaSessionManager::addSession): (WebCore::PlatformMediaSessionManager::removeSession): (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback): (WebCore::PlatformMediaSessionManager::setCurrentSession): (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const): (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const): (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const): (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const): (WebCore::PlatformMediaSessionManager::logChannel const): * platform/audio/PlatformMediaSessionManager.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (MediaSessionManagerCocoa::updateSessionState): (MediaSessionManagerCocoa::sessionWillBeginPlayback): (MediaSessionManagerCocoa::removeSession): (MediaSessionManagerCocoa::sessionWillEndPlayback): (MediaSessionManagerCocoa::clientCharacteristicsChanged): (MediaSessionManagerCocoa::updateNowPlayingInfo): * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Source/WTF: Add a new class, AggregateLogger, which will log messages to each of its aggregated loggers. Drive-by fixes: allow "const void*" to be directly logged by converting the pointer to a hex string. * WTF.xcodeproj/project.pbxproj: * wtf/AggregateLogger.h: Added. (WTF::AggregateLogger::create): (WTF::AggregateLogger::addLogger): (WTF::AggregateLogger::removeLogger): (WTF::AggregateLogger::logAlways const): (WTF::AggregateLogger::error const): (WTF::AggregateLogger::warning const): (WTF::AggregateLogger::info const): (WTF::AggregateLogger::debug const): (WTF::AggregateLogger::willLog const): (WTF::AggregateLogger::AggregateLogger): (WTF::AggregateLogger::log const): * wtf/CMakeLists.h: * wtf/Logger.cpp: (WTF::>::toString): * wtf/Logger.h: Canonical link: https://commits.webkit.org/209992@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-13 20:18:08 +00:00
template<> struct LogArgument<const void*> {
WTF_EXPORT_PRIVATE static String toString(const void*);
Add AggregateLogger, a Logger specialization for singleton classes. https://bugs.webkit.org/show_bug.cgi?id=195644 Reviewed by Eric Carlson. Source/WebCore: Convert debug logging over to release logging through the use of AggregateLogger. * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::client const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager): (WebCore::PlatformMediaSessionManager::beginInterruption): (WebCore::PlatformMediaSessionManager::endInterruption): (WebCore::PlatformMediaSessionManager::addSession): (WebCore::PlatformMediaSessionManager::removeSession): (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback): (WebCore::PlatformMediaSessionManager::setCurrentSession): (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const): (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const): (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const): (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const): (WebCore::PlatformMediaSessionManager::logChannel const): * platform/audio/PlatformMediaSessionManager.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (MediaSessionManagerCocoa::updateSessionState): (MediaSessionManagerCocoa::sessionWillBeginPlayback): (MediaSessionManagerCocoa::removeSession): (MediaSessionManagerCocoa::sessionWillEndPlayback): (MediaSessionManagerCocoa::clientCharacteristicsChanged): (MediaSessionManagerCocoa::updateNowPlayingInfo): * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Source/WTF: Add a new class, AggregateLogger, which will log messages to each of its aggregated loggers. Drive-by fixes: allow "const void*" to be directly logged by converting the pointer to a hex string. * WTF.xcodeproj/project.pbxproj: * wtf/AggregateLogger.h: Added. (WTF::AggregateLogger::create): (WTF::AggregateLogger::addLogger): (WTF::AggregateLogger::removeLogger): (WTF::AggregateLogger::logAlways const): (WTF::AggregateLogger::error const): (WTF::AggregateLogger::warning const): (WTF::AggregateLogger::info const): (WTF::AggregateLogger::debug const): (WTF::AggregateLogger::willLog const): (WTF::AggregateLogger::AggregateLogger): (WTF::AggregateLogger::log const): * wtf/CMakeLists.h: * wtf/Logger.cpp: (WTF::>::toString): * wtf/Logger.h: Canonical link: https://commits.webkit.org/209992@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-13 20:18:08 +00:00
};
Move Logger from PAL to WTF so it can be used outside of WebCore https://bugs.webkit.org/show_bug.cgi?id=180561 Reviewed by Alex Christensen. Source/WebCore: No new tests, existing API test updated. * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: (PAL::LogArgument<webrtc::RTCStats>::toString): Deleted. * dom/Document.cpp: * dom/Document.h: * html/HTMLMediaElement.cpp: (PAL::LogArgument<WebCore::URL>::toString): Deleted. * html/HTMLMediaElement.h: * html/HTMLMediaElementEnums.h: (PAL::LogArgument<WebCore::HTMLMediaElementEnums::ReadyState>::toString): Deleted. (PAL::LogArgument<WebCore::HTMLMediaElementEnums::NetworkState>::toString): Deleted. * html/MediaElementSession.cpp: (WebCore::MediaElementSession::logger const): * html/MediaElementSession.h: * html/track/DataCue.h: (PAL::LogArgument<WebCore::DataCue>::toString): Deleted. * html/track/TextTrackCue.h: (PAL::LogArgument<WebCore::TextTrackCue>::toString): Deleted. * html/track/TextTrackCueGeneric.h: (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): Deleted. * html/track/TrackBase.cpp: (WebCore::nullLogger): (WebCore::TrackBase::TrackBase): * html/track/TrackBase.h: * html/track/VTTCue.h: (PAL::LogArgument<WebCore::VTTCue>::toString): Deleted. * platform/graphics/InbandTextTrackPrivate.h: * platform/graphics/InbandTextTrackPrivateClient.h: (PAL::LogArgument<WebCore::GenericCueData>::toString): Deleted. * platform/graphics/MediaPlayer.cpp: (WebCore::nullLogger): (WebCore::MediaPlayer::mediaPlayerLogger): * platform/graphics/MediaPlayer.h: (WTF::LogArgument<MediaTime>::toString): (PAL::LogArgument<WTF::MediaTime>::toString): Deleted. * platform/graphics/MediaPlayerEnums.h: (PAL::LogArgument<WebCore::MediaPlayerEnums::ReadyState>::toString): Deleted. (PAL::LogArgument<WebCore::MediaPlayerEnums::NetworkState>::toString): Deleted. * platform/graphics/TrackPrivateBase.cpp: (WebCore::TrackPrivateBase::setLogger): * platform/graphics/TrackPrivateBase.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/mediastream/RTCIceConnectionState.h: (PAL::LogArgument<WebCore::RTCIceConnectionState>::toString): Deleted. * platform/mediastream/RTCIceGatheringState.h: (PAL::LogArgument<WebCore::RTCIceGatheringState>::toString): Deleted. * platform/mediastream/RTCPeerConnectionState.h: (PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString): Deleted. * platform/mediastream/RTCSignalingState.h: (PAL::LogArgument<WebCore::RTCSignalingState>::toString): Deleted. * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: Source/WebCore/PAL: * PAL.xcodeproj/project.pbxproj: * pal/Logger.h: Removed. * pal/LoggerHelper.h: Removed. Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Logger.h: Copied from Source/WebCore/PAL/pal/Logger.h. (PAL::LogArgument::toString): Deleted. (PAL::Logger::create): Deleted. (PAL::Logger::logAlways const): Deleted. (PAL::Logger::error const): Deleted. (PAL::Logger::warning const): Deleted. (PAL::Logger::info const): Deleted. (PAL::Logger::debug const): Deleted. (PAL::Logger::willLog const): Deleted. (PAL::Logger::enabled const): Deleted. (PAL::Logger::setEnabled): Deleted. (PAL::Logger::LogSiteIdentifier::LogSiteIdentifier): Deleted. (PAL::Logger::addObserver): Deleted. (PAL::Logger::removeObserver): Deleted. (PAL::Logger::Logger): Deleted. (PAL::Logger::log): Deleted. (PAL::Logger::observers): Deleted. (PAL::LogArgument<Logger::LogSiteIdentifier>::toString): Deleted. * wtf/LoggerHelper.h: Copied from Source/WebCore/PAL/pal/LoggerHelper.h. Tools: * TestWebKitAPI/Tests/WebCore/Logging.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/196512@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-08 20:33:53 +00:00
} // namespace WTF
using WTF::Logger;
Web Inspector: Optionally log WebKit log parameters as JSON https://bugs.webkit.org/show_bug.cgi?id=180529 <rdar://problem/35909462> Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): New constructor that takes a vector of JSON log values. Concatenate all adjacent strings to make logging cleaner. (Inspector::ConsoleMessage::addToFrontend): Process WebKit logging arguments. (Inspector::ConsoleMessage::scriptState const): * inspector/ConsoleMessage.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::wrapJSONString const): Wrap JSON string log arguments. * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.wrapJSONString): Source/WebCore: * dom/Document.cpp: (WebCore::Document::didLogMessage):Update for API change. Don't check for main thread, that is already done in addConsoleMessage. * dom/Document.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): Cleanup logging. * html/track/DataCue.cpp: (WebCore::DataCue::toJSONString const): Serialize to JSON string. (WebCore::DataCue::toString const): Deleted. * html/track/DataCue.h: (WTF::LogArgument<WebCore::DataCue>::toString): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toJSON const): Ditto. (WebCore::TextTrackCue::toJSONString const): (WebCore::TextTrackCue::toString const): Deleted. * html/track/TextTrackCue.h: (WTF::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::toJSONString const): Ditto. (WebCore::TextTrackCueGeneric::toString const): Deleted. * html/track/TextTrackCueGeneric.h: (WTF::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/VTTCue.cpp: (WebCore::VTTCue::toJSONString const): Ditto. (WebCore::VTTCue::toString const): Deleted. * html/track/VTTCue.h: (WTF::LogArgument<WebCore::VTTCue>::toString): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toJSONString const): Ditto. (WTF::LogArgument<WebCore::GenericCueData>::toString): (WebCore::GenericCueData::toString const): Deleted. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Cleanup logging. (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Log the entire cue. (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Cleanup logging. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable const): Don't log, it isn't interesting and happens frequently. (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable const): Ditto. * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::toJSONString const): Serialize to JSON string. * platform/graphics/iso/ISOVTTCue.h: (WTF::LogArgument<WebCore::ISOWebVTTCue>::toString): Ditto. Source/WTF: * wtf/Logger.h: (WTF::Logger::log): (WTF::LogArgument<Logger::LogSiteIdentifier>::toString): * wtf/MediaTime.cpp: (WTF::MediaTime::toJSONString const): Serialize to JSON string. * wtf/MediaTime.h: LayoutTests: * inspector/canvas/recording-2d-expected.txt: * inspector/canvas/recording-webgl-expected.txt: * inspector/canvas/recording-webgl-snapshots-expected.txt: Canonical link: https://commits.webkit.org/196579@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 00:41:54 +00:00
using WTF::JSONLogValue;