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