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