efb9089bb1e6f70cfe49e47b5d4993995222d608
[WebKit-https.git] / Source / WTF / ChangeLog
1 2019-08-17  Sam Weinig  <weinig@apple.com>
2
3         Rename StringBuilder::flexibleAppend(...) to StringBuilder::append(...)
4         https://bugs.webkit.org/show_bug.cgi?id=200756
5
6         Reviewed by Darin Adler.
7
8         Now that there are no remaining multi-parameter or behavior changing overloads
9         of StringBuilder::append(...), we can rename StringBuilder::flexibleAppend(...)
10         to StringBuilder::append(...).
11         
12         This change leaves the existing single parameter overloads StringBuilder::append(...)
13         for now, and since they have specify specific types, they will continue to be prefered
14         in overload resolution. Once we have concluded the variadic StringBuilder::append(...)
15         can provide the same performance as the single parameter variant, we can remove the
16         single parameter variant.
17
18         * wtf/posix/FileSystemPOSIX.cpp:
19         (WTF::FileSystemImpl::pathByAppendingComponents):
20         * wtf/text/StringBuilder.h:
21         (WTF::StringBuilder::appendFromAdapters):
22         (WTF::StringBuilder::append):
23         (WTF::StringBuilder::flexibleAppendFromAdapters): Deleted.
24         (WTF::StringBuilder::flexibleAppend): Deleted.
25         Update for rename from StringBuilder::flexibleAppend(...) to StringBuilder::append(...).
26
27 2019-08-15  Ryosuke Niwa  <rniwa@webkit.org>
28
29         Don't use union to store NodeRareData* and RenderObject*
30         https://bugs.webkit.org/show_bug.cgi?id=200744
31
32         Reviewed by Antti Koivisto.
33
34         Moved the static assert which requires the type of the object to which the pointer type points
35         into setPointer so that we can use CompactPointerTuple<T*, U> as a member variable
36         with just a forward declaration of T.
37
38         * wtf/CompactPointerTuple.h:
39         (WTF::CompactPointerTuple::setPointer):
40
41 2019-08-15  Zalan Bujtas  <zalan@apple.com>
42
43         [ContentChangeObserver] Keep track of all the visibility candidates.
44         https://bugs.webkit.org/show_bug.cgi?id=200777
45         <rdar://problem/54356331>
46
47         Reviewed by Simon Fraser.
48
49         * wtf/WeakHashSet.h:
50
51 2019-08-15  Brent Fulgham  <bfulgham@apple.com>
52
53         [FTW] Enable CoreFoundation use if building for Apple target
54         https://bugs.webkit.org/show_bug.cgi?id=200799
55
56         Reviewed by Alex Christensen.
57
58         * wtf/PlatformFTW.cmake: Add missing files.
59
60 2019-08-15  Commit Queue  <commit-queue@webkit.org>
61
62         Unreviewed, rolling out r248440.
63         https://bugs.webkit.org/show_bug.cgi?id=200772
64
65         Introduced regressions related to loading of local files.
66         (Requested by perarne on #webkit).
67
68         Reverted changeset:
69
70         "[Mac] Use the PID of the WebContent process when issuing
71         local file read sandbox extensions"
72         https://bugs.webkit.org/show_bug.cgi?id=200543
73         https://trac.webkit.org/changeset/248440
74
75 2019-08-14  Kate Cheney  <katherine_cheney@apple.com>
76
77         FileSystem::deleteFile should log error status (178347)
78         https://bugs.webkit.org/show_bug.cgi?id=178347
79
80         Reviewed by Brent Fulgham.
81
82         I added logging to the FileSystem::deleteFile function so that the debugger will
83         be able to see the associated errno string and better understand the reason for an
84         unlink failure or will know if the fileSystemRepresentation call was not
85         successful (or returned null).
86
87         * wtf/posix/FileSystemPOSIX.cpp:
88         (WTF::FileSystemImpl::deleteFile):
89
90 2019-08-14  Keith Rollin  <krollin@apple.com>
91
92         Remove support for macOS < 10.13
93         https://bugs.webkit.org/show_bug.cgi?id=200694
94         <rdar://problem/54278851>
95
96         Reviewed by Youenn Fablet.
97
98         Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
99         __MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
100         101300. This means that expressions like
101         "__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
102         "__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.
103
104         * wtf/FeatureDefines.h:
105         * wtf/Platform.h:
106         * wtf/mac/AppKitCompatibilityDeclarations.h:
107         * wtf/spi/darwin/SandboxSPI.h:
108
109 2019-08-14  Yusuke Suzuki  <ysuzuki@apple.com>
110
111         [JSC] Less contended MetaAllocator
112         https://bugs.webkit.org/show_bug.cgi?id=200278
113
114         Reviewed by Mark Lam.
115
116         * wtf/MetaAllocator.cpp:
117         (WTF::MetaAllocator::incrementPageOccupancy):
118         (WTF::MetaAllocator::decrementPageOccupancy):
119         * wtf/MetaAllocator.h:
120
121 2019-08-14  Samuel Groß  <saelo@google.com>
122
123         [JSCOnly] JSCOnly port doesn't build on macOS
124         https://bugs.webkit.org/show_bug.cgi?id=200667
125
126         spi/darwin/ProcessMemoryFootprint.h is required by jsc.cpp so we add it to the WTF_PUBLIC_HEADERS.
127
128         Reviewed by Alex Christensen.
129
130         * wtf/PlatformJSCOnly.cmake:
131         * wtf/PlatformMac.cmake:
132
133 2019-08-13  Sam Weinig  <weinig@apple.com>
134
135         Rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32) to avoid accidental change in behavior when replacing append with flexibleAppend
136         https://bugs.webkit.org/show_bug.cgi?id=200675
137
138         Reviewed by Darin Adler.
139
140         When we switch StringBuilder::append(...) to be based on the StringConcatenate/makeString flexibleAppend 
141         implementation, if we don't change anything, the behavior of StringBuilder::append(UChar32) will go from 
142         appending a character to appending a stringified number.
143
144         To work around this, we can rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32) 
145         and update all the call sites.
146
147         * wtf/text/StringBuilder.h:
148         (WTF::StringBuilder::appendCharacter):
149         Renamed StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).
150
151         * wtf/FileSystem.cpp:
152         (WTF::FileSystemImpl::decodeFromFilename):
153         Update for new name.
154
155 2019-08-13  Yusuke Suzuki  <ysuzuki@apple.com>
156
157         Unreviewed, build fix for Windows
158         https://bugs.webkit.org/show_bug.cgi?id=200611
159
160         * wtf/win/GDIObject.h:
161
162 2019-08-12  Takashi Komori  <Takashi.Komori@sony.com>
163
164         [WTF] Thread::removeFromThreadGroup leaks weak pointers.
165         https://bugs.webkit.org/show_bug.cgi?id=199857
166
167         Reviewed by Yusuke Suzuki.
168
169         Fix leaking of ThreadGroup's weak pointers.
170
171         Tests: WTF.ThreadGroupRemove API tests
172
173         * wtf/Threading.cpp:
174         (WTF::Thread::didExit):
175         (WTF::Thread::addToThreadGroup):
176         (WTF::Thread::removeFromThreadGroup):
177         (WTF::Thread::numberOfThreadGroups):
178         * wtf/Threading.h:
179
180 2019-08-12  Sam Weinig  <weinig@apple.com>
181
182         Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
183         https://bugs.webkit.org/show_bug.cgi?id=200614
184
185         Reviewed by Darin Adler.
186
187         Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and 
188         StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).
189         
190         Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to 
191         StringBuilder::appendSubstring(...).
192
193         * wtf/HexNumber.h:
194         (WTF::appendUnsignedAsHexFixedSize):
195         Add overload that explicitly takes a StringBuilder to work around rename from append to appendCharacters.
196
197         * wtf/text/StringBuilder.cpp:
198         (WTF::StringBuilder::appendCharacters):
199         (WTF::StringBuilder::append):
200         * wtf/text/StringBuilder.h:
201         (WTF::StringBuilder::appendCharacters):
202         (WTF::StringBuilder::append):
203         (WTF::StringBuilder::appendSubstring):
204         (WTF::StringBuilder::appendLiteral):
205         (WTF::IntegerToStringConversionTrait<StringBuilder>::flush):
206         Update for renames.
207
208 2019-08-12  Yusuke Suzuki  <ysuzuki@apple.com>
209
210         [WTF][JSC] Make JSC and WTF aggressively-fast-malloced
211         https://bugs.webkit.org/show_bug.cgi?id=200611
212
213         Reviewed by Saam Barati.
214
215         WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`.
216         Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED
217         more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited.
218
219         * wtf/Assertions.cpp:
220         * wtf/Atomics.h:
221         * wtf/AutodrainedPool.h:
222         * wtf/Bag.h:
223         (WTF::Bag::Bag): Deleted.
224         (WTF::Bag::~Bag): Deleted.
225         (WTF::Bag::clear): Deleted.
226         (WTF::Bag::add): Deleted.
227         (WTF::Bag::iterator::iterator): Deleted.
228         (WTF::Bag::iterator::operator! const): Deleted.
229         (WTF::Bag::iterator::operator* const): Deleted.
230         (WTF::Bag::iterator::operator++): Deleted.
231         (WTF::Bag::iterator::operator== const): Deleted.
232         (WTF::Bag::iterator::operator!= const): Deleted.
233         (WTF::Bag::begin): Deleted.
234         (WTF::Bag::begin const): Deleted.
235         (WTF::Bag::end const): Deleted.
236         (WTF::Bag::isEmpty const): Deleted.
237         (WTF::Bag::unwrappedHead const): Deleted.
238         * wtf/BitVector.h:
239         (WTF::BitVector::BitVector): Deleted.
240         (WTF::BitVector::~BitVector): Deleted.
241         (WTF::BitVector::operator=): Deleted.
242         (WTF::BitVector::size const): Deleted.
243         (WTF::BitVector::ensureSize): Deleted.
244         (WTF::BitVector::quickGet const): Deleted.
245         (WTF::BitVector::quickSet): Deleted.
246         (WTF::BitVector::quickClear): Deleted.
247         (WTF::BitVector::get const): Deleted.
248         (WTF::BitVector::contains const): Deleted.
249         (WTF::BitVector::set): Deleted.
250         (WTF::BitVector::add): Deleted.
251         (WTF::BitVector::ensureSizeAndSet): Deleted.
252         (WTF::BitVector::clear): Deleted.
253         (WTF::BitVector::remove): Deleted.
254         (WTF::BitVector::merge): Deleted.
255         (WTF::BitVector::filter): Deleted.
256         (WTF::BitVector::exclude): Deleted.
257         (WTF::BitVector::bitCount const): Deleted.
258         (WTF::BitVector::isEmpty const): Deleted.
259         (WTF::BitVector::findBit const): Deleted.
260         (WTF::BitVector::isEmptyValue const): Deleted.
261         (WTF::BitVector::isDeletedValue const): Deleted.
262         (WTF::BitVector::isEmptyOrDeletedValue const): Deleted.
263         (WTF::BitVector::operator== const): Deleted.
264         (WTF::BitVector::hash const): Deleted.
265         (WTF::BitVector::iterator::iterator): Deleted.
266         (WTF::BitVector::iterator::operator* const): Deleted.
267         (WTF::BitVector::iterator::operator++): Deleted.
268         (WTF::BitVector::iterator::isAtEnd const): Deleted.
269         (WTF::BitVector::iterator::operator== const): Deleted.
270         (WTF::BitVector::iterator::operator!= const): Deleted.
271         (WTF::BitVector::begin const): Deleted.
272         (WTF::BitVector::end const): Deleted.
273         (WTF::BitVector::bitsInPointer): Deleted.
274         (WTF::BitVector::maxInlineBits): Deleted.
275         (WTF::BitVector::byteCount): Deleted.
276         (WTF::BitVector::makeInlineBits): Deleted.
277         (WTF::BitVector::cleanseInlineBits): Deleted.
278         (WTF::BitVector::bitCount): Deleted.
279         (WTF::BitVector::findBitFast const): Deleted.
280         (WTF::BitVector::findBitSimple const): Deleted.
281         (WTF::BitVector::OutOfLineBits::numBits const): Deleted.
282         (WTF::BitVector::OutOfLineBits::numWords const): Deleted.
283         (WTF::BitVector::OutOfLineBits::bits): Deleted.
284         (WTF::BitVector::OutOfLineBits::bits const): Deleted.
285         (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted.
286         (WTF::BitVector::isInline const): Deleted.
287         (WTF::BitVector::outOfLineBits const): Deleted.
288         (WTF::BitVector::outOfLineBits): Deleted.
289         (WTF::BitVector::bits): Deleted.
290         (WTF::BitVector::bits const): Deleted.
291         * wtf/Bitmap.h:
292         (WTF::Bitmap::size): Deleted.
293         (WTF::Bitmap::iterator::iterator): Deleted.
294         (WTF::Bitmap::iterator::operator* const): Deleted.
295         (WTF::Bitmap::iterator::operator++): Deleted.
296         (WTF::Bitmap::iterator::operator== const): Deleted.
297         (WTF::Bitmap::iterator::operator!= const): Deleted.
298         (WTF::Bitmap::begin const): Deleted.
299         (WTF::Bitmap::end const): Deleted.
300         * wtf/Box.h:
301         * wtf/BumpPointerAllocator.h:
302         * wtf/CPUTime.h:
303         * wtf/CheckedBoolean.h:
304         * wtf/CommaPrinter.h:
305         (WTF::CommaPrinter::CommaPrinter): Deleted.
306         (WTF::CommaPrinter::dump const): Deleted.
307         (WTF::CommaPrinter::didPrint const): Deleted.
308         * wtf/CompactPointerTuple.h:
309         (WTF::CompactPointerTuple::encodeType): Deleted.
310         (WTF::CompactPointerTuple::decodeType): Deleted.
311         (WTF::CompactPointerTuple::CompactPointerTuple): Deleted.
312         (WTF::CompactPointerTuple::pointer const): Deleted.
313         (WTF::CompactPointerTuple::setPointer): Deleted.
314         (WTF::CompactPointerTuple::type const): Deleted.
315         (WTF::CompactPointerTuple::setType): Deleted.
316         * wtf/CompilationThread.h:
317         (WTF::CompilationScope::CompilationScope): Deleted.
318         (WTF::CompilationScope::~CompilationScope): Deleted.
319         (WTF::CompilationScope::leaveEarly): Deleted.
320         * wtf/CompletionHandler.h:
321         (WTF::CompletionHandler<Out):
322         (WTF::Detail::CallableWrapper<CompletionHandler<Out):
323         (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted.
324         (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted.
325         (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted.
326         * wtf/ConcurrentBuffer.h:
327         (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted.
328         (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted.
329         (WTF::ConcurrentBuffer::growExact): Deleted.
330         (WTF::ConcurrentBuffer::grow): Deleted.
331         (WTF::ConcurrentBuffer::array const): Deleted.
332         (WTF::ConcurrentBuffer::operator[]): Deleted.
333         (WTF::ConcurrentBuffer::operator[] const): Deleted.
334         (WTF::ConcurrentBuffer::createArray): Deleted.
335         * wtf/ConcurrentPtrHashSet.h:
336         (WTF::ConcurrentPtrHashSet::contains): Deleted.
337         (WTF::ConcurrentPtrHashSet::add): Deleted.
338         (WTF::ConcurrentPtrHashSet::size const): Deleted.
339         (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted.
340         (WTF::ConcurrentPtrHashSet::hash): Deleted.
341         (WTF::ConcurrentPtrHashSet::cast): Deleted.
342         (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted.
343         (WTF::ConcurrentPtrHashSet::addImpl): Deleted.
344         * wtf/ConcurrentVector.h:
345         (WTF::ConcurrentVector::~ConcurrentVector): Deleted.
346         (WTF::ConcurrentVector::size const): Deleted.
347         (WTF::ConcurrentVector::isEmpty const): Deleted.
348         (WTF::ConcurrentVector::at): Deleted.
349         (WTF::ConcurrentVector::at const): Deleted.
350         (WTF::ConcurrentVector::operator[]): Deleted.
351         (WTF::ConcurrentVector::operator[] const): Deleted.
352         (WTF::ConcurrentVector::first): Deleted.
353         (WTF::ConcurrentVector::first const): Deleted.
354         (WTF::ConcurrentVector::last): Deleted.
355         (WTF::ConcurrentVector::last const): Deleted.
356         (WTF::ConcurrentVector::takeLast): Deleted.
357         (WTF::ConcurrentVector::append): Deleted.
358         (WTF::ConcurrentVector::alloc): Deleted.
359         (WTF::ConcurrentVector::removeLast): Deleted.
360         (WTF::ConcurrentVector::grow): Deleted.
361         (WTF::ConcurrentVector::begin): Deleted.
362         (WTF::ConcurrentVector::end): Deleted.
363         (WTF::ConcurrentVector::segmentExistsFor): Deleted.
364         (WTF::ConcurrentVector::segmentFor): Deleted.
365         (WTF::ConcurrentVector::subscriptFor): Deleted.
366         (WTF::ConcurrentVector::ensureSegmentsFor): Deleted.
367         (WTF::ConcurrentVector::ensureSegment): Deleted.
368         (WTF::ConcurrentVector::allocateSegment): Deleted.
369         * wtf/Condition.h:
370         (WTF::Condition::waitUntil): Deleted.
371         (WTF::Condition::waitFor): Deleted.
372         (WTF::Condition::wait): Deleted.
373         (WTF::Condition::notifyOne): Deleted.
374         (WTF::Condition::notifyAll): Deleted.
375         * wtf/CountingLock.h:
376         (WTF::CountingLock::LockHooks::lockHook): Deleted.
377         (WTF::CountingLock::LockHooks::unlockHook): Deleted.
378         (WTF::CountingLock::LockHooks::parkHook): Deleted.
379         (WTF::CountingLock::LockHooks::handoffHook): Deleted.
380         (WTF::CountingLock::tryLock): Deleted.
381         (WTF::CountingLock::lock): Deleted.
382         (WTF::CountingLock::unlock): Deleted.
383         (WTF::CountingLock::isHeld const): Deleted.
384         (WTF::CountingLock::isLocked const): Deleted.
385         (WTF::CountingLock::Count::operator bool const): Deleted.
386         (WTF::CountingLock::Count::operator== const): Deleted.
387         (WTF::CountingLock::Count::operator!= const): Deleted.
388         (WTF::CountingLock::tryOptimisticRead): Deleted.
389         (WTF::CountingLock::validate): Deleted.
390         (WTF::CountingLock::doOptimizedRead): Deleted.
391         (WTF::CountingLock::tryOptimisticFencelessRead): Deleted.
392         (WTF::CountingLock::fencelessValidate): Deleted.
393         (WTF::CountingLock::doOptimizedFencelessRead): Deleted.
394         (WTF::CountingLock::getCount): Deleted.
395         * wtf/CrossThreadQueue.h:
396         * wtf/CrossThreadTask.h:
397         * wtf/CryptographicallyRandomNumber.cpp:
398         * wtf/DataMutex.h:
399         * wtf/DateMath.h:
400         * wtf/Deque.h:
401         (WTF::Deque::size const): Deleted.
402         (WTF::Deque::isEmpty const): Deleted.
403         (WTF::Deque::begin): Deleted.
404         (WTF::Deque::end): Deleted.
405         (WTF::Deque::begin const): Deleted.
406         (WTF::Deque::end const): Deleted.
407         (WTF::Deque::rbegin): Deleted.
408         (WTF::Deque::rend): Deleted.
409         (WTF::Deque::rbegin const): Deleted.
410         (WTF::Deque::rend const): Deleted.
411         (WTF::Deque::first): Deleted.
412         (WTF::Deque::first const): Deleted.
413         (WTF::Deque::last): Deleted.
414         (WTF::Deque::last const): Deleted.
415         (WTF::Deque::append): Deleted.
416         * wtf/Dominators.h:
417         * wtf/DoublyLinkedList.h:
418         * wtf/Expected.h:
419         * wtf/FastBitVector.h:
420         * wtf/FileMetadata.h:
421         * wtf/FileSystem.h:
422         * wtf/GraphNodeWorklist.h:
423         * wtf/GregorianDateTime.h:
424         (WTF::GregorianDateTime::GregorianDateTime): Deleted.
425         (WTF::GregorianDateTime::year const): Deleted.
426         (WTF::GregorianDateTime::month const): Deleted.
427         (WTF::GregorianDateTime::yearDay const): Deleted.
428         (WTF::GregorianDateTime::monthDay const): Deleted.
429         (WTF::GregorianDateTime::weekDay const): Deleted.
430         (WTF::GregorianDateTime::hour const): Deleted.
431         (WTF::GregorianDateTime::minute const): Deleted.
432         (WTF::GregorianDateTime::second const): Deleted.
433         (WTF::GregorianDateTime::utcOffset const): Deleted.
434         (WTF::GregorianDateTime::isDST const): Deleted.
435         (WTF::GregorianDateTime::setYear): Deleted.
436         (WTF::GregorianDateTime::setMonth): Deleted.
437         (WTF::GregorianDateTime::setYearDay): Deleted.
438         (WTF::GregorianDateTime::setMonthDay): Deleted.
439         (WTF::GregorianDateTime::setWeekDay): Deleted.
440         (WTF::GregorianDateTime::setHour): Deleted.
441         (WTF::GregorianDateTime::setMinute): Deleted.
442         (WTF::GregorianDateTime::setSecond): Deleted.
443         (WTF::GregorianDateTime::setUtcOffset): Deleted.
444         (WTF::GregorianDateTime::setIsDST): Deleted.
445         (WTF::GregorianDateTime::operator tm const): Deleted.
446         (WTF::GregorianDateTime::copyFrom): Deleted.
447         * wtf/HashTable.h:
448         * wtf/Hasher.h:
449         * wtf/HexNumber.h:
450         * wtf/Indenter.h:
451         * wtf/IndexMap.h:
452         * wtf/IndexSet.h:
453         * wtf/IndexSparseSet.h:
454         * wtf/IndexedContainerIterator.h:
455         * wtf/Insertion.h:
456         * wtf/IteratorAdaptors.h:
457         * wtf/IteratorRange.h:
458         * wtf/KeyValuePair.h:
459         * wtf/ListHashSet.h:
460         (WTF::ListHashSet::begin): Deleted.
461         (WTF::ListHashSet::end): Deleted.
462         (WTF::ListHashSet::begin const): Deleted.
463         (WTF::ListHashSet::end const): Deleted.
464         (WTF::ListHashSet::random): Deleted.
465         (WTF::ListHashSet::random const): Deleted.
466         (WTF::ListHashSet::rbegin): Deleted.
467         (WTF::ListHashSet::rend): Deleted.
468         (WTF::ListHashSet::rbegin const): Deleted.
469         (WTF::ListHashSet::rend const): Deleted.
470         * wtf/Liveness.h:
471         * wtf/LocklessBag.h:
472         (WTF::LocklessBag::LocklessBag): Deleted.
473         (WTF::LocklessBag::add): Deleted.
474         (WTF::LocklessBag::iterate): Deleted.
475         (WTF::LocklessBag::consumeAll): Deleted.
476         (WTF::LocklessBag::consumeAllWithNode): Deleted.
477         (WTF::LocklessBag::~LocklessBag): Deleted.
478         * wtf/LoggingHashID.h:
479         * wtf/MD5.h:
480         * wtf/MachSendRight.h:
481         * wtf/MainThreadData.h:
482         * wtf/Markable.h:
483         * wtf/MediaTime.h:
484         * wtf/MemoryPressureHandler.h:
485         * wtf/MessageQueue.h:
486         (WTF::MessageQueue::MessageQueue): Deleted.
487         * wtf/MetaAllocator.h:
488         * wtf/MonotonicTime.h:
489         (WTF::MonotonicTime::MonotonicTime): Deleted.
490         (WTF::MonotonicTime::fromRawSeconds): Deleted.
491         (WTF::MonotonicTime::infinity): Deleted.
492         (WTF::MonotonicTime::nan): Deleted.
493         (WTF::MonotonicTime::secondsSinceEpoch const): Deleted.
494         (WTF::MonotonicTime::approximateMonotonicTime const): Deleted.
495         (WTF::MonotonicTime::operator bool const): Deleted.
496         (WTF::MonotonicTime::operator+ const): Deleted.
497         (WTF::MonotonicTime::operator- const): Deleted.
498         (WTF::MonotonicTime::operator% const): Deleted.
499         (WTF::MonotonicTime::operator+=): Deleted.
500         (WTF::MonotonicTime::operator-=): Deleted.
501         (WTF::MonotonicTime::operator== const): Deleted.
502         (WTF::MonotonicTime::operator!= const): Deleted.
503         (WTF::MonotonicTime::operator< const): Deleted.
504         (WTF::MonotonicTime::operator> const): Deleted.
505         (WTF::MonotonicTime::operator<= const): Deleted.
506         (WTF::MonotonicTime::operator>= const): Deleted.
507         (WTF::MonotonicTime::isolatedCopy const): Deleted.
508         (WTF::MonotonicTime::encode const): Deleted.
509         (WTF::MonotonicTime::decode): Deleted.
510         * wtf/NaturalLoops.h:
511         * wtf/NoLock.h:
512         * wtf/OSAllocator.h:
513         * wtf/OptionSet.h:
514         * wtf/Optional.h:
515         * wtf/OrderMaker.h:
516         * wtf/Packed.h:
517         (WTF::alignof):
518         * wtf/PackedIntVector.h:
519         (WTF::PackedIntVector::PackedIntVector): Deleted.
520         (WTF::PackedIntVector::operator=): Deleted.
521         (WTF::PackedIntVector::size const): Deleted.
522         (WTF::PackedIntVector::ensureSize): Deleted.
523         (WTF::PackedIntVector::resize): Deleted.
524         (WTF::PackedIntVector::clearAll): Deleted.
525         (WTF::PackedIntVector::get const): Deleted.
526         (WTF::PackedIntVector::set): Deleted.
527         (WTF::PackedIntVector::mask): Deleted.
528         * wtf/PageBlock.h:
529         * wtf/ParallelJobsOpenMP.h:
530         * wtf/ParkingLot.h:
531         * wtf/PriorityQueue.h:
532         (WTF::PriorityQueue::size const): Deleted.
533         (WTF::PriorityQueue::isEmpty const): Deleted.
534         (WTF::PriorityQueue::enqueue): Deleted.
535         (WTF::PriorityQueue::peek const): Deleted.
536         (WTF::PriorityQueue::dequeue): Deleted.
537         (WTF::PriorityQueue::decreaseKey): Deleted.
538         (WTF::PriorityQueue::increaseKey): Deleted.
539         (WTF::PriorityQueue::begin const): Deleted.
540         (WTF::PriorityQueue::end const): Deleted.
541         (WTF::PriorityQueue::isValidHeap const): Deleted.
542         (WTF::PriorityQueue::parentOf): Deleted.
543         (WTF::PriorityQueue::leftChildOf): Deleted.
544         (WTF::PriorityQueue::rightChildOf): Deleted.
545         (WTF::PriorityQueue::siftUp): Deleted.
546         (WTF::PriorityQueue::siftDown): Deleted.
547         * wtf/RandomDevice.h:
548         * wtf/Range.h:
549         * wtf/RangeSet.h:
550         (WTF::RangeSet::RangeSet): Deleted.
551         (WTF::RangeSet::~RangeSet): Deleted.
552         (WTF::RangeSet::add): Deleted.
553         (WTF::RangeSet::contains const): Deleted.
554         (WTF::RangeSet::overlaps const): Deleted.
555         (WTF::RangeSet::clear): Deleted.
556         (WTF::RangeSet::dump const): Deleted.
557         (WTF::RangeSet::dumpRaw const): Deleted.
558         (WTF::RangeSet::begin const): Deleted.
559         (WTF::RangeSet::end const): Deleted.
560         (WTF::RangeSet::addAll): Deleted.
561         (WTF::RangeSet::compact): Deleted.
562         (WTF::RangeSet::overlapsNonEmpty): Deleted.
563         (WTF::RangeSet::subsumesNonEmpty): Deleted.
564         (WTF::RangeSet::findRange const): Deleted.
565         * wtf/RecursableLambda.h:
566         * wtf/RedBlackTree.h:
567         (WTF::RedBlackTree::Node::successor const): Deleted.
568         (WTF::RedBlackTree::Node::predecessor const): Deleted.
569         (WTF::RedBlackTree::Node::successor): Deleted.
570         (WTF::RedBlackTree::Node::predecessor): Deleted.
571         (WTF::RedBlackTree::Node::reset): Deleted.
572         (WTF::RedBlackTree::Node::parent const): Deleted.
573         (WTF::RedBlackTree::Node::setParent): Deleted.
574         (WTF::RedBlackTree::Node::left const): Deleted.
575         (WTF::RedBlackTree::Node::setLeft): Deleted.
576         (WTF::RedBlackTree::Node::right const): Deleted.
577         (WTF::RedBlackTree::Node::setRight): Deleted.
578         (WTF::RedBlackTree::Node::color const): Deleted.
579         (WTF::RedBlackTree::Node::setColor): Deleted.
580         (WTF::RedBlackTree::RedBlackTree): Deleted.
581         (WTF::RedBlackTree::insert): Deleted.
582         (WTF::RedBlackTree::remove): Deleted.
583         (WTF::RedBlackTree::findExact const): Deleted.
584         (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted.
585         (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted.
586         (WTF::RedBlackTree::first const): Deleted.
587         (WTF::RedBlackTree::last const): Deleted.
588         (WTF::RedBlackTree::size): Deleted.
589         (WTF::RedBlackTree::isEmpty): Deleted.
590         (WTF::RedBlackTree::treeMinimum): Deleted.
591         (WTF::RedBlackTree::treeMaximum): Deleted.
592         (WTF::RedBlackTree::treeInsert): Deleted.
593         (WTF::RedBlackTree::leftRotate): Deleted.
594         (WTF::RedBlackTree::rightRotate): Deleted.
595         (WTF::RedBlackTree::removeFixup): Deleted.
596         * wtf/ResourceUsage.h:
597         * wtf/RunLoop.cpp:
598         * wtf/RunLoopTimer.h:
599         * wtf/SHA1.h:
600         * wtf/Seconds.h:
601         (WTF::Seconds::Seconds): Deleted.
602         (WTF::Seconds::value const): Deleted.
603         (WTF::Seconds::minutes const): Deleted.
604         (WTF::Seconds::seconds const): Deleted.
605         (WTF::Seconds::milliseconds const): Deleted.
606         (WTF::Seconds::microseconds const): Deleted.
607         (WTF::Seconds::nanoseconds const): Deleted.
608         (WTF::Seconds::minutesAs const): Deleted.
609         (WTF::Seconds::secondsAs const): Deleted.
610         (WTF::Seconds::millisecondsAs const): Deleted.
611         (WTF::Seconds::microsecondsAs const): Deleted.
612         (WTF::Seconds::nanosecondsAs const): Deleted.
613         (WTF::Seconds::fromMinutes): Deleted.
614         (WTF::Seconds::fromHours): Deleted.
615         (WTF::Seconds::fromMilliseconds): Deleted.
616         (WTF::Seconds::fromMicroseconds): Deleted.
617         (WTF::Seconds::fromNanoseconds): Deleted.
618         (WTF::Seconds::infinity): Deleted.
619         (WTF::Seconds::nan): Deleted.
620         (WTF::Seconds::operator bool const): Deleted.
621         (WTF::Seconds::operator+ const): Deleted.
622         (WTF::Seconds::operator- const): Deleted.
623         (WTF::Seconds::operator* const): Deleted.
624         (WTF::Seconds::operator/ const): Deleted.
625         (WTF::Seconds::operator% const): Deleted.
626         (WTF::Seconds::operator+=): Deleted.
627         (WTF::Seconds::operator-=): Deleted.
628         (WTF::Seconds::operator*=): Deleted.
629         (WTF::Seconds::operator/=): Deleted.
630         (WTF::Seconds::operator%=): Deleted.
631         (WTF::Seconds::operator== const): Deleted.
632         (WTF::Seconds::operator!= const): Deleted.
633         (WTF::Seconds::operator< const): Deleted.
634         (WTF::Seconds::operator> const): Deleted.
635         (WTF::Seconds::operator<= const): Deleted.
636         (WTF::Seconds::operator>= const): Deleted.
637         (WTF::Seconds::isolatedCopy const): Deleted.
638         (WTF::Seconds::encode const): Deleted.
639         (WTF::Seconds::decode): Deleted.
640         * wtf/SegmentedVector.h:
641         (WTF::SegmentedVector::~SegmentedVector): Deleted.
642         (WTF::SegmentedVector::size const): Deleted.
643         (WTF::SegmentedVector::isEmpty const): Deleted.
644         (WTF::SegmentedVector::at): Deleted.
645         (WTF::SegmentedVector::at const): Deleted.
646         (WTF::SegmentedVector::operator[]): Deleted.
647         (WTF::SegmentedVector::operator[] const): Deleted.
648         (WTF::SegmentedVector::first): Deleted.
649         (WTF::SegmentedVector::first const): Deleted.
650         (WTF::SegmentedVector::last): Deleted.
651         (WTF::SegmentedVector::last const): Deleted.
652         (WTF::SegmentedVector::takeLast): Deleted.
653         (WTF::SegmentedVector::append): Deleted.
654         (WTF::SegmentedVector::alloc): Deleted.
655         (WTF::SegmentedVector::removeLast): Deleted.
656         (WTF::SegmentedVector::grow): Deleted.
657         (WTF::SegmentedVector::clear): Deleted.
658         (WTF::SegmentedVector::begin): Deleted.
659         (WTF::SegmentedVector::end): Deleted.
660         (WTF::SegmentedVector::shrinkToFit): Deleted.
661         (WTF::SegmentedVector::deleteAllSegments): Deleted.
662         (WTF::SegmentedVector::segmentExistsFor): Deleted.
663         (WTF::SegmentedVector::segmentFor): Deleted.
664         (WTF::SegmentedVector::subscriptFor): Deleted.
665         (WTF::SegmentedVector::ensureSegmentsFor): Deleted.
666         (WTF::SegmentedVector::ensureSegment): Deleted.
667         (WTF::SegmentedVector::allocateSegment): Deleted.
668         * wtf/SetForScope.h:
669         * wtf/SingleRootGraph.h:
670         * wtf/SinglyLinkedList.h:
671         * wtf/SmallPtrSet.h:
672         * wtf/SpanningTree.h:
673         * wtf/Spectrum.h:
674         * wtf/StackBounds.h:
675         * wtf/StackShot.h:
676         * wtf/StackShotProfiler.h:
677         * wtf/StackStats.h:
678         * wtf/StackTrace.h:
679         * wtf/StreamBuffer.h:
680         * wtf/SynchronizedFixedQueue.h:
681         (WTF::SynchronizedFixedQueue::create): Deleted.
682         (WTF::SynchronizedFixedQueue::open): Deleted.
683         (WTF::SynchronizedFixedQueue::close): Deleted.
684         (WTF::SynchronizedFixedQueue::isOpen): Deleted.
685         (WTF::SynchronizedFixedQueue::enqueue): Deleted.
686         (WTF::SynchronizedFixedQueue::dequeue): Deleted.
687         (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted.
688         * wtf/SystemTracing.h:
689         * wtf/ThreadGroup.h:
690         (WTF::ThreadGroup::create): Deleted.
691         (WTF::ThreadGroup::threads const): Deleted.
692         (WTF::ThreadGroup::getLock): Deleted.
693         (WTF::ThreadGroup::weakFromThis): Deleted.
694         * wtf/ThreadSpecific.h:
695         * wtf/ThreadingPrimitives.h:
696         (WTF::Mutex::impl): Deleted.
697         * wtf/TimeWithDynamicClockType.h:
698         (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted.
699         (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted.
700         (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted.
701         (WTF::TimeWithDynamicClockType::clockType const): Deleted.
702         (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted.
703         (WTF::TimeWithDynamicClockType::operator bool const): Deleted.
704         (WTF::TimeWithDynamicClockType::operator+ const): Deleted.
705         (WTF::TimeWithDynamicClockType::operator- const): Deleted.
706         (WTF::TimeWithDynamicClockType::operator+=): Deleted.
707         (WTF::TimeWithDynamicClockType::operator-=): Deleted.
708         (WTF::TimeWithDynamicClockType::operator== const): Deleted.
709         (WTF::TimeWithDynamicClockType::operator!= const): Deleted.
710         * wtf/TimingScope.h:
711         * wtf/TinyLRUCache.h:
712         * wtf/TinyPtrSet.h:
713         * wtf/URLParser.cpp:
714         * wtf/URLParser.h:
715         * wtf/Unexpected.h:
716         * wtf/Variant.h:
717         * wtf/WTFSemaphore.h:
718         (WTF::Semaphore::Semaphore): Deleted.
719         (WTF::Semaphore::signal): Deleted.
720         (WTF::Semaphore::waitUntil): Deleted.
721         (WTF::Semaphore::waitFor): Deleted.
722         (WTF::Semaphore::wait): Deleted.
723         * wtf/WallTime.h:
724         (WTF::WallTime::WallTime): Deleted.
725         (WTF::WallTime::fromRawSeconds): Deleted.
726         (WTF::WallTime::infinity): Deleted.
727         (WTF::WallTime::nan): Deleted.
728         (WTF::WallTime::secondsSinceEpoch const): Deleted.
729         (WTF::WallTime::approximateWallTime const): Deleted.
730         (WTF::WallTime::operator bool const): Deleted.
731         (WTF::WallTime::operator+ const): Deleted.
732         (WTF::WallTime::operator- const): Deleted.
733         (WTF::WallTime::operator+=): Deleted.
734         (WTF::WallTime::operator-=): Deleted.
735         (WTF::WallTime::operator== const): Deleted.
736         (WTF::WallTime::operator!= const): Deleted.
737         (WTF::WallTime::operator< const): Deleted.
738         (WTF::WallTime::operator> const): Deleted.
739         (WTF::WallTime::operator<= const): Deleted.
740         (WTF::WallTime::operator>= const): Deleted.
741         (WTF::WallTime::isolatedCopy const): Deleted.
742         * wtf/WeakHashSet.h:
743         (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted.
744         (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted.
745         (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted.
746         (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted.
747         (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted.
748         (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted.
749         (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted.
750         (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted.
751         (WTF::WeakHashSet::WeakHashSet): Deleted.
752         (WTF::WeakHashSet::begin const): Deleted.
753         (WTF::WeakHashSet::end const): Deleted.
754         (WTF::WeakHashSet::add): Deleted.
755         (WTF::WeakHashSet::remove): Deleted.
756         (WTF::WeakHashSet::contains const): Deleted.
757         (WTF::WeakHashSet::capacity const): Deleted.
758         (WTF::WeakHashSet::computesEmpty const): Deleted.
759         (WTF::WeakHashSet::hasNullReferences const): Deleted.
760         (WTF::WeakHashSet::computeSize const): Deleted.
761         (WTF::WeakHashSet::checkConsistency const): Deleted.
762         * wtf/WeakRandom.h:
763         (WTF::WeakRandom::WeakRandom): Deleted.
764         (WTF::WeakRandom::setSeed): Deleted.
765         (WTF::WeakRandom::seed const): Deleted.
766         (WTF::WeakRandom::get): Deleted.
767         (WTF::WeakRandom::getUint32): Deleted.
768         (WTF::WeakRandom::lowOffset): Deleted.
769         (WTF::WeakRandom::highOffset): Deleted.
770         (WTF::WeakRandom::nextState): Deleted.
771         (WTF::WeakRandom::generate): Deleted.
772         (WTF::WeakRandom::advance): Deleted.
773         * wtf/WordLock.h:
774         (WTF::WordLock::lock): Deleted.
775         (WTF::WordLock::unlock): Deleted.
776         (WTF::WordLock::isHeld const): Deleted.
777         (WTF::WordLock::isLocked const): Deleted.
778         (WTF::WordLock::isFullyReset const): Deleted.
779         * wtf/generic/MainThreadGeneric.cpp:
780         * wtf/glib/GMutexLocker.h:
781         * wtf/linux/CurrentProcessMemoryStatus.h:
782         * wtf/posix/ThreadingPOSIX.cpp:
783         (WTF::Semaphore::Semaphore): Deleted.
784         (WTF::Semaphore::~Semaphore): Deleted.
785         (WTF::Semaphore::wait): Deleted.
786         (WTF::Semaphore::post): Deleted.
787         * wtf/text/ASCIILiteral.h:
788         (WTF::ASCIILiteral::operator const char* const): Deleted.
789         (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted.
790         (WTF::ASCIILiteral::null): Deleted.
791         (WTF::ASCIILiteral::characters const): Deleted.
792         (WTF::ASCIILiteral::ASCIILiteral): Deleted.
793         * wtf/text/AtomString.h:
794         (WTF::AtomString::operator=): Deleted.
795         (WTF::AtomString::isHashTableDeletedValue const): Deleted.
796         (WTF::AtomString::existingHash const): Deleted.
797         (WTF::AtomString::operator const String& const): Deleted.
798         (WTF::AtomString::string const): Deleted.
799         (WTF::AtomString::impl const): Deleted.
800         (WTF::AtomString::is8Bit const): Deleted.
801         (WTF::AtomString::characters8 const): Deleted.
802         (WTF::AtomString::characters16 const): Deleted.
803         (WTF::AtomString::length const): Deleted.
804         (WTF::AtomString::operator[] const): Deleted.
805         (WTF::AtomString::contains const): Deleted.
806         (WTF::AtomString::containsIgnoringASCIICase const): Deleted.
807         (WTF::AtomString::find const): Deleted.
808         (WTF::AtomString::findIgnoringASCIICase const): Deleted.
809         (WTF::AtomString::startsWith const): Deleted.
810         (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted.
811         (WTF::AtomString::endsWith const): Deleted.
812         (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted.
813         (WTF::AtomString::toInt const): Deleted.
814         (WTF::AtomString::toDouble const): Deleted.
815         (WTF::AtomString::toFloat const): Deleted.
816         (WTF::AtomString::percentage const): Deleted.
817         (WTF::AtomString::isNull const): Deleted.
818         (WTF::AtomString::isEmpty const): Deleted.
819         (WTF::AtomString::operator NSString * const): Deleted.
820         * wtf/text/AtomStringImpl.h:
821         (WTF::AtomStringImpl::lookUp): Deleted.
822         (WTF::AtomStringImpl::add): Deleted.
823         (WTF::AtomStringImpl::addWithStringTableProvider): Deleted.
824         * wtf/text/CString.h:
825         (WTF::CStringBuffer::data): Deleted.
826         (WTF::CStringBuffer::length const): Deleted.
827         (WTF::CStringBuffer::CStringBuffer): Deleted.
828         (WTF::CStringBuffer::mutableData): Deleted.
829         (WTF::CString::CString): Deleted.
830         (WTF::CString::data const): Deleted.
831         (WTF::CString::length const): Deleted.
832         (WTF::CString::isNull const): Deleted.
833         (WTF::CString::buffer const): Deleted.
834         (WTF::CString::isHashTableDeletedValue const): Deleted.
835         * wtf/text/ExternalStringImpl.h:
836         (WTF::ExternalStringImpl::freeExternalBuffer): Deleted.
837         * wtf/text/LineBreakIteratorPoolICU.h:
838         * wtf/text/NullTextBreakIterator.h:
839         * wtf/text/OrdinalNumber.h:
840         * wtf/text/StringBuffer.h:
841         * wtf/text/StringBuilder.h:
842         * wtf/text/StringConcatenateNumbers.h:
843         * wtf/text/StringHasher.h:
844         * wtf/text/StringImpl.h:
845         * wtf/text/StringView.cpp:
846         * wtf/text/StringView.h:
847         (WTF::StringView::left const): Deleted.
848         (WTF::StringView::right const): Deleted.
849         (WTF::StringView::underlyingStringIsValid const): Deleted.
850         (WTF::StringView::setUnderlyingString): Deleted.
851         * wtf/text/SymbolImpl.h:
852         (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted.
853         (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted.
854         (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted.
855         (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted.
856         (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted.
857         (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted.
858         * wtf/text/SymbolRegistry.h:
859         * wtf/text/TextBreakIterator.h:
860         * wtf/text/TextPosition.h:
861         * wtf/text/TextStream.h:
862         * wtf/text/WTFString.h:
863         (WTF::String::swap): Deleted.
864         (WTF::String::adopt): Deleted.
865         (WTF::String::isNull const): Deleted.
866         (WTF::String::isEmpty const): Deleted.
867         (WTF::String::impl const): Deleted.
868         (WTF::String::releaseImpl): Deleted.
869         (WTF::String::length const): Deleted.
870         (WTF::String::characters8 const): Deleted.
871         (WTF::String::characters16 const): Deleted.
872         (WTF::String::is8Bit const): Deleted.
873         (WTF::String::sizeInBytes const): Deleted.
874         (WTF::String::operator[] const): Deleted.
875         (WTF::String::find const): Deleted.
876         (WTF::String::findIgnoringASCIICase const): Deleted.
877         (WTF::String::reverseFind const): Deleted.
878         (WTF::String::contains const): Deleted.
879         (WTF::String::containsIgnoringASCIICase const): Deleted.
880         (WTF::String::startsWith const): Deleted.
881         (WTF::String::startsWithIgnoringASCIICase const): Deleted.
882         (WTF::String::hasInfixStartingAt const): Deleted.
883         (WTF::String::endsWith const): Deleted.
884         (WTF::String::endsWithIgnoringASCIICase const): Deleted.
885         (WTF::String::hasInfixEndingAt const): Deleted.
886         (WTF::String::append): Deleted.
887         (WTF::String::left const): Deleted.
888         (WTF::String::right const): Deleted.
889         (WTF::String::createUninitialized): Deleted.
890         (WTF::String::fromUTF8WithLatin1Fallback): Deleted.
891         (WTF::String::isAllASCII const): Deleted.
892         (WTF::String::isAllLatin1 const): Deleted.
893         (WTF::String::isSpecialCharacter const): Deleted.
894         (WTF::String::isHashTableDeletedValue const): Deleted.
895         (WTF::String::hash const): Deleted.
896         (WTF::String::existingHash const): Deleted.
897         * wtf/text/cf/TextBreakIteratorCF.h:
898         * wtf/text/icu/TextBreakIteratorICU.h:
899         * wtf/text/icu/UTextProviderLatin1.h:
900         * wtf/threads/BinarySemaphore.h:
901         (WTF::BinarySemaphore::waitFor): Deleted.
902         (WTF::BinarySemaphore::wait): Deleted.
903         * wtf/unicode/Collator.h:
904         * wtf/win/GDIObject.h:
905         * wtf/win/PathWalker.h:
906         * wtf/win/Win32Handle.h:
907
908 2019-08-12  Chris Dumez  <cdumez@apple.com>
909
910         Unreviewed, fix post landing review comments for r248533 from Darin.
911
912         * wtf/RefCounted.h:
913         (WTF::RefCountedBase::ref const):
914         (WTF::RefCountedBase::applyRefDerefThreadingCheck const):
915         (WTF::RefCountedBase::derefBase const):
916         (WTF::RefCountedBase::areThreadingCheckedEnabled const): Deleted.
917
918 2019-08-12  Chris Dumez  <cdumez@apple.com>
919
920         Add threading assertions to RefCounted
921         https://bugs.webkit.org/show_bug.cgi?id=200507
922
923         Reviewed by Ryosuke Niwa.
924
925         Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
926         RefCounted objects from several threads. If you hit these new assertions, it likely means you either
927         need to:
928         1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
929         or
930         2. Make sure your objects always gets ref'd / deref'd from the same thread.
931
932         These assertions already found several thread safety bugs in our code base, which I fixed via
933         dependency bugs.
934
935         These assertions are currently enabled in WebKit (UIProcess, child processes and
936         WebKitLegacy), they do not apply other JavascriptCore API clients.
937
938         * WTF.xcodeproj/project.pbxproj:
939         * wtf/CMakeLists.txt:
940         * wtf/RefCounted.cpp: Added.
941         * wtf/RefCounted.h:
942         (WTF::RefCountedBase::ref const):
943         (WTF::RefCountedBase::disableThreadingChecks):
944         (WTF::RefCountedBase::enableThreadingChecksGlobally):
945         (WTF::RefCountedBase::RefCountedBase):
946         (WTF::RefCountedBase::areThreadingCheckedEnabled const):
947         (WTF::RefCountedBase::derefBase const):
948         * wtf/SizeLimits.cpp:
949
950 2019-08-12  Chris Dumez  <cdumez@apple.com>
951
952         Unreviewed, rolling out r248525.
953
954         Revert new threading assertions while I work on fixing the
955         issues they exposed
956
957         Reverted changeset:
958
959         "Add threading assertions to RefCounted"
960         https://bugs.webkit.org/show_bug.cgi?id=200507
961         https://trac.webkit.org/changeset/248525
962
963 2019-08-11  Chris Dumez  <cdumez@apple.com>
964
965         Add threading assertions to RefCounted
966         https://bugs.webkit.org/show_bug.cgi?id=200507
967
968         Reviewed by Ryosuke Niwa.
969
970         Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
971         RefCounted objects from several threads. If you hit these new assertions, it likely means you either
972         need to:
973         1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
974         or
975         2. Make sure your objects always gets ref'd / deref'd from the same thread.
976
977         These assertions already found several thread safety bugs in our code base, which I fixed via
978         dependency bugs.
979
980         These assertions are currently enabled in WebKit (UIProcess, child processes and
981         WebKitLegacy), they do not apply other JavascriptCore API clients.
982
983         * WTF.xcodeproj/project.pbxproj:
984         * wtf/CMakeLists.txt:
985         * wtf/RefCounted.cpp: Added.
986         * wtf/RefCounted.h:
987         (WTF::RefCountedBase::ref const):
988         (WTF::RefCountedBase::disableThreadingChecks):
989         (WTF::RefCountedBase::enableThreadingChecksGlobally):
990         (WTF::RefCountedBase::RefCountedBase):
991         (WTF::RefCountedBase::areThreadingCheckedEnabled const):
992         (WTF::RefCountedBase::derefBase const):
993         * wtf/SizeLimits.cpp:
994
995 2019-08-09  Saam Barati  <sbarati@apple.com>
996
997         [WHLSL] Devirtualize the AST
998         https://bugs.webkit.org/show_bug.cgi?id=200522
999
1000         Reviewed by Robin Morisset.
1001
1002         Make RefCounted use std::default_delete instead of explicitly calling delete.
1003         This allows uses of RefCounted to define their own custom deleter.
1004
1005         * wtf/RefCounted.h:
1006         (WTF::RefCounted::deref const):
1007         * wtf/UniqueRef.h:
1008         (WTF::UniqueRef::UniqueRef):
1009
1010 2019-08-08  Chris Dumez  <cdumez@apple.com>
1011
1012         Fix thread safety issue in AudioSampleDataSource() constructor
1013         https://bugs.webkit.org/show_bug.cgi?id=200547
1014
1015         Reviewed by Alex Christensen.
1016
1017         Make Logger ThreadSafeRefCounted as it is ref'd / deref'd from various
1018         threads (including the main thread and the WebKitWebRTCAudioModule thread).
1019
1020         * wtf/Logger.h:
1021
1022 2019-08-08  Michael Saboff  <msaboff@apple.com>
1023
1024         OpenSource MemoryFootprint API for JSC command line tool
1025         https://bugs.webkit.org/show_bug.cgi?id=200541
1026
1027         Reviewed by Saam Barati.
1028
1029         OpenSource version of WebKitAdditions/MemoryFootprint.h.
1030
1031         * WTF.xcodeproj/project.pbxproj:
1032         * wtf/spi/darwin/ProcessMemoryFootprint.h: Added.
1033         (ProcessMemoryFootprint::now):
1034         (ProcessMemoryFootprint::resetPeak):
1035
1036 2019-08-08  Per Arne Vollan  <pvollan@apple.com>
1037
1038         [Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
1039         https://bugs.webkit.org/show_bug.cgi?id=200543
1040         <rdar://problem/49394015>
1041
1042         Reviewed by Brent Fulgham.
1043
1044         Add new SPI.
1045
1046         * wtf/Platform.h:
1047         * wtf/spi/darwin/SandboxSPI.h:
1048
1049 2019-08-07  Chris Dumez  <cdumez@apple.com>
1050
1051         Tighten WeakPtr threading assertions for GC threads
1052         https://bugs.webkit.org/show_bug.cgi?id=200451
1053
1054         Reviewed by Youenn Fablet.
1055
1056         Make sure our GC threads do not dereference WeakPtr for main thread
1057         objects by tightening our threading assertions in WeakPtr. They are
1058         still allowed to call WeakPtr::get() for now though.
1059
1060         * wtf/WeakPtr.h:
1061         (WTF::WeakPtrImpl::get):
1062         (WTF::WeakPtrImpl::wasConstructedOnMainThread const):
1063         (WTF::WeakPtr::get const):
1064         (WTF::WeakPtr::operator-> const):
1065         (WTF::WeakPtr::operator* const):
1066
1067 2019-08-06  Jiewen Tan  <jiewen_tan@apple.com>
1068
1069         Unreviewed, a build fix after r248308
1070
1071         Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
1072
1073         * wtf/Platform.h:
1074
1075 2019-08-06  Chris Dumez  <cdumez@apple.com>
1076
1077         Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&)
1078         https://bugs.webkit.org/show_bug.cgi?id=200475
1079
1080         Reviewed by Darin Adler.
1081
1082         Add convenience constuctor to StringView which takes in a const char*
1083         and an unsigned length, similarly to what we already have for String.
1084
1085         * wtf/URL.cpp:
1086         (WTF::URL::protocolIs const):
1087         (WTF::protocolIsInternal):
1088         * wtf/text/StringView.h:
1089         (WTF::StringView::StringView):
1090         (WTF::StringView::empty):
1091
1092 2019-08-06  Jiewen Tan  <jiewen_tan@apple.com>
1093
1094         [WebAuthN] Enable LocalAuthenticator for macOS
1095         https://bugs.webkit.org/show_bug.cgi?id=182772
1096         <rdar://problem/43347920>
1097
1098         Reviewed by Brent Fulgham.
1099
1100         * wtf/Platform.h:
1101         Adds HAVE_DEVICE_IDENTITY.
1102         * wtf/spi/cocoa/SecuritySPI.h:
1103         Adds a SPI for telling macOS keychain to use the modern one.
1104
1105 2019-08-06  Claudio Saavedra  <csaavedra@igalia.com>
1106
1107         FileSystem: silent build warning
1108
1109         Unreviewed compilation warning fix.
1110
1111         Remove unused parameter in empty method
1112         * wtf/FileSystem.cpp:
1113         (WTF::FileSystemImpl::createTemporaryZipArchive):
1114
1115 2019-08-05  Youenn Fablet  <youenn@apple.com>
1116
1117         Make Logger::log thread safe so that it can be used from background threads
1118         https://bugs.webkit.org/show_bug.cgi?id=200448
1119
1120         Reviewed by Eric Carlson.
1121
1122         Add a lock to ensure calling log is thread-safe.
1123
1124         * wtf/Logger.h:
1125         (WTF::Logger::addObserver):
1126         (WTF::Logger::removeObserver):
1127         (WTF::Logger::log):
1128         (WTF::Logger::observerLock):
1129
1130 2019-08-05  Takashi Komori  <Takashi.Komori@sony.com>
1131
1132         [Curl] implement CertificateInfo::summaryInfo
1133         https://bugs.webkit.org/show_bug.cgi?id=191498
1134
1135         Reviewed by Alex Christensen.
1136
1137         Fixed function template for encoding vector.
1138
1139         * wtf/persistence/PersistentCoders.h:
1140
1141 2019-08-02  Mark Lam  <mark.lam@apple.com>
1142
1143         [ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.
1144         https://bugs.webkit.org/show_bug.cgi?id=200292
1145         <rdar://problem/53706881>
1146
1147         Reviewed by Geoffrey Garen.
1148
1149         * wtf/PtrTag.h:
1150         - Introducing WTF_VTBL_FUNCPTR_PTRAUTH and WTF_VTBL_FUNCPTR_PTRAUTH_STR macros for
1151           defining vtbl function pointer style pointer signing modifier.
1152
1153 2019-08-02  Eric Carlson  <eric.carlson@apple.com>
1154
1155         uniqueLogIdentifier() should generate a 64-bit identifier
1156         https://bugs.webkit.org/show_bug.cgi?id=200403
1157         <rdar://problem/53878447>
1158
1159         Reviewed by Youenn Fablet.
1160
1161         * wtf/LoggerHelper.h:
1162         (WTF::LoggerHelper::childLogIdentifier const): Use uint64_t masks.
1163         (WTF::LoggerHelper::uniqueLogIdentifier): cryptographicallyRandomNumber returns a
1164         uint32_t so use two to generate a 64-bit identifier.
1165
1166 2019-08-02  Alex Christensen  <achristensen@webkit.org>
1167
1168         Fix an internal build after r248139
1169         https://bugs.webkit.org/show_bug.cgi?id=200102
1170
1171         * wtf/cocoa/FileSystemCocoa.mm:
1172         Some internal builds couldn't find BOM framework headers.
1173         No problem.  They're not needed.  Just remove references to them.
1174
1175 2019-08-01  Alex Christensen  <achristensen@webkit.org>
1176
1177         Move FormData zip file generation to NetworkProcess and enable it for all WebKit clients for uploading directories
1178         https://bugs.webkit.org/show_bug.cgi?id=200102
1179         <rdar://problem/53275114>
1180
1181         Reviewed by Darin Adler.
1182
1183         Move code from BlobDataFileReference::generateReplacementFile to FileSystem::createZipArchive.
1184
1185         * wtf/FileSystem.cpp:
1186         (WTF::FileSystemImpl::createZipArchive):
1187         * wtf/FileSystem.h:
1188         * wtf/cocoa/FileSystemCocoa.mm:
1189         (WTF::FileSystemImpl::createZipArchive):
1190
1191 2019-08-01  Per Arne Vollan  <pvollan@apple.com>
1192
1193         Initialize memory pressure flag in MemoryPressureHandler
1194         https://bugs.webkit.org/show_bug.cgi?id=200353
1195
1196         Reviewed by Geoffrey Garen.
1197
1198         The flag 'm_underMemoryPressure' in MemoryPressureHandler should be initialized to 'false'.
1199
1200         * wtf/MemoryPressureHandler.h:
1201
1202 2019-08-01  Chris Dumez  <cdumez@apple.com>
1203
1204         Add threading assertion to WeakPtr's operator->()
1205         https://bugs.webkit.org/show_bug.cgi?id=199922
1206
1207         Reviewed by Ryosuke Niwa.
1208
1209         Add threading assertion to WeakPtr's operator->() to make sure that the WeakPtr
1210         always gets dereferenced on the same thread it was constructed on.
1211
1212         * wtf/WeakPtr.h:
1213         (WTF::WeakPtrImpl::get):
1214         (WTF::WeakPtrImpl::WeakPtrImpl):
1215
1216 2019-07-31  Youenn Fablet  <youenn@apple.com>
1217
1218         Use CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCreateForCharactersWithLanguage
1219         https://bugs.webkit.org/show_bug.cgi?id=200241
1220
1221         Reviewed by Myles C. Maxfield.
1222
1223         * wtf/Platform.h: Add macro to enable/disable new SPI.
1224
1225 2019-07-31  Keith Rollin  <krollin@apple.com>
1226
1227         Fix 64-bit vs 32-bit mismatch in PersistentCoders.h
1228         https://bugs.webkit.org/show_bug.cgi?id=200288
1229         <rdar://problem/53734203>
1230
1231         Reviewed by Chris Dumez.
1232
1233         hashMapSize is declared as a uint64_t. It is passed to
1234         HashMapType::reserveInitialCapacity, which takes an unsigned int. This
1235         is a 32-bit value on 32-bit platforms, leading to a compile time
1236         error. Fix his by casting hashMapSize to the expected type.
1237
1238         * wtf/persistence/PersistentCoders.h:
1239
1240 2019-07-31  Keith Rollin  <krollin@apple.com>
1241
1242         Fix 64-bit vs 32-bit mismatch in LogArgument
1243         https://bugs.webkit.org/show_bug.cgi?id=200286
1244         <rdar://problem/53733671>
1245
1246         Reviewed by Darin Adler.
1247
1248         LogArgument is a utility for converting scalars into strings. It has a
1249         number of versions of a toString() method that is specialized for each
1250         type and converts the value to a string in a manner appropriate for
1251         that type. However, the versions of toString() for "long long" and
1252         "unsigned long long" are actually declared to take an "long" or
1253         "unsigned long" as a parameter. This difference leads to a 64-bit vs
1254         32-bit build error on 32-bit systems. Fix this by specifying
1255         correct/matching types.
1256
1257         * wtf/Logger.h:
1258         (WTF::LogArgument::toString):
1259
1260 2019-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
1261
1262         REGRESSION(r241288): Text on Yahoo Japan mobile looks too bold
1263         https://bugs.webkit.org/show_bug.cgi?id=200065
1264         <rdar://problem/50912757>
1265
1266         Reviewed by Simon Fraser.
1267
1268         * wtf/Platform.h:
1269
1270 2019-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1271
1272         Fix CRASH_WITH_INFO() so that it doesn't complain about unused parameters on non Clang / MSVC compilers.
1273         https://bugs.webkit.org/show_bug.cgi?id=200243
1274
1275         Reviewed by Mark Lam.
1276
1277         For GCC, we'll implement WTFCrashWithInfo as a function rather than a macro. To use
1278         ##__VA_ARGS we would need to enable GNU extensions, and don't want to do that. The proper
1279         solution, format __VA_OPT__(,) __VA_ARGS__, requires C++20. So just use an inline function
1280         for now as a workaround.
1281
1282         * wtf/Assertions.h:
1283         (CRASH_WITH_INFO):
1284         (CRASH_WITH_SECURITY_IMPLICATION_AND_INFO):
1285
1286 2019-07-25  Dean Jackson  <dino@apple.com>
1287
1288         Add helper for ignoring deprecated implementation warnings
1289         https://bugs.webkit.org/show_bug.cgi?id=200135
1290
1291         Reviewed by Wenson Hsieh.
1292
1293         Add ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN/END macro which
1294         is IGNORE_WARNINGS_BEGIN("deprecated-implementations")
1295
1296         * wtf/Compiler.h:
1297
1298 2019-07-24  Yusuke Suzuki  <ysuzuki@apple.com>
1299
1300         [bmalloc] Add IsoHeap test to ensure that IsoHeap pages are not allocating too large VA
1301         https://bugs.webkit.org/show_bug.cgi?id=200103
1302
1303         Reviewed by Mark Lam.
1304
1305         We move VMTag page investigation code from PAL to WTF to use it in TestWTF.
1306         And we also accumulate allocated VA size in `reserved` field of `TagInfo`.
1307
1308         * WTF.xcodeproj/project.pbxproj:
1309         * wtf/CMakeLists.txt:
1310         * wtf/PlatformMac.cmake:
1311         * wtf/ResourceUsage.h: Added.
1312         * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
1313         * wtf/cocoa/ResourceUsageCocoa.cpp: Added.
1314         (WTF::vmPageSize):
1315         (WTF::logFootprintComparison):
1316         (WTF::displayNameForVMTag):
1317         (WTF::pagesPerVMTag):
1318         * wtf/spi/cocoa/MachVMSPI.h: Added.
1319
1320 2019-07-23  Keith Miller  <keith_miller@apple.com>
1321
1322         Add cheat sheet comment for HashMap/Set iterator/AddResult
1323         https://bugs.webkit.org/show_bug.cgi?id=200061
1324
1325         Reviewed by Saam Barati.
1326
1327         * wtf/HashMap.h:
1328         * wtf/HashSet.h:
1329
1330 2019-07-23  Keith Rollin  <krollin@apple.com>
1331
1332         Remove rest of NavigatorContentUtils support
1333         https://bugs.webkit.org/show_bug.cgi?id=200052
1334         <rdar://problem/53467357>
1335
1336         Reviewed by Alex Christensen.
1337
1338         Bug 196070 removes most of the support for the never-used
1339         NavigatorContentUtils facility. However, there were still a couple of
1340         left-over references after that change. This patch sweeps those up.
1341
1342         * wtf/FeatureDefines.h:
1343
1344 2019-07-23  Keith Rollin  <krollin@apple.com>
1345
1346         Enable HAVE_APP_LINKS_WITH_ISENABLED for entire iOS family
1347         https://bugs.webkit.org/show_bug.cgi?id=200040
1348         <rdar://problem/53457670>
1349
1350         Reviewed by Tim Horton.
1351
1352         This feature was enabled for just iOS, but should be enabled for tvOS
1353         and watchOS, too.
1354
1355         * wtf/Platform.h:
1356
1357 2019-07-23  Alicia Boya García  <aboya@igalia.com>
1358
1359         [WTF] Add DataMutex and MainThreadData wrappers
1360         https://bugs.webkit.org/show_bug.cgi?id=199831
1361
1362         Reviewed by Alex Christensen.
1363
1364         This patch adds two new wrapper classes:
1365
1366         DataMutex<T> stores an instance of T in a private member along with a
1367         mutex. In order to use its fields, users need to instantiate a
1368         DataMutex<T>::LockedWrapper instance in the stack. This class uses
1369         RAII to lock and unlock the mutex in construction and destruction
1370         respectively, and by using the arrow operator lets the user access T's
1371         members.
1372
1373         This way, DataMutex<T> prevents most instances of accidental access to
1374         data fields that should only be read and modified in an atomic matter.
1375
1376         Still, both the Lock and the LockHolder are exposed once the user has
1377         taken the lock so that special cases such as waiting for a condition
1378         variable or performing an early unlock are doable.
1379
1380         MainThreadData<T> is another wrapper class, in this case for data
1381         fields that should only be accessed from the main thread. In this
1382         case, it works similar to a smart pointer, except that (1) there is no
1383         actual memory indirection, T is stored directly inside
1384         MainThreadData<T> and (2) attempts to use the -> or * operator have an
1385         isMainThread() assertion.
1386
1387         Together, these two wrapper classes make it easier to write
1388         multi-threaded code in a safer, more self-documented way by letting
1389         the author group data into structures that have certain access safety
1390         requirements.
1391
1392         These structures were originally part of the new GStreamer
1393         WebKitMediaSrc rework patch: https://bugs.webkit.org/show_bug.cgi?id=199719
1394
1395         * wtf/CMakeLists.txt:
1396         * wtf/DataMutex.h: Added.
1397         (WTF::DataMutex::DataMutex):
1398         (WTF::DataMutex::LockedWrapper::LockedWrapper):
1399         (WTF::DataMutex::LockedWrapper::operator->):
1400         (WTF::DataMutex::LockedWrapper::operator*):
1401         (WTF::DataMutex::LockedWrapper::mutex):
1402         (WTF::DataMutex::LockedWrapper::lockHolder):
1403         * wtf/MainThreadData.h: Added.
1404         (WTF::MainThreadData::MainThreadData):
1405         (WTF::MainThreadData::operator->):
1406         (WTF::MainThreadData::operator*):
1407
1408 2019-07-22  Yusuke Suzuki  <ysuzuki@apple.com>
1409
1410         [bmalloc] Each IsoPage gets 1MB VA because VMHeap::tryAllocateLargeChunk rounds up
1411         https://bugs.webkit.org/show_bug.cgi?id=200024
1412
1413         Reviewed by Saam Barati.
1414
1415         Start using a VM tag for IsoHeap instead of CLoop Stack.
1416
1417         * wtf/OSAllocator.h:
1418         * wtf/VMTags.h:
1419
1420 2019-07-20  Chris Dumez  <cdumez@apple.com>
1421
1422         Speed up HashTable decoding by reserving capacity and avoiding rehashing
1423         https://bugs.webkit.org/show_bug.cgi?id=199982
1424
1425         Reviewed by Saam Barati.
1426
1427         Introduce reserveInitialCapacity() on HashMap to reserve capacity on a
1428         HashMap and cut down on rehashing cost when possible.
1429
1430         * wtf/HashMap.h:
1431         * wtf/HashTable.h:
1432         (WTF::HashTable::reserveInitialCapacity):
1433
1434         * wtf/persistence/PersistentCoders.h:
1435         Use HashMap::reserveInitialCapacity() in the HashMap persistent decoder for
1436         performance.
1437
1438 2019-07-20  Alexander Mikhaylenko  <exalm7659@gmail.com>
1439
1440         REGRESSION(r246033/r246496): [GTK] Kinetic scrolling doesn't work
1441         https://bugs.webkit.org/show_bug.cgi?id=199322
1442
1443         Reviewed by Michael Catanzaro.
1444
1445         Introduce ENABLE_KINETIC_SCROLLING to explicitly always have kinetic scrolling on GTK.
1446
1447         * wtf/Platform.h:
1448
1449 2019-07-18  Youenn Fablet  <youenn@apple.com>
1450
1451         Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
1452         https://bugs.webkit.org/show_bug.cgi?id=199769
1453         <rdar://problem/49390297>
1454
1455         Reviewed by Myles C. Maxfield.
1456
1457         * wtf/Platform.h:
1458
1459 2019-07-17  Christopher Reid  <chris.reid@sony.com>
1460
1461         Bytecode cache should use FileSystem
1462         https://bugs.webkit.org/show_bug.cgi?id=199759
1463
1464         Reviewed by Yusuke Suzuki.
1465
1466         * wtf/FileSystem.cpp:
1467         * wtf/FileSystem.h:
1468         Add support for creating MappedFileData from a preexisting file handle
1469         for use with locked files. Also support creating MappedFileData
1470         with either private or shared mappings.
1471
1472         * wtf/UUID.cpp:
1473         Avoid ASSERT with returning a LazyNeverDestroyed object that hasn't been created.
1474
1475         * wtf/glib/FileSystemGlib.cpp:
1476         * wtf/win/FileSystemWin.cpp:
1477         Add truncateFile implementations.
1478
1479 2019-07-17  Sam Weinig  <weinig@apple.com>
1480
1481         Add StringBuilder member function which allows makeString() style variadic argument construction
1482         https://bugs.webkit.org/show_bug.cgi?id=198997
1483
1484         Reviewed by Darin Adler.
1485
1486         Adds new StringBuilder::flexibleAppend(...) member function which allows passing one or more 
1487         string-adaptable (in the sense that there is StringTypeAdapter specialization for the 
1488         type) parameters. This re-ususes the variadic template infrastructure in StringConcatenate.h
1489         that is used for makeString(...) allowing for improvements in one to benefit the other.
1490
1491         The advantage of StringBuilder::flexibleAppend(...) over calling StringBuilder::append(...)
1492         multiple times (beyond the code sharing with makeString(...) is that it can avoid unnecessary
1493         additional re-allocations when the StringBuilder needs to expand it's capacity. It does this
1494         by computing the complete required length for all the passed arguments and then ensuring enough
1495         capacity is available. It also reduces the allocation overhead versus the anti-pattern of
1496         builder.append(makeString(...)).
1497
1498         Ideally, this member function should eventually just be called StringBuilder::append(...), but
1499         the current overload set for StringBuilder::append(...) makes this complicated due to overloads
1500         that take two arguments such as StringBuilder::append(const UChar*, unsigned). Going forward, we
1501         should rename or remove those overloads and move to a standard interface. 
1502
1503         * wtf/posix/FileSystemPOSIX.cpp:
1504         (WTF::FileSystemImpl::pathByAppendingComponents):
1505         Adopt StringBuilder::flexibleAppend, using to combine the append of '/' and component.
1506
1507         * wtf/text/StringBuilder.cpp:
1508         (WTF::StringBuilder::appendUninitialized):
1509         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheck):
1510         Extract the part of appendUnitialized that doesn't do the overflow check
1511         into it's own member function to allow callers that have already done the
1512         overflow check to bypass it.
1513
1514         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForUChar):
1515         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForLChar):
1516         Added to allow template member function flexibleAppendFromAdapters to call
1517         appendUninitializedWithoutOverflowCheck without moving it to the header.
1518         
1519         * wtf/text/StringBuilder.h:
1520         (WTF::StringBuilder::flexibleAppendFromAdapters):
1521         (WTF::StringBuilder::flexibleAppend):
1522         Modeled on tryMakeStringFromAdapters in StringConcatenate.h, these
1523         eagerly compute the required length, expand the buffer and then use
1524         the existing string type adaptor accumulation functions used by makeString. 
1525
1526         * wtf/text/StringConcatenate.h:
1527         (WTF::stringTypeAdapterAccumulator):
1528         (WTF::tryMakeStringFromAdapters):
1529         (WTF::makeStringAccumulator): Deleted.
1530         Renames makeStringAccumulator to stringTypeAdapterAccumulator now that it is used
1531         by more than just makeString.
1532
1533 2019-07-17  Commit Queue  <commit-queue@webkit.org>
1534
1535         Unreviewed, rolling out r247505.
1536         https://bugs.webkit.org/show_bug.cgi?id=199871
1537
1538         "Caused failed ASSERT in stress test" (Requested by creid on
1539         #webkit).
1540
1541         Reverted changeset:
1542
1543         "Bytecode cache should use FileSystem"
1544         https://bugs.webkit.org/show_bug.cgi?id=199759
1545         https://trac.webkit.org/changeset/247505
1546
1547 2019-07-16  Christopher Reid  <chris.reid@sony.com>
1548
1549         Bytecode cache should use FileSystem
1550         https://bugs.webkit.org/show_bug.cgi?id=199759
1551
1552         Reviewed by Yusuke Suzuki.
1553
1554         * wtf/FileSystem.cpp:
1555         * wtf/FileSystem.h:
1556         Add support for creating MappedFileData from a preexisting file handle
1557         for use with locked files. Also support creating MappedFileData
1558         with either private or shared mappings.
1559
1560         * wtf/UUID.cpp:
1561         Avoid ASSERT with returning a LazyNeverDestroyed object that hasn't been created.
1562
1563         * wtf/glib/FileSystemGlib.cpp:
1564         * wtf/win/FileSystemWin.cpp:
1565         Add truncateFile implementations.
1566
1567 2019-07-16  Myles C. Maxfield  <mmaxfield@apple.com>
1568
1569         New York font erroneously gets synthetic bold
1570         https://bugs.webkit.org/show_bug.cgi?id=199653
1571
1572         Unreviewed MacCatalyst build fix.
1573
1574         * wtf/Platform.h:
1575
1576 2019-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1577
1578         [WPE][GTK] Improvements and fixes in FileSystemGlib.cpp
1579         https://bugs.webkit.org/show_bug.cgi?id=199800
1580
1581         Reviewed by Carlos Garcia Campos.
1582
1583         Use nullptr.
1584
1585         Fix a GFileInfo leak in getFileSize.
1586
1587         Use GRefPtr to clarify ownership of the GFileIOStream in openFile.
1588
1589         * wtf/glib/FileSystemGlib.cpp:
1590         (WTF::FileSystemImpl::getFileSize):
1591         (WTF::FileSystemImpl::getVolumeFreeSpace):
1592         (WTF::FileSystemImpl::openTemporaryFile):
1593         (WTF::FileSystemImpl::openFile):
1594         (WTF::FileSystemImpl::seekFile):
1595         (WTF::FileSystemImpl::writeToFile):
1596         (WTF::FileSystemImpl::readFromFile):
1597
1598 2019-07-15  Myles C. Maxfield  <mmaxfield@apple.com>
1599
1600         New York font erroneously gets synthetic bold
1601         https://bugs.webkit.org/show_bug.cgi?id=199653
1602
1603         Unreviewed watchOS build fix.
1604
1605         * wtf/Platform.h:
1606
1607 2019-07-15  Commit Queue  <commit-queue@webkit.org>
1608
1609         Unreviewed, rolling out r247462.
1610         https://bugs.webkit.org/show_bug.cgi?id=199816
1611
1612         completely messed up the patch (Requested by litherum on
1613         #webkit).
1614
1615         Reverted changeset:
1616
1617         "New York font erroneously gets synthetic bold"
1618         https://bugs.webkit.org/show_bug.cgi?id=199653
1619         https://trac.webkit.org/changeset/247462
1620
1621 2019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>
1622
1623         New York font erroneously gets synthetic bold
1624         https://bugs.webkit.org/show_bug.cgi?id=199653
1625         <rdar://problem/51692592>
1626
1627         Reviewed by Simon Fraser.
1628
1629         * wtf/Platform.h:
1630
1631 2019-07-15  Brady Eidson  <beidson@apple.com>
1632
1633         Make WKURLSchemeTask thread safe.
1634         <rdar://problem/50471863> and https://bugs.webkit.org/show_bug.cgi?id=199764
1635
1636         Reviewed by Alex Christensen.
1637
1638         * wtf/MainThread.cpp:
1639         (WTF::callOnMainAndWait):
1640         (WTF::callOnMainRunLoopAndWait):
1641         (WTF::callOnMainThreadAndWait):
1642         * wtf/MainThread.h:
1643
1644 2019-07-15  Dean Jackson  <dino@apple.com>
1645
1646         MacCatalyst asserts when command key is raised
1647         https://bugs.webkit.org/show_bug.cgi?id=199805
1648         <rdar://problem/53120393>
1649
1650         Reviewed by Tim Horton.
1651
1652         Add USE_UIKIT_KEYBOARD_ADDITIONS for iOS 13+ and macCatalyst.
1653
1654         * wtf/FeatureDefines.h:
1655
1656 2019-07-14  Chris Dumez  <cdumez@apple.com>
1657
1658         Add threading assertion to WeakPtrFactory::createWeakPtr()
1659         https://bugs.webkit.org/show_bug.cgi?id=199639
1660
1661         Reviewed by Ryosuke Niwa.
1662
1663         Add threading assertion to WeakPtrFactory::createWeakPtr() to make sure it
1664         is called on the same thread where the WeakPtrFactory wad constructed.
1665
1666         * wtf/WeakPtr.h:
1667         (WTF::WeakPtrFactory::WeakPtrFactory):
1668         (WTF::WeakPtrFactory::createWeakPtr const):
1669
1670 2019-07-14  Dean Jackson  <dino@apple.com>
1671
1672         WebGL not supported on WKWebView on UIKit for Mac
1673         https://bugs.webkit.org/show_bug.cgi?id=199785
1674         <rdar://problem/52911449>
1675
1676         Reviewed by Antoine Quint.
1677
1678         MacCatalyst has Apple Graphics Control, although
1679         this area is very messy, see <rdar://53062794>.
1680
1681         * wtf/Platform.h:
1682
1683 2019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>
1684
1685         New York font erroneously gets synthetic bold
1686         https://bugs.webkit.org/show_bug.cgi?id=199653
1687         <rdar://problem/51692592>
1688
1689         Reviewed by Simon Fraser.
1690
1691         * wtf/Platform.h:
1692
1693 2019-07-11  Pablo Saavedra  <psaavedra@igalia.com>
1694
1695         [WPE][GTK] Build failure with ENABLE_ACCESSIBILITY=OFF
1696         https://bugs.webkit.org/show_bug.cgi?id=199625
1697
1698         Added ENABLE(ACCESSIBILITY) and replaced HAVE(ACCESSIBILITY)
1699         with ENABLE(ACCESSIBILITY) in the code.
1700
1701         Additionally, the TestRunner code generator now honors the
1702         Conditional IDL format.
1703
1704         Reviewed by Konstantin Tokarev.
1705
1706         * wtf/FeatureDefines.h:
1707         * wtf/Platform.h:
1708
1709 2019-07-10  Ryan Haddad  <ryanhaddad@apple.com>
1710
1711         Unreviewed, rolling out r247286.
1712
1713         Caused TestWTF.WTF.StringOperators to fail on debug bots
1714
1715         Reverted changeset:
1716
1717         "Add StringBuilder member function which allows makeString()
1718         style variadic argument construction"
1719         https://bugs.webkit.org/show_bug.cgi?id=198997
1720         https://trac.webkit.org/changeset/247286
1721
1722 2019-07-09  Michael Catanzaro  <mcatanzaro@igalia.com>
1723
1724         [WPE][GTK] GUniqueOutPtr::release should return a raw pointer
1725         https://bugs.webkit.org/show_bug.cgi?id=199579
1726
1727         Reviewed by Carlos Garcia Campos.
1728
1729         GUniqueOutPtr::release should release to a raw pointer, rather than a GUniquePtr. If a
1730         GUniquePtr is desired, it's trivial to construct one from the raw pointer, but all existing
1731         callsites under Source/ would rather have a raw pointer. Currently they have to call
1732         release().release() to get the raw pointer, which is annoying.
1733
1734         * wtf/glib/GUniquePtr.h:
1735         (WTF::GUniqueOutPtr::release):
1736
1737 2019-07-09  Sam Weinig  <weinig@apple.com>
1738
1739         Add StringBuilder member function which allows makeString() style variadic argument construction
1740         https://bugs.webkit.org/show_bug.cgi?id=198997
1741
1742         Reviewed by Darin Adler.
1743
1744         Adds new StringBuilder::flexibleAppend(...) member function which allows passing one or more 
1745         string-adaptable (in the sense that there is StringTypeAdapter specialization for the 
1746         type) parameters. This re-ususes the variadic template infrastructure in StringConcatenate.h
1747         that is used for makeString(...) allowing for improvements in one to benefit the other.
1748
1749         The advantage of StringBuilder::flexibleAppend(...) over calling StringBuilder::append(...)
1750         multiple times (beyond the code sharing with makeString(...) is that it can avoid unnecessary
1751         additional re-allocations when the StringBuilder needs to expand it's capacity. It does this
1752         by computing the complete required length for all the passed arguments and then ensuring enough
1753         capacity is available. It also reduces the allocation overhead versus the anti-pattern of
1754         builder.append(makeString(...)).
1755
1756         Ideally, this member function should eventually just be called StringBuilder::append(...), but
1757         the current overload set for StringBuilder::append(...) makes this complicated due to overloads
1758         that take two arguments such as StringBuilder::append(const UChar*, unsigned). Going forward, we
1759         should rename or remove those overloads and move to a standard interface. 
1760
1761         * wtf/posix/FileSystemPOSIX.cpp:
1762         (WTF::FileSystemImpl::pathByAppendingComponents):
1763         Adopt StringBuilder::flexibleAppend, using to combine the append of '/' and component.
1764
1765         * wtf/text/StringBuilder.cpp:
1766         (WTF::StringBuilder::appendUninitialized):
1767         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheck):
1768         Extract the part of appendUnitialized that doesn't do the overflow check
1769         into it's own member function to allow callers that have already done the
1770         overflow check to bypass it.
1771
1772         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForUChar):
1773         (WTF::StringBuilder::appendUninitializedWithoutOverflowCheckForLChar):
1774         Added to allow template member function flexibleAppendFromAdapters to call
1775         appendUninitializedWithoutOverflowCheck without moving it to the header.
1776         
1777         * wtf/text/StringBuilder.h:
1778         (WTF::StringBuilder::flexibleAppendFromAdapters):
1779         (WTF::StringBuilder::flexibleAppend):
1780         Modeled on tryMakeStringFromAdapters in StringConcatenate.h, these
1781         eagerly compute the required length, expand the buffer and then use
1782         the existing string type adaptor accumulation functions used by makeString. 
1783
1784         * wtf/text/StringConcatenate.h:
1785         (WTF::stringTypeAdapterAccumulator):
1786         (WTF::tryMakeStringFromAdapters):
1787         (WTF::makeStringAccumulator): Deleted.
1788         Renames makeStringAccumulator to stringTypeAdapterAccumulator now that it is used
1789         by more than just makeString.
1790
1791 2019-07-09  Alex Christensen  <achristensen@webkit.org>
1792
1793         When parsing an IPv4 address, wait until after deciding it is indeed an IPv4 address before reporting syntax violations
1794         https://bugs.webkit.org/show_bug.cgi?id=199628
1795
1796         Reviewed by Brady Eidson.
1797
1798         Otherwise, we sometimes report syntax violations on things that are not IPv4 addresses and don't have syntax violations.
1799         I added a unit test with one such URL that used to cause an assertion.
1800
1801         * wtf/URLParser.cpp:
1802         (WTF::URLParser::parseIPv4Host):
1803
1804 2019-07-09  Alex Christensen  <achristensen@webkit.org>
1805
1806         Remove invalid assertion in URLParser::domainToASCII
1807         https://bugs.webkit.org/show_bug.cgi?id=199624
1808
1809         Reviewed by Brady Eidson.
1810
1811         When a non-ASCII domain's punycode encoding is longer than 63 characters,
1812         the URL is supposed to fail to parse, according to https://www.unicode.org/reports/tr46/#ToASCII
1813         We and all other browsers do this.  When uidna_nameToASCII tries to punycode encode such a domain,
1814         it can return a number larger than 63.  In this case, processingDetails.errors is UIDNA_ERROR_LABEL_TOO_LONG
1815         and we fail to parse as desired and uidna_nameToASCII did not write out of bounds, so it was just the assertion
1816         that was wrong.  I added some unit tests that would have hit the assertion and verify that we fail at the correct length.
1817
1818         * wtf/URLParser.cpp:
1819         (WTF::URLParser::domainToASCII):
1820
1821 2019-07-09  Alex Christensen  <achristensen@webkit.org>
1822
1823         URLParser should reserialize IPv6 addresses that end with a colon
1824         https://bugs.webkit.org/show_bug.cgi?id=199627
1825
1826         Reviewed by Brady Eidson.
1827
1828         When an IPv6 address ends in a colon, the colon should be removed which means the
1829         serialized output is different than the input, which the URLParser calls a syntax violation.
1830         This matches the URL specification, and I added a unit test that used to assert.
1831
1832         * wtf/URLParser.cpp:
1833         (WTF::URLParser::parseIPv6Host):
1834
1835 2019-07-08  Chris Dumez  <cdumez@apple.com>
1836
1837         Use WeakHashSet for WebUserContentControllerProxy::m_processes
1838         https://bugs.webkit.org/show_bug.cgi?id=199591
1839         <rdar://problem/52798721>
1840
1841         Reviewed by Youenn Fablet.
1842
1843         Update WeakHashSet::add() to return an AddResult type, similarly to our other containers.
1844
1845         * wtf/WeakHashSet.h:
1846         (WTF::WeakHashSet::add):
1847
1848 2019-07-08  Christopher Reid  <chris.reid@sony.com>
1849
1850         Implement MappedFileData for Windows
1851         https://bugs.webkit.org/show_bug.cgi?id=198269
1852
1853         Reviewed by Darin Adler.
1854
1855         Original patch by Fujii Hironori.
1856
1857         Add Windows implementations for MappedFileData constructor and destructor.
1858
1859         * wtf/FileSystem.cpp:
1860         * wtf/FileSystem.h:
1861         * wtf/win/FileSystemWin.cpp:
1862
1863 2019-07-08  Chris Dumez  <cdumez@apple.com>
1864
1865         Add threading assertion to WTF::CompletionHandler
1866         https://bugs.webkit.org/show_bug.cgi?id=199516
1867
1868         Reviewed by Alex Christensen.
1869
1870         Add threading assertion to WTF::CompletionHandler to try and catch common cases
1871         of unsafe usage (completion handler constructed on one thread but called on
1872         another).
1873
1874         * wtf/CompletionHandler.h:
1875         (WTF::CompletionHandler<Out):
1876
1877 2019-07-08  Antoine Quint  <graouts@apple.com>
1878
1879         [Pointer Events] Enable only on the most recent version of the supported iOS family
1880         https://bugs.webkit.org/show_bug.cgi?id=199562
1881         <rdar://problem/52766511>
1882
1883         Reviewed by Dean Jackson.
1884
1885         We really don't need HAVE_UI_WEB_TOUCH_EVENTS_GESTURE_RECOGNIZER_WITH_ACTIVE_TOUCHES_BY_ID since the UIKit SPI
1886         that was added in iOS 13 that it's checking for is really required for all parts of the implementation of Pointer
1887         Events, including dispatch of the "pointercancel" event and support for the "touch-action" CSS property.
1888
1889         * wtf/Platform.h:
1890
1891 2019-07-05  Ryan Haddad  <ryanhaddad@apple.com>
1892
1893         Unreviewed, rolling out r247115.
1894
1895         Breaks lldbWebKitTester (and by extension, test-webkitpy)
1896
1897         Reverted changeset:
1898
1899         "[WHLSL] Standard library is too big to directly include in
1900         WebCore"
1901         https://bugs.webkit.org/show_bug.cgi?id=198186
1902         https://trac.webkit.org/changeset/247115
1903
1904 2019-07-03  Jonathan Bedard  <jbedard@apple.com>
1905
1906         [Catalina] Enable WebKit build
1907         https://bugs.webkit.org/show_bug.cgi?id=199209
1908
1909         Reviewed by Darin Adler.
1910
1911         * wtf/spi/cocoa/SecuritySPI.h: Declare SecTrustedApplicationCreateFromPath(...).
1912
1913 2019-07-03  Keith Miller  <keith_miller@apple.com>
1914
1915         PACCage should first cage leaving PAC bits intact then authenticate
1916         https://bugs.webkit.org/show_bug.cgi?id=199372
1917
1918         Reviewed by Saam Barati.
1919
1920         * wtf/CagedPtr.h:
1921         (WTF::CagedPtr::get const):
1922         (WTF::CagedPtr::getMayBeNull const):
1923         (WTF::CagedPtr::mergePointers):
1924
1925 2019-07-03  Ryan Haddad  <ryanhaddad@apple.com>
1926
1927         Unreviewed, rolling out r246616.
1928
1929         Caused http/tests/inspector/network/har/har-page.html to fail
1930         on Catalina.
1931
1932         Reverted changeset:
1933
1934         "Web Inspector: Network: replace CFNetwork SPI with new API
1935         where able"
1936         https://bugs.webkit.org/show_bug.cgi?id=198762
1937         https://trac.webkit.org/changeset/246616
1938
1939 2019-07-02  Commit Queue  <commit-queue@webkit.org>
1940
1941         Unreviewed, rolling out r247041.
1942         https://bugs.webkit.org/show_bug.cgi?id=199425
1943
1944         broke some iOS arm64e tests (Requested by keith_miller on
1945         #webkit).
1946
1947         Reverted changeset:
1948
1949         "PACCage should first cage leaving PAC bits intact then
1950         authenticate"
1951         https://bugs.webkit.org/show_bug.cgi?id=199372
1952         https://trac.webkit.org/changeset/247041
1953
1954 2019-07-02  Chris Dumez  <cdumez@apple.com>
1955
1956         ThreadSafeRefCounted<DestructionThread::Main> is not safe to use in the UIProcess
1957         https://bugs.webkit.org/show_bug.cgi?id=199420
1958         <rdar://problem/52289717>
1959
1960         Reviewed by Ryosuke Niwa.
1961
1962         * wtf/MainThread.cpp:
1963         (WTF::isMainRunLoop):
1964         (WTF::callOnMainRunLoop):
1965         * wtf/MainThread.h:
1966         Add some function to MainThread.h to be used by ThreadSafeRefCounted to interact with the
1967         main RunLoop. This is used to avoid a circular dependency between RunLoop (which is
1968         ThreadSafeRefCounted) and ThreadSafeReCounted.
1969
1970         * wtf/ThreadSafeRefCounted.h:
1971         (WTF::ThreadSafeRefCounted::deref const):
1972         Add a new DestructionThread::MainRunLoop enum value to be used by classes that need to
1973         be destroyed on the main RunLoop rather than the main thread (which may be different
1974         when WK1 is invoved)
1975
1976 2019-07-02  Robin Morisset  <rmorisset@apple.com>
1977
1978         [WHLSL] the initializer in VariableDeclaration should be a std::unique_ptr, not Optional<UniqueRef<..>>
1979         https://bugs.webkit.org/show_bug.cgi?id=199389
1980
1981         Reviewed by Sam Weinig.
1982
1983         * wtf/UniqueRef.h:
1984         (WTF::UniqueRef::moveToUniquePtr): Added.
1985
1986 2019-07-02  Keith Miller  <keith_miller@apple.com>
1987
1988         PACCage should first cage leaving PAC bits intact then authenticate
1989         https://bugs.webkit.org/show_bug.cgi?id=199372
1990
1991         Reviewed by Saam Barati.
1992
1993         * wtf/CagedPtr.h:
1994         (WTF::CagedPtr::get const):
1995         (WTF::CagedPtr::getMayBeNull const):
1996         (WTF::CagedPtr::mergePointers):
1997
1998 2019-07-01  Philippe Normand  <pnormand@igalia.com>
1999
2000         [GStreamer] Cannot play Bert's Bytes radio stream from http://radio.dos.nl/
2001         https://bugs.webkit.org/show_bug.cgi?id=198376
2002
2003         Reviewed by Xabier Rodriguez-Calvar.
2004
2005         * wtf/glib/GLibUtilities.h:
2006         (enumToString): Utility function to get a string representation of of a GLib enum.
2007
2008 2019-06-22  Darin Adler  <darin@apple.com>
2009
2010         Streamline some string code, focusing on functions that were using substringSharingImpl
2011         https://bugs.webkit.org/show_bug.cgi?id=198898
2012
2013         Reviewed by Daniel Bates.
2014
2015         * wtf/URLHelpers.cpp:
2016         (WTF::URLHelpers::applyHostNameFunctionToURLString): Change code using
2017         substringSharingImpl so it could call String::find to call StringView::contains
2018         instead. Also rewrote lambdas to be simpler and likely more efficient.
2019         Rewrote another case using substringSharingImpl so it could call String::find
2020         to call StringView::find instead.
2021
2022         * wtf/text/StringView.cpp:
2023         (WTF::StringView::startsWith const): Added.
2024
2025         * wtf/text/StringView.h: Tweaked style a bit, and added an overload of
2026         StringView::contains that takes a CodeUnitMatchFunction and an overload
2027         of startsWith that cakes a UChar.
2028
2029 2019-06-28  Konstantin Tokarev  <annulen@yandex.ru>
2030
2031         Remove traces of ENABLE_ICONDATABASE remaining after its removal in 219733
2032         https://bugs.webkit.org/show_bug.cgi?id=199317
2033
2034         Reviewed by Michael Catanzaro.
2035
2036         While IconDatabase and all code using it was removed,
2037         ENABLE_ICONDATABASE still exists as build option and C++ macro.
2038
2039         * wtf/FeatureDefines.h:
2040
2041 2019-06-27  Konstantin Tokarev  <annulen@yandex.ru>
2042
2043         Avoid using WTF::Function for passing local function pointers and closures in URLHelpers.cpp
2044         https://bugs.webkit.org/show_bug.cgi?id=199271
2045
2046         Reviewed by Yusuke Suzuki.
2047
2048         WTF::Function allocates memory on heap, which is totally redundant in this
2049         case.
2050
2051         * wtf/URLHelpers.cpp:
2052         (WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
2053
2054 2019-06-27  Timothy Hatcher  <timothy@apple.com>
2055
2056         Move WebKitLegacy off of a couple AppKit ivars.
2057         https://bugs.webkit.org/show_bug.cgi?id=199279
2058         rdar://problem/34983438
2059
2060         Reviewed by Tim Horton.
2061
2062         * wtf/Platform.h: Added HAVE_SUBVIEWS_IVAR_SPI.
2063
2064 2019-06-27  Beth Dakin  <bdakin@apple.com>
2065
2066         Upstream use of MACCATALYST
2067         https://bugs.webkit.org/show_bug.cgi?id=199245
2068         rdar://problem/51687723
2069
2070         Reviewed by Tim Horton.
2071
2072         * Configurations/SDKVariant.xcconfig:
2073         * wtf/FeatureDefines.h:
2074         * wtf/Platform.h:
2075
2076 2019-06-27  Don Olmstead  <don.olmstead@sony.com>
2077
2078         [FTW] Build JavaScriptCore
2079         https://bugs.webkit.org/show_bug.cgi?id=199254
2080
2081         Reviewed by Brent Fulgham.
2082
2083         * wtf/PlatformFTW.cmake: Added.
2084
2085 2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>
2086
2087         [CMake] Bump cmake_minimum_required version to 3.10
2088         https://bugs.webkit.org/show_bug.cgi?id=199181
2089
2090         Reviewed by Don Olmstead.
2091
2092         * CMakeLists.txt:
2093
2094 2019-06-26  Konstantin Tokarev  <annulen@yandex.ru>
2095
2096         Remove unneeded #include <wtf/glib/GRefPtr.h>
2097         https://bugs.webkit.org/show_bug.cgi?id=199228
2098
2099         Reviewed by Michael Catanzaro.
2100
2101         * wtf/MemoryPressureHandler.h:
2102
2103 2019-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
2104
2105         REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
2106         https://bugs.webkit.org/show_bug.cgi?id=199012
2107
2108         Reviewed by Saam Barati.
2109
2110         * wtf/Platform.h:
2111
2112 2019-06-25  Keith Miller  <keith_miller@apple.com>
2113
2114         CagedPtr doesn't merge PAC bits back into the resulting caged pointer.
2115         https://bugs.webkit.org/show_bug.cgi?id=199214
2116
2117         Reviewed by Yusuke Suzuki.
2118
2119         The current code means that caging will just strip the any failed
2120         authentication bits. Adding this code doesn't appear to be a
2121         regression on iPhone Xs.
2122
2123         * wtf/CagedPtr.h:
2124         (WTF::CagedPtr::get const):
2125         (WTF::CagedPtr::getMayBeNull const):
2126         (WTF::CagedPtr::getUnsafe const):
2127         (WTF::CagedPtr::mergePointers):
2128
2129 2019-06-25  Sam Weinig  <weinig@apple.com>
2130
2131         Experiment with simple structured bindings use
2132         https://bugs.webkit.org/show_bug.cgi?id=198905
2133
2134         Reviewed by Darin Adler.
2135
2136         * wtf/URLHelpers.cpp:
2137         (WTF::URLHelpers::mapHostNames):
2138         Simplify code using c++ structured bindings (https://en.cppreference.com/w/cpp/language/structured_binding)
2139         to see if all the platforms will work with it.
2140
2141 2019-06-25  Adam Barth  <abarth@webkit.org>
2142
2143         [fuchsia] Update to newer zx_clock_get syscall
2144         https://bugs.webkit.org/show_bug.cgi?id=199191
2145
2146         Reviewed by Sam Weinig.
2147
2148         Fuchsia has changed the zx_clock_get syscall to return the clock value
2149         via an out parameter rather than via its return value. This change
2150         makes zx_clock_get consistent with all the other syscalls.
2151
2152         This patch updates our use of zx_clock_get to use the new syscall. The
2153         old syscall is no longer supported by Fuchsia.
2154
2155         * wtf/fuchsia/CPUTimeFuchsia.cpp:
2156         (WTF::CPUTime::get): Switch to using the out parameter.
2157         (WTF::CPUTime::forCurrentThread): Switch to using the out parameter.
2158
2159 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2160
2161         Fully rename WebKitGTK+ -> WebKitGTK everywhere
2162         https://bugs.webkit.org/show_bug.cgi?id=199159
2163
2164         Reviewed by Carlos Garcia Campos.
2165
2166         * wtf/URLParser.cpp:
2167         (WTF::URLParser::internationalDomainNameTranscoder):
2168
2169 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2170
2171         Require GCC 7
2172         https://bugs.webkit.org/show_bug.cgi?id=198914
2173
2174         Reviewed by Darin Adler.
2175
2176         Remove now-stale GCC version check.
2177
2178         * wtf/Compiler.h:
2179
2180 2019-06-23  Simon Fraser  <simon.fraser@apple.com>
2181
2182         Add OverflowScrollProxyNodes to the scrolling tree
2183         https://bugs.webkit.org/show_bug.cgi?id=199132
2184
2185         Reviewed by Antti Koivisto.
2186         
2187         Setting indent is useful if you want to make a new stream with the indent of an
2188         existing stream.
2189
2190         * wtf/text/TextStream.h:
2191         (WTF::TextStream::setIndent):
2192
2193 2019-06-20  Fujii Hironori  <Hironori.Fujii@sony.com>
2194
2195         Try to use C++14 std::enable_if_t in CheckedArithmetic.h again
2196         https://bugs.webkit.org/show_bug.cgi?id=199099
2197
2198         Reviewed by Ross Kirsling.
2199
2200         r242235 changed CheckedArithmetic to not use C++14. Let's try
2201         C++14 again.
2202
2203         * wtf/CheckedArithmetic.h: Use C++14 std::make_unsigned_t and std::enable_if_t.
2204
2205 2019-06-18  Darin Adler  <darin@apple.com>
2206
2207         Tidy up the remaining bits of the AtomicString to AtomString rename
2208         https://bugs.webkit.org/show_bug.cgi?id=198990
2209
2210         Reviewed by Michael Catanzaro.
2211
2212         * wtf/text/AtomString.cpp: Fix a comment.
2213         * wtf/text/AtomString.h: Tweak formatting a bit. Use nullptr instead of 0.
2214         Removed "using AtomicString = AtomString".
2215         * wtf/text/AtomStringImpl.cpp:
2216         (WTF::CStringTranslator::translate): Use setIsAtom instead of setIsAtomic.
2217         (WTF::UCharBufferTranslator::translate): Ditto.
2218         (WTF::HashAndUTF8CharactersTranslator::translate): Ditto.
2219         (WTF::SubstringTranslator::translate): Ditto.
2220         (WTF::LCharBufferTranslator::translate): Ditto.
2221         (WTF::BufferFromStaticDataTranslator::translate): Ditto.
2222         (WTF::AtomStringImpl::addSlowCase): Ditto.
2223         (WTF::AtomStringImpl::lookUpSlowCase): Updated assertion message.
2224
2225         * wtf/text/AtomStringImpl.h: Tweaked the implementation of add.
2226         Updated comments to say AtomString.
2227
2228         * wtf/text/AtomStringTable.cpp:
2229         (WTF::AtomStringTable::~AtomStringTable): Use setIsAtom.
2230
2231         * wtf/text/StringImpl.h: Updated name of StringAtomic and
2232         s_hashFlagStringKindIsAtom. Renamed to flagIsAtom and setIsAtom.
2233
2234         * wtf/text/WTFString.cpp:
2235         (WTF::String::isSafeToSendToAnotherThread const): Updated comment.
2236
2237 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2238
2239         [GTK] Remove support for GTK2 plugins
2240         https://bugs.webkit.org/show_bug.cgi?id=199065
2241
2242         Reviewed by Sergio Villar Senin.
2243
2244         * wtf/Platform.h:
2245         * wtf/glib/GTypedefs.h:
2246
2247 2019-06-19  Yusuke Suzuki  <ysuzuki@apple.com>
2248
2249         [bmalloc] IsoHeap's initialization is racy with IsoHeap::isInitialized
2250         https://bugs.webkit.org/show_bug.cgi?id=199053
2251
2252         Reviewed by Saam Barati.
2253
2254         Add constexpr static functions to generate pseudo random numbers from __LINE__.
2255
2256         * wtf/WeakRandom.h:
2257         (WTF::WeakRandom::nextState):
2258         (WTF::WeakRandom::generate):
2259         (WTF::WeakRandom::advance):
2260
2261 2019-06-19  Fujii Hironori  <Hironori.Fujii@sony.com>
2262
2263         Add WTF::crossThreadCopy(T&&) to utilize String::isolatedCopy() &&
2264         https://bugs.webkit.org/show_bug.cgi?id=198957
2265
2266         Reviewed by Alex Christensen.
2267
2268         &&-qualified String::isolatedCopy() has a optimization path which
2269         does just WTFMove if it isSafeToSendToAnotherThread which means
2270         the object hasOneRef.
2271
2272         However, WTF::crossThreadCopy was using only &-qualified
2273         isolatedCopy. To use the optimization, added
2274         WTF::crossThreadCopy(T&&) overloading.
2275
2276         * wtf/CrossThreadCopier.h:
2277         (WTF::crossThreadCopy): Added a overload of (T&&).
2278         * wtf/CrossThreadTask.h:
2279         (WTF::createCrossThreadTask): Removed explicit template arguments of crossThreadCopy.
2280
2281 2019-06-19  Devin Rousso  <drousso@apple.com>
2282
2283         Web Inspector: Network: replace CFNetwork SPI with new API where able
2284         https://bugs.webkit.org/show_bug.cgi?id=198762
2285
2286         Reviewed by Timothy Hatcher.
2287
2288         * wtf/Platform.h:
2289
2290 2019-06-19  Alex Christensen  <achristensen@webkit.org>
2291
2292         Add a unit test for client certificate authentication
2293         https://bugs.webkit.org/show_bug.cgi?id=197800
2294
2295         Reviewed by Youenn Fablet.
2296
2297         * wtf/spi/cocoa/SecuritySPI.h:
2298         Move declarations from ArgumentCodersCF.cpp so they can be shared.
2299
2300 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
2301
2302         [WPE][GTK] Fix build with unified sources disabled
2303         https://bugs.webkit.org/show_bug.cgi?id=198752
2304
2305         Reviewed by Michael Catanzaro.
2306
2307         * wtf/text/StringBuilder.h: Add missing include of StringConcatenateNumbers.h
2308
2309 2019-06-19  Zan Dobersek  <zdobersek@igalia.com>
2310
2311         USE_ANGLE macro can be evaluated without being defined
2312         https://bugs.webkit.org/show_bug.cgi?id=198991
2313
2314         Reviewed by Carlos Garcia Campos.
2315
2316         * wtf/Platform.h: On platforms not yet defining USE_ANGLE, the
2317         incompatibility check with some other flags leads to the macro being
2318         evaluated even when it was not defined, producing compiler warnings.
2319         To avoid this, the macro should be defined to 0 before the check in
2320         case it was not defined already.
2321
2322 2019-06-18  Dean Jackson  <dino@apple.com>
2323
2324         UIContextMenuInteraction implementation for WKContentView
2325         https://bugs.webkit.org/show_bug.cgi?id=198986
2326         <rdar://problem/51875189>
2327
2328         Reviewed by Andy Estes.
2329
2330         Add USE_UICONTEXTMENU for iOS 13+.
2331
2332         * wtf/Platform.h:
2333
2334 2019-06-18  Kenneth Russell  <kbr@chromium.org>
2335
2336         Add preliminary ANGLE backend to WebCore
2337         https://bugs.webkit.org/show_bug.cgi?id=197755
2338
2339         Reviewed by Dean Jackson.
2340
2341         Add a USE_ANGLE definition to wtf/Platform.h (currently disabled)
2342         which, when enabled, uses ANGLE instead of the OpenGL or OpenGL ES
2343         backend.
2344
2345         * wtf/Platform.h:
2346
2347 2019-06-17  Jiewen Tan  <jiewen_tan@apple.com>
2348
2349         Move SOAuthorization from WebKitAdditions to WebKit
2350         https://bugs.webkit.org/show_bug.cgi?id=198874
2351         <rdar://problem/47573431>
2352
2353         Reviewed by Brent Fulgham.
2354
2355         * wtf/Platform.h:
2356         Adds a feature flag to detect AppSSO framework.
2357
2358 2019-06-17  Ryan Haddad  <ryanhaddad@apple.com>
2359
2360         Unreviewed, rolling out r246501.
2361
2362         Breaks Apple internal builds.
2363
2364         Reverted changeset:
2365
2366         "Support using ANGLE as the backend for the WebGL
2367         implementation"
2368         https://bugs.webkit.org/show_bug.cgi?id=197755
2369         https://trac.webkit.org/changeset/246501
2370
2371 2019-06-17  Kenneth Russell  <kbr@chromium.org>
2372
2373         Support using ANGLE as the backend for the WebGL implementation
2374         https://bugs.webkit.org/show_bug.cgi?id=197755
2375
2376         Reviewed by Dean Jackson.
2377
2378         Add a USE_ANGLE definition to wtf/Platform.h (currently disabled)
2379         which, when enabled, uses ANGLE instead of the OpenGL or OpenGL ES
2380         backend.
2381
2382         * wtf/Platform.h:
2383
2384 2019-06-16  Darin Adler  <darin@apple.com>
2385
2386         Rename AtomicString to AtomString
2387         https://bugs.webkit.org/show_bug.cgi?id=195276
2388
2389         Reviewed by Michael Catanzaro.
2390
2391         * many files: Let do-webcore-rename do the renaming.
2392
2393         * wtf/text/AtomString.h: After renaming, added AtomicString as a synonym for
2394         now; helps smooth things over with a tiny bit of Apple internal software so
2395         we don't have to do this all at once. Can remove it soon.
2396
2397 2019-06-16  Eric Carlson  <eric.carlson@apple.com>
2398
2399         [MediaStream] Avoid roundoff error when setting AVCapture min/max frame rate
2400         https://bugs.webkit.org/show_bug.cgi?id=198875
2401         <rdar://problem/51768374>
2402
2403         Reviewed by Youenn Fablet.
2404
2405         * wtf/MediaTime.h:
2406         (WTF::LogArgument<MediaTime>::toString):
2407         (WTF::LogArgument<MediaTimeRange>::toString):
2408
2409 2019-06-12  Antoine Quint  <graouts@apple.com>
2410
2411         Show the web page URL when sharing an AR model
2412         https://bugs.webkit.org/show_bug.cgi?id=198812
2413         <rdar://problem/48689498>
2414
2415         Reviewed by Dean Jackson.
2416
2417         * wtf/Platform.h:
2418
2419 2019-06-12  Youenn Fablet  <youenn@apple.com>
2420
2421         Use NSURLSession for WebSocket
2422         https://bugs.webkit.org/show_bug.cgi?id=198568
2423
2424         Reviewed by Geoffrey Garen.
2425
2426         * wtf/Platform.h:
2427         Introduce compile flag for WebSocket NSURLSession
2428
2429 2019-06-12  Commit Queue  <commit-queue@webkit.org>
2430
2431         Unreviewed, rolling out r246322.
2432         https://bugs.webkit.org/show_bug.cgi?id=198796
2433
2434         "It's a huge page load regression on iOS" (Requested by
2435         saamyjoon on #webkit).
2436
2437         Reverted changeset:
2438
2439         "Roll out PAC cage"
2440         https://bugs.webkit.org/show_bug.cgi?id=198726
2441         https://trac.webkit.org/changeset/246322
2442
2443 2019-06-10  Simon Fraser  <simon.fraser@apple.com>
2444
2445         Add logging for UI-side compositing hit-testing
2446         https://bugs.webkit.org/show_bug.cgi?id=198739
2447
2448         Reviewed by Antti Koivisto.
2449
2450         Make it possible to output an Objective-C object to TextStream, which will
2451         log its -description.
2452
2453         Also add a template for OptionSet<> printing.
2454
2455         * WTF.xcodeproj/project.pbxproj:
2456         * wtf/text/TextStream.h:
2457         (WTF::operator<<):
2458         * wtf/text/cocoa/TextStreamCocoa.mm: Added.
2459         (WTF::TextStream::operator<<):
2460
2461 2019-06-11  Saam Barati  <sbarati@apple.com>
2462
2463         Roll out PAC cage
2464         https://bugs.webkit.org/show_bug.cgi?id=198726
2465
2466         Reviewed by Keith Miller.
2467
2468         * WTF.xcodeproj/project.pbxproj:
2469         * wtf/CMakeLists.txt:
2470         * wtf/CagedPtr.h:
2471         (WTF::CagedPtr::CagedPtr):
2472         (WTF::CagedPtr::get const):
2473         (WTF::CagedPtr::getMayBeNull const):
2474         (WTF::CagedPtr::operator=):
2475         (WTF::CagedPtr::operator== const):
2476         (WTF::CagedPtr::operator!= const):
2477         (WTF::CagedPtr::operator bool const):
2478         (WTF::CagedPtr::operator* const):
2479         (WTF::CagedPtr::operator-> const):
2480         (WTF::CagedPtr::operator[] const):
2481         (WTF::CagedPtr::getUnsafe const): Deleted.
2482         (WTF::CagedPtr::at const): Deleted.
2483         (WTF::CagedPtr::recage): Deleted.
2484         * wtf/CagedUniquePtr.h:
2485         (WTF::CagedUniquePtr::CagedUniquePtr):
2486         (WTF::CagedUniquePtr::create):
2487         (WTF::CagedUniquePtr::operator=):
2488         (WTF::CagedUniquePtr::~CagedUniquePtr):
2489         (WTF::CagedUniquePtr::destroy):
2490         * wtf/Gigacage.h:
2491         (Gigacage::caged):
2492         (Gigacage::cagedMayBeNull): Deleted.
2493         * wtf/PtrTag.h:
2494         (WTF::tagArrayPtr): Deleted.
2495         (WTF::untagArrayPtr): Deleted.
2496         (WTF::removeArrayPtrTag): Deleted.
2497         (WTF::retagArrayPtr): Deleted.
2498         * wtf/TaggedArrayStoragePtr.h:
2499         (WTF::TaggedArrayStoragePtr::TaggedArrayStoragePtr): Deleted.
2500         (WTF::TaggedArrayStoragePtr::get const): Deleted.
2501         (WTF::TaggedArrayStoragePtr::getUnsafe const): Deleted.
2502         (WTF::TaggedArrayStoragePtr::resize): Deleted.
2503         (WTF::TaggedArrayStoragePtr::operator bool const): Deleted.
2504
2505 2019-06-10  Andy Estes  <aestes@apple.com>
2506
2507         [iOS] Use PDFKit SPI for taking snapshots when the hosting app is not entitled for global capture
2508         https://bugs.webkit.org/show_bug.cgi?id=198731
2509         <rdar://problem/46215174>
2510
2511         Reviewed by Tim Horton.
2512
2513         * wtf/FeatureDefines.h:
2514
2515 2019-06-10  Sam Weinig  <weinig@apple.com>
2516
2517         Remove Dashboard support
2518         https://bugs.webkit.org/show_bug.cgi?id=198615
2519
2520         Reviewed by Ryosuke Niwa.
2521
2522         * wtf/FeatureDefines.h:
2523
2524 2019-06-10  Timothy Hatcher  <timothy@apple.com>
2525
2526         Integrate dark mode support for iOS.
2527         https://bugs.webkit.org/show_bug.cgi?id=198687
2528         rdar://problem/51545643
2529
2530         Reviewed by Tim Horton.
2531
2532         * wtf/Platform.h:
2533
2534 2019-06-08  Andy Estes  <aestes@apple.com>
2535
2536         [Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests
2537         https://bugs.webkit.org/show_bug.cgi?id=198690
2538         <rdar://problem/48041803>
2539
2540         Reviewed by Tim Horton.
2541
2542         * wtf/FeatureDefines.h: Defined HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER, and cleaned up some
2543         other PassKit HAVEs.
2544
2545 2019-06-06  Caio Lima  <ticaiolima@gmail.com>
2546
2547         [JSCOnly] JSCOnly port is not building on macOS
2548         https://bugs.webkit.org/show_bug.cgi?id=198563
2549
2550         Reviewed by Don Olmstead.
2551
2552         We are adding `<mach/vm_types.h>` to fix build issues when compiling
2553         JSCOnly port on macOS.
2554
2555         * wtf/WTFAssertions.cpp:
2556
2557 2019-06-03  Commit Queue  <commit-queue@webkit.org>
2558
2559         Unreviewed, rolling out r246022.
2560         https://bugs.webkit.org/show_bug.cgi?id=198486
2561
2562         Causing Internal build failures and JSC test failures
2563         (Requested by ShawnRoberts on #webkit).
2564
2565         Reverted changeset:
2566
2567         "Reenable Gigacage on ARM64."
2568         https://bugs.webkit.org/show_bug.cgi?id=198453
2569         https://trac.webkit.org/changeset/246022
2570
2571 2019-06-03  Darin Adler  <darin@apple.com>
2572
2573         Finish cleanup of String::number for floating point
2574         https://bugs.webkit.org/show_bug.cgi?id=198471
2575
2576         Reviewed by Yusuke Suzuki.
2577
2578         * wtf/JSONValues.cpp:
2579         (WTF::JSONImpl::Value::writeJSON const): Use appendNumber instead of
2580         appendECMAScriptNumber, since that's now the default.
2581
2582         * wtf/text/StringBuilder.cpp:
2583         (WTF::StringBuilder::appendNumber): Renamed from appendShortestFormNumber.
2584         * wtf/text/StringBuilder.h: Removed appendShortestFormNumber and
2585         appendECMAScriptNumber, replacing both with overload of appendNumber.
2586
2587         * wtf/text/WTFString.cpp:
2588         (WTF::String::number): Renamed from numberToStringShortest.
2589         * wtf/text/WTFString.h: Removed numberToStringShortest and
2590         numberToStringECMAScript, replacing both with overload of number.
2591
2592 2019-06-02  Keith Miller  <keith_miller@apple.com>
2593
2594         Reenable Gigacage on ARM64.
2595         https://bugs.webkit.org/show_bug.cgi?id=198453
2596
2597         Reviewed by Filip Pizlo.
2598
2599         * wtf/CagedPtr.h:
2600         (WTF::CagedPtr::authenticatingLoad):
2601         (WTF::CagedPtr::get const):
2602         (WTF::CagedPtr::getMayBeNull const):
2603
2604 2019-05-31  Alex Christensen  <achristensen@webkit.org>
2605
2606         URLParser::parseIPv6Host should properly parse 0's around compression
2607         https://bugs.webkit.org/show_bug.cgi?id=198424
2608
2609         Reviewed by Tim Horton.
2610
2611         * wtf/URLParser.cpp:
2612         (WTF::URLParser::parseIPv6Host):
2613
2614 2019-05-31  Alex Christensen  <achristensen@webkit.org>
2615
2616         URLParser::parseHostAndPort should not allow non-port characters after an ipv6 host
2617         https://bugs.webkit.org/show_bug.cgi?id=198428
2618         <rdar://problem/51209196>
2619
2620         Reviewed by Tim Horton.
2621
2622         This matches Chrome and Firefox.
2623
2624         * wtf/URLParser.cpp:
2625         (WTF::URLParser::parseHostAndPort):
2626
2627 2019-05-31  Tim Horton  <timothy_horton@apple.com>
2628
2629         Optionally respect device management restrictions when loading from the network
2630         https://bugs.webkit.org/show_bug.cgi?id=198318
2631         <rdar://problem/44263806>
2632
2633         Reviewed by Alex Christensen.
2634
2635         * wtf/Platform.h:
2636         Add a HAVE flag for DeviceManagement.framework.
2637         It does exist in the simulator, but does not function; pretend it doesn't exist.
2638
2639 2019-05-31  Geoffrey Garen  <ggaren@apple.com>
2640
2641         Some WeakPtr cleanup
2642         https://bugs.webkit.org/show_bug.cgi?id=198390
2643
2644         Reviewed by Chris Dumez.
2645
2646         * wtf/WeakHashSet.h:
2647         (WTF::HashTraits<Ref<WeakPtrImpl>>::isReleasedWeakValue):
2648         (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator):
2649         Updated for rename to WeakPtrImpl.
2650
2651         (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Updated for new
2652         get() interface. Also, switched to iterator operator* to help clarify
2653         the double dereference here.
2654
2655         (WTF::WeakHashSet::add):
2656         (WTF::WeakHashSet::remove):
2657         (WTF::WeakHashSet::contains const):
2658         (WTF::WeakHashSet::computeSize const):
2659         (WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Deleted.
2660         Updated for rename to WeakPtrImpl.
2661
2662         * wtf/WeakPtr.h:
2663         (WTF::WeakPtrImpl::create):
2664         (WTF::WeakPtrImpl::~WeakPtrImpl): Renamed WeakReference to WeakPtrImpl.
2665         Now we don't need a comment explaining that this class is the backing
2666         implementation of WeakPtr.
2667
2668         (WTF::WeakPtrImpl::get): Return the pointer type we stored, rather than
2669         the pointer type requested by our client. It's a little too surprising
2670         for a field to store one pointer type and load another.
2671
2672         (WTF::WeakPtrImpl::WeakPtrImpl): Fixed a theoretical type safety bug.
2673         Make sure to store T::WeakValueType* instead of T*, since they might
2674         not be the same pointer value. (In practice, T and T::WeakValueType*
2675         are always the same type in this constructor because WeakPtrFactory
2676         makes them so, but it's best not to depend on implementation details
2677         across classes.)
2678
2679         (WTF::WeakPtr::get const): Updated for new get() interface.
2680
2681         (WTF::WeakPtr::operator bool const):
2682         (WTF::WeakPtr::operator=):
2683         (WTF::WeakPtr::clear):
2684         (WTF::WeakPtr::WeakPtr): Updated for WeakPtrImpl rename.
2685
2686         (WTF::WeakPtrFactory::~WeakPtrFactory): Updated for WeakPtrImpl rename.
2687
2688         (WTF::WeakPtrFactory::createWeakPtr const): ASSERT that the passed-in
2689         pointer is equal to the stored pointer. As a space optimization, we
2690         require our client to remind us what we point to each time a weak
2691         pointer is created -- but nothing guarantees that our client will do
2692         this correctly.
2693
2694         (WTF::WeakPtrFactory::revokeAll): Updated for WeakPtrImpl rename.
2695
2696         (WTF::CanMakeWeakPtr::weakPtrFactory const):
2697         (WTF::CanMakeWeakPtr::weakPtrFactory): Use idiomatic accessor naming.
2698
2699         (WTF::weak_ptr_impl_cast): Fixed a theoretical type safety bug.
2700         Previously, if Base and Derived both inherited CanMakeWeakPtr, and
2701         you casted WeakPtr<Base> to WeakPtr<Derived> (or vice versa), and
2702         casting Base <-> Derived required pointer fixup, the previous
2703         compile-time check would accept the cast, even though the stored pointer
2704         would be wrong.
2705
2706         (WTF::WeakPtr<T>::WeakPtr):
2707         (WTF::=):
2708         (WTF::makeWeakPtr):
2709         (WTF::WeakReference::create): Deleted.
2710         (WTF::WeakReference::~WeakReference): Deleted.
2711         (WTF::WeakReference::get const): Deleted.
2712         (WTF::WeakReference::operator bool const): Deleted.
2713         (WTF::WeakReference::clear): Deleted.
2714         (WTF::WeakReference::WeakReference): Deleted.
2715         (WTF::weak_reference_cast): Deleted. Updated for rename to WeakPtrImpl.
2716
2717         Don't export WeakPtrImpl because it's an implmenetation detail and
2718         it shouldn't be easy to use outside WTF.
2719
2720 2019-05-31  Don Olmstead  <don.olmstead@sony.com>
2721
2722         [CMake] Add WebKit::WTF target
2723         https://bugs.webkit.org/show_bug.cgi?id=198400
2724
2725         Reviewed by Konstantin Tokarev.
2726
2727         Create the WebKit::WTF target and use that to propagate headers. Use
2728         WEBKIT_COPY_FILES instead of WEBKIT_MAKE_FORWARDING_HEADERS.
2729
2730         * wtf/CMakeLists.txt:
2731
2732 2019-05-30  Saam Barati  <sbarati@apple.com>
2733
2734         [WHLSL] Enforce variable lifetimes
2735         https://bugs.webkit.org/show_bug.cgi?id=195794
2736         <rdar://problem/50746293>
2737
2738         Reviewed by Myles C. Maxfield.
2739
2740         * wtf/PrintStream.h:
2741
2742 2019-05-30  Keith Rollin  <krollin@apple.com>
2743
2744         Fix yet more deprecated uses of -[UIApplication interfaceOrientation]
2745         https://bugs.webkit.org/show_bug.cgi?id=198381
2746         <rdar://problem/51265846>
2747
2748         Reviewed by Wenson Hsieh.
2749
2750         r245267, r245272, and r245874 fixed many instances of this issue; this
2751         change fixes the issue for tvOS.
2752
2753         * wtf/FeatureDefines.h:
2754
2755 2019-05-29  David Kilzer  <ddkilzer@apple.com>
2756
2757         Clean up a few #include statements in WTF
2758         <https://webkit.org/b/198351>
2759
2760         Reviewed by Alex Christensen.
2761
2762         * benchmarks/HashSetDFGReplay.cpp:
2763         - Add missing "config.h" include.
2764         * wtf/ParallelJobsGeneric.cpp:
2765         - Replace include of ParallelJobs.h with
2766           ParallelJobsGeneric.h.
2767         * wtf/StackBounds.cpp:
2768         - Fix include ordering of StackBounds.h.
2769
2770 2019-05-29  Keith Rollin  <krollin@apple.com>
2771
2772         Followup to r245267 and r245272: fix even more deprecated uses of -[UIApplication interfaceOrientation]
2773         https://bugs.webkit.org/show_bug.cgi?id=198348
2774         <rdar://problem/51234077>
2775
2776         Reviewed by Wenson Hsieh.
2777
2778         r245267 and r245272 fixed many instances of this issue; this change
2779         fixes the issue for watchOS.
2780
2781         * wtf/FeatureDefines.h:
2782
2783 2019-05-29  David Kilzer  <ddkilzer@apple.com>
2784
2785         IndexedDatabase Server thread in com.apple.WebKit.Networking process leaks objects into an autoreleasePool that's never cleared
2786         <https://webkit.org/b/198346>
2787         <rdar://problem/50895658>
2788
2789         Reviewed by Brent Fulgham.
2790
2791         * wtf/CrossThreadTaskHandler.cpp:
2792         (WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):
2793         - Add optional second argument to enable use of an
2794           AutodrainedPool when running the runloop.
2795         (WTF::CrossThreadTaskHandler::taskRunLoop):
2796         - Create an AutodrainedPool if requested when
2797           CrossThreadTaskHandler was created.
2798         * wtf/CrossThreadTaskHandler.h:
2799         (WTF::CrossThreadTaskHandler::AutodrainedPoolForRunLoop):
2800         - Add enum class for enabling an AutodrainedPool for
2801           CrossThreadTaskHandler::taskRunLoop().
2802         (WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):
2803         - Add optional second argument to enable use of an
2804           AutodrainedPool when running the runloop.
2805
2806 2019-05-29  Geoffrey Garen  <ggaren@apple.com>
2807
2808         WeakPtr breaks vtables when upcasting to base classes
2809         https://bugs.webkit.org/show_bug.cgi?id=188799
2810
2811         Reviewed by Youenn Fablet.
2812
2813         This patch switches from reinterpret_cast to static_cast when loading
2814         from WeakReference storage.
2815
2816         We know which type to cast *to* because it's specified by the type of
2817         the calling WeakPtr.
2818
2819         We know which type to cast *from* because it's specified by a typedef
2820         in CanMakeWeakPtr.
2821
2822         (Our convention is that we store a pointer to the class that derives
2823         from CanMakeWeakPtr. We cast from that pointer to derived pointers when
2824         we get(). This means that #include of the derived type header is now
2825         required in order to get() the pointer.)
2826
2827         * wtf/WeakHashSet.h:
2828         (WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Definition
2829         is now eagerly required because WeakReference is not a template anymore.
2830
2831         (WTF::WeakHashSet::WeakHashSetConstIterator::get const):
2832         (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets):
2833         (WTF::WeakHashSet::remove):
2834         (WTF::WeakHashSet::contains const):
2835         (WTF::WeakHashSet::computesEmpty const):
2836         (WTF::WeakHashSet::hasNullReferences const):
2837         (WTF::WeakHashSet::computeSize const):
2838         (WTF::HashTraits<Ref<WeakReference<T>>>::isReleasedWeakValue): Deleted.
2839         Updated for new WeakReference get() API.
2840
2841         * wtf/WeakPtr.h: Use a macro for TestAPI support. We can't use template
2842         specialization because WeakReference is not a class template anymore.
2843         (Or maybe we could have kept it working with a dummy template argument?
2844         Felt weird, so I switched.)
2845
2846         (WTF::WeakReference::create):
2847         (WTF::WeakReference::~WeakReference):
2848         (WTF::WeakReference::get const):
2849         (WTF::WeakReference::operator bool const):
2850         (WTF::WeakReference::WeakReference): WeakReference is just a void* now.
2851         It's the caller's responsibility, when creating and getting, to use
2852         a consistent storage type. We ensure a canonical storage type using a
2853         typedef inside CanMakeWeakPtr.
2854
2855         (WTF::WeakPtr::WeakPtr):
2856         (WTF::WeakPtr::get const):
2857         (WTF::WeakPtr::operator bool const):
2858         (WTF::WeakPtr::operator-> const):
2859         (WTF::WeakPtr::operator* const): Adopted new WeakReference API.
2860
2861         (WTF::WeakPtrFactory::createWeakPtr const): No need for reinterpret_cast.
2862
2863         (WTF::weak_reference_cast): This isn't required for correctness, but it's
2864         nice to show a complier error at WeakPtr construction sites when you know
2865         that the types won't work. Otherwise, you get compiler errors at
2866         dereference sites, which are slightly more mysterious ways of saying that
2867         you constructed your WeakPtr incorrectly.
2868
2869         (WTF::WeakPtr<T>::WeakPtr):
2870         (WTF::=):
2871         (WTF::makeWeakPtr):
2872         (WTF::weak_reference_upcast): Deleted.
2873         (WTF::weak_reference_downcast): Deleted.
2874
2875 2019-05-29  Ryan Haddad  <ryanhaddad@apple.com>
2876
2877         Unreviewed, rolling out r245857.
2878
2879         Breaks internal builds.
2880
2881         Reverted changeset:
2882
2883         "WeakPtr breaks vtables when upcasting to base classes"
2884         https://bugs.webkit.org/show_bug.cgi?id=188799
2885         https://trac.webkit.org/changeset/245857
2886
2887 2019-05-28  Geoffrey Garen  <ggaren@apple.com>
2888
2889         WeakPtr breaks vtables when upcasting to base classes
2890         https://bugs.webkit.org/show_bug.cgi?id=188799
2891
2892         Reviewed by Youenn Fablet.
2893
2894         This patch switches from reinterpret_cast to static_cast when loading
2895         from WeakReference storage.
2896
2897         We know which type to cast *to* because it's specified by the type of
2898         the calling WeakPtr.
2899
2900         We know which type to cast *from* because it's specified by a typedef
2901         in CanMakeWeakPtr.
2902
2903         (Our convention is that we store a pointer to the class that derives
2904         from CanMakeWeakPtr. We cast from that pointer to derived pointers when
2905         we get(). This means that #include of the derived type header is now
2906         required in order to get() the pointer.)
2907
2908         * wtf/WeakHashSet.h:
2909         (WTF::HashTraits<Ref<WeakReference>>::isReleasedWeakValue): Definition
2910         is now eagerly required because WeakReference is not a template anymore.
2911
2912         (WTF::WeakHashSet::WeakHashSetConstIterator::get const):
2913         (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets):
2914         (WTF::WeakHashSet::remove):
2915         (WTF::WeakHashSet::contains const):
2916         (WTF::WeakHashSet::computesEmpty const):
2917         (WTF::WeakHashSet::hasNullReferences const):
2918         (WTF::WeakHashSet::computeSize const):
2919         (WTF::HashTraits<Ref<WeakReference<T>>>::isReleasedWeakValue): Deleted.
2920         Updated for new WeakReference get() API.
2921
2922         * wtf/WeakPtr.h: Use a macro for TestAPI support. We can't use template
2923         specialization because WeakReference is not a class template anymore.
2924         (Or maybe we could have kept it working with a dummy template argument?
2925         Felt weird, so I switched.)
2926
2927         (WTF::WeakReference::create):
2928         (WTF::WeakReference::~WeakReference):
2929         (WTF::WeakReference::get const):
2930         (WTF::WeakReference::operator bool const):
2931         (WTF::WeakReference::WeakReference): WeakReference is just a void* now.
2932         It's the caller's responsibility, when creating and getting, to use
2933         a consistent storage type. We ensure a canonical storage type using a
2934         typedef inside CanMakeWeakPtr.
2935
2936         (WTF::WeakPtr::WeakPtr):
2937         (WTF::WeakPtr::get const):
2938         (WTF::WeakPtr::operator bool const):
2939         (WTF::WeakPtr::operator-> const):
2940         (WTF::WeakPtr::operator* const): Adopted new WeakReference API.
2941
2942         (WTF::WeakPtrFactory::createWeakPtr const): No need for reinterpret_cast.
2943
2944         (WTF::weak_reference_cast): This isn't required for correctness, but it's
2945         nice to show a complier error at WeakPtr construction sites when you know
2946         that the types won't work. Otherwise, you get compiler errors at
2947         dereference sites, which are slightly more mysterious ways of saying that
2948         you constructed your WeakPtr incorrectly.
2949
2950         (WTF::WeakPtr<T>::WeakPtr):
2951         (WTF::=):
2952         (WTF::makeWeakPtr):
2953         (WTF::weak_reference_upcast): Deleted.
2954         (WTF::weak_reference_downcast): Deleted.
2955
2956 2019-05-27  Chris Dumez  <cdumez@apple.com>
2957
2958         Use a strongly-typed identifier for pages
2959         https://bugs.webkit.org/show_bug.cgi?id=198206
2960
2961         Reviewed by Youenn Fablet.
2962
2963         * wtf/ObjectIdentifier.h:
2964         (WTF::operator<<):
2965
2966 2019-05-23  Don Olmstead  <don.olmstead@sony.com>
2967
2968         [CMake] Use target oriented design for bmalloc
2969         https://bugs.webkit.org/show_bug.cgi?id=198046
2970
2971         Reviewed by Konstantin Tokarev.
2972
2973         Use WebKit::bmalloc target.
2974
2975         * wtf/CMakeLists.txt:
2976
2977 2019-05-23  Ross Kirsling  <ross.kirsling@sony.com>
2978
2979         [PlayStation] Implement platformUserPreferredLanguages.
2980         https://bugs.webkit.org/show_bug.cgi?id=198149
2981
2982         Reviewed by Fujii Hironori.
2983
2984         * wtf/PlatformPlayStation.cmake:
2985         * wtf/playstation/LanguagePlayStation.cpp: Added.
2986         (WTF::platformUserPreferredLanguages):
2987
2988 2019-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
2989
2990         font-optical-sizing applies the wrong variation value
2991         https://bugs.webkit.org/show_bug.cgi?id=197528
2992         <rdar://problem/50152854>
2993
2994         Reviewed by Antti Koivisto.
2995
2996         * wtf/Platform.h:
2997
2998 2019-05-22  Ryan Haddad  <ryanhaddad@apple.com>
2999
3000         Unreviewed, rolling out r245598.
3001
3002         Breaks watchOS build.
3003
3004         Reverted changeset:
3005
3006         "font-optical-sizing applies the wrong variation value"
3007         https://bugs.webkit.org/show_bug.cgi?id=197528
3008         https://trac.webkit.org/changeset/245598
3009
3010 2019-05-21  Ross Kirsling  <ross.kirsling@sony.com>
3011
3012         [PlayStation] Don't call fcntl.
3013         https://bugs.webkit.org/show_bug.cgi?id=197961
3014
3015         Reviewed by Fujii Hironori.
3016
3017         * wtf/PlatformGTK.cmake:
3018         * wtf/PlatformJSCOnly.cmake:
3019         * wtf/PlatformPlayStation.cmake:
3020         * wtf/PlatformWPE.cmake:
3021         * wtf/UniStdExtras.h:
3022         * wtf/playstation/UniStdExtrasPlayStation.cpp: Added.
3023         (WTF::setCloseOnExec):
3024         (WTF::dupCloseOnExec):
3025         (WTF::setNonBlock):
3026         * wtf/unix/UniStdExtrasUnix.cpp: Renamed from Source/WTF/wtf/UniStdExtras.cpp.
3027         (WTF::setNonBlock):
3028         Move UniStdExtras to unix/, add a PlayStation version that doesn't use fcntl, add an abstraction for O_NONBLOCK.
3029
3030 2019-05-20  Tadeu Zagallo  <tzagallo@apple.com>
3031
3032         Only cache bytecode for API clients in data vaults
3033         https://bugs.webkit.org/show_bug.cgi?id=197898
3034
3035         Reviewed by Keith Miller.
3036
3037         Add SPI to check if a filesystem path is restricted as a data vault.
3038
3039         * WTF.xcodeproj/project.pbxproj:
3040         * wtf/spi/darwin/DataVaultSPI.h: Added.
3041
3042 2019-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3043
3044         [GLIB] Repeating timer is not stopped when stop is called from the callback
3045         https://bugs.webkit.org/show_bug.cgi?id=197986
3046
3047         Reviewed by Michael Catanzaro.
3048
3049         In case of repeating timers we always update the ready time to fire interval after the user callback is called.
3050
3051         * wtf/glib/RunLoopGLib.cpp:
3052         (WTF::RunLoop::TimerBase::stop): Reset m_fireInterval and m_isRepeating.
3053
3054 2019-05-19  Darin Adler  <darin@apple.com>
3055
3056         Change String::number to use "shortest" instead of "fixed precision 6 digits"
3057         https://bugs.webkit.org/show_bug.cgi?id=178319
3058
3059         Reviewed by Sam Weinig.
3060
3061         * wtf/text/StringBuilder.h: Delete appendNumber for floating point and
3062         appendECMAScriptNumber for single-precision.
3063
3064         * wtf/text/WTFString.h: Delete String::number for floating point and
3065         numberToStringECMAScript for single-precision.
3066
3067 2019-05-18  Tadeu Zagallo  <tzagallo@apple.com>
3068
3069         Add extra information to dumpJITMemory
3070         https://bugs.webkit.org/show_bug.cgi?id=197998
3071
3072         Reviewed by Saam Barati.
3073
3074         Add a new trace point code for JSC::dumpJITMemory
3075
3076         * wtf/SystemTracing.h:
3077
3078 2019-05-17  Don Olmstead  <don.olmstead@sony.com>
3079
3080         [CMake] Use builtin FindICU
3081         https://bugs.webkit.org/show_bug.cgi?id=197934
3082
3083         Reviewed by Michael Catanzaro.
3084
3085         Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. Use ICU:: targets which end
3086         up propagating to all consumers of WTF.
3087
3088         * wtf/CMakeLists.txt:
3089         * wtf/PlatformPlayStation.cmake:
3090
3091 2019-05-17  Commit Queue  <commit-queue@webkit.org>
3092
3093         Unreviewed, rolling out r245418.
3094         https://bugs.webkit.org/show_bug.cgi?id=197989
3095
3096         New API test causing crashes on Mojave testers (Requested by
3097         ShawnRoberts on #webkit).
3098
3099         Reverted changeset:
3100
3101         "Add a unit test for client certificate authentication"
3102         https://bugs.webkit.org/show_bug.cgi?id=197800
3103         https://trac.webkit.org/changeset/245418
3104
3105 2019-05-16  Keith Miller  <keith_miller@apple.com>
3106
3107         Wasm should cage the memory base pointers in structs
3108         https://bugs.webkit.org/show_bug.cgi?id=197620
3109
3110         Reviewed by Saam Barati.
3111
3112         Rename reauthenticate to recage.
3113
3114         * wtf/CagedPtr.h:
3115         (WTF::CagedPtr::recage):
3116         (WTF::CagedPtr::reauthenticate): Deleted.
3117
3118 2019-05-16  Alex Christensen  <achristensen@webkit.org>
3119
3120         Add a unit test for client certificate authentication
3121         https://bugs.webkit.org/show_bug.cgi?id=197800
3122
3123         Reviewed by Youenn Fablet.
3124
3125         * wtf/spi/cocoa/SecuritySPI.h:
3126         Move declarations from ArgumentCodersCF.cpp so they can be shared.
3127
3128 2019-05-16  Eike Rathke  <erack@redhat.com>
3129
3130         Fix memcpy() call for big endian
3131         https://bugs.webkit.org/show_bug.cgi?id=197945
3132
3133         Reviewed by Michael Catanzaro.
3134
3135         * wtf/Packed.h:
3136         (WTF::alignof):
3137
3138 2019-05-15  Ross Kirsling  <ross.kirsling@sony.com>
3139
3140         [PlayStation] WTFCrash should preserve register state.
3141         https://bugs.webkit.org/show_bug.cgi?id=197932
3142
3143         Reviewed by Don Olmstead.
3144
3145         * wtf/Assertions.cpp:
3146         * wtf/Assertions.h:
3147         Let r196397 apply to PlayStation port as well.
3148
3149 2019-05-15  Simon Fraser  <simon.fraser@apple.com>
3150
3151         Make LOG_WITH_STREAM more efficient
3152         https://bugs.webkit.org/show_bug.cgi?id=197905
3153
3154         Reviewed by Alex Christensen.
3155
3156         Add a streamable repeat() class that can be used to output a series of characters.
3157         This is useful for indenting output.
3158
3159         * wtf/text/TextStream.h:
3160         (WTF::TextStream::repeat::repeat):
3161         (WTF::TextStream::operator<<):
3162
3163 2019-05-15  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3164
3165         compilation failure with clang 9
3166         https://bugs.webkit.org/show_bug.cgi?id=197911
3167
3168         Reviewed by Alex Christensen.
3169
3170         Use std namespace for nullptr_t in tagArrayPtr templates.
3171
3172         * wtf/PtrTag.h:
3173         (WTF::tagArrayPtr):
3174
3175 2019-05-14  Commit Queue  <commit-queue@webkit.org>
3176
3177         Unreviewed, rolling out r245281.
3178         https://bugs.webkit.org/show_bug.cgi?id=197887
3179
3180         Broke API Test TestWebKitAPI.Challenge.ClientCertificate
3181         (Requested by aakashjain on #webkit).
3182
3183         Reverted changeset:
3184
3185         "Add a unit test for client certificate authentication"
3186         https://bugs.webkit.org/show_bug.cgi?id=197800
3187         https://trac.webkit.org/changeset/245281
3188
3189 2019-05-14  Alex Christensen  <achristensen@webkit.org>
3190
3191         Add a unit test for client certificate authentication
3192         https://bugs.webkit.org/show_bug.cgi?id=197800
3193
3194         Reviewed by Youenn Fablet.
3195
3196         * wtf/spi/cocoa/SecuritySPI.h:
3197         Move declarations from ArgumentCodersCF.cpp so they can be shared.
3198
3199 2019-05-13  Robin Morisset  <rmorisset@apple.com>
3200
3201         IndexSet::isEmpty should use BitVector::isEmpty() instead of size()
3202         https://bugs.webkit.org/show_bug.cgi?id=197857
3203
3204         Reviewed by Darin Adler.
3205
3206         * wtf/IndexSet.h:
3207         (WTF::IndexSet::isEmpty const):
3208
3209 2019-05-13  Youenn Fablet  <youenn@apple.com>
3210
3211         [Mac] Use realpath for dlopen_preflight
3212         https://bugs.webkit.org/show_bug.cgi?id=197803
3213
3214         Reviewed by Eric Carlson.
3215
3216         * wtf/cocoa/SoftLinking.h:
3217
3218 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
3219
3220         Unreviewed, wrokaround for MACH_VM_MAX_ADDRESS in ARM32_64
3221         https://bugs.webkit.org/show_bug.cgi?id=197730
3222
3223         Interestingly, MACH_VM_MAX_ADDRESS is larger than 32bit in ARM32_64, I think this is a bug.
3224         But for now, we workaround for this case by using `CPU(ADDRESS64)`.
3225
3226         * wtf/WTFAssertions.cpp:
3227
3228 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
3229
3230         [WTF] Remove Threading workaround for support libraries in Windows
3231         https://bugs.webkit.org/show_bug.cgi?id=197350
3232
3233         Reviewed by Darin Adler.
3234
3235         We kept old APIs for some support libraries at 2017. This patch removes them.
3236
3237         * wtf/Threading.h:
3238         * wtf/win/ThreadingWin.cpp:
3239         (WTF::createThread): Deleted.
3240         (WTF::waitForThreadCompletion): Deleted.
3241
3242 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
3243
3244         [WTF] Simplify GCThread and CompilationThread flags by adding them to WTF::Thread
3245         https://bugs.webkit.org/show_bug.cgi?id=197146
3246
3247         Reviewed by Saam Barati.
3248
3249         Since GCThread and CompilationThread flags exist in WTF, we put these flags into WTF::Thread directly instead of holding them in ThreadSpecific<>.
3250         And this patch removes dependency from Threading.h to ThreadSpecific.h. ThreadSpecific.h's OS threading primitives are moved to ThreadingPrimitives.h,
3251         and Threading.h relies on it instead.
3252
3253         * wtf/CompilationThread.cpp:
3254         (WTF::isCompilationThread):
3255         (WTF::initializeCompilationThreads): Deleted.
3256         (WTF::exchangeIsCompilationThread): Deleted.
3257         * wtf/CompilationThread.h:
3258         (WTF::CompilationScope::CompilationScope):
3259         (WTF::CompilationScope::~CompilationScope):
3260         (WTF::CompilationScope::leaveEarly):
3261         * wtf/MainThread.cpp:
3262         (WTF::initializeMainThread):
3263         (WTF::initializeMainThreadToProcessMainThread):
3264         (WTF::isMainThreadOrGCThread):
3265         (WTF::initializeGCThreads): Deleted.
3266         (WTF::registerGCThread): Deleted.
3267         (WTF::mayBeGCThread): Deleted.
3268         * wtf/MainThread.h:
3269         * wtf/ThreadSpecific.h:
3270         (WTF::canBeGCThread>::ThreadSpecific):
3271         (WTF::canBeGCThread>::set):
3272         (WTF::threadSpecificKeyCreate): Deleted.
3273         (WTF::threadSpecificKeyDelete): Deleted.
3274         (WTF::threadSpecificSet): Deleted.
3275         (WTF::threadSpecificGet): Deleted.
3276         * wtf/Threading.cpp:
3277         (WTF::Thread::exchangeIsCompilationThread):
3278         (WTF::Thread::registerGCThread):
3279         (WTF::Thread::mayBeGCThread):
3280         * wtf/Threading.h:
3281         (WTF::Thread::isCompilationThread const):
3282         (WTF::Thread::gcThreadType const):
3283         (WTF::Thread::joinableState const):
3284         (WTF::Thread::hasExited const):
3285         (WTF::Thread::Thread):
3286         (WTF::Thread::joinableState): Deleted.
3287         (WTF::Thread::hasExited): Deleted.
3288         * wtf/ThreadingPrimitives.h:
3289         (WTF::threadSpecificKeyCreate):
3290         (WTF::threadSpecificKeyDelete):
3291         (WTF::threadSpecificSet):
3292         (WTF::threadSpecificGet):
3293         * wtf/win/ThreadSpecificWin.cpp:
3294         (WTF::flsKeys):
3295
3296 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
3297
3298         Unreviewed, follow-up after r245214
3299         https://bugs.webkit.org/show_bug.cgi?id=197730
3300
3301         Suggested by Sam. We should have static_assert with MACH_VM_MAX_ADDRESS.
3302
3303         * wtf/WTFAssertions.cpp:
3304
3305 2019-05-13  Youenn Fablet  <youenn@apple.com>
3306
3307         Use kDNSServiceFlagsKnownUnique for DNSServiceRegisterRecord only on platforms supporting it
3308         https://bugs.webkit.org/show_bug.cgi?id=197802
3309
3310         Reviewed by Eric Carlson.
3311
3312         * wtf/Platform.h:
3313
3314 2019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
3315
3316         [JSC] Compress miscelaneous JIT related data structures with Packed<>
3317         https://bugs.webkit.org/show_bug.cgi?id=197830
3318
3319         Reviewed by Saam Barati.
3320
3321         * wtf/Packed.h:
3322         (WTF::alignof):
3323
3324 2019-05-13  Michael Catanzaro  <mcatanzaro@igalia.com>
3325
3326         Unreviewed, fix unused variable warnings in release builds
3327
3328         * wtf/URLHelpers.cpp:
3329         (WTF::URLHelpers::escapeUnsafeCharacters):
3330
3331 2019-05-12  Yusuke Suzuki  <ysuzuki@apple.com>
3332
3333         [JSC] Compress Watchpoint size by using enum type and Packed<> data structure
3334         https://bugs.webkit.org/show_bug.cgi?id=197730
3335
3336         Reviewed by Filip Pizlo.
3337
3338         This patch introduces a new data structures, WTF::Packed, WTF::PackedPtr, and WTF::PackedAlignedPtr.
3339
3340         - WTF::Packed
3341
3342             WTF::Packed is data storage. We can read and write trivial (in C++ term [1]) data to this storage. The difference to
3343             the usual storage is that the alignment of this storage is always 1. We access the underlying data by using unalignedLoad/unalignedStore.
3344             This class offers alignment = 1 data structure instead of missing the following characteristics.
3345
3346                 1. Load / Store are non atomic even if the data size is within a pointer width. We should not use this for a member which can be accessed
3347                    in a racy way. (e.g. fields accessed optimistically from the concurrent compilers).
3348
3349                 2. We cannot take reference / pointer to the underlying storage since they are unaligned.
3350
3351                 3. Access to this storage is unaligned access. The code is using memcpy, and the compiler will convert to an appropriate unaligned access
3352                    in certain architectures (x86_64 / ARM64). It could be slow. So use it for non performance sensitive & memory sensitive places.
3353
3354         - WTF::PackedPtr
3355
3356             WTF::PackedPtr is a specialization of WTF::Packed<T*>. And it is basically WTF::PackedAlignedPtr with alignment = 1. We further compact
3357             the pointer by leveraging the platform specific knowledge. In 64bit architectures, the effective width of pointers are less than 64 bit.
3358             In x86_64, it is 48 bits. And Darwin ARM64 is further smaller, 36 bits. This information allows us to compact the pointer to 6 bytes in
3359             x86_64 and 5 bytes in Darwin ARM64.
3360
3361         - WTF::PackedAlignedPtr
3362
3363             WTF::PackedAlignedPtr is the WTF::PackedPtr with alignment information of the T. If we use this alignment information, we could reduce the
3364             size of packed pointer further in some cases. For example, since we guarantee that JSCells are 16 byte aligned, low 4 bits are empty. Leveraging
3365             this information in Darwin ARM64 platform allows us to make packed JSCell pointer 4 bytes (36 - 4 bits). We do not use passed alignment
3366             information if it is not profitable.
3367
3368         We also have PackedPtrTraits. This is new PtrTraits and use it for various data structures such as Bag<>.
3369
3370         [1]: https://en.cppreference.com/w/cpp/types/is_trivial
3371
3372         * WTF.xcodeproj/project.pbxproj:
3373         * wtf/Bag.h:
3374         (WTF::Bag::clear):
3375         (WTF::Bag::iterator::operator++):
3376         * wtf/CMakeLists.txt:
3377         * wtf/DumbPtrTraits.h:
3378         * wtf/DumbValueTraits.h:
3379         * wtf/MathExtras.h:
3380         (WTF::clzConstexpr):
3381         (WTF::clz):
3382         (WTF::ctzConstexpr):
3383         (WTF::ctz):
3384         (WTF::getLSBSetConstexpr):
3385         (WTF::getMSBSetConstexpr):
3386         * wtf/Packed.h: Added.
3387         (WTF::Packed::Packed):
3388         (WTF::Packed::get const):
3389         (WTF::Packed::set):
3390         (WTF::Packed::operator=):
3391         (WTF::Packed::exchange):
3392         (WTF::Packed::swap):
3393         (WTF::alignof):
3394         (WTF::PackedPtrTraits::exchange):
3395         (WTF::PackedPtrTraits::swap):
3396         (WTF::PackedPtrTraits::unwrap):
3397         * wtf/Platform.h:
3398         * wtf/SentinelLinkedList.h:
3399         (WTF::BasicRawSentinelNode::BasicRawSentinelNode):
3400         (WTF::BasicRawSentinelNode::prev):
3401         (WTF::BasicRawSentinelNode::next):
3402         (WTF::PtrTraits>::remove):
3403         (WTF::PtrTraits>::prepend):
3404         (WTF::PtrTraits>::append):
3405         (WTF::RawNode>::SentinelLinkedList):
3406         (WTF::RawNode>::remove):
3407         (WTF::BasicRawSentinelNode<T>::remove): Deleted.
3408         (WTF::BasicRawSentinelNode<T>::prepend): Deleted.
3409         (WTF::BasicRawSentinelNode<T>::append): Deleted.
3410         * wtf/StdLibExtras.h:
3411         (WTF::roundUpToMultipleOfImpl):
3412         (WTF::roundUpToMultipleOfImpl0): Deleted.
3413         * wtf/UnalignedAccess.h:
3414         (WTF::unalignedLoad):
3415         (WTF::unalignedStore):
3416
3417 2019-05-10  Saam barati  <sbarati@apple.com>
3418
3419         Bag's move operator= leaks memory
3420         https://bugs.webkit.org/show_bug.cgi?id=197757
3421
3422         Reviewed by Keith Miller.
3423
3424         It was unused. So I'm just removing it. We can implement it properly
3425         if we ever need it.
3426
3427         * wtf/Bag.h:
3428         (WTF::Bag::operator=): Deleted.
3429
3430 2019-05-10  Fujii Hironori  <Hironori.Fujii@sony.com>
3431
3432         [WinCairo] storage/indexeddb tests are timing out
3433         https://bugs.webkit.org/show_bug.cgi?id=196289
3434
3435         Reviewed by Alex Christensen.
3436
3437         * wtf/FileSystem.h: Added hardLink.
3438         * wtf/glib/FileSystemGlib.cpp:
3439         (WTF::FileSystemImpl::hardLink):
3440         (WTF::FileSystemImpl::hardLinkOrCopyFile):
3441         * wtf/posix/FileSystemPOSIX.cpp:
3442         (WTF::FileSystemImpl::hardLink):
3443         (WTF::FileSystemImpl::hardLinkOrCopyFile):
3444         * wtf/win/FileSystemWin.cpp:
3445         (WTF::FileSystemImpl::hardLink):
3446         (WTF::FileSystemImpl::hardLinkOrCopyFile):
3447         Added hardLink. Let hardLinkOrCopyFile use the hardLink.
3448
3449 2019-05-10  Yusuke Suzuki  <ysuzuki@apple.com>
3450
3451         [WTF] Remove "private:" from Noncopyable and Nonmovable macros
3452         https://bugs.webkit.org/show_bug.cgi?id=197767
3453
3454         Reviewed by Saam Barati.
3455
3456         We no longer need "private:".
3457
3458         * wtf/Noncopyable.h:
3459         * wtf/Nonmovable.h:
3460
3461 2019-05-08  Zan Dobersek  <zdobersek@igalia.com>
3462
3463         [GLib] Rework WPE RunLoopSourcePriority values
3464         https://bugs.webkit.org/show_bug.cgi?id=197167
3465
3466         Reviewed by Carlos Garcia Campos.
3467
3468         The GLib priorities for the WPE port were initially aligned on the -70
3469         value, theory being that this would help avoid any default-priority
3470         GSources spawned in different dependency libraries affecting our
3471         scheduling. Today it seems that extra caution might not be really
3472         necessary.
3473
3474         This change aligns the base priority value with GLib's default priority
3475         value of 0. We maintain the relativity of priority values by effectively
3476         increasing each priority by 70.
3477
3478         * wtf/glib/RunLoopSourcePriority.h:
3479
3480 2019-05-08  Alex Christensen  <achristensen@webkit.org>
3481
3482         Add SPI to set HSTS storage directory
3483         https://bugs.webkit.org/show_bug.cgi?id=197259
3484
3485         Reviewed by Brady Eidson.
3486
3487         * wtf/Platform.h:
3488
3489 2019-05-08  Keith Miller  <keith_miller@apple.com>
3490
3491         Remove Gigacage from arm64 and use PAC for arm64e instead
3492         https://bugs.webkit.org/show_bug.cgi?id=197110
3493
3494         Reviewed by Saam Barati.
3495
3496         This patch changes the Gigacage to use PAC on arm64e. As part of
3497         this process all platforms must provide their length when
3498         materializing the caged pointer. Since it would be somewhat
3499         confusing to have two parameters for an operator [] those methods
3500         have been removed. Lastly, this patch removes the specializations
3501         for void* caged pointers, instead opting to use enable_if on the
3502         methods that would normally fail on void* e.g. anything that
3503         returns a T&.
3504
3505         * WTF.xcodeproj/project.pbxproj:
3506         * wtf/CMakeLists.txt:
3507         * wtf/CagedPtr.h:
3508         (WTF::CagedPtr::CagedPtr):
3509         (WTF::CagedPtr::get const):
3510         (WTF::CagedPtr::getMayBeNull const):
3511         (WTF::CagedPtr::getUnsafe const):
3512         (WTF::CagedPtr::at const):
3513         (WTF::CagedPtr::reauthenticate):
3514         (WTF::CagedPtr::operator=):
3515         (WTF::CagedPtr::operator== const):
3516         (WTF::CagedPtr::operator bool const):
3517         (WTF::CagedPtr::operator* const): Deleted.
3518         (WTF::CagedPtr::operator-> const): Deleted.
3519         (WTF::CagedPtr::operator[] const): Deleted.
3520         (): Deleted.
3521         * wtf/CagedUniquePtr.h:
3522         (WTF::CagedUniquePtr::CagedUniquePtr):
3523         (WTF::CagedUniquePtr::create):
3524         (WTF::CagedUniquePtr::~CagedUniquePtr):
3525         (WTF::CagedUniquePtr::destroy):
3526         (): Deleted.
3527         * wtf/Gigacage.h:
3528         (Gigacage::cagedMayBeNull):
3529         * wtf/PtrTag.h:
3530         (WTF::tagArrayPtr):
3531         (WTF::untagArrayPtr):
3532         (WTF::removeArrayPtrTag):
3533         (WTF::retagArrayPtr):
3534         * wtf/TaggedArrayStoragePtr.h: Copied from Source/JavaScriptCore/runtime/ArrayBufferView.cpp.
3535         (WTF::TaggedArrayStoragePtr::TaggedArrayStoragePtr):
3536         (WTF::TaggedArrayStoragePtr::get const):
3537         (WTF::TaggedArrayStoragePtr::getUnsafe const):
3538         (WTF::TaggedArrayStoragePtr::resize):
3539         (WTF::TaggedArrayStoragePtr::operator bool const):
3540
3541 2019-05-08  Robin Morisset  <rmorisset@apple.com>
3542
3543         WTF::TimingScope should show the total duration and not just the mean
3544         https://bugs.webkit.org/show_bug.cgi?id=197672
3545
3546         Reviewed by Alex Christensen.
3547
3548         * wtf/TimingScope.cpp:
3549         (WTF::TimingScope::scopeDidEnd):
3550
3551 2019-05-07  Yusuke Suzuki  <ysuzuki@apple.com>
3552
3553         [JSC] LLIntPrototypeLoadAdaptiveStructureWatchpoint does not require Bag<>
3554         https://bugs.webkit.org/show_bug.cgi?id=197645
3555
3556         Reviewed by Saam Barati.
3557
3558         * WTF.xcodeproj/project.pbxproj:
3559         * wtf/CMakeLists.txt:
3560         * wtf/Nonmovable.h: Copied from Source/JavaScriptCore/bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h.
3561         * wtf/Vector.h:
3562         (WTF::minCapacity>::uncheckedConstructAndAppend):
3563
3564 2019-05-07  Eric Carlson  <eric.carlson@apple.com>
3565
3566         Define media buffering policy
3567         https://bugs.webkit.org/show_bug.cgi?id=196979
3568         <rdar://problem/28383861>
3569
3570         Reviewed by Jer Noble.
3571
3572         * wtf/Platform.h:
3573
3574 2019-05-07  Robin Morisset  <rmorisset@apple.com>
3575
3576         WTF::BitVector should have an isEmpty() method
3577         https://bugs.webkit.org/show_bug.cgi?id=197637
3578
3579         Reviewed by Keith Miller.
3580
3581         * wtf/BitVector.cpp:
3582         (WTF::BitVector::isEmptySlow const):
3583         * wtf/BitVector.h:
3584         (WTF::BitVector::isEmpty const):
3585
3586 2019-05-07  Brent Fulgham  <bfulgham@apple.com>
3587
3588         Correct JSON parser to address unterminated escape character
3589         https://bugs.webkit.org/show_bug.cgi?id=197582
3590         <rdar://problem/50459177>
3591
3592         Reviewed by Alex Christensen.
3593
3594         Correct JSON parser code to properly deal with unterminated escape
3595         characters.
3596
3597         * wtf/JSONValues.cpp:
3598         (WTF::JSONImpl::decodeString):
3599         (WTF::JSONImpl::parseStringToken):
3600
3601 2019-05-07  Alex Christensen  <achristensen@webkit.org>
3602
3603         Add a release assertion that Functions can only be constructed from non-null CompletionHandlers
3604         https://bugs.webkit.org/show_bug.cgi?id=197641
3605
3606         Reviewed by Chris Dumez.
3607
3608         This will help us find the cause of rdar://problem/48679972 by seeing the crash when the Function is dispatched,
3609         not when it's called with no interesting stack trace.  I manually verified this assertion is hit in such a case.
3610         We should also have no legitimate use of creating a Function out of a null CompletionHandler then never calling it.
3611
3612         * wtf/CompletionHandler.h:
3613         (WTF::Detail::CallableWrapper<CompletionHandler<Out):
3614         * wtf/Function.h:
3615         (WTF::Detail::CallableWrapperBase::~CallableWrapperBase):
3616         (WTF::Detail::CallableWrapper::CallableWrapper):
3617         (WTF::Function<Out):
3618
3619 2019-05-06  Christopher Reid  <chris.reid@sony.com>
3620
3621         [JSC] Respect already defined USE_LLINT_EMBEDDED_OPCODE_ID compiler variable.
3622         https://bugs.webkit.org/show_bug.cgi?id=197633
3623
3624         Reviewed by Don Olmstead.
3625
3626         When the variable `USE_LLINT_EMBEDDED_OPCODE_ID` is defined, stop defining
3627         its value with platform default one.
3628
3629         * wtf/Platform.h:
3630
3631 2019-05-03  Sihui Liu  <sihui_liu@apple.com>
3632
3633         Add assertion to check whether shm files have maximum FileProtection of CompleteUnlessOpen
3634         https://bugs.webkit.org/show_bug.cgi?id=197390
3635         <rdar://problem/42685773>
3636
3637         Reviewed by Geoffrey Garen.
3638
3639         * wtf/FileSystem.cpp:
3640         (WTF::FileSystemImpl::isSafeToUseMemoryMapForPath):
3641         (WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath):
3642         * wtf/FileSystem.h:
3643         * wtf/cocoa/FileSystemCocoa.mm:
3644         (WTF::FileSystemImpl::isSafeToUseMemoryMapForPath):
3645         (WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath):
3646
3647 2019-05-03  Commit Queue  <commit-queue@webkit.org>
3648
3649         Unreviewed, rolling out r244881.
3650         https://bugs.webkit.org/show_bug.cgi?id=197559
3651
3652         Breaks compilation of jsconly on linux, breaking compilation
3653         for jsc-i386-ews, jsc-mips-ews and jsc-armv7-ews (Requested by
3654         guijemont on #webkit).
3655
3656         Reverted changeset:
3657
3658         "[CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into
3659         WEBKIT_COPY_FILES"
3660         https://bugs.webkit.org/show_bug.cgi?id=197174
3661         https://trac.webkit.org/changeset/244881
3662
3663 2019-05-02  Alex Christensen  <achristensen@webkit.org>
3664
3665         Mark U+01C0 as a homograph of U+006C
3666         https://bugs.webkit.org/show_bug.cgi?id=197526
3667         <rdar://problem/50301904>
3668
3669         Reviewed by Tim Horton.
3670
3671         * wtf/URLHelpers.cpp:
3672         (WTF::URLHelpers::isLookalikeCharacter):
3673
3674 2019-05-02  Don Olmstead  <don.olmstead@sony.com>
3675
3676         [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES
3677         https://bugs.webkit.org/show_bug.cgi?id=197174
3678
3679         Reviewed by Alex Christensen.
3680
3681         Replace WEBKIT_MAKE_FORWARDING_HEADERS with WEBKIT_COPY_FILES.
3682
3683         * wtf/CMakeLists.txt:
3684
3685 2019-05-01  Darin Adler  <darin@apple.com>
3686
3687         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
3688         https://bugs.webkit.org/show_bug.cgi?id=195535
3689
3690         Reviewed by Alexey Proskuryakov.
3691
3692         * wtf/text/AtomicString.cpp:
3693         (WTF::AtomicString::fromUTF8Internal): Added code to compute string length when the
3694         end is nullptr; this behavior used to be implemented inside the
3695         calculateStringHashAndLengthFromUTF8MaskingTop8Bits function.
3696
3697         * wtf/text/AtomicStringImpl.cpp:
3698         (WTF::HashAndUTF8CharactersTranslator::translate): Updated for change to
3699         convertUTF8ToUTF16.
3700
3701         * wtf/text/AtomicStringImpl.h: Took the WTF_EXPORT_PRIVATE off of the
3702         AtomicStringImpl::addUTF8 function. This is used only inside a non-inlined function in
3703         the AtomicString class and its behavior changed subtly in this patch; it's helpful
3704         to document that it's not exported.
3705
3706         * wtf/text/StringImpl.cpp:
3707         (WTF::StringImpl::utf8Impl): Don't pass "true" for strictness to convertUTF16ToUTF8
3708         since strict is the default. Also updated for changes to ConversionResult.
3709         (WTF::StringImpl::utf8ForCharacters): Updated for change to convertLatin1ToUTF8.
3710         (WTF::StringImpl::tryGetUtf8ForRange const): Ditto.
3711
3712         * wtf/text/StringView.cpp: Removed uneeded include of UTF8Conversion.h.
3713
3714         * wtf/text/WTFString.cpp:
3715         (WTF::String::fromUTF8): Updated for change to convertUTF8ToUTF16.
3716
3717         * wtf/unicode/UTF8Conversion.cpp:
3718         (WTF::Unicode::inlineUTF8SequenceLengthNonASCII): Deleted.
3719         (WTF::Unicode::inlineUTF8SequenceLength): Deleted.
3720         (WTF::Unicode::UTF8SequenceLength): Deleted.
3721         (WTF::Unicode::decodeUTF8Sequence): Deleted.
3722         (WTF::Unicode::convertLatin1ToUTF8): Use U8_APPEND, enabling us to remove
3723         almost everything in the function. Also changed resturn value to be a boolean
3724         to indicate success since there is only one possible failure (target exhausted).
3725         There is room for further simplification, since most callers have lengths rather
3726         than end pointers for the source buffer, and all but one caller supplies a buffer
3727         size known to be sufficient, so those don't need a return value, nor do they need
3728         to pass an end of buffer pointer.
3729         (WTF::Unicode::convertUTF16ToUTF8): Use U_IS_LEAD, U_IS_TRAIL,
3730         U16_GET_SUPPLEMENTARY, U_IS_SURROGATE, and U8_APPEND. Also changed behavior
3731         for non-strict mode so that unpaired surrogates will be turned into the
3732         replacement character instead of invalid UTF-8 sequences, because U8_APPEND
3733         won't create an invalid UTF-8 sequence, and because we don't need to do that
3734         for any good reason at any call site.
3735         (WTF::Unicode::isLegalUTF8): Deleted.
3736         (WTF::Unicode::readUTF8Sequence): Deleted.
3737         (WTF::Unicode::convertUTF8ToUTF16): Use U8_NEXT instead of
3738         inlineUTF8SequenceLength, isLegalUTF8, and readUTF8Sequence. Use
3739         U16_APPEND instead of lots of code that does the same thing. There is
3740         room for further simplification since most callers don't need the "all ASCII"
3741         feature and could probably pass the arguments in a more natural way.
3742         (WTF::Unicode::calculateStringHashAndLengthFromUTF8MaskingTop8Bits):
3743         Use U8_NEXT instead of isLegalUTF8, readUTF8Sequence, and various
3744         error handling checks for things that are handled by U8_NEXT. Also removed
3745         support for passing nullptr for end to specify a null-terminated string.
3746         (WTF::Unicode::equalUTF16WithUTF8): Ditto.
3747
3748         * wtf/unicode/UTF8Conversion.h: Removed UTF8SequenceLength and
3749         decodeUTF8Sequence. Changed the ConversionResult to match WebKit coding
3750         style, with an eye toward perhaps removing it in the future. Changed
3751         the convertUTF8ToUTF16 return value to a boolean and removed the "strict"
3752         argument since no caller was passing false. Changed the convertLatin1ToUTF8
3753         return value to a boolean. Tweaked comments.
3754
3755 2019-05-01  Shawn Roberts  <sroberts@apple.com>
3756
3757         Unreviewed, rolling out r244821.
3758
3759         Causing
3760
3761         Reverted changeset:
3762
3763         "WebKit has too much of its own UTF-8 code and should rely
3764         more on ICU's UTF-8 support"
3765         https://bugs.webkit.org/show_bug.cgi?id=195535
3766         https://trac.webkit.org/changeset/244821
3767
3768 2019-05-01  Shawn Roberts  <sroberts@apple.com>
3769
3770         Unreviewed, rolling out r244822.
3771
3772         Causing 4 Test262 failures on JSC Release and Debug
3773
3774         Reverted changeset:
3775
3776         https://trac.webkit.org/changeset/244822 https://trac.webkit.org/changeset/244821
3777
3778 2019-04-29  Darin Adler  <darin@apple.com>
3779
3780         WebKit has too much of its own UTF-8 code and should rely more on ICU's UTF-8 support
3781         https://bugs.webkit.org/show_bug.cgi?id=195535
3782
3783         Reviewed by Alexey Proskuryakov.
3784
3785         * wtf/text/AtomicString.cpp:
3786         (WTF::AtomicString::fromUTF8Internal): Added code to compute string length when the
3787         end is nullptr; this behavior used to be implemented inside the
3788         calculateStringHashAndLengthFromUTF8MaskingTop8Bits function.
3789
3790         * wtf/text/AtomicStringImpl.cpp:
3791         (WTF::HashAndUTF8CharactersTranslator::translate): Updated for change to
3792         convertUTF8ToUTF16.
3793
3794         * wtf/text/AtomicStringImpl.h: Took the WTF_EXPORT_PRIVATE off of the
3795         AtomicStringImpl::addUTF8 function. This is used only inside a non-inlined function in
3796         the AtomicString class and its behavior changed subtly in this patch; it's helpful
3797         to document that it's not exported.
3798
3799         * wtf/text/StringImpl.cpp:
3800         (WTF::StringImpl::utf8Impl): Don't pass "true" for strictness to convertUTF16ToUTF8
3801         since strict is the default. Also updated for changes to ConversionResult.
3802         (WTF::StringImpl::utf8ForCharacters): Updated for change to convertLatin1ToUTF8.
3803         (WTF::StringImpl::tryGetUtf8ForRange const): Ditto.
3804
3805         * wtf/text/StringView.cpp: Removed uneeded include of UTF8Conversion.h.
3806
3807         * wtf/text/WTFString.cpp:
3808         (WTF::String::fromUTF8): Updated for change to convertUTF8ToUTF16.
3809
3810         * wtf/unicode/UTF8Conversion.cpp:
3811         (WTF::Unicode::inlineUTF8SequenceLengthNonASCII): Deleted.
3812         (WTF::Unicode::inlineUTF8SequenceLength): Deleted.
3813         (WTF::Unicode::UTF8SequenceLength): Deleted.
3814         (WTF::Unicode::decodeUTF8Sequence): Deleted.
3815         (WTF::Unicode::convertLatin1ToUTF8): Use U8_APPEND, enabling us to remove
3816         almost everything in the function. Also changed resturn value to be a boolean
3817         to indicate success since there is only one possible failure (target exhausted).
3818         There is room for further simplification, since most callers have lengths rather
3819         than end pointers for the source buffer, and all but one caller supplies a buffer
3820         size known to be sufficient, so those don't need a return value, nor do they need
3821         to pass an end of buffer pointer.
3822         (WTF::Unicode::convertUTF16ToUTF8): Use U_IS_LEAD, U_IS_TRAIL,
3823         U16_GET_SUPPLEMENTARY, U_IS_SURROGATE, and U8_APPEND. Also changed behavior
3824         for non-strict mode so that unpaired surrogates will be turned into the
3825         replacement character instead of invalid UTF-8 sequences, because U8_APPEND
3826         won't create an invalid UTF-8 sequence, and because we don't need to do that
3827         for any good reason at any call site.
3828         (WTF::Unicode::isLegalUTF8): Deleted.
3829         (WTF::Unicode::readUTF8Sequence): Deleted.
3830         (WTF::Unicode::convertUTF8ToUTF16): Use U8_NEXT instead of
3831         inlineUTF8SequenceLength, isLegalUTF8, and readUTF8Sequence. Use
3832         U16_APPEND instead of lots of code that does the same thing. There is
3833         room for further simplification since most callers don't need the "all ASCII"
3834         feature and could probably pass the arguments in a more natural way.
3835         (WTF::Unicode::calculateStringHashAndLengthFromUTF8MaskingTop8Bits):
3836         Use U8_NEXT instead of isLegalUTF8, readUTF8Sequence, and various
3837         error handling checks for things that are handled by U8_NEXT. Also removed
3838         support for passing nullptr for end to specify a null-terminated string.
3839         (WTF::Unicode::equalUTF16WithUTF8): Ditto.
3840
3841         * wtf/unicode/UTF8Conversion.h: Removed UTF8SequenceLength and
3842         decodeUTF8Sequence. Changed the ConversionResult to match WebKit coding
3843         style, with an eye toward perhaps removing it in the future. Changed
3844         the convertUTF8ToUTF16 return value to a boolean and removed the "strict"
3845         argument since no caller was passing false. Changed the convertLatin1ToUTF8
3846         return value to a boolean. Tweaked comments.
3847
3848 2019-04-30  John Wilander  <wilander@apple.com>
3849
3850         Add logging of Ad Click Attribution errors and events to a dedicated channel
3851         https://bugs.webkit.org/show_bug.cgi?id=197332
3852         <rdar://problem/49918800>
3853
3854         Reviewed by Youenn Fablet.
3855
3856         Added missing RELEASE_LOG_INFO and RELEASE_LOG_INFO_IF dummies
3857         for RELEASE_LOG_DISABLED.
3858
3859         * wtf/Assertions.h:
3860
3861 2019-04-30  Youenn Fablet  <youenn@apple.com>
3862
3863         Make Document audio producers use WeakPtr
3864         https://bugs.webkit.org/show_bug.cgi?id=197382
3865
3866         Reviewed by Eric Carlson.
3867
3868         * wtf/WeakHashSet.h:
3869         (WTF::WeakHashSet::hasNullReferences const):
3870
3871 2019-04-30  Commit Queue  <commit-queue@webkit.org>
3872
3873         Unreviewed, rolling out r244773.
3874         https://bugs.webkit.org/show_bug.cgi?id=197436
3875
3876         Causing assertion failures on debug queues (Requested by
3877         ShawnRoberts on #webkit).
3878
3879         Reverted changeset:
3880
3881         "Make Document audio producers use WeakPtr"
3882         https://bugs.webkit.org/show_bug.cgi?id=197382
3883         https://trac.webkit.org/changeset/244773
3884
3885 2019-04-30  Youenn Fablet  <youenn@apple.com>
3886
3887         Make Document audio producers use WeakPtr
3888         https://bugs.webkit.org/show_bug.cgi?id=197382
3889
3890         Reviewed by Eric Carlson.
3891
3892         * wtf/WeakHashSet.h:
3893         (WTF::WeakHashSet::hasNullReferences const):
3894
3895 2019-04-29  Alex Christensen  <achristensen@webkit.org>
3896
3897         <rdar://problem/50299396> Fix internal High Sierra build
3898         https://bugs.webkit.org/show_bug.cgi?id=197388
3899
3900         * Configurations/Base.xcconfig:
3901
3902 2019-04-29  Yusuke Suzuki  <ysuzuki@apple.com>
3903
3904         JITStubRoutineSet wastes 180KB of HashTable capacity on can.com
3905         https://bugs.webkit.org/show_bug.cgi?id=186732
3906
3907         Reviewed by Saam Barati.
3908
3909         * wtf/Range.h:
3910         (WTF::Range::contains const):
3911
3912 2019-04-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3913
3914         [Win] Add flag to enable version information stamping and disable by default.
3915         https://bugs.webkit.org/show_bug.cgi?id=197249
3916         <rdar://problem/50224412>
3917
3918         Reviewed by Ross Kirsling.
3919
3920         This feature is only used in AppleWin port. Add flag for this task and make it OFF by default.
3921         Then enable it by default on AppleWin.
3922
3923         * wtf/CMakeLists.txt:
3924
3925 2019-04-26  Don Olmstead  <don.olmstead@sony.com>
3926
3927         Add WTF::findIgnoringASCIICaseWithoutLength to replace strcasestr
3928         https://bugs.webkit.org/show_bug.cgi?id=197291
3929
3930         Reviewed by Konstantin Tokarev.
3931
3932         Adds an implementation of strcasestr within WTF.
3933
3934         * wtf/text/StringCommon.h:
3935         (WTF::findIgnoringASCIICaseWithoutLength):
3936
3937 2019-04-26  Sihui Liu  <sihui_liu@apple.com>
3938
3939         Stop IDB transactions to release locked database files when network process is ready to suspend
3940         https://bugs.webkit.org/show_bug.cgi?id=196372
3941         <rdar://problem/48930116>
3942
3943         Reviewed by Brady Eidson.
3944
3945         Provide a method to suspend the thread and block main thread until the thread is suspended.
3946
3947         * wtf/CrossThreadTaskHandler.cpp:
3948         (WTF::CrossThreadTaskHandler::taskRunLoop):
3949         (WTF::CrossThreadTaskHandler::suspendAndWait):
3950         (WTF::CrossThreadTaskHandler::resume):
3951         * wtf/CrossThreadTaskHandler.h:
3952
3953 2019-04-25  Fujii Hironori  <Hironori.Fujii@sony.com>
3954
3955         Unreviewed, rolling out r244669.
3956
3957         Windows ports can't clean build.
3958
3959         Reverted changeset:
3960
3961         "[Win] Add flag to enable version information stamping and
3962         disable by default."
3963         https://bugs.webkit.org/show_bug.cgi?id=197249
3964         https://trac.webkit.org/changeset/244669
3965
3966 2019-04-25  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3967
3968         [Win] Add flag to enable version information stamping and disable by default.
3969         https://bugs.webkit.org/show_bug.cgi?id=197249
3970
3971         Reviewed by Ross Kirsling.
3972
3973         This feature is only used in AppleWin port. Add flag for this task and make it OFF by default.
3974         Then enable it by default on AppleWin.
3975
3976         * wtf/CMakeLists.txt:
3977
3978 2019-04-25  Timothy Hatcher  <timothy@apple.com>
3979
3980         Disable date and time inputs on iOSMac.
3981         https://bugs.webkit.org/show_bug.cgi?id=197287
3982         rdar://problem/46794376
3983
3984         Reviewed by Wenson Hsieh.
3985
3986         * wtf/FeatureDefines.h:
3987
3988 2019-04-25  Alex Christensen  <achristensen@webkit.org>
3989
3990         Fix High Sierra build after r244653
3991         https://bugs.webkit.org/show_bug.cgi?id=197131
3992
3993         * wtf/StdLibExtras.h:
3994         High Sierra thinks __cplusplus is 201406 even when using C++17.
3995         Removing the __cplusplus check resolves the build failure on High Sierra.
3996         We can clean up StdLibExtras more later.
3997
3998 2019-04-25  Alex Christensen  <achristensen@webkit.org>
3999
4000         Start using C++17
4001         https://bugs.webkit.org/show_bug.cgi?id=197131
4002
4003         Reviewed by Darin Adler.
4004
4005         * Configurations/Base.xcconfig:
4006         * wtf/CMakeLists.txt:
4007         * wtf/Variant.h:
4008         (WTF::switchOn):
4009
4010 2019-04-25  Alex Christensen  <achristensen@webkit.org>
4011
4012         Remove DeprecatedOptional
4013         https://bugs.webkit.org/show_bug.cgi?id=197161
4014
4015         Reviewed by Darin Adler.
4016
4017         * WTF.xcodeproj/project.pbxproj:
4018         * wtf/CMakeLists.txt:
4019         * wtf/DeprecatedOptional.h: Removed.
4020
4021 2019-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
4022
4023         [GTK] Hardcoded text color in input fields
4024         https://bugs.webkit.org/show_bug.cgi?id=126907
4025
4026         Reviewed by Michael Catanzaro.
4027
4028         Define HAVE_OS_DARK_MODE_SUPPORT for GTK port.
4029
4030         * wtf/Platform.h:
4031
4032 2019-04-24  Tim Horton  <timothy_horton@apple.com>
4033
4034         Clean up WKActionSheetAssistant's use of LaunchServices
4035         https://bugs.webkit.org/show_bug.cgi?id=194645
4036         <rdar://problem/47707952>
4037
4038         Reviewed by Andy Estes.
4039
4040         * wtf/Platform.h:
4041
4042 2019-04-24  chris fleizach  <cfleizach@apple.com>
4043
4044         AX: Remove deprecated Accessibility Object Model events
4045         https://bugs.webkit.org/show_bug.cgi?id=197073
4046         <rdar://problem/50027819>
4047
4048         Reviewed by Ryosuke Niwa.
4049
4050         * wtf/Platform.h:
4051
4052 2019-04-23  Commit Queue  <commit-queue@webkit.org>
4053
4054         Unreviewed, rolling out r244558.
4055         https://bugs.webkit.org/show_bug.cgi?id=197219
4056
4057         Causing crashes on iOS Sim Release and Debug (Requested by
4058         ShawnRoberts on #webkit).
4059
4060         Reverted changeset:
4061
4062         "Remove DeprecatedOptional"
4063         https://bugs.webkit.org/show_bug.cgi?id=197161
4064         https://trac.webkit.org/changeset/244558
4065
4066 2019-04-23  Alex Christensen  <achristensen@webkit.org>
4067
4068         Remove DeprecatedOptional
4069         https://bugs.webkit.org/show_bug.cgi?id=197161
4070
4071         Reviewed by Darin Adler.
4072
4073         This was added in r209326 to be compatible with a shipping version of Safari.
4074         We have released several versions of Safari since then, so do what the comments say and remove it.
4075         The existence of this std::optional makes migrating to C++17 harder, and there's no reason to keep it.
4076
4077         * WTF.xcodeproj/project.pbxproj:
4078         * wtf/CMakeLists.txt:
4079         * wtf/DeprecatedOptional.h: Removed.
4080
4081 2019-04-21  Zan Dobersek  <zdobersek@igalia.com>
4082
4083         [WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
4084         https://bugs.webkit.org/show_bug.cgi?id=196963
4085
4086         Reviewed by Don Olmstead.
4087
4088         Have the generic memoryFootprint() implementation use bmalloc's
4089         memoryFootprint() API on Linux, whenever the system malloc option is
4090         not enabled. Limitation to Linux platforms is due to the bmalloc
4091         implementation being limited to those configurations (excluding iOS
4092         which doesn't use MemoryFootprintGeneric.cpp).
4093
4094         * wtf/PlatformWPE.cmake: Switch to building MemoryFootprintGeneric.cpp.
4095         * wtf/generic/MemoryFootprintGeneric.cpp:
4096         (WTF::memoryFootprint):
4097
4098 2019-04-19  Ryosuke Niwa  <rniwa@webkit.org>
4099
4100         HashTable::removeIf always shrinks the hash table by half even if there is nothing left
4101         https://bugs.webkit.org/show_bug.cgi?id=196681
4102         <rdar://problem/49917764>
4103
4104         Reviewed by Darin Adler.
4105
4106         Address Darin's comments by removing the explicit type from std::max.
4107
4108         * wtf/HashTable.h:
4109         (WTF::KeyTraits>::computeBestTableSize):
4110         (WTF::KeyTraits>::shrinkToBestSize):
4111
4112 2019-04-18  Chris Dumez  <cdumez@apple.com>
4113
4114         [iOS] Improve detection of when web views go to background / foreground
4115         https://bugs.webkit.org/show_bug.cgi?id=197035
4116         <rdar://problem/45281182>
4117
4118         Reviewed by Tim Horton.
4119
4120         Add build time flag.
4121
4122         * wtf/FeatureDefines.h:
4123
4124 2019-04-18  Jer Noble  <jer.noble@apple.com>
4125
4126         Add support for parsing FairPlayStreaming PSSH boxes.
4127         https://bugs.webkit.org/show_bug.cgi?id=197064
4128
4129         Reviewed by Eric Carlson.
4130
4131         * wtf/Platform.h:
4132
4133 2019-04-18  Yusuke Suzuki  <ysuzuki@apple.com>
4134
4135         [WTF] StringBuilder should set correct m_is8Bit flag when merging
4136         https://bugs.webkit.org/show_bug.cgi?id=197053
4137
4138         Reviewed by Saam Barati.
4139
4140         When appending StringBuilder to the other StringBuilder, we have a path that does not set m_is8Bit flag correctly.
4141         This patch correctly sets this flag. And we also change 0 to nullptr when we are using 0 as a pointer.
4142
4143         * wtf/text/StringBuilder.cpp:
4144         (WTF::StringBuilder::reserveCapacity):
4145         (WTF::StringBuilder::appendUninitializedSlow):
4146         (WTF::StringBuilder::append):
4147         * wtf/text/StringBuilder.h:
4148         (WTF::StringBuilder::append):
4149         (WTF::StringBuilder::characters8 const):
4150         (WTF::StringBuilder::characters16 const):
4151         (WTF::StringBuilder::clear):
4152
4153 2019-04-17  Tim Horton  <timothy_horton@apple.com>
4154
4155         Adopt different scroll view flashing SPI
4156         https://bugs.webkit.org/show_bug.cgi?id=197043
4157         <rdar://problem/49996476>
4158
4159         Reviewed by Wenson Hsieh.
4160
4161         * wtf/Platform.h:
4162
4163 2019-04-17  Jer Noble  <jer.noble@apple.com>
4164
4165         Enable HAVE_AVFOUNDATION_VIDEO_OUTPUT on PLATFORM(IOSMAC)
4166         https://bugs.webkit.org/show_bug.cgi?id=196994
4167         <rdar://problem/44158331>
4168
4169         Reviewed by Alex Christensen.
4170
4171         * wtf/Platform.h:
4172
4173 2019-04-16  Stephan Szabo  <stephan.szabo@sony.com>
4174
4175         [PlayStation] Update port for system library changes
4176         https://bugs.webkit.org/show_bug.cgi?id=196978
4177
4178         Reviewed by Ross Kirsling.
4179
4180         * wtf/PlatformPlayStation.cmake:
4181         Remove reference to deleted system library
4182
4183 2019-04-16  Jer Noble  <jer.noble@apple.com>
4184
4185         Enable HAVE_AVKIT on PLATFORM(IOSMAC)
4186         https://bugs.webkit.org/show_bug.cgi?id=196987
4187
4188         Reviewed by Tim Horton.
4189
4190         * wtf/Platform.h:
4191
4192 2019-04-16  Robin Morisset  <rmorisset@apple.com>
4193
4194         [WTF] holdLock should be marked WARN_UNUSED_RETURN
4195         https://bugs.webkit.org/show_bug.cgi?id=196922
4196
4197         Reviewed by Keith Miller.
4198
4199         * wtf/Locker.h:
4200
4201 2019-04-16  Don Olmstead  <don.olmstead@sony.com>
4202
4203         [CMake] Set WTF_SCRIPTS_DIR
4204         https://bugs.webkit.org/show_bug.cgi?id=196917
4205
4206         Reviewed by Konstantin Tokarev.
4207
4208         Use WTF_SCRIPTS_DIR for copying the unified sources script.
4209
4210         * wtf/CMakeLists.txt:
4211
4212 2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>
4213
4214         [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
4215         https://bugs.webkit.org/show_bug.cgi?id=196846
4216         <rdar://problem/49499971>
4217
4218         Reviewed by Simon Fraser and Darin Adler.
4219
4220         * wtf/RetainPtr.h:
4221         (WTF::safeCFEqual):
4222         (WTF::safeCFHash):
4223
4224 2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
4225
4226         HashTable::removeIf always shrinks the hash table by half even if there is nothing left
4227         https://bugs.webkit.org/show_bug.cgi?id=196681
4228
4229         Reviewed by Darin Adler.
4230
4231         Made HashTable::removeIf shrink to the "best size", which is the least power of two bigger
4232         than twice the key count as already used in the copy constructor.
4233
4234         * wtf/HashTable.h:
4235         (WTF::HashTable::computeBestTableSize): Extracted from the copy constructor.
4236         (WTF::HashTable::shrinkToBestSize): Added.
4237         (WTF::HashTable::removeIf): Use shrinkToBestSize instead of shrink.
4238         (WTF::HashTable::HashTable):
4239
4240 2019-04-12  Eric Carlson  <eric.carlson@apple.com>
4241
4242         Update AudioSession route sharing policy
4243         https://bugs.webkit.org/show_bug.cgi?id=196776
4244         <rdar://problem/46501611>
4245
4246         Reviewed by Jer Noble.
4247
4248         * wtf/Platform.h: Define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO.
4249 <