2018-10-17 Commit Queue Unreviewed, rolling out r237208. https://bugs.webkit.org/show_bug.cgi?id=190691 Caused the API test that was changed to failure continuously (Requested by Truitt on #webkit). Reverted changeset: "[Media] Use nanoseconds as MaximumTimeScale" https://bugs.webkit.org/show_bug.cgi?id=190631 https://trac.webkit.org/changeset/237208 2018-10-16 Alicia Boya GarcĂ­a [Media] Use nanoseconds as MaximumTimeScale https://bugs.webkit.org/show_bug.cgi?id=190631 1e9 is a much more useful timescale than the previous one 2^31-1. Unlike 2^31-1, which is a prime number, nanosecond scale is pretty common among some formats like WebM and frameworks like GStreamer where base 10 timescale is common... and it's those big timescales the ones that are usually scaled up to MaximumTimeScale. Reviewed by Jer Noble. * wtf/MediaTime.cpp: 2018-10-15 Keith Miller Support arm64 CPUs with a 32-bit address space https://bugs.webkit.org/show_bug.cgi?id=190273 Reviewed by Michael Saboff. Use WTF_CPU_ADDRESS64/32 to decide if the system is running on arm64_32. * wtf/MathExtras.h: (getLSBSet): * wtf/Platform.h: 2018-10-15 Timothy Hatcher Add support for prefers-color-scheme media query https://bugs.webkit.org/show_bug.cgi?id=190499 rdar://problem/45212025 Reviewed by Dean Jackson. * wtf/FeatureDefines.h: Added ENABLE_DARK_MODE_CSS. 2018-10-15 Saam barati Emit fjcvtzs on ARM64E on Darwin https://bugs.webkit.org/show_bug.cgi?id=184023 Reviewed by Yusuke Suzuki and Filip Pizlo. * wtf/Platform.h: 2018-10-15 Alex Christensen Use pragma once in WTF https://bugs.webkit.org/show_bug.cgi?id=190527 Reviewed by Chris Dumez. We also need to consistently include wtf headers from within wtf so we can build wtf without symbol redefinition errors from including the copy in Source and the copy in the build directory. * wtf/ASCIICType.h: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Atomics.h: * wtf/AutomaticThread.cpp: * wtf/AutomaticThread.h: * wtf/BackwardsGraph.h: * wtf/Bag.h: * wtf/BagToHashMap.h: * wtf/BitVector.cpp: * wtf/BitVector.h: * wtf/Bitmap.h: * wtf/BloomFilter.h: * wtf/Box.h: * wtf/BubbleSort.h: * wtf/BumpPointerAllocator.h: * wtf/ByteOrder.h: * wtf/CPUTime.cpp: * wtf/CallbackAggregator.h: * wtf/CheckedArithmetic.h: * wtf/CheckedBoolean.h: * wtf/ClockType.cpp: * wtf/ClockType.h: * wtf/CommaPrinter.h: * wtf/CompilationThread.cpp: * wtf/CompilationThread.h: * wtf/Compiler.h: * wtf/ConcurrentPtrHashSet.cpp: * wtf/ConcurrentVector.h: * wtf/Condition.h: * wtf/CountingLock.cpp: * wtf/CrossThreadTaskHandler.cpp: * wtf/CryptographicUtilities.cpp: * wtf/CryptographicUtilities.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/CryptographicallyRandomNumber.h: * wtf/CurrentTime.cpp: * wtf/DataLog.cpp: * wtf/DataLog.h: * wtf/DateMath.cpp: * wtf/DateMath.h: * wtf/DecimalNumber.cpp: * wtf/DecimalNumber.h: * wtf/Deque.h: * wtf/DisallowCType.h: * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/FastBitVector.cpp: * wtf/FastMalloc.cpp: * wtf/FastMalloc.h: * wtf/FeatureDefines.h: * wtf/FilePrintStream.cpp: * wtf/FilePrintStream.h: * wtf/FlipBytes.h: * wtf/FunctionDispatcher.cpp: * wtf/FunctionDispatcher.h: * wtf/GetPtr.h: * wtf/Gigacage.cpp: * wtf/GlobalVersion.cpp: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.cpp: * wtf/GregorianDateTime.h: * wtf/HashFunctions.h: * wtf/HashMap.h: * wtf/HashMethod.h: * wtf/HashSet.h: * wtf/HashTable.cpp: * wtf/HashTraits.h: * wtf/Indenter.h: * wtf/IndexSparseSet.h: * wtf/InlineASM.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/JSONValues.cpp: * wtf/JSValueMalloc.cpp: * wtf/LEBDecoder.h: * wtf/Language.cpp: * wtf/ListDump.h: * wtf/Lock.cpp: * wtf/Lock.h: * wtf/LockAlgorithm.h: * wtf/LockedPrintStream.cpp: * wtf/Locker.h: * wtf/MD5.cpp: * wtf/MD5.h: * wtf/MainThread.cpp: * wtf/MainThread.h: * wtf/MallocPtr.h: * wtf/MathExtras.h: * wtf/MediaTime.cpp: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.cpp: * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: * wtf/MetaAllocator.h: * wtf/MetaAllocatorHandle.h: * wtf/MonotonicTime.cpp: * wtf/MonotonicTime.h: * wtf/NakedPtr.h: * wtf/NoLock.h: * wtf/NoTailCalls.h: * wtf/Noncopyable.h: * wtf/NumberOfCores.cpp: * wtf/NumberOfCores.h: * wtf/OSAllocator.h: * wtf/OSAllocatorPosix.cpp: * wtf/OSRandomSource.cpp: * wtf/OSRandomSource.h: * wtf/ObjcRuntimeExtras.h: * wtf/OrderMaker.h: * wtf/PackedIntVector.h: * wtf/PageAllocation.h: * wtf/PageBlock.cpp: * wtf/PageBlock.h: * wtf/PageReservation.h: * wtf/ParallelHelperPool.cpp: * wtf/ParallelHelperPool.h: * wtf/ParallelJobs.h: * wtf/ParallelJobsLibdispatch.h: * wtf/ParallelVectorIterator.h: * wtf/ParkingLot.cpp: * wtf/ParkingLot.h: * wtf/Platform.h: * wtf/PointerComparison.h: * wtf/Poisoned.cpp: * wtf/PrintStream.cpp: * wtf/PrintStream.h: * wtf/ProcessID.h: * wtf/ProcessPrivilege.cpp: * wtf/RAMSize.cpp: * wtf/RAMSize.h: * wtf/RandomDevice.cpp: * wtf/RandomNumber.cpp: * wtf/RandomNumber.h: * wtf/RandomNumberSeed.h: * wtf/RangeSet.h: * wtf/RawPointer.h: * wtf/ReadWriteLock.cpp: * wtf/RedBlackTree.h: * wtf/Ref.h: * wtf/RefCountedArray.h: * wtf/RefCountedLeakCounter.cpp: * wtf/RefCountedLeakCounter.h: * wtf/RefCounter.h: * wtf/RefPtr.h: * wtf/RetainPtr.h: * wtf/RunLoop.cpp: * wtf/RunLoop.h: * wtf/RunLoopTimer.h: * wtf/RunLoopTimerCF.cpp: * wtf/SHA1.cpp: * wtf/SHA1.h: * wtf/SaturatedArithmetic.h: (saturatedSubtraction): * wtf/SchedulePair.h: * wtf/SchedulePairCF.cpp: * wtf/SchedulePairMac.mm: * wtf/ScopedLambda.h: * wtf/Seconds.cpp: * wtf/Seconds.h: * wtf/SegmentedVector.h: * wtf/SentinelLinkedList.h: * wtf/SharedTask.h: * wtf/SimpleStats.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SixCharacterHash.cpp: * wtf/SixCharacterHash.h: * wtf/SmallPtrSet.h: * wtf/Spectrum.h: * wtf/StackBounds.cpp: * wtf/StackBounds.h: * wtf/StackStats.cpp: * wtf/StackStats.h: * wtf/StackTrace.cpp: * wtf/StdLibExtras.h: * wtf/StreamBuffer.h: * wtf/StringHashDumpContext.h: * wtf/StringPrintStream.cpp: * wtf/StringPrintStream.h: * wtf/ThreadGroup.cpp: * wtf/ThreadMessage.cpp: * wtf/ThreadSpecific.h: * wtf/Threading.cpp: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: * wtf/ThreadingPthreads.cpp: * wtf/TimeWithDynamicClockType.cpp: * wtf/TimeWithDynamicClockType.h: * wtf/TimingScope.cpp: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/TriState.h: * wtf/TypeCasts.h: * wtf/UUID.cpp: * wtf/UnionFind.h: * wtf/VMTags.h: * wtf/ValueCheck.h: * wtf/Vector.h: * wtf/VectorTraits.h: * wtf/WallTime.cpp: * wtf/WallTime.h: * wtf/WeakPtr.h: * wtf/WeakRandom.h: * wtf/WordLock.cpp: * wtf/WordLock.h: * wtf/WorkQueue.cpp: * wtf/WorkQueue.h: * wtf/WorkerPool.cpp: * wtf/cf/LanguageCF.cpp: * wtf/cf/RunLoopCF.cpp: * wtf/cocoa/Entitlements.mm: * wtf/cocoa/MachSendRight.cpp: * wtf/cocoa/MainThreadCocoa.mm: * wtf/cocoa/MemoryFootprintCocoa.cpp: * wtf/cocoa/WorkQueueCocoa.cpp: * wtf/dtoa.cpp: * wtf/dtoa.h: * wtf/ios/WebCoreThread.cpp: * wtf/ios/WebCoreThread.h: * wtf/mac/AppKitCompatibilityDeclarations.h: * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: * wtf/mbmalloc.cpp: * wtf/persistence/PersistentCoders.cpp: * wtf/persistence/PersistentDecoder.cpp: * wtf/persistence/PersistentEncoder.cpp: * wtf/spi/cf/CFBundleSPI.h: * wtf/spi/darwin/CommonCryptoSPI.h: * wtf/text/ASCIIFastPath.h: * wtf/text/ASCIILiteral.cpp: * wtf/text/AtomicString.cpp: * wtf/text/AtomicString.h: * wtf/text/AtomicStringHash.h: * wtf/text/AtomicStringImpl.cpp: * wtf/text/AtomicStringImpl.h: * wtf/text/AtomicStringTable.cpp: * wtf/text/AtomicStringTable.h: * wtf/text/Base64.cpp: * wtf/text/CString.cpp: * wtf/text/CString.h: * wtf/text/ConversionMode.h: * wtf/text/ExternalStringImpl.cpp: * wtf/text/IntegerToStringConversion.h: * wtf/text/LChar.h: * wtf/text/LineEnding.cpp: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.cpp: * wtf/text/StringBuilder.h: * wtf/text/StringBuilderJSON.cpp: * wtf/text/StringCommon.h: * wtf/text/StringConcatenate.h: * wtf/text/StringHash.h: * wtf/text/StringImpl.cpp: * wtf/text/StringImpl.h: * wtf/text/StringOperators.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: * wtf/text/SymbolImpl.cpp: * wtf/text/SymbolRegistry.cpp: * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.cpp: * wtf/text/TextBreakIterator.h: * wtf/text/TextBreakIteratorInternalICU.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.cpp: * wtf/text/UniquedStringImpl.h: * wtf/text/WTFString.cpp: * wtf/text/WTFString.h: * wtf/text/cocoa/StringCocoa.mm: * wtf/text/cocoa/StringViewCocoa.mm: * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp: * wtf/text/icu/UTextProvider.cpp: * wtf/text/icu/UTextProvider.h: * wtf/text/icu/UTextProviderLatin1.cpp: * wtf/text/icu/UTextProviderLatin1.h: * wtf/text/icu/UTextProviderUTF16.cpp: * wtf/text/icu/UTextProviderUTF16.h: * wtf/threads/BinarySemaphore.cpp: * wtf/threads/BinarySemaphore.h: * wtf/threads/Signals.cpp: * wtf/unicode/CharacterNames.h: * wtf/unicode/Collator.h: * wtf/unicode/CollatorDefault.cpp: * wtf/unicode/UTF8.cpp: * wtf/unicode/UTF8.h: 2018-10-12 Alex Christensen Allow encoding of small enum classes https://bugs.webkit.org/show_bug.cgi?id=190531 Reviewed by Tim Horton. * wtf/Forward.h: 2018-10-11 Alexey Proskuryakov Add PLATFORM(IOS_FAMILY) and OS(IOS_FAMILY) https://bugs.webkit.org/show_bug.cgi?id=190477 Reviewed by Tim Horton. Currently, PLATFORM(IOS) and OS(IOS) are true when building for any TARGET_OS_IPHONE target, which is quite confusing. Add a better named alternative, as a first step towards mass replacing PLATFORM(IOS). Can't so it all at once because of dependencies in other source repositories. * wtf/Platform.h: Changed to the new name in this file though. Kept a few instances that actually target iOS only, having a version check. 2018-10-11 Yusuke Suzuki Use currentStackPointer more https://bugs.webkit.org/show_bug.cgi?id=190503 Reviewed by Saam Barati. Use WTF::currentStackPointer more in WebKit to adopt ASAN detect_stack_use_after_return option. * wtf/StackBounds.cpp: (WTF::testStackDirection2): (WTF::testStackDirection): * wtf/ThreadingPthreads.cpp: (WTF::Thread::signalHandlerSuspendResume): (WTF::getApproximateStackPointer): Deleted. 2018-10-11 Ross Kirsling [WTF] Semaphore.h conflicts with POSIX header https://bugs.webkit.org/show_bug.cgi?id=190486 Reviewed by Yusuke Suzuki. Rename Semaphore.h to WTFSemaphore.h to avoid conflict with POSIX semaphore.h on case-insensitive file systems. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/WTFSemaphore.h: Renamed from wtf/Semaphore.h. 2018-10-10 Mark Lam Changes towards allowing use of the ASAN detect_stack_use_after_return option. https://bugs.webkit.org/show_bug.cgi?id=190405 Reviewed by Michael Saboff. Introduce WTF::currentStackPointer() which computes its caller's stack pointer value. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/StackBounds.h: (WTF::StackBounds::checkConsistency const): * wtf/StackPointer.cpp: Added. (WTF::currentStackPointer): * wtf/StackPointer.h: Added. 2018-10-09 Mark Lam StringTypeAdapter constructor is not properly enforcing String::MaxLength. https://bugs.webkit.org/show_bug.cgi?id=190392 Reviewed by Saam Barati. Previously, the StringTypeAdapter constructor for a UChar* string was summing the unsigned length of the source string without an overflow check. We now make that length a size_t which removes this issue, and assert that it's within String::MaxLength thereafter. Also made the StringTypeAdapter constructor for a LChar* string behave in an equivalent manner for consistency. In both cases, we'll crash in a RELEASE_ASSERT if the source string length exceeds String::MaxLength. * wtf/text/StringConcatenate.h: 2018-10-09 Mark Lam Revert temporary asserts for debugging a mysterious ASAN bot crash. https://bugs.webkit.org/show_bug.cgi?id=190396 Reviewed by Yusuke Suzuki. * wtf/StackBounds.cpp: (WTF::StackBounds::newThreadStackBounds): * wtf/StackBounds.h: (WTF::StackBounds::checkConsistency const): 2018-10-08 Aditya Keerthi Make a runtime enabled (on-by-default) feature https://bugs.webkit.org/show_bug.cgi?id=189162 Reviewed by Wenson Hsieh and Tim Horton. * wtf/FeatureDefines.h: 2018-10-06 Mark Lam Adding some temporary asserts with data logging to debug a mysterious ASAN bot crash. https://bugs.webkit.org/show_bug.cgi?id=190334 Reviewed by Yusuke Suzuki. These assertions are needed because we can't reproduce the issue locally. We'll remove these asserts after the needed data has been collected from the bot. * wtf/StackBounds.cpp: (WTF::StackBounds::newThreadStackBounds): * wtf/StackBounds.h: (WTF::StackBounds::checkConsistency const): 2018-10-07 Yusuke Suzuki Name Heap threads https://bugs.webkit.org/show_bug.cgi?id=190337 Reviewed by Mark Lam. Add a functionality naming threads of ParallelHelperPool. * wtf/ParallelHelperPool.cpp: (WTF::ParallelHelperPool::ParallelHelperPool): * wtf/ParallelHelperPool.h: 2018-10-06 Mark Lam Adding some temporary asserts to debug a mysterious ASAN bot crash. https://bugs.webkit.org/show_bug.cgi?id=190331 Reviewed by Filip Pizlo. These assertions are needed because we can't reproduce the issue locally. We'll remove these asserts after the needed data has been collected from the bot. * wtf/StackBounds.h: (WTF::StackBounds::checkConsistency const): 2018-10-05 Yusuke Suzuki [JSC][Linux] Support Perf JITDump logging https://bugs.webkit.org/show_bug.cgi?id=189893 Reviewed by Mark Lam. * wtf/PageReservation.h: (WTF::PageReservation::reserveAndCommitWithGuardPages): 2018-10-03 Dan Bernstein WTF part of [Xcode] Update some build settings as recommended by Xcode 10 https://bugs.webkit.org/show_bug.cgi?id=190250 Reviewed by Alex Christensen. * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF. * WTF.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck. * wtf/MathExtras.h: (WTF::fastLog2): Addressed newly-enabled CLANG_WARN_COMMA by splitting some comma-separated expressions into individual statements. 2018-10-03 Mark Lam Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX. https://bugs.webkit.org/show_bug.cgi?id=190187 Reviewed by Michael Saboff. * wtf/text/StringConcatenate.h: (WTF::tryMakeStringFromAdapters): (WTF::sumWithOverflow): Deleted. * wtf/text/StringImpl.h: * wtf/text/WTFString.h: 2018-10-03 Michael Catanzaro -Wunused-variable in RenderLayer::updateScrollableAreaSet https://bugs.webkit.org/show_bug.cgi?id=190200 Reviewed by Yusuke Suzuki. Add a new UNUSED_VARIABLE() macro. It's the same as UNUSED_PARAM(), just named differently. * wtf/Compiler.h: 2018-10-01 Dean Jackson [macOS] Switching to discrete GPU should be done in the UI process https://bugs.webkit.org/show_bug.cgi?id=189361 Reviewed by Simon Fraser. Define GL_SILENCE_DEPRECATION to avoid deprecation warnings for OpenGL. * wtf/Platform.h: 2018-10-02 Commit Queue Unreviewed, rolling out r236624 and r236671. https://bugs.webkit.org/show_bug.cgi?id=190207 The change in r236624 introduced crashes on the bots (Requested by ryanhaddad on #webkit). Reverted changesets: "Refactoring: eliminate raw pointer usage in Fullscreen code" https://bugs.webkit.org/show_bug.cgi?id=188747 https://trac.webkit.org/changeset/236624 "Unify implementation in VideoFullscreenInterfaceAVKit" https://bugs.webkit.org/show_bug.cgi?id=190091 https://trac.webkit.org/changeset/236671 2018-10-02 Caio Lima [BigInt] BigInt.proptotype.toString is broken when radix is power of 2 https://bugs.webkit.org/show_bug.cgi?id=190033 Reviewed by Yusuke Suzuki. * wtf/MathExtras.h: (WTF::ctz32): 2018-10-01 Andy Estes [watchOS] Adopt NSURLSessionCompanionProxyPreference https://bugs.webkit.org/show_bug.cgi?id=190177 Reviewed by Wenson Hsieh. * wtf/FeatureDefines.h: 2018-10-01 Koby Boyango [WTF][JSCONLY] Use MainThreadWin on Windows in the JSCOnly port https://bugs.webkit.org/show_bug.cgi?id=190121 Reviewed by Yusuke Suzuki. This fixes JSCOnly build on Windows after r236617. * wtf/PlatformJSCOnly.cmake: 2018-10-01 Commit Queue Unreviewed, rolling out r236647. https://bugs.webkit.org/show_bug.cgi?id=190124 Breaking test stress/big-int-to-string.js (Requested by caiolima_ on #webkit). Reverted changeset: "[BigInt] BigInt.proptotype.toString is broken when radix is power of 2" https://bugs.webkit.org/show_bug.cgi?id=190033 https://trac.webkit.org/changeset/236647 2018-09-30 Caio Lima [BigInt] BigInt.proptotype.toString is broken when radix is power of 2 https://bugs.webkit.org/show_bug.cgi?id=190033 Reviewed by Yusuke Suzuki. * wtf/MathExtras.h: (WTF::ctz32): 2018-09-28 Jer Noble Refactoring: eliminate raw pointer usage in Fullscreen code https://bugs.webkit.org/show_bug.cgi?id=188747 Reviewed by Alex Christensen. * WTF.xcodeproj/project.pbxproj: * wtf/WeakPtrContainer.h: Added. 2018-09-28 Yusuke Suzuki [WTF] Make isMainThread more reliable https://bugs.webkit.org/show_bug.cgi?id=189880 Reviewed by Mark Lam. isMainThread() relied on Thread::current(). This API becomes broken in Windows when the Thread is about to be destroyed since TLS is already cleared. This causes a bug since `isMainThread()` is called in Thread::didExit in Windows. This patch makes this `isMainThread` more reliable in all the platforms. In Windows, we use `Thread::currentID()` instead of `Thread::current()` since `Thread::currentID` uses Win32 GetCurrentThreadId directly. In the other system, we use `pthread_main_np` or `pthread_self` instead. We also move `holdLock` code inside `if (shouldRemoveThreadFromThreadGroup())`. If the other thread takes a mutex and destroyed, this `holdLock` waits forever. This problem only happens in Windows since Windows calls TLS destructor for the main thread. * WTF.xcodeproj/project.pbxproj: * wtf/MainThread.cpp: (WTF::initializeMainThread): (): Deleted. (WTF::isMainThread): Deleted. (WTF::isMainThreadIfInitialized): Deleted. * wtf/Platform.h: * wtf/PlatformMac.cmake: * wtf/Threading.cpp: (WTF::Thread::didExit): * wtf/cocoa/MainThreadCocoa.mm: Renamed from Source/WTF/wtf/mac/MainThreadMac.mm. * wtf/generic/MainThreadGeneric.cpp: (WTF::initializeMainThreadPlatform): (WTF::isMainThread): (WTF::isMainThreadIfInitialized): * wtf/win/MainThreadWin.cpp: (WTF::initializeMainThreadPlatform): (WTF::isMainThread): (WTF::isMainThreadIfInitialized): 2018-09-28 Commit Queue Unreviewed, rolling out r236605. https://bugs.webkit.org/show_bug.cgi?id=190087 caused three API test timeouts (Requested by jernoble on #webkit). Reverted changeset: "Refactoring: eliminate raw pointer usage in Fullscreen code" https://bugs.webkit.org/show_bug.cgi?id=188747 https://trac.webkit.org/changeset/236605 2018-09-28 Brian Burg Replace recently added line comments in Compiler.h https://bugs.webkit.org/show_bug.cgi?id=190062 Reviewed by Joseph Pecoraro. This breaks some Apple-internal tooling. For now, work around it by changing the comment style. On the other side, the issue will be fixed more permanently by adopting the approach from r230213. * wtf/Compiler.h: Use multiline comments. 2018-09-28 Jer Noble Refactoring: eliminate raw pointer usage in Fullscreen code https://bugs.webkit.org/show_bug.cgi?id=188747 Reviewed by Alex Christensen. * WTF.xcodeproj/project.pbxproj: * wtf/WeakPtrContainer.h: Added. 2018-09-28 Koby Boyango [WTF] Add ExternalStringImpl, a StringImpl for user controlled buffers https://bugs.webkit.org/show_bug.cgi?id=189991 Reviewed by Yusuke Suzuki. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/text/ExternalStringImpl.cpp: Added. * wtf/text/ExternalStringImpl.h: Added. * wtf/text/StringImpl.cpp: * wtf/text/StringImpl.h: 2018-09-27 Saam barati Verify the contents of AssemblerBuffer on arm64e https://bugs.webkit.org/show_bug.cgi?id=190057 Reviewed by Mark Lam. * wtf/PtrTag.h: (WTF::tagInt): 2018-09-27 Jer Noble MediaPlayer should have mediaPlayerWaitingForKeyChanged() / bool waitingForKey() accessor https://bugs.webkit.org/show_bug.cgi?id=189951 Reviewed by Eric Carlson. Templated functions should take r-value references, as they have perfect type deduction for all parameter types; references, l-value references, and r-value references in template function parameters have special type deduction semantics. See: Previously, const reference parameters would be copied when passed into anyOf(), and containers of Ref<> would generate compile errors when passed into anyOf, as they cannot be copied. Now, with r-value reference types in template parameters, a const reference is mapped to a const reference, a non-const reference is mapped to a non-const reference, and a r-value reference is mapped to an r-value reference. * wtf/Algorithms.h: (WTF::forEach): (WTF::anyOf): (WTF::allOf): 2018-09-25 John Wilander Change from HAVE(CFNETWORK_STORAGE_PARTITIONING) to ENABLE(RESOURCE_LOAD_STATISTICS) https://bugs.webkit.org/show_bug.cgi?id=189959 Reviewed by Chris Dumez. * wtf/Platform.h: Enables RESOURCE_LOAD_STATISTICS for Cocoa platforms. 2018-09-24 Fujii Hironori Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE https://bugs.webkit.org/show_bug.cgi?id=189733 Reviewed by Michael Catanzaro. Clang for Windows build enables WTF_COMPILER_CLANG and WTF_COMPILER_MSVC, but disables WTF_COMPILER_GCC_OR_CLANG. It is strange WTF_COMPILER_GCC_OR_CLANG is not enabled even though WTF_COMPILER_CLANG is enabled. However, Clang for Windows imitates MSVC, and codes for COMPILER(GCC_OR_CLANG) are for non MSVC. At least at the moment, it is not feasible to define WTF_COMPILER_GCC_OR_CLANG for Clang for Windows. To solve the issue, this change renames WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE. As an exception, I'd like to use IGNORE_WARNINGS_* macros even in Clang for Windows builds. * wtf/Assertions.cpp: Replaced COMPILER(GCC_OR_CLANG) with COMPILER(GCC_COMPATIBLE). * wtf/Assertions.h: Ditto. * wtf/Atomics.h: Ditto. * wtf/CheckedArithmetic.h: Ditto. * wtf/FastMalloc.h: Ditto. * wtf/MathExtras.h: Ditto. * wtf/Platform.h: Ditto. * wtf/StdLibExtras.h: Ditto. * wtf/Vector.h: Ditto. * wtf/text/ASCIIFastPath.h: Ditto. * wtf/Compiler.h: Ditto. Replaced "COMPILER(GCC_OR_CLANG)" with "COMPILER(GCC) || COMPILER(CLANG)" of IGNORE_WARNINGS_* macros. 2018-09-21 Yusuke Suzuki [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration https://bugs.webkit.org/show_bug.cgi?id=189778 Reviewed by Keith Miller. This patch adds ENABLE(C_LOOP) which indicates we use CLoop as the interpreter. Previously, we used !ENABLE(JIT) for this configuration. But now, we have a build configuration that has LLInt ASM interpreter (not CLoop) and !ENABLE(JIT). We enable LLInt ASM interpreter for non JIT environment in X86_64 and ARM64 architectures. And we enable ENABLE(ASSEMBLER) for non JIT environment since it offers machine register information which is used for LLInt and SamplingProfiler. * wtf/Platform.h: 2018-09-21 Keith Miller Add Promise SPI https://bugs.webkit.org/show_bug.cgi?id=189809 Reviewed by Saam Barati. Fix issue where creating a JSContextRef off the main thread before creating initializing the main thread would cause an assertion failure. * wtf/MainThread.cpp: (WTF::isMainThreadIfInitialized): * wtf/MainThread.h: * wtf/mac/MainThreadMac.mm: (WTF::isMainThreadIfInitialized): * wtf/text/cf/StringImplCF.cpp: (WTF::StringImpl::createCFString): 2018-09-21 Ryan Haddad Unreviewed, rolling out r236359. Broke the Windows build. Reverted changeset: "Add Promise SPI" https://bugs.webkit.org/show_bug.cgi?id=189809 https://trac.webkit.org/changeset/236359 2018-09-21 Keith Miller Add Promise SPI https://bugs.webkit.org/show_bug.cgi?id=189809 Reviewed by Saam Barati. Fix issue where creating a JSContextRef off the main thread before creating initializing the main thread would cause an assertion failure. * wtf/MainThread.cpp: (WTF::isMainThreadIfInitialized): * wtf/MainThread.h: * wtf/mac/MainThreadMac.mm: (WTF::isMainThreadIfInitialized): * wtf/text/cf/StringImplCF.cpp: (WTF::StringImpl::createCFString): 2018-09-20 Fujii Hironori [Win][Clang] UNUSED_PARAM(this) causes compilation error of "cannot take the address of an rvalue of type" https://bugs.webkit.org/show_bug.cgi?id=189732 Reviewed by Per Arne Vollan. Clang for Windows can't compile the MSVC workaround of UNUSED_PARAM which has been introduced for Windows CE and Visual Studio 10. I think it's safe just to remove it. * wtf/Compiler.h: Removed the code for COMPILER(MSVC). 2018-09-20 Alex Christensen Unreviewed, rolling out r235976. Broke ARM Reverted changeset: "Use a Variant instead of a union in CSSSelector" https://bugs.webkit.org/show_bug.cgi?id=188559 https://trac.webkit.org/changeset/235976 2018-09-17 Yusuke Suzuki [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t https://bugs.webkit.org/show_bug.cgi?id=185339 Reviewed by Mark Lam. This patch adds WTF::Semaphore, which is based on WTF::Lock and WTF::Condition. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Semaphore.h: Added. (WTF::Semaphore::Semaphore): (WTF::Semaphore::signal): (WTF::Semaphore::waitUntil): (WTF::Semaphore::waitFor): (WTF::Semaphore::wait): * wtf/generic/WorkQueueGeneric.cpp: (WorkQueue::platformInitialize): * wtf/threads/BinarySemaphore.cpp: (WTF::BinarySemaphore::waitUntil): (WTF::BinarySemaphore::wait): Deleted. * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): (WTF::BinarySemaphore::wait): Align the names of the functions to WTF::Condition. Add BinarySemaphore::wait(), which is the same to waitUntil(WallTime::infinity()). 2018-09-17 Jer Noble Add support for HEVC codec types in Media Capabilities https://bugs.webkit.org/show_bug.cgi?id=189565 Reviewed by Eric Carlson. Extract the toIntegralType template into its own header. * wtf/CMakeLists.txt: * wtf/text/StringConversion.h: Added. (isCharacterAllowedInBase): (toIntegralType): * wtf/text/WTFString.cpp: 2018-09-17 Jer Noble Enable USE_MEDIAREMOTE on iOS https://bugs.webkit.org/show_bug.cgi?id=189096 Reviewed by Eric Carlson. * wtf/Platform.h: 2018-09-17 Frederic Wang Build error in ImageBufferCG when compiled with IOSurfacePool https://bugs.webkit.org/show_bug.cgi?id=189579 Reviewed by Tim Horton. IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing compilation errors when files in the same unified source do not agree on the definition. This patch moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files. Finally some minors changes to explicitly declare/define ImageBuffer are performed in order to prevent future issues with Unified build rotating. * wtf/Platform.h: Move definition from ImageBufferDataCG.h. 2018-09-14 Ryan Haddad Unreviewed, rolling out r235990. Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS Reverted changeset: "Enable USE_MEDIAREMOTE on iOS" https://bugs.webkit.org/show_bug.cgi?id=189096 https://trac.webkit.org/changeset/235990 2018-09-13 Jer Noble Enable USE_MEDIAREMOTE on iOS https://bugs.webkit.org/show_bug.cgi?id=189096 Reviewed by Eric Carlson. * wtf/Platform.h: 2018-09-13 Alex Christensen Use a Variant instead of a union in CSSSelector https://bugs.webkit.org/show_bug.cgi?id=188559 Reviewed by Antti Koivisto. * wtf/Variant.h: Add packing macros to make it so Variant-containing structures don't always have 7 bytes of padding per Variant. 2018-09-12 Guillaume Emont Add IGNORE_WARNING_.* macros https://bugs.webkit.org/show_bug.cgi?id=188996 Reviewed by Michael Catanzaro. * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Compiler.h: * wtf/MD5.cpp: (WTF::MD5::MD5): (WTF::MD5::addBytes): (WTF::MD5::checksum): * wtf/PrintStream.cpp: (WTF::PrintStream::printfVariableFormat): * wtf/SHA1.cpp: (WTF::SHA1::SHA1): (WTF::SHA1::addBytes): (WTF::SHA1::computeHash): * wtf/ThreadingPthreads.cpp: * wtf/Vector.h: (WTF::VectorBuffer::endOfBuffer): * wtf/text/WTFString.cpp: (WTF::createWithFormatAndArguments): == Rolled over to ChangeLog-2018-09-11 ==