1 2019-02-03 Commit Queue <commit-queue@webkit.org>
3 Unreviewed, rolling out r240896.
4 https://bugs.webkit.org/show_bug.cgi?id=194202
6 "Fixes leaks, but is probably not the correct fix." (Requested
7 by ddkilzer on #webkit).
11 "Leak of WTF::StringImpl under SymbolImpl::createNullSymbol()
12 (48 bytes) in com.apple.WebKit.WebContent running layout
14 https://bugs.webkit.org/show_bug.cgi?id=193291
15 https://trac.webkit.org/changeset/240896
17 2019-02-02 David Kilzer <ddkilzer@apple.com>
19 Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests
20 <https://webkit.org/b/193291>
21 <rdar://problem/46655953>
23 Reviewed by Keith Miller.
25 * wtf/text/SymbolImpl.h:
26 (WTF::SymbolImpl::~SymbolImpl): Fix the leak by implementing the
27 class destructor that calls StringImpl::deref() on `m_owner`.
28 Two of the three constructors leak the StringImpl when setting
29 `m_owner`, so we need to balance that by manually calling
32 2018-12-16 Darin Adler <darin@apple.com>
34 Convert additional String::format clients to alternative approaches
35 https://bugs.webkit.org/show_bug.cgi?id=192746
37 Reviewed by Alexey Proskuryakov.
40 (WTF::appendDoubleQuotedStringEscapedCharacter): Renamed from
41 escapeChar and reordered arguments to make sense as an append function.
42 (WTF::appendDoubleQuotedString): Renamed from doubleQuoteString,
43 reordered arguments to make sense as an append function, take a
44 StringView instead of a String, used early exit to make the code
45 a bit easier to read. Use the ASCIIHexDigit functions to construct
46 a hex number a nibble at a time rather than using String::format.
47 (WTF::JSONImpl::Value::writeJSON const): Update for name change.
48 (WTF::JSONImpl::ObjectBase::writeJSON const): Ditto.
50 2019-01-31 Carlos Garcia Campos <cgarcia@igalia.com>
52 Unreviewed. Fix WPE compile warnings due to deprecated glib API.
56 2019-01-29 Chris Dumez <cdumez@apple.com>
58 Make sure WTF::generateObjectIdentifier() internal counter does not get duplicated
59 https://bugs.webkit.org/show_bug.cgi?id=193848
61 Reviewed by Youenn Fablet.
63 Move WTF::generateObjectIdentifier()'s internal counter out-of-line so make sure it never gets
64 duplicated at each call site. This has caused some hard-to-debug issues with duplicate
65 identifiers such as Bug 193761.
67 Also move it to ObjectIdentifier and rename it to generate() as this make call sites nicer
68 when they have a typedef for the ObjectIdentifier<T> type.
70 * WTF.xcodeproj/project.pbxproj:
72 * wtf/ObjectIdentifier.cpp: Copied from Source/WebCore/platform/Process.cpp.
73 (WTF::ObjectIdentifierBase::generateIdentifierInternal):
74 (WTF::ObjectIdentifierBase::generateThreadSafeIdentifierInternal):
75 * wtf/ObjectIdentifier.h:
76 (WTF::ObjectIdentifier::generate):
77 (WTF::ObjectIdentifier::generateThreadSafe):
79 2019-01-28 Ross Kirsling <ross.kirsling@sony.com>
81 Move platform-specific files out of WTF root directory.
82 https://bugs.webkit.org/show_bug.cgi?id=193929
84 Reviewed by Alex Christensen.
86 * WTF.xcodeproj/project.pbxproj:
88 * wtf/PlatformGTK.cmake:
89 * wtf/PlatformJSCOnly.cmake:
90 * wtf/PlatformMac.cmake:
91 * wtf/PlatformPlayStation.cmake:
92 * wtf/PlatformWPE.cmake:
93 * wtf/PlatformWin.cmake:
94 * wtf/cf/RunLoopTimerCF.cpp: Renamed from Source/WTF/wtf/RunLoopTimerCF.cpp.
95 * wtf/cf/SchedulePairCF.cpp: Renamed from Source/WTF/wtf/SchedulePairCF.cpp.
96 * wtf/mac/SchedulePairMac.mm: Renamed from Source/WTF/wtf/SchedulePairMac.mm.
97 * wtf/posix/OSAllocatorPOSIX.cpp: Renamed from Source/WTF/wtf/OSAllocatorPosix.cpp.
98 * wtf/posix/ThreadingPOSIX.cpp: Renamed from Source/WTF/wtf/ThreadingPthreads.cpp.
99 * wtf/win/CONTRIBUTORS.pthreads-win32: Renamed from Source/WTF/wtf/CONTRIBUTORS.pthreads-win32.
100 * wtf/win/OSAllocatorWin.cpp: Renamed from Source/WTF/wtf/OSAllocatorWin.cpp.
101 * wtf/win/ThreadSpecificWin.cpp: Renamed from Source/WTF/wtf/ThreadSpecificWin.cpp.
102 * wtf/win/ThreadingWin.cpp: Renamed from Source/WTF/wtf/ThreadingWin.cpp.
104 2019-01-28 Andy Estes <aestes@apple.com>
106 [watchOS] Enable Parental Controls content filtering
107 https://bugs.webkit.org/show_bug.cgi?id=193939
108 <rdar://problem/46641912>
110 Reviewed by Ryosuke Niwa.
114 2019-01-28 Ross Kirsling <ross.kirsling@sony.com>
116 [JSCOnly][WTF] Expose FileSystem.
117 https://bugs.webkit.org/show_bug.cgi?id=193789
119 Reviewed by Don Olmstead.
122 * wtf/PlatformJSCOnly.cmake:
123 * wtf/posix/FileSystemPOSIX.cpp:
124 (WTF::FileSystemImpl::getVolumeFreeSpace):
125 * wtf/win/FileSystemWin.cpp:
126 (WTF::FileSystemImpl::fileSystemRepresentation):
128 2019-01-28 Eric Carlson <eric.carlson@apple.com>
130 AVStreamSession isn't always available, make a HAVE compile flag for it
131 https://bugs.webkit.org/show_bug.cgi?id=193889
132 <rdar://problem/47452863>
134 Reviewed by Jer Noble.
136 * wtf/FeatureDefines.h:
138 2018-12-15 Darin Adler <darin@apple.com>
140 Replace many uses of String::format with more type-safe alternatives
141 https://bugs.webkit.org/show_bug.cgi?id=192742
143 Reviewed by Mark Lam.
146 (WTF::WorkQueue::concurrentApply): Use makeString.
149 (WTF::dtoa): Use sprintf instead of String::format in the comments,
150 since these functions have nothing to do with WTF::String.
152 2019-01-25 Chris Dumez <cdumez@apple.com>
154 [iOS] Add support for the download attribute
155 https://bugs.webkit.org/show_bug.cgi?id=167341
156 <rdar://problem/30296281>
158 Reviewed by Geoffrey Garen.
160 Turn on HTML download attribute support on iOS.
162 * wtf/FeatureDefines.h:
164 2019-01-25 David Kilzer <ddkilzer@apple.com>
166 Move soft-linking of Lookup.framework out of LookupSPI.h
167 <https://webkit.org/b/193815>
169 Reviewed by Tim Horton.
171 * wtf/cocoa/SoftLinking.h:
172 (SOFT_LINK_CONSTANT_FOR_HEADER):
173 (SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT):
174 (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER):
175 - Remove local declaration of constant. This should be handled
176 by including *SPI.h or "real" headers.
177 (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT):
178 - Remove local declaration of constant.
179 - Rename from SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE() and add
180 `export` argument to support exporting of functions.
181 (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE):
182 - Redefine in terms of
183 SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT().
185 2019-01-24 Youenn Fablet <youenn@apple.com>
187 Use MonotonicTime in WorkerRunLoop
188 https://bugs.webkit.org/show_bug.cgi?id=193417
190 Reviewed by Saam Barati.
192 * wtf/MessageQueue.h:
193 (WTF::MessageQueue<DataType>::waitForMessage):
194 (WTF::MessageQueue<DataType>::waitForMessageFilteredWithTimeout):
196 2019-01-24 Ross Kirsling <ross.kirsling@sony.com>
198 Move FileSystem to WTF
199 https://bugs.webkit.org/show_bug.cgi?id=193602
201 Reviewed by Yusuke Suzuki.
203 * WTF.xcodeproj/project.pbxproj:
204 * wtf/CMakeLists.txt:
205 * wtf/FileMetadata.h: Renamed from Source/WebCore/platform/FileMetadata.h.
206 * wtf/FileSystem.cpp: Renamed from Source/WebCore/platform/FileSystem.cpp.
207 * wtf/FileSystem.h: Renamed from Source/WebCore/platform/FileSystem.h.
208 * wtf/PlatformGTK.cmake:
209 * wtf/PlatformMac.cmake:
210 * wtf/PlatformPlayStation.cmake:
211 * wtf/PlatformWPE.cmake:
212 * wtf/PlatformWin.cmake:
213 * wtf/cf/FileSystemCF.cpp: Renamed from Source/WebCore/platform/cf/FileSystemCF.cpp.
214 * wtf/cocoa/FileSystemCocoa.mm: Renamed from Source/WebCore/platform/cocoa/FileSystemCocoa.mm.
215 * wtf/glib/FileSystemGlib.cpp: Renamed from Source/WebCore/platform/glib/FileSystemGlib.cpp.
216 * wtf/mac/FileSystemMac.mm: Renamed from Source/WebCore/platform/mac/FileSystemMac.mm.
217 * wtf/posix/FileSystemPOSIX.cpp: Renamed from Source/WebCore/platform/posix/FileSystemPOSIX.cpp.
218 * wtf/spi/mac/MetadataSPI.h: Renamed from Source/WebCore/PAL/pal/spi/mac/MetadataSPI.h.
219 * wtf/win/FileSystemWin.cpp: Renamed from Source/WebCore/platform/win/FileSystemWin.cpp.
220 * wtf/win/PathWalker.cpp: Renamed from Source/WebCore/platform/win/PathWalker.cpp.
221 * wtf/win/PathWalker.h: Renamed from Source/WebCore/platform/win/PathWalker.h.
223 2019-01-24 Guillaume Emont <guijemont@igalia.com>
225 [JSC] Reenable baseline JIT on mips
226 https://bugs.webkit.org/show_bug.cgi?id=192983
228 Reviewed by Mark Lam.
230 Use baseline JIT by default on MIPS.
234 2019-01-24 David Kilzer <ddkilzer@apple.com>
236 Duplicate global variables: WTF::asciiCaseFoldTable
237 <https://webkit.org/b/193726>
238 <rdar://problem/47334622>
240 Reviewed by Michael Catanzaro.
242 * WTF.xcodeproj/project.pbxproj:
243 * wtf/CMakeLists.txt:
244 - Add ASCIICType.cpp to build systems.
246 * wtf/ASCIICType.cpp: Added.
247 (WTF::asciiCaseFoldTable): Move table to here so there is only
248 one copy. Mark as exported for other frameworks to use.
250 (WTF::asciiCaseFoldTable): Change to extern declaration, and
251 mark as exported for other frameworks to use.
253 2019-01-23 Mark Lam <mark.lam@apple.com>
255 ARM64E should not ENABLE(SEPARATED_WX_HEAP).
256 https://bugs.webkit.org/show_bug.cgi?id=193744
257 <rdar://problem/46262952>
259 Reviewed by Saam Barati.
263 2019-01-23 David Kilzer <ddkilzer@apple.com>
265 Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}
266 <https://webkit.org/b/193694>
267 <rdar://problem/47464025>
269 Reviewed by Tim Horton.
271 * wtf/win/SoftLinking.h:
272 (SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT):
273 - Implement for Windows.
274 (SOFT_LINK_CONSTANT_FOR_SOURCE):
275 - Define using SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT().
277 2019-01-22 Tadeu Zagallo <tzagallo@apple.com>
279 Cache bytecode to disk
280 https://bugs.webkit.org/show_bug.cgi?id=192782
281 <rdar://problem/46084932>
283 Reviewed by Keith Miller.
285 BitVectors have to be friends with JSC::CacheBitVector to allow
286 serializing its buffer as part of the bytecode cache encoding.
290 2019-01-21 Claudio Saavedra <csaavedra@igalia.com>
292 [GTK] Speculative build fix for Ubuntu LTS
293 https://bugs.webkit.org/show_bug.cgi?id=193651
295 Unreviewed build fix.
297 * wtf/Assertions.h: Add missing <cstdlib> include.
299 2019-01-20 Saam Barati <sbarati@apple.com>
301 Rollout r240210: It broke tests on iOS
302 https://bugs.webkit.org/show_bug.cgi?id=193640
308 2019-01-20 Tadeu Zagallo <tzagallo@apple.com>
310 Cache bytecode to disk
311 https://bugs.webkit.org/show_bug.cgi?id=192782
312 <rdar://problem/46084932>
314 Reviewed by Keith Miller.
316 BitVectors have to be friends with JSC::CacheBitVector to allow
317 serializing its buffer as part of the bytecode cache encoding.
321 2019-01-18 Tim Horton <timothy_horton@apple.com>
323 Get rid of ADVANCED_SPELL_CHECKING
324 https://bugs.webkit.org/show_bug.cgi?id=193592
326 Reviewed by Wenson Hsieh.
330 2019-01-18 Jer Noble <jer.noble@apple.com>
332 SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
333 https://bugs.webkit.org/show_bug.cgi?id=189553
335 Reviewed by Tim Horton.
337 * Configurations/Base.xcconfig:
338 * Configurations/SDKVariant.xcconfig: Added.
340 2019-01-18 Keith Miller <keith_miller@apple.com>
342 Gigacages should start allocations from a slide
343 https://bugs.webkit.org/show_bug.cgi?id=193523
345 Reviewed by Mark Lam.
347 This patch changes some macros into constants since macros are the
353 2019-01-18 Matt Lewis <jlewis3@apple.com>
355 Unreviewed, rolling out r240160.
357 This broke multiple internal builds.
361 "Gigacages should start allocations from a slide"
362 https://bugs.webkit.org/show_bug.cgi?id=193523
363 https://trac.webkit.org/changeset/240160
365 2019-01-18 Keith Miller <keith_miller@apple.com>
367 Gigacages should start allocations from a slide
368 https://bugs.webkit.org/show_bug.cgi?id=193523
370 Reviewed by Mark Lam.
372 This patch changes some macros into constants since macros are the
378 2019-01-17 Truitt Savell <tsavell@apple.com>
380 Unreviewed, rolling out r240124.
382 This commit broke an internal build.
386 "SDK_VARIANT build destinations should be separate from non-
388 https://bugs.webkit.org/show_bug.cgi?id=189553
389 https://trac.webkit.org/changeset/240124
391 2019-01-17 Jer Noble <jer.noble@apple.com>
393 SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
394 https://bugs.webkit.org/show_bug.cgi?id=189553
396 Reviewed by Tim Horton.
398 * Configurations/Base.xcconfig:
399 * Configurations/SDKVariant.xcconfig: Added.
401 2019-01-16 Keith Miller <keith_miller@apple.com>
403 bmalloc should use JSC VM tag for gigacage
404 https://bugs.webkit.org/show_bug.cgi?id=193496
406 Reviewed by Mark Lam.
408 Move most of the macros for vm tagging to bmalloc.
412 2019-01-16 Alberto Garcia <berto@igalia.com>
414 [WTF] Compilation fails with system malloc
415 https://bugs.webkit.org/show_bug.cgi?id=172445
417 Reviewed by Michael Catanzaro.
419 Follow-up to r217270. The sysinfo() system call is specific to
420 Linux so update the #ifdef checks accordingly.
423 (WTF::computeRAMSize):
425 2019-01-15 Chris Dumez <cdumez@apple.com>
427 Unreviewed, revert part of r239997 as it is not needed to fix the build.
431 2019-01-15 Alex Christensen <achristensen@webkit.org>
433 Fix iOS build after r239993
434 https://bugs.webkit.org/show_bug.cgi?id=193361
438 2019-01-14 Michael Catanzaro <mcatanzaro@igalia.com>
440 Use unorm2_normalize instead of precomposedStringWithCanonicalMapping in userVisibleString
441 https://bugs.webkit.org/show_bug.cgi?id=192945
443 Reviewed by Alex Christensen.
445 Replace use of the nice NSString function precomposedStringWithCanonicalMapping with the ICU
446 API unorm2_normalize. This is to prep the code for translation to cross-platform C++. Of
447 course this is much worse than the preexisting code, but this is just a transitional
448 measure and not the final state of the code. It wouldn't make sense to do this if the code
449 were to remain Objective C++.
451 * wtf/cocoa/NSURLExtras.mm:
452 (WTF::toNormalizationFormC):
453 (WTF::userVisibleString):
455 2019-01-14 Alex Christensen <achristensen@webkit.org>
457 Bulgarian TLD should not punycode-encode URLs with Bulgarian Cyrillic characters
458 https://bugs.webkit.org/show_bug.cgi?id=193411
459 <rdar://problem/47215929>
461 Reviewed by Alexey Proskuryakov.
463 * wtf/cocoa/NSURLExtras.mm:
464 (WTF::allCharactersAllowedByTLDRules):
466 2019-01-12 Timothy Hatcher <timothy@apple.com>
468 Have prefers-color-scheme: light always match on macOS versions before Mojave.
469 https://bugs.webkit.org/show_bug.cgi?id=191655
470 rdar://problem/46074680
472 Reviewed by Megan Gardner.
474 * wtf/Platform.h: Define HAVE_OS_DARK_MODE_SUPPORT on macOS 10.14.
476 2019-01-11 David Kilzer <ddkilzer@apple.com>
478 Follow-up: WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
479 https://bugs.webkit.org/show_bug.cgi?id=191350
482 (WTF::WorkQueue::concurrentApply): Fix whitespace.
484 2019-01-11 Devin Rousso <drousso@apple.com>
486 Fix style CFNetworkSPI style checker warnings from r239698
487 https://bugs.webkit.org/show_bug.cgi?id=193369
489 Reviewed by Joseph Pecoraro.
493 2019-01-11 Said Abou-Hallawa <sabouhallawa@apple.com>
495 WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
496 https://bugs.webkit.org/show_bug.cgi?id=191350
498 Reviewed by Brent Fulgham.
500 The non COCOA version of WorkQueue::concurrentApply() creates a temporary
501 String for the threadName and passes the raw pointer of this String to
502 Thread::create(). After freeing this String, Thread::entryPoint() uses
503 the raw char pointer to internally initialize the thread.
505 The fix is to use a single literal string for all the threads' names since
506 they are created for a thread-pool.
509 (WTF::WorkQueue::concurrentApply):
511 2019-01-11 Dominik Infuehr <dinfuehr@igalia.com>
513 Enable DFG on ARM/Linux again
514 https://bugs.webkit.org/show_bug.cgi?id=192496
516 Reviewed by Yusuke Suzuki.
518 After changing the bytecode format DFG was disabled on all 32-bit
519 architectures. Enable DFG now again on ARM/Linux.
523 2019-01-10 Commit Queue <commit-queue@webkit.org>
525 Unreviewed, rolling out r239825.
526 https://bugs.webkit.org/show_bug.cgi?id=193330
528 Broke tests on armv7/linux bots (Requested by guijemont on
533 "Enable DFG on ARM/Linux again"
534 https://bugs.webkit.org/show_bug.cgi?id=192496
535 https://trac.webkit.org/changeset/239825
537 2019-01-10 John Wilander <wilander@apple.com>
539 Override the session configuration for cookieAcceptPolicy
540 https://bugs.webkit.org/show_bug.cgi?id=190925
541 <rdar://problem/45497382>
543 Reviewed by Alexey Proskuryakov and Alex Christensen.
546 Definition of HAVE_CFNETWORK_OVERRIDE_SESSION_COOKIE_ACCEPT_POLICY.
548 2019-01-10 Dominik Infuehr <dinfuehr@igalia.com>
550 Enable DFG on ARM/Linux again
551 https://bugs.webkit.org/show_bug.cgi?id=192496
553 Reviewed by Yusuke Suzuki.
555 After changing the bytecode format DFG was disabled on all 32-bit
556 architectures. Enable DFG now again on ARM/Linux.
560 2019-01-10 Carlos Garcia Campos <cgarcia@igalia.com>
562 [FreeType] Color emoji not properly supported
563 https://bugs.webkit.org/show_bug.cgi?id=191976
565 Reviewed by Michael Catanzaro.
567 Add a name for combining enclosing keycap character.
569 * wtf/unicode/CharacterNames.h:
571 2019-01-09 Carlos Eduardo Ramalho <cadubentzen@gmail.com> and Fujii Hironori <Hironori.Fujii@sony.com>
573 Use directory local sequential numbers for Unified Sources filenames instead of global sequential numbers for CMake
574 https://bugs.webkit.org/show_bug.cgi?id=192391
576 Reviewed by Don Olmstead.
578 Unified Source Builds are using global sequential numbers for
579 bundle filenames UnifiedSource{sequential-number}.cpp. As the
580 result, every new source file added would shift the next ones and
581 prevent compiler caches from speeding up consecutive builds e.g.
582 in git-bisect sessions.
584 Changed it to directory local sequential numbers,
585 UnifiedSource-{hash-of-dir-name}-{sequential-number-within-the-dir}.cpp.
587 This is affecting only CMake builds which is where no
588 '--max-cpp-bundle-count' nor '--max-obj-c-bundle-count' options
589 are set. Xcode builds still use the old convention.
591 * Scripts/generate-unified-source-bundles.rb: Add new instance
592 variables @currentDirectory and @extraFiles to BundleManager.
593 Still use global sequential numbers if --max-cpp-bundle-count or
594 --max-obj-c-bundle-count is given.
596 2019-01-09 Alex Christensen <achristensen@webkit.org>
598 Expand use of sourceApplicationAuditData
599 https://bugs.webkit.org/show_bug.cgi?id=192995
600 <rdar://problem/46627875>
602 Reviewed by Brady Eidson.
606 2019-01-09 Mark Lam <mark.lam@apple.com>
608 Gigacage disabling checks should handle the GIGACAGE_ALLOCATION_CAN_FAIL case properly.
609 https://bugs.webkit.org/show_bug.cgi?id=193292
610 <rdar://problem/46485450>
612 Reviewed by Yusuke Suzuki.
614 Update the USE_SYSTEM_MALLOC version of Gigacage.h to match the bmalloc version.
618 2019-01-07 David Kilzer <ddkilzer@apple.com>
620 Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
621 <https://webkit.org/b/193056>
623 Reviewed by Alex Christensen.
626 (WTF::RetainPtr<T>::HelperPtrType):
627 - Use C++ template metaprogramming to define a shared return
628 type for adoptNS() and retainPtr() that uses
629 RetainPtr<NSObject> instead of RetainPtr<NSObject *>. The
630 non-Objective-C typedef is used with retainPtr() for CFTypeRef
633 - Only make declarations available when compilng with
634 Objective-C. The inline implementation is only available for
635 Objective-C, so this makes the declarations consistent.
636 - Change return type to remove '*' from NS types using
637 RetainPtr<T>::HelperPtrType.
639 - Change return type to remove '*' from NS types using
640 RetainPtr<T>::HelperPtrType.
642 * wtf/SchedulePair.h:
643 - Remove '*' from RetainPtr<> type.
645 2019-01-07 Eric Carlson <eric.carlson@apple.com>
647 A MediaTime timescale must never be zero
648 https://bugs.webkit.org/show_bug.cgi?id=193156
649 <rdar://problem/32504501>
651 Reviewed by Jer Noble.
654 (WTF::greatestCommonDivisor): ASSERT if either parameter or return value is zero.
655 (WTF::MediaTime::MediaTime): Create +/- infinity if passed zero timescale.
656 (WTF::MediaTime::createWithFloat): Ditto.
657 (WTF::MediaTime::createWithDouble): Ditto.
658 (WTF::MediaTime::setTimeScale): Ditto.
660 2019-01-02 Alex Christensen <achristensen@webkit.org>
662 Homograph with LATIN SMALL LETTER R WITH FISHHOOK
663 https://bugs.webkit.org/show_bug.cgi?id=192944
665 Reviewed by Tim Horton.
667 * wtf/cocoa/NSURLExtras.mm:
668 (WTF::isLookalikeCharacter):
670 2019-01-02 Commit Queue <commit-queue@webkit.org>
672 Unreviewed, rolling out r239524.
673 https://bugs.webkit.org/show_bug.cgi?id=193083
675 basic browsing seems not to work (Requested by thorton on
680 "Expand use of sourceApplicationAuditData"
681 https://bugs.webkit.org/show_bug.cgi?id=192995
682 https://trac.webkit.org/changeset/239524
684 2018-12-28 Yusuke Suzuki <yusukesuzuki@slowstart.org>
686 Add ENABLE_UNIFIED_BUILDS option to cmake ports
687 https://bugs.webkit.org/show_bug.cgi?id=193045
689 Reviewed by Don Olmstead.
691 * Scripts/generate-unified-source-bundles.rb:
693 2018-12-27 Alex Christensen <achristensen@webkit.org>
695 Resurrect Mac CMake build
696 https://bugs.webkit.org/show_bug.cgi?id=192658
698 Reviewed by Yusuke Suzuki.
700 * wtf/PlatformMac.cmake:
701 * wtf/cf/CFURLExtras.cpp:
702 * wtf/cf/CFURLExtras.h:
704 * wtf/cocoa/NSURLExtras.h:
705 * wtf/cocoa/NSURLExtras.mm:
706 * wtf/cocoa/URLCocoa.mm:
708 2018-12-21 Dan Bernstein <mitz@apple.com>
710 Fixed building for macOS 10.13 using the macOS 10.14 SDK.
712 * wtf/Platform.h: Changed HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE to depend on the
713 deployment target, not the SDK.
715 2018-12-20 Yusuke Suzuki <yusukesuzuki@slowstart.org>
717 [JSC] Implement "well-formed JSON.stringify" proposal
718 https://bugs.webkit.org/show_bug.cgi?id=191677
720 Reviewed by Darin Adler.
722 This patch implements "well-formed JSON.stringify" proposal[1], which is now stage 3.
723 JSON.stringify appended surrogate pair codes even if it is not paired appropriately.
724 The proposal requires that broken surrogate pairs are unicode-escaped.
726 [1]: https://github.com/tc39/proposal-well-formed-stringify
728 * wtf/text/StringBuilderJSON.cpp:
729 (WTF::appendQuotedJSONStringInternal):
731 2018-12-21 Alex Christensen <achristensen@webkit.org>
733 Expand use of sourceApplicationAuditData
734 https://bugs.webkit.org/show_bug.cgi?id=192995
735 <rdar://problem/46627875>
737 Reviewed by Brady Eidson.
741 2018-12-21 Alex Christensen <achristensen@webkit.org>
744 https://bugs.webkit.org/show_bug.cgi?id=192944
746 * wtf/cocoa/NSURLExtras.mm:
747 (WTF::isLookalikeCharacter):
749 2018-12-20 Brent Fulgham <bfulgham@apple.com>
751 Show punycode if URL contains Latin small letter dotless i
752 https://bugs.webkit.org/show_bug.cgi?id=192944
753 <rdar://problem/46103047>
755 Reviewed by Andy Estes.
757 Revise our "lookalike character" logic to include the small Latin
760 Test: fast/url/host.html
762 * wtf/cocoa/NSURLExtras.mm:
763 (WTF::isLookalikeCharacter):
765 2018-12-20 Chris Dumez <cdumez@apple.com>
767 Use Optional::hasValue() instead of Optional::has_value()
768 https://bugs.webkit.org/show_bug.cgi?id=192948
770 Reviewed by Tim Horton.
776 2018-12-20 Chris Dumez <cdumez@apple.com>
778 Use Optional::valueOr() instead of Optional::value_or()
779 https://bugs.webkit.org/show_bug.cgi?id=192933
781 Reviewed by Geoffrey Garen.
784 (WTF::Optional<T::valueOr const):
786 2018-12-20 Tadeu Zagallo <tzagallo@apple.com>
788 Consistently use MaxLength for all WTF strings
789 https://bugs.webkit.org/show_bug.cgi?id=192853
790 <rdar://problem/45726906>
792 Reviewed by Mark Lam.
794 MaxLength was introduced to be INT_MAX for WTF::String and StringImpl,
795 but all the assertions were still done using UINT_MAX. Change it to
796 use MaxLength for all checks.
798 * wtf/text/StringImpl.cpp:
799 (WTF::StringImpl::createUninitializedInternalNonEmpty):
800 (WTF::StringImpl::reallocateInternal):
801 (WTF::StringImpl::create):
802 (WTF::StringImpl::convertToLowercaseWithoutLocale):
803 (WTF::StringImpl::convertToUppercaseWithoutLocale):
804 (WTF::StringImpl::convertToLowercaseWithLocale):
805 (WTF::StringImpl::convertToUppercaseWithLocale):
806 (WTF::StringImpl::foldCase):
807 (WTF::StringImpl::find):
808 (WTF::StringImpl::replace):
809 (WTF::StringImpl::utf8ForCharacters):
810 (WTF::StringImpl::tryGetUtf8ForRange const):
811 * wtf/text/StringImpl.h:
812 (WTF::lengthOfNullTerminatedString):
813 (WTF::StringImpl::tryCreateUninitialized):
814 (WTF::StringImpl::adopt):
815 (WTF::StringImpl::maxInternalLength):
816 * wtf/text/WTFString.cpp:
817 (WTF::String::append):
818 (WTF::String::insert):
819 (WTF::String::fromUTF8):
820 * wtf/text/WTFString.h:
821 (WTF::String::reverseFind const):
823 2018-12-19 Chris Dumez <cdumez@apple.com>
825 wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
826 https://bugs.webkit.org/show_bug.cgi?id=192728
827 <rdar://problem/46746779>
829 Reviewed by Geoff Garen.
831 Update optional's move-constructor and move-assignment operator to disengage the value being moved from.
832 Rename to optional to Optional, make_optional() to makeOptional(), and move class from std to WTF namespace.
834 Based on patch by David Kilzer.
838 2018-12-19 Eric Carlson <eric.carlson@apple.com>
840 [MediaStream] Force system camera/microphone TCC prompt if necessary
841 https://bugs.webkit.org/show_bug.cgi?id=192820
842 <rdar://problem/42680098>
844 Reviewed by Jer Noble.
846 * wtf/Platform.h: Define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE.
848 2018-12-17 Chris Fleizach <cfleizach@apple.com>
850 Some builds are broken after r239262
851 https://bugs.webkit.org/show_bug.cgi?id=192777
853 Reviewed by Simon Fraser.
857 2018-12-17 Daniel Bates <dabates@apple.com>
859 Support concatenating StringView with other string types
860 https://bugs.webkit.org/show_bug.cgi?id=177566
862 Reviewed by Darin Adler.
864 Add operator+ overloads to StringOperators.h to support concatenating a StringView with
865 other string types (e.g. String). This lets a person write more naturally looking code:
871 makeString(stringView, string)
873 * wtf/text/StringOperators.h:
874 (WTF::operator+): Added various operator+ overloads.
876 2018-12-17 Commit Queue <commit-queue@webkit.org>
878 Unreviewed, rolling out r239265 and r239274.
879 https://bugs.webkit.org/show_bug.cgi?id=192765
881 unorm_normalize is deprecated, and broke an internal build
882 (Requested by Truitt on #webkit).
886 "[GTK][WPE] Need a function to convert internal URI to display
888 https://bugs.webkit.org/show_bug.cgi?id=174816
889 https://trac.webkit.org/changeset/239265
891 "Fix the Apple Internal Mac build with a newer SDK"
892 https://trac.webkit.org/changeset/239274
894 2018-12-17 Daniel Bates <dabates@apple.com>
896 Fix the Apple Internal Mac build with a newer SDK
898 * wtf/URLHelpers.cpp:
899 (WTF::URLHelpers::userVisibleURL):
901 2018-12-17 Matt Lewis <jlewis3@apple.com>
903 Unreviewed, rolling out r239254.
905 This broke the Windows 10 Debug build
909 "Replace many uses of String::format with more type-safe
911 https://bugs.webkit.org/show_bug.cgi?id=192742
912 https://trac.webkit.org/changeset/239254
914 2018-12-17 Ms2ger <Ms2ger@igalia.com>
916 [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
917 https://bugs.webkit.org/show_bug.cgi?id=174816
919 Reviewed by Michael Catanzaro.
921 Translate userVisibleString and dependent code into platform-neutral C++
922 in wtf/URLHelpers.{h,cpp}.
924 * WTF.xcodeproj/project.pbxproj:
925 * wtf/CMakeLists.txt:
926 * wtf/URLHelpers.cpp: Added.
927 (WTF::URLHelpers::loadIDNScriptWhiteList):
928 (WTF::URLHelpers::isArmenianLookalikeCharacter):
929 (WTF::URLHelpers::isArmenianScriptCharacter):
930 (WTF::URLHelpers::isASCIIDigitOrValidHostCharacter):
931 (WTF::URLHelpers::isLookalikeCharacter):
932 (WTF::URLHelpers::whiteListIDNScript):
933 (WTF::URLHelpers::initializeDefaultIDNScriptWhiteList):
934 (WTF::URLHelpers::allCharactersInIDNScriptWhiteList):
935 (WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
936 (WTF::URLHelpers::isRussianDomainNameCharacter):
937 (WTF::URLHelpers::allCharactersAllowedByTLDRules):
938 (WTF::URLHelpers::mapHostName):
939 (WTF::URLHelpers::collectRangesThatNeedMapping):
940 (WTF::URLHelpers::applyHostNameFunctionToMailToURLString):
941 (WTF::URLHelpers::applyHostNameFunctionToURLString):
942 (WTF::URLHelpers::mapHostNames):
943 (WTF::URLHelpers::createStringWithEscapedUnsafeCharacters):
944 (WTF::URLHelpers::userVisibleURL):
945 * wtf/URLHelpers.h: Added.
946 * wtf/cocoa/NSURLExtras.mm:
947 (WTF::URLHelpers::loadIDNScriptWhiteList):
948 (WTF::decodePercentEscapes):
949 (WTF::decodeHostName):
950 (WTF::encodeHostName):
951 (WTF::URLWithUserTypedString):
952 (WTF::userVisibleString):
954 2018-12-15 Darin Adler <darin@apple.com>
956 Use warning-ignoring macros more consistently and simply
957 https://bugs.webkit.org/show_bug.cgi?id=192743
959 Reviewed by Mark Lam.
961 * wtf/Assertions.h: Use IGNORE_WARNINGS_BEGIN rather than
962 IGNORE_CLANG_WARNINGS_BEGIN since we don't need special handling for
963 non-clang compilers, in part since the code is already inside
964 #if COMPILER(CLANG), but also because it would be harmless to ignore this
965 warning on non-clang; we should almost never use IGNORE_CLANG_WARNINGS_BEGIN.
967 2018-12-15 Darin Adler <darin@apple.com>
969 Replace many uses of String::format with more type-safe alternatives
970 https://bugs.webkit.org/show_bug.cgi?id=192742
972 Reviewed by Mark Lam.
975 (WTF::WorkQueue::concurrentApply): Use makeString.
978 (WTF::dtoa): Use sprintf instead of String::format in the comments,
979 since these functions have nothing to do with WTF::String.
981 2018-12-14 Darin Adler <darin@apple.com>
983 Verify size is valid in USE_SYSTEM_MALLOC version of tryAllocateZeroedVirtualPages
984 https://bugs.webkit.org/show_bug.cgi?id=192738
985 rdar://problem/37502342
987 Reviewed by Mark Lam.
990 (Gigacage::tryAllocateZeroedVirtualPages): Added a RELEASE_ASSERT just
991 like the one in tryLargeZeroedMemalignVirtual in bmalloc.
993 2018-12-14 David Kilzer <ddkilzer@apple.com>
995 clang-tidy: Fix unnecessary copy of AtomicString each time one is logged
996 <https://webkit.org/b/192710>
997 <rdar://problem/46738962>
999 Reviewed by Eric Carlson.
1002 (WTF::LogArgument::toString): Make argument a const reference to
1005 2018-12-14 Zan Dobersek <zdobersek@igalia.com>
1007 [GLib] RunLoop::dispatchAfter() GSource requires microsecond precision
1008 https://bugs.webkit.org/show_bug.cgi?id=192696
1010 Reviewed by Michael Catanzaro.
1012 The GSource we set up in GLib's RunLoop::dispatchAfter() implementation
1013 should support microsecond-precision delays. Such delays are common in
1014 JSC's Watchdog implementation and missing support for them has been
1015 causing test failures in the `testapi` program as well as some JSC
1016 tests that depend on the termination determination functionality of the
1017 JSC::Watchdog class.
1019 RunLoop::dispatchAfter() is changed to spawn a raw GSource that uses the
1020 existing GSourceFuncs implementation used elsewhere in GLib's RunLoop.
1021 The GSource's ready time is set manually, now with the necessary
1022 microsecond precision.
1024 * wtf/glib/RunLoopGLib.cpp:
1025 (WTF::RunLoop::dispatchAfter):
1027 2018-12-13 Saam Barati <sbarati@apple.com>
1029 The JSC shell should listen for memory pressure events and respond to them
1030 https://bugs.webkit.org/show_bug.cgi?id=192647
1032 Reviewed by Keith Miller.
1034 * wtf/MemoryPressureHandler.cpp:
1035 (WTF::MemoryPressureHandler::MemoryPressureHandler):
1036 (WTF::MemoryPressureHandler::setDispatchQueue):
1037 Make it so that we can customize which dispatch queue memory pressure
1038 events get handled on.
1040 * wtf/MemoryPressureHandler.h:
1041 (WTF::MemoryPressureHandler::setShouldLogMemoryMemoryPressureEvents):
1042 Make it so that we can disable logging that happens on each memory
1045 * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
1046 (WTF::MemoryPressureHandler::install):
1047 (WTF::MemoryPressureHandler::uninstall):
1048 (WTF::MemoryPressureHandler::holdOff):
1050 2018-12-13 David Kilzer <ddkilzer@apple.com>
1052 clang-tidy: Fix unnecessary parameter copies in ParallelHelperPool.cpp
1053 <https://webkit.org/b/192666>
1054 <rdar://problem/46697952>
1056 Reviewed by Alex Christensen.
1058 * wtf/ParallelHelperPool.cpp:
1059 (WTF::ParallelHelperClient::ParallelHelperClient): Use rvalue
1060 reference and WTFMove().
1061 (WTF::ParallelHelperClient::setTask): Ditto.
1062 (WTF::ParallelHelperClient::runTaskInParallel): Ditto.
1063 (WTF::ParallelHelperClient::runTask): Use const reference.
1064 * wtf/ParallelHelperPool.h: Update declarations to match
1067 2018-12-12 Alex Christensen <achristensen@webkit.org>
1069 Implement safe browsing in WebKit on WatchOS
1070 https://bugs.webkit.org/show_bug.cgi?id=192641
1071 <rdar://problem/46376188>
1073 Reviewed by Geoff Garen.
1076 WatchOS has safe browsing, too!
1078 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com>
1080 [Win][Clang] Fix compilation warnings of WTF
1081 https://bugs.webkit.org/show_bug.cgi?id=192583
1083 Reviewed by Alex Christensen.
1085 clang-cl reports the following warnings.
1087 > [92/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\StackBounds.cpp.obj
1088 > ..\..\Source\WTF\wtf\StackBounds.cpp(163,48): warning: missing field 'AllocationBase' initializer [-Wmissing-field-initializers]
1089 > MEMORY_BASIC_INFORMATION stackOrigin = { 0 };
1091 > 1 warning generated.
1092 > [160/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\win\RunLoopWin.cpp.obj
1093 > ..\..\Source\WTF\wtf\win\RunLoopWin.cpp(34,54): warning: ISO C++11 does not allow conversion from string literal to 'const LPWSTR' (aka 'wchar_t *const') [-Wwritable-strings]
1094 > static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow";
1096 > ..\..\Source\WTF\wtf\win\RunLoopWin.cpp(86,32): warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers]
1097 > WNDCLASS windowClass = { 0 };
1099 > 2 warnings generated.
1100 > [175/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\DateMath.cpp.obj
1101 > ..\..\Source\WTF\wtf\DateMath.cpp(125,20): warning: unused function 'getLocalTime' [-Wunused-function]
1102 > static inline void getLocalTime(const time_t* localTime, struct tm* localTM)
1104 > 1 warning generated.
1107 (WTF::getLocalTime): Defined only if used.
1108 * wtf/StackBounds.cpp:
1109 (WTF::StackBounds::currentThreadStackBoundsInternal): Initialize stackOrigin with '{ }'.
1110 * wtf/win/RunLoopWin.cpp: Change the type of kRunLoopMessageWindowClassName to LPCWSTR.
1111 (WTF::RunLoop::registerRunLoopMessageWindowClass): Initialize windowClass with '{ }'.
1113 2018-12-11 Andy Estes <aestes@apple.com>
1115 Introduce makeBlockPtr for lambdas
1116 https://bugs.webkit.org/show_bug.cgi?id=192594
1118 Reviewed by Alex Christensen.
1120 BlockPtr<...>::fromCallable is cumbersome because it requires repeating the callable's
1121 signature as a class template argument. This patch introduces an overload of makeBlockPtr
1122 that deduces the correct BlockPtr instantiation from a lambda's operator() signature.
1125 (WTF::makeBlockPtr):
1127 Adopted makeBlockPtr.
1129 * wtf/cocoa/WorkQueueCocoa.cpp:
1130 (WTF::WorkQueue::dispatch):
1131 (WTF::WorkQueue::dispatchAfter):
1132 (WTF::WorkQueue::concurrentApply):
1134 2018-12-10 Don Olmstead <don.olmstead@sony.com>
1136 Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
1137 https://bugs.webkit.org/show_bug.cgi?id=192573
1139 Reviewed by Simon Fraser.
1141 Remove ENABLE_RESOURCE_LOAD_STATISTICS from Platform.h and instead rely
1142 on it being set in FeatureDefines.xcconfig.
1146 2018-12-10 Alexey Proskuryakov <ap@apple.com>
1148 Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
1149 https://bugs.webkit.org/show_bug.cgi?id=192428
1151 Reviewed by Tim Horton.
1155 2018-12-10 Alexey Proskuryakov <ap@apple.com>
1157 Move more macros out of WebKit's config.h
1158 https://bugs.webkit.org/show_bug.cgi?id=192430
1160 Reviewed by Tim Horton.
1164 2018-12-09 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1166 Unreviewed, fix build failure on GCC 8.2, part 2
1168 Add RefCountedArray::assign, and use it instead of operator= internally.
1169 We should have operator=(const RefCountedArray&) since it will be automatically generated
1170 if we do not have correct implementation here.
1172 * wtf/RefCountedArray.h:
1173 (WTF::RefCountedArray::operator=):
1174 (WTF::RefCountedArray::assign):
1176 2018-12-09 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1178 Unreviewed, fix build failure on GCC 8.2
1180 We remove operator=<PtrTraits> call since it is not necessary.
1181 This is a workaround. It seems that GCC 8.2 fails to parse this specialization.
1183 * wtf/RefCountedArray.h:
1185 2018-12-08 Darin Adler <darin@apple.com>
1187 Fix stray-semicolon warning seen with a new version of clang in Xcode
1188 https://bugs.webkit.org/show_bug.cgi?id=192534
1190 Reviewed by Alexey Proskuryakov.
1192 * wtf/Lock.h: Removed an unneeded semicolon.
1194 2018-12-08 Adrian Perez de Castro <aperez@igalia.com>
1196 [WTF] Debug build fails due conflicting abort() method
1197 https://bugs.webkit.org/show_bug.cgi?id=192491
1199 Reviewed by Michael Catanzaro.
1201 * wtf/Assertions.h: Use namespaced std::abort() insted of plain abort() to avoid clashes
1202 inside classes which have an ::abort() method, but only when __cplusplus is defined to
1203 allow inclusion of the header in plain C sources.
1205 2018-12-07 Andy Estes <aestes@apple.com>
1207 [Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
1208 https://bugs.webkit.org/show_bug.cgi?id=192498
1210 Reviewed by Tim Horton.
1212 Added SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL and SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT,
1213 which behave like their non-optional variants but do not require their classes to exist.
1215 * wtf/cocoa/SoftLinking.h:
1217 2018-12-06 Alexey Proskuryakov <ap@apple.com>
1219 Move USE_NEW_THEME out of WebCore's config.h
1220 https://bugs.webkit.org/show_bug.cgi?id=192426
1222 Reviewed by Tim Horton.
1226 2018-12-04 Carlos Garcia Campos <cgarcia@igalia.com>
1228 [SOUP] Move URLSoup back to WebCore after r238771
1229 https://bugs.webkit.org/show_bug.cgi?id=192306
1231 Reviewed by Michael Catanzaro.
1233 In r238771 URL was moved from WebCore to WTF, including the soup implementation. Unfortunately that added
1234 libsoup as a new dependency of libjavascriptcoregtk.
1236 * wtf/PlatformGTK.cmake:
1237 * wtf/PlatformWPE.cmake:
1239 * wtf/glib/URLGLib.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.
1241 2018-12-03 Don Olmstead <don.olmstead@sony.com>
1243 Fix some unused parameter warnings
1244 https://bugs.webkit.org/show_bug.cgi?id=192336
1246 Reviewed by Fujii Hironori.
1248 * wtf/StackTrace.cpp:
1250 (WTF::StackTrace::demangle):
1251 * wtf/generic/MemoryPressureHandlerGeneric.cpp:
1252 (WTF::MemoryPressureHandler::holdOff):
1253 (WTF::MemoryPressureHandler::respondToMemoryPressure):
1255 2018-12-01 Alexey Proskuryakov <ap@apple.com>
1257 Modernize version check for _suppressedAutoAddedHTTPHeaders
1258 https://bugs.webkit.org/show_bug.cgi?id=192175
1260 Reviewed by Tim Horton.
1264 2018-11-30 Alex Christensen <achristensen@webkit.org>
1266 Fix Windows build after r238771
1267 https://bugs.webkit.org/show_bug.cgi?id=190234
1270 Just make defaultPortForProtocol public so we don't have to worry about DLL linkage.
1272 2018-11-30 Alex Christensen <achristensen@webkit.org>
1274 Move URL from WebCore to WTF
1275 https://bugs.webkit.org/show_bug.cgi?id=190234
1277 Reviewed by Keith Miller.
1279 * WTF.xcodeproj/project.pbxproj:
1280 * wtf/CMakeLists.txt:
1282 * wtf/PlatformGTK.cmake:
1283 * wtf/PlatformMac.cmake:
1284 * wtf/PlatformWPE.cmake:
1285 * wtf/PlatformWin.cmake:
1286 * wtf/URL.cpp: Renamed from Source/WebCore/platform/URL.cpp.
1287 (WTF::URL::protocolIs):
1288 * wtf/URL.h: Renamed from Source/WebCore/platform/URL.h.
1289 * wtf/URLHash.h: Renamed from Source/WebCore/platform/URLHash.h.
1290 (WTF::URLHash::hash):
1291 (WTF::URLHash::equal):
1292 * wtf/URLParser.cpp: Renamed from Source/WebCore/platform/URLParser.cpp.
1293 (WTF::URLParser::isInUserInfoEncodeSet):
1294 (WTF::URLParser::parseAuthority):
1295 * wtf/URLParser.h: Renamed from Source/WebCore/platform/URLParser.h.
1296 (WTF::URLParser::URLParser):
1297 (WTF::URLParser::result):
1298 * wtf/cf/CFURLExtras.cpp: Renamed from Source/WebCore/platform/cf/CFURLExtras.cpp.
1299 * wtf/cf/CFURLExtras.h: Renamed from Source/WebCore/platform/cf/CFURLExtras.h.
1300 * wtf/cf/URLCF.cpp: Renamed from Source/WebCore/platform/cf/URLCF.cpp.
1301 * wtf/cocoa/NSURLExtras.h: Copied from Source/WebCore/loader/archive/ArchiveResourceCollection.h.
1302 * wtf/cocoa/NSURLExtras.mm: Copied from Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.
1303 (WTF::isArmenianLookalikeCharacter):
1304 (WTF::isArmenianScriptCharacter):
1305 (WTF::isASCIIDigitOrValidHostCharacter):
1306 (WTF::isLookalikeCharacter):
1307 (WTF::whiteListIDNScript):
1308 (WTF::readIDNScriptWhiteListFile):
1309 (WTF::allCharactersInIDNScriptWhiteList):
1310 (WTF::isSecondLevelDomainNameAllowedByTLDRules):
1311 (WTF::isRussianDomainNameCharacter):
1312 (WTF::allCharactersAllowedByTLDRules):
1313 (WTF::mapHostNameWithRange):
1314 (WTF::hostNameNeedsDecodingWithRange):
1315 (WTF::hostNameNeedsEncodingWithRange):
1316 (WTF::decodeHostNameWithRange):
1317 (WTF::encodeHostNameWithRange):
1318 (WTF::decodeHostName):
1319 (WTF::encodeHostName):
1320 (WTF::collectRangesThatNeedMapping):
1321 (WTF::collectRangesThatNeedEncoding):
1322 (WTF::collectRangesThatNeedDecoding):
1323 (WTF::applyHostNameFunctionToMailToURLString):
1324 (WTF::applyHostNameFunctionToURLString):
1325 (WTF::mapHostNames):
1326 (WTF::stringByTrimmingWhitespace):
1327 (WTF::URLByTruncatingOneCharacterBeforeComponent):
1328 (WTF::URLByRemovingResourceSpecifier):
1330 (WTF::dataWithUserTypedString):
1331 (WTF::URLWithUserTypedString):
1332 (WTF::URLWithUserTypedStringDeprecated):
1333 (WTF::hasQuestionMarkOnlyQueryString):
1334 (WTF::dataForURLComponentType):
1335 (WTF::URLByRemovingComponentAndSubsequentCharacter):
1336 (WTF::URLByRemovingUserInfo):
1337 (WTF::originalURLData):
1338 (WTF::createStringWithEscapedUnsafeCharacters):
1339 (WTF::userVisibleString):
1340 (WTF::isUserVisibleURL):
1341 (WTF::rangeOfURLScheme):
1342 (WTF::looksLikeAbsoluteURL):
1343 * wtf/cocoa/URLCocoa.mm: Renamed from Source/WebCore/platform/mac/URLMac.mm.
1345 (WTF::URL::createCFURL const):
1346 * wtf/glib/GUniquePtrSoup.h: Renamed from Source/WebCore/platform/network/soup/GUniquePtrSoup.h.
1347 * wtf/glib/URLSoup.cpp: Renamed from Source/WebCore/platform/soup/URLSoup.cpp.
1349 2018-11-30 Alexey Proskuryakov <ap@apple.com>
1351 Move USE_CFNETWORK_IGNORE_HSTS to its proper place
1352 https://bugs.webkit.org/show_bug.cgi?id=192173
1354 Reviewed by Tim Horton.
1356 * wtf/Platform.h: Also renamed it to better match other version checks.
1358 2018-11-29 Alexey Proskuryakov <ap@apple.com>
1360 Modernize the check for kCFURLRequestContentDecoderSkipURLCheck existence
1361 https://bugs.webkit.org/show_bug.cgi?id=192041
1363 Reviewed by Tim Horton.
1367 2018-11-28 Mark Lam <mark.lam@apple.com>
1369 ENABLE_SEPARATED_WX_HEAP needs to be defined in Platform.h.
1370 https://bugs.webkit.org/show_bug.cgi?id=192110
1371 <rdar://problem/46317746>
1373 Reviewed by Saam Barati.
1375 Contrary my previous claim in r238564, ENABLE_SEPARATED_WX_HEAP needs to be
1376 defined in Platform.h because it is also needed in WebCore for the CSS JIT. Also
1377 contrary to my previous claim, ENABLE(FAST_JIT_PERMISSIONS) is defined for WebCore
1378 (and other projects) as well as JSC. Hence, there's no reason why
1379 ENABLE_SEPARATED_WX_HEAP cannot be defined in Platform.h.
1383 2018-11-28 Keith Rollin <krollin@apple.com>
1385 Update generate-unified-source-bundles.rb to generate .xcfilelist files
1386 https://bugs.webkit.org/show_bug.cgi?id=192029
1387 <rdar://problem/46285918>
1389 Reviewed by Alex Christensen.
1391 Update generate-unified-source-bundles.rb to generate output for
1392 .xcfilelist files. These files are used to indicate the sets of input
1393 and output files to Run Script build phases in Xcode. By invoking
1394 generate-unified-source-bundles.rb with -generate-xcfilelists, the
1395 script generates these .xcfilelist files. These .xcfilelist files can
1396 then be used to specify the inputs and outputs of the Generate Unified
1397 Sources build phases.
1399 * Scripts/generate-unified-source-bundles.rb:
1401 2018-11-28 Alexey Proskuryakov <ap@apple.com>
1403 Remove another OS version check from NetworkDataTaskCocoa.mm
1404 https://bugs.webkit.org/show_bug.cgi?id=192046
1406 Reviewed by Alex Christensen.
1410 2018-11-28 Alexey Proskuryakov <ap@apple.com>
1412 Modernize version checks for same site cookie support
1413 https://bugs.webkit.org/show_bug.cgi?id=192054
1415 Reviewed by Tim Horton.
1419 2018-11-27 Alexey Proskuryakov <ap@apple.com>
1421 Modernize the check for async _saveCookies existence
1422 https://bugs.webkit.org/show_bug.cgi?id=191987
1424 Reviewed by Dean Jackson.
1426 * wtf/Platform.h: Added a specific macro for this. Not changing the behavior here,
1427 although it seems very likely that we want to do the same on other iOS family OSes.
1429 2018-11-26 Fujii Hironori <Hironori.Fujii@sony.com>
1431 [Win][Clang] SOFT_LINK reports warning: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Wmicrosoft-cast]
1432 https://bugs.webkit.org/show_bug.cgi?id=191960
1434 Reviewed by Alex Christensen.
1436 * wtf/win/SoftLinking.h: Do reinterpret_cast<void*> a function
1437 pointer argument of EncodePointer. Changed the type of stored
1438 function pointer returned by EncodePointer.
1440 2018-11-26 Sam Weinig <sam@webkit.org>
1442 Streamline ListHashSet use in floating object code
1443 https://bugs.webkit.org/show_bug.cgi?id=191957
1445 Reviewed by Alex Christensen.
1447 * wtf/ListHashSet.h:
1448 Reverses the order of the template arguments for the find() and contains()
1449 overload that allow specifying a hash translator to allow the compiler to
1450 deduce type T. This simplifies call sites and matches other WTF containers.
1452 2018-11-25 Michael Catanzaro <mcatanzaro@igalia.com>
1454 CRASH() should call abort() except on Darwin and in developer builds
1455 https://bugs.webkit.org/show_bug.cgi?id=184408
1457 Reviewed by Daniel Bates.
1459 CRASH() should call abort() except on Darwin and in developer builds, as discussed on
1460 webkit-dev. This should be slightly nicer than dereferencing 0xbadbeef.
1462 On Darwin, CRASH() uses a breakpoint trap, which seems to corrupt the stack on Linux, so we
1465 Continue to call WTFCrash() in developer mode, and make no changes to WTFCrash(), since it
1466 is reportedly useful in nightmare scenarios where core dumps are unavailable.
1468 We also have to define CRASH_UNDER_CONSTEXPR_CONTEXT(). It's a bit odd that it's possible to
1469 use a non-constexpr function here, but it works. Currently this macro uses WTFCrash(), which
1470 is also non-constexpr.
1474 2018-11-25 Michael Catanzaro <mcatanzaro@igalia.com>
1476 Unreviewed, rolling out r238469.
1482 "CRASH() should call abort() except on Darwin and in developer
1484 https://bugs.webkit.org/show_bug.cgi?id=184408
1485 https://trac.webkit.org/changeset/238469
1487 2018-11-24 Andy Estes <aestes@apple.com>
1489 [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
1490 https://bugs.webkit.org/show_bug.cgi?id=191899
1492 Reviewed by Dean Jackson.
1494 Currently, SOFT_LINK_CLASS_FOR_HEADER declares a class getter function that includes the
1495 framework name. For example, NSView would have a class getter named
1496 namespace::get_AppKit_NSViewClass().
1498 Including the framework name in the getter is unnecessary. Objective-C classes already exist
1499 in a global namespace, so there is no need to disambiguate class names by framework. This
1500 patch elides the framework name from the getter function. For example, NSView would now have
1501 a getter named namespace::getNSViewClass().
1503 * wtf/cocoa/SoftLinking.h:
1505 2018-11-24 Michael Catanzaro <mcatanzaro@igalia.com>
1507 CRASH() should call abort() except on Darwin and in developer builds
1508 https://bugs.webkit.org/show_bug.cgi?id=184408
1510 Reviewed by Daniel Bates.
1512 CRASH() should call abort() except on Darwin and in developer builds, as discussed on
1513 webkit-dev. This should be slightly nicer than dereferencing 0xbadbeef.
1515 On Darwin, CRASH() uses a breakpoint trap, which seems to corrupt the stack on Linux, so we
1518 Continue to call WTFCrash() in developer mode, and make no changes to WTFCrash(), since it
1519 is reportedly useful in nightmare scenarios where core dumps are unavailable.
1523 2018-11-23 Sam Weinig <sam@webkit.org>
1525 Add raw pointer overloads to ListHashSet via SmartPtr specialized functions
1526 https://bugs.webkit.org/show_bug.cgi?id=191936
1528 Reviewed by Zalan Bujtas.
1530 Adds overloads for find, contains, insertBefore and remove that take raw pointers
1531 when the value type V of a ListHashSet is true for the predicate IsSmartPtr<V>::value.
1532 This brings the interface to ListHashSet closer inline with HashSet, HashMap and HashCountedSet
1533 which already have this functionality. Like in the other collections, this is especially
1534 useful when using std::unique_ptr<> as the value, since there would be no way to pass it
1535 to these functions. One difference between this set of overloads is the inclusion of insertBefore,
1536 which is unique to ListHashSet. As would be expected, this specialization only changes the first
1537 parameter, the one that needs to be found, to support a raw pointer.
1539 * wtf/ListHashSet.h:
1541 (WTF::U>::find const):
1542 (WTF::U>::contains const):
1543 (WTF::U>::insertBefore):
1546 2018-11-21 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1548 [JSC] Drop ARM_TRADITIONAL support in LLInt, baseline JIT, and DFG
1549 https://bugs.webkit.org/show_bug.cgi?id=191675
1551 Reviewed by Mark Lam.
1556 2018-11-21 Andy Estes <aestes@apple.com>
1558 [Cocoa] Create a soft-linking file for PassKit
1559 https://bugs.webkit.org/show_bug.cgi?id=191875
1560 <rdar://problem/46203215>
1562 Reviewed by Myles Maxfield.
1564 * wtf/Platform.h: Defined USE_PASSKIT.
1565 * wtf/cocoa/SoftLinking.h: Added _WITH_EXPORT variants of SOFT_LINK_FRAMEWORK_FOR_SOURCE,
1566 SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE, SOFT_LINK_CLASS_FOR_SOURCE,
1567 SOFT_LINK_FUNCTION_FOR_SOURCE, and SOFT_LINK_CONSTANT_FOR_SOURCE.
1569 2018-11-21 Dominik Infuehr <dinfuehr@igalia.com>
1571 Enable JIT on ARM/Linux
1572 https://bugs.webkit.org/show_bug.cgi?id=191548
1574 Reviewed by Yusuke Suzuki.
1576 Enable JIT by default on ARMv7/Linux after it was disabled with
1577 recent bytcode format change.
1581 2018-11-14 Keith Rollin <krollin@apple.com>
1583 Fix #end vs. #endif typo.
1584 https://bugs.webkit.org/show_bug.cgi?id=191668
1585 <rdar://problem/46081704>
1587 Reviewed by Alexey Proskuryakov.
1589 Source/WebCore/SourcesCocoa.txt had a #end that should have been a
1590 #endif. Fix this, an add a check to generate-unified-source-bundles.rb
1591 to detect similar typos.
1593 * Scripts/generate-unified-source-bundles.rb:
1595 2018-11-12 Mark Lam <mark.lam@apple.com>
1597 Add OOM detection to StringPrototype's substituteBackreferences().
1598 https://bugs.webkit.org/show_bug.cgi?id=191563
1599 <rdar://problem/45720428>
1601 Reviewed by Saam Barati.
1603 Enhanced StringBuilder::toString() to skip the shrinkToFit(), reifyString(), and
1604 the hasOverflowed() check if m_string is not null. When m_string is not null,
1605 the StringBuilder either only has a single String in m_string (with m_buffer being
1606 null), or reifyString() has already been called (resulting in a non-null m_string
1607 with a possibly non-null m_buffer).
1609 We can skip the overflow check because:
1610 1. if the StringBuilder only has a single String, then there cannot be an overflow.
1611 2. if reifyString() has already been called, then the hasOverflowed() checked has
1612 already been done because every code path that calls reifyString() first does
1613 the hasOverflowed() check.
1615 We can skip shrinkToFit() because it only applies to m_buffer.
1616 1. if the StringBuilder only has a single String, then there's no m_buffer to shrink.
1617 2. if reifyString() has already been called, then we either came down
1618 a. the toString() path with a null m_string previously, where we would have
1619 already called shrinkToFit() before reifyString(), or
1620 b. the toStringPreserveCapacity() path where we don't want to shrinkToFit().
1622 We can skip reifyString() because:
1623 1. if the StringBuilder only has a single String, then the string is already reified.
1624 2. if reifyString() has been already called, then the string is already reified.
1626 Note that if m_string is the null string and m_buffer is null, reifyString() will
1627 replace it with the empty string. For this reason, we cannot solely check for
1628 !m_buffer because we need to reify the null string into the empty string.
1630 Note also that if m_string is null and m_buffer is non-null, reifyString() will
1631 create a String and set m_string to it. However, m_buffer remains non-null.
1632 For this reason, we cannot assert !m_buffer alone when m_string is non-null.
1633 We add a m_isReified flag (only when assertions are enabled) to track the reified
1634 case where both m_buffer and m_string are non-null.
1636 * wtf/text/StringBuilder.cpp:
1637 (WTF::StringBuilder::reifyString const):
1638 * wtf/text/StringBuilder.h:
1639 (WTF::StringBuilder::toString):
1641 2018-11-10 Benjamin Poulain <benjamin@webkit.org>
1643 Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
1644 https://bugs.webkit.org/show_bug.cgi?id=191492
1646 Reviewed by Alex Christensen.
1648 Because renaming ObjcRuntimeExtras.h to ObjCRuntimeExtras.h only changes
1649 the cases, some systems have issues with applying this patch.
1651 To work around the problem, the change is made is two patches, first rename to
1652 WTFObjCRuntimeExtras.h, then back to ObjCRuntimeExtras.h.
1654 * WTF.xcodeproj/project.pbxproj:
1655 * wtf/CMakeLists.txt:
1656 * wtf/WTFObjCRuntimeExtras.h: Renamed from Source/WTF/wtf/ObjcRuntimeExtras.h.
1659 2018-11-09 Keith Miller <keith_miller@apple.com>
1661 LLInt VectorSizeOffset should be based on offset extraction
1662 https://bugs.webkit.org/show_bug.cgi?id=191468
1664 Reviewed by Yusuke Suzuki.
1666 Make things friends with LLIntOffsetsExtractor.
1668 * wtf/RefCountedArray.h:
1671 2018-11-09 Jim Mason <jmason@ibinx.com>
1673 [WTF] Changes in bug 188867 break non-Linux Unix builds
1674 https://bugs.webkit.org/show_bug.cgi?id=191380
1676 The intention of 188867 was to split out platform-specific
1677 heap query/release code. Any unsupported platform
1678 would use a generic, no-op stub. However, wtf/PlatformGTK.cmake
1679 ended up sending all non-Linux platforms through the Linux
1680 implementation, which breaks the build for those platforms.
1681 This includes any user of the GTK target which is not Linux,
1682 such as the *BSDs, Solaris, etc.
1684 Reviewed by Yusuke Suzuki.
1686 * wtf/PlatformGTK.cmake: Updated to include Linux-specific
1687 code only for Linux; all other platforms use the generic stub.
1689 2018-11-06 Geoffrey Garen <ggaren@apple.com>
1691 Removed mbmalloc target from WTF
1692 https://bugs.webkit.org/show_bug.cgi?id=191313
1694 Reviewed by Saam Barati.
1696 For benchmarking, WTF::fastMalloc is no longer meaningfully different
1697 from bmalloc. (And bmalloc has its own mbmalloc target.)
1699 * Configurations/mbmalloc.xcconfig: Removed.
1700 * WTF.xcodeproj/project.pbxproj:
1701 * wtf/mbmalloc.cpp: Removed.
1703 2018-11-08 Alexey Proskuryakov <ap@apple.com>
1705 Re-add PLATFORM(IOS), now with the strict meaning
1706 https://bugs.webkit.org/show_bug.cgi?id=191281
1708 Reviewed by Tim Horton.
1710 * wtf/Platform.h: No change in behavior. Some of the macros look a bit weird
1711 when expanded, it might be that the values are incorrect for some flavors of iOS family.
1713 2018-11-08 Dean Jackson <dino@apple.com>
1715 Add a String literal that returns a String
1716 https://bugs.webkit.org/show_bug.cgi?id=191425
1717 <rdar://problem/45914556>
1719 Reviewed by Sam Weinig.
1721 Add a new String literal, _str, that will return a String type.
1722 This is useful when ""_s won't work, such as for things that
1723 don't take an ASCIILiteral directly e.g. ExceptionOr<String>
1726 * wtf/text/WTFString.h:
1727 (WTF::StringLiterals::operator _str): Added.
1729 2018-11-06 Justin Fan <justin_fan@apple.com>
1731 [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
1732 https://bugs.webkit.org/show_bug.cgi?id=191291
1734 Reviewed by Myles Maxfield.
1736 Properly disable WEBGPU on all non-Metal platforms for now.
1740 2018-11-05 Myles C. Maxfield <mmaxfield@apple.com>
1742 Cache glyph paths and share underline skipping code between all the ports
1743 https://bugs.webkit.org/show_bug.cgi?id=191239
1745 Reviewed by Alex Christensen.
1747 Remove CSS3_TEXT_DECORATION_SKIP_INK. It's now interoperable and part of the Web Platform.
1751 2018-11-05 Dominik Infuehr <dinfuehr@igalia.com>
1753 Enable LLInt on ARMv7/Linux
1754 https://bugs.webkit.org/show_bug.cgi?id=191190
1756 Reviewed by Yusuke Suzuki.
1758 After enabling the new bytecode format in r237547, C_LOOP was
1759 forced on all 32-bit platforms. Now enable LLInt again on
1760 ARMv7-Thumb2/Linux by default.
1764 2018-11-04 Fujii Hironori <Hironori.Fujii@sony.com>
1766 [Win] Use C++14, not C++17
1767 https://bugs.webkit.org/show_bug.cgi?id=191101
1769 Reviewed by Alex Christensen.
1771 * wtf/StdLibExtras.h: Use _MSVC_LANG to check C++ language version
1772 instead of _MSC_FULL_VER.
1774 2018-11-02 Justin Fan <justin_fan@apple.com>
1776 [WebGPU] Experimental prototype for MSL shaders
1777 https://bugs.webkit.org/show_bug.cgi?id=191084
1779 Reviewed by Dean Jackson.
1781 Disabling WebGPU on non-Cocoa platforms and iOS Simulator.
1785 2018-11-01 Jiewen Tan <jiewen_tan@apple.com>
1787 Replace CommonRandom SPI with API
1788 https://bugs.webkit.org/show_bug.cgi?id=191178
1789 <rdar://problem/45722391>
1791 Reviewed by Brent Fulgham.
1793 * WTF.xcodeproj/project.pbxproj:
1794 * wtf/CMakeLists.txt:
1795 * wtf/RandomDevice.cpp:
1796 (WTF::RandomDevice::cryptographicallyRandomValues):
1797 * wtf/spi/darwin/CommonCryptoSPI.h: Removed.
1799 2018-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
1801 Rename <wtf/unicode/UTF8.h> to <wtf/unicode/UTF8Conversion.h> in order to avoid conflicting with ICU's unicode/utf8.h
1802 https://bugs.webkit.org/show_bug.cgi?id=189693
1804 Reviewed by Yusuke Suzuki.
1806 * WTF.xcodeproj/project.pbxproj: Replaced unicode/UTF8.{cpp,h} with unicode/UTF8Conversion.{cpp,h}.
1807 * wtf/CMakeLists.txt: Ditto.
1808 * wtf/text/AtomicStringImpl.cpp: Replaced <wtf/unicode/UTF8.h> with <wtf/unicode/UTF8Conversion.h>.
1809 * wtf/text/StringImpl.cpp: Ditto.
1810 * wtf/text/StringView.cpp: Ditto.
1811 * wtf/text/WTFString.cpp: Ditto.
1812 * wtf/unicode/UTF8Conversion.cpp: Renamed from Source/WTF/wtf/unicode/UTF8.cpp.
1813 * wtf/unicode/UTF8Conversion.h: Renamed from Source/WTF/wtf/unicode/UTF8.h.
1815 2018-10-30 Don Olmstead <don.olmstead@sony.com>
1817 [PlayStation] Enable JavaScriptCore
1818 https://bugs.webkit.org/show_bug.cgi?id=191072
1820 Reviewed by Brent Fulgham.
1822 Add platform files for the PlayStation port.
1824 * wtf/PlatformPlayStation.cmake: Added.
1826 2018-10-30 David Kilzer <ddkilzer@apple.com>
1828 XSLTProcessor should limit max transform depth
1829 <https://webkit.org/b/191075>
1830 <rdar://problem/45531453>
1832 Reviewed by Alex Christensen.
1834 * wtf/cocoa/SoftLinking.h:
1835 (SOFT_LINK_VARIABLE_FOR_HEADER):
1836 (SOFT_LINK_VARIABLE_FOR_SOURCE):
1837 - Add macros for non-constant global variables.
1839 2018-10-30 Alexey Proskuryakov <ap@apple.com>
1841 Clean up some obsolete MAX_ALLOWED macros
1842 https://bugs.webkit.org/show_bug.cgi?id=190916
1844 Reviewed by Tim Horton.
1846 * WTF.xcodeproj/project.pbxproj:
1847 * wtf/PlatformMac.cmake:
1848 * wtf/spi/cocoa/NSMapTableSPI.h: Removed. This was only needed for old SDKs.
1850 2018-10-29 Mark Lam <mark.lam@apple.com>
1852 Correctly detect string overflow when using the 'Function' constructor.
1853 https://bugs.webkit.org/show_bug.cgi?id=184883
1854 <rdar://problem/36320331>
1856 Reviewed by Saam Barati.
1858 1. Enhanced StringBuilder so that it supports 2 modes of behavior:
1859 a. StringBuilder::OverflowHandler::CrashOnOverflow.
1860 b. StringBuilder::OverflowHandler::RecordOverflow.
1862 CrashOnOverflow will crash the moment an overflow or failure to allocate
1865 RecordOverflow will make StringBuilder::hasOverflowed() return true when an
1866 overflow or failure to allocate memory is detected. However, if the user
1867 invokes toString(), toStringPreserveCapacity(), toAtomicString(), length(),
1868 capacity(), isEmpty(), characters8(), or characters16(), then the StringBuilder
1869 will crash regardless because these methods can only meaningfully do their
1870 work and return a result if and only if the builder has not overflowed.
1872 By default, the StringBuilder crashes on overflow (the old behavior) unless it
1873 is explicitly constructed with the StringBuilder::OverflowHandler::RecordOverflow
1878 The StringBuilder can only be put in 1 of the 2 modes at the time of
1879 construction. This means that we could have implemented it as a template
1880 that is parameterized on an OverflowHandler class (like CheckedArithmetic)
1881 instead of using a runtime check in the ConditionalCrashOnOverflow handler.
1883 However, I was not able to get clang to export the explicitly instantiated
1884 instances (despite the methods having being decorated with WTF_EXPORT_PRIVATE).
1885 Since the StringBuilder is a transient object (not stored for a long time on
1886 the heap), and the runtime check of the boolean is not that costly compared
1887 to other work that StringBuilder routinely does (e.g. memcpy), using the
1888 new ConditionalCrashOnOverflow (which does a runtime check to determine to
1889 crash or not on overflow) is fine.
1891 When clang is able to export explicitly instantiated template methods, we can
1892 templatize StringBuilder and do away with ConditionalCrashOnOverflow.
1893 See https://bugs.webkit.org/show_bug.cgi?id=191050.
1895 To support the above, we also did:
1897 2. Enhanced all StringBuilder append and buffer allocation methods to be able to
1898 fail without crashing. This also meant that ...
1900 3. Added tryReallocate() support to StringImpl. tryRealloc() was added to
1901 FastMalloc, and bmalloc (and related peers) to enable this.
1903 4. Added ConditionalCrashOnOverflow, which can choose at runtime whether to behave
1904 like CrashOnOverflow or RecordOverflow.
1906 * wtf/CheckedArithmetic.h:
1907 (WTF::ConditionalCrashOnOverflow::overflowed):
1908 (WTF::ConditionalCrashOnOverflow::shouldCrashOnOverflow const):
1909 (WTF::ConditionalCrashOnOverflow::setShouldCrashOnOverflow):
1910 (WTF::ConditionalCrashOnOverflow::hasOverflowed const):
1911 (WTF::ConditionalCrashOnOverflow::clearOverflow):
1912 (WTF::ConditionalCrashOnOverflow::crash):
1913 (WTF::RecordOverflow::overflowed):
1914 (WTF::Checked::unsafeGet const):
1915 * wtf/FastMalloc.cpp:
1916 (WTF::tryFastRealloc):
1918 * wtf/text/StringBuilder.cpp:
1919 (WTF::expandedCapacity):
1920 (WTF::StringBuilder::reifyString const):
1921 (WTF::StringBuilder::resize):
1922 (WTF::StringBuilder::allocateBuffer):
1923 (WTF::StringBuilder::allocateBufferUpConvert):
1924 (WTF::StringBuilder::reallocateBuffer<LChar>):
1925 (WTF::StringBuilder::reallocateBuffer<UChar>):
1926 (WTF::StringBuilder::reserveCapacity):
1927 (WTF::StringBuilder::appendUninitialized):
1928 (WTF::StringBuilder::appendUninitializedSlow):
1929 (WTF::StringBuilder::append):
1930 (WTF::StringBuilder::canShrink const):
1931 (WTF::StringBuilder::shrinkToFit):
1932 * wtf/text/StringBuilder.h:
1933 (WTF::StringBuilder::StringBuilder):
1934 (WTF::StringBuilder::didOverflow):
1935 (WTF::StringBuilder::hasOverflowed const):
1936 (WTF::StringBuilder::crashesOnOverflow const):
1937 (WTF::StringBuilder::append):
1938 (WTF::StringBuilder::toString):
1939 (WTF::StringBuilder::toStringPreserveCapacity const):
1940 (WTF::StringBuilder::toAtomicString const):
1941 (WTF::StringBuilder::length const):
1942 (WTF::StringBuilder::capacity const):
1943 (WTF::StringBuilder::operator[] const):
1944 (WTF::StringBuilder::swap):
1945 (WTF::StringBuilder::getBufferCharacters<UChar>):
1946 * wtf/text/StringBuilderJSON.cpp:
1947 (WTF::StringBuilder::appendQuotedJSONString):
1948 * wtf/text/StringImpl.cpp:
1949 (WTF::StringImpl::reallocateInternal):
1950 (WTF::StringImpl::reallocate):
1951 (WTF::StringImpl::tryReallocate):
1952 * wtf/text/StringImpl.h:
1954 2018-10-29 Tim Horton <timothy_horton@apple.com>
1956 Modernize WebKit nibs and lprojs for localization's sake
1957 https://bugs.webkit.org/show_bug.cgi?id=190911
1958 <rdar://problem/45349466>
1960 Reviewed by Dan Bernstein.
1962 * WTF.xcodeproj/project.pbxproj:
1965 2018-10-29 Tadeu Zagallo <tzagallo@apple.com>
1967 New bytecode format for JSC
1968 https://bugs.webkit.org/show_bug.cgi?id=187373
1969 <rdar://problem/44186758>
1971 Reviewed by Filip Pizlo.
1973 * wtf/Forward.h: Fix WTF_LAZY_FOR_EACH_TERM on MSVC and add WTF_LAZY_HAS_REST to check whether
1974 a macro was passed multiple arguments
1975 * wtf/Platform.h: Force ENABLE_JIT=false on all 32-bit platforms
1977 (WTF::minCapacity>::insertVector): Allow vectors with different overflow handlers to be passed to insertVector
1979 2018-10-28 Geoffrey Garen <ggaren@apple.com>
1981 HashMap should support selecting a random entry
1982 https://bugs.webkit.org/show_bug.cgi?id=190814
1984 Reviewed by Ryosuke Niwa.
1987 (WTF::HashTable::random):
1988 (WTF::HashTable::random const): Merge the empty and deleted checks, and
1989 use more idiomatic addressing.
1991 2018-10-26 Commit Queue <commit-queue@webkit.org>
1993 Unreviewed, rolling out r237479 and r237484.
1994 https://bugs.webkit.org/show_bug.cgi?id=190978
1996 broke JSC on iOS (Requested by tadeuzagallo on #webkit).
1998 Reverted changesets:
2000 "New bytecode format for JSC"
2001 https://bugs.webkit.org/show_bug.cgi?id=187373
2002 https://trac.webkit.org/changeset/237479
2004 "Gardening: Build fix after r237479."
2005 https://bugs.webkit.org/show_bug.cgi?id=187373
2006 https://trac.webkit.org/changeset/237484
2008 2018-10-26 Tadeu Zagallo <tzagallo@apple.com>
2010 New bytecode format for JSC
2011 https://bugs.webkit.org/show_bug.cgi?id=187373
2012 <rdar://problem/44186758>
2014 Reviewed by Filip Pizlo.
2016 * wtf/Forward.h: Fix WTF_LAZY_FOR_EACH_TERM on MSVC and add WTF_LAZY_HAS_REST to check whether
2017 a macro was passed multiple arguments
2018 * wtf/Platform.h: Force ENABLE_JIT=false on all 32-bit platforms
2020 (WTF::minCapacity>::insertVector): Allow vectors with different overflow handlers to be passed to insertVector
2022 2018-10-26 Geoffrey Garen <ggaren@apple.com>
2024 HashMap should support selecting a random entry
2025 https://bugs.webkit.org/show_bug.cgi?id=190814
2027 Reviewed by Antti Koivisto.
2030 (WTF::HashTable::random):
2031 (WTF::HashTable::random const): Draw a new random bucket any time we
2032 have a miss, to avoid bias caused by lopsided tables.
2034 2018-10-26 Antti Koivisto <antti@apple.com>
2036 hashSet.remove(hashSet.random()) doesn't build
2037 https://bugs.webkit.org/show_bug.cgi?id=190953
2039 Reviewed by Chris Dumez.
2043 Remove non-const random(). HashSet only returns const iterators (it is immutable via iterator).
2046 (WTF::HashTable::random const):
2048 Invoke const_iterator() by using static_cast<> instead of trying to do it directly.
2050 2018-10-26 Alicia Boya GarcÃa <aboya@igalia.com>
2052 [MSE][WTF][Media] Invalid MediaTime should be falsy
2053 https://bugs.webkit.org/show_bug.cgi?id=190893
2055 Reviewed by Jer Noble.
2057 This patch modifies the definition of MediaTime so that invalid times
2058 are evaluated to false in the context of a boolean expression.
2060 * wtf/MediaTime.cpp:
2061 (WTF::MediaTime::operator! const):
2062 (WTF::MediaTime::operator bool const):
2064 2018-10-26 Keith Miller <keith_miller@apple.com>
2066 Some internal projects include wtf headers and build with C++11
2067 https://bugs.webkit.org/show_bug.cgi?id=190791
2069 Reviewed by Alexey Proskuryakov.
2071 C++11 doesn't support constexpr functions that contain
2072 statements. This patch removes getLSBSet set from builds before
2073 C++14 to avoid this for now.
2078 2018-10-25 Ross Kirsling <ross.kirsling@sony.com>
2080 Cleanup: inline constexpr is redundant as constexpr implies inline
2081 https://bugs.webkit.org/show_bug.cgi?id=190819
2083 Reviewed by Mark Lam.
2086 (WTF::WordType>::Bitmap):
2088 (WTF::LEBDecoder::maxByteLength):
2090 (defaultMinimumForClamp):
2091 (defaultMaximumForClamp):
2092 (clampToAccepting64):
2096 (isGreaterThanEqual):
2097 (WTF::roundUpToPowerOfTwo):
2102 (WTF::untagCodePtr):
2103 (WTF::retagCodePtr):
2104 (WTF::removeCodePtrTag):
2105 * wtf/StdLibExtras.h:
2106 (WTF::roundUpToMultipleOf):
2114 * wtf/text/StringImpl.h:
2115 (WTF::StringImplShape::StringImplShape):
2116 (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
2118 2018-10-25 Geoffrey Garen <ggaren@apple.com>
2120 HashMap should support selecting a random entry
2121 https://bugs.webkit.org/show_bug.cgi?id=190814
2123 Reviewed by Antti Koivisto.
2125 In some cases, remove(begin()) is not quite good enough as a random
2126 eviction strategy. (See https://bugs.webkit.org/show_bug.cgi?id=190792.)
2127 So, let's support real random eviction.
2129 (And by "real" I mean "pseudo".)
2131 * wtf/HashCountedSet.h:
2134 * wtf/ListHashSet.h:
2135 (WTF::ListHashSet::random):
2136 (WTF::ListHashSet::random const):
2137 * wtf/LoggingHashMap.h:
2138 * wtf/LoggingHashSet.h: Plumb through the random() iterator.
2141 (WTF::HashTable::random):
2142 (WTF::HashTable::random const): Implement the random() iterator.
2143 makeIterator() already supports starting from any bucket, so this is
2146 In the subtle case where we select end(), we choose to wrap around and
2147 return begin(). We expect that clients don't really think of the end()
2148 bucket as being in the domain of the random search. Also, we don't want
2149 to annoy clients who know their tables are non-empty with needless
2152 * wtf/RandomNumber.cpp:
2153 (WTF::weakRandomUint32):
2154 * wtf/RandomNumber.h: Added a free function for weak random numbers so
2155 that clients that want cheap random numbers aren't required to allocate
2156 storage for a WeakRandom generator.
2158 2018-10-24 Megan Gardner <megan_gardner@apple.com>
2160 Turn on Conic Gradients
2161 https://bugs.webkit.org/show_bug.cgi?id=190810
2163 Reviewed by Tim Horton.
2165 * wtf/FeatureDefines.h:
2167 2018-10-24 Christopher Reid <chris.reid@sony.com>
2169 [Win] Add function call name information to stack traces
2170 https://bugs.webkit.org/show_bug.cgi?id=190761
2172 Reviewed by Fujii Hironori.
2174 Add symbol information to stack traces using dbghelp.dll
2175 This library will use symbols files from these sources:
2176 - The current working directory
2177 - The directory containing the application's executable
2178 - _NT_SYMBOL_PATH environment variable
2179 - _NT_ALTERNATE_SYMBOL_PATH environment variable
2181 This functionality is currently only enabled in debug mode since dbghelp is not threadsafe.
2182 The DbgHelper class attempts to synchronize calls to dbghelp.dll but external code
2183 can still attempt to call the library at the same time as WebKit.
2185 * wtf/CMakeLists.txt:
2186 * wtf/PlatformWin.cmake:
2187 * wtf/StackTrace.cpp:
2188 * wtf/win/DbgHelperWin.cpp: Added.
2189 * wtf/win/DbgHelperWin.h: Added.
2191 2018-10-22 Alexey Proskuryakov <ap@apple.com>
2193 Really prevent PLATFORM(IOS) from being used
2194 https://bugs.webkit.org/show_bug.cgi?id=190813
2196 Reviewed by Tim Horton.
2198 * wtf/Platform.h: This relies on -Wundef, which we have enabled.
2200 2018-10-22 Chris Dumez <cdumez@apple.com>
2202 Deque's contains() and findIf() should be const
2203 https://bugs.webkit.org/show_bug.cgi?id=190796
2205 Reviewed by Antti Koivisto.
2207 Deque's contains() and findIf() should be const as they do not modify the container.
2210 (WTF::inlineCapacity>::findIf):
2211 (WTF::inlineCapacity>::findIf const):
2212 (WTF::inlineCapacity>::contains const):
2213 (WTF::inlineCapacity>::contains): Deleted.
2215 2018-10-18 Alicia Boya GarcÃa <aboya@igalia.com>
2217 [Media] Use nanoseconds as MaximumTimeScale
2218 https://bugs.webkit.org/show_bug.cgi?id=190631
2220 1e9 is a much more useful timescale than the previous one 2^31-1.
2221 Unlike 2^31-1, which is a prime number, nanosecond scale is pretty
2222 common among some formats like WebM and frameworks like GStreamer
2223 where base 10 timescale is common... and it's those big timescales the
2224 ones that are usually scaled up to MaximumTimeScale.
2226 Reviewed by Jer Noble.
2228 * wtf/MediaTime.cpp:
2230 2018-10-18 Alexey Proskuryakov <ap@apple.com>
2232 Remove PLATFORM(IOS) for now
2233 https://bugs.webkit.org/show_bug.cgi?id=190737
2235 Reviewed by Tim Horton.
2239 2018-10-18 Alexey Proskuryakov <ap@apple.com>
2241 Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
2242 https://bugs.webkit.org/show_bug.cgi?id=190729
2244 Reviewed by Tim Horton.
2247 * wtf/FeatureDefines.h:
2249 * wtf/MemoryPressureHandler.cpp:
2250 (WTF::thresholdForPolicy):
2252 * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
2253 (WTF::MemoryPressureHandler::install):
2254 (WTF::MemoryPressureHandler::respondToMemoryPressure):
2255 * wtf/spi/cocoa/NSMapTableSPI.h:
2256 * wtf/spi/darwin/XPCSPI.h:
2257 * wtf/text/StringCommon.h:
2258 * wtf/text/TextBreakIterator.cpp:
2259 * wtf/text/TextBreakIterator.h:
2260 * wtf/unicode/icu/CollatorICU.cpp:
2261 (WTF::copyDefaultLocale):
2263 2018-10-18 Alex Christensen <achristensen@webkit.org>
2265 Clean up FrameLoader two-state enums
2266 https://bugs.webkit.org/show_bug.cgi?id=190731
2268 Reviewed by Chris Dumez.
2273 2018-10-17 Commit Queue <commit-queue@webkit.org>
2275 Unreviewed, rolling out r237208.
2276 https://bugs.webkit.org/show_bug.cgi?id=190691
2278 Caused the API test that was changed to failure continuously
2279 (Requested by Truitt on #webkit).
2283 "[Media] Use nanoseconds as MaximumTimeScale"
2284 https://bugs.webkit.org/show_bug.cgi?id=190631
2285 https://trac.webkit.org/changeset/237208
2287 2018-10-16 Alicia Boya GarcÃa <aboya@igalia.com>
2289 [Media] Use nanoseconds as MaximumTimeScale
2290 https://bugs.webkit.org/show_bug.cgi?id=190631
2292 1e9 is a much more useful timescale than the previous one 2^31-1.
2293 Unlike 2^31-1, which is a prime number, nanosecond scale is pretty
2294 common among some formats like WebM and frameworks like GStreamer
2295 where base 10 timescale is common... and it's those big timescales the
2296 ones that are usually scaled up to MaximumTimeScale.
2298 Reviewed by Jer Noble.
2300 * wtf/MediaTime.cpp:
2302 2018-10-15 Keith Miller <keith_miller@apple.com>
2304 Support arm64 CPUs with a 32-bit address space
2305 https://bugs.webkit.org/show_bug.cgi?id=190273
2307 Reviewed by Michael Saboff.
2309 Use WTF_CPU_ADDRESS64/32 to decide if the system is running on arm64_32.
2315 2018-10-15 Timothy Hatcher <timothy@apple.com>
2317 Add support for prefers-color-scheme media query
2318 https://bugs.webkit.org/show_bug.cgi?id=190499
2319 rdar://problem/45212025
2321 Reviewed by Dean Jackson.
2323 * wtf/FeatureDefines.h: Added ENABLE_DARK_MODE_CSS.
2325 2018-10-15 Saam barati <sbarati@apple.com>
2327 Emit fjcvtzs on ARM64E on Darwin
2328 https://bugs.webkit.org/show_bug.cgi?id=184023
2330 Reviewed by Yusuke Suzuki and Filip Pizlo.
2334 2018-10-15 Alex Christensen <achristensen@webkit.org>
2336 Use pragma once in WTF
2337 https://bugs.webkit.org/show_bug.cgi?id=190527
2339 Reviewed by Chris Dumez.
2341 We also need to consistently include wtf headers from within wtf so we can build wtf without
2342 symbol redefinition errors from including the copy in Source and the copy in the build directory.
2345 * wtf/Assertions.cpp:
2348 * wtf/AutomaticThread.cpp:
2349 * wtf/AutomaticThread.h:
2350 * wtf/BackwardsGraph.h:
2352 * wtf/BagToHashMap.h:
2353 * wtf/BitVector.cpp:
2356 * wtf/BloomFilter.h:
2359 * wtf/BumpPointerAllocator.h:
2362 * wtf/CallbackAggregator.h:
2363 * wtf/CheckedArithmetic.h:
2364 * wtf/CheckedBoolean.h:
2365 * wtf/ClockType.cpp:
2367 * wtf/CommaPrinter.h:
2368 * wtf/CompilationThread.cpp:
2369 * wtf/CompilationThread.h:
2371 * wtf/ConcurrentPtrHashSet.cpp:
2372 * wtf/ConcurrentVector.h:
2374 * wtf/CountingLock.cpp:
2375 * wtf/CrossThreadTaskHandler.cpp:
2376 * wtf/CryptographicUtilities.cpp:
2377 * wtf/CryptographicUtilities.h:
2378 * wtf/CryptographicallyRandomNumber.cpp:
2379 * wtf/CryptographicallyRandomNumber.h:
2380 * wtf/CurrentTime.cpp:
2385 * wtf/DecimalNumber.cpp:
2386 * wtf/DecimalNumber.h:
2388 * wtf/DisallowCType.h:
2390 * wtf/DoublyLinkedList.h:
2391 * wtf/FastBitVector.cpp:
2392 * wtf/FastMalloc.cpp:
2394 * wtf/FeatureDefines.h:
2395 * wtf/FilePrintStream.cpp:
2396 * wtf/FilePrintStream.h:
2398 * wtf/FunctionDispatcher.cpp:
2399 * wtf/FunctionDispatcher.h:
2402 * wtf/GlobalVersion.cpp:
2403 * wtf/GraphNodeWorklist.h:
2404 * wtf/GregorianDateTime.cpp:
2405 * wtf/GregorianDateTime.h:
2406 * wtf/HashFunctions.h:
2410 * wtf/HashTable.cpp:
2413 * wtf/IndexSparseSet.h:
2416 * wtf/IteratorAdaptors.h:
2417 * wtf/IteratorRange.h:
2418 * wtf/JSONValues.cpp:
2419 * wtf/JSValueMalloc.cpp:
2425 * wtf/LockAlgorithm.h:
2426 * wtf/LockedPrintStream.cpp:
2430 * wtf/MainThread.cpp:
2434 * wtf/MediaTime.cpp:
2436 * wtf/MemoryPressureHandler.cpp:
2437 * wtf/MessageQueue.h:
2438 * wtf/MetaAllocator.cpp:
2439 * wtf/MetaAllocator.h:
2440 * wtf/MetaAllocatorHandle.h:
2441 * wtf/MonotonicTime.cpp:
2442 * wtf/MonotonicTime.h:
2445 * wtf/NoTailCalls.h:
2446 * wtf/Noncopyable.h:
2447 * wtf/NumberOfCores.cpp:
2448 * wtf/NumberOfCores.h:
2449 * wtf/OSAllocator.h:
2450 * wtf/OSAllocatorPosix.cpp:
2451 * wtf/OSRandomSource.cpp:
2452 * wtf/OSRandomSource.h:
2453 * wtf/ObjcRuntimeExtras.h:
2455 * wtf/PackedIntVector.h:
2456 * wtf/PageAllocation.h:
2457 * wtf/PageBlock.cpp:
2459 * wtf/PageReservation.h:
2460 * wtf/ParallelHelperPool.cpp:
2461 * wtf/ParallelHelperPool.h:
2462 * wtf/ParallelJobs.h:
2463 * wtf/ParallelJobsLibdispatch.h:
2464 * wtf/ParallelVectorIterator.h:
2465 * wtf/ParkingLot.cpp:
2468 * wtf/PointerComparison.h:
2470 * wtf/PrintStream.cpp:
2471 * wtf/PrintStream.h:
2473 * wtf/ProcessPrivilege.cpp:
2476 * wtf/RandomDevice.cpp:
2477 * wtf/RandomNumber.cpp:
2478 * wtf/RandomNumber.h:
2479 * wtf/RandomNumberSeed.h:
2482 * wtf/ReadWriteLock.cpp:
2483 * wtf/RedBlackTree.h:
2485 * wtf/RefCountedArray.h:
2486 * wtf/RefCountedLeakCounter.cpp:
2487 * wtf/RefCountedLeakCounter.h:
2493 * wtf/RunLoopTimer.h:
2494 * wtf/RunLoopTimerCF.cpp:
2497 * wtf/SaturatedArithmetic.h:
2498 (saturatedSubtraction):
2499 * wtf/SchedulePair.h:
2500 * wtf/SchedulePairCF.cpp:
2501 * wtf/SchedulePairMac.mm:
2502 * wtf/ScopedLambda.h:
2505 * wtf/SegmentedVector.h:
2506 * wtf/SentinelLinkedList.h:
2508 * wtf/SimpleStats.h:
2509 * wtf/SingleRootGraph.h:
2510 * wtf/SinglyLinkedList.h:
2511 * wtf/SixCharacterHash.cpp:
2512 * wtf/SixCharacterHash.h:
2513 * wtf/SmallPtrSet.h:
2515 * wtf/StackBounds.cpp:
2516 * wtf/StackBounds.h:
2517 * wtf/StackStats.cpp:
2519 * wtf/StackTrace.cpp:
2520 * wtf/StdLibExtras.h:
2521 * wtf/StreamBuffer.h:
2522 * wtf/StringHashDumpContext.h:
2523 * wtf/StringPrintStream.cpp:
2524 * wtf/StringPrintStream.h:
2525 * wtf/ThreadGroup.cpp:
2526 * wtf/ThreadMessage.cpp:
2527 * wtf/ThreadSpecific.h:
2528 * wtf/Threading.cpp:
2530 * wtf/ThreadingPrimitives.h:
2531 * wtf/ThreadingPthreads.cpp:
2532 * wtf/TimeWithDynamicClockType.cpp:
2533 * wtf/TimeWithDynamicClockType.h:
2534 * wtf/TimingScope.cpp:
2535 * wtf/TinyLRUCache.h:
2544 * wtf/VectorTraits.h:
2551 * wtf/WorkQueue.cpp:
2553 * wtf/WorkerPool.cpp:
2554 * wtf/cf/LanguageCF.cpp:
2555 * wtf/cf/RunLoopCF.cpp:
2556 * wtf/cocoa/Entitlements.mm:
2557 * wtf/cocoa/MachSendRight.cpp:
2558 * wtf/cocoa/MainThreadCocoa.mm:
2559 * wtf/cocoa/MemoryFootprintCocoa.cpp:
2560 * wtf/cocoa/WorkQueueCocoa.cpp:
2563 * wtf/ios/WebCoreThread.cpp:
2564 * wtf/ios/WebCoreThread.h:
2565 * wtf/mac/AppKitCompatibilityDeclarations.h:
2566 * wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
2568 * wtf/persistence/PersistentCoders.cpp:
2569 * wtf/persistence/PersistentDecoder.cpp:
2570 * wtf/persistence/PersistentEncoder.cpp:
2571 * wtf/spi/cf/CFBundleSPI.h:
2572 * wtf/spi/darwin/CommonCryptoSPI.h:
2573 * wtf/text/ASCIIFastPath.h:
2574 * wtf/text/ASCIILiteral.cpp:
2575 * wtf/text/AtomicString.cpp:
2576 * wtf/text/AtomicString.h:
2577 * wtf/text/AtomicStringHash.h:
2578 * wtf/text/AtomicStringImpl.cpp:
2579 * wtf/text/AtomicStringImpl.h:
2580 * wtf/text/AtomicStringTable.cpp:
2581 * wtf/text/AtomicStringTable.h:
2582 * wtf/text/Base64.cpp:
2583 * wtf/text/CString.cpp:
2584 * wtf/text/CString.h:
2585 * wtf/text/ConversionMode.h:
2586 * wtf/text/ExternalStringImpl.cpp:
2587 * wtf/text/IntegerToStringConversion.h:
2589 * wtf/text/LineEnding.cpp:
2590 * wtf/text/StringBuffer.h:
2591 * wtf/text/StringBuilder.cpp:
2592 * wtf/text/StringBuilder.h:
2593 * wtf/text/StringBuilderJSON.cpp:
2594 * wtf/text/StringCommon.h:
2595 * wtf/text/StringConcatenate.h:
2596 * wtf/text/StringHash.h:
2597 * wtf/text/StringImpl.cpp:
2598 * wtf/text/StringImpl.h:
2599 * wtf/text/StringOperators.h:
2600 * wtf/text/StringView.cpp:
2601 * wtf/text/StringView.h:
2602 * wtf/text/SymbolImpl.cpp:
2603 * wtf/text/SymbolRegistry.cpp:
2604 * wtf/text/SymbolRegistry.h:
2605 * wtf/text/TextBreakIterator.cpp:
2606 * wtf/text/TextBreakIterator.h:
2607 * wtf/text/TextBreakIteratorInternalICU.h:
2608 * wtf/text/TextPosition.h:
2609 * wtf/text/TextStream.cpp:
2610 * wtf/text/UniquedStringImpl.h:
2611 * wtf/text/WTFString.cpp:
2612 * wtf/text/WTFString.h:
2613 * wtf/text/cocoa/StringCocoa.mm:
2614 * wtf/text/cocoa/StringViewCocoa.mm:
2615 * wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:
2616 * wtf/text/icu/UTextProvider.cpp:
2617 * wtf/text/icu/UTextProvider.h:
2618 * wtf/text/icu/UTextProviderLatin1.cpp:
2619 * wtf/text/icu/UTextProviderLatin1.h:
2620 * wtf/text/icu/UTextProviderUTF16.cpp:
2621 * wtf/text/icu/UTextProviderUTF16.h:
2622 * wtf/threads/BinarySemaphore.cpp:
2623 * wtf/threads/BinarySemaphore.h:
2624 * wtf/threads/Signals.cpp:
2625 * wtf/unicode/CharacterNames.h:
2626 * wtf/unicode/Collator.h:
2627 * wtf/unicode/CollatorDefault.cpp:
2628 * wtf/unicode/UTF8.cpp:
2629 * wtf/unicode/UTF8.h:
2631 2018-10-12 Alex Christensen <achristensen@webkit.org>
2633 Allow encoding of small enum classes
2634 https://bugs.webkit.org/show_bug.cgi?id=190531
2636 Reviewed by Tim Horton.
2640 2018-10-11 Alexey Proskuryakov <ap@apple.com>
2642 Add PLATFORM(IOS_FAMILY) and OS(IOS_FAMILY)
2643 https://bugs.webkit.org/show_bug.cgi?id=190477
2645 Reviewed by Tim Horton.
2647 Currently, PLATFORM(IOS) and OS(IOS) are true when building for any
2648 TARGET_OS_IPHONE target, which is quite confusing. Add a better named alternative,
2649 as a first step towards mass replacing PLATFORM(IOS). Can't so it all at once
2650 because of dependencies in other source repositories.
2652 * wtf/Platform.h: Changed to the new name in this file though. Kept a few
2653 instances that actually target iOS only, having a version check.
2655 2018-10-11 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2657 Use currentStackPointer more
2658 https://bugs.webkit.org/show_bug.cgi?id=190503
2660 Reviewed by Saam Barati.
2662 Use WTF::currentStackPointer more in WebKit to adopt ASAN detect_stack_use_after_return option.
2664 * wtf/StackBounds.cpp:
2665 (WTF::testStackDirection2):
2666 (WTF::testStackDirection):
2667 * wtf/ThreadingPthreads.cpp:
2668 (WTF::Thread::signalHandlerSuspendResume):
2669 (WTF::getApproximateStackPointer): Deleted.
2671 2018-10-11 Ross Kirsling <ross.kirsling@sony.com>
2673 [WTF] Semaphore.h conflicts with POSIX header
2674 https://bugs.webkit.org/show_bug.cgi?id=190486
2676 Reviewed by Yusuke Suzuki.
2678 Rename Semaphore.h to WTFSemaphore.h to avoid conflict with POSIX semaphore.h on case-insensitive file systems.
2680 * WTF.xcodeproj/project.pbxproj:
2681 * wtf/CMakeLists.txt:
2682 * wtf/WTFSemaphore.h: Renamed from wtf/Semaphore.h.
2684 2018-10-10 Mark Lam <mark.lam@apple.com>
2686 Changes towards allowing use of the ASAN detect_stack_use_after_return option.
2687 https://bugs.webkit.org/show_bug.cgi?id=190405
2688 <rdar://problem/45131464>
2690 Reviewed by Michael Saboff.
2692 Introduce WTF::currentStackPointer() which computes its caller's stack pointer value.
2694 * WTF.xcodeproj/project.pbxproj:
2695 * wtf/CMakeLists.txt:
2696 * wtf/StackBounds.h:
2697 (WTF::StackBounds::checkConsistency const):
2698 * wtf/StackPointer.cpp: Added.
2699 (WTF::currentStackPointer):
2700 * wtf/StackPointer.h: Added.
2702 2018-10-09 Mark Lam <mark.lam@apple.com>
2704 StringTypeAdapter constructor is not properly enforcing String::MaxLength.
2705 https://bugs.webkit.org/show_bug.cgi?id=190392
2706 <rdar://problem/45116210>
2708 Reviewed by Saam Barati.
2710 Previously, the StringTypeAdapter constructor for a UChar* string was summing the
2711 unsigned length of the source string without an overflow check. We now make that
2712 length a size_t which removes this issue, and assert that it's within
2713 String::MaxLength thereafter.
2715 Also made the StringTypeAdapter constructor for a LChar* string behave in an
2716 equivalent manner for consistency. In both cases, we'll crash in a RELEASE_ASSERT
2717 if the source string length exceeds String::MaxLength.
2719 * wtf/text/StringConcatenate.h:
2721 2018-10-09 Mark Lam <mark.lam@apple.com>
2723 Revert temporary asserts for debugging a mysterious ASAN bot crash.
2724 https://bugs.webkit.org/show_bug.cgi?id=190396
2726 Reviewed by Yusuke Suzuki.
2728 * wtf/StackBounds.cpp:
2729 (WTF::StackBounds::newThreadStackBounds):
2730 * wtf/StackBounds.h:
2731 (WTF::StackBounds::checkConsistency const):
2733 2018-10-08 Aditya Keerthi <akeerthi@apple.com>
2735 Make <input type=color> a runtime enabled (on-by-default) feature
2736 https://bugs.webkit.org/show_bug.cgi?id=189162
2738 Reviewed by Wenson Hsieh and Tim Horton.
2740 * wtf/FeatureDefines.h:
2742 2018-10-06 Mark Lam <mark.lam@apple.com>
2744 Adding some temporary asserts with data logging to debug a mysterious ASAN bot crash.
2745 https://bugs.webkit.org/show_bug.cgi?id=190334
2746 <rdar://problem/45071303>
2748 Reviewed by Yusuke Suzuki.
2750 These assertions are needed because we can't reproduce the issue locally.
2751 We'll remove these asserts after the needed data has been collected from the bot.
2753 * wtf/StackBounds.cpp:
2754 (WTF::StackBounds::newThreadStackBounds):
2755 * wtf/StackBounds.h:
2756 (WTF::StackBounds::checkConsistency const):
2758 2018-10-07 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2761 https://bugs.webkit.org/show_bug.cgi?id=190337
2763 Reviewed by Mark Lam.
2765 Add a functionality naming threads of ParallelHelperPool.
2767 * wtf/ParallelHelperPool.cpp:
2768 (WTF::ParallelHelperPool::ParallelHelperPool):
2769 * wtf/ParallelHelperPool.h:
2771 2018-10-06 Mark Lam <mark.lam@apple.com>
2773 Adding some temporary asserts to debug a mysterious ASAN bot crash.
2774 https://bugs.webkit.org/show_bug.cgi?id=190331
2776 Reviewed by Filip Pizlo.
2778 These assertions are needed because we can't reproduce the issue locally.
2779 We'll remove these asserts after the needed data has been collected from the bot.
2781 * wtf/StackBounds.h:
2782 (WTF::StackBounds::checkConsistency const):
2784 2018-10-05 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2786 [JSC][Linux] Support Perf JITDump logging
2787 https://bugs.webkit.org/show_bug.cgi?id=189893
2789 Reviewed by Mark Lam.
2791 * wtf/PageReservation.h:
2792 (WTF::PageReservation::reserveAndCommitWithGuardPages):
2794 2018-10-03 Dan Bernstein <mitz@apple.com>
2796 WTF part of [Xcode] Update some build settings as recommended by Xcode 10
2797 https://bugs.webkit.org/show_bug.cgi?id=190250
2799 Reviewed by Alex Christensen.
2801 * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS,
2802 and CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF.
2804 * WTF.xcodeproj/project.pbxproj: Let Xcode update LastUpgradeCheck.
2807 (WTF::fastLog2): Addressed newly-enabled CLANG_WARN_COMMA by splitting some comma-separated
2808 expressions into individual statements.
2810 2018-10-03 Mark Lam <mark.lam@apple.com>
2812 Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX.
2813 https://bugs.webkit.org/show_bug.cgi?id=190187
2814 <rdar://problem/42512909>
2816 Reviewed by Michael Saboff.
2818 * wtf/text/StringConcatenate.h:
2819 (WTF::tryMakeStringFromAdapters):
2820 (WTF::sumWithOverflow): Deleted.
2821 * wtf/text/StringImpl.h:
2822 * wtf/text/WTFString.h:
2824 2018-10-03 Michael Catanzaro <mcatanzaro@igalia.com>
2826 -Wunused-variable in RenderLayer::updateScrollableAreaSet
2827 https://bugs.webkit.org/show_bug.cgi?id=190200
2829 Reviewed by Yusuke Suzuki.
2831 Add a new UNUSED_VARIABLE() macro. It's the same as UNUSED_PARAM(), just named differently.
2835 2018-10-01 Dean Jackson <dino@apple.com>
2837 [macOS] Switching to discrete GPU should be done in the UI process
2838 https://bugs.webkit.org/show_bug.cgi?id=189361
2839 <rdar://problem/43949622>
2841 Reviewed by Simon Fraser.
2843 Define GL_SILENCE_DEPRECATION to avoid deprecation warnings for OpenGL.
2847 2018-10-02 Commit Queue <commit-queue@webkit.org>
2849 Unreviewed, rolling out r236624 and r236671.
2850 https://bugs.webkit.org/show_bug.cgi?id=190207
2852 The change in r236624 introduced crashes on the bots
2853 (Requested by ryanhaddad on #webkit).
2855 Reverted changesets:
2857 "Refactoring: eliminate raw pointer usage in Fullscreen code"
2858 https://bugs.webkit.org/show_bug.cgi?id=188747
2859 https://trac.webkit.org/changeset/236624
2861 "Unify implementation in VideoFullscreenInterfaceAVKit"
2862 https://bugs.webkit.org/show_bug.cgi?id=190091
2863 https://trac.webkit.org/changeset/236671
2865 2018-10-02 Caio Lima <ticaiolima@gmail.com>
2867 [BigInt] BigInt.proptotype.toString is broken when radix is power of 2
2868 https://bugs.webkit.org/show_bug.cgi?id=190033
2870 Reviewed by Yusuke Suzuki.
2875 2018-10-01 Andy Estes <aestes@apple.com>
2877 [watchOS] Adopt NSURLSessionCompanionProxyPreference
2878 https://bugs.webkit.org/show_bug.cgi?id=190177
2879 <rdar://problem/43402114>
2881 Reviewed by Wenson Hsieh.
2883 * wtf/FeatureDefines.h:
2885 2018-10-01 Koby Boyango <koby.b@mce-sys.com>
2887 [WTF][JSCONLY] Use MainThreadWin on Windows in the JSCOnly port
2888 https://bugs.webkit.org/show_bug.cgi?id=190121
2890 Reviewed by Yusuke Suzuki.
2892 This fixes JSCOnly build on Windows after r236617.
2894 * wtf/PlatformJSCOnly.cmake:
2896 2018-10-01 Commit Queue <commit-queue@webkit.org>
2898 Unreviewed, rolling out r236647.
2899 https://bugs.webkit.org/show_bug.cgi?id=190124
2901 Breaking test stress/big-int-to-string.js (Requested by
2902 caiolima_ on #webkit).
2906 "[BigInt] BigInt.proptotype.toString is broken when radix is
2908 https://bugs.webkit.org/show_bug.cgi?id=190033
2909 https://trac.webkit.org/changeset/236647
2911 2018-09-30 Caio Lima <ticaiolima@gmail.com>
2913 [BigInt] BigInt.proptotype.toString is broken when radix is power of 2
2914 https://bugs.webkit.org/show_bug.cgi?id=190033
2916 Reviewed by Yusuke Suzuki.
2921 2018-09-28 Jer Noble <jer.noble@apple.com>
2923 Refactoring: eliminate raw pointer usage in Fullscreen code
2924 https://bugs.webkit.org/show_bug.cgi?id=188747
2925 <rdar://problem/43541164>
2927 Reviewed by Alex Christensen.
2929 * WTF.xcodeproj/project.pbxproj:
2930 * wtf/WeakPtrContainer.h: Added.
2932 2018-09-28 Yusuke Suzuki <yusukesuzuki@slowstart.org>
2934 [WTF] Make isMainThread more reliable
2935 https://bugs.webkit.org/show_bug.cgi?id=189880
2937 Reviewed by Mark Lam.
2939 isMainThread() relied on Thread::current(). This API becomes broken in Windows
2940 when the Thread is about to be destroyed since TLS is already cleared. This causes
2941 a bug since `isMainThread()` is called in Thread::didExit in Windows.
2943 This patch makes this `isMainThread` more reliable in all the platforms. In Windows,
2944 we use `Thread::currentID()` instead of `Thread::current()` since `Thread::currentID`
2945 uses Win32 GetCurrentThreadId directly. In the other system, we use `pthread_main_np`
2946 or `pthread_self` instead.
2948 We also move `holdLock` code inside `if (shouldRemoveThreadFromThreadGroup())`. If
2949 the other thread takes a mutex and destroyed, this `holdLock` waits forever. This problem
2950 only happens in Windows since Windows calls TLS destructor for the main thread.
2952 * WTF.xcodeproj/project.pbxproj:
2953 * wtf/MainThread.cpp:
2954 (WTF::initializeMainThread):
2956 (WTF::isMainThread): Deleted.
2957 (WTF::isMainThreadIfInitialized): Deleted.
2959 * wtf/PlatformMac.cmake:
2960 * wtf/Threading.cpp:
2961 (WTF::Thread::didExit):
2962 * wtf/cocoa/MainThreadCocoa.mm: Renamed from Source/WTF/wtf/mac/MainThreadMac.mm.
2963 * wtf/generic/MainThreadGeneric.cpp:
2964 (WTF::initializeMainThreadPlatform):
2965 (WTF::isMainThread):
2966 (WTF::isMainThreadIfInitialized):
2967 * wtf/win/MainThreadWin.cpp:
2968 (WTF::initializeMainThreadPlatform):
2969 (WTF::isMainThread):
2970 (WTF::isMainThreadIfInitialized):
2972 2018-09-28 Commit Queue <commit-queue@webkit.org>
2974 Unreviewed, rolling out r236605.
2975 https://bugs.webkit.org/show_bug.cgi?id=190087
2977 caused three API test timeouts (Requested by jernoble on
2982 "Refactoring: eliminate raw pointer usage in Fullscreen code"
2983 https://bugs.webkit.org/show_bug.cgi?id=188747
2984 https://trac.webkit.org/changeset/236605
2986 2018-09-28 Brian Burg <bburg@apple.com>
2988 Replace recently added line comments in Compiler.h
2989 https://bugs.webkit.org/show_bug.cgi?id=190062
2990 <rdar://problem/44838618>
2992 Reviewed by Joseph Pecoraro.
2994 This breaks some Apple-internal tooling. For now, work around it by
2995 changing the comment style. On the other side, the issue will be fixed
2996 more permanently by adopting the approach from r230213.
2998 * wtf/Compiler.h: Use multiline comments.
3000 2018-09-28 Jer Noble <jer.noble@apple.com>
3002 Refactoring: eliminate raw pointer usage in Fullscreen code
3003 https://bugs.webkit.org/show_bug.cgi?id=188747
3004 <rdar://problem/43541164>
3006 Reviewed by Alex Christensen.
3008 * WTF.xcodeproj/project.pbxproj:
3009 * wtf/WeakPtrContainer.h: Added.
3011 2018-09-28 Koby Boyango <koby.b@mce.systems>
3013 [WTF] Add ExternalStringImpl, a StringImpl for user controlled buffers
3014 https://bugs.webkit.org/show_bug.cgi?id=189991
3016 Reviewed by Yusuke Suzuki.
3018 * WTF.xcodeproj/project.pbxproj:
3019 * wtf/CMakeLists.txt:
3020 * wtf/text/ExternalStringImpl.cpp: Added.
3021 * wtf/text/ExternalStringImpl.h: Added.
3022 * wtf/text/StringImpl.cpp:
3023 * wtf/text/StringImpl.h:
3025 2018-09-27 Saam barati <sbarati@apple.com>
3027 Verify the contents of AssemblerBuffer on arm64e
3028 https://bugs.webkit.org/show_bug.cgi?id=190057
3029 <rdar://problem/38916630>
3031 Reviewed by Mark Lam.
3036 2018-09-27 Jer Noble <jer.noble@apple.com>
3038 MediaPlayer should have mediaPlayerWaitingForKeyChanged() / bool waitingForKey() accessor
3039 https://bugs.webkit.org/show_bug.cgi?id=189951
3041 Reviewed by Eric Carlson.
3043 Templated functions should take r-value references, as they have perfect type deduction for
3044 all parameter types; references, l-value references, and r-value references in template function
3045 parameters have special type deduction semantics.
3046 See: <https://en.cppreference.com/w/cpp/language/reference#Forwarding_references>
3048 Previously, const reference parameters would be copied when passed into anyOf(), and containers
3049 of Ref<> would generate compile errors when passed into anyOf, as they cannot be copied. Now,
3050 with r-value reference types in template parameters, a const reference is mapped to a const reference,
3051 a non-const reference is mapped to a non-const reference, and a r-value reference is mapped to
3052 an r-value reference.
3059 2018-09-25 John Wilander <wilander@apple.com>
3061 Change from HAVE(CFNETWORK_STORAGE_PARTITIONING) to ENABLE(RESOURCE_LOAD_STATISTICS)
3062 https://bugs.webkit.org/show_bug.cgi?id=189959
3063 <rdar://problem/44767642>
3065 Reviewed by Chris Dumez.
3068 Enables RESOURCE_LOAD_STATISTICS for Cocoa platforms.
3070 2018-09-24 Fujii Hironori <Hironori.Fujii@sony.com>
3072 Rename WTF_COMPILER_GCC_OR_CLANG to WTF_COMPILER_GCC_COMPATIBLE
3073 https://bugs.webkit.org/show_bug.cgi?id=189733
3075 Reviewed by Michael Catanzaro.
3077 Clang for Windows build enables WTF_COMPILER_CLANG and
3078 WTF_COMPILER_MSVC, but disables WTF_COMPILER_GCC_OR_CLANG. It is
3079 strange WTF_COMPILER_GCC_OR_CLANG is not enabled even though
3080 WTF_COMPILER_CLANG is enabled. However, Clang for Windows imitates
3081 MSVC, and codes for COMPILER(GCC_OR_CLANG) are for non MSVC. At
3082 least at the moment, it is not feasible to define
3083 WTF_COMPILER_GCC_OR_CLANG for Clang for Windows.
3085 To solve the issue, this change renames WTF_COMPILER_GCC_OR_CLANG
3086 to WTF_COMPILER_GCC_COMPATIBLE.
3088 As an exception, I'd like to use IGNORE_WARNINGS_* macros even in
3089 Clang for Windows builds.
3091 * wtf/Assertions.cpp: Replaced COMPILER(GCC_OR_CLANG) with COMPILER(GCC_COMPATIBLE).
3092 * wtf/Assertions.h: Ditto.
3093 * wtf/Atomics.h: Ditto.
3094 * wtf/CheckedArithmetic.h: Ditto.
3095 * wtf/FastMalloc.h: Ditto.
3096 * wtf/MathExtras.h: Ditto.
3097 * wtf/Platform.h: Ditto.
3098 * wtf/StdLibExtras.h: Ditto.
3099 * wtf/Vector.h: Ditto.
3100 * wtf/text/ASCIIFastPath.h: Ditto.
3101 * wtf/Compiler.h: Ditto. Replaced "COMPILER(GCC_OR_CLANG)" with "COMPILER(GCC) || COMPILER(CLANG)" of IGNORE_WARNINGS_* macros.
3103 2018-09-21 Yusuke Suzuki <yusukesuzuki@slowstart.org>
3105 [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
3106 https://bugs.webkit.org/show_bug.cgi?id=189778
3108 Reviewed by Keith Miller.
3110 This patch adds ENABLE(C_LOOP) which indicates we use CLoop as the interpreter.
3111 Previously, we used !ENABLE(JIT) for this configuration. But now, we have
3112 a build configuration that has LLInt ASM interpreter (not CLoop) and !ENABLE(JIT).
3114 We enable LLInt ASM interpreter for non JIT environment in X86_64 and ARM64 architectures.
3115 And we enable ENABLE(ASSEMBLER) for non JIT environment since it offers machine register
3116 information which is used for LLInt and SamplingProfiler.
3120 2018-09-21 Keith Miller <keith_miller@apple.com>
3123 https://bugs.webkit.org/show_bug.cgi?id=189809
3125 Reviewed by Saam Barati.
3127 Fix issue where creating a JSContextRef off the main thread before
3128 creating initializing the main thread would cause an assertion
3131 * wtf/MainThread.cpp:
3132 (WTF::isMainThreadIfInitialized):
3134 * wtf/mac/MainThreadMac.mm:
3135 (WTF::isMainThreadIfInitialized):
3136 * wtf/text/cf/StringImplCF.cpp:
3137 (WTF::StringImpl::createCFString):
3139 2018-09-21 Ryan Haddad <ryanhaddad@apple.com>
3141 Unreviewed, rolling out r236359.
3143 Broke the Windows build.
3148 https://bugs.webkit.org/show_bug.cgi?id=189809
3149 https://trac.webkit.org/changeset/236359
3151 2018-09-21 Keith Miller <keith_miller@apple.com>
3154 https://bugs.webkit.org/show_bug.cgi?id=189809
3156 Reviewed by Saam Barati.
3158 Fix issue where creating a JSContextRef off the main thread before
3159 creating initializing the main thread would cause an assertion
3162 * wtf/MainThread.cpp:
3163 (WTF::isMainThreadIfInitialized):
3165 * wtf/mac/MainThreadMac.mm:
3166 (WTF::isMainThreadIfInitialized):
3167 * wtf/text/cf/StringImplCF.cpp:
3168 (WTF::StringImpl::createCFString):
3170 2018-09-20 Fujii Hironori <Hironori.Fujii@sony.com>
3172 [Win][Clang] UNUSED_PARAM(this) causes compilation error of "cannot take the address of an rvalue of type"
3173 https://bugs.webkit.org/show_bug.cgi?id=189732
3175 Reviewed by Per Arne Vollan.
3177 Clang for Windows can't compile the MSVC workaround of
3178 UNUSED_PARAM which has been introduced for Windows CE and Visual
3179 Studio 10. I think it's safe just to remove it.
3181 * wtf/Compiler.h: Removed the code for COMPILER(MSVC).
3183 2018-09-20 Alex Christensen <achristensen@webkit.org>
3185 Unreviewed, rolling out r235976.
3191 "Use a Variant instead of a union in CSSSelector"
3192 https://bugs.webkit.org/show_bug.cgi?id=188559
3193 https://trac.webkit.org/changeset/235976
3195 2018-09-17 Yusuke Suzuki <utatane.tea@gmail.com>
3197 [WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
3198 https://bugs.webkit.org/show_bug.cgi?id=185339
3200 Reviewed by Mark Lam.
3202 This patch adds WTF::Semaphore, which is based on WTF::Lock and WTF::Condition.
3204 * WTF.xcodeproj/project.pbxproj:
3205 * wtf/CMakeLists.txt:
3206 * wtf/Semaphore.h: Added.
3207 (WTF::Semaphore::Semaphore):
3208 (WTF::Semaphore::signal):
3209 (WTF::Semaphore::waitUntil):
3210 (WTF::Semaphore::waitFor):
3211 (WTF::Semaphore::wait):
3212 * wtf/generic/WorkQueueGeneric.cpp:
3213 (WorkQueue::platformInitialize):
3214 * wtf/threads/BinarySemaphore.cpp:
3215 (WTF::BinarySemaphore::waitUntil):
3216 (WTF::BinarySemaphore::wait): Deleted.
3217 * wtf/threads/BinarySemaphore.h:
3218 (WTF::BinarySemaphore::waitFor):
3219 (WTF::BinarySemaphore::wait):
3220 Align the names of the functions to WTF::Condition.
3221 Add BinarySemaphore::wait(), which is the same to waitUntil(WallTime::infinity()).
3223 2018-09-17 Jer Noble <jer.noble@apple.com>
3225 Add support for HEVC codec types in Media Capabilities
3226 https://bugs.webkit.org/show_bug.cgi?id=189565
3228 Reviewed by Eric Carlson.
3230 Extract the toIntegralType template into its own header.
3232 * wtf/CMakeLists.txt:
3233 * wtf/text/StringConversion.h: Added.
3234 (isCharacterAllowedInBase):
3236 * wtf/text/WTFString.cpp:
3238 2018-09-17 Jer Noble <jer.noble@apple.com>
3240 Enable USE_MEDIAREMOTE on iOS
3241 https://bugs.webkit.org/show_bug.cgi?id=189096
3243 Reviewed by Eric Carlson.
3247 2018-09-17 Frederic Wang <fwang@igalia.com>
3249 Build error in ImageBufferCG when compiled with IOSurfacePool
3250 https://bugs.webkit.org/show_bug.cgi?id=189579
3252 Reviewed by Tim Horton.
3254 IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing
3255 compilation errors when files in the same unified source do not agree on the definition.
3256 This patch moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h
3257 to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files.
3258 Finally some minors changes to explicitly declare/define ImageBuffer are performed in order
3259 to prevent future issues with Unified build rotating.
3261 * wtf/Platform.h: Move definition from ImageBufferDataCG.h.
3263 2018-09-14 Ryan Haddad <ryanhaddad@apple.com>
3265 Unreviewed, rolling out r235990.
3267 Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS
3271 "Enable USE_MEDIAREMOTE on iOS"
3272 https://bugs.webkit.org/show_bug.cgi?id=189096
3273 https://trac.webkit.org/changeset/235990
3275 2018-09-13 Jer Noble <jer.noble@apple.com>
3277 Enable USE_MEDIAREMOTE on iOS
3278 https://bugs.webkit.org/show_bug.cgi?id=189096
3280 Reviewed by Eric Carlson.
3284 2018-09-13 Alex Christensen <achristensen@webkit.org>
3286 Use a Variant instead of a union in CSSSelector
3287 https://bugs.webkit.org/show_bug.cgi?id=188559
3289 Reviewed by Antti Koivisto.
3292 Add packing macros to make it so Variant-containing structures don't always have 7 bytes of padding per Variant.
3294 2018-09-12 Guillaume Emont <guijemont@igalia.com>
3296 Add IGNORE_WARNING_.* macros
3297 https://bugs.webkit.org/show_bug.cgi?id=188996
3299 Reviewed by Michael Catanzaro.
3301 * wtf/Assertions.cpp:
3306 (WTF::MD5::addBytes):
3307 (WTF::MD5::checksum):
3308 * wtf/PrintStream.cpp:
3309 (WTF::PrintStream::printfVariableFormat):
3312 (WTF::SHA1::addBytes):
3313 (WTF::SHA1::computeHash):
3314 * wtf/ThreadingPthreads.cpp:
3316 (WTF::VectorBuffer::endOfBuffer):
3317 * wtf/text/WTFString.cpp:
3318 (WTF::createWithFormatAndArguments):
3320 == Rolled over to ChangeLog-2018-09-11 ==