1 2017-07-11 Dean Jackson <dino@apple.com>
3 Remove NAVIGATOR_HWCONCURRENCY
4 https://bugs.webkit.org/show_bug.cgi?id=174400
6 Reviewed by Sam Weinig.
8 * wtf/FeatureDefines.h:
10 2017-07-11 Dean Jackson <dino@apple.com>
14 * wtf/FeatureDefines.h:
16 2017-07-11 Dean Jackson <dino@apple.com>
18 Remove NAVIGATOR_HWCONCURRENCY
19 https://bugs.webkit.org/show_bug.cgi?id=174400
21 Reviewed by Sam Weinig.
23 * wtf/FeatureDefines.h:
25 2017-07-11 Yusuke Suzuki <utatane.tea@gmail.com>
27 [WTF] Drop unnecessary AtomicString constructor since we have constexpr hash function
28 https://bugs.webkit.org/show_bug.cgi?id=174347
30 Reviewed by Alex Christensen.
32 Previously, we calculate hash value in perl script and generate source code with that value.
33 This AtomicString constructor takes this pre-calculated hash value to efficiently construct
34 itself. But now, we have constexpr hash function, then we do not need to specify hash value
35 directly in this way. Thus we drop this functionality.
37 * wtf/text/AtomicString.h:
38 * wtf/text/AtomicStringImpl.cpp:
39 (WTF::HashAndCharactersTranslator::hash): Deleted.
40 (WTF::HashAndCharactersTranslator::equal): Deleted.
41 (WTF::HashAndCharactersTranslator::translate): Deleted.
42 * wtf/text/AtomicStringImpl.h:
43 (WTF::AtomicStringImpl::add):
45 2017-07-10 Per Arne Vollan <pvollan@apple.com>
47 [Win] Link error when building WTF from WTF.proj project file.
48 https://bugs.webkit.org/show_bug.cgi?id=174316
49 <rdar://problem/33178200>
51 Reviewed by Brent Fulgham.
53 WTF_CPU_X86 cmake variable needs to be set for link libraries directories to be correct.
55 * WTF.vcxproj/WTF.proj:
57 2017-07-03 Brian Burg <bburg@apple.com>
59 Web Replay: remove some unused code
60 https://bugs.webkit.org/show_bug.cgi?id=173903
62 Rubber-stamped by Joseph Pecoraro.
64 * wtf/FeatureDefines.h:
66 2017-07-10 Brady Eidson <beidson@apple.com>
68 Cleanup lifetime issues of UniqueIDBDatabase and IDBBackingStore.
69 <rdar://problem/32908525> and https://bugs.webkit.org/show_bug.cgi?id=174244
71 Reviewed by David Kilzer and Alex Christensen.
73 Add proper "kill" support to CrossThreadQueue, as well as isEmpty() support.
75 * wtf/CrossThreadQueue.h:
76 (WTF::CrossThreadQueue<DataType>::append):
77 (WTF::CrossThreadQueue<DataType>::kill):
78 (WTF::CrossThreadQueue<DataType>::isKilled):
79 (WTF::CrossThreadQueue<DataType>::isEmpty):
80 (WTF::CrossThreadQueue::isKilled): Deleted.
82 2017-07-09 Yusuke Suzuki <utatane.tea@gmail.com>
84 [JSC] Use fastMalloc / fastFree for STL containers
85 https://bugs.webkit.org/show_bug.cgi?id=174297
87 Reviewed by Sam Weinig.
90 (WTF::FastAllocator::FastAllocator):
91 (WTF::FastAllocator::allocate):
92 (WTF::FastAllocator::deallocate):
93 (WTF::FastAllocator::operator==):
94 (WTF::FastAllocator::operator!=):
96 2017-07-07 Brent Fulgham <bfulgham@apple.com>
98 [WK2] Use a rolling 30-day uptime for processing statistics
99 https://bugs.webkit.org/show_bug.cgi?id=174235
100 <rdar://problem/33164381>
102 Reviewed by Chris Dumez.
104 Modify Deque to allow it to be used in a template specialization in KeyedDecoder.
108 2017-07-07 Commit Queue <commit-queue@webkit.org>
110 Unreviewed, rolling out r219238, r219239, and r219241.
111 https://bugs.webkit.org/show_bug.cgi?id=174265
113 "fast/workers/dedicated-worker-lifecycle.html is flaky"
114 (Requested by yusukesuzuki on #webkit).
118 "[WTF] Implement WTF::ThreadGroup"
119 https://bugs.webkit.org/show_bug.cgi?id=174081
120 http://trac.webkit.org/changeset/219238
122 "Unreviewed, build fix after r219238"
123 https://bugs.webkit.org/show_bug.cgi?id=174081
124 http://trac.webkit.org/changeset/219239
126 "Unreviewed, CLoop build fix after r219238"
127 https://bugs.webkit.org/show_bug.cgi?id=174081
128 http://trac.webkit.org/changeset/219241
130 2017-07-07 Yusuke Suzuki <utatane.tea@gmail.com>
132 Unreviewed, Windows build fix after r219233 part 4
133 https://bugs.webkit.org/show_bug.cgi?id=174231
137 2017-07-06 Yusuke Suzuki <utatane.tea@gmail.com>
139 Unreviewed, Windows build fix after r219233 part 3
140 https://bugs.webkit.org/show_bug.cgi?id=174231
143 (compilerFenceForCrash):
145 2017-07-06 Yusuke Suzuki <utatane.tea@gmail.com>
147 Unreviewed, Windows build fix after r219233 part 2
148 https://bugs.webkit.org/show_bug.cgi?id=174231
152 2017-07-06 Yusuke Suzuki <utatane.tea@gmail.com>
154 Unreviewed, Windows build fix after r219233
155 https://bugs.webkit.org/show_bug.cgi?id=174231
159 2017-07-06 Yusuke Suzuki <utatane.tea@gmail.com>
161 Unreviewed, build fix after r219238
162 https://bugs.webkit.org/show_bug.cgi?id=174081
165 (WTF::Thread::addToThreadGroup):
167 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
169 [WTF] Implement WTF::ThreadGroup
170 https://bugs.webkit.org/show_bug.cgi?id=174081
172 Reviewed by Mark Lam.
174 This patch implements WTF::ThreadGroup. It implements core of JSC::MachineThreads with more reliable way.
175 JSC::MachineThreads was complicated because of managing dead threads. Each JSC::MachineThreads has its
176 own TLS with a registered destructor. And everytime a thread dies, the registered TLS destructor is called.
177 And this destructor will remove the current dying thread from JSC::MachineThreads.
179 However the above implementation is tricky. And each JSC::MachineThreads requires own TLS space, which is
180 not considered in WTF's Windows ThreadSpecific implementation. Current design works well since we only
181 have small number of MachineThreads right now.
183 Instead, we use more reliable way. After introducing WTF::Thread, WTF::Thread has WTF::Thread::didExit,
184 which is called when associated TLS (with WTF::Thread) is destroyed. We leverage this mechanism to remove
185 WTF::Thread from MachineThreads.
187 This patch introduces WTF::ThreadGroup. It is tightly integrated with WTF::Thread: WTF::Thread knows
188 ThreadGroups which includes this thread. And WTF::ThreadGroup of course knows WTF::Threads added to it.
189 WTF::Thread::didExit carefully remove itself from WTF::ThreadGroups.
191 The most important part of this patch is locking. WTF::Thread can die. And WTF::ThreadGroup can die.
192 If we take a design using two fine grain locks in WTF::Thread and WTF::ThreadGroup, we easily encounter
193 dead lock. Consider the following case.
195 1. When adding WTF::Thread (TH) to WTF::ThreadGroup (THG), we first hold a lock of THG, and hold a lock of TH (locking order is THG -> TH).
196 2. When TH dies, TH need to hold a lock of TH to iterate THGs. And we hold a lock of THG to unregister TH from it (locking order is TH -> THG).
197 3. When suspending and resuming THs in THG, we first hold a lock of THG. And then, we hold a lock of TH to suspend and resume it (locking order is THG -> TH).
198 4. When destroying THG, we need to hold a lock of TH to unregister THG from TH. We can hold a lock of THG before that (locking order is THG -> TH).
200 Then, it easily causes dead lock. We cannot swap the locking order of (2) since iterating THG requires a lock of TH.
201 To solve this problem, we introduce one global lock ThreadGroup::destructionMutex (GL).
203 1. When adding WTF::Thread (TH) to WTF::ThreadGroup (THG), we first hold GL, and hold a lock of THG. Do not hold a
204 lock of TH. TH's thread groups information is guarded by GL instead of a lock of TH (locking order is GL -> THG).
205 2. When TH dies, TH need to hold GL to iterate THGs. And we hold a lock of THG to unregister TH from it (locking order is GL -> THG).
206 3. When suspending and resuming THs in THG, we first hold a lock of THG. And then, we hold a lock of TH to suspend and resume it (locking order is THG -> TH).
207 4. When destroying THG, we need to hold GL to unregister THG from TH. We can hold a lock of THG after that (locking order is GL -> THG).
209 We still have a lock of THG. By separating GL and THG's lock, we can hold a lock of THG while completely unrelated TH is destructed which takes a lock of GL and unrelated THG.
211 * WTF.xcodeproj/project.pbxproj:
212 * wtf/AutomaticThread.cpp:
213 * wtf/CMakeLists.txt:
214 * wtf/CrossThreadCopier.h:
216 * wtf/ThreadGroup.cpp: Copied from Source/JavaScriptCore/wasm/WasmMachineThreads.cpp.
217 (WTF::ThreadGroup::destructionMutex):
218 (WTF::ThreadGroup::~ThreadGroup):
219 (WTF::ThreadGroup::add):
220 (WTF::ThreadGroup::addCurrentThread):
221 (WTF::ThreadGroup::removeCurrentThread):
222 * wtf/ThreadGroup.h: Copied from Source/JavaScriptCore/wasm/WasmMachineThreads.cpp.
223 (WTF::ThreadGroup::create):
224 (WTF::ThreadGroup::threads):
225 (WTF::ThreadGroup::getLock):
227 (WTF::Thread::didExit):
228 (WTF::Thread::addToThreadGroup):
229 (WTF::Thread::removeFromThreadGroup):
231 (WTF::Thread::canAddToThreadGroup):
233 2017-07-06 Yusuke Suzuki <utatane.tea@gmail.com>
235 [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
236 https://bugs.webkit.org/show_bug.cgi?id=174150
238 Reviewed by Mark Lam.
240 This patch cleans up StringStatics.cpp and remove it from the tree.
242 1. Move StringImpl methods to appropriate place, "StringImpl.cpp".
244 StringImpl::hashSlowCase() and StringImpl::concurrentHash() are defined in
245 StringStatics.cpp. But they should be defined in StringImpl.cpp.
246 This patch just moves them to StringImpl.cpp.
248 2. Use LazyNeverDestroyed to initialize AtomicString atoms like emptyAtom.
250 Previously, we initialized AtomicString atoms like emptyAtom in a hacky way.
251 We first define them as extern global variables. However, AtomicString has
252 a non-trivial constructor. Thus, we cannot do this because it requires global
253 constructor calls. This is why we have StringStatics.cpp. In this file, we
254 include "StaticConstructors.h". After including this file, all the global
255 constructor call disabled in Windows. And in GCC environment, we allocate
256 void* storage for that variable. And we use placement new in AtomicString::init()
257 to initialize these storage.
258 However, we already have better way for that: LazyNeverDestroyed. It just allocates
259 storage like the above. And it does not have any global constructors. Thus
260 we can just declare it as a global variable. And we initialize them lazily in
261 AtomicString::init(). This way effectively avoids "StaticConstructors.h" hacky way.
262 And it makes "StringStatics.cpp" unnecessary.
263 Then, we just move these variables and AtomicString::init() to AtomicString.cpp.
265 And we also change emptyAtom to emptyAtom() to get the value from LazyNeverDestroyed<>.
267 * WTF.xcodeproj/project.pbxproj:
268 * wtf/CMakeLists.txt:
269 * wtf/text/AtomicString.cpp:
270 (WTF::AtomicString::convertASCIICase):
271 (WTF::AtomicString::fromUTF8Internal):
272 (WTF::AtomicString::init):
273 * wtf/text/AtomicString.h:
279 (WTF::AtomicString::fromUTF8):
280 * wtf/text/StringBuilder.h:
281 (WTF::StringBuilder::toAtomicString):
282 * wtf/text/StringImpl.cpp:
283 (WTF::StringImpl::hashSlowCase):
284 (WTF::StringImpl::concurrentHash):
285 * wtf/text/StringStatics.cpp: Removed.
287 2017-07-06 Keith Miller <keith_miller@apple.com>
289 Add extra insurance to prevent clang from making crash traces sad
290 https://bugs.webkit.org/show_bug.cgi?id=174231
292 Reviewed by Saam Barati.
294 This patch makes it slightly harder for Clang to coalesce our crash calls.
295 Additionally, it also makes Clang never tail call the WTFCrashWithInfo so
296 our stack trace should always be "reasonable".
301 2017-07-06 Matt Lewis <jlewis3@apple.com>
303 Unreviewed, rolling out r219178.
305 This caused a consistent failure with the API test
306 StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers.
310 "[WTF] Clean up StringStatics.cpp by using
311 LazyNeverDestroyed<> for Atoms"
312 https://bugs.webkit.org/show_bug.cgi?id=174150
313 http://trac.webkit.org/changeset/219178
315 2017-07-05 Don Olmstead <don.olmstead@sony.com>
317 [WTF] Move SoftLinking.h into WTF
318 https://bugs.webkit.org/show_bug.cgi?id=174000
320 Reviewed by Alex Christensen.
322 * WTF.xcodeproj/project.pbxproj:
323 * wtf/SoftLinking.h: Copied from Source/WebCore/platform/ios/QuickLookSoftLink.mm.
324 * wtf/cocoa/SoftLinking.h: Renamed from Source/WebCore/platform/cocoa/SoftLinking.h.
325 * wtf/win/SoftLinking.h: Renamed from Source/WebCore/platform/win/SoftLinking.h.
327 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
330 https://bugs.webkit.org/show_bug.cgi?id=174155
332 Reviewed by Michael Catanzaro.
336 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
338 WTF::StringImpl::copyChars segfaults when built with GCC 7
339 https://bugs.webkit.org/show_bug.cgi?id=173407
341 Reviewed by Andreas Kling.
343 With GCC 7, StringImpl::copyChars() behaves as unexpected.
344 This function violates strict aliasing rule.
346 This optimization is originally introduced to improve performance
347 in SunSpider's string tests in 2008. When running it in my Linux
348 box, it no longer causes any observable difference. So, we just
349 remove this optimization.
353 string-base64 7.7544+-0.1761 7.6138+-0.2071 might be 1.0185x faster
354 string-fasta 10.5429+-0.2746 ? 10.7500+-0.2669 ? might be 1.0196x slower
355 string-tagcloud 14.8588+-0.2828 14.8039+-0.3039
356 string-unpack-code 36.1769+-0.4251 35.3397+-0.5398 might be 1.0237x faster
357 string-validate-input 8.5182+-0.2206 8.3514+-0.2179 might be 1.0200x faster
359 * wtf/text/StringImpl.h:
360 (WTF::StringImpl::copyChars):
362 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
364 Use std::lock_guard instead of std::unique_lock if move semantics and try_lock is not necessary
365 https://bugs.webkit.org/show_bug.cgi?id=174148
367 Reviewed by Mark Lam.
369 It is not necessary to use std::unique_lock if we do not use additional features compared to std::lock_guard.
371 (WTF::ThreadHolder::get):
372 (WTF::ThreadHolder::initialize):
373 (WTF::ThreadHolder::destruct):
375 (WTF::Thread::didExit):
376 * wtf/ThreadingPthreads.cpp:
377 (WTF::Thread::changePriority):
378 (WTF::Thread::waitForCompletion):
379 (WTF::Thread::detach):
380 (WTF::Thread::signal):
381 (WTF::Thread::resume):
382 (WTF::Thread::getRegisters):
383 (WTF::Thread::establish):
384 * wtf/ThreadingWin.cpp:
385 (WTF::Thread::changePriority):
386 (WTF::Thread::waitForCompletion):
387 (WTF::Thread::detach):
388 (WTF::Thread::resume):
389 (WTF::Thread::getRegisters):
390 (WTF::Thread::establish):
392 (WTF::WordLockBase::unlockSlow):
394 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
396 [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
397 https://bugs.webkit.org/show_bug.cgi?id=174150
399 Reviewed by Mark Lam.
401 This patch cleans up StringStatics.cpp and remove it from the tree.
403 1. Move StringImpl methods to appropriate place, "StringImpl.cpp".
405 StringImpl::hashSlowCase() and StringImpl::concurrentHash() are defined in
406 StringStatics.cpp. But they should be defined in StringImpl.cpp.
407 This patch just moves them to StringImpl.cpp.
409 2. Use LazyNeverDestroyed to initialize AtomicString atoms like emptyAtom.
411 Previously, we initialized AtomicString atoms like emptyAtom in a hacky way.
412 We first define them as extern global variables. However, AtomicString has
413 a non-trivial constructor. Thus, we cannot do this because it requires global
414 constructor calls. This is why we have StringStatics.cpp. In this file, we
415 include "StaticConstructors.h". After including this file, all the global
416 constructor call disabled in Windows. And in GCC environment, we allocate
417 void* storage for that variable. And we use placement new in AtomicString::init()
418 to initialize these storage.
419 However, we already have better way for that: LazyNeverDestroyed. It just allocates
420 storage like the above. And it does not have any global constructors. Thus
421 we can just declare it as a global variable. And we initialize them lazily in
422 AtomicString::init(). This way effectively avoids "StaticConstructors.h" hacky way.
423 And it makes "StringStatics.cpp" unnecessary.
424 Then, we just move these variables and AtomicString::init() to AtomicString.cpp.
426 And we also change emptyAtom to emptyAtom() to get the value from LazyNeverDestroyed<>.
428 * WTF.xcodeproj/project.pbxproj:
429 * wtf/CMakeLists.txt:
430 * wtf/text/AtomicString.cpp:
431 (WTF::AtomicString::convertASCIICase):
432 (WTF::AtomicString::fromUTF8Internal):
433 (WTF::AtomicString::init):
434 * wtf/text/AtomicString.h:
440 (WTF::AtomicString::fromUTF8):
441 * wtf/text/StringBuilder.h:
442 (WTF::StringBuilder::toAtomicString):
443 * wtf/text/StringImpl.cpp:
444 (WTF::StringImpl::hashSlowCase):
445 (WTF::StringImpl::concurrentHash):
446 * wtf/text/StringStatics.cpp: Removed.
448 2017-07-05 Yusuke Suzuki <utatane.tea@gmail.com>
450 WTF::Thread should have the threads stack bounds.
451 https://bugs.webkit.org/show_bug.cgi?id=173975
453 Reviewed by Keith Miller.
455 We move StackBounds from WTFThreadData to WTF::Thread.
456 One important thing is that we should make valid StackBounds
457 visible to Thread::create() caller. When the caller get
458 WTF::Thread from Thread::create(), this WTF::Thread should
459 have a valid StackBounds. But StackBounds information can be
460 retrived only in the WTF::Thread's thread itself.
462 We also clean up WTF::initializeThreading. StringImpl::empty()
463 is now statically initialized by using constexpr constructor.
464 Thus we do not need to call StringImpl::empty() explicitly here.
465 And WTF::initializeThreading() does not have any main thread
466 affinity right now in all the platforms. So we fix the comment
467 in Threading.h. Then, now, WTF::initializeThreading() is called
468 in UI thread when using Web thread in iOS.
471 (WTF::StackBounds::emptyBounds):
472 (WTF::StackBounds::StackBounds):
473 * wtf/StackStats.cpp:
474 (WTF::StackStats::PerThreadStats::PerThreadStats):
476 (WTF::threadEntryPoint):
477 (WTF::Thread::create):
478 (WTF::Thread::currentMayBeNull):
479 (WTF::Thread::initialize):
480 (WTF::initializeThreading):
482 (WTF::Thread::stack):
483 * wtf/ThreadingPthreads.cpp:
484 (WTF::Thread::initializeCurrentThreadEvenIfNonWTFCreated):
485 (WTF::Thread::current):
486 (WTF::initializeCurrentThreadEvenIfNonWTFCreated): Deleted.
487 (WTF::Thread::currentMayBeNull): Deleted.
488 * wtf/ThreadingWin.cpp:
489 (WTF::Thread::initializeCurrentThreadEvenIfNonWTFCreated):
490 (WTF::Thread::initializeCurrentThreadInternal):
491 (WTF::Thread::current):
492 * wtf/WTFThreadData.cpp:
493 (WTF::WTFThreadData::WTFThreadData):
494 * wtf/WTFThreadData.h:
495 (WTF::WTFThreadData::stack): Deleted.
497 2017-07-05 Keith Miller <keith_miller@apple.com>
499 Crashing with information should have an abort reason
500 https://bugs.webkit.org/show_bug.cgi?id=174185
502 Reviewed by Saam Barati.
504 Fix an ifdef to actually work with X86_64. It turns out X64_64 is
505 not an architecture... Whoops.
507 * wtf/Assertions.cpp:
509 2017-07-03 Myles C. Maxfield <mmaxfield@apple.com>
511 Remove copy of ICU headers from WebKit
512 https://bugs.webkit.org/show_bug.cgi?id=116407
514 Reviewed by Alex Christensen.
516 Add an extra rsync command to CopyWTFHeaders which copies the ICU headers
517 to DSTROOT/usr/local/include/. These headers already live inside a
518 "unicode" folder, so an example path of a header is
519 DSTROOT/usr/local/include/unicode/uchar.h. This is already in the search
520 path of the other WebKit projects, so those other projects can remove
521 their explicit listing of the old place these headers lived.
523 Also add the remaining ICU 55.1 headers which the other projects (like
524 WebCore) need. Revert any local changes to these headers in favor of
525 using the GCC_PREPROCESSOR_DEFINITIONS build setting. This is so we can
526 compile the same way against unmodified headers.
528 * Configurations/Base.xcconfig:
529 * Configurations/CopyWTFHeaders.xcconfig:
530 * WTF.xcodeproj/project.pbxproj:
531 * icu/unicode/alphaindex.h: Added.
532 * icu/unicode/appendable.h: Added.
533 * icu/unicode/basictz.h: Added.
534 * icu/unicode/brkiter.h: Added.
535 (BreakIterator::isBufferClone):
536 * icu/unicode/bytestrie.h: Added.
537 * icu/unicode/bytestriebuilder.h: Added.
538 * icu/unicode/calendar.h: Added.
539 (Calendar::createInstance):
541 (Calendar::internalSet):
542 (Calendar::weekNumber):
543 * icu/unicode/caniter.h: Added.
544 * icu/unicode/chariter.h: Renamed from Source/WebCore/icu/unicode/chariter.h.
545 * icu/unicode/choicfmt.h: Added.
546 * icu/unicode/coleitr.h: Added.
547 (CollationElementIterator::primaryOrder):
548 (CollationElementIterator::secondaryOrder):
549 (CollationElementIterator::tertiaryOrder):
550 (CollationElementIterator::isIgnorable):
551 * icu/unicode/coll.h: Added.
552 * icu/unicode/compactdecimalformat.h: Added.
553 * icu/unicode/curramt.h: Added.
554 (CurrencyAmount::getCurrency):
555 (CurrencyAmount::getISOCurrency):
556 * icu/unicode/currpinf.h: Added.
557 (CurrencyPluralInfo::operator!=):
558 * icu/unicode/currunit.h: Added.
559 (CurrencyUnit::getISOCurrency):
560 * icu/unicode/datefmt.h: Added.
561 * icu/unicode/dbbi.h: Added.
562 * icu/unicode/dcfmtsym.h: Added.
563 (DecimalFormatSymbols::getSymbol):
564 (DecimalFormatSymbols::getConstSymbol):
565 (DecimalFormatSymbols::setSymbol):
566 (DecimalFormatSymbols::getLocale):
567 (DecimalFormatSymbols::getCurrencyPattern):
568 * icu/unicode/decimfmt.h: Added.
569 (DecimalFormat::getConstSymbol):
570 * icu/unicode/docmain.h: Added.
571 * icu/unicode/dtfmtsym.h: Added.
572 * icu/unicode/dtintrv.h: Added.
573 (DateInterval::getFromDate):
574 (DateInterval::getToDate):
575 (DateInterval::operator!=):
576 * icu/unicode/dtitvfmt.h: Added.
577 (DateIntervalFormat::operator!=):
578 * icu/unicode/dtitvinf.h: Added.
579 (DateIntervalInfo::operator!=):
580 * icu/unicode/dtptngen.h: Added.
581 * icu/unicode/dtrule.h: Added.
582 * icu/unicode/enumset.h: Added.
591 (EnumSet::isValidEnum):
592 (EnumSet::isValidValue):
593 (EnumSet::operator=):
596 * icu/unicode/errorcode.h: Added.
597 * icu/unicode/fieldpos.h: Added.
598 (FieldPosition::operator=):
599 (FieldPosition::operator==):
600 (FieldPosition::operator!=):
601 * icu/unicode/filteredbrk.h: Added.
602 * icu/unicode/fmtable.h: Added.
603 (Formattable::getDate):
604 (Formattable::getString):
605 (Formattable::getLong):
606 (Formattable::toUFormattable):
607 (Formattable::fromUFormattable):
608 * icu/unicode/format.h: Added.
609 * icu/unicode/fpositer.h: Added.
610 * icu/unicode/gender.h: Added.
611 * icu/unicode/gregocal.h: Added.
612 * icu/unicode/icudataver.h: Added.
613 * icu/unicode/icuplug.h: Added.
614 * icu/unicode/idna.h: Added.
615 * icu/unicode/listformatter.h: Added.
616 (ListFormatData::ListFormatData):
617 * icu/unicode/locdspnm.h: Added.
618 (LocaleDisplayNames::createInstance):
619 * icu/unicode/locid.h: Added.
620 (Locale::operator!=):
621 (Locale::getCountry):
622 (Locale::getLanguage):
624 (Locale::getVariant):
627 * icu/unicode/measfmt.h: Added.
628 * icu/unicode/measunit.h: Added.
629 * icu/unicode/measure.h: Added.
630 (Measure::getNumber):
632 * icu/unicode/messagepattern.h: Added.
633 * icu/unicode/msgfmt.h: Added.
634 * icu/unicode/normalizer2.h: Added.
635 * icu/unicode/normlzr.h: Added.
636 (Normalizer::operator!= ):
637 (Normalizer::quickCheck):
638 (Normalizer::isNormalized):
639 (Normalizer::compare):
640 * icu/unicode/numfmt.h: Added.
641 (NumberFormat::isParseIntegerOnly):
642 (NumberFormat::isLenient):
643 * icu/unicode/numsys.h: Added.
644 * icu/unicode/parsepos.h: Added.
645 (ParsePosition::operator=):
646 (ParsePosition::operator==):
647 (ParsePosition::operator!=):
648 (ParsePosition::getIndex):
649 (ParsePosition::setIndex):
650 (ParsePosition::getErrorIndex):
651 (ParsePosition::setErrorIndex):
652 * icu/unicode/plurfmt.h: Added.
653 * icu/unicode/plurrule.h: Added.
654 * icu/unicode/rbbi.h: Added.
655 (RuleBasedBreakIterator::operator!=):
656 * icu/unicode/rbnf.h: Added.
657 (RuleBasedNumberFormat::isLenient):
658 (RuleBasedNumberFormat::getDefaultRuleSet):
659 * icu/unicode/rbtz.h: Added.
660 * icu/unicode/regex.h: Added.
661 * icu/unicode/region.h: Added.
662 * icu/unicode/reldatefmt.h: Added.
663 * icu/unicode/resbund.h: Added.
664 * icu/unicode/schriter.h: Added.
665 * icu/unicode/scientificnumberformatter.h: Added.
666 * icu/unicode/search.h: Added.
667 (SearchIterator::operator!=):
668 * icu/unicode/selfmt.h: Added.
669 * icu/unicode/simpletz.h: Added.
670 (SimpleTimeZone::setStartRule):
671 (SimpleTimeZone::setEndRule):
672 (SimpleTimeZone::getOffset):
673 * icu/unicode/smpdtfmt.h: Added.
674 (SimpleDateFormat::get2DigitYearStart):
675 * icu/unicode/sortkey.h: Added.
676 (CollationKey::operator!=):
677 (CollationKey::isBogus):
678 (CollationKey::getByteArray):
679 * icu/unicode/stringtriebuilder.h: Added.
680 * icu/unicode/stsearch.h: Added.
681 * icu/unicode/symtable.h: Added.
682 * icu/unicode/tblcoll.h: Added.
683 * icu/unicode/timezone.h: Added.
686 * icu/unicode/tmunit.h: Added.
687 * icu/unicode/tmutamt.h: Added.
688 (TimeUnitAmount::operator!=):
689 * icu/unicode/tmutfmt.h: Added.
690 (TimeUnitFormat::operator!=):
691 * icu/unicode/translit.h: Added.
692 (Transliterator::getMaximumContextLength):
693 (Transliterator::setID):
694 (Transliterator::integerToken):
695 (Transliterator::pointerToken):
696 * icu/unicode/tzfmt.h: Added.
697 * icu/unicode/tznames.h: Added.
698 * icu/unicode/tzrule.h: Added.
699 * icu/unicode/tztrans.h: Added.
700 * icu/unicode/ubidi.h: Added.
701 * icu/unicode/ucal.h: Renamed from Source/JavaScriptCore/icu/unicode/ucal.h.
702 * icu/unicode/ucasemap.h: Added.
703 * icu/unicode/ucat.h: Added.
704 * icu/unicode/ucharstrie.h: Added.
705 * icu/unicode/ucharstriebuilder.h: Added.
706 * icu/unicode/uchriter.h: Added.
707 * icu/unicode/uclean.h: Added.
708 * icu/unicode/ucnv_cb.h: Renamed from Source/WebCore/icu/unicode/ucnv_cb.h.
709 * icu/unicode/ucnvsel.h: Added.
710 * icu/unicode/ucoleitr.h: Renamed from Source/WebCore/icu/unicode/ucoleitr.h.
711 * icu/unicode/uconfig.h:
712 * icu/unicode/ucsdet.h: Renamed from Source/WebCore/icu/unicode/ucsdet.h.
713 * icu/unicode/udat.h: Renamed from Source/JavaScriptCore/icu/unicode/udat.h.
714 * icu/unicode/udata.h: Added.
715 * icu/unicode/udateintervalformat.h: Added.
716 * icu/unicode/udatpg.h: Renamed from Source/JavaScriptCore/icu/unicode/udatpg.h.
717 * icu/unicode/udisplaycontext.h: Renamed from Source/JavaScriptCore/icu/unicode/udisplaycontext.h.
718 * icu/unicode/ufieldpositer.h: Renamed from Source/JavaScriptCore/icu/unicode/ufieldpositer.h.
719 * icu/unicode/uformattable.h: Renamed from Source/JavaScriptCore/icu/unicode/uformattable.h.
720 * icu/unicode/ugender.h: Added.
721 * icu/unicode/uidna.h: Renamed from Source/WebCore/icu/unicode/uidna.h.
722 * icu/unicode/uldnames.h: Added.
723 * icu/unicode/ulistformatter.h: Added.
724 * icu/unicode/ulocdata.h: Added.
725 * icu/unicode/umisc.h: Renamed from Source/JavaScriptCore/icu/unicode/umisc.h.
726 * icu/unicode/umsg.h: Added.
727 * icu/unicode/unifilt.h: Added.
728 * icu/unicode/unifunct.h: Added.
729 * icu/unicode/unimatch.h: Added.
730 * icu/unicode/unirepl.h: Added.
731 * icu/unicode/uniset.h: Added.
732 (UnicodeSet::operator!=):
733 (UnicodeSet::isFrozen):
734 (UnicodeSet::containsSome):
735 (UnicodeSet::isBogus):
736 (UnicodeSet::fromUSet):
737 (UnicodeSet::toUSet):
739 (UnicodeSet::spanBack):
740 * icu/unicode/unum.h: Renamed from Source/JavaScriptCore/icu/unicode/unum.h.
741 * icu/unicode/unumsys.h: Renamed from Source/JavaScriptCore/icu/unicode/unumsys.h.
742 * icu/unicode/upluralrules.h: Added.
743 * icu/unicode/uregex.h: Added.
744 * icu/unicode/uregion.h: Added.
745 * icu/unicode/urep.h: Added.
746 * icu/unicode/ures.h: Added.
747 (ures_getUnicodeString):
748 (ures_getNextUnicodeString):
749 (ures_getUnicodeStringByIndex):
750 (ures_getUnicodeStringByKey):
751 * icu/unicode/usearch.h: Renamed from Source/WebCore/icu/unicode/usearch.h.
752 * icu/unicode/usetiter.h: Added.
753 (UnicodeSetIterator::isString):
754 (UnicodeSetIterator::getCodepoint):
755 (UnicodeSetIterator::getCodepointEnd):
756 * icu/unicode/ushape.h: Renamed from Source/WebCore/icu/unicode/ushape.h.
757 * icu/unicode/uspoof.h: Added.
758 * icu/unicode/usprep.h: Added.
759 * icu/unicode/ustdio.h: Added.
760 * icu/unicode/ustream.h: Added.
761 * icu/unicode/ustringtrie.h: Added.
762 * icu/unicode/utf32.h: Added.
763 * icu/unicode/utmscale.h: Added.
764 * icu/unicode/utrace.h: Added.
765 * icu/unicode/utrans.h: Added.
766 * icu/unicode/utypes.h:
767 * icu/unicode/vtzone.h: Added.
769 2017-07-04 Yusuke Suzuki <utatane.tea@gmail.com>
771 [WTF] Make double-conversion's cache data constant and drop double_conversion::initialize()
772 https://bugs.webkit.org/show_bug.cgi?id=174124
774 Reviewed by Saam Barati.
776 We annotate double-conversion's cache data as const and constexpr. And move it out of function.
777 Since they are not involving global constructors, they are compiled as rodata and initialized
778 without calling double_conversion::initialize().
780 And we drop double_conversion::initialize() function since it is no longer necessary.
783 (WTF::initializeThreading):
784 * wtf/dtoa/cached-powers.cc:
785 * wtf/dtoa/cached-powers.h:
787 2017-07-04 Yusuke Suzuki <utatane.tea@gmail.com>
789 [WTF] Initialize srandom and srand with cryptographically random number
790 https://bugs.webkit.org/show_bug.cgi?id=174123
792 Reviewed by Mark Lam.
794 Use cryptographically random number instead of current time as a seed.
796 * wtf/RandomNumberSeed.h:
797 (WTF::initializeRandomNumberGenerator):
799 2017-07-04 Joseph Pecoraro <pecoraro@apple.com>
801 Xcode duplicate UUID for DisallowCType.h and DispatchPtr.h
802 https://bugs.webkit.org/show_bug.cgi?id=174117
804 Reviewed by Alexey Proskuryakov.
806 * WTF.xcodeproj/project.pbxproj:
807 Give DisallowCType.h and DispatchPtr.h different UUIDs.
809 2017-07-03 Saam Barati <sbarati@apple.com>
811 LayoutTest workers/bomb.html is a Crash
812 https://bugs.webkit.org/show_bug.cgi?id=167757
813 <rdar://problem/33086462>
815 Reviewed by Keith Miller.
817 * wtf/AutomaticThread.cpp:
818 (WTF::AutomaticThreadCondition::waitFor):
819 * wtf/AutomaticThread.h:
821 2017-07-03 Commit Queue <commit-queue@webkit.org>
823 Unreviewed, rolling out r219060.
824 https://bugs.webkit.org/show_bug.cgi?id=174108
826 crashing constantly when initializing UIWebView (Requested by
831 "WTF::Thread should have the threads stack bounds."
832 https://bugs.webkit.org/show_bug.cgi?id=173975
833 http://trac.webkit.org/changeset/219060
835 2017-07-03 Matt Lewis <jlewis3@apple.com>
837 Unreviewed, rolling out r219103.
839 Caused multiple build failures.
843 "Remove copy of ICU headers from WebKit"
844 https://bugs.webkit.org/show_bug.cgi?id=116407
845 http://trac.webkit.org/changeset/219103
847 2017-07-03 Myles C. Maxfield <mmaxfield@apple.com>
849 Remove copy of ICU headers from WebKit
850 https://bugs.webkit.org/show_bug.cgi?id=116407
852 Reviewed by Alex Christensen.
854 Add an extra rsync command to CopyWTFHeaders which copies the ICU headers
855 to DSTROOT/usr/local/include/. These headers already live inside a
856 "unicode" folder, so an example path of a header is
857 DSTROOT/usr/local/include/unicode/uchar.h. This is already in the search
858 path of the other WebKit projects, so those other projects can remove
859 their explicit listing of the old place these headers lived.
861 Also add the remaining ICU 55.1 headers which the other projects (like
862 WebCore) need. Revert any local changes to these headers in favor of
863 using the GCC_PREPROCESSOR_DEFINITIONS build setting. This is so we can
864 compile the same way against unmodified headers.
866 * Configurations/Base.xcconfig:
867 * Configurations/CopyWTFHeaders.xcconfig:
868 * WTF.xcodeproj/project.pbxproj:
869 * icu/unicode/alphaindex.h: Added.
870 * icu/unicode/appendable.h: Added.
871 * icu/unicode/basictz.h: Added.
872 * icu/unicode/brkiter.h: Added.
873 (BreakIterator::isBufferClone):
874 * icu/unicode/bytestrie.h: Added.
875 * icu/unicode/bytestriebuilder.h: Added.
876 * icu/unicode/calendar.h: Added.
877 (Calendar::createInstance):
879 (Calendar::internalSet):
880 (Calendar::weekNumber):
881 * icu/unicode/caniter.h: Added.
882 * icu/unicode/chariter.h: Renamed from Source/WebCore/icu/unicode/chariter.h.
883 * icu/unicode/choicfmt.h: Added.
884 * icu/unicode/coleitr.h: Added.
885 (CollationElementIterator::primaryOrder):
886 (CollationElementIterator::secondaryOrder):
887 (CollationElementIterator::tertiaryOrder):
888 (CollationElementIterator::isIgnorable):
889 * icu/unicode/coll.h: Added.
890 * icu/unicode/compactdecimalformat.h: Added.
891 * icu/unicode/curramt.h: Added.
892 (CurrencyAmount::getCurrency):
893 (CurrencyAmount::getISOCurrency):
894 * icu/unicode/currpinf.h: Added.
895 (CurrencyPluralInfo::operator!=):
896 * icu/unicode/currunit.h: Added.
897 (CurrencyUnit::getISOCurrency):
898 * icu/unicode/datefmt.h: Added.
899 * icu/unicode/dbbi.h: Added.
900 * icu/unicode/dcfmtsym.h: Added.
901 (DecimalFormatSymbols::getSymbol):
902 (DecimalFormatSymbols::getConstSymbol):
903 (DecimalFormatSymbols::setSymbol):
904 (DecimalFormatSymbols::getLocale):
905 (DecimalFormatSymbols::getCurrencyPattern):
906 * icu/unicode/decimfmt.h: Added.
907 (DecimalFormat::getConstSymbol):
908 * icu/unicode/docmain.h: Added.
909 * icu/unicode/dtfmtsym.h: Added.
910 * icu/unicode/dtintrv.h: Added.
911 (DateInterval::getFromDate):
912 (DateInterval::getToDate):
913 (DateInterval::operator!=):
914 * icu/unicode/dtitvfmt.h: Added.
915 (DateIntervalFormat::operator!=):
916 * icu/unicode/dtitvinf.h: Added.
917 (DateIntervalInfo::operator!=):
918 * icu/unicode/dtptngen.h: Added.
919 * icu/unicode/dtrule.h: Added.
920 * icu/unicode/enumset.h: Added.
929 (EnumSet::isValidEnum):
930 (EnumSet::isValidValue):
931 (EnumSet::operator=):
934 * icu/unicode/errorcode.h: Added.
935 * icu/unicode/fieldpos.h: Added.
936 (FieldPosition::operator=):
937 (FieldPosition::operator==):
938 (FieldPosition::operator!=):
939 * icu/unicode/filteredbrk.h: Added.
940 * icu/unicode/fmtable.h: Added.
941 (Formattable::getDate):
942 (Formattable::getString):
943 (Formattable::getLong):
944 (Formattable::toUFormattable):
945 (Formattable::fromUFormattable):
946 * icu/unicode/format.h: Added.
947 * icu/unicode/fpositer.h: Added.
948 * icu/unicode/gender.h: Added.
949 * icu/unicode/gregocal.h: Added.
950 * icu/unicode/icudataver.h: Added.
951 * icu/unicode/icuplug.h: Added.
952 * icu/unicode/idna.h: Added.
953 * icu/unicode/listformatter.h: Added.
954 (ListFormatData::ListFormatData):
955 * icu/unicode/locdspnm.h: Added.
956 (LocaleDisplayNames::createInstance):
957 * icu/unicode/locid.h: Added.
958 (Locale::operator!=):
959 (Locale::getCountry):
960 (Locale::getLanguage):
962 (Locale::getVariant):
965 * icu/unicode/measfmt.h: Added.
966 * icu/unicode/measunit.h: Added.
967 * icu/unicode/measure.h: Added.
968 (Measure::getNumber):
970 * icu/unicode/messagepattern.h: Added.
971 * icu/unicode/msgfmt.h: Added.
972 * icu/unicode/normalizer2.h: Added.
973 * icu/unicode/normlzr.h: Added.
974 (Normalizer::operator!= ):
975 (Normalizer::quickCheck):
976 (Normalizer::isNormalized):
977 (Normalizer::compare):
978 * icu/unicode/numfmt.h: Added.
979 (NumberFormat::isParseIntegerOnly):
980 (NumberFormat::isLenient):
981 * icu/unicode/numsys.h: Added.
982 * icu/unicode/parsepos.h: Added.
983 (ParsePosition::operator=):
984 (ParsePosition::operator==):
985 (ParsePosition::operator!=):
986 (ParsePosition::getIndex):
987 (ParsePosition::setIndex):
988 (ParsePosition::getErrorIndex):
989 (ParsePosition::setErrorIndex):
990 * icu/unicode/plurfmt.h: Added.
991 * icu/unicode/plurrule.h: Added.
992 * icu/unicode/rbbi.h: Added.
993 (RuleBasedBreakIterator::operator!=):
994 * icu/unicode/rbnf.h: Added.
995 (RuleBasedNumberFormat::isLenient):
996 (RuleBasedNumberFormat::getDefaultRuleSet):
997 * icu/unicode/rbtz.h: Added.
998 * icu/unicode/regex.h: Added.
999 * icu/unicode/region.h: Added.
1000 * icu/unicode/reldatefmt.h: Added.
1001 * icu/unicode/resbund.h: Added.
1002 * icu/unicode/schriter.h: Added.
1003 * icu/unicode/scientificnumberformatter.h: Added.
1004 * icu/unicode/search.h: Added.
1005 (SearchIterator::operator!=):
1006 * icu/unicode/selfmt.h: Added.
1007 * icu/unicode/simpletz.h: Added.
1008 (SimpleTimeZone::setStartRule):
1009 (SimpleTimeZone::setEndRule):
1010 (SimpleTimeZone::getOffset):
1011 * icu/unicode/smpdtfmt.h: Added.
1012 (SimpleDateFormat::get2DigitYearStart):
1013 * icu/unicode/sortkey.h: Added.
1014 (CollationKey::operator!=):
1015 (CollationKey::isBogus):
1016 (CollationKey::getByteArray):
1017 * icu/unicode/stringtriebuilder.h: Added.
1018 * icu/unicode/stsearch.h: Added.
1019 * icu/unicode/symtable.h: Added.
1020 * icu/unicode/tblcoll.h: Added.
1021 * icu/unicode/timezone.h: Added.
1024 * icu/unicode/tmunit.h: Added.
1025 * icu/unicode/tmutamt.h: Added.
1026 (TimeUnitAmount::operator!=):
1027 * icu/unicode/tmutfmt.h: Added.
1028 (TimeUnitFormat::operator!=):
1029 * icu/unicode/translit.h: Added.
1030 (Transliterator::getMaximumContextLength):
1031 (Transliterator::setID):
1032 (Transliterator::integerToken):
1033 (Transliterator::pointerToken):
1034 * icu/unicode/tzfmt.h: Added.
1035 * icu/unicode/tznames.h: Added.
1036 * icu/unicode/tzrule.h: Added.
1037 * icu/unicode/tztrans.h: Added.
1038 * icu/unicode/ubidi.h: Added.
1039 * icu/unicode/ucal.h: Renamed from Source/JavaScriptCore/icu/unicode/ucal.h.
1040 * icu/unicode/ucasemap.h: Added.
1041 * icu/unicode/ucat.h: Added.
1042 * icu/unicode/ucharstrie.h: Added.
1043 * icu/unicode/ucharstriebuilder.h: Added.
1044 * icu/unicode/uchriter.h: Added.
1045 * icu/unicode/uclean.h: Added.
1046 * icu/unicode/ucnv_cb.h: Renamed from Source/WebCore/icu/unicode/ucnv_cb.h.
1047 * icu/unicode/ucnvsel.h: Added.
1048 * icu/unicode/ucoleitr.h: Renamed from Source/WebCore/icu/unicode/ucoleitr.h.
1049 * icu/unicode/uconfig.h:
1050 * icu/unicode/ucsdet.h: Renamed from Source/WebCore/icu/unicode/ucsdet.h.
1051 * icu/unicode/udat.h: Renamed from Source/JavaScriptCore/icu/unicode/udat.h.
1052 * icu/unicode/udata.h: Added.
1053 * icu/unicode/udateintervalformat.h: Added.
1054 * icu/unicode/udatpg.h: Renamed from Source/JavaScriptCore/icu/unicode/udatpg.h.
1055 * icu/unicode/udisplaycontext.h: Renamed from Source/JavaScriptCore/icu/unicode/udisplaycontext.h.
1056 * icu/unicode/ufieldpositer.h: Renamed from Source/JavaScriptCore/icu/unicode/ufieldpositer.h.
1057 * icu/unicode/uformattable.h: Renamed from Source/JavaScriptCore/icu/unicode/uformattable.h.
1058 * icu/unicode/ugender.h: Added.
1059 * icu/unicode/uidna.h: Renamed from Source/WebCore/icu/unicode/uidna.h.
1060 * icu/unicode/uldnames.h: Added.
1061 * icu/unicode/ulistformatter.h: Added.
1062 * icu/unicode/ulocdata.h: Added.
1063 * icu/unicode/umisc.h: Renamed from Source/JavaScriptCore/icu/unicode/umisc.h.
1064 * icu/unicode/umsg.h: Added.
1065 * icu/unicode/unifilt.h: Added.
1066 * icu/unicode/unifunct.h: Added.
1067 * icu/unicode/unimatch.h: Added.
1068 * icu/unicode/unirepl.h: Added.
1069 * icu/unicode/uniset.h: Added.
1070 (UnicodeSet::operator!=):
1071 (UnicodeSet::isFrozen):
1072 (UnicodeSet::containsSome):
1073 (UnicodeSet::isBogus):
1074 (UnicodeSet::fromUSet):
1075 (UnicodeSet::toUSet):
1077 (UnicodeSet::spanBack):
1078 * icu/unicode/unum.h: Renamed from Source/JavaScriptCore/icu/unicode/unum.h.
1079 * icu/unicode/unumsys.h: Renamed from Source/JavaScriptCore/icu/unicode/unumsys.h.
1080 * icu/unicode/upluralrules.h: Added.
1081 * icu/unicode/uregex.h: Added.
1082 * icu/unicode/uregion.h: Added.
1083 * icu/unicode/urep.h: Added.
1084 * icu/unicode/ures.h: Added.
1085 (ures_getUnicodeString):
1086 (ures_getNextUnicodeString):
1087 (ures_getUnicodeStringByIndex):
1088 (ures_getUnicodeStringByKey):
1089 * icu/unicode/usearch.h: Renamed from Source/WebCore/icu/unicode/usearch.h.
1090 * icu/unicode/usetiter.h: Added.
1091 (UnicodeSetIterator::isString):
1092 (UnicodeSetIterator::getCodepoint):
1093 (UnicodeSetIterator::getCodepointEnd):
1094 * icu/unicode/ushape.h: Renamed from Source/WebCore/icu/unicode/ushape.h.
1095 * icu/unicode/usprep.h: Added.
1096 * icu/unicode/ustdio.h: Added.
1097 * icu/unicode/ustream.h: Added.
1098 * icu/unicode/ustringtrie.h: Added.
1099 * icu/unicode/utf32.h: Added.
1100 * icu/unicode/utmscale.h: Added.
1101 * icu/unicode/utrace.h: Added.
1102 * icu/unicode/utrans.h: Added.
1103 * icu/unicode/utypes.h:
1104 * icu/unicode/vtzone.h: Added.
1106 2017-07-03 Keith Miller <keith_miller@apple.com>
1108 Fix ifndef in Assertions.h
1109 https://bugs.webkit.org/show_bug.cgi?id=174104
1111 Reviewed by Saam Barati.
1113 The ifndef should have been checking for
1114 CRASH_WITH_SECURITY_IMPLICATION_AND_INFO since that is what the
1119 2017-07-03 Andy Estes <aestes@apple.com>
1121 [Xcode] Add an experimental setting to build with ccache
1122 https://bugs.webkit.org/show_bug.cgi?id=173875
1124 Reviewed by Tim Horton.
1126 * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
1128 2017-07-03 Daewoong Jang <daewoong.jang@navercorp.com>
1130 Remove an unused function export
1131 https://bugs.webkit.org/show_bug.cgi?id=174084
1133 Reviewed by Yusuke Suzuki.
1137 2017-07-02 Yusuke Suzuki <utatane.tea@gmail.com>
1139 WTF::Thread should have the threads stack bounds.
1140 https://bugs.webkit.org/show_bug.cgi?id=173975
1142 Reviewed by Mark Lam.
1144 We move StackBounds from WTFThreadData to WTF::Thread.
1145 One important thing is that we should make valid StackBounds
1146 visible to Thread::create() caller. When the caller get
1147 WTF::Thread from Thread::create(), this WTF::Thread should
1148 have a valid StackBounds. But StackBounds information can be
1149 retrived only in the WTF::Thread's thread itself.
1151 * wtf/StackBounds.h:
1152 (WTF::StackBounds::emptyBounds):
1153 (WTF::StackBounds::StackBounds):
1154 * wtf/StackStats.cpp:
1155 (WTF::StackStats::PerThreadStats::PerThreadStats):
1156 * wtf/Threading.cpp:
1157 (WTF::threadEntryPoint):
1158 (WTF::Thread::create):
1159 (WTF::Thread::currentMayBeNull):
1160 (WTF::Thread::initialize):
1162 (WTF::Thread::stack):
1163 * wtf/ThreadingPthreads.cpp:
1164 (WTF::Thread::initializeCurrentThreadEvenIfNonWTFCreated):
1165 (WTF::Thread::current):
1166 (WTF::initializeCurrentThreadEvenIfNonWTFCreated): Deleted.
1167 (WTF::Thread::currentMayBeNull): Deleted.
1168 * wtf/ThreadingWin.cpp:
1169 (WTF::Thread::initializeCurrentThreadEvenIfNonWTFCreated):
1170 (WTF::Thread::initializeCurrentThreadInternal):
1171 (WTF::Thread::current):
1172 * wtf/WTFThreadData.cpp:
1173 (WTF::WTFThreadData::WTFThreadData):
1174 * wtf/WTFThreadData.h:
1175 (WTF::WTFThreadData::stack): Deleted.
1177 2017-07-01 Dan Bernstein <mitz@apple.com>
1179 [iOS] Remove code only needed when building for iOS 9.x
1180 https://bugs.webkit.org/show_bug.cgi?id=174068
1182 Reviewed by Tim Horton.
1185 * wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
1186 * wtf/spi/darwin/dyldSPI.h:
1188 2017-07-01 Caio Lima <ticaiolima@gmail.com>
1190 [JSC] WTFGetBacktrace can return numberOfFrames == 0 in some architectures
1191 https://bugs.webkit.org/show_bug.cgi?id=172768
1193 Reviewed by Mark Lam.
1195 In some architectures, like ARMv6 running on a Raspberry pi, the
1196 backtrace function from "execinfo.h" is returning 0. In
1197 that case, the RELEASE_ASSERT in StackTrace::captureStackTrace
1198 fails causing a runtime crash.
1199 This patch is adding a guard for the case described above to
1200 avoid a runtime crash in such case.
1202 * wtf/StackTrace.cpp:
1203 (WTF::StackTrace::captureStackTrace):
1205 2017-07-01 Dan Bernstein <mitz@apple.com>
1207 [macOS] Remove code only needed when building for OS X Yosemite
1208 https://bugs.webkit.org/show_bug.cgi?id=174067
1210 Reviewed by Tim Horton.
1212 * Configurations/Base.xcconfig:
1213 * Configurations/DebugRelease.xcconfig:
1215 * wtf/mac/AppKitCompatibilityDeclarations.h:
1216 * wtf/spi/cocoa/SecuritySPI.h:
1217 * wtf/text/TextBreakIterator.cpp:
1219 2017-07-01 Joseph Pecoraro <pecoraro@apple.com>
1221 Add a warning if WEBGL2 is enabled without WEBGL
1222 https://bugs.webkit.org/show_bug.cgi?id=174054
1224 Reviewed by Sam Weinig.
1226 * wtf/FeatureDefines.h:
1228 2017-06-30 Keith Miller <keith_miller@apple.com>
1230 Force crashWithInfo to be out of line.
1231 https://bugs.webkit.org/show_bug.cgi?id=174028
1233 Reviewed by Filip Pizlo.
1235 The first pass at making crashes hold information about why they
1236 were crashing had the problem that it would inline the assertion.
1237 This meant that clang could coalesce DFG_ASSERTS with other
1238 assertion failures in the same function. This patch moves it out
1239 of line to help fix that issue.
1241 * wtf/Assertions.cpp:
1244 (WTF::isIntegralType):
1246 2017-06-30 Yusuke Suzuki <utatane.tea@gmail.com>
1248 [WTF] Drop SymbolRegistry::keyForSymbol
1249 https://bugs.webkit.org/show_bug.cgi?id=174052
1251 Reviewed by Sam Weinig.
1253 Since we can know whether a given symbol is registered by checking RegisteredSymbolImpl,
1254 we do not need to query key string for a given symbol by using SymbolRegistry::keyForSymbol.
1256 * wtf/text/SymbolImpl.h:
1257 (WTF::SymbolImpl::extractFoldedString): Deleted.
1258 * wtf/text/SymbolRegistry.cpp:
1259 (WTF::SymbolRegistry::keyForSymbol): Deleted.
1260 * wtf/text/SymbolRegistry.h:
1262 2017-06-29 Jer Noble <jer.noble@apple.com>
1264 Make Legacy EME API controlled by RuntimeEnabled setting.
1265 https://bugs.webkit.org/show_bug.cgi?id=173994
1267 Reviewed by Sam Weinig.
1269 * wtf/FeatureDefines.h:
1271 2017-06-30 Ryosuke Niwa <rniwa@webkit.org>
1273 Ran sort-Xcode-project-file.
1275 * WTF.xcodeproj/project.pbxproj:
1277 2017-06-30 Matt Lewis <jlewis3@apple.com>
1279 Unreviewed, rolling out r218992.
1281 The patch broke the iOS device builds.
1285 "DFG_ASSERT should allow stuffing registers before trapping."
1286 https://bugs.webkit.org/show_bug.cgi?id=174005
1287 http://trac.webkit.org/changeset/218992
1289 2017-06-30 Keith Miller <keith_miller@apple.com>
1291 DFG_ASSERT should allow stuffing registers before trapping.
1292 https://bugs.webkit.org/show_bug.cgi?id=174005
1294 Reviewed by Mark Lam.
1296 Add new template functions that enable stuffing up to five values
1297 into registers before crashing.
1302 2017-06-28 Brent Fulgham <bfulgham@apple.com>
1304 Teach ResourceLoadStatistics to recognize changes in the file system
1305 https://bugs.webkit.org/show_bug.cgi?id=173800
1306 <rdar://problem/32937842>
1308 Reviewed by Chris Dumez.
1310 * wtf/DispatchPtr.h: Added (moved from WebKit2)
1311 * wtf/Platform.h: Make sure USE_FILE_LOCK is enabled.
1313 2017-06-28 David Kilzer <ddkilzer@apple.com>
1315 Fix typo in comment: WordResult => WorkResult
1317 * wtf/AutomaticThread.h:
1319 2017-06-27 Caio Lima <ticaiolima@gmail.com>
1321 [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
1322 https://bugs.webkit.org/show_bug.cgi?id=167962
1324 Reviewed by Saam Barati.
1329 2017-06-26 Yusuke Suzuki <utatane.tea@gmail.com>
1331 [WTF] Drop Thread::create(obsolete things) API since we can use lambda
1332 https://bugs.webkit.org/show_bug.cgi?id=173825
1334 Reviewed by Saam Barati.
1336 Thread::create(ThreadFunction, void* data, const char* name) is a bit old API.
1337 Since we have C++ lambda, the above API is simply unnecessary. And C++ lambda
1338 based one is better since the above API needs casting data to and from void*.
1342 * wtf/ParallelJobsGeneric.cpp:
1343 (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
1344 (WTF::ParallelEnvironment::ThreadPrivate::workerThread): Deleted.
1345 * wtf/ParallelJobsGeneric.h:
1346 * wtf/Threading.cpp:
1347 * wtf/ThreadingWin.cpp:
1348 (WTF::createThread):
1350 2017-06-25 Yusuke Suzuki <utatane.tea@gmail.com>
1352 initializeThreading() [first] causes WTFCrash due to maxSingleAllocationSize not being initialized
1353 https://bugs.webkit.org/show_bug.cgi?id=173720
1355 Reviewed by Mark Lam.
1357 When using std::numeric_limits<size_t>::max() for global variable's initialization,
1358 it seems that it invokes static constructor to initialize this in VC++.
1359 We avoid this edge case by introducing a workaround using SIZE_MAX here.
1361 When I perform git-grep, there is only one site (this) using std::numeric_limits<>::xxx()
1362 to initialize global variable.
1364 * wtf/FastMalloc.cpp:
1366 2017-06-25 Konstantin Tokarev <annulen@yandex.ru>
1368 Remove excessive headers from JavaScriptCore
1369 https://bugs.webkit.org/show_bug.cgi?id=173812
1371 Reviewed by Darin Adler.
1375 2017-06-23 Keith Miller <keith_miller@apple.com>
1377 Switch VMTraps to use halt instructions rather than breakpoint instructions
1378 https://bugs.webkit.org/show_bug.cgi?id=173677
1379 <rdar://problem/32178892>
1381 Reviewed by JF Bastien.
1383 Remove the Trap signal handler code since it plays badly with lldb and combine
1384 SIGBUS with SIGSEGV since distiguishing them is generally non-portable.
1386 Also, update the platform code to only use signaling VMTraps
1387 on where we have an appropriate instruction (x86 and ARM64).
1390 * wtf/threads/Signals.cpp:
1391 (WTF::fromMachException):
1393 (WTF::installSignalHandler):
1394 (WTF::jscSignalHandler):
1395 * wtf/threads/Signals.h:
1396 (WTF::toSystemSignal):
1397 (WTF::fromSystemSignal):
1399 2017-06-23 Antti Koivisto <antti@apple.com>
1401 Add notifyutil registrations for going in and out of simulated low memory state
1402 https://bugs.webkit.org/show_bug.cgi?id=173797
1404 Reviewed by Andreas Kling.
1408 notifyutil -p org.WebKit.lowMemory.begin
1409 notifyutil -p org.WebKit.lowMemory.end
1413 * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
1414 (WTF::MemoryPressureHandler::install):
1416 2017-06-23 Konstantin Tokarev <annulen@yandex.ru>
1418 Remove more unused headers from WTF
1419 https://bugs.webkit.org/show_bug.cgi?id=173761
1421 Reviewed by Yusuke Suzuki.
1424 * wtf/PageAllocation.h:
1425 * wtf/ParallelJobs.h:
1427 2017-06-22 Andreas Kling <akling@apple.com>
1429 Rename MemoryPressureHandler::setTabCount to setPageCount
1430 https://bugs.webkit.org/show_bug.cgi?id=173750
1432 Reviewed by Daniel Bates.
1434 This function is counting WebCore::Page objects (excluding utility Pages used
1435 by SVG-as-image and the web inspector) so let's name it appropriately.
1436 Not all WebKit clients have tabs.
1438 * wtf/MemoryPressureHandler.cpp:
1439 (WTF::MemoryPressureHandler::setPageCount):
1440 (WTF::MemoryPressureHandler::thresholdForMemoryKill):
1441 (WTF::MemoryPressureHandler::measurementTimerFired):
1442 (WTF::MemoryPressureHandler::setTabCount): Deleted.
1443 * wtf/MemoryPressureHandler.h:
1445 2017-06-21 Andreas Kling <akling@apple.com>
1447 Increase memory kill limits for WebContent processes that manage multiple tabs.
1448 https://bugs.webkit.org/show_bug.cgi?id=173674
1450 Reviewed by Geoffrey Garen.
1452 When opening <a target=_blank> links, we currently have to use the same WebContent
1453 process for the new tab, to support scripting the window.opener object.
1454 This means that some WebContent processes end up hosting multiple tabs, making it
1455 more likely that those processes will hit the memory limits.
1457 Address this by adding some additional allowance for multi-tab processes:
1459 For each additional tab, up to 4 tabs, add 1GB to the memory kill limit.
1461 * wtf/MemoryPressureHandler.cpp:
1462 (WTF::thresholdForMemoryKillWithProcessState):
1463 (WTF::MemoryPressureHandler::setTabCount):
1464 (WTF::MemoryPressureHandler::thresholdForMemoryKill):
1465 (WTF::MemoryPressureHandler::measurementTimerFired):
1466 * wtf/MemoryPressureHandler.h:
1468 2017-06-21 Chris Dumez <cdumez@apple.com>
1470 Allow constructing a WTF:Function from a function pointer
1471 https://bugs.webkit.org/show_bug.cgi?id=173660
1473 Reviewed by Alex Christensen.
1475 Allow constructing a WTF:Function from a function pointer and
1476 assigning a function pointer to a WTF:Function.
1480 2017-06-20 Simon Fraser <simon.fraser@apple.com>
1482 Remove WILL_REVEAL_EDGE_EVENTS code
1483 https://bugs.webkit.org/show_bug.cgi?id=173632
1485 Reviewed by Sam Weinig, Beth Dakin.
1487 Remove will-reveal-edge events, which never took off.
1489 * wtf/FeatureDefines.h:
1491 2017-06-20 Konstantin Tokarev <annulen@yandex.ru>
1493 Remove excessive include directives from WTF
1494 https://bugs.webkit.org/show_bug.cgi?id=173553
1496 Reviewed by Saam Barati.
1498 * wtf/AutomaticThread.h:
1499 * wtf/BagToHashMap.h:
1500 * wtf/CrossThreadCopier.h:
1501 * wtf/CrossThreadQueue.h:
1506 * wtf/MessageQueue.h:
1507 * wtf/MetaAllocator.h:
1508 * wtf/MetaAllocatorHandle.h:
1509 * wtf/RandomNumberSeed.h:
1513 * wtf/SchedulePair.h:
1515 * wtf/SynchronizedFixedQueue.h:
1516 * wtf/ThreadMessage.h:
1517 * wtf/Threading.cpp:
1519 * wtf/ThreadingPthreads.cpp:
1520 * wtf/ThreadingWin.cpp:
1521 * wtf/WTFThreadData.h:
1523 * wtf/glib/GRefPtr.h:
1524 * wtf/text/AtomicStringTable.h:
1525 * wtf/text/LineBreakIteratorPoolICU.h:
1527 2017-06-20 Yusuke Suzuki <utatane.tea@gmail.com>
1529 [WTF] Enable WTF::Signals only when HAVE(MACHINE_CONTEXT) is true
1530 https://bugs.webkit.org/show_bug.cgi?id=173590
1532 Reviewed by Carlos Garcia Campos.
1534 WTF::Signals require a feature rewriting a value of a machine context.
1535 This is only available under HAVE(MACHINE_CONTEXT).
1536 This patch disables WTF::Signals on !HAVE(MACHINE_CONTEXT) environments.
1538 * wtf/threads/Signals.cpp:
1539 * wtf/threads/Signals.h:
1541 2017-06-20 Yusuke Suzuki <utatane.tea@gmail.com>
1543 [WTF] Rebaseline std::optional
1544 https://bugs.webkit.org/show_bug.cgi?id=173582
1546 Reviewed by JF Bastien.
1548 Update the copy of our std::optional to the latest version.
1549 It adds std::optional::has_value() and std::optional::reset().
1553 2017-06-18 Yusuke Suzuki <utatane.tea@gmail.com>
1555 [WTF] Include execinfo.h and dlfcn.h based on platform defines
1556 https://bugs.webkit.org/show_bug.cgi?id=173531
1558 Reviewed by Alex Christensen.
1560 execinfo.h and dlfcn.h can be missing in some libc libraries.
1561 When including it, we should honor platform defines like HAVE(DLADDR).
1563 * wtf/StackTrace.cpp:
1565 2017-06-18 Darin Adler <darin@apple.com>
1567 Fix Ref to deref before assignment, add tests for this to RefPtr, Ref, Function
1568 https://bugs.webkit.org/show_bug.cgi?id=173526
1570 Reviewed by Sam Weinig.
1572 * wtf/Ref.h: Changed operator= to not be defined inside the class definition.
1573 Added swap functions. Changed operator= implementations to use swap in the
1574 conventional manner, the same way that RefPtr does.
1576 2017-06-18 Chris Dumez <cdumez@apple.com>
1578 Use WTF::Function instead of std::function in WTF/
1579 https://bugs.webkit.org/show_bug.cgi?id=173519
1581 Reviewed by Sam Weinig.
1583 Use WTF::Function instead of std::function in WTF/ to avoid
1589 * wtf/FunctionDispatcher.h:
1591 * wtf/MemoryPressureHandler.h:
1592 (WTF::MemoryPressureHandler::setMemoryKillCallback):
1593 (WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
1594 (WTF::MemoryPressureHandler::setDidExceedInactiveLimitWhileActiveCallback):
1598 (WTF::RefCounter<T>::RefCounter):
1600 * wtf/linux/MemoryPressureHandlerLinux.cpp:
1601 (WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):
1602 * wtf/text/WTFString.cpp:
1603 (WTF::String::split):
1604 * wtf/text/WTFString.h:
1606 2017-06-16 Alex Christensen <achristensen@webkit.org>
1608 Fix Mac CMake build.
1610 * wtf/PlatformMac.cmake:
1611 Generate MachExceptionsServer.h
1613 2017-06-16 Wenson Hsieh <wenson_hsieh@apple.com>
1615 [iOS DnD] Upstream iOS drag and drop implementation into OpenSource WebKit
1616 https://bugs.webkit.org/show_bug.cgi?id=173366
1617 <rdar://problem/32767014>
1619 Reviewed by Tim Horton.
1621 Define ENABLE_DRAG_SUPPORT as 1 by default and 0 for iOS, and define ENABLE_DATA_INTERACTION as 0 by default.
1622 These are overridden to both be 1 for iOS 11+ in the FeatureDefines.xcconfig within each individual project.
1626 2017-06-15 Chris Dumez <cdumez@apple.com>
1628 Fix typo in XPCSPI.h
1629 https://bugs.webkit.org/show_bug.cgi?id=173426
1631 Reviewed by Alex Christensen.
1633 We should check if xpc_release is defined before defining it,
1636 * wtf/spi/darwin/XPCSPI.h:
1638 2017-06-15 Konstantin Tokarev <annulen@yandex.ru>
1640 Implement FALLTHROUGH macro for compilers other than Clang
1641 https://bugs.webkit.org/show_bug.cgi?id=173385
1643 Reviewed by Alex Christensen.
1645 FALLTHROUGH should be able to use [[gnu::fallthrough]] attribute of
1646 GCC, and [[fallthrough]] from C++17, whichever is available.
1650 2017-06-14 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1652 MediaSource duration attribute should not be equal to Infinity when set to a value greater than 2^64
1653 https://bugs.webkit.org/show_bug.cgi?id=171668
1655 Reviewed by Jer Noble.
1657 MediaSource duration attribute is a double represented in MediaSource by a MediaTime instance created with
1658 MediaTime::CreateWithDouble(). This method implements an overflow control mechanism which sets MediaTime to
1659 Infinity when the double value passed as argument is greater than 2^64.
1661 This patch removes the overflow control mechanism when time value is represented as a double. This patch also
1662 modifies the behavior of mathematical operations between a double MediaTime and rational MediaTime: the rational
1663 MediaTime is converted to a double before applying the operation. Double MediaTime precision is the same as for
1664 double. Overflow mechanisms still apply to the conversion of a double MediaTime to rational with setTimescale()
1665 method. No behavior change for rational MediaTime.
1667 * wtf/MediaTime.cpp:
1668 (WTF::MediaTime::createWithFloat):
1669 (WTF::MediaTime::createWithDouble):
1670 (WTF::MediaTime::operator+):
1671 (WTF::MediaTime::operator-):
1673 2017-06-13 Zan Dobersek <zdobersek@igalia.com>
1675 [GTK][WPE] Use CMAKE_THREAD_LIBS_INIT in WTF platform CMake files
1676 https://bugs.webkit.org/show_bug.cgi?id=173310
1678 Reviewed by Xabier Rodriguez-Calvar.
1680 In the WTF platform CMake files for the GTK+ and WPE ports, use the
1681 CMAKE_THREAD_LIBS_INIT variable to specify the threading library we
1682 should be linking against. On some platforms this variable will be
1683 empty because the given compiler will automatically handle the -pthread
1684 compiler flag and sort out linking on its own.
1686 The same approach is already used for the JSCOnly configuration.
1688 * wtf/PlatformGTK.cmake:
1689 * wtf/PlatformWPE.cmake:
1691 2017-06-13 Youenn Fablet <youenn@apple.com>
1693 Filter SDP from ICE candidates in case of local ICE candidate filtering
1694 https://bugs.webkit.org/show_bug.cgi?id=173120
1696 Reviewed by Eric Carlson.
1698 Adding split helper routine with functor parameter.
1700 * wtf/text/WTFString.cpp:
1701 (WTF::String::split):
1702 * wtf/text/WTFString.h:
1703 (WTF::String::contains):
1705 2017-06-13 Don Olmstead <don.olmstead@sony.com>
1707 [WTF] Remove redundant includes in config.h
1708 https://bugs.webkit.org/show_bug.cgi?id=173292
1710 Reviewed by Alex Christensen.
1713 * wtf/ExportMacros.h:
1715 2017-06-12 Jer Noble <jer.noble@apple.com>
1717 Screen sleeps while doing WebRTC video
1718 https://bugs.webkit.org/show_bug.cgi?id=173278
1720 Reviewed by Eric Carlson.
1722 Drive-by fix: add some generic methods for iterating over collections.
1724 * WTF.xcodeproj/project.pbxproj:
1725 * wtf/Algorithms.h: Added.
1730 2017-06-12 Carlos Garcia Campos <cgarcia@igalia.com>
1732 [GTK] Move WebKit GType macros to WTF
1733 https://bugs.webkit.org/show_bug.cgi?id=173249
1735 Reviewed by Žan Doberšek.
1737 They can be used by glib-based ports and eventually by JavaScriptCore glib bindings too.
1739 * wtf/glib/WTFGType.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h.
1741 2017-06-11 Yusuke Suzuki <utatane.tea@gmail.com>
1743 [WTF] Make ThreadMessage portable
1744 https://bugs.webkit.org/show_bug.cgi?id=172073
1746 Reviewed by Keith Miller.
1748 Recently, we change ThreadMessage semantics: message handler
1749 can be executed in the sender thread.
1750 This allows ThreadMessage to be implemented in a portable way.
1752 This patch implements ThreadMessage for all the platforms.
1753 We use platform-independent Thread APIs, suspend(), resume(),
1756 * wtf/PlatformRegisters.h:
1757 (WTF::registersFromUContext):
1758 * wtf/ThreadMessage.cpp:
1759 (WTF::sendMessageScoped):
1760 (WTF::ThreadMessageData::ThreadMessageData): Deleted.
1762 (WTF::initializeThreadMessages): Deleted.
1763 (WTF::sendMessageUsingSignal): Deleted.
1764 (WTF::sendMessageUsingMach): Deleted.
1765 (WTF::deliverMessagesUsingMach): Deleted.
1766 * wtf/ThreadMessage.h:
1767 * wtf/Threading.cpp:
1768 (WTF::initializeThreading):
1770 (WTF::Thread::threadMessages): Deleted.
1771 * wtf/ThreadingPthreads.cpp:
1772 (WTF::Thread::signalHandlerSuspendResume):
1773 (WTF::threadStateMetadata):
1774 (WTF::Thread::getRegisters):
1775 * wtf/threads/Signals.cpp:
1776 (WTF::handleSignalsWithMach):
1778 2017-06-11 Yusuke Suzuki <utatane.tea@gmail.com>
1780 [WTF] Drop unnecessary includes in Threading.h
1781 https://bugs.webkit.org/show_bug.cgi?id=173167
1783 Reviewed by Darin Adler.
1785 Threading.h includes bunch of headers. But some of them are not necessary.
1786 This patch cleans up it a bit.
1788 * wtf/Assertions.cpp:
1789 * wtf/LocklessBag.h:
1791 * wtf/ThreadingPrimitives.h:
1793 2017-06-10 Yusuke Suzuki <utatane.tea@gmail.com>
1795 [WTF] Add RegisteredSymbolImpl
1796 https://bugs.webkit.org/show_bug.cgi?id=173230
1798 Reviewed by Mark Lam.
1800 Most symbols are not registered in SymbolRegistry. However, we currently always
1801 allocate a pointer member to point to a SymbolRegistry, and this pointer is always null.
1802 SymbolImpl is immutable, and it will never be registered with a SymbolRegistry
1803 after it is created. Hence, this member is wasteful.
1805 Instead, we add a new derived class RegisteredSymbolImpl, which will set a flag in
1806 SymbolImpl to indicate that it is registered with a SymbolRegistry. The only way to
1807 create a RegisteredSymbolImpl is via a factory method provided by the SymbolRegistry.
1808 The factory method will pass the SymbolRegistry this pointer to the RegisteredSymbolImpl's
1809 constructor for initializing the RegisteredSymbolImpl's m_symbolRegistry field.
1812 1. We do not need to set m_symbolRegistry after creating a Symbol. It is clean.
1813 2. We reduce the size of SymbolImpls that do not need to be registered.
1815 * wtf/text/StringImpl.cpp:
1816 (WTF::StringImpl::~StringImpl):
1817 * wtf/text/StringImpl.h:
1818 * wtf/text/SymbolImpl.cpp:
1819 (WTF::SymbolImpl::create):
1820 (WTF::RegisteredSymbolImpl::create):
1821 * wtf/text/SymbolImpl.h:
1822 (WTF::SymbolImpl::hashForSymbol):
1823 (WTF::SymbolImpl::isRegistered):
1824 (WTF::SymbolImpl::SymbolImpl):
1825 (WTF::RegisteredSymbolImpl::symbolRegistry):
1826 (WTF::RegisteredSymbolImpl::clearSymbolRegistry):
1827 (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl):
1828 (WTF::SymbolImpl::symbolRegistry):
1829 * wtf/text/SymbolRegistry.cpp:
1830 (WTF::SymbolRegistry::~SymbolRegistry):
1831 (WTF::SymbolRegistry::symbolForKey):
1832 (WTF::SymbolRegistry::keyForSymbol):
1833 (WTF::SymbolRegistry::remove):
1834 * wtf/text/SymbolRegistry.h:
1836 2017-06-10 Dan Bernstein <mitz@apple.com>
1838 Reverted r218056 because it made the IDE reindex constantly.
1840 * Configurations/DebugRelease.xcconfig:
1842 2017-06-10 Dan Bernstein <mitz@apple.com>
1844 [Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE
1845 https://bugs.webkit.org/show_bug.cgi?id=173223
1847 Reviewed by Sam Weinig.
1849 The rebuilds were happening due to a difference in the compiler options that the IDE and
1850 xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make
1851 xcodebuild pass that option, too, set CLANG_INDEX_STORE_ENABLE to YES if it is unset, and
1852 specify an appropriate path in CLANG_INDEX_STORE_PATH.
1854 * Configurations/DebugRelease.xcconfig:
1856 2017-06-09 Chris Dumez <cdumez@apple.com>
1858 Update Thread::create() to take in a WTF::Function instead of a std::function
1859 https://bugs.webkit.org/show_bug.cgi?id=173175
1861 Reviewed by Mark Lam.
1863 Update Thread::create() to take in a WTF::Function instead of a std::function. Unlike
1864 std::function, WTF:Function is not copyable and does not make implicit copies of captured
1865 variables. Doing captures such as [string = string.isolatedCopy()] when passing an
1866 std::function to another thread has lead to bugs in the past due to implicit copying of
1867 the captured string.
1869 * wtf/Threading.cpp:
1870 (WTF::Thread::create):
1873 2017-06-09 Chris Dumez <cdumez@apple.com>
1875 Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
1876 https://bugs.webkit.org/show_bug.cgi?id=173165
1878 Reviewed by Saam Barati.
1880 Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
1881 as std::function has issues with regards to thread safety.
1884 * wtf/cocoa/WorkQueueCocoa.cpp:
1885 (WTF::WorkQueue::concurrentApply):
1887 2017-06-08 Xabier Rodriguez Calvar <calvaris@igalia.com>
1889 MediaTime class has rounding issues in different platforms
1890 https://bugs.webkit.org/show_bug.cgi?id=172640
1892 Reviewed by Jer Noble.
1894 The way a timescale is set when creating a MediaTime from a double
1895 can create rounding issues in different platforms because in some
1896 rounding is made and in others, it truncates. This way we ensure a
1899 Dumping MediaTimes is also confusing and by the output you don't
1900 know if it's containing a double or a fraction. Now, if it
1901 contains a double, it only prints the double because printing the
1902 fraction is misleading (it currently prints the double read as an
1903 integer) and if it contains a fraction it shows the fraction and
1904 its double representation separated by an = instead of a ,.
1906 * wtf/MediaTime.cpp:
1907 (WTF::MediaTime::createWithDouble): When creating MediaTime from
1908 double, we round instead of leaving it to the cast operation.
1909 (WTF::MediaTime::dump):
1911 2017-06-07 Jer Noble <jer.noble@apple.com>
1913 Refactoring: MediaEngineSupportParameters should take a ContentType rather than separate type & codecs strings
1914 https://bugs.webkit.org/show_bug.cgi?id=173038
1916 Reviewed by Eric Carlson.
1918 Drive by fix: add a version of split that takes a UChar and returns a Vector<String>.
1920 * wtf/text/WTFString.h:
1921 (WTF::String::split):
1923 2017-06-07 Zan Dobersek <zdobersek@igalia.com>
1925 [GCrypt] RSA-PSS support
1926 https://bugs.webkit.org/show_bug.cgi?id=172856
1928 Reviewed by Jiewen Tan.
1930 * wtf/Platform.h: Define HAVE_RSA_PSS to 1 for USE(GCRYPT). Support for RSA-PSS
1931 is provided by default through the libgcrypt library.
1933 2017-06-06 Chris Dumez <cdumez@apple.com>
1935 Unreviewed, rolling out r214974.
1937 Causes some tabs to start using a huge amount of CPU after 8
1938 minutes in the background
1942 "Make inactive web processes behave as though under memory
1944 https://bugs.webkit.org/show_bug.cgi?id=170042
1945 http://trac.webkit.org/changeset/214974
1947 2017-06-06 Don Olmstead <don.olmstead@am.sony.com>
1949 [WebCore] Enable REQUEST_ANIMATION_FRAME_TIMER for all ports
1950 https://bugs.webkit.org/show_bug.cgi?id=172780
1952 Reviewed by Alex Christensen.
1956 2017-06-06 Darin Adler <darin@apple.com>
1958 Cut down use of WTF_ARRAY_LENGTH
1959 https://bugs.webkit.org/show_bug.cgi?id=172997
1961 Reviewed by Chris Dumez.
1964 (WTF::equalLettersIgnoringASCIICase): Added helper function template.
1965 (WTF::parseDateFromNullTerminatedCharacters): Use a modern for loop instead of
1966 WTF_ARRAY_LENGTH. Use startsWithLettersIgnoringASCIICase and
1967 equalLettersIgnoringASCIICase instead of strncasecmp.
1969 * wtf/text/IntegerToStringConversion.h:
1970 (WTF::numberToStringImpl): Use std::end instead of WTF_ARRAY_LENGTH.
1971 (WTF::writeNumberToBufferImpl): Ditto.
1973 2017-06-06 Filip Pizlo <fpizlo@apple.com>
1975 index out of bound in bytecodebasicblock
1976 https://bugs.webkit.org/show_bug.cgi?id=172963
1978 Reviewed by Saam Barati and Mark Lam.
1981 (UNREACHABLE_FOR_PLATFORM):
1983 2017-06-05 Jer Noble <jer.noble@apple.com>
1985 Allow clients to specify a list of codecs which should require hardware decode support.
1986 https://bugs.webkit.org/show_bug.cgi?id=172787
1988 Reviewed by Alex Christensen.
1990 Add a couple of convenience methods:
1991 - a String::split() that returns a vector (rather than taking an out-reference to a vector).
1992 - A Vector::map() template which takes a Callable and returns a Vector of a different type.
1996 * wtf/text/WTFString.h:
1997 (WTF::String::split):
1999 2017-06-04 Konstantin Tokarev <annulen@yandex.ru>
2001 Fix build of Windows-specific code with ICU 59.1
2002 https://bugs.webkit.org/show_bug.cgi?id=172729
2004 Reviewed by Darin Adler.
2006 * wtf/text/win/WCharStringExtras.h: Added new header file wuth helper
2007 functions for conversion between WTF::String and wchart_t*.
2008 (WTF::stringToNullTerminatedWChar):
2009 (WTF::wcharToString):
2010 (WTF::nullTerminatedWCharToString):
2012 2017-06-02 Stephan Szabo <stephan.szabo@am.sony.com>
2014 [JSCOnly] Build static jsc.exe on Windows
2015 https://bugs.webkit.org/show_bug.cgi?id=172833
2017 Reviewed by Konstantin Tokarev.
2019 * wtf/PlatformJSCOnly.cmake:
2021 2017-06-02 Simon Fraser <simon.fraser@apple.com>
2023 Get <chrono> out of StdLibExtras.h
2024 https://bugs.webkit.org/show_bug.cgi?id=172744
2026 Reviewed by Zalan Bujtas.
2028 We hates std::chrono. Don't include it everywhere to discourage use.
2030 * wtf/StdLibExtras.h:
2032 2017-06-02 Filip Pizlo <fpizlo@apple.com>
2034 Atomics.load and Atomics.store need to be fully fenced
2035 https://bugs.webkit.org/show_bug.cgi?id=172844
2037 Reviewed by Keith Miller.
2039 Add loadFullyFenced and storeFullyFenced to Atomic<>.
2042 (WTF::Atomic::loadFullyFenced):
2043 (WTF::Atomic::storeRelaxed):
2044 (WTF::Atomic::storeFullyFenced):
2045 (WTF::atomicLoadFullyFenced):
2046 (WTF::atomicStoreFullyFenced):
2048 2017-06-01 Keith Miller <keith_miller@apple.com>
2050 Undo rollout in r217638 with bug fix
2051 https://bugs.webkit.org/show_bug.cgi?id=172824
2053 Unreviewed, reland patch with unused set_state code removed.
2055 * Configurations/WTF.xcconfig:
2056 * WTF.xcodeproj/project.pbxproj:
2058 * wtf/PlatformRegisters.h:
2059 (WTF::registersFromUContext):
2060 * wtf/StackBounds.h:
2061 (WTF::StackBounds::StackBounds):
2062 * wtf/ThreadHolder.cpp:
2063 (WTF::ThreadHolder::~ThreadHolder):
2064 * wtf/ThreadMessage.cpp:
2065 (WTF::sendMessageUsingSignal):
2066 (WTF::sendMessageUsingMach):
2067 (WTF::deliverMessagesUsingMach):
2068 (WTF::sendMessageScoped):
2069 * wtf/ThreadMessage.h:
2072 (WTF::Thread::machThread):
2073 * wtf/mac/MachExceptions.defs: Copied from Source/WTF/wtf/ThreadMessage.h.
2074 * wtf/threads/Signals.cpp:
2075 (WTF::startMachExceptionHandlerThread):
2076 (WTF::fromMachException):
2078 (WTF::handleSignalsWithMach):
2079 (WTF::setExceptionPorts):
2080 (WTF::activeThreads):
2081 (WTF::registerThreadForMachExceptionHandling):
2082 (WTF::unregisterThreadForMachExceptionHandling):
2083 (WTF::installSignalHandler):
2084 (WTF::jscSignalHandler):
2085 * wtf/threads/Signals.h:
2087 2017-05-31 Commit Queue <commit-queue@webkit.org>
2089 Unreviewed, rolling out r217611 and r217631.
2090 https://bugs.webkit.org/show_bug.cgi?id=172785
2092 "caused wasm-hashset-many.html to become flaky." (Requested by
2093 keith_miller on #webkit).
2095 Reverted changesets:
2097 "Reland r216808, underlying lldb bug has been fixed."
2098 https://bugs.webkit.org/show_bug.cgi?id=172759
2099 http://trac.webkit.org/changeset/217611
2101 "Use dispatch queues for mach exceptions"
2102 https://bugs.webkit.org/show_bug.cgi?id=172775
2103 http://trac.webkit.org/changeset/217631
2105 2017-05-31 Keith Miller <keith_miller@apple.com>
2107 Use dispatch queues for mach exceptions
2108 https://bugs.webkit.org/show_bug.cgi?id=172775
2110 Reviewed by Geoffrey Garen.
2112 This patch adds support for using a dispatch queue to handle our
2113 mach exceptions. We use a high priority concurrent dispatch queue
2114 to handle our mach exceptions. We don't know the priority of the
2115 thread whose exception we are handling so the most conservative
2116 answer is to respond with a high priority. These events are both
2117 rare and usually quite fast so it is likely not a significant cost
2118 when the thread with an exception has a low priority.
2120 * wtf/threads/Signals.cpp:
2121 (WTF::startMachExceptionHandlerThread):
2123 2017-05-31 Keith Miller <keith_miller@apple.com>
2125 Reland r216808, underlying lldb bug has been fixed.
2126 https://bugs.webkit.org/show_bug.cgi?id=172759
2128 Unreviewed, relanding old patch. See: rdar://problem/31183352
2130 * Configurations/WTF.xcconfig:
2131 * WTF.xcodeproj/project.pbxproj:
2133 * wtf/PlatformRegisters.h:
2134 (WTF::registersFromUContext):
2135 * wtf/StackBounds.h:
2136 (WTF::StackBounds::StackBounds):
2137 * wtf/ThreadHolder.cpp:
2138 (WTF::ThreadHolder::~ThreadHolder):
2139 * wtf/ThreadMessage.cpp:
2140 (WTF::sendMessageUsingSignal):
2141 (WTF::sendMessageUsingMach):
2142 (WTF::deliverMessagesUsingMach):
2143 (WTF::sendMessageScoped):
2144 * wtf/ThreadMessage.h:
2147 (WTF::Thread::machThread):
2148 * wtf/mac/MachExceptions.defs: Copied from Source/WTF/wtf/ThreadMessage.h.
2149 * wtf/threads/Signals.cpp:
2150 (WTF::startMachExceptionHandlerThread):
2151 (WTF::fromMachException):
2153 (WTF::handleSignalsWithMach):
2154 (WTF::setExceptionPorts):
2155 (WTF::activeThreads):
2156 (WTF::registerThreadForMachExceptionHandling):
2157 (WTF::unregisterThreadForMachExceptionHandling):
2158 (WTF::installSignalHandler):
2159 (WTF::jscSignalHandler):
2160 * wtf/threads/Signals.h:
2162 2017-05-31 Matt Lewis <jlewis3@apple.com>
2164 Unreviewed, rolling out r217603.
2166 This patch broke the internal builds.
2170 "Get <chrono> out of StdLibExtras.h"
2171 https://bugs.webkit.org/show_bug.cgi?id=172744
2172 http://trac.webkit.org/changeset/217603
2174 2017-05-31 Simon Fraser <simon.fraser@apple.com>
2176 Get <chrono> out of StdLibExtras.h
2177 https://bugs.webkit.org/show_bug.cgi?id=172744
2179 Reviewed by Saam Barati.
2181 We hates std::chrono. Don't include it everywhere to discourage use.
2183 * wtf/StdLibExtras.h:
2185 2017-05-30 Ryosuke Niwa <rniwa@webkit.org>
2187 Only include DataDetectorsUI headers in iOS
2188 https://bugs.webkit.org/show_bug.cgi?id=172633
2190 Reviewed by David Kilzer.
2192 Enable data detectors only on iOS and not other variants of iOS.
2194 * wtf/FeatureDefines.h:
2197 2017-05-29 Yusuke Suzuki <utatane.tea@gmail.com>
2199 Unreviewed, disable faster Interpreter::getOpcodeID for ARM_THUMB2 with non-Darwin OSes
2200 https://bugs.webkit.org/show_bug.cgi?id=172686
2202 Because of test failures.
2206 2017-05-28 Dan Bernstein <mitz@apple.com>
2208 [Xcode] ALWAYS_SEARCH_USER_PATHS is set to YES
2209 https://bugs.webkit.org/show_bug.cgi?id=172691
2211 Reviewed by Tim Horton.
2213 * Configurations/Base.xcconfig: Set ALWAYS_SEARCH_USER_PATHS to NO.
2215 2017-05-28 Yusuke Suzuki <utatane.tea@gmail.com>
2217 [JSC][Linux][FreeBSD] Use faster Interpreter::getOpcodeID()
2218 https://bugs.webkit.org/show_bug.cgi?id=172686
2220 Reviewed by Mark Lam.
2222 As of r217526, JSC gets faster Interpreter::getOpcodeID() by
2223 embedding OpcodeID value just before the LLInt machine code
2224 handler pointer. By doing so, we can retrieve OpcodeID from
2225 the LLInt machine code handler by dereferencing the code
2226 pointer. `*((int*)ptr - 1)`.
2228 This patch allows Linux and FreeBSD environments to use this
2233 2017-05-28 Mark Lam <mark.lam@apple.com>
2235 Implement a faster Interpreter::getOpcodeID().
2236 https://bugs.webkit.org/show_bug.cgi?id=172669
2238 Reviewed by Saam Barati.
2240 Added the USE(LLINT_EMBEDDED_OPCODE_ID) configuration.
2244 2017-05-26 Brent Fulgham <bfulgham@apple.com>
2246 [WK2] Address thread safety issues with ResourceLoadStatistics
2247 https://bugs.webkit.org/show_bug.cgi?id=172519
2248 <rdar://problem/31707642>
2250 Reviewed by Chris Dumez.
2252 Add a new specialization for HashSet.
2254 * wtf/CrossThreadCopier.h:
2256 2017-05-26 Ryan Haddad <ryanhaddad@apple.com>
2258 Unreviewed, rolling out r217458.
2260 This change caused 55 JSC test failures.
2264 "Date should use historical data if it's available."
2265 https://bugs.webkit.org/show_bug.cgi?id=172592
2266 http://trac.webkit.org/changeset/217458
2268 2017-05-25 Keith Miller <keith_miller@apple.com>
2270 Date should use historical data if it's available.
2271 https://bugs.webkit.org/show_bug.cgi?id=172592
2273 Reviewed by Mark Lam.
2275 The spec previously disallowed using historical data for Dates.
2276 This is no longer the case. Additionally, not using historical
2277 data, when available, seems unfortunate for users. This patch
2278 removes the code dropping historical data.
2281 (WTF::calculateLocalTimeOffset):
2282 (WTF::msToMilliseconds): Deleted.
2284 2017-05-25 Yusuke Suzuki <utatane.tea@gmail.com>
2286 [Win] ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
2287 https://bugs.webkit.org/show_bug.cgi?id=172586
2289 Reviewed by Brent Fulgham.
2291 In ThreadHolder for Windows, we need to construct HashMap<ThreadIdentifier, ThreadHolder*>.
2292 The problem is that ThreadHolder::platformInitialize touches Thread::id() even before Thread
2293 is not established. In that case, id() returns incorrect value.
2295 But, calling ThreadHolder::initialize() after waiting for completion of Thread::establish() is
2296 not a good idea. Since we already have NewThreadContext->creationMutex, we can wait for completion
2297 of Thread::establish() easily. However, if we do so, Thread::create() returns RefPtr<Thread> that
2298 may not call ThreadHolder::initialize() in its thread yet. In that case, ThreadHolder::get() fails.
2299 Thus, Windows WTF::waitForThreadCompletion implementation becomes broken. We can add a new mutex
2300 to wait for completion of ThreadHolder::initialize in the creator of the thread (like a ping-pong!).
2301 But it overly complicates the implementation.
2303 The following is overly complicated initialization phase.
2305 Creator -> AC mutex(1) -------> establishment -> RL mutex(1) ----------------------> AC mutex(2) ->
2307 Thread -----------------> AC mutex(1) -> ThreadHolder init -> RL mutex(2) ->
2309 So, instead, in this patch, we just use Thread::currentID(). When calling ThreadHolder::initialize(),
2310 we pass ThreadIdentifier by using Thread::currentID(). This implementation works great because,
2312 1. ThreadHolder::initialize requires ThreadIdentifier only in Windows environment because Pthread
2313 ThreadHolder does not create HashMap<>. And this is used for obsolete Threading APIs. Thus this
2314 hack will be removed in the near future.
2316 2. In Windows, Thread::currentID() can return a valid value without using ThreadHolder. And it does
2317 not require Thread establishment. So, calling currentID() to initialize ThreadHolder is ok in
2320 * wtf/ThreadHolder.cpp:
2321 (WTF::ThreadHolder::initialize): Deleted.
2322 * wtf/ThreadHolder.h:
2323 * wtf/ThreadHolderPthreads.cpp:
2324 (WTF::ThreadHolder::initialize):
2325 * wtf/ThreadHolderWin.cpp:
2326 (WTF::ThreadHolder::initialize):
2327 (WTF::ThreadHolder::platformInitialize): Deleted.
2328 * wtf/ThreadingWin.cpp:
2329 (WTF::wtfThreadEntryPoint):
2331 2017-05-25 Adrian Perez de Castro <aperez@igalia.com>
2333 Clang warns about (intended) returning pointer to stack location in WTF/wtf/ThreadingPthreads.cpp
2334 https://bugs.webkit.org/show_bug.cgi?id=172595
2336 Reviewed by Mark Lam.
2338 * wtf/ThreadingPthreads.cpp: Use a #pragma to silence Clang warning about returning a
2339 pointer to the stack (which is intended)
2341 2017-05-25 David Kilzer <ddkilzer@apple.com>
2343 REGRESSION (r217416): Using #pragma once in WTFString.h broke the build
2345 * wtf/text/WTFString.h: Switch back to #ifndef/#define/#endif.
2347 2017-05-25 David Kilzer <ddkilzer@apple.com>
2349 Make a change to force a build on the Apple bots
2351 * wtf/text/WTFString.h: Use #pragma once.
2353 2017-05-24 Andreas Kling <akling@apple.com>
2355 Disable memory kill mechanisms when running with FastMalloc disabled.
2356 https://bugs.webkit.org/show_bug.cgi?id=172550
2357 <rdar://problem/32181908>
2359 Reviewed by Antti Koivisto.
2361 If someone is using WebKit with a non-standard allocator, they are likely trying to debug
2362 or test something, and suddenly getting killed is not gonna help with that.
2364 * wtf/MemoryPressureHandler.cpp:
2365 (WTF::MemoryPressureHandler::setShouldUsePeriodicMemoryMonitor):
2367 2017-05-22 Jiewen Tan <jiewen_tan@apple.com>
2369 [WebCrypto] Support RSA-PSS
2370 https://bugs.webkit.org/show_bug.cgi?id=170869
2371 <rdar://problem/31640672>
2373 Reviewed by Brent Fulgham.
2376 Add a flag to enable RSA-PSS in the future.
2378 2017-05-23 Myles C. Maxfield <mmaxfield@apple.com>
2380 Remove dead ENABLE(FONT_LOAD_EVENTS) code
2381 https://bugs.webkit.org/show_bug.cgi?id=172517
2383 Rubber-stamped by Simon Fraser.
2385 * wtf/FeatureDefines.h:
2387 2017-05-23 Don Olmstead <don.olmstead@am.sony.com>
2389 [WTF] Export additional symbols in threading
2390 https://bugs.webkit.org/show_bug.cgi?id=171952
2392 Reviewed by Konstantin Tokarev.
2394 * wtf/ThreadMessage.h:
2395 * wtf/threads/Signals.h:
2397 2017-05-23 Tomas Popela <tpopela@redhat.com>
2399 [WTF] Compilation fails with system malloc
2400 https://bugs.webkit.org/show_bug.cgi?id=172445
2402 Reviewed by Michael Catanzaro.
2404 We are using the bmalloc even if the system malloc should be used.
2405 Don't use bmalloc if the system malloc is requested and add the
2406 missing implementation for computeRAMSize() on UNIX that's utilizing
2410 (WTF::computeRAMSize):
2412 2017-05-22 Brian Burg <bburg@apple.com>
2414 Add a debugging macro that sleeps a thread until a debugger attaches
2415 https://bugs.webkit.org/show_bug.cgi?id=171575
2417 Reviewed by Mark Lam.
2419 This is really useful for debugging early errors if for some reason you can't
2420 launch a process directly from the debugger easily, such as Web Content processes.
2422 * WTF.xcodeproj/project.pbxproj:
2424 Always define the WTFBreakpointTrap() macro. Still make it an error if the CPU
2425 type isn't supported for OS(DARWIN); if used on other platforms, cause a WTFCrash()
2426 with a comment that indicates this is not implemented.
2428 * wtf/DebugUtilities.h: Added.
2430 2017-05-19 Don Olmstead <don.olmstead@am.sony.com>
2432 [WTF] Remove PLATFORM(WIN) references
2433 https://bugs.webkit.org/show_bug.cgi?id=172301
2435 Reviewed by Yusuke Suzuki.
2437 * wtf/MemoryPressureHandler.cpp:
2438 * wtf/MemoryPressureHandler.h:
2441 2017-05-19 Don Olmstead <don.olmstead@am.sony.com>
2443 [CMake] Add HAVE check for __int128_t
2444 https://bugs.webkit.org/show_bug.cgi?id=172317
2446 Reviewed by Yusuke Suzuki.
2448 * wtf/MediaTime.cpp:
2449 (WTF::MediaTime::setTimeScale):
2452 2017-05-18 Andreas Kling <akling@apple.com>
2454 [WK2] Notify WebPageProxy client when an active process goes over the inactive memory limit
2455 https://bugs.webkit.org/show_bug.cgi?id=172244
2456 <rdar://problem/31800943>
2458 Reviewed by Geoffrey Garen.
2460 Add an installable callback to MemoryPressureHandler that gets invoked when an active process
2461 exceeds the kill limit for an inactive process.
2463 This allows a UI client to become aware that backgrounding a tab may cause it to get killed.
2465 * wtf/MemoryPressureHandler.cpp:
2466 (WTF::thresholdForMemoryKillWithProcessState):
2467 (WTF::MemoryPressureHandler::thresholdForMemoryKill):
2468 (WTF::MemoryPressureHandler::measurementTimerFired):
2469 (WTF::MemoryPressureHandler::doesExceedInactiveLimitWhileActive):
2470 (WTF::MemoryPressureHandler::doesNotExceedInactiveLimitWhileActive):
2471 * wtf/MemoryPressureHandler.h:
2472 (WTF::MemoryPressureHandler::setDidExceedInactiveLimitWhileActiveCallback):
2474 2017-05-18 Geoffrey Garen <ggaren@apple.com>
2476 AutomaticThread should wait longer before timing out
2477 https://bugs.webkit.org/show_bug.cgi?id=172292
2479 Reviewed by Filip Pizlo.
2481 Increased the idle timeout from 1s => 10s.
2483 This reduces the number of thread restarts on JetStream from
2484 ~150 => ~0. It also matches other thread pool APIs on Darwin.
2486 Intuitively, it seems wrong for helper threads to idle exit during
2487 hardcore benchmarking.
2489 This patch in combination with a bmalloc fix seems to be a 1%-2% JetStream
2490 speedup on my Mac Pro.
2492 A nice side-benefit is that per-thread traces are easier to read.
2494 * wtf/AutomaticThread.cpp:
2495 (WTF::AutomaticThread::start):
2496 * wtf/AutomaticThread.h:
2498 2017-05-18 Don Olmstead <don.olmstead@am.sony.com>
2500 [Win] Remove usage of _snprintf
2501 https://bugs.webkit.org/show_bug.cgi?id=172251
2503 Reviewed by Per Arne Vollan.
2506 (WTF::initializeLogFileOnce):
2509 2017-05-15 Mark Lam <mark.lam@apple.com>
2511 Rolling out r214038 and r213697: Crashes when using computed properties with rest destructuring and object spread.
2512 https://bugs.webkit.org/show_bug.cgi?id=172147
2514 Rubber-stamped by Saam Barati.
2519 2017-05-14 Chris Dumez <cdumez@apple.com>
2521 Drop PassRefPtr class from WTF
2522 https://bugs.webkit.org/show_bug.cgi?id=172091
2524 Reviewed by Alex Christensen.
2526 Drop PassRefPtr class from WTF as it is no longer used or needed.
2527 Also drop RefPtr::release() for the same reasons.
2529 * WTF.xcodeproj/project.pbxproj:
2530 * wtf/CMakeLists.txt:
2531 * wtf/CrossThreadCopier.cpp:
2532 * wtf/CrossThreadCopier.h:
2534 * wtf/PassRefPtr.h: Removed.
2536 (WTF::refIfNotNull):
2537 (WTF::derefIfNotNull):
2538 (WTF::RefPtr::RefPtr):
2539 (WTF::RefPtr::release): Deleted.
2540 * wtf/SizeLimits.cpp:
2543 2017-05-13 Chris Dumez <cdumez@apple.com>
2545 Stop using RefPtr::release()
2546 https://bugs.webkit.org/show_bug.cgi?id=172074
2548 Reviewed by Geoffrey Garen.
2550 * wtf/win/WorkQueueWin.cpp:
2551 (WTF::WorkQueue::dispatchAfter):
2553 2017-05-13 Commit Queue <commit-queue@webkit.org>
2555 Unreviewed, rolling out r216808.
2556 https://bugs.webkit.org/show_bug.cgi?id=172075
2558 caused lldb to hang when debugging (Requested by smfr on
2563 "Use Mach exceptions instead of signals where possible"
2564 https://bugs.webkit.org/show_bug.cgi?id=171865
2565 http://trac.webkit.org/changeset/216808
2567 2017-05-12 Keith Miller <keith_miller@apple.com>
2569 Use Mach exceptions instead of signals where possible
2570 https://bugs.webkit.org/show_bug.cgi?id=171865
2572 Reviewed by Mark Lam.
2574 This patch enables using mach exceptions on darwin. The way the
2575 mach exception api works is that we create a mach port, which is
2576 like a file descriptor. We then wait for a message to arrive on
2577 that port in a thread. When another thread raises an exception (say
2578 due to a bad memory access) the OS sends our thread a message. The
2579 payload of that message is the register file of the crashing
2580 thread. We then call our custom handlers that change the state as
2581 needed. In order to restart the thread we send a payload back to
2582 the OS with an updated register file along with a success message
2585 This patch also makes thread messages work without signals by
2586 simply suspending the thread, and then running the message at that
2589 You can read more about mach exceptions here:
2590 http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/exception.ps
2591 and the Mach interface Generator (MiG) here:
2592 http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/unpublished/mig.ps
2594 * Configurations/WTF.xcconfig:
2595 * WTF.xcodeproj/project.pbxproj:
2597 * wtf/PlatformRegisters.h:
2598 (WTF::registersFromUContext):
2599 * wtf/StackBounds.h:
2600 (WTF::StackBounds::StackBounds):
2601 * wtf/ThreadHolder.cpp:
2602 (WTF::ThreadHolder::~ThreadHolder):
2603 * wtf/ThreadMessage.cpp:
2604 (WTF::sendMessageUsingSignal):
2605 (WTF::sendMessageUsingMach):
2606 (WTF::deliverMessagesUsingMach):
2607 (WTF::sendMessageScoped):
2608 * wtf/ThreadMessage.h:
2611 (WTF::Thread::machThread):
2612 * wtf/mac/MachExceptions.defs: Copied from Source/WTF/wtf/ThreadMessage.h.
2613 * wtf/threads/Signals.cpp:
2614 (WTF::startMachExceptionHandlerThread):
2615 (WTF::fromMachException):
2617 (WTF::handleSignalsWithMach):
2618 (WTF::setExceptionPorts):
2619 (WTF::activeThreads):
2620 (WTF::registerThreadForMachExceptionHandling):
2621 (WTF::unregisterThreadForMachExceptionHandling):
2622 (WTF::installSignalHandler):
2623 (WTF::jscSignalHandler):
2624 * wtf/threads/Signals.h:
2626 2017-05-12 Ting-Wei Lan <lantw44@gmail.com>
2628 Include algorithm before using std::min
2629 https://bugs.webkit.org/show_bug.cgi?id=171733
2631 Reviewed by Chris Dumez.
2633 * wtf/text/StringCommon.h:
2635 2017-05-12 Andreas Kling <akling@apple.com>
2637 More aggressive memory kill limits.
2638 https://bugs.webkit.org/show_bug.cgi?id=172037
2639 <rdar://problem/31969082>
2641 Reviewed by Michael Saboff.
2643 Bring down the memory kill limits to 4GB for active processes, and 2GB for inactive.
2644 Also make MemoryUsagePolicy::Strict kick in above 1.5GB.
2646 * wtf/MemoryPressureHandler.cpp:
2647 (WTF::MemoryPressureHandler::thresholdForMemoryKill):
2648 (WTF::thresholdForPolicy):
2650 2017-05-12 Michael Saboff <msaboff@apple.com>
2652 [iOS] Use memory footprint to dynamically adjust behavior of allocators
2653 https://bugs.webkit.org/show_bug.cgi?id=171944
2655 Reviewed by Filip Pizlo.
2657 Moved the non-Windows implementation of RAMSize() to bmalloc/AvailableMemory.cpp and
2658 called the function availableMemory().
2661 (WTF::computeRAMSize):
2663 2017-05-12 Claudio Saavedra <csaavedra@igalia.com>
2665 [WPE] Add MemoryFootprintLinux to build
2667 Unreviewed build fix after r216731.
2669 * wtf/PlatformWPE.cmake:
2671 2017-05-12 Csaba Osztrogonác <ossy@webkit.org>
2673 Unreviewed trivial JSCOnly buildfix after r216731.
2674 https://bugs.webkit.org/show_bug.cgi?id=171693
2676 * wtf/PlatformJSCOnly.cmake:
2678 2017-05-11 Yusuke Suzuki <utatane.tea@gmail.com>
2680 [Win] Implement memoryFootprint for Windows
2681 https://bugs.webkit.org/show_bug.cgi?id=171693
2683 Reviewed by Alex Christensen.
2685 This patch implements memoryFootprint for Windows. In Windows, we calculate the size
2686 of private working set. This can be done by enumerating private pages in working set.
2688 And we also split MemoryFootprint.cpp to cocoa, linux, and win versions.
2690 * WTF.xcodeproj/project.pbxproj:
2691 * wtf/CMakeLists.txt:
2693 (WTF::MallocPtr::operator*):
2694 (WTF::MallocPtr::operator->):
2695 * wtf/PlatformGTK.cmake:
2696 * wtf/PlatformJSCOnly.cmake:
2697 * wtf/PlatformMac.cmake:
2698 * wtf/PlatformWin.cmake:
2699 * wtf/cocoa/MemoryFootprintCocoa.cpp: Copied from Source/WTF/wtf/MemoryFootprint.cpp.
2700 (WTF::memoryFootprint):
2701 * wtf/linux/MemoryFootprintLinux.cpp: Renamed from Source/WTF/wtf/MemoryFootprint.cpp.
2703 (WTF::memoryFootprint):
2704 * wtf/win/MemoryFootprintWin.cpp: Added.
2705 (WTF::memoryFootprint):
2707 2017-05-11 Don Olmstead <don.olmstead@am.sony.com>
2709 [CMake] Add HAVE check for regex.h
2710 https://bugs.webkit.org/show_bug.cgi?id=171950
2712 Reviewed by Michael Catanzaro.
2716 2017-05-11 Chris Dumez <cdumez@apple.com>
2718 Annotate Ref::ptr() with RETURNS_NONNULL
2719 https://bugs.webkit.org/show_bug.cgi?id=171996
2721 Reviewed by Andreas Kling.
2723 Annotate Ref::ptr() with RETURNS_NONNULL as it can never return null.
2726 (WTF::Ref::ptr): Deleted.
2728 2017-05-11 Joseph Pecoraro <pecoraro@apple.com>
2730 Remove Vibration API
2731 https://bugs.webkit.org/show_bug.cgi?id=171766
2733 Rubber-stamped by Alexey Proskuryakov.
2735 * wtf/FeatureDefines.h:
2737 2017-05-09 Sam Weinig <sam@webkit.org>
2739 Remove support for legacy Notifications
2740 https://bugs.webkit.org/show_bug.cgi?id=171487
2742 Reviewed by Jon Lee.
2744 * wtf/FeatureDefines.h:
2745 Remove definition of ENABLE_LEGACY_NOTIFICATIONS.
2747 2017-05-10 Adrian Perez de Castro <aperez@igalia.com>
2749 Remove some last remnants of the EFL port
2750 https://bugs.webkit.org/show_bug.cgi?id=171922
2752 Reviewed by Antonio Gomes.
2754 The EFL port is no more.
2756 * wtf/PlatformEfl.cmake: Removed.
2758 2017-05-10 Fujii Hironori <Hironori.Fujii@sony.com>
2760 [Win] StaticStringImpl in HTMLNames.cpp aren't constructed
2761 https://bugs.webkit.org/show_bug.cgi?id=171800
2763 Reviewed by Yusuke Suzuki.
2765 Global variables of StaticStringImpl in HTMLNames.cpp aren't
2766 constructed on Windows since Bug 171586. It seems that
2767 reinterpret_cast prevents constexpr's compile time initialization
2770 * wtf/text/StringImpl.h:
2771 (WTF::StringImplShape::StringImplShape): Added const char* and
2772 const char16_t* members in the union. Do not use reinterpret_cast
2773 in constexpr constructors.
2775 2017-05-09 Mark Lam <mark.lam@apple.com>
2777 Force StaticStringImpl constructor to use the constexpr versions of StringImplShape constructors.
2778 https://bugs.webkit.org/show_bug.cgi?id=171861
2780 Reviewed by Yusuke Suzuki.
2782 This is strictly necessary for correctness of the StaticStringImpl implementation.
2783 We force the constructor selection by adding an extra dummy argument to the
2784 constexpr versions of the StringImplShape constructors to disambiguate them from
2785 the non-constexpr versions.
2787 * wtf/text/StringImpl.h:
2788 (WTF::StringImplShape::StringImplShape):
2789 (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
2791 2017-05-09 Zan Dobersek <zdobersek@igalia.com>
2793 Upstream the WPE port
2794 https://bugs.webkit.org/show_bug.cgi?id=171110
2796 Reviewed by Alex Christensen.
2799 * wtf/PlatformWPE.cmake: Added.
2800 * wtf/glib/RunLoopSourcePriority.h:
2802 2017-05-08 Mark Lam <mark.lam@apple.com>
2804 Speculative Windows build fix after r216428.
2805 https://bugs.webkit.org/show_bug.cgi?id=171776
2811 2017-05-08 Mark Lam <mark.lam@apple.com>
2813 Introduce ExceptionScope::assertNoException() and releaseAssertNoException().
2814 https://bugs.webkit.org/show_bug.cgi?id=171776
2816 Reviewed by Keith Miller.
2818 1. Add an option to skip some number of top frames when capturing the StackTrace.
2819 2. Add an option to use an indentation string when dumping the StackTrace.
2821 * wtf/StackTrace.cpp:
2822 (WTF::StackTrace::captureStackTrace):
2823 (WTF::StackTrace::dump):
2826 2017-05-05 Yusuke Suzuki <utatane.tea@gmail.com>
2828 [WTF] Use memoryFootprint for MemoryUsage retrieval in Linux
2829 https://bugs.webkit.org/show_bug.cgi?id=171757
2831 Reviewed by Michael Catanzaro.
2833 This patch leverages memoryFootprint() to retrieve physical footprint in Linux.
2835 * wtf/linux/MemoryPressureHandlerLinux.cpp:
2836 (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
2838 2017-05-05 Don Olmstead <don.olmstead@am.sony.com>
2840 [WTF] Do not export deleted constructor in StringView
2841 https://bugs.webkit.org/show_bug.cgi?id=171751
2843 Reviewed by Alexey Proskuryakov.
2845 * wtf/text/StringView.h:
2847 2017-05-05 Yusuke Suzuki <utatane.tea@gmail.com>
2849 [GTK][JSCOnly] Merge MainThread implementations and use generic one
2850 https://bugs.webkit.org/show_bug.cgi?id=171738
2852 Reviewed by Michael Catanzaro.
2854 GLib MainThread implementation is generic enough to be used in JSCOnly.
2855 We move it to generic/ and GTK (GLib ports) and JSCOnly use it.
2856 And we also drop GLib MainThread's isMainThread function because
2857 generic thread ID one is enough.
2859 This patch also cleans up initializing main thread code by using std::call_once.
2861 * wtf/MainThread.cpp:
2862 (WTF::initializeMainThread):
2863 (WTF::isMainThread):
2864 (WTF::initializeMainThreadToProcessMainThread):
2865 (WTF::initializeWebThread):
2866 (WTF::canAccessThreadLocalDataForThread):
2867 (WTF::initializeMainThreadOnce): Deleted.
2868 (WTF::initializeMainThreadToProcessMainThreadOnce): Deleted.
2869 (WTF::initializeWebThreadOnce): Deleted.
2870 * wtf/PlatformGTK.cmake:
2871 * wtf/PlatformJSCOnly.cmake:
2872 * wtf/generic/MainThreadGeneric.cpp:
2873 (WTF::MainThreadDispatcher::MainThreadDispatcher):
2874 (WTF::MainThreadDispatcher::schedule):
2875 (WTF::MainThreadDispatcher::fired):
2876 (WTF::scheduleDispatchFunctionsOnMainThread):
2877 * wtf/glib/MainThreadGLib.cpp: Removed.
2879 2017-05-04 Commit Queue <commit-queue@webkit.org>
2881 Unreviewed, rolling out r216206.
2882 https://bugs.webkit.org/show_bug.cgi?id=171714
2884 Multiple LayoutTests crashing in Document::page() (Requested
2889 "Remove support for legacy Notifications"
2890 https://bugs.webkit.org/show_bug.cgi?id=171487
2891 http://trac.webkit.org/changeset/216206
2893 2017-05-04 Don Olmstead <don.olmstead@am.sony.com>
2895 [Win] Remove redundant macros that are set in the CMake config
2896 https://bugs.webkit.org/show_bug.cgi?id=171571
2898 Reviewed by Brent Fulgham.
2902 2017-05-04 Mark Lam <mark.lam@apple.com>
2904 NeverDestroyed<String>(ASCIILiteral(...)) is not thread safe.
2905 https://bugs.webkit.org/show_bug.cgi?id=171586
2906 <rdar://problem/31873190>
2908 Reviewed by Yusuke Suzuki.
2910 StaticStringImpl is meant to be thread-safe. However, it has a bug: it did not
2911 set the s_hashFlagDidReportCost flag. As a result, if cost() is called on it,
2912 different threads may try to change its flags bits at the same time. This patch
2913 changes StaticStringImpl to always set the s_hashFlagDidReportCost flag.
2915 Also factored out StringImplShape and made StringImpl and StaticStringImpl extend
2916 it. This makes it more clear that the 2 are intended to have the same shape.
2917 Note: there is already a static_assert that the 2 have the same size. This
2918 change also ensures that they both have the same shape, which is a requirement in
2919 order for StaticStringImpl to work.
2921 Introduced the MAKE_STATIC_STRING_IMPL macro as a convenient way to instantiate
2922 StaticStringImpls from literal strings. This allows us to trivially change
2924 NeverDestroyed<String> myString(ASCIILiteral("myString"));
2928 NeverDestroyed<String> myString(MAKE_STATIC_STRING_IMPL("myString"));
2930 and by so doing, make it thread-safe.
2932 MAKE_STATIC_STRING_IMPL instantiates a lambda function to create the static
2935 * wtf/text/StringImpl.h:
2936 (WTF::StringImplShape::StringImplShape):
2937 (WTF::StringImpl::StringImpl):
2938 (WTF::StringImpl::cost):
2939 (WTF::StringImpl::setHash):
2940 (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
2941 (WTF::StringImpl::StaticStringImpl::operator StringImpl&):
2942 * wtf/text/WTFString.h:
2943 (WTF::String::String):
2944 * wtf/text/icu/TextBreakIteratorICU.h:
2947 2017-05-04 Sam Weinig <sam@webkit.org>
2949 Remove support for legacy Notifications
2950 https://bugs.webkit.org/show_bug.cgi?id=171487
2952 Reviewed by Jon Lee.
2954 * wtf/FeatureDefines.h:
2955 Remove definition of ENABLE_LEGACY_NOTIFICATIONS.
2957 2017-05-04 Yusuke Suzuki <utatane.tea@gmail.com>
2959 [GTK][JSCOnly] Implement memoryFootprint for Linux
2960 https://bugs.webkit.org/show_bug.cgi?id=171680
2962 Reviewed by Carlos Alberto Lopez Perez.
2964 Darwin's phys_footprint returns the amount of dirty anonymous memory in the process.
2965 This patch implements the same thing in Linux by reading /proc/self/smaps.
2966 We sum sizes of private dirty pages in anonymous regions.
2968 * wtf/MemoryFootprint.cpp:
2970 (WTF::memoryFootprint):
2972 2017-05-03 Mark Lam <mark.lam@apple.com>
2974 Use the CLoop for CPU(ARM64E).
2975 https://bugs.webkit.org/show_bug.cgi?id=171620
2976 <rdar://problem/31973027>
2978 Reviewed by Geoffrey Garen.
2982 2017-05-02 Daniel Bates <dabates@apple.com>
2984 Fix the build after <https://trac.webkit.org/changeset/216102>
2985 (https://bugs.webkit.org/show_bug.cgi?id=170925)
2987 Export into global scope ASCIICaseInsensitiveStringViewHashTranslator.
2989 Also fix indentation of member functions of ASCIICaseInsensitiveStringViewHashTranslator.
2991 * wtf/text/StringHash.h:
2993 2017-05-02 Daniel Bates <dabates@apple.com>
2995 Using StringView.split() instead of String.split() in some places
2996 https://bugs.webkit.org/show_bug.cgi?id=170925
2998 Reviewed by Darin Adler and Sam Weinig.
3000 * wtf/HashMap.h: Add HashMap::get() overload that takes a HashTranslator.
3001 * wtf/text/StringHash.h:
3002 (WebCore::ASCIICaseInsensitiveStringViewHashTranslator::hash): Added.
3003 (WebCore::ASCIICaseInsensitiveStringViewHashTranslator::equal): Added.
3005 2017-05-01 Dan Bernstein <mitz@apple.com>
3007 [Xcode] It’s easy to accidentally install a WTF header outside /usr/local/include/wtf
3008 https://bugs.webkit.org/show_bug.cgi?id=171533
3010 Reviewed by Andy Estes.
3012 * WTF.xcodeproj/project.pbxproj: Removed the WTF target’s Headers build phase. Its existence
3013 was making it easy to accidentally add a header to the target and make it Private, which
3014 would have Xcode install a copy of it right under /usr/local/include, in addition to the
3015 copy installed under /usr/local/include/wtf by the Copy WTF Headers target.
3016 Also got rid of INSTALL_PATH_PREFIX in the script build phase in the Copy WTF Headers
3017 target, because it is being never set anymore.
3019 2017-05-01 Dan Bernstein <mitz@apple.com>
3021 WTF installs an extra copy of a header outside /usr/local/include/wtf
3023 * WTF.xcodeproj/project.pbxproj: Demoted CPUTime.h from Private to Project.
3025 2017-05-01 Daniel Bates <dabates@apple.com>
3027 Cleanup: Change ASCIICaseInsensitiveHash from a class to a struct
3028 https://bugs.webkit.org/show_bug.cgi?id=171460
3030 Reviewed by Sam Weinig.
3032 All of the members of ASCIICaseInsensitiveHash have public visibility.
3033 We are underutilizing the purpose of a class - defaults to private
3034 visibility of members. We should change ASCIICaseInsensitiveHash from
3035 a class to a struct, which by definition defaults to public visibility
3038 * wtf/text/StringHash.h:
3040 2017-04-29 Yusuke Suzuki <utatane.tea@gmail.com>
3042 Move WebCore CPUTime to WTF and implement it in all the platforms
3043 https://bugs.webkit.org/show_bug.cgi?id=171477
3045 Reviewed by Chris Dumez.
3047 We move WebCore::CPUTime to WTF::CPUTime since it is useful even in JSC
3048 and it does not depend on any external libraries.
3049 And we additionally implement WTF::CPUTime in all the platforms: Windows and Unix.
3051 In CPUTime, instead of holding int64_t, we hold MonotonicTime and Seconds.
3053 * WTF.xcodeproj/project.pbxproj:
3054 * wtf/CMakeLists.txt:
3055 * wtf/CPUTime.cpp: Copied from Source/WebCore/platform/CPUTime.cpp.
3056 (WTF::CPUTime::percentageCPUUsageSince):
3057 * wtf/CPUTime.h: Renamed from Source/WebCore/platform/CPUTime.h.
3058 * wtf/PlatformEfl.cmake:
3059 * wtf/PlatformGTK.cmake:
3060 * wtf/PlatformJSCOnly.cmake:
3061 * wtf/PlatformMac.cmake:
3062 * wtf/PlatformWin.cmake:
3063 * wtf/cocoa/CPUTimeCocoa.mm: Renamed from Source/WebCore/platform/cocoa/CPUTimeCocoa.mm.
3064 (WTF::timeValueToMicroseconds):
3065 (WTF::CPUTime::get):
3066 * wtf/unix/CPUTimeUnix.cpp: Renamed from Source/WebCore/platform/CPUTime.cpp.
3067 (WTF::timevalToSeconds):
3068 (WTF::CPUTime::get):
3069 * wtf/win/CPUTimeWin.cpp: Added.
3070 (WTF::fileTimeToSeconds):
3071 (WTF::CPUTime::get):
3073 2017-04-28 Simon Fraser <simon.fraser@apple.com>
3075 Add system trace points for Document::updateTouchEventRegions()
3076 https://bugs.webkit.org/show_bug.cgi?id=171470
3077 rdar://problem/31901239
3079 Reviewed by Tim Horton.
3081 Add trace markers for updateTouchEventRegions.
3083 * wtf/SystemTracing.h:
3085 2017-04-28 Daniel Bates <dabates@apple.com>
3087 Add StringView::toExistingAtomicString()
3088 https://bugs.webkit.org/show_bug.cgi?id=171405
3090 Reviewed by Andreas Kling.
3092 Similar to the reasons for JSString::toExistingAtomicString() we should expose a way to
3093 convert a StringView to an existing atomic string. Looking up an atomic string is more
3094 efficient that creating one, which requires a lookup and memory allocation.
3096 We are not making use of StringView::toExistingAtomicString() now, but will in the patch
3097 for <https://bugs.webkit.org/show_bug.cgi?id=170925>.
3099 * wtf/text/AtomicStringImpl.cpp:
3100 (WTF::AtomicStringImpl::lookUp): Modified to take a const LChar*/UChar*.
3101 (WTF::AtomicStringImpl::lookUpInternal): Renamed to AtomicStringImpl::lookup() to avoid
3102 an extra function call.
3103 * wtf/text/AtomicStringImpl.h:
3104 * wtf/text/StringView.h:
3105 (WTF::StringView::toExistingAtomicString): Added.
3107 2017-04-28 Chris Dumez <cdumez@apple.com>
3109 Update DOMTokenList.replace() to match the latest DOM specification
3110 https://bugs.webkit.org/show_bug.cgi?id=171388
3112 Reviewed by Alex Christensen.
3114 Add Vector::findMatching() API which takes in a lambda function for convenience.
3115 Add optional startIndex parameter to Vector::removeFirstMatching() / removeAllMatching()
3116 to remove items only after given index.
3119 (WTF::minCapacity>::findMatching):
3120 (WTF::minCapacity>::find):
3121 (WTF::minCapacity>::removeFirstMatching):
3122 (WTF::minCapacity>::removeAllMatching):
3124 2017-04-27 Carlos Garcia Campos <cgarcia@igalia.com>
3126 Move UUID from WebCore/platform to WTF
3127 https://bugs.webkit.org/show_bug.cgi?id=171372
3129 Reviewed by Michael Catanzaro.
3131 * WTF.xcodeproj/project.pbxproj:
3132 * wtf/CMakeLists.txt:
3133 * wtf/UUID.cpp: Renamed from Source/WebCore/platform/UUID.cpp.
3134 * wtf/UUID.h: Renamed from Source/WebCore/platform/UUID.h.
3136 2017-04-26 Keith Miller <keith_miller@apple.com>
3138 LocklessBag needs a destructor
3139 https://bugs.webkit.org/show_bug.cgi?id=171334
3141 Reviewed by Mark Lam.
3143 Currently, if the bag is destructed any remaining nodes in the bag will
3146 * wtf/LocklessBag.h:
3147 (WTF::LocklessBag::consumeAll):
3148 (WTF::LocklessBag::~LocklessBag):
3149 * wtf/threads/Signals.cpp:
3150 (WTF::jscSignalHandler):
3151 (WTF::installSignalHandler):
3153 2017-04-26 Don Olmstead <don.olmstead@am.sony.com>
3155 [ARM] Enable GCC visibility
3156 https://bugs.webkit.org/show_bug.cgi?id=171296
3158 Reviewed by Michael Catanzaro.
3162 2017-04-26 Yusuke Suzuki <utatane.tea@gmail.com>
3164 sendMessageScoped's signal handler calls LocklessBag::consumeAll, which causes heap deallocation in signal handler and leads deadlock
3165 https://bugs.webkit.org/show_bug.cgi?id=171319
3167 Reviewed by Keith Miller.
3169 In sendMessageScoped, we call LocklessBag<SignalHandler>::consumeAll `thread->threadMessages().consumeAll()`.
3170 In LocklessBag::consumeAll, we call `delete` on Nodes.
3171 The problem is that this is called under the context of signal handler. Thus, when calling this, the original
3172 thread may hold the lock in bmalloc. In that case, this `delete` call attempts to lock the heap lock recursively,
3173 and causes deadlock.
3175 Instead, this patch transfers the LocklessBag's Node to the sender thread. And the sender thread deletes it instead.
3177 * wtf/LocklessBag.h:
3178 (WTF::LocklessBag::consumeAllWithNode):
3179 * wtf/ThreadMessage.cpp:
3180 (WTF::ThreadMessageData::ThreadMessageData):
3181 (WTF::sendMessageScoped):
3183 2017-04-25 Don Olmstead <don.olmstead@am.sony.com>
3185 [Win] Use Clang's __has_declspec_attribute for export macros
3186 https://bugs.webkit.org/show_bug.cgi?id=171240
3188 Reviewed by Alex Christensen.
3191 * wtf/ExportMacros.h:
3194 2017-04-25 Keith Miller <keith_miller@apple.com>
3196 Our signal handler shouldn't print when sigaction succeeds
3197 https://bugs.webkit.org/show_bug.cgi?id=171286
3199 Reviewed by Michael Saboff.
3201 It turns out !result is not the same as !!result.
3203 * wtf/threads/Signals.cpp:
3204 (WTF::jscSignalHandler):
3206 2017-04-25 Myles C. Maxfield <mmaxfield@apple.com>
3208 Add performance test for FontCache::systemFallbackForCharacters()
3209 https://bugs.webkit.org/show_bug.cgi?id=170842
3211 Reviewed by Tim Horton.
3213 * wtf/unicode/CharacterNames.h:
3215 2017-04-24 Andy VanWagoner <thetalecrafter@gmail.com>
3217 Clean up ICU headers
3218 https://bugs.webkit.org/show_bug.cgi?id=170997
3220 Reviewed by JF Bastien.
3222 Update all icu headers to 55.1
3224 * icu/LICENSE: Update copyright
3225 * icu/README: Explain ICU headers for OS X better
3226 * icu/unicode/localpointer.h:
3227 (LocalPointer::LocalPointer):
3228 (LocalPointer::adoptInsteadAndCheckErrorCode):
3229 * icu/unicode/platform.h:
3230 * icu/unicode/putil.h:
3231 * icu/unicode/std_string.h:
3232 * icu/unicode/ubrk.h:
3233 * icu/unicode/uchar.h:
3234 * icu/unicode/ucnv.h:
3235 * icu/unicode/ucol.h:
3236 * icu/unicode/uconfig.h:
3237 * icu/unicode/ucurr.h:
3238 * icu/unicode/uloc.h:
3239 * icu/unicode/umachine.h:
3240 * icu/unicode/unistr.h:
3241 (UnicodeString::getArrayStart):
3242 (UnicodeString::UnicodeString):
3243 (UnicodeString::hasShortLength):
3244 (UnicodeString::getShortLength):
3245 (UnicodeString::length):
3246 (UnicodeString::getCapacity):
3247 (UnicodeString::isBogus):
3248 (UnicodeString::isWritable):
3249 (UnicodeString::isBufferWritable):
3250 (UnicodeString::getBuffer):
3251 (UnicodeString::isEmpty):
3252 (UnicodeString::setZeroLength):
3253 (UnicodeString::setShortLength):
3254 (UnicodeString::setLength):
3255 (UnicodeString::setToEmpty):
3256 (UnicodeString::remove):
3257 * icu/unicode/urename.h:
3258 * icu/unicode/uscript.h:
3259 * icu/unicode/uset.h:
3260 * icu/unicode/ustring.h:
3261 * icu/unicode/utf8.h:
3262 * icu/unicode/utypes.h:
3263 * icu/unicode/uvernum.h:
3265 2017-04-24 Yusuke Suzuki <utatane.tea@gmail.com>
3267 Unreviewed, fix Windows build after r215715
3268 https://bugs.webkit.org/show_bug.cgi?id=171199
3272 2017-04-24 Yusuke Suzuki <utatane.tea@gmail.com>
3274 [WTF] Move JSC tools/StackTrace to WTF and unify stack trace dump code
3275 https://bugs.webkit.org/show_bug.cgi?id=171199
3277 Reviewed by Mark Lam.
3279 JSC tools/StackTrace's dump code is almost identical to WTF Assertions'
3280 stack trace dump code. This patch moves tools/StackTrace to WTF and use
3281 it in Assertions. It unifies the two duplicate implementations into one.
3283 * WTF.xcodeproj/project.pbxproj:
3284 * wtf/Assertions.cpp:
3285 * wtf/CMakeLists.txt:
3287 * wtf/StackTrace.cpp: Renamed from Source/JavaScriptCore/tools/StackTrace.cpp.
3288 (WTF::StackTrace::captureStackTrace):
3289 (WTF::StackTrace::dump):
3290 * wtf/StackTrace.h: Copied from Source/JavaScriptCore/tools/StackTrace.h.
3291 (WTF::StackTrace::StackTrace):
3292 (WTF::StackTrace::stack):
3293 (WTF::StackTrace::DemangleEntry::mangledName):
3294 (WTF::StackTrace::DemangleEntry::demangledName):
3295 (WTF::StackTrace::DemangleEntry::DemangleEntry):
3296 * wtf/SystemFree.h: Renamed from Source/JavaScriptCore/tools/StackTrace.h.
3297 (WTF::SystemFree::operator()):
3299 2017-04-24 Yusuke Suzuki <utatane.tea@gmail.com>
3301 [AppleWin] The procedure entry point ?waitForThreadCompletion@WTF@@YAHI@Z could not be located in the dynamic link library WebKitQuartzCoreAdditions.dll
3302 https://bugs.webkit.org/show_bug.cgi?id=171029
3304 Reviewed by Brent Fulgham.
3306 While WTF Threading APIs are updated, WebKitQuartzCoreAdditions.dll in Windows uses some of the old APIs,
3307 waitForThreadCompletion and createThread. This patch implements both on top of the new APIs.
3308 These APIs are only exposed in Windows for this compatibility problem and new code should not use it.
3310 * wtf/ThreadHolder.cpp:
3311 (WTF::ThreadHolder::initialize):
3312 * wtf/ThreadHolder.h:
3313 * wtf/ThreadHolderWin.cpp:
3314 (WTF::ThreadHolder::get):
3315 (WTF::ThreadHolder::platformInitialize):
3316 (WTF::ThreadHolder::destruct):
3318 * wtf/ThreadingWin.cpp:
3319 (WTF::createThread):
3320 (WTF::waitForThreadCompletion):
3322 2017-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
3324 [GTK] Switch to use ENABLE_REMOTE_INSPECTOR instead of ENABLE_INSPECTOR_SERVER for the remote inspector
3325 https://bugs.webkit.org/show_bug.cgi?id=166680
3327 Reviewed by Michael Catanzaro.
3329 Add GRefPtr hash traits to allow using GRefPtr as a key of HashMaps.
3331 * wtf/glib/GRefPtr.h:
3332 (WTF::HashTraits<GRefPtr<P>>::emptyValue):
3333 (WTF::HashTraits<GRefPtr<P>>::peek):
3334 (WTF::HashTraits<GRefPtr<P>>::customDeleteBucket):
3336 2017-04-22 Yusuke Suzuki <utatane.tea@gmail.com>
3338 [JSC] Get stack pointer without pthread attr
3339 https://bugs.webkit.org/show_bug.cgi?id=171162
3341 Reviewed by Mark Lam.
3343 If HAVE(MACHINE_CONTEXT) is not enabled, we get stack base and boundary by using
3344 pthread_attr functions. However, it is wrong since this function can be called
3345 after the thread is suspended. In that case, we should not call any functions
3346 that is not async signal safe. For example, pthread_getattr_np calls malloc.
3348 Instead we use getApproximateStackPointer(), which returns approximate stack pointer.
3351 * wtf/ThreadingPthreads.cpp:
3352 (WTF::getApproximateStackPointer):
3353 (WTF::isOnAlternativeSignalStack):
3354 When gathering conservative roots, we should keep stack pointer pointing stack.
3355 And if concurrent GC is enabled, we always need to keep the above invariant.
3356 So, we do not support alternative signal stack.
3358 (WTF::Thread::signalHandlerSuspendResume):
3359 (WTF::Thread::getRegisters):
3361 2017-04-22 Yusuke Suzuki <utatane.tea@gmail.com>
3363 REGRESSION(r215638): [Linux] Several worker tests are crashing in Thread::signalHandlerSuspendResume after r215638
3364 https://bugs.webkit.org/show_bug.cgi?id=171159
3366 Reviewed by Michael Catanzaro.
3368 Now, SIGUSR2 is used by ThreadMessage. Instead SIGUSR1 becomes empty.
3369 We should use some signal, that is not managed by WTF Signal mechanism
3370 because the behaivor of this suspend and resume is a bit tricky.
3371 For example, we set a bit tricky signal mask to sigaction to temporary
3372 block SIGUSR2 in the handler to avoid nested SIGUSR2. And we cannot
3373 use ThreadMessage to implement this mechanism because this suspend
3374 and resume handler will stop in the middle of the handler by sigsuspend.
3375 It is not the expected semantics by ThreadMessage.
3377 So now, we use SIGUSR1 instead. And we note that SIGUSR1 is used for
3380 * wtf/ThreadingPthreads.cpp:
3381 * wtf/threads/Signals.h:
3383 2017-04-20 Sam Weinig <sam@webkit.org>
3385 Split cryptographic digest computation and parsing out of CSP code so it can be reused
3386 https://bugs.webkit.org/show_bug.cgi?id=171076
3388 Reviewed by Chris Dumez.
3390 * wtf/text/Base64.cpp:
3391 (WTF::base64Decode):
3392 (WTF::base64URLDecode):
3393 Add overloads for base64Decode and base64URLDecode that take a StringView, to avoid allocations
3396 * wtf/text/Base64.h:
3397 (WTF::isBase64OrBase64URLCharacter):
3398 Move helper predicate used for parsing either type of Base64 encoded string from WebCore.
3400 2017-04-21 Keith Miller <keith_miller@apple.com>
3402 Unreviewed, rolling out r215634.
3404 underlying build issues should have been fixed
3408 "Unreviewed, rolling out r215620 and r215623."
3409 https://bugs.webkit.org/show_bug.cgi?id=171139
3410 http://trac.webkit.org/changeset/215634
3412 2017-04-21 Keith Miller <keith_miller@apple.com>
3414 Remove LL/SC from Atomics
3415 https://bugs.webkit.org/show_bug.cgi?id=171141
3417 Reviewed by Saam Barati.
3419 Adding load link and store conditionally was not an actual progression
3420 and the existing code is causing problems for users of Atomics. So let's
3425 (WTF::Atomic::exchange):
3426 (WTF::Atomic::transaction):
3427 (WTF::Atomic::transactionRelaxed):
3428 (WTF::Atomic::prepare): Deleted.
3429 (WTF::Atomic::attempt): Deleted.
3431 (WTF::WordType>::concurrentTestAndSet):
3432 (WTF::WordType>::concurrentTestAndClear):
3433 * wtf/LockAlgorithm.h:
3434 (WTF::LockAlgorithm::lockFast):
3435 (WTF::LockAlgorithm::unlockFast):
3437 2017-04-21 Commit Queue <commit-queue@webkit.org>
3439 Unreviewed, rolling out r215620 and r215623.
3440 https://bugs.webkit.org/show_bug.cgi?id=171139
3442 broke arm64 build (Requested by keith_miller on #webkit).
3444 Reverted changesets:
3447 https://bugs.webkit.org/show_bug.cgi?id=170976
3448 http://trac.webkit.org/changeset/215620
3450 "Unreviewed, fix Cloop build."
3451 http://trac.webkit.org/changeset/215623
3453 2017-04-20 Keith Miller <keith_miller@apple.com>
3456 https://bugs.webkit.org/show_bug.cgi?id=170976
3458 Reviewed by Filip Pizlo.
3460 This patch adds a bunch of new functionality to WTF. First, it add
3461 a new data structure of a lockless bag. The LocklessBag class can
3462 be used as either a multi-writer multi-reader lockless bag or a
3463 multi-writer single consumer lockless bag.
3465 Next, this patch adds an abstraction around sigaction in WTF.
3466 Basically, you can add a handler, which can be an arbitrary
3467 lambda. Although it should still be safe for the signal you are
3468 handling. the signal handler manager will then do all the
3469 appropriate handling of chaining:
3471 In the SIGUSR case we always forward the signal to any other
3472 non-default handler installed before us. We need to do this,
3473 otherwise, since it's not possible to tell if a SIGUSR was
3474 intended exlusively for our handlers. Signal handlers don't record
3475 how many times they were sent only that there is at least one
3478 In the faulting cases we require that every handle be able to
3479 recognise a fault they installed, vs crashes. If none of our
3480 handlers claim to have handled the fault we will forward the
3481 fault. If a handler was installed before the first fault handler
3482 we simply call that handler and rely on them to take the
3483 appropriate action. If no handler was installed before our first
3484 handler we restore the default handler and allow the fault to
3487 Finally, this patch adds a signal based messaging system. This
3488 system allows the user to run an arbitrary lambda from the SIGUSR2
3489 signal handler of any target WTF::Thread. This is already in use
3490 for the VMTraps API which allows us to kill rogue VMs by sending
3491 the VM's running WTF::Thread a SIGUSR and requesting it jetison
3492 all optimized code and throw an uncatchable exception from all
3493 function entries/loop backedges. In the future, we will also use
3494 this API for Wasm to reset the instruction caches in currently
3495 executing Wasm threads.
3497 * WTF.xcodeproj/project.pbxproj:
3499 (WTF::Atomic::Atomic):
3500 * wtf/LocklessBag.h: Added.
3501 (WTF::LocklessBag::LocklessBag):
3502 (WTF::LocklessBag::add):
3503 (WTF::LocklessBag::iterate):
3504 (WTF::LocklessBag::consumeAll):
3505 * wtf/ThreadMessage.cpp: Added.
3506 (WTF::ThreadMessageData::ThreadMessageData):
3507 (WTF::initializeThreadMessages):
3508 (WTF::sendMessageScoped):
3509 * wtf/ThreadMessage.h: Added.
3511 * wtf/Threading.cpp:
3512 (WTF::initializeThreading):
3514 (WTF::Thread::threadMessages):
3515 * wtf/ThreadingPthreads.cpp:
3516 (WTF::Thread::currentMayBeNull):
3517 (WTF::Thread::current):
3518 (WTF::Thread::signal):
3519 * wtf/threads/Signals.cpp: Added.
3520 (WTF::jscSignalHandler):
3521 (WTF::installSignalHandler):
3522 * wtf/threads/Signals.h: Added.
3523 (WTF::toSystemSignal):
3524 (WTF::fromSystemSignal):
3526 2017-04-21 Konstantin Tokarev <annulen@yandex.ru>
3528 [cmake] WTF target should not have wtf and subdirectries in public interface
3529 https://bugs.webkit.org/show_bug.cgi?id=171115
3531 Reviewed by Michael Catanzaro.
3533 In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
3534 targets as their public interface, so that linked targets can use them
3535 implicitly without copying directory lists around. This matches existing
3536 practice for all targets except WTF, headers from which are always included
3537 with full path starting from "<wtf/...".
3539 Since r209665 it became possible to include headers from wtf or its
3540 subdirectories in CMake builds without using "<wtf/..." path. It should
3543 * wtf/CMakeLists.txt: WTF/wtf and its sudirectories should not be in
3544 public include paths of WTF target.
3546 2017-04-20 Sam Weinig <sam@webkit.org>
3548 Move notFound into its own file
3549 https://bugs.webkit.org/show_bug.cgi?id=170972
3551 Reviewed by Zalan Bujtas.
3553 It is odd to require including <wtf/Vector.h> just to use WTF::notFound.
3554 This is not causing any current problems, but does in few changes I have
3557 * WTF.xcodeproj/project.pbxproj:
3558 * wtf/NotFound.h: Added.
3560 * wtf/text/StringCommon.h:
3562 2017-04-20 Filip Pizlo <fpizlo@apple.com>
3564 Optimize SharedArrayBuffer in the DFG+FTL
3565 https://bugs.webkit.org/show_bug.cgi?id=164108
3567 Reviewed by Saam Barati.
3569 Made small changes as part of benchmarking the JS versions of these locks.
3571 * benchmarks/LockSpeedTest.cpp:
3572 * benchmarks/ToyLocks.h:
3576 2017-04-19 Youenn Fablet <youenn@apple.com>
3578 [Win] Activate streams API by default
3579 https://bugs.webkit.org/show_bug.cgi?id=171000
3581 Reviewed by Brent Fulgham.
3583 * wtf/FeatureDefines.h:
3585 2017-04-19 David Kilzer <ddkilzer@apple.com>
3587 Vector.h: error: 'auto' not allowed in lambda parameter
3588 <https://webkit.org/b/171010>
3589 <rdar://problem/31716076>
3591 Reviewed by Saam Barati.
3594 (WTF::removeRepeatedElements): Replace 'auto' with a specific
3595 type, 'T', based on a Vector<> template type.
3597 2017-04-19 Ryan Haddad <ryanhaddad@apple.com>
3599 Unreviewed, rolling out r215518.
3601 This change appears to have broken the Windows build.
3605 "Move notFound into its own file"
3606 https://bugs.webkit.org/show_bug.cgi?id=170972
3607 http://trac.webkit.org/changeset/215518
3609 2017-04-19 Sam Weinig <sam@webkit.org>
3611 Move notFound into its own file
3612 https://bugs.webkit.org/show_bug.cgi?id=170972
3614 Reviewed by Zalan Bujtas.
3616 It is odd to require including <wtf/Vector.h> just to use WTF::notFound.
3617 This is not causing any current problems, but does in few changes I have
3620 * WTF.xcodeproj/project.pbxproj:
3621 * wtf/NotFound.h: Added.
3623 * wtf/text/StringCommon.h:
3625 2017-04-18 Carlos Garcia Campos <cgarcia@igalia.com>
3627 [GLIB] Define priorities also for async network IO tasks
3628 https://bugs.webkit.org/show_bug.cgi?id=170905
3630 Reviewed by Žan Doberšek.
3632 Add AsyncIONetwork, DiskCacheRead and DiskCacheWrite priorities.
3634 * wtf/glib/RunLoopSourcePriority.h:
3636 2017-04-18 Yusuke Suzuki <utatane.tea@gmail.com>
3638 [JSC][GTK] glib RunLoop does not accept negative start interval
3639 https://bugs.webkit.org/show_bug.cgi?id=170775
3641 Reviewed by Saam Barati.
3643 RunLoop::Timer for glib does not accept negative start interval.
3644 We use 0_s if the given value is negative.
3646 * wtf/glib/RunLoopGLib.cpp:
3647 (WTF::RunLoop::TimerBase::secondsUntilFire):
3649 2017-04-17 Alex Christensen <achristensen@webkit.org>
3651 Allow Variants of RetainPtrs
3652 https://bugs.webkit.org/show_bug.cgi?id=170923
3654 Reviewed by Tim Horton and Sam Weinig.
3657 (WTF::RetainPtr::operator&): Deleted.
3658 Operator& was causing a compile error when making Variant<RetainPtr<T>, ...>
3659 and because it is strange and only used once, let's just remove it.
3663 Use std::addressof instead of operator& which could be overloaded to return any type with any meaning.
3665 2017-04-17 Youenn Fablet <youenn@apple.com>
3667 Disable outdated WritableStream API
3668 https://bugs.webkit.org/show_bug.cgi?id=170749
3669 <rdar://problem/31446233>
3671 Reviewed by Alex Christensen.
3673 Replacing READABLE_STREAM_API, READABLE_BYTE_STREAM_API and WRITABLE_STREAM_API compilation flag by:
3674 - A STREAMS_API compilation flag.
3675 - A ReadableByteStreamAPI and WritableStreamAPI runtime flags, turned off except for RWT and DRT.
3677 * wtf/FeatureDefines.h:
3679 2017-04-17 Dan Bernstein <mitz@apple.com>
3681 [Cocoa] Move isNullFunctionPointer down into WTF
3682 https://bugs.webkit.org/show_bug.cgi?id=170892
3684 Reviewed by Sam Weinig.
3686 Test: TestWebKitAPI/Tests/WTF/darwin/WeakLinking.cpp
3688 * WTF.xcodeproj/project.pbxproj: Added reference to new file.
3689 * wtf/darwin: Added.
3690 * wtf/darwin/WeakLinking.h: Added.
3691 (WTF::isNullFunctionPointer): Copied from ResourceLoadStatisticsClassifierCocoa.cpp in
3692 WebKit2 and changed into a function template that works with any function pointer.
3694 2017-04-17 Ryan Haddad <ryanhaddad@apple.com>
3696 Unreviewed, rolling out r215366.
3698 This test is failing on performance bots.
3702 "Add performance test for asking the platform for a font for
3704 https://bugs.webkit.org/show_bug.cgi?id=170842
3705 http://trac.webkit.org/changeset/215366
3707 2017-04-17 Yusuke Suzuki <utatane.tea@gmail.com>
3709 [JSCOnly] Fix build failures in macOS
3710 https://bugs.webkit.org/show_bug.cgi?id=170887
3712 Reviewed by Alex Christensen.
3714 JSCOnly port does not use mac/MainThread.cpp.
3715 We change the ifdef gurard to use generic implementaion in JSCOnly on macOS.
3717 * wtf/MainThread.cpp:
3718 * wtf/PlatformJSCOnly.cmake:
3720 2017-04-17 JF Bastien <jfbastien@apple.com>
3722 B3: don't allow unsigned offsets in Value
3723 https://bugs.webkit.org/show_bug.cgi?id=170692
3725 Reviewed by Filip Pizlo.
3727 Add C++17's std::conjunction type trait, except for Microsoft VS
3728 2015 update 2 and later because it adds the logical operator type
3729 traits, event when C++ is pre-2017:
3730 https://blogs.msdn.microsoft.com/vcblog/2016/01/22/vs-2015-update-2s-stl-is-c17-so-far-feature-complete/
3732 * wtf/StdLibExtras.h:
3734 2017-04-14 Mark Lam <mark.lam@apple.com>
3736 Update architectures in xcconfig files.
3737 https://bugs.webkit.org/show_bug.cgi?id=170867
3738 <rdar://problem/31628104>
3740 Reviewed by Joseph Pecoraro.
3742 * Configurations/Base.xcconfig:
3744 2017-04-14 Myles C. Maxfield <mmaxfield@apple.com>
3746 Add performance test for asking the platform for a font for U+2060 WORD JOINER
3747 https://bugs.webkit.org/show_bug.cgi?id=170842
3749 Reviewed by Tim Horton.
3751 * wtf/unicode/CharacterNames.h:
3753 2017-04-13 Yusuke Suzuki <utatane.tea@gmail.com>
3755 [JSC] Date.parse should accept wider range of representation
3756 https://bugs.webkit.org/show_bug.cgi?id=170720
3758 Reviewed by Darin Adler.
3760 We would like to relax Date.parse to accept the representation "May 8".
3761 At that time, we choose `2000` as a default year. This is because of
3762 the following reason.
3764 1. According to the V8, this default value is compatible to the old KJS. While current V8 uses 2001,
3765 SpiderMonkey does not have such a fallback path. So this reason is not big deal.
3767 2. It is a leap year. When using `new Date("Feb 29")`, we assume that people want to save month and day.
3768 Leap year can save user inputs if they is valid. If we use the current year instead, the current year
3769 may not be a leap year. In that case, `new Date("Feb 29").getMonth()` becomes 2 (March).
3772 (WTF::parseDateFromNullTerminatedCharacters):
3774 2017-04-13 Dan Bernstein <mitz@apple.com>
3776 WTF installs an extra copy of a header outside /usr/local/include/wtf
3778 * WTF.xcodeproj/project.pbxproj: Demoted PriorityQueue.h from Private to Project.
3780 2017-04-13 Oliver Hunt <oliver@apple.com>
3782 allocationSize should use safe arithmetic by default
3783 https://bugs.webkit.org/show_bug.cgi?id=170804
3785 Reviewed by JF Bastien.
3787 Make all allocationSize() functions work in terms
3790 * wtf/text/StringImpl.h:
3791 (WTF::StringImpl::allocationSize):
3792 (WTF::StringImpl::tailOffset):
3794 2017-04-13 JF Bastien <jfbastien@apple.com>
3796 WebAssembly: manage memory better
3797 https://bugs.webkit.org/show_bug.cgi?id=170628
3799 Reviewed by Keith Miller, Michael Saboff.
3801 Re-use a VM tag which was intended for JavaScript core, was then
3802 used by our GC, and is now unused. If I don't do this then
3803 WebAssembly fast memories will make vmmap look super weird because
3804 it'll look like multi-gigabyte of virtual memory are allocated as
3805 part of our process' regular memory!
3807 Separately I need to update vmmap and other tools to print the
3808 right name. Right now this tag gets identified as "JS garbage
3811 * wtf/OSAllocator.h:
3814 2017-04-13 Yusuke Suzuki <utatane.tea@gmail.com>
3816 [JSC] Use proper ifdef guard for code using MachineContext
3817 https://bugs.webkit.org/show_bug.cgi?id=170800
3819 Reviewed by Carlos Alberto Lopez Perez.
3821 SamplingProfiler and FastMemory rely on MachineContext feature.
3825 2017-04-12 Dan Bernstein <mitz@apple.com>
3827 [Mac] Future-proof .xcconfig files
3828 https://bugs.webkit.org/show_bug.cgi?id=170802
3830 Reviewed by Tim Horton.
3832 * Configurations/Base.xcconfig:
3833 * Configurations/DebugRelease.xcconfig:
3835 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com>
3837 Use HAVE(MACHINE_CONTEXT) instead of USE(MACHINE_CONTEXT)
3838 https://bugs.webkit.org/show_bug.cgi?id=170770
3840 Rubber stamped by Mark Lam.
3843 * wtf/PlatformRegisters.h:
3844 * wtf/ThreadingPthreads.cpp:
3845 (WTF::Thread::getRegisters):
3847 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com>
3849 [JSC] Clean up heap/MachineStackMarker by introducing USE(MACHINE_CONTEXT)
3850 https://bugs.webkit.org/show_bug.cgi?id=170770
3852 Reviewed by Mark Lam.
3854 We add a new define USE_MACHINE_CONTEXT, which becomes true if mcontext_t exists
3855 and we know the way to retrieve values from mcontext_t.
3858 * wtf/PlatformRegisters.h:
3859 * wtf/ThreadingPthreads.cpp:
3860 (WTF::Thread::getRegisters):
3862 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com>
3864 [WTF] Introduce Thread class and use RefPtr<Thread> and align Windows Threading implementation semantics to Pthread one
3865 https://bugs.webkit.org/show_bug.cgi?id=170502
3867 Reviewed by Mark Lam.
3869 This patch is refactoring of WTF Threading mechanism to merge JavaScriptCore's threading extension to WTF Threading.
3870 Previously, JavaScriptCore requires richer threading features (such as suspending and resuming threads), and they
3871 are implemented for PlatformThread in JavaScriptCore. But these features should be implemented in WTF Threading side
3872 instead of maintaining JSC's own threading features too. This patch removes these features from JSC and move it to
3875 However, current WTF Threading has one problem: Windows version of WTF Threading has different semantics from Pthreads
3876 one. In Windows WTF Threading, we cannot perform any operation after the target thread is detached: WTF Threading stop
3877 tracking the state of the thread once the thread is detached. But this is not the same to Pthreads one. In Pthreads,
3878 pthread_detach just means that the resource of the thread will be destroyed automatically. While some operations like
3879 pthread_join will be rejected, some operations like pthread_kill will be accepted.
3881 The problem is that detached thread can be suspended and resumed in JSC. For example, in jsc.cpp, we start the worker
3882 thread and detach it immediately. In worker thread, we will create VM and thus concurrent GC will suspend and resume
3883 the detached thread. However, in Windows WTF Threading, we have no reference to the detached thread. Thus we cannot
3884 perform suspend and resume operations onto the detached thread.
3886 To solve the problem, we change Windows Threading mechanism drastically to align it to the Pthread semantics. In the
3887 new Threading, we have RefPtr<Thread> class. It holds a handle to a platform thread. We can perform threading operations
3888 with this class. For example, Thread::suspend is offered. And we use destructor of the thread local variable to release
3889 the resources held by RefPtr<Thread>. In Windows, Thread::detach does nothing because the resource will be destroyed
3890 automatically by RefPtr<Thread>.
3892 To do so, we introduce ThreadHolder for Windows. This is similar to the previous ThreadIdentifierData for Pthreads.
3893 It holds RefPtr<Thread> in the thread local storage (technically, it is Fiber Local Storage in Windows). Thread::current()
3894 will return this reference.
3896 The problematic situation is that the order of the deallocation of the thread local storage is not defined. So we should
3897 not touch thread local storage in the destructor of the thread local storage. To avoid such edge cases, we have
3898 currentThread() / Thread::currentID() APIs. They are safe to be called even in the destructor of the other thread local
3899 storage. And in Windows, in the FLS destructor, we will create the thread_local variable to defer the destruction of
3900 the ThreadHolder. We ensure that this destructor is called after the other FLS destructors are called in Windows 10.
3902 This patch is performance neutral.
3904 * WTF.xcodeproj/project.pbxproj:
3905 * benchmarks/ConditionSpeedTest.cpp:
3906 * benchmarks/LockFairnessTest.cpp:
3907 * benchmarks/LockSpeedTest.cpp:
3908 * wtf/AutomaticThread.cpp:
3909 (WTF::AutomaticThread::start):
3910 * wtf/CMakeLists.txt:
3912 * wtf/MemoryPressureHandler.h:
3913 * wtf/ParallelJobsGeneric.cpp:
3914 (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
3915 (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
3916 * wtf/ParallelJobsGeneric.h:
3917 (WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate): Deleted.
3918 * wtf/ParkingLot.cpp:
3919 (WTF::ParkingLot::forEachImpl):
3921 (WTF::ParkingLot::forEach):
3922 * wtf/PlatformRegisters.h: Renamed from Source/JavaScriptCore/runtime/PlatformThread.h.
3924 (WTF::RefPtr::RefPtr):
3925 * wtf/ThreadFunctionInvocation.h:
3926 (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
3927 * wtf/ThreadHolder.cpp: Added.
3928 (WTF::ThreadHolder::~ThreadHolder):
3929 (WTF::ThreadHolder::initialize):
3930 * wtf/ThreadHolder.h: Renamed from Source/WTF/wtf/ThreadIdentifierDataPthreads.h.
3931 (WTF::ThreadHolder::thread):
3932 (WTF::ThreadHolder::ThreadHolder):
3933 * wtf/ThreadHolderPthreads.cpp: Renamed from Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp.
3934 (WTF::ThreadHolder::initializeOnce):
3935 (WTF::ThreadHolder::current):
3936 (WTF::ThreadHolder::destruct):
3937 * wtf/ThreadHolderWin.cpp: Added.
3938 (WTF::threadMapMutex):
3940 (WTF::ThreadHolder::initializeOnce):
3941 (WTF::ThreadHolder::current):
3942 (WTF::ThreadHolder::destruct):
3943 * wtf/ThreadSpecific.h:
3944 * wtf/Threading.cpp:
3945 (WTF::Thread::normalizeThreadName):
3946 (WTF::threadEntryPoint):
3947 (WTF::Thread::create):
3948 (WTF::Thread::setCurrentThreadIsUserInteractive):
3949 (WTF::Thread::setCurrentThreadIsUserInitiated):
3950 (WTF::Thread::setGlobalMaxQOSClass):
3951 (WTF::Thread::adjustedQOSClass):
3952 (WTF::Thread::dump):
3953 (WTF::initializeThreading):
3954 (WTF::normalizeThreadName): Deleted.
3955 (WTF::createThread): Deleted.
3956 (WTF::setCurrentThreadIsUserInteractive): Deleted.
3957 (WTF::setCurrentThreadIsUserInitiated): Deleted.
3958 (WTF::setGlobalMaxQOSClass): Deleted.
3959 (WTF::adjustedQOSClass): Deleted.
3962 (WTF::Thread::operator==):
3963 (WTF::Thread::operator!=):
3964 (WTF::Thread::joinableState):
3965 (WTF::Thread::didBecomeDetached):
3966 (WTF::Thread::didJoin):
3967 (WTF::Thread::hasExited):
3968 (WTF::currentThread):
3969 * wtf/ThreadingPthreads.cpp:
3970 (WTF::Thread::Thread):
3971 (WTF::Thread::~Thread):
3972 (WTF::Thread::signalHandlerSuspendResume):
3973 (WTF::Thread::initializePlatformThreading):
3974 (WTF::initializeCurrentThreadEvenIfNonWTFCreated):
3975 (WTF::wtfThreadEntryPoint):
3976 (WTF::Thread::createInternal):
3977 (WTF::Thread::initializeCurrentThreadInternal):
3978 (WTF::Thread::changePriority):
3979 (WTF::Thread::waitForCompletion):
3980 (WTF::Thread::detach):
3981 (WTF::Thread::current):
3982 (WTF::Thread::currentID):
3983 (WTF::Thread::signal):
3984 (WTF::Thread::resume):
3985 (WTF::Thread::getRegisters):
3986 (WTF::Thread::didExit):
3987 (WTF::Thread::establish):
3988 (WTF::PthreadState::PthreadState): Deleted.
3989 (WTF::PthreadState::joinableState): Deleted.
3990 (WTF::PthreadState::pthreadHandle): Deleted.
3991 (WTF::PthreadState::didBecomeDetached): Deleted.
3992 (WTF::PthreadState::didExit): Deleted.
3993 (WTF::PthreadState::didJoin): Deleted.
3994 (WTF::PthreadState::hasExited): Deleted.
3995 (WTF::threadMapMutex): Deleted.
3996 (WTF::initializeThreading): Deleted.
3997 (WTF::threadMap): Deleted.
3998 (WTF::identifierByPthreadHandle): Deleted.
3999 (WTF::establishIdentifierForPthreadHandle): Deleted.
4000 (WTF::pthreadHandleForIdentifierWithLockAlreadyHeld): Deleted.
4001 (WTF::createThreadInternal): Deleted.
4002 (WTF::initializeCurrentThreadInternal): Deleted.
4003 (WTF::changeThreadPriority): Deleted.
4004 (WTF::waitForThreadCompletion): Deleted.
4005 (WTF::detachThread): Deleted.
4006 (WTF::threadDidExit): Deleted.
4007 (WTF::currentThread): Deleted.
4008 (WTF::signalThread): Deleted.
4009 * wtf/ThreadingWin.cpp:
4010 (WTF::Thread::Thread):
4011 (WTF::Thread::~Thread):
4012 (WTF::Thread::initializeCurrentThreadInternal):
4013 (WTF::Thread::initializePlatformThreading):
4014 (WTF::wtfThreadEntryPoint):
4015 (WTF::Thread::createInternal):
4016 (WTF::Thread::changePriority):
4017 (WTF::Thread::waitForCompletion):
4018 (WTF::Thread::detach):
4019 (WTF::Thread::resume):
4020 (WTF::Thread::getRegisters):
4021 (WTF::Thread::current):
4022 (WTF::Thread::currentID):
4023 (WTF::Thread::didExit):
4024 (WTF::Thread::establish):
4025 (WTF::initializeCurrentThreadInternal): Deleted.
4026 (WTF::threadMapMutex): Deleted.
4027 (WTF::initializeThreading): Deleted.
4028 (WTF::threadMap): Deleted.
4029 (WTF::storeThreadHandleByIdentifier): Deleted.
4030 (WTF::threadHandleForIdentifier): Deleted.
4031 (WTF::clearThreadHandleForIdentifier): Deleted.
4032 (WTF::createThreadInternal): Deleted.
4033 (WTF::changeThreadPriority): Deleted.
4034 (WTF::waitForThreadCompletion): Deleted.
4035 (WTF::detachThread): Deleted.
4036 (WTF::currentThread): Deleted.
4037 * wtf/WorkQueue.cpp:
4038 (WTF::WorkQueue::concurrentApply):
4040 * wtf/cocoa/WorkQueueCocoa.cpp:
4041 (WTF::dispatchQOSClass):
4042 * wtf/generic/WorkQueueGeneric.cpp:
4043 (WorkQueue::platformInitialize):
4044 (WorkQueue::platformInvalidate):
4045 * wtf/linux/MemoryPressureHandlerLinux.cpp:
4046 (WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):
4047 (WTF::MemoryPressureHandler::EventFDPoller::~EventFDPoller):
4048 * wtf/win/MainThreadWin.cpp:
4049 (WTF::initializeMainThreadPlatform):
4051 2017-04-11 Zan Dobersek <zdobersek@igalia.com>
4053 [GTK] Use the DisplayRefreshMonitor facilities
4054 https://bugs.webkit.org/show_bug.cgi?id=170599
4056 Reviewed by Carlos Garcia Campos.
4058 * wtf/Platform.h: Enable USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR for the GTK+ port.
4059 * wtf/glib/RunLoopSourcePriority.h: Add the DisplayRefreshMonitorTimer entry that
4060 matches the value of LayerFlushTimer.
4062 2017-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
4064 [WebCore][JSC] ResourceUsageData.{timeOfNextEdenCollection,timeOfNextFullCollection} should be MonotonicTime
4065 https://bugs.webkit.org/show_bug.cgi?id=170725
4067 Reviewed by Sam Weinig.
4069 Make MonotonicTime more constexpr friendly mainly to annotate MonotonicTime::nan() as constexpr.
4071 * wtf/MonotonicTime.h:
4072 (WTF::MonotonicTime::MonotonicTime):
4073 (WTF::MonotonicTime::fromRawSeconds):
4074 (WTF::MonotonicTime::infinity):
4075 (WTF::MonotonicTime::nan):
4076 (WTF::MonotonicTime::secondsSinceEpoch):
4077 (WTF::MonotonicTime::operator bool):
4078 (WTF::MonotonicTime::operator+):
4079 (WTF::MonotonicTime::operator-):
4080 (WTF::MonotonicTime::operator==):
4081 (WTF::MonotonicTime::operator!=):
4082 (WTF::MonotonicTime::operator<):
4083 (WTF::MonotonicTime::operator>):
4084 (WTF::MonotonicTime::operator<=):
4085 (WTF::MonotonicTime::operator>=):
4087 2017-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
4089 Unreviewed, build fix for Windows port after r215228
4090 https://bugs.webkit.org/show_bug.cgi?id=170723
4092 * wtf/win/RunLoopWin.cpp:
4093 (WTF::RunLoop::TimerBase::timerFired):
4095 2017-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
4097 [JSC][GTK] Use RunLoop::Timer in GTK port
4098 https://bugs.webkit.org/show_bug.cgi?id=170723
4100 Reviewed by Carlos Garcia Campos.
4102 Add secondsUntilFire method. And add setName and setPriority
4103 for GTK RunLoop::Timer.
4106 * wtf/cf/RunLoopCF.cpp:
4107 (WTF::RunLoop::TimerBase::secondsUntilFire):
4108 * wtf/generic/RunLoopGeneric.cpp:
4109 (WTF::RunLoop::TimerBase::secondsUntilFire):
4110 * wtf/glib/RunLoopGLib.cpp:
4111 (WTF::RunLoop::TimerBase::setName):
4112 (WTF::RunLoop::TimerBase::secondsUntilFire):
4113 * wtf/win/RunLoopWin.cpp:
4114 (WTF::RunLoop::TimerBase::timerFired):
4115 (WTF::RunLoop::TimerBase::start):
4116 (WTF::RunLoop::TimerBase::isActive):
4117 (WTF::RunLoop::TimerBase::secondsUntilFire):
4119 2017-04-11 Yusuke Suzuki <utatane.tea@gmail.com>
4121 [JSC] Enable JSRunLoopTimer for JSCOnly and Windows
4122 https://bugs.webkit.org/show_bug.cgi?id=170655
4124 Reviewed by Carlos Garcia Campos.
4126 This patch makes RunLoop::Timer in Generic and Windows thread-safe to use it
4127 in JSC's JSRunLoopTimer. Eventually, we would like to replace JSRunLoopTimer's
4128 platform-dependent implementation to WTF::RunLoop::Timer.
4131 * wtf/cf/RunLoopCF.cpp:
4132 (WTF::RunLoop::TimerBase::start):
4133 * wtf/generic/RunLoopGeneric.cpp:
4134 (WTF::RunLoop::TimerBase::ScheduledTask::EarliestSchedule::operator()):
4135 (WTF::RunLoop::populateTasks):
4136 (WTF::RunLoop::runImpl):
4137 (WTF::RunLoop::schedule):
4138 (WTF::RunLoop::scheduleAndWakeUp):
4139 (WTF::RunLoop::TimerBase::~TimerBase):
4140 (WTF::RunLoop::TimerBase::start):
4141 (WTF::RunLoop::TimerBase::stop):
4142 (WTF::RunLoop::TimerBase::isActive):
4143 * wtf/glib/RunLoopGLib.cpp:
4144 (WTF::RunLoop::TimerBase::TimerBase):
4145 * wtf/win/RunLoopWin.cpp:
4146 (WTF::RunLoop::TimerBase::timerFired):
4147 (WTF::RunLoop::TimerBase::start):
4148 (WTF::RunLoop::TimerBase::stop):
4149 (WTF::RunLoop::TimerBase::isActive):
4151 2017-04-11 Zan Dobersek <zdobersek@igalia.com>
4153 REGRESSION(r213645): It made JSC tests super slow and timeout on AArch64 Linux
4154 https://bugs.webkit.org/show_bug.cgi?id=169510
4156 Reviewed by Saam Barati.
4158 Add the `volatile` qualifiers for ASM statements that set up ldxr and stxr
4159 instruction calls when HAVE(LL_SC) is enabled for aarch64 platforms.
4161 This avoids indefinite execution when running GCC-compiled JSC on Linux.
4162 Specific bug or expected behavior that differs from Clang wasn't determined.
4164 HAVE(LL_SC) is re-enabled on non-Darwin aarch64 platforms.
4169 2017-04-10 Thorsten Glaser <tg@mirbsd.de>
4172 https://bugs.webkit.org/show_bug.cgi?id=170673
4174 Reviewed by Carlos Alberto Lopez Perez.
4178 2017-04-09 Yusuke Suzuki <utatane.tea@gmail.com>
4180 [WTF] Annotate Seconds' member functions and operators with constexpr
4181 https://bugs.webkit.org/show_bug.cgi?id=170662
4183 Reviewed by Daniel Bates.
4185 Annotate Seconds' member functions and operators with constexpr.
4186 It allows us to use Seconds calculation in compile time and use these
4187 calculation for static const global variables.
4189 operator% is an exception: it uses fmod and it is not offered as constexpr.
4192 (defaultMinimumForClamp):
4193 (defaultMaximumForClamp):
4194 (clampToAccepting64):
4195 Super unfortunate ugly code. This is because GCC 4.9 does not support C++14 relaxed constexpr.
4198 (WTF::Seconds::Seconds):
4199 (WTF::Seconds::value):
4200 (WTF::Seconds::minutes):
4201 (WTF::Seconds::seconds):
4202 (WTF::Seconds::milliseconds):
4203 (WTF::Seconds::microseconds):
4204 (WTF::Seconds::nanoseconds):
4205 (WTF::Seconds::operator bool):
4206 (WTF::Seconds::operator+):
4207 (WTF::Seconds::operator-):
4208 (WTF::Seconds::operator*):
4209 (WTF::Seconds::operator/):
4210 (WTF::Seconds::operator==):
4211 (WTF::Seconds::operator!=):
4212 (WTF::Seconds::operator<):
4213 (WTF::Seconds::operator>):
4214 (WTF::Seconds::operator<=):
4215 (WTF::Seconds::operator>=):
4217 2017-04-09 Chris Dumez <cdumez@apple.com>
4219 Start dropping Timer API dealing with double
4220 https://bugs.webkit.org/show_bug.cgi?id=170649
4222 Reviewed by Yusuke Suzuki.
4224 Start dropping Timer API dealing with double as people should use Seconds now.
4226 * wtf/RunLoopTimer.h:
4227 * wtf/glib/MainThreadGLib.cpp:
4228 (WTF::MainThreadDispatcher::schedule):
4230 2017-04-07 Keith Miller <keith_miller@apple.com>
4232 Unreviewed, remove constexpr function since GTK didn't like it.
4234 * wtf/PriorityQueue.h:
4235 (WTF::PriorityQueue::parentOf):
4237 2017-04-07 Chris Dumez <cdumez@apple.com>
4239 Start using MonotonicTime / Seconds in Timer class
4240 https://bugs.webkit.org/show_bug.cgi?id=170625
4242 Reviewed by Simon Fraser.
4244 Add modulo operator to MonotonicTime.
4246 * wtf/MonotonicTime.h: