Unreviewed, roll out http://trac.webkit.org/changeset/187972.
[WebKit-https.git] / Source / WTF / ChangeLog
1 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
2
3         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
4
5         * wtf/Atomics.cpp:
6         (WTF::getSwapLock):
7         (WTF::atomicStep):
8         * wtf/MessageQueue.h:
9         (WTF::MessageQueue::infiniteTime):
10         (WTF::MessageQueue<DataType>::append):
11         (WTF::MessageQueue<DataType>::appendAndKill):
12         (WTF::MessageQueue<DataType>::appendAndCheckEmpty):
13         (WTF::MessageQueue<DataType>::prepend):
14         (WTF::MessageQueue<DataType>::removeIf):
15         (WTF::MessageQueue<DataType>::isEmpty):
16         (WTF::MessageQueue<DataType>::kill):
17         (WTF::MessageQueue<DataType>::killed):
18         * wtf/ParallelJobsGeneric.cpp:
19         (WTF::ParallelEnvironment::ThreadPrivate::execute):
20         (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
21         (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
22         * wtf/ParallelJobsGeneric.h:
23         * wtf/RunLoop.cpp:
24         (WTF::RunLoop::performWork):
25         (WTF::RunLoop::dispatch):
26         * wtf/RunLoop.h:
27         * wtf/ThreadSpecificWin.cpp:
28         (WTF::destructorsList):
29         (WTF::destructorsMutex):
30         (WTF::threadSpecificKeyCreate):
31         (WTF::threadSpecificKeyDelete):
32         (WTF::ThreadSpecificThreadExit):
33         * wtf/Threading.cpp:
34         (WTF::threadEntryPoint):
35         (WTF::createThread):
36         * wtf/ThreadingPrimitives.h:
37         * wtf/ThreadingPthreads.cpp:
38         (WTF::threadMapMutex):
39         (WTF::initializeThreading):
40         (WTF::identifierByPthreadHandle):
41         (WTF::establishIdentifierForPthreadHandle):
42         (WTF::changeThreadPriority):
43         (WTF::waitForThreadCompletion):
44         (WTF::detachThread):
45         (WTF::threadDidExit):
46         (WTF::currentThread):
47         (WTF::Mutex::Mutex):
48         (WTF::Mutex::~Mutex):
49         (WTF::Mutex::lock):
50         (WTF::Mutex::tryLock):
51         (WTF::Mutex::unlock):
52         (WTF::ThreadCondition::~ThreadCondition):
53         (WTF::ThreadCondition::wait):
54         (WTF::ThreadCondition::timedWait):
55         (WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
56         (WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
57         (WTF::DeprecatedMutex::lock): Deleted.
58         (WTF::DeprecatedMutex::tryLock): Deleted.
59         (WTF::DeprecatedMutex::unlock): Deleted.
60         * wtf/ThreadingWin.cpp:
61         (WTF::initializeCurrentThreadInternal):
62         (WTF::threadMapMutex):
63         (WTF::initializeThreading):
64         (WTF::storeThreadHandleByIdentifier):
65         (WTF::threadHandleForIdentifier):
66         (WTF::clearThreadHandleForIdentifier):
67         (WTF::currentThread):
68         (WTF::Mutex::Mutex):
69         (WTF::Mutex::~Mutex):
70         (WTF::Mutex::lock):
71         (WTF::Mutex::tryLock):
72         (WTF::Mutex::unlock):
73         (WTF::ThreadCondition::~ThreadCondition):
74         (WTF::ThreadCondition::wait):
75         (WTF::ThreadCondition::timedWait):
76         (WTF::DeprecatedMutex::DeprecatedMutex): Deleted.
77         (WTF::DeprecatedMutex::~DeprecatedMutex): Deleted.
78         (WTF::DeprecatedMutex::lock): Deleted.
79         (WTF::DeprecatedMutex::tryLock): Deleted.
80         (WTF::DeprecatedMutex::unlock): Deleted.
81         * wtf/WorkQueue.h:
82         * wtf/dtoa.cpp:
83         * wtf/dtoa.h:
84         * wtf/efl/DispatchQueueEfl.cpp:
85         (DispatchQueue::dispatch):
86         (DispatchQueue::performWork):
87         (DispatchQueue::performTimerWork):
88         (DispatchQueue::insertTimerWorkItem):
89         (DispatchQueue::wakeUpThread):
90         (DispatchQueue::getNextTimeOut):
91         * wtf/efl/DispatchQueueEfl.h:
92         * wtf/efl/RunLoopEfl.cpp:
93         (WTF::RunLoop::wakeUpEvent):
94         (WTF::RunLoop::wakeUp):
95         * wtf/threads/BinarySemaphore.cpp:
96         (WTF::BinarySemaphore::signal):
97         (WTF::BinarySemaphore::wait):
98         * wtf/threads/BinarySemaphore.h:
99         * wtf/win/WorkQueueWin.cpp:
100         (WTF::WorkQueue::handleCallback):
101         (WTF::WorkQueue::platformInvalidate):
102         (WTF::WorkQueue::dispatch):
103         (WTF::WorkQueue::timerCallback):
104         (WTF::WorkQueue::dispatchAfter):
105
106 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
107
108         Unreviewed, fix Windows.
109
110         * wtf/ThreadSpecificWin.cpp:
111         (WTF::destructorsList):
112         (WTF::destructorsMutex):
113         (WTF::threadSpecificKeyCreate):
114         (WTF::threadSpecificKeyDelete):
115         (WTF::ThreadSpecificThreadExit):
116
117 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
118
119         Rename Mutex to DeprecatedMutex
120         https://bugs.webkit.org/show_bug.cgi?id=147675
121
122         Reviewed by Geoffrey Garen.
123
124         * wtf/Atomics.cpp:
125         (WTF::getSwapLock):
126         (WTF::atomicStep):
127         * wtf/MessageQueue.h:
128         (WTF::MessageQueue::infiniteTime):
129         (WTF::MessageQueue<DataType>::append):
130         (WTF::MessageQueue<DataType>::appendAndKill):
131         (WTF::MessageQueue<DataType>::appendAndCheckEmpty):
132         (WTF::MessageQueue<DataType>::prepend):
133         (WTF::MessageQueue<DataType>::removeIf):
134         (WTF::MessageQueue<DataType>::isEmpty):
135         (WTF::MessageQueue<DataType>::kill):
136         (WTF::MessageQueue<DataType>::killed):
137         * wtf/ParallelJobsGeneric.cpp:
138         (WTF::ParallelEnvironment::ThreadPrivate::execute):
139         (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
140         (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
141         * wtf/ParallelJobsGeneric.h:
142         * wtf/RunLoop.cpp:
143         (WTF::RunLoop::performWork):
144         (WTF::RunLoop::dispatch):
145         * wtf/RunLoop.h:
146         * wtf/Threading.cpp:
147         (WTF::threadEntryPoint):
148         (WTF::createThread):
149         * wtf/ThreadingPrimitives.h:
150         * wtf/ThreadingPthreads.cpp:
151         (WTF::threadMapMutex):
152         (WTF::initializeThreading):
153         (WTF::identifierByPthreadHandle):
154         (WTF::establishIdentifierForPthreadHandle):
155         (WTF::changeThreadPriority):
156         (WTF::waitForThreadCompletion):
157         (WTF::detachThread):
158         (WTF::threadDidExit):
159         (WTF::currentThread):
160         (WTF::DeprecatedMutex::DeprecatedMutex):
161         (WTF::DeprecatedMutex::~DeprecatedMutex):
162         (WTF::DeprecatedMutex::lock):
163         (WTF::DeprecatedMutex::tryLock):
164         (WTF::DeprecatedMutex::unlock):
165         (WTF::ThreadCondition::~ThreadCondition):
166         (WTF::ThreadCondition::wait):
167         (WTF::ThreadCondition::timedWait):
168         (WTF::Mutex::Mutex): Deleted.
169         (WTF::Mutex::~Mutex): Deleted.
170         (WTF::Mutex::lock): Deleted.
171         (WTF::Mutex::tryLock): Deleted.
172         (WTF::Mutex::unlock): Deleted.
173         * wtf/ThreadingWin.cpp:
174         (WTF::initializeCurrentThreadInternal):
175         (WTF::threadMapMutex):
176         (WTF::initializeThreading):
177         (WTF::storeThreadHandleByIdentifier):
178         (WTF::threadHandleForIdentifier):
179         (WTF::clearThreadHandleForIdentifier):
180         (WTF::currentThread):
181         (WTF::DeprecatedMutex::DeprecatedMutex):
182         (WTF::DeprecatedMutex::~DeprecatedMutex):
183         (WTF::DeprecatedMutex::lock):
184         (WTF::DeprecatedMutex::tryLock):
185         (WTF::DeprecatedMutex::unlock):
186         (WTF::ThreadCondition::~ThreadCondition):
187         (WTF::ThreadCondition::wait):
188         (WTF::ThreadCondition::timedWait):
189         (WTF::Mutex::Mutex): Deleted.
190         (WTF::Mutex::~Mutex): Deleted.
191         (WTF::Mutex::lock): Deleted.
192         (WTF::Mutex::tryLock): Deleted.
193         (WTF::Mutex::unlock): Deleted.
194         * wtf/WorkQueue.h:
195         * wtf/dtoa.cpp:
196         * wtf/dtoa.h:
197         * wtf/efl/DispatchQueueEfl.cpp:
198         (DispatchQueue::dispatch):
199         (DispatchQueue::performWork):
200         (DispatchQueue::performTimerWork):
201         (DispatchQueue::insertTimerWorkItem):
202         (DispatchQueue::wakeUpThread):
203         (DispatchQueue::getNextTimeOut):
204         * wtf/efl/DispatchQueueEfl.h:
205         * wtf/efl/RunLoopEfl.cpp:
206         (WTF::RunLoop::wakeUpEvent):
207         (WTF::RunLoop::wakeUp):
208         * wtf/threads/BinarySemaphore.cpp:
209         (WTF::BinarySemaphore::signal):
210         (WTF::BinarySemaphore::wait):
211         * wtf/threads/BinarySemaphore.h:
212         * wtf/win/WorkQueueWin.cpp:
213         (WTF::WorkQueue::handleCallback):
214         (WTF::WorkQueue::platformInvalidate):
215         (WTF::WorkQueue::dispatch):
216         (WTF::WorkQueue::timerCallback):
217         (WTF::WorkQueue::dispatchAfter):
218
219 2015-08-04  Alex Christensen  <achristensen@webkit.org>
220
221         Fix quirks with CMake and VS2015
222         https://bugs.webkit.org/show_bug.cgi?id=147663
223
224         Reviewed by Brent Fulgham.
225
226         * wtf/Platform.h:
227         Build fix after r187908
228
229 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
230
231         [Win] Update Apple Windows build for VS2015
232         https://bugs.webkit.org/show_bug.cgi?id=147653
233
234         Reviewed by Dean Jackson.
235
236         * WTF.vcxproj/WTF.vcxproj.filters: Drive-by-fix to place files in
237         proper project locations in the IDE.
238         * wtf/Platform.h: Don't define the _HAS_EXCEPTIONS macro when building with
239         Visual Studio 2015.
240
241 2015-08-04  Commit Queue  <commit-queue@webkit.org>
242
243         Unreviewed, rolling out r187815 and r187817.
244         https://bugs.webkit.org/show_bug.cgi?id=147644
245
246         Caused lots of Windows crashes (Requested by smfr on #webkit).
247
248         Reverted changesets:
249
250         "[WTF] Turn tryMakeString(), makeString() into variadic
251         templates"
252         https://bugs.webkit.org/show_bug.cgi?id=147142
253         http://trac.webkit.org/changeset/187815
254
255         "Unreviewed build fix."
256         http://trac.webkit.org/changeset/187817
257
258 2015-08-04  Alex Christensen  <achristensen@webkit.org>
259
260         Enable WebGL on Windows CMake build.
261         https://bugs.webkit.org/show_bug.cgi?id=143311
262
263         Reviewed by Csaba Osztrogonác.
264
265         * wtf/FeatureDefines.h:
266         Made the CMake feature defines the same as the non-CMake feature defines.
267
268 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
269
270         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
271         https://bugs.webkit.org/show_bug.cgi?id=146833
272
273         Reviewed by Alexey Proskuryakov.
274
275         * wtf/Assertions.cpp:
276         * wtf/Assertions.h: Removed redundant COMPILER(CLANG) guard.
277         * wtf/Atomics.cpp:
278         * wtf/Atomics.h:
279         (WTF::weakCompareAndSwap):
280         (WTF::compilerFence):
281         * wtf/Compiler.h:
282          - Renamed COMPILER(GCC) to COMPILER(GCC_OR_CLANG), because it is true for both compiler.
283          - Added COMPILER(GCC) which is true only for GCC.
284          - Moved all GCC related stuff to one block and removed redundant guards accordingly.
285          - Removed the unused default false definition of GCC_VERSION_AT_LEAST for non GCC compilers.
286         * wtf/ExportMacros.h:
287         * wtf/FastMalloc.h:
288         * wtf/Platform.h:
289         * wtf/StdLibExtras.h:
290         * wtf/Vector.h:
291         * wtf/text/ASCIIFastPath.h:
292         (WTF::copyLCharsFromUCharSource):
293
294 2015-08-03  Zan Dobersek  <zdobersek@igalia.com>
295
296         Unreviewed build fix.
297
298         * wtf/text/StringConcatenate.h: Include <tuple> to avoid missing
299         std::tuple<> class definitions.
300
301 2015-08-03  Zan Dobersek  <zdobersek@igalia.com>
302
303         [WTF] Turn tryMakeString(), makeString() into variadic templates
304         https://bugs.webkit.org/show_bug.cgi?id=147142
305
306         Reviewed by Sam Weinig.
307
308         Built upon the original work by Anders Carlsson, Mark Rowe and Sam Weinig.
309
310         Implement tryMakeString() and makeString() as variadic templates, replacing
311         the argument count-based overloads.
312
313         tryMakeString() now constructs a stack-based tuple of necessary StringTypeAdapter
314         objects and utilizes the StringAdapterTuple struct template to operate on that
315         tuple, recursively calling the necessary operations on each element in the tuple.
316         This effectively mimics the process of previous tryMakeString() implementation,
317         but makes it scalable to a tuple of elements that are to be concatenated.
318
319         StringAppend class template now stores two StringTypeAdapter objects for the
320         two passed-in string objects, packed in a tuple, calling
321         StringAdapterTuple<>::createString() directly when concatenating the two objects
322         into one String.
323
324         * wtf/text/StringConcatenate.h:
325         (WTF::StringTypeAdapter<char>::length):
326         (WTF::StringTypeAdapter<char>::is8Bit):
327         (WTF::StringAdapterTuple::sumWithOverflow):
328         (WTF::StringAdapterTuple::is8Bit):
329         (WTF::StringAdapterTuple::writeTo):
330         (WTF::StringAdapterTuple::createString):
331         (WTF::tryMakeString):
332         (WTF::makeString):
333         (WTF::sumWithOverflow): Deleted.
334         * wtf/text/StringOperators.h:
335         (WTF::StringAppend::StringAppend):
336         (WTF::StringAppend::operator String):
337         (WTF::StringAppend::is8Bit):
338         (WTF::StringAppend::writeTo):
339         (WTF::StringAppend::length):
340         (WTF::StringAppend::string1):
341         (WTF::StringAppend::string2):
342
343 2015-08-03  Anders Carlsson  <andersca@apple.com>
344
345         Make it possible to use String::utf8() in the debugger
346         https://bugs.webkit.org/show_bug.cgi?id=147566
347
348         Reviewed by Tim Horton.
349
350         Add a new utf8() overload that doesn't take any parameters and just calls utf8(LenientConversion), since lldb doesn't support evaluating
351         function calls with default parameters at the moment.
352
353         * wtf/text/WTFString.cpp:
354         (WTF::String::utf8):
355         * wtf/text/WTFString.h:
356
357 2015-08-02  Benjamin Poulain  <bpoulain@apple.com>
358
359         Investigate HashTable::HashTable(const HashTable&) and HashTable::operator=(const HashTable&) performance for hash-based static analyses
360         https://bugs.webkit.org/show_bug.cgi?id=118455
361
362         Reviewed by Filip Pizlo.
363
364         Previously, when copying a HashTable, we would start from scratch
365         with an empty table and insert elements one by one, growing-rehashing
366         the table as needed.
367
368         With this patch, we have 2 improvements to remove most of the cost.
369
370         First, we compute a good size from the start. This removes all the
371         reallocations and rehashs.
372         This is where the biggest gain comes from.
373
374         The second part is a simpler version of add() when we know that
375         we cannot find a bucket with the same key and there cannot
376         be any deleted bucket.
377         This removes most branches from the hot loop, cutting another 25%
378         of the time.
379
380         * wtf/HashTable.h:
381         (WTF::KeyTraits>::addUniqueForInitialization):
382         (WTF::KeyTraits>::HashTable):
383
384 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
385
386         HashTraits<AtomicString> can use SimpleClassHashTraits
387         https://bugs.webkit.org/show_bug.cgi?id=147528
388
389         Reviewed by Andreas Kling.
390
391         No point in duplicating the code inside SimpleClassHashTraits.
392
393         * wtf/text/AtomicStringHash.h:
394         (WTF::HashTraits<WTF::AtomicString>::constructDeletedValue): Deleted.
395         (WTF::HashTraits<WTF::AtomicString>::isDeletedValue): Deleted.
396
397 2015-08-01  Alex Christensen  <achristensen@webkit.org>
398
399         Fix compile errors with VS2015
400         https://bugs.webkit.org/show_bug.cgi?id=147526
401
402         Reviewed by Myles Maxfield.
403
404         * wtf/StringExtras.h:
405         (snprintf):
406         (wtf_vsnprintf):
407         VS2015 has an implementation of snprintf.
408
409 2015-07-31  Alex Christensen  <achristensen@webkit.org>
410
411         Prepare for VS2015
412         https://bugs.webkit.org/show_bug.cgi?id=146579
413
414         Reviewed by Jon Honeycutt.
415
416         * wtf/StdLibExtras.h:
417         (std::exchange):
418         Added preprocessor macros around functions implemented in VS2015's standard library.
419
420 2015-07-30  Chris Dumez  <cdumez@apple.com>
421
422         Mark more classes as fast allocated
423         https://bugs.webkit.org/show_bug.cgi?id=147440
424
425         Reviewed by Sam Weinig.
426
427         Mark more classes as fast allocated for performance. We heap-allocate
428         objects of those types throughout the code base.
429
430         * wtf/Bag.h:
431         * wtf/SegmentedVector.h:
432         * wtf/SentinelLinkedList.h:
433
434 2015-07-29  Basile Clement  <basile_clement@apple.com>
435
436         Remove native call inlining
437         https://bugs.webkit.org/show_bug.cgi?id=147417
438
439         Rubber-stamped by Filip Pizlo.
440
441         * wtf/Platform.h:
442
443 2015-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
444
445         [ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
446         https://bugs.webkit.org/show_bug.cgi?id=147350
447
448         Reviewed by Sam Weinig.
449
450         * wtf/FeatureDefines.h:
451
452 2015-07-28  Filip Pizlo  <fpizlo@apple.com>
453
454         Unreviewed, fix Windows build.
455
456         * wtf/MetaAllocatorHandle.h:
457         (WTF::MetaAllocatorHandle::key):
458
459 2015-07-27  Filip Pizlo  <fpizlo@apple.com>
460
461         Add logging when executable code gets deallocated
462         https://bugs.webkit.org/show_bug.cgi?id=147355
463
464         Reviewed by Mark Lam.
465
466         * wtf/MetaAllocator.cpp:
467         (WTF::MetaAllocatorHandle::dump): It's useful to be able to dump these.
468         * wtf/MetaAllocatorHandle.h:
469
470 2015-07-28  Benjamin Poulain  <bpoulain@apple.com>
471
472         Speed up StringBuilder::appendQuotedJSONString()
473         https://bugs.webkit.org/show_bug.cgi?id=147352
474
475         Reviewed by Andreas Kling.
476
477         * wtf/text/StringBuilder.cpp:
478         (WTF::appendQuotedJSONStringInternal):
479         The cases '"' and '\\' are not that uncommon, and they can easily
480         be handled in the original branch testing for them.
481
482         This is about 2.5% better on the JSON.stringify test.
483
484 2015-07-27  Alex Christensen  <achristensen@webkit.org>
485
486         Progress towards building AppleWin with CMake
487         https://bugs.webkit.org/show_bug.cgi?id=147325
488
489         Reviewed by Martin Robinson.
490
491         * wtf/PlatformWin.cmake:
492         Link with CoreFoundation.lib.
493
494 2015-07-25  Carlos Alberto Lopez Perez  <clopez@igalia.com>
495
496         REGRESSION (bmalloc): WebKit performance tests don't report memory stats.
497         https://bugs.webkit.org/show_bug.cgi?id=141247
498
499         Reviewed by Geoffrey Garen.
500
501         Meanwhile a better way of getting memory stats with bmalloc is not found
502         (see bug 136592), we can report as memory stats the resident set size
503         information that the operating system provides to us.
504
505         This at least should be good enough to get back the memory stats on the
506         performance tests and being able to track down memory usage regressions
507         at https://perf.webkit.org
508
509         * wtf/FastMalloc.cpp:
510         (WTF::fastMallocStatistics): Report maxrss data as committedVMBytes.
511
512 2015-07-24  Csaba Osztrogonác  <ossy@webkit.org>
513
514         Remove the unused GCC workaround - std::is_trivially_destructible
515         https://bugs.webkit.org/show_bug.cgi?id=147226
516
517         Reviewed by Darin Adler.
518
519         * wtf/StdLibExtras.h:
520
521 2015-07-23  Alex Christensen  <achristensen@webkit.org>
522
523         Remove compile and runtime flags for promises.
524         https://bugs.webkit.org/show_bug.cgi?id=147244
525
526         Reviewed by Yusuke Suzuki.
527
528         * wtf/FeatureDefines.h:
529
530 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
531
532         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
533         https://bugs.webkit.org/show_bug.cgi?id=147212
534
535         Reviewed by Filip Pizlo.
536
537         * wtf/FeatureDefines.h:
538
539 2015-07-22  Filip Pizlo  <fpizlo@apple.com>
540
541         Introduce release assert for using threads before threading is initialized
542         https://bugs.webkit.org/show_bug.cgi?id=147200
543
544         Reviewed by Michael Saboff.
545         
546         This will help bugs where you use createThread() before calling initializeThreading().
547
548         * wtf/ThreadIdentifierDataPthreads.cpp:
549         (WTF::ThreadIdentifierData::initialize):
550
551 2015-07-21  Daniel Bates  <dabates@apple.com>
552
553         WTFCrash() in WebKit::WebProcess::networkConnection()
554         https://bugs.webkit.org/show_bug.cgi?id=147112
555         <rdar://problem/18477459>
556
557         Reviewed by Gavin Barraclough.
558
559         Add explicit boolean conversion function and remove overload of operator! to support
560         checking whether an activity token is valid more directly than using the overloaded operator!.
561
562         * wtf/RefCounter.h:
563         (WTF::RefCounter::Token::operator bool): Added.
564         (WTF::RefCounter::Token::operator!): Deleted.
565
566 2015-07-20  Mark Lam  <mark.lam@apple.com>
567
568         Rollout r187020 and r187021: breaks JSC API tests on debug builds.
569         https://bugs.webkit.org/show_bug.cgi?id=147110
570
571         * wtf/WTFThreadData.cpp:
572         (WTF::WTFThreadData::WTFThreadData):
573         * wtf/WTFThreadData.h:
574         (WTF::WTFThreadData::stack):
575
576 2015-07-20  Alex Christensen  <achristensen@webkit.org>
577
578         Resurrect CMake build on Windows.
579         https://bugs.webkit.org/show_bug.cgi?id=147083
580
581         Reviewed by Gyuyoung Kim.
582
583         * wtf/PlatformWin.cmake:
584
585 2015-07-20  Per Arne Vollan  <peavo@outlook.com>
586
587         JavaScriptCore performance is very bad on Windows
588         https://bugs.webkit.org/show_bug.cgi?id=146448
589
590         Reviewed by Mark Lam.
591
592         Updating the stack bounds is time consuming.
593         Only update the stack bounds when a new fiber is running.
594
595         * wtf/WTFThreadData.cpp:
596         (WTF::WTFThreadData::WTFThreadData):
597         * wtf/WTFThreadData.h:
598         (WTF::WTFThreadData::stack):
599
600 2015-07-20  Julien Brianceau  <julien.brianceau@gmail.com>
601
602         Use isnan from std namespace in Stopwatch.h.
603         https://bugs.webkit.org/show_bug.cgi?id=146911
604
605         Reviewed by Žan Doberšek.
606
607         * wtf/Stopwatch.h:
608         (WTF::Stopwatch::isActive):
609         (WTF::Stopwatch::start):
610         (WTF::Stopwatch::stop):
611         (WTF::Stopwatch::elapsedTime):
612
613 2015-07-16  Benjamin Poulain  <bpoulain@apple.com>
614
615         [Content extensions] Combine suffixes when generating NFAs
616         https://bugs.webkit.org/show_bug.cgi?id=146961
617
618         Reviewed by Alex Christensen.
619
620         * wtf/Vector.h:
621         (WTF::minCapacity>::Vector):
622         (WTF::=):
623         Copying a vector with a different inline capacity was broken due to
624         the addition of MinimumCapacity.
625
626         This feature was needed by this patch so I fixed WTF.
627
628 2015-07-15  Anders Carlsson  <andersca@apple.com>
629
630         Make JavaScriptCore SPI headers used by WebCore SPI headers self-contained
631         https://bugs.webkit.org/show_bug.cgi?id=146978
632
633         Reviewed by Dan Bernstein.
634
635         * wtf/ExportMacros.h:
636
637 2015-07-14  Anders Carlsson  <andersca@apple.com>
638
639         Assertions.h should include ExportMacros.h
640         https://bugs.webkit.org/show_bug.cgi?id=146948
641
642         Reviewed by Tim Horton.
643
644         * wtf/Assertions.h:
645
646 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
647
648         Unreviewed build fix, restrict APP_LINKS to just iOS.
649
650         * wtf/Platform.h:
651
652 2015-07-09  Tim Horton  <timothy_horton@apple.com>
653
654         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
655         https://bugs.webkit.org/show_bug.cgi?id=146294
656         <rdar://problem/21090193>
657
658         Reviewed by Anders Carlsson.
659
660         * wtf/Platform.h:
661         Add HAVE(COREANIMATION_FENCES)
662
663 2015-07-04  Chris Dumez  <cdumez@apple.com>
664
665         Drop RefPtr::clear() method
666         https://bugs.webkit.org/show_bug.cgi?id=146556
667
668         Reviewed by Brady Eidson.
669
670         Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
671         Also made the "= nullptr;" pattern as efficient as clear()
672         by providing a operator=(nullptr_t) overload. Local micro-
673         benchmarking showed that "= nullptr;" used to be ~1.7% slower
674         than clear().
675
676 2015-07-03  Dan Bernstein  <mitz@apple.com>
677
678         [Xcode] Update some build settings as recommended by Xcode 7
679         https://bugs.webkit.org/show_bug.cgi?id=146597
680
681         Reviewed by Sam Weinig.
682
683         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
684         GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
685
686         * WTF.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
687
688 2015-07-01  Alex Christensen  <achristensen@webkit.org>
689
690         Re-enable WebGL on WinCairo
691         https://bugs.webkit.org/show_bug.cgi?id=146537
692
693         Reviewed by Csaba Osztrogonác.
694
695         * wtf/FeatureDefines.h:
696         Enable WebGL on WinCairo again.
697
698 2015-07-01  Alex Christensen  <achristensen@webkit.org>
699
700         Ignore Visual Studio warning in SegmentedVector
701         https://bugs.webkit.org/show_bug.cgi?id=146514
702
703         Reviewed by Andreas Kling.
704
705         * wtf/SegmentedVector.h:
706         (WTF::SegmentedVector::deleteAllSegments):
707         Use pragmas to ignore the 0 element array warning.
708
709 2015-07-01  Dean Jackson  <dino@apple.com>
710
711         Disable the experimental WebGL2 implementation
712         https://bugs.webkit.org/show_bug.cgi?id=146526
713         <rdar://problem/21641235>
714
715         Reviewed by Myles Maxfield.
716
717         Add (and disable) an ENABLE_WEBGL2 flag.
718
719         * wtf/FeatureDefines.h:
720
721 2015-06-30  Alex Christensen  <achristensen@webkit.org>
722
723         [Win] Unreviewed build fix after r186169.
724
725         * wtf/FeatureDefines.h:
726         Temporarily disable WebGL on WinCairo. It was already temporarily disabled on AppleWin.
727
728 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
729
730         Implement ECMAScript Internationalization API
731         https://bugs.webkit.org/show_bug.cgi?id=90906
732
733         Reviewed by Benjamin Poulain.
734
735         * wtf/FeatureDefines.h: add ENABLE_INTL flag
736
737 2015-06-30  Keith Miller  <keith_miller@apple.com>
738
739         Errors in read() are not handled in WTF::cryptographicallyRandomValuesFromOS.
740         https://bugs.webkit.org/show_bug.cgi?id=146473
741
742         Reviewed by Filip Pizlo.
743
744         We were not checking if errors occurred in WTF::cryptographicallyRandomValuesFromOS.
745         We now buffer the data until enough bits of entropy exist to fill the buffer
746         rather than crash. Additionally, added two crash functions so we can distinguish
747         between the two reasons why we crashed in traces.
748
749         * wtf/OSRandomSource.cpp:
750         (WTF::crashUnableToOpenFD):
751         (WTF::crashUnableToReadFromFD):
752         (WTF::cryptographicallyRandomValuesFromOS):
753
754 2015-06-29  Dean Jackson  <dino@apple.com>
755
756         Temporarily disable PICTURE_SIZES
757         https://bugs.webkit.org/show_bug.cgi?id=146435
758         <rdar://problem/21087013>
759
760         Reviewed by Tim Horton.
761
762         Temporarily disable PICTURE_SIZES because it causes problems with out
763         of date <picture> polyfills.
764
765         * wtf/FeatureDefines.h:
766
767 2015-06-26  Antti Koivisto  <antti@apple.com>
768
769         Network process hangs fetching disk cache entries
770         https://bugs.webkit.org/show_bug.cgi?id=146348
771         <rdar://problem/21528072>
772
773         Reviewed by Anders Carlsson.
774
775         RunLoop::dispatch may deadlock if invoked with std::function that captures an object that calls RunLoop::dispatch in destructor.
776
777         * wtf/RunLoop.cpp:
778         (WTF::RunLoop::performWork):
779
780             Don't reuse std::function variable in loop. We may end up destroying previously held std::function in assignment
781             while holding the runloop mutex. With this change std::function is always destroyed with mutex unlocked.
782
783 2015-06-24  Commit Queue  <commit-queue@webkit.org>
784
785         Unreviewed, rolling out r185906.
786         https://bugs.webkit.org/show_bug.cgi?id=146276
787
788         MSVC doesn't yet provide a const-qualified std::array<T,
789         N>::size(), failing to compile the static_assert (Requested by
790         zdobersek on #webkit).
791
792         Reverted changeset:
793
794         "Improve the source code generated by make_names.pl"
795         https://bugs.webkit.org/show_bug.cgi?id=146208
796         http://trac.webkit.org/changeset/185906
797
798 2015-06-24  Zan Dobersek  <zdobersek@igalia.com>
799
800         Improve the source code generated by make_names.pl
801         https://bugs.webkit.org/show_bug.cgi?id=146208
802
803         Reviewed by Darin Adler.
804
805         * wtf/text/StringImpl.h:
806         (WTF::StringImpl::assertHashIsCorrect): Make this method const-qualified.
807
808 2015-06-22  Darin Adler  <darin@apple.com>
809
810         Make Array.join work directly on substrings without reifying them
811         https://bugs.webkit.org/show_bug.cgi?id=146191
812
813         Reviewed by Andreas Kling.
814
815         * wtf/Vector.h: Added an overload of uncheckedAppend like the one we added
816         a while back, a non-template function that forwards through to the function
817         template. This lets us call uncheckedAppend on an argument list and have it
818         properly convert it to the Vector's element type.
819
820         * wtf/text/StringView.h:
821         (WTF::StringView::getCharactersWithUpconvert): Changed to not use memcpy;
822         saw some indication the hand-written loop was faster when profiling. Also
823         use m_length directly when we know we are dealing with an 8-bit string,
824         since the masking that the index function does is not needed in that case.
825         (WTF::StringView::UpconvertedCharacters::UpconvertedCharacters): Ditto.
826         (WTF::StringView::toString): Ditto.
827         (WTF::StringView::toFloat): Ditto.
828         (WTF::StringView::toInt): Ditto.
829         (WTF::StringView::toStringWithoutCopying): Ditto.
830         (WTF::StringView::find): Ditto.
831
832 2015-06-22  YunQiang Su  <wzssyqa@gmail.com>
833
834         [WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
835         https://bugs.webkit.org/show_bug.cgi?id=145113
836
837         Reviewed by Csaba Osztrogonác.
838
839         * wtf/Platform.h:
840
841 2015-06-22  Anders Carlsson  <andersca@apple.com>
842
843         Fix build.
844
845         * wtf/threads/BinarySemaphore.cpp:
846
847 2015-06-22  Anders Carlsson  <andersca@apple.com>
848
849         Get rid of the Windows specific BinarySemaphore implementation
850         https://bugs.webkit.org/show_bug.cgi?id=146216
851
852         Reviewed by Andreas Kling.
853
854         The fact that the Windows implementation uses a HEVENT internally was only useful
855         to the Windows port of WebKit2; we can get rid of it now.
856
857         * WTF.vcxproj/WTF.vcxproj:
858         * WTF.vcxproj/WTF.vcxproj.filters:
859         * wtf/threads/BinarySemaphore.h:
860         (WTF::BinarySemaphore::event): Deleted.
861         * wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
862         (WTF::BinarySemaphore::BinarySemaphore): Deleted.
863         (WTF::BinarySemaphore::~BinarySemaphore): Deleted.
864         (WTF::BinarySemaphore::signal): Deleted.
865         (WTF::BinarySemaphore::wait): Deleted.
866
867 2015-06-21  Gavin Barraclough  <barraclough@apple.com>
868
869         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
870         https://bugs.webkit.org/show_bug.cgi?id=146198
871
872         Unreviewed rollout.
873
874         * wtf/glib/GUniquePtr.h:
875
876 2015-06-20  Michael Catanzaro  <mcatanzaro@igalia.com>
877
878         [EFL][GTK] Define GLIB_VERSION_MIN_REQUIRED and require glib 2.36 for GTK
879         https://bugs.webkit.org/show_bug.cgi?id=146181
880
881         Reviewed by Martin Robinson.
882
883         Define GLIB_VERSION_MIN_REQUIRED to avoid deprecation warnings.
884
885         * wtf/Platform.h:
886
887 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
888
889         [SOUP] Define SOUP_VERSION_MIN_REQUIRED
890         https://bugs.webkit.org/show_bug.cgi?id=146165
891
892         Reviewed by Martin Robinson.
893
894         Define SOUP_VERSION_MIN_REQUIRED to avoid deprecation warnings.
895
896         * wtf/Platform.h:
897
898 2015-06-19  Mark Lam  <mark.lam@apple.com>
899
900         Gardening: build fixes for GTK and EFL for CheckedArithmetic change.
901
902         Not reviewed.
903
904         * wtf/CheckedArithmetic.h:
905         (WTF::Checked::operator<):
906         (WTF::Checked::operator<=):
907         (WTF::Checked::operator>):
908         (WTF::Checked::operator>=):
909
910 2015-06-19  Mark Lam  <mark.lam@apple.com>
911
912         CheckedArithmetic's operator bool() and operator==() is broken.
913         https://bugs.webkit.org/show_bug.cgi?id=146129
914
915         Reviewed by Geoffrey Garen and Oliver Hunt.
916
917         The existing operator UnspecifiedBoolType*() in CheckedArithmetic is erroneously
918         allowing the Checked value to be implicitly casted into pointer types.  This is
919         because it is doing a reinterpret_cast<UnspecifiedBoolType*>(1) whereas the idiom
920         relies on the address of a member e.g. &Checked::m_value.  As a result,
921         ImageBufferData::putData() was getting an implicit cast of a Checked value to
922         (void*)1 and doing incorrect pointer comparisons on it.
923
924         Also, 2 of CheckedArithmetic's operator==() will crash if used on an overflowed
925         value, while a 3rd one does not.  The 3rd one should be consistent and also crash
926         if used on an overflowed Checked value.
927
928         In this fix, we replace operator UnspecifiedBoolType*() with an explicit operator
929         bool().  We also add the missing operators <, <=, >, and >=.  That takes care of
930         the comparisons in ImageBufferData::putData().
931
932         * wtf/CheckedArithmetic.h:
933         (WTF::CrashOnOverflow::overflowed):
934         (WTF::CrashOnOverflow::crash):
935         (WTF::RecordOverflow::crash):
936
937         (WTF::Checked::operator!):
938         (WTF::Checked::operator bool):
939         (WTF::Checked::unsafeGet):
940         - Don't call CRASH() directly.  Delegate to the handler.
941
942         (WTF::Checked::operator==):
943         - Should call the handler's crash() to be consistent with the other 2 versions of
944           operator== which will crash in unsafeGet() if used on an overflowed Checked
945           value.
946
947         (WTF::Checked::operator<):
948         (WTF::Checked::operator<=):
949         (WTF::Checked::operator>):
950         (WTF::Checked::operator>=):
951         - Add missing operators.
952
953         (WTF::Checked::operator UnspecifiedBoolType*): Deleted.
954
955 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
956
957         [WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
958         https://bugs.webkit.org/show_bug.cgi?id=145252
959
960         Reviewed by Tim Horton.
961
962         * wtf/FeatureDefines.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC
963         here from Source/WebKit2/WebProcess/WebPage/WebPage.h
964
965 2015-06-17  Andreas Kling  <akling@apple.com>
966
967         SegmentedVector should waste less memory.
968         <https://webkit.org/b/146069>
969
970         Reviewed by Anders Carlsson.
971
972         We were wasting sizeof(Vector) on every segment in SegmentVector.
973         The segments were using inline capacity, and would never go beyond it,
974         so all the size/capacity/out-of-line-buffer metadata was useless.
975
976         Change the internal representation to Vector<T[SegmentSize]> instead.
977         This saves 16 bytes per segment, so lower SegmentSize -> bigger savings!
978
979         * wtf/SegmentedVector.h:
980         (WTF::SegmentedVectorIterator::operator*):
981         (WTF::SegmentedVectorIterator::operator->):
982         (WTF::SegmentedVectorIterator::operator++):
983         (WTF::SegmentedVectorIterator::operator==):
984         (WTF::SegmentedVectorIterator::operator!=):
985         (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
986         (WTF::SegmentedVector::at):
987         (WTF::SegmentedVector::append):
988         (WTF::SegmentedVector::removeLast):
989         (WTF::SegmentedVector::grow):
990         (WTF::SegmentedVector::begin):
991         (WTF::SegmentedVector::end):
992         (WTF::SegmentedVector::deleteAllSegments):
993         (WTF::SegmentedVector::ensureSegmentsFor):
994         (WTF::SegmentedVector::ensureSegment):
995         (WTF::SegmentedVector::allocateSegment):
996         (WTF::SegmentedVectorIterator::operator=): Deleted.
997         (WTF::SegmentedVector::SegmentedVector): Deleted.
998
999 2015-06-16  Andreas Kling  <akling@apple.com>
1000
1001         Remove unused template parameter InlineCapacity from SegmentedVector.
1002         <https://webkit.org/b/146044>
1003
1004         Reviewed by Anders Carlsson.
1005
1006         * wtf/SegmentedVector.h:
1007         (WTF::SegmentedVectorIterator::operator=):
1008         (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
1009         (WTF::SegmentedVector::at):
1010
1011 2015-06-16  Mark Lam  <mark.lam@apple.com>
1012
1013         Use NakedPtr<Exception>& to return exception results.
1014         https://bugs.webkit.org/show_bug.cgi?id=145870
1015
1016         Reviewed by Anders Carlsson and Filip Pizlo.
1017
1018         Introducing the NakedPtr class.
1019
1020         * WTF.xcodeproj/project.pbxproj:
1021         * wtf/NakedPtr.h: Added.
1022         (WTF::NakedPtr::NakedPtr):
1023         (WTF::NakedPtr::get):
1024         (WTF::NakedPtr::clear):
1025         (WTF::NakedPtr::operator*):
1026         (WTF::NakedPtr::operator->):
1027         (WTF::NakedPtr::operator T*):
1028         (WTF::NakedPtr::operator!):
1029         (WTF::NakedPtr::operator bool):
1030         (WTF::=):
1031         (WTF::NakedPtr<T>::swap):
1032         (WTF::swap):
1033
1034 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
1035
1036         [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
1037         https://bugs.webkit.org/show_bug.cgi?id=145799
1038
1039         Reviewed by Carlos Garcia Campos.
1040
1041         Move the GLib-specific files to the Source/WTF/wtf/glib/ directory.
1042         'gobject' wasn't the most appropriate name for the directory since
1043         GObject is a submodule of GLib, but a lot of the code there didn't
1044         have much to do with GObject specifically.
1045
1046         Build rules for the moved files are also updated.
1047
1048         * WTF.vcxproj/WTF.vcxproj:
1049         * WTF.vcxproj/WTF.vcxproj.filters:
1050         * wtf/Platform.h:
1051         * wtf/PlatformEfl.cmake:
1052         * wtf/PlatformGTK.cmake:
1053         * wtf/RunLoop.h:
1054         * wtf/WorkQueue.h:
1055         * wtf/glib/GLibUtilities.cpp: Renamed from Source/WTF/wtf/gobject/GlibUtilities.cpp.
1056         (getCurrentExecutablePath):
1057         * wtf/glib/GLibUtilities.h: Renamed from Source/WTF/wtf/gobject/GlibUtilities.h.
1058         * wtf/glib/GMainLoopSource.cpp: Renamed from Source/WTF/wtf/gobject/GMainLoopSource.cpp.
1059         (WTF::GMainLoopSource::create):
1060         (WTF::GMainLoopSource::GMainLoopSource):
1061         (WTF::GMainLoopSource::~GMainLoopSource):
1062         (WTF::GMainLoopSource::isScheduled):
1063         (WTF::GMainLoopSource::isActive):
1064         (WTF::GMainLoopSource::cancel):
1065         (WTF::GMainLoopSource::scheduleIdleSource):
1066         (WTF::GMainLoopSource::schedule):
1067         (WTF::GMainLoopSource::scheduleTimeoutSource):
1068         (WTF::GMainLoopSource::scheduleAfterDelay):
1069         (WTF::createMicrosecondsTimeoutSource):
1070         (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy):
1071         (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy):
1072         (WTF::GMainLoopSource::prepareVoidCallback):
1073         (WTF::GMainLoopSource::finishVoidCallback):
1074         (WTF::GMainLoopSource::voidCallback):
1075         (WTF::GMainLoopSource::prepareBoolCallback):
1076         (WTF::GMainLoopSource::finishBoolCallback):
1077         (WTF::GMainLoopSource::boolCallback):
1078         (WTF::GMainLoopSource::socketCallback):
1079         (WTF::GMainLoopSource::voidSourceCallback):
1080         (WTF::GMainLoopSource::boolSourceCallback):
1081         (WTF::GMainLoopSource::socketSourceCallback):
1082         (WTF::GMainLoopSource::Context::destroySource):
1083         * wtf/glib/GMainLoopSource.h: Renamed from Source/WTF/wtf/gobject/GMainLoopSource.h.
1084         (WTF::GMainLoopSource::Context::operator=):
1085         * wtf/glib/GMutexLocker.h: Renamed from Source/WTF/wtf/gobject/GMutexLocker.h.
1086         (WTF::MutexWrapper<GMutex>::lock):
1087         (WTF::MutexWrapper<GMutex>::unlock):
1088         (WTF::MutexWrapper<GRecMutex>::lock):
1089         (WTF::MutexWrapper<GRecMutex>::unlock):
1090         (WTF::GMutexLocker::GMutexLocker):
1091         (WTF::GMutexLocker::~GMutexLocker):
1092         (WTF::GMutexLocker::lock):
1093         (WTF::GMutexLocker::unlock):
1094         * wtf/glib/GRefPtr.cpp: Renamed from Source/WTF/wtf/gobject/GRefPtr.cpp.
1095         (WTF::refGPtr):
1096         (WTF::derefGPtr):
1097         * wtf/glib/GRefPtr.h: Renamed from Source/WTF/wtf/gobject/GRefPtr.h.
1098         (WTF::GRefPtr::GRefPtr):
1099         (WTF::GRefPtr::~GRefPtr):
1100         (WTF::GRefPtr::clear):
1101         (WTF::GRefPtr::outPtr):
1102         (WTF::GRefPtr::isHashTableDeletedValue):
1103         (WTF::GRefPtr::get):
1104         (WTF::GRefPtr::operator*):
1105         (WTF::GRefPtr::operator->):
1106         (WTF::GRefPtr::operator!):
1107         (WTF::GRefPtr::operator UnspecifiedBoolType):
1108         (WTF::GRefPtr::hashTableDeletedValue):
1109         (WTF::=):
1110         (WTF::GRefPtr<T>::swap):
1111         (WTF::swap):
1112         (WTF::operator==):
1113         (WTF::operator!=):
1114         (WTF::static_pointer_cast):
1115         (WTF::const_pointer_cast):
1116         (WTF::adoptGRef):
1117         (WTF::refGPtr):
1118         (WTF::derefGPtr):
1119         * wtf/glib/GThreadSafeMainLoopSource.cpp: Renamed from Source/WTF/wtf/gobject/GThreadSafeMainLoopSource.cpp.
1120         (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource):
1121         (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource):
1122         (WTF::GThreadSafeMainLoopSource::cancel):
1123         (WTF::GThreadSafeMainLoopSource::schedule):
1124         (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay):
1125         (WTF::GThreadSafeMainLoopSource::prepareVoidCallback):
1126         (WTF::GThreadSafeMainLoopSource::finishVoidCallback):
1127         (WTF::GThreadSafeMainLoopSource::voidCallback):
1128         (WTF::GThreadSafeMainLoopSource::prepareBoolCallback):
1129         (WTF::GThreadSafeMainLoopSource::finishBoolCallback):
1130         (WTF::GThreadSafeMainLoopSource::boolCallback):
1131         * wtf/glib/GThreadSafeMainLoopSource.h: Renamed from Source/WTF/wtf/gobject/GThreadSafeMainLoopSource.h.
1132         * wtf/glib/GTypedefs.h: Renamed from Source/WTF/wtf/gobject/GTypedefs.h.
1133         * wtf/glib/GUniquePtr.h: Renamed from Source/WTF/wtf/gobject/GUniquePtr.h.
1134         (WTF::GPtrDeleter::operator()):
1135         (WTF::GUniqueOutPtr::GUniqueOutPtr):
1136         (WTF::GUniqueOutPtr::~GUniqueOutPtr):
1137         (WTF::GUniqueOutPtr::outPtr):
1138         (WTF::GUniqueOutPtr::release):
1139         (WTF::GUniqueOutPtr::operator*):
1140         (WTF::GUniqueOutPtr::operator->):
1141         (WTF::GUniqueOutPtr::get):
1142         (WTF::GUniqueOutPtr::operator!):
1143         (WTF::GUniqueOutPtr::operator UnspecifiedBoolType):
1144         (WTF::GUniqueOutPtr::reset):
1145         * wtf/glib/MainThreadGLib.cpp:
1146         * wtf/gobject/GMainLoopSource.cpp:
1147         (WTF::GMainLoopSource::create): Deleted.
1148         (WTF::GMainLoopSource::GMainLoopSource): Deleted.
1149         (WTF::GMainLoopSource::~GMainLoopSource): Deleted.
1150         (WTF::GMainLoopSource::isScheduled): Deleted.
1151         (WTF::GMainLoopSource::isActive): Deleted.
1152         (WTF::GMainLoopSource::cancel): Deleted.
1153         (WTF::GMainLoopSource::scheduleIdleSource): Deleted.
1154         (WTF::GMainLoopSource::schedule): Deleted.
1155         (WTF::GMainLoopSource::scheduleTimeoutSource): Deleted.
1156         (WTF::GMainLoopSource::scheduleAfterDelay): Deleted.
1157         (WTF::createMicrosecondsTimeoutSource): Deleted.
1158         (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy): Deleted.
1159         (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Deleted.
1160         (WTF::GMainLoopSource::prepareVoidCallback): Deleted.
1161         (WTF::GMainLoopSource::finishVoidCallback): Deleted.
1162         (WTF::GMainLoopSource::voidCallback): Deleted.
1163         (WTF::GMainLoopSource::prepareBoolCallback): Deleted.
1164         (WTF::GMainLoopSource::finishBoolCallback): Deleted.
1165         (WTF::GMainLoopSource::boolCallback): Deleted.
1166         (WTF::GMainLoopSource::socketCallback): Deleted.
1167         (WTF::GMainLoopSource::voidSourceCallback): Deleted.
1168         (WTF::GMainLoopSource::boolSourceCallback): Deleted.
1169         (WTF::GMainLoopSource::socketSourceCallback): Deleted.
1170         (WTF::GMainLoopSource::Context::destroySource): Deleted.
1171         * wtf/gobject/GMainLoopSource.h:
1172         (WTF::GMainLoopSource::Context::operator=): Deleted.
1173         * wtf/gobject/GMutexLocker.h:
1174         (WTF::MutexWrapper<GMutex>::lock): Deleted.
1175         (WTF::MutexWrapper<GMutex>::unlock): Deleted.
1176         (WTF::MutexWrapper<GRecMutex>::lock): Deleted.
1177         (WTF::MutexWrapper<GRecMutex>::unlock): Deleted.
1178         (WTF::GMutexLocker::GMutexLocker): Deleted.
1179         (WTF::GMutexLocker::~GMutexLocker): Deleted.
1180         (WTF::GMutexLocker::lock): Deleted.
1181         (WTF::GMutexLocker::unlock): Deleted.
1182         * wtf/gobject/GRefPtr.cpp:
1183         (WTF::refGPtr): Deleted.
1184         (WTF::derefGPtr): Deleted.
1185         * wtf/gobject/GRefPtr.h:
1186         (WTF::GRefPtr::GRefPtr): Deleted.
1187         (WTF::GRefPtr::~GRefPtr): Deleted.
1188         (WTF::GRefPtr::clear): Deleted.
1189         (WTF::GRefPtr::outPtr): Deleted.
1190         (WTF::GRefPtr::isHashTableDeletedValue): Deleted.
1191         (WTF::GRefPtr::get): Deleted.
1192         (WTF::GRefPtr::operator*): Deleted.
1193         (WTF::GRefPtr::operator->): Deleted.
1194         (WTF::GRefPtr::operator!): Deleted.
1195         (WTF::GRefPtr::operator UnspecifiedBoolType): Deleted.
1196         (WTF::GRefPtr::hashTableDeletedValue): Deleted.
1197         (WTF::=): Deleted.
1198         (WTF::GRefPtr<T>::swap): Deleted.
1199         (WTF::swap): Deleted.
1200         (WTF::operator==): Deleted.
1201         (WTF::operator!=): Deleted.
1202         (WTF::static_pointer_cast): Deleted.
1203         (WTF::const_pointer_cast): Deleted.
1204         (WTF::adoptGRef): Deleted.
1205         (WTF::refGPtr): Deleted.
1206         (WTF::derefGPtr): Deleted.
1207         * wtf/gobject/GThreadSafeMainLoopSource.cpp:
1208         (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource): Deleted.
1209         (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource): Deleted.
1210         (WTF::GThreadSafeMainLoopSource::cancel): Deleted.
1211         (WTF::GThreadSafeMainLoopSource::schedule): Deleted.
1212         (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay): Deleted.
1213         (WTF::GThreadSafeMainLoopSource::prepareVoidCallback): Deleted.
1214         (WTF::GThreadSafeMainLoopSource::finishVoidCallback): Deleted.
1215         (WTF::GThreadSafeMainLoopSource::voidCallback): Deleted.
1216         (WTF::GThreadSafeMainLoopSource::prepareBoolCallback): Deleted.
1217         (WTF::GThreadSafeMainLoopSource::finishBoolCallback): Deleted.
1218         (WTF::GThreadSafeMainLoopSource::boolCallback): Deleted.
1219         * wtf/gobject/GUniquePtr.h:
1220         (WTF::GPtrDeleter::operator()): Deleted.
1221         (WTF::GUniqueOutPtr::GUniqueOutPtr): Deleted.
1222         (WTF::GUniqueOutPtr::~GUniqueOutPtr): Deleted.
1223         (WTF::GUniqueOutPtr::outPtr): Deleted.
1224         (WTF::GUniqueOutPtr::release): Deleted.
1225         (WTF::GUniqueOutPtr::operator*): Deleted.
1226         (WTF::GUniqueOutPtr::operator->): Deleted.
1227         (WTF::GUniqueOutPtr::get): Deleted.
1228         (WTF::GUniqueOutPtr::operator!): Deleted.
1229         (WTF::GUniqueOutPtr::operator UnspecifiedBoolType): Deleted.
1230         (WTF::GUniqueOutPtr::reset): Deleted.
1231         * wtf/gobject/GlibUtilities.cpp:
1232         (getCurrentExecutablePath): Deleted.
1233
1234 2015-06-10  Basile Clement  <basile_clement@apple.com>
1235
1236         Unreviewed, fix an typo in unused template code.
1237
1238         * wtf/TinyPtrSet.h:
1239         (WTF::TinyPtrSet::iterator::operator*): s/at(index)/at(m_index)/
1240
1241 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
1242
1243         [cmake] Fix the style issues in cmake project files
1244         https://bugs.webkit.org/show_bug.cgi?id=145755
1245
1246         Reviewed by Darin Adler.
1247
1248         * wtf/CMakeLists.txt:
1249
1250 2015-06-08  Alexey Proskuryakov  <ap@apple.com>
1251
1252         Build fix.
1253
1254         * wtf/TinyPtrSet.h: (WTF::TinyPtrSet::isEmpty): s/poointer/pointer/
1255
1256 2015-06-07  Filip Pizlo  <fpizlo@apple.com>
1257
1258         The tiny set magic in StructureSet should be available in WTF
1259         https://bugs.webkit.org/show_bug.cgi?id=145722
1260
1261         Reviewed by Geoffrey Garen.
1262         
1263         As the management of structure sets evolved in JSC, the StructureSet data structure grew
1264         increasingly smart. It's got some smart stuff for managing small sets of pointers. I
1265         wanted to take the generic logic out of JSC and put it into a reusable templatized class
1266         in WTF.
1267         
1268         * WTF.vcxproj/WTF.vcxproj:
1269         * WTF.xcodeproj/project.pbxproj:
1270         * wtf/CMakeLists.txt:
1271         * wtf/TinyPtrSet.h: Added.
1272         (WTF::TinyPtrSet::TinyPtrSet):
1273         (WTF::TinyPtrSet::operator=):
1274         (WTF::TinyPtrSet::~TinyPtrSet):
1275         (WTF::TinyPtrSet::clear):
1276         (WTF::TinyPtrSet::onlyEntry):
1277         (WTF::TinyPtrSet::isEmpty):
1278         (WTF::TinyPtrSet::add):
1279         (WTF::TinyPtrSet::remove):
1280         (WTF::TinyPtrSet::contains):
1281         (WTF::TinyPtrSet::merge):
1282         (WTF::TinyPtrSet::forEach):
1283         (WTF::TinyPtrSet::genericFilter):
1284         (WTF::TinyPtrSet::filter):
1285         (WTF::TinyPtrSet::exclude):
1286         (WTF::TinyPtrSet::isSubsetOf):
1287         (WTF::TinyPtrSet::isSupersetOf):
1288         (WTF::TinyPtrSet::overlaps):
1289         (WTF::TinyPtrSet::size):
1290         (WTF::TinyPtrSet::at):
1291         (WTF::TinyPtrSet::operator[]):
1292         (WTF::TinyPtrSet::last):
1293         (WTF::TinyPtrSet::iterator::iterator):
1294         (WTF::TinyPtrSet::iterator::operator*):
1295         (WTF::TinyPtrSet::iterator::operator++):
1296         (WTF::TinyPtrSet::iterator::operator==):
1297         (WTF::TinyPtrSet::iterator::operator!=):
1298         (WTF::TinyPtrSet::begin):
1299         (WTF::TinyPtrSet::end):
1300         (WTF::TinyPtrSet::operator==):
1301         (WTF::TinyPtrSet::addOutOfLine):
1302         (WTF::TinyPtrSet::containsOutOfLine):
1303         (WTF::TinyPtrSet::copyFrom):
1304         (WTF::TinyPtrSet::copyFromOutOfLine):
1305         (WTF::TinyPtrSet::OutOfLineList::create):
1306         (WTF::TinyPtrSet::OutOfLineList::destroy):
1307         (WTF::TinyPtrSet::OutOfLineList::list):
1308         (WTF::TinyPtrSet::OutOfLineList::OutOfLineList):
1309         (WTF::TinyPtrSet::deleteListIfNecessary):
1310         (WTF::TinyPtrSet::isThin):
1311         (WTF::TinyPtrSet::pointer):
1312         (WTF::TinyPtrSet::singleEntry):
1313         (WTF::TinyPtrSet::list):
1314         (WTF::TinyPtrSet::set):
1315         (WTF::TinyPtrSet::setEmpty):
1316         (WTF::TinyPtrSet::getReservedFlag):
1317         (WTF::TinyPtrSet::setReservedFlag):
1318
1319 2015-06-05  Chris Dumez  <cdumez@apple.com>
1320
1321         [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1322         https://bugs.webkit.org/show_bug.cgi?id=145672
1323         <rdar://problem/21126637>
1324
1325         Reviewed by Antti Koivisto.
1326
1327         * wtf/RefCounter.h:
1328         (WTF::RefCounter::value):
1329
1330         Expose the actual refcount instead of a boolean value.
1331
1332 2015-06-05  Alex Christensen  <achristensen@webkit.org>
1333
1334         [Web Timing] Use new SPI to enable data collection.
1335         https://bugs.webkit.org/show_bug.cgi?id=145650
1336         rdar://problem/21203358
1337
1338         Reviewed by Chris Dumez.
1339
1340         * wtf/Platform.h:
1341         Added HAVE_TIMINGDATAOPTIONS for platform and version dependent feature.
1342
1343 2015-06-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1344
1345         [Streams API] ReadableStream should store callbacks as a Deque
1346         https://bugs.webkit.org/show_bug.cgi?id=145641
1347
1348         Reviewed by Darin Adler.
1349
1350         * wtf/Deque.h:
1351         (WTF::Deque::append): Adding not templated append method, forwarding to templated append method.
1352
1353 2015-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1354
1355         [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
1356         https://bugs.webkit.org/show_bug.cgi?id=144907
1357
1358         Reviewed by Darin Adler.
1359
1360         * wtf/Vector.h:
1361         (WTF::Vector::append): Adding not templated append method, forwarding to ValueType templated append method.
1362
1363 2015-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1364
1365         Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
1366         https://bugs.webkit.org/show_bug.cgi?id=145532
1367
1368         Reviewed by Geoffrey Garen.
1369
1370         Return `RefPtr<AtomicStringImpl>` instead of `AtomicStringImpl*`.
1371
1372         * wtf/text/AtomicStringImpl.cpp:
1373         (WTF::AtomicStringImpl::lookUpSlowCase):
1374         (WTF::AtomicStringImpl::lookUpInternal):
1375         * wtf/text/AtomicStringImpl.h:
1376         (WTF::AtomicStringImpl::lookUp):
1377
1378 2015-06-01  Anders Carlsson  <andersca@apple.com>
1379
1380         Use xpc_connection_set_oneshot_instance where possible
1381         https://bugs.webkit.org/show_bug.cgi?id=145535
1382         rdar://problem/21109994
1383
1384         Reviewed by Sam Weinig.
1385
1386         Add SPI declaration.
1387
1388         * wtf/spi/darwin/XPCSPI.h:
1389
1390 2015-05-29  Anders Carlsson  <andersca@apple.com>
1391
1392         Missing #import of Platform.h in several WTF headers
1393         https://bugs.webkit.org/show_bug.cgi?id=145475
1394         rdar://problem/21161818
1395
1396         Reviewed by Darin Adler.
1397
1398         Add Platform.h #includes.
1399
1400         * wtf/Assertions.h:
1401         * wtf/RetainPtr.h:
1402
1403 2015-05-29  Commit Queue  <commit-queue@webkit.org>
1404
1405         Unreviewed, rolling out r184949.
1406         https://bugs.webkit.org/show_bug.cgi?id=145458
1407
1408         Ends up generating worse code for HashTable move constructors
1409         (Requested by zdobersek on #webkit).
1410
1411         Reverted changeset:
1412
1413         "Clean up HashTable constructors"
1414         https://bugs.webkit.org/show_bug.cgi?id=145369
1415         http://trac.webkit.org/changeset/184949
1416
1417 2015-05-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1418
1419         Purge PassRefPtr in StringConcatenate.h
1420         https://bugs.webkit.org/show_bug.cgi?id=145376
1421
1422         Reviewed by Darin Adler.
1423
1424         Replace PassRefPtr with RefPtr. Additionally use nullptr instead of 0.
1425
1426         * wtf/text/StringConcatenate.h:
1427         (WTF::tryMakeString):
1428         (WTF::makeString):
1429
1430 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
1431
1432         Clean up HashTable constructors
1433         https://bugs.webkit.org/show_bug.cgi?id=145369
1434
1435         Reviewed by Andreas Kling.
1436
1437         Use nullptr to initialize pointer member variables in the HashTable
1438         default constructor. Copy and move constructors can use constructor
1439         delegation instead of replicating all member initializations. Move
1440         constructor should simply call HashTable::swap() instead of replicating
1441         all the swap operations.
1442
1443         * wtf/HashTable.h:
1444         (WTF::KeyTraits>::HashTable):
1445
1446 2015-05-27  Alexey Proskuryakov  <ap@apple.com>
1447
1448         [Mac] Fix clang static analyzer build
1449         https://bugs.webkit.org/show_bug.cgi?id=145426
1450         rdar://problem/20947408
1451
1452         Reviewed by Dan Bernstein.
1453
1454         * wtf/spi/darwin/XPCSPI.h: Correct declarations of xpc_retain and xpc_release.
1455
1456 2015-05-27  Dean Jackson  <dino@apple.com>
1457
1458         img.currentSrc problem in strict mode with old picturefill
1459         https://bugs.webkit.org/show_bug.cgi?id=144095
1460         <rdar://problem/21087013>
1461
1462         Reviewed by Simon Fraser.
1463
1464         Add a PICTURE_SIZES flag.
1465
1466         * wtf/FeatureDefines.h:
1467
1468 2015-05-26  Andreas Kling  <akling@apple.com>
1469
1470         StringView should have find(StringView, start).
1471         <https://webkit.org/b/145351>
1472
1473         Reviewed by Darin Adler.
1474
1475         Move the class agnostic guts of StringImpl's find() implementation from StringImpl
1476         to StringCommon.h and templatize the code into a findCommon() helper.
1477
1478         StringImpl::find() and StringView::find() now both call findCommon().
1479
1480         * wtf/text/StringCommon.h:
1481         (WTF::findInner):
1482         (WTF::find):
1483         (WTF::findCommon):
1484         * wtf/text/StringImpl.cpp:
1485         (WTF::StringImpl::find):
1486         (WTF::findInner): Deleted.
1487         * wtf/text/StringImpl.h:
1488         (WTF::find): Deleted.
1489         * wtf/text/StringView.cpp:
1490         (WTF::StringView::find):
1491         * wtf/text/StringView.h:
1492
1493
1494 2015-05-26  Dan Bernstein  <mitz@apple.com>
1495
1496         <rdar://problem/21104551> Update build settings
1497
1498         Reviewed by Anders Carlsson.
1499
1500         * Configurations/DebugRelease.xcconfig:
1501
1502 2015-05-23  Dan Bernstein  <mitz@apple.com>
1503
1504         Remove unused definitions of WEBKIT_VERSION_MIN_REQUIRED
1505         https://bugs.webkit.org/show_bug.cgi?id=145345
1506
1507         Reviewed by Sam Weinig.
1508
1509         * Configurations/Base.xcconfig: Also changed to use $(inherited).
1510
1511 2015-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1512
1513         Introduce UniquedStringImpl and SymbolImpl to separate symbolic strings from AtomicStringImpl
1514         https://bugs.webkit.org/show_bug.cgi?id=144848
1515
1516         Reviewed by Darin Adler.
1517
1518         he current AtomicStringImpl accidentally means the symbol OR atomic StringImpl.
1519         t's not correct to its name and it's error prone.
1520
1521         In this patch, we'll introduce/changes classes into WTF.
1522
1523         1. UniquedStringImpl
1524         It's derived class from StringImpl. And it represents symbol || atomic StringImpl.
1525
1526         2. SymbolImpl
1527         It's derived class from UniquedStringImpl. Only symbol strings can become this.
1528         It ensures the given StringImpl is symbol in compile time.
1529
1530         3. AtomicStringImpl
1531         It's derived class from UniquedStringImpl. Only atomic (non-normal && non-symbol) strings can become this.
1532         It ensures the given StringImpl is atomic in compile time.
1533
1534         And, in this time, I just accept UniqueStringImpl in AtomicString. As the result,
1535         1. Now AtomicStringImpl issue is fixed. Its SymbolImpl is separated and UniquedStringImpl is introduced.
1536         2. But AtomicString still have both symbol and atomic strings.
1537         This should be solved in the separated patch.
1538
1539         * WTF.vcxproj/WTF.vcxproj:
1540         * WTF.vcxproj/WTF.vcxproj.filters:
1541         * WTF.xcodeproj/project.pbxproj:
1542         * wtf/CMakeLists.txt:
1543         * wtf/PrintStream.cpp:
1544         * wtf/PrintStream.h:
1545         (WTF::printInternal):
1546         * wtf/text/AtomicString.h:
1547         (WTF::AtomicString::AtomicString):
1548         * wtf/text/AtomicStringImpl.h:
1549         * wtf/text/StringImpl.cpp:
1550         (WTF::StringImpl::~StringImpl):
1551         (WTF::StringImpl::createSymbol):
1552         (WTF::StringImpl::createSymbolEmpty):
1553         * wtf/text/StringImpl.h:
1554         * wtf/text/SymbolImpl.h: Copied from Source/JavaScriptCore/runtime/PrivateName.h.
1555         * wtf/text/SymbolRegistry.cpp:
1556         (WTF::SymbolRegistry::symbolForKey):
1557         (WTF::SymbolRegistry::keyForSymbol):
1558         (WTF::SymbolRegistry::remove):
1559         * wtf/text/SymbolRegistry.h:
1560         * wtf/text/UniquedStringImpl.h: Copied from Source/JavaScriptCore/runtime/PrivateName.h.
1561
1562 2015-05-20  Zan Dobersek  <zdobersek@igalia.com>
1563
1564         [GTK] Move MainThreadGtk, RunLoopGtk, WorkQueueGtk under Source/WTF/wtf/glib/
1565         https://bugs.webkit.org/show_bug.cgi?id=145117
1566
1567         Reviewed by Csaba Osztrogonác.
1568
1569         Move the MainThreadGtk, RunLoopGtk and WorkQueueGtk implementation files from
1570         Source/WTF/wtf/gtk/ to Source/WTF/wtf/glib/. These implementations are not
1571         GTK-specific and only depend on GLib, so they are renamed as well.
1572
1573         There are other such implementations under Source/WTF/wtf/gobject/ (GObject
1574         is just a subset of GLib) that will be moved under the new directory in
1575         future patches.
1576
1577         * wtf/PlatformGTK.cmake:
1578         * wtf/glib/MainThreadGLib.cpp: Renamed from Source/WTF/wtf/gtk/MainThreadGtk.cpp.
1579         (WTF::initializeMainThreadPlatform):
1580         (WTF::scheduleDispatchFunctionsOnMainThread):
1581         * wtf/glib/RunLoopGLib.cpp: Renamed from Source/WTF/wtf/gtk/RunLoopGtk.cpp.
1582         (WTF::RunLoop::RunLoop):
1583         (WTF::RunLoop::~RunLoop):
1584         (WTF::RunLoop::run):
1585         (WTF::RunLoop::stop):
1586         (WTF::RunLoop::wakeUp):
1587         (WTF::RunLoop::TimerBase::TimerBase):
1588         (WTF::RunLoop::TimerBase::~TimerBase):
1589         (WTF::RunLoop::TimerBase::start):
1590         (WTF::RunLoop::TimerBase::stop):
1591         (WTF::RunLoop::TimerBase::isActive):
1592         * wtf/glib/WorkQueueGLib.cpp: Renamed from Source/WTF/wtf/gtk/WorkQueueGtk.cpp.
1593         (WTF::WorkQueue::platformInitialize):
1594         (WTF::WorkQueue::platformInvalidate):
1595         (WTF::WorkQueue::registerSocketEventHandler):
1596         (WTF::WorkQueue::unregisterSocketEventHandler):
1597         (WTF::WorkQueue::dispatch):
1598         (WTF::WorkQueue::dispatchAfter):
1599
1600 2015-05-19  Andreas Kling  <akling@apple.com>
1601
1602         Give StringView a utf8() API.
1603         <https://webkit.org/b/145201>
1604
1605         Reviewed by Anders Carlsson
1606
1607         Added an LChar version of StringImpl::utf8ForCharacters() and use that to give
1608         StringView a utf8() API just like String has.
1609
1610         * wtf/text/StringImpl.cpp:
1611         (WTF::StringImpl::utf8ForCharacters):
1612         * wtf/text/StringImpl.h:
1613         * wtf/text/StringView.cpp:
1614         (WTF::StringView::utf8):
1615         * wtf/text/StringView.h:
1616
1617 2015-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
1618
1619         Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
1620         https://bugs.webkit.org/show_bug.cgi?id=145109
1621
1622         Reviewed by Darin Adler.
1623
1624         Now AtomicStringImpl table operations are located in AtomicString.
1625         But they should be under AtomicStringImpl.
1626         This patch simply moves these operations to AtomicStringImpl.
1627
1628         And this patch renames static AtomicString::find to static AtomicStringImpl::lookUp
1629         because it conflicts with AtomicStringImpl's member function name.
1630
1631         * WTF.vcxproj/WTF.vcxproj:
1632         * WTF.vcxproj/WTF.vcxproj.filters:
1633         * WTF.vcxproj/copy-files.cmd:
1634         * WTF.xcodeproj/project.pbxproj:
1635         * wtf/CMakeLists.txt:
1636         * wtf/PlatformMac.cmake:
1637         * wtf/PlatformWin.cmake:
1638         * wtf/text/AtomicString.cpp:
1639         (WTF::AtomicString::lower):
1640         (WTF::AtomicString::convertToASCIILowercase):
1641         (WTF::AtomicString::fromUTF8Internal):
1642         (WTF::AtomicStringTableLocker::AtomicStringTableLocker): Deleted.
1643         (WTF::stringTable): Deleted.
1644         (WTF::addToStringTable): Deleted.
1645         (WTF::CStringTranslator::hash): Deleted.
1646         (WTF::CStringTranslator::equal): Deleted.
1647         (WTF::CStringTranslator::translate): Deleted.
1648         (WTF::AtomicString::add): Deleted.
1649         (WTF::UCharBufferTranslator::hash): Deleted.
1650         (WTF::UCharBufferTranslator::equal): Deleted.
1651         (WTF::UCharBufferTranslator::translate): Deleted.
1652         (WTF::HashAndCharactersTranslator::hash): Deleted.
1653         (WTF::HashAndCharactersTranslator::equal): Deleted.
1654         (WTF::HashAndCharactersTranslator::translate): Deleted.
1655         (WTF::HashAndUTF8CharactersTranslator::hash): Deleted.
1656         (WTF::HashAndUTF8CharactersTranslator::equal): Deleted.
1657         (WTF::HashAndUTF8CharactersTranslator::translate): Deleted.
1658         (WTF::SubstringTranslator::translate): Deleted.
1659         (WTF::SubstringTranslator8::hash): Deleted.
1660         (WTF::SubstringTranslator8::equal): Deleted.
1661         (WTF::SubstringTranslator16::hash): Deleted.
1662         (WTF::SubstringTranslator16::equal): Deleted.
1663         (WTF::LCharBufferTranslator::hash): Deleted.
1664         (WTF::LCharBufferTranslator::equal): Deleted.
1665         (WTF::LCharBufferTranslator::translate): Deleted.
1666         (WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
1667         (WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
1668         (WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
1669         (WTF::AtomicString::addFromLiteralData): Deleted.
1670         (WTF::AtomicString::addSlowCase): Deleted.
1671         (WTF::AtomicString::remove): Deleted.
1672         (WTF::AtomicString::findSlowCase): Deleted.
1673         (WTF::AtomicString::findInternal): Deleted.
1674         (WTF::AtomicString::isInAtomicStringTable): Deleted.
1675         * wtf/text/AtomicString.h:
1676         (WTF::AtomicString::AtomicString):
1677         (WTF::AtomicString::fromUTF8):
1678         (WTF::AtomicString::find): Deleted.
1679         (WTF::AtomicString::add): Deleted.
1680         (WTF::AtomicString::addWithStringTableProvider): Deleted.
1681         * wtf/text/AtomicStringImpl.cpp: Copied from Source/WTF/wtf/text/AtomicString.cpp.
1682         (WTF::AtomicStringTableLocker::AtomicStringTableLocker):
1683         (WTF::stringTable):
1684         (WTF::addToStringTable):
1685         (WTF::CStringTranslator::hash):
1686         (WTF::CStringTranslator::equal):
1687         (WTF::CStringTranslator::translate):
1688         (WTF::AtomicStringImpl::add):
1689         (WTF::UCharBufferTranslator::hash):
1690         (WTF::UCharBufferTranslator::equal):
1691         (WTF::UCharBufferTranslator::translate):
1692         (WTF::HashAndCharactersTranslator::hash):
1693         (WTF::HashAndCharactersTranslator::equal):
1694         (WTF::HashAndCharactersTranslator::translate):
1695         (WTF::HashAndUTF8CharactersTranslator::hash):
1696         (WTF::HashAndUTF8CharactersTranslator::equal):
1697         (WTF::HashAndUTF8CharactersTranslator::translate):
1698         (WTF::SubstringTranslator::translate):
1699         (WTF::SubstringTranslator8::hash):
1700         (WTF::SubstringTranslator8::equal):
1701         (WTF::SubstringTranslator16::hash):
1702         (WTF::SubstringTranslator16::equal):
1703         (WTF::LCharBufferTranslator::hash):
1704         (WTF::LCharBufferTranslator::equal):
1705         (WTF::LCharBufferTranslator::translate):
1706         (WTF::CharBufferFromLiteralDataTranslator::hash):
1707         (WTF::CharBufferFromLiteralDataTranslator::equal):
1708         (WTF::CharBufferFromLiteralDataTranslator::translate):
1709         (WTF::AtomicStringImpl::addLiteral):
1710         (WTF::AtomicStringImpl::addSlowCase):
1711         (WTF::AtomicStringImpl::remove):
1712         (WTF::AtomicStringImpl::lookUpSlowCase):
1713         (WTF::AtomicStringImpl::addUTF8):
1714         (WTF::AtomicStringImpl::lookUpInternal):
1715         (WTF::AtomicStringImpl::isInAtomicStringTable):
1716         * wtf/text/AtomicStringImpl.h:
1717         (WTF::AtomicStringImpl::lookUp):
1718         (WTF::AtomicStringImpl::add):
1719         (WTF::AtomicStringImpl::addWithStringTableProvider):
1720         (WTF::AtomicStringImpl::AtomicStringImpl): Deleted.
1721         * wtf/text/StringImpl.cpp:
1722         (WTF::StringImpl::~StringImpl):
1723         * wtf/text/StringImpl.h:
1724         * wtf/text/WTFString.h:
1725         (WTF::String::String):
1726         * wtf/text/cf/AtomicStringCF.cpp:
1727         (WTF::AtomicString::add): Deleted.
1728         * wtf/text/cf/AtomicStringImplCF.cpp: Renamed from Source/WTF/wtf/text/cf/AtomicStringCF.cpp.
1729         (WTF::AtomicStringImpl::add):
1730
1731 2015-05-19  Ting-Wei Lan  <lantw44@gmail.com>
1732
1733         [SOUP] Use st_birthtime to get creation time of files on systems support it
1734         https://bugs.webkit.org/show_bug.cgi?id=144989
1735
1736         Reviewed by Carlos Garcia Campos.
1737
1738         Define HAVE(STAT_BIRTHTIME) as 1 on operating systems supporting
1739         getting creation time of files using st_birthtime in stat.
1740
1741         * wtf/Platform.h:
1742
1743 2015-05-19  Chris Dumez  <cdumez@apple.com>
1744
1745         Mark static variables as const when possible
1746         https://bugs.webkit.org/show_bug.cgi?id=145161
1747
1748         Reviewed by Andreas Kling.
1749
1750         * wtf/dtoa.cpp:
1751         (WTF::pow5mult):
1752
1753 2015-05-19  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1754
1755         [EFL] Remove unnecessary PLATFORM(EFL) macro in EFL specific files
1756         https://bugs.webkit.org/show_bug.cgi?id=145160
1757
1758         Reviewed by Csaba Osztrogonác.
1759
1760         * wtf/efl/EflTypedefs.h: Remove PLATFORM(EFL).
1761         * wtf/efl/UniquePtrEfl.h: ditto.
1762
1763 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1764
1765         [CMake] Ignore warnings in system headers
1766         https://bugs.webkit.org/show_bug.cgi?id=144747
1767
1768         Reviewed by Darin Adler.
1769
1770         Separate include directories into WebKit project includes and system includes. Suppress all
1771         warnings from headers in system include directories using the SYSTEM argument to
1772         the include_directories command.
1773
1774         * wtf/CMakeLists.txt:
1775         * wtf/PlatformEfl.cmake:
1776         * wtf/PlatformGTK.cmake:
1777
1778 2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
1779
1780         Addressing post-review comments on r184353
1781         https://bugs.webkit.org/show_bug.cgi?id=145146
1782
1783         Reviewed by Benjamin Poulain.
1784
1785         Create an overload for equalIgnoringASCIICase() for AtomicString and string literals.
1786
1787         * wtf/text/AtomicString.h:
1788         (WTF::equalIgnoringASCIICase):
1789
1790 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
1791
1792         [ES6] Arrow function syntax. Feature flag for arrow function
1793         https://bugs.webkit.org/show_bug.cgi?id=145108
1794
1795         Reviewed by Ryosuke Niwa.
1796
1797         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
1798
1799         * wtf/FeatureDefines.h:
1800
1801 2015-05-17  Benjamin Poulain  <benjamin@webkit.org>
1802
1803         Do not use fastMallocGoodSize anywhere
1804         https://bugs.webkit.org/show_bug.cgi?id=145103
1805
1806         Reviewed by Michael Saboff.
1807
1808         It is silly we see fastMallocGoodSize in profiles, it does absolutely nothing.
1809
1810         This patch keeps fastMallocGoodSize() around for older code linking
1811         with newer WebKit, but remove any use of it inside WebKit.
1812
1813         * wtf/FastMalloc.cpp:
1814         (WTF::fastMallocGoodSize):
1815         * wtf/FastMalloc.h:
1816         * wtf/Vector.h:
1817         (WTF::VectorBufferBase::allocateBuffer):
1818         (WTF::VectorBufferBase::tryAllocateBuffer):
1819         (WTF::VectorBufferBase::reallocateBuffer):
1820
1821 2015-05-15  Dan Bernstein  <mitz@apple.com>
1822
1823         Build fix for some versions of clang.
1824
1825         * wtf/SaturatedArithmetic.h:
1826         (signedAddOverflows):
1827         (signedSubtractOverflows):
1828
1829 2015-05-14  Dan Bernstein  <mitz@apple.com>
1830
1831         Reverted r177753, now that <rdar://problem/19347133> is fixed.
1832
1833         Rubber-stamped by Benjamin Poulain.
1834
1835         * wtf/SaturatedArithmetic.h:
1836         (signedAddOverflows):
1837         (signedSubtractOverflows):
1838
1839 2015-05-14  Myles C. Maxfield  <mmaxfield@apple.com>
1840
1841         Add String literal overloads to equalIgnoringASCIICase()
1842         https://bugs.webkit.org/show_bug.cgi?id=145008
1843
1844         Reviewed by Benjamin Poulain.
1845
1846         Create an overload for equalIgnoringASCIICase for string literals.
1847
1848         * wtf/text/StringImpl.h:
1849         (WTF::equalIgnoringASCIICase): Use a non-templated helper function.
1850         * wtf/text/StringImpl.cpp:
1851         (WTF::equalIgnoringASCIICase): Implement it.
1852         * wtf/text/StringView.h:
1853         (WTF::equalIgnoringASCIICase): Use a non-templated helper function.
1854         * wtf/text/StringView.cpp:
1855         (WTF::equalIgnoringASCIICase): Implement it.
1856         * wtf/text/WTFString.h:
1857         (WTF::equalIgnoringASCIICase): Delegate to StringImpl's implementation.
1858
1859 2015-05-14  Žan Doberšek  <zdobersek@igalia.com>
1860
1861         [GTK] RunLoop constructor should properly retrieve or establish the thread-default GMainContext
1862         https://bugs.webkit.org/show_bug.cgi?id=144732
1863
1864         Reviewed by Carlos Garcia Campos.
1865
1866         RunLoop constructor in the GTK implementation should use the
1867         existing thread-default context, create a new one if not on
1868         the main thread, or use the global-default one if on the main
1869         thread.
1870
1871         In RunLoop::run(), the GMainContext should then be pushed as
1872         the thread-default before calling g_main_loop_run(), and popped
1873         off when the main loop stops.
1874
1875         * wtf/gtk/RunLoopGtk.cpp:
1876         (WTF::RunLoop::RunLoop):
1877         (WTF::RunLoop::run):
1878
1879 2015-05-13  Oliver Hunt  <oliver@apple.com>
1880        Ensure that all the smart pointer types in WTF clear their pointer before deref
1881        https://bugs.webkit.org/show_bug.cgi?id=143789
1882
1883        Reviewed by Ryosuke Niwa.
1884
1885        In order to prevent use after free bugs caused by destructors
1886        that end up trying to access the smart pointer itself, we should
1887        make sure we always clear the m_ptr field before calling deref.
1888
1889        Essentially the UaF path is:
1890        struct Foo : RefCounted<Foo> {
1891          Wibble* m_wibble;
1892          void doSomething();
1893          ~Foo() { m_wibble->doSomethingLikeCleanup(); }
1894        };
1895
1896        struct Wibble {
1897          void doSomethingLikeCleanup()
1898          {
1899            if (m_foo) {
1900                /* if this branch is not here we get a null deref */
1901                m_foo->doSomething();
1902            }
1903          }
1904          void replaceFoo(Foo* foo) { m_foo = foo; }
1905          RefPtr<Foo> m_foo;
1906        };
1907
1908        Wibble* someWibble = /* a Wibble with m_foo->m_refCount == 1 */;
1909                             /* and m_foo points to someWibble       */;
1910
1911        someWibble->replaceFoo(someOtherFoo);
1912        + someWibble->m_foo->m_ptr->deref();
1913          + someWibble->m_foo->m_ptr->~Foo()
1914            + someWibble->m_foo->m_ptr->m_wibble->doSomethingLikeCleanup()
1915              + someWibble->m_foo->m_ptr->m_wibble /* someWibble */ ->m_foo->m_ptr /*logically dead*/ ->doSomething()
1916
1917        By clearing m_ptr first we either force a null pointer deref or
1918        we force our code down a path that does not use the dead smart
1919        pointer.
1920
1921        * wtf/PassRefPtr.h:
1922        (WTF::PassRefPtr::~PassRefPtr):
1923        * wtf/Ref.h:
1924        (WTF::Ref::~Ref):
1925        (WTF::Ref::operator=):
1926        * wtf/RefPtr.h:
1927        (WTF::RefPtr::~RefPtr):
1928        * wtf/RetainPtr.h:
1929        (WTF::RetainPtr::~RetainPtr):
1930        (WTF::RetainPtr<T>::clear):
1931
1932 2015-05-12  Michael Saboff  <msaboff@apple.com>
1933
1934         If JSC cannot get executable memory, it shouldn't call madvise
1935         https://bugs.webkit.org/show_bug.cgi?id=144931
1936
1937         Reviewed by Mark Lam.
1938
1939         Made calling madvise conditional on really getting mmapped memory.
1940
1941         * wtf/OSAllocatorPosix.cpp:
1942         (WTF::OSAllocator::reserveUncommitted):
1943
1944 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
1945
1946         [Win] Move Windows build target to Windows 7 (or newer)
1947         https://bugs.webkit.org/show_bug.cgi?id=144890
1948         <rdar://problem/20707307>
1949
1950         Reviewed by Anders Carlsson.
1951
1952         Update linked SDK and minimal Windows level to be compatible with
1953         Windows 7 or newer.
1954
1955         * WTF.vcxproj/WTF.vcxproj:
1956         * WTF.vcxproj/WTFGenerated.vcxproj:
1957         * config.h:
1958
1959 2015-05-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1960
1961         [GTK] WorkQueue objects are not released
1962         https://bugs.webkit.org/show_bug.cgi?id=144824
1963
1964         Reviewed by Žan Doberšek.
1965
1966         Do not keep a reference of the WorkQueue for the entire life of
1967         its worker thread, since every task scheduled on the WorkQueue
1968         already takes a reference. Instead, take a reference of the main
1969         loop to make sure that when the worker thread starts, the main
1970         loop hasn't been released to avoid runtime warnings (see
1971         webkit.org/b/140998). Also removed the g_main_context_pop_thread_default()
1972         from the thread body, since the thread-specific context queue will
1973         be freed anyway when the thread exits.
1974         If the WorkQueue is released early, before the thread has started,
1975         schedule a main loop quit in the context, to make sure it will
1976         be the first thing run by the main loop and the thread will exit.
1977
1978         * wtf/WorkQueue.h: Remove unused event loop mutex.
1979         * wtf/gtk/WorkQueueGtk.cpp:
1980         (WTF::WorkQueue::platformInitialize):
1981         (WTF::WorkQueue::platformInvalidate):
1982
1983 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
1984
1985         Remove the PICTURE_SIZES build flag
1986         https://bugs.webkit.org/show_bug.cgi?id=144679
1987
1988         Reviewed by Benjamin Poulain.
1989
1990         Removed the PICTURE_SIZES build time flag.
1991
1992         * wtf/FeatureDefines.h:
1993
1994 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
1995
1996         Remove convenience constructors for TextRun
1997         https://bugs.webkit.org/show_bug.cgi?id=144752
1998
1999         Reviewed by Anders Carlsson.
2000
2001         No reason why StringView shouldn't have a StringImpl* constructor.
2002
2003         Test: StringView8Bit in TestWebKitAPI
2004
2005         * wtf/text/StringView.h: Add the constructor.
2006
2007 2015-05-08  Commit Queue  <commit-queue@webkit.org>
2008
2009         Unreviewed, rolling out r183996.
2010         https://bugs.webkit.org/show_bug.cgi?id=144806
2011
2012         ASan detected use-after free (Requested by ap on #webkit).
2013
2014         Reverted changeset:
2015
2016         "Remove convenience constructors for TextRun"
2017         https://bugs.webkit.org/show_bug.cgi?id=144752
2018         http://trac.webkit.org/changeset/183996
2019
2020 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
2021
2022         Remove convenience constructors for TextRun
2023         https://bugs.webkit.org/show_bug.cgi?id=144752
2024
2025         Reviewed by Anders Carlsson.
2026
2027         No reason why StringView shouldn't have a StringImpl* constructor.
2028
2029         Test: StringView8Bit in TestWebKitAPI
2030
2031         * wtf/text/StringView.h: Add the constructor.
2032
2033 2015-05-08  Andreas Kling  <akling@apple.com>
2034
2035         Optimize serialization of quoted JSON strings.
2036         <https://webkit.org/b/144754>
2037
2038         Reviewed by Darin Adler.
2039
2040         Add a StringBuilder API for appending a quoted JSON string. This is used by
2041         JSON.stringify() to implement efficient appending of strings while escaping
2042         quotes, control characters and \uNNNN-style characters.
2043
2044         The main benefit comes from only doing a single buffer expansion up front,
2045         instead of doing it every time we append something. The fudge factor is pretty
2046         large, since the maximum number of output characters per input character is 6.
2047
2048         The first landing of this patch had two bugs in it:
2049
2050         - Made \uNNNN escapes uppercase hexadecimal instead of lowercase.
2051         - Didn't preallocate enough space for 8-bit input strings.
2052
2053         Both were caught by existing tests on our bots, and both were due to last-minute
2054         changes before landing. :/
2055
2056         * wtf/text/StringBuilder.cpp:
2057         (WTF::appendQuotedJSONStringInternal):
2058         (WTF::StringBuilder::appendQuotedJSONString):
2059         * wtf/text/StringBuilder.h:
2060
2061 2015-05-07  Commit Queue  <commit-queue@webkit.org>
2062
2063         Unreviewed, rolling out r183961.
2064         https://bugs.webkit.org/show_bug.cgi?id=144784
2065
2066         Broke js/dom/JSON-stringify.html (Requested by kling on
2067         #webkit).
2068
2069         Reverted changeset:
2070
2071         "Optimize serialization of quoted JSON strings."
2072         https://bugs.webkit.org/show_bug.cgi?id=144754
2073         http://trac.webkit.org/changeset/183961
2074
2075 2015-05-07  Andreas Kling  <akling@apple.com>
2076
2077         Optimize serialization of quoted JSON strings.
2078         <https://webkit.org/b/144754>
2079
2080         Reviewed by Darin Adler.
2081
2082         Add a StringBuilder API for appending a quoted JSON string. This is used by
2083         JSON.stringify() to implement efficient appending of strings while escaping
2084         quotes, control characters and \uNNNN-style characters.
2085
2086         The main benefit comes from only doing a single buffer expansion up front,
2087         instead of doing it every time we append something. The fudge factor is pretty
2088         large for 16-bit strings, since the maximum number of output characters per
2089         input character is 6.
2090
2091         * wtf/text/StringBuilder.cpp:
2092         (WTF::appendQuotedJSONStringInternal):
2093         (WTF::StringBuilder::appendQuotedJSONString):
2094         * wtf/text/StringBuilder.h:
2095
2096 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
2097
2098         [GTK] All spell checking layout tests fail
2099         https://bugs.webkit.org/show_bug.cgi?id=144648
2100
2101         Reviewed by Carlos Garcia Campos.
2102
2103         * wtf/Platform.h: Activate UNIFIED_TEXT_CHECKING for GTK+.
2104
2105 2015-05-07  Dan Bernstein  <mitz@apple.com>
2106
2107         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
2108         https://bugs.webkit.org/show_bug.cgi?id=144727
2109
2110         Reviewed by Darin Adler.
2111
2112         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
2113         INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
2114
2115 2015-05-07  Žan Doberšek  <zdobersek@igalia.com>
2116
2117         [GTK] Clean up RunLoop implementation
2118         https://bugs.webkit.org/show_bug.cgi?id=144729
2119
2120         Reviewed by Carlos Garcia Campos.
2121
2122         Clean up the RunLoop implementation for the GTK port,
2123         removing unnecessary methods and using simpler variable names.
2124
2125         Nested GMainLoops in RunLoop::run() are now created for the
2126         RunLoop's GMainContext, and not for the default context (enforced
2127         through the null argument to g_main_loop_new()).
2128
2129         * wtf/RunLoop.h:
2130         * wtf/gtk/RunLoopGtk.cpp:
2131         (WTF::RunLoop::RunLoop):
2132         (WTF::RunLoop::~RunLoop):
2133         (WTF::RunLoop::run):
2134         (WTF::RunLoop::stop):
2135         (WTF::RunLoop::wakeUp):
2136         (WTF::RunLoop::TimerBase::start):
2137         (WTF::RunLoop::innermostLoop): Deleted.
2138         (WTF::RunLoop::pushNestedMainLoop): Deleted.
2139         (WTF::RunLoop::popNestedMainLoop): Deleted.
2140
2141 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2142
2143         [GTK] Async operations running in the WorkQueue thread should schedule their sources to the WorkQueue main lopp
2144         https://bugs.webkit.org/show_bug.cgi?id=144541
2145
2146         Reviewed by Žan Doberšek.
2147
2148         They are currently sent to the main thread run loop, because we
2149         are not setting the WorkQueue main context as the default one in
2150         the worker thread.
2151
2152         * wtf/gtk/WorkQueueGtk.cpp:
2153         (WTF::WorkQueue::platformInitialize): Call
2154         g_main_context_push_thread_default() to set the WorkQueue main
2155         context as the default of the thread before running the main loop,
2156         and g_main_context_pop_thread_default() when the main loop quits.
2157
2158 2015-05-04  Commit Queue  <commit-queue@webkit.org>
2159
2160         Unreviewed, rolling out r183661.
2161         https://bugs.webkit.org/show_bug.cgi?id=144594
2162
2163         Caused ~3.5MB regression on membuster(!) (Requested by kling_
2164         on #webkit).
2165
2166         Reverted changeset:
2167
2168         "Decrease minimum Vector size."
2169         https://bugs.webkit.org/show_bug.cgi?id=144453
2170         http://trac.webkit.org/changeset/183661
2171
2172 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
2173
2174         [WTF] Remove Functional.h inclusions
2175         https://bugs.webkit.org/show_bug.cgi?id=144400
2176
2177         Reviewed by Darin Adler.
2178
2179         Remove most of the Functional.h header inclusions. The header is preserved
2180         since it's still used by older versions of Safari, and for the callOnMainThread()
2181         stub in DeprecatedSymbolsUsedBySafari.mm.
2182
2183         * wtf/MainThread.cpp:
2184         * wtf/RunLoop.h:
2185         * wtf/WorkQueue.cpp:
2186         * wtf/WorkQueue.h:
2187         * wtf/efl/DispatchQueueEfl.h:
2188         * wtf/efl/DispatchQueueWorkItemEfl.h:
2189
2190 2015-05-02  Commit Queue  <commit-queue@webkit.org>
2191
2192         Unreviewed, rolling out r183722.
2193         https://bugs.webkit.org/show_bug.cgi?id=144534
2194
2195         Made all the tests assert (Requested by ap on #webkit).
2196
2197         Reverted changeset:
2198
2199         "Generated static StringImpls should have static flag set."
2200         https://bugs.webkit.org/show_bug.cgi?id=144516
2201         http://trac.webkit.org/changeset/183722
2202
2203 2015-05-02  Andreas Kling  <akling@apple.com>
2204
2205         Generated static StringImpls should have static flag set.
2206         <https://webkit.org/b/144516>
2207
2208         Reviewed by Darin Adler.
2209
2210         Discovered this while tracking down a string ref leak. Turns out that the strings
2211         generated by StaticString.pm were not getting the static flag set on them.
2212
2213         The only practical difference from this AFAICT is that now the garbage collector
2214         will correctly see that these strings have no extra memory cost to worry about.
2215
2216         * wtf/text/StringImpl.h:
2217
2218 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
2219
2220         USE(...) macro should expect unprefixed variables
2221         https://bugs.webkit.org/show_bug.cgi?id=144454
2222
2223         Reviewed by Daniel Bates.
2224
2225         * wtf/Assertions.cpp: Replace all occurrences WTF_USE with USE.
2226         * wtf/Platform.h: Replace all occurrences WTF_USE with USE. Modify the USE
2227         macro to look for unprefixed variables.
2228         * wtf/WTFThreadData.h: Replace all occurrences WTF_USE with USE.
2229
2230 2015-05-01  Joseph Pecoraro  <pecoraro@apple.com>
2231
2232         Enable ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX by default on all ports (Windows was missed)
2233         https://bugs.webkit.org/show_bug.cgi?id=144495
2234
2235         Reviewed by Csaba Osztrogonác.
2236
2237         * wtf/FeatureDefines.h:
2238         This covers all ports that haven't defined the flag otherwise.
2239
2240 2015-04-30  Alex Christensen  <achristensen@webkit.org>
2241
2242         Decrease minimum Vector size.
2243         https://bugs.webkit.org/show_bug.cgi?id=144453
2244
2245         Reviewed by Andreas Kling.
2246
2247         * wtf/Vector.h:
2248         Make the default min size 4 to save memory on small Vectors.
2249
2250 2015-04-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2251
2252         Use the default hash value for Symbolized StringImpl
2253         https://bugs.webkit.org/show_bug.cgi?id=144347
2254
2255         Reviewed by Darin Adler.
2256
2257         Use a default hash value calculation for symbolized StringImpl.
2258
2259         * wtf/text/StringImpl.cpp:
2260         (WTF::StringImpl::createSymbol):
2261         * wtf/text/StringImpl.h:
2262         (WTF::StringImpl::StringImpl):
2263         (WTF::StringImpl::symbolAwareHash):
2264         (WTF::StringImpl::existingSymbolAwareHash):
2265         (WTF::StringImpl::hashForSymbol):
2266         * wtf/text/StringStatics.cpp:
2267         (WTF::StringImpl::nextHashForSymbol):
2268         (WTF::StringImpl::hashAndFlagsForSymbol): Deleted.
2269
2270 2015-04-29  Alexey Proskuryakov  <ap@apple.com>
2271
2272         LazyNeverDestroyed is not thread safe in debug builds, causing assertions
2273         https://bugs.webkit.org/show_bug.cgi?id=144378
2274
2275         Reviewed by Darin Adler.
2276
2277         * wtf/NeverDestroyed.h:
2278
2279 2015-04-28  Geoffrey Garen  <ggaren@apple.com>
2280
2281         It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
2282         https://bugs.webkit.org/show_bug.cgi?id=144013
2283
2284         Reviewed by Mark Lam.
2285
2286         Remove this custom tree implementation because it is unused. (It was
2287         previously used to achieve a stable array sort in certain cases.)
2288
2289         * WTF.vcxproj/WTF.vcxproj:
2290         * WTF.vcxproj/WTF.vcxproj.filters:
2291         * WTF.xcodeproj/project.pbxproj:
2292         * wtf/AVLTree.h: Removed.
2293         * wtf/CMakeLists.txt:
2294
2295 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
2296
2297         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
2298         https://bugs.webkit.org/show_bug.cgi?id=132159
2299
2300         Reviewed by Darin Adler.
2301
2302         * wtf/Platform.h:
2303
2304         Opt-in using ENABLE(PLATFORM_FONT_LOOKUP)
2305
2306 2015-04-29  Yusuke Suzuki  <utatane.tea@gmail.com>
2307
2308         REGRESSION (r183373): ASSERT failed in wtf/SHA1.h
2309         https://bugs.webkit.org/show_bug.cgi?id=144257
2310
2311         Reviewed by Darin Adler.
2312
2313         * wtf/SHA1.h:
2314         (WTF::SHA1::addBytes):
2315
2316 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2317
2318         [CMake] [GTK] Organize and clean up unused CMake variables
2319         https://bugs.webkit.org/show_bug.cgi?id=144364
2320
2321         Reviewed by Gyuyoung Kim.
2322
2323         * wtf/PlatformGTK.cmake: Add variables specific to this project.
2324
2325 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
2326
2327         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
2328         https://bugs.webkit.org/show_bug.cgi?id=144304
2329
2330         Reviewed by Geoffrey Garen.
2331
2332         No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
2333
2334         * wtf/Platform.h:
2335
2336 2015-04-28  Commit Queue  <commit-queue@webkit.org>
2337
2338         Unreviewed, rolling out r183514.
2339         https://bugs.webkit.org/show_bug.cgi?id=144359
2340
2341         It broke cloop test bots (Requested by mcatanzaro on #webkit).
2342
2343         Reverted changeset:
2344
2345         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
2346         https://bugs.webkit.org/show_bug.cgi?id=144304
2347         http://trac.webkit.org/changeset/183514
2348
2349 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
2350
2351         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
2352         https://bugs.webkit.org/show_bug.cgi?id=144304
2353
2354         Reviewed by Geoffrey Garen.
2355
2356         No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
2357
2358         * wtf/Platform.h:
2359
2360 2015-04-28  Alex Christensen  <achristensen@webkit.org>
2361
2362         Properly reset deleted count when clearing HashTables.
2363         https://bugs.webkit.org/show_bug.cgi?id=144343
2364
2365         Reviewed by Andreas Kling.
2366
2367         * wtf/HashTable.h:
2368         (WTF::KeyTraits>::clear):
2369         Reset m_deletedCount, which appears to have been forgotten.
2370
2371 2015-04-28  Alex Christensen  <achristensen@webkit.org>
2372
2373         [Content Extensions] Use less memory for CombinedURLFilters.
2374         https://bugs.webkit.org/show_bug.cgi?id=144290
2375
2376         Reviewed by Andreas Kling.
2377
2378         * wtf/Forward.h:
2379         * wtf/Vector.h:
2380         Added a minCapacity template parameter to allow changing the minimum size of an 
2381         allocated buffer. The default minCapacity is kept at 16 unless otherwise specified 
2382         to have no change on existing code, but this could be changed later. A smaller 
2383         default minCapacity would use less memory with small Vectors but spend more time 
2384         copying when expanding to large Vectors.
2385
2386 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
2387
2388         [Win] Deactivate WebGL until Windows tests work properly
2389         https://bugs.webkit.org/show_bug.cgi?id=144291
2390         <rdar://problem/20707307>
2391
2392         Reviewed by Zalan Bujtas.
2393
2394         * wtf/FeatureDefines.h: Force WebGL off for Windows builds.
2395
2396 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2397
2398         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
2399         https://bugs.webkit.org/show_bug.cgi?id=144193
2400
2401         Reviewed by Darin Adler.
2402
2403         * wtf/FeatureDefines.h:
2404         * wtf/Platform.h:
2405
2406 2015-04-22  Martin Robinson  <mrobinson@igalia.com>
2407
2408         [CMake] Autogenerate cmakeconfig.h.cmake
2409         https://bugs.webkit.org/show_bug.cgi?id=143997
2410
2411         Reviewed by Csaba Osztrogonác.
2412
2413         * wtf/Platform.h: Move a GTK-specific setting from cmakeconfig.h to here.
2414
2415 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
2416
2417         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2418         https://bugs.webkit.org/show_bug.cgi?id=144182
2419
2420         Reviewed by Simon Fraser.
2421
2422         * wtf/FeatureDefines.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2423
2424 2015-04-24  Commit Queue  <commit-queue@webkit.org>
2425
2426         Unreviewed, rolling out r183288.
2427         https://bugs.webkit.org/show_bug.cgi?id=144189
2428
2429         Made js/sort-with-side-effecting-comparisons.html time out in
2430         debug builds (Requested by ap on #webkit).
2431
2432         Reverted changeset:
2433
2434         "It shouldn't take 1846 lines of code and 5 FIXMEs to sort an
2435         array."
2436         https://bugs.webkit.org/show_bug.cgi?id=144013
2437         http://trac.webkit.org/changeset/183288
2438
2439 2015-04-21  Geoffrey Garen  <ggaren@apple.com>
2440
2441         It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
2442         https://bugs.webkit.org/show_bug.cgi?id=144013
2443
2444         Reviewed by Mark Lam.
2445
2446         Remove this custom tree implementation because it is unused. (It was
2447         previously used to achieve a stable array sort in certain cases.)
2448
2449         * WTF.vcxproj/WTF.vcxproj:
2450         * WTF.vcxproj/WTF.vcxproj.filters:
2451         * WTF.xcodeproj/project.pbxproj:
2452         * wtf/AVLTree.h: Removed.
2453         * wtf/CMakeLists.txt:
2454
2455 2015-04-24  Darin Adler  <darin@apple.com>
2456
2457         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
2458         https://bugs.webkit.org/show_bug.cgi?id=128007
2459
2460         Reviewed by Anders Carlsson.
2461
2462         * WTF.vcxproj/WTF.vcxproj: Removed OwnPtr source files.
2463         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2464         * WTF.xcodeproj/project.pbxproj: Ditto.
2465         * wtf/CMakeLists.txt: Ditto.
2466
2467         * wtf/Forward.h: Removed OwnPtr and PassOwnPtr.
2468         * wtf/HashTraits.h: Ditto.
2469
2470         * wtf/OwnPtr.h: Removed.
2471         * wtf/OwnPtrCommon.h: Removed.
2472         * wtf/PassOwnPtr.h: Removed.
2473
2474         * wtf/SizeLimits.cpp: Removed OwnPtr.
2475         * wtf/VectorTraits.h: Removed OwnPtr specialization.
2476
2477 2015-04-23  Jer Noble  <jer.noble@apple.com>
2478
2479         Disable HAVE_AVKIT on AppleTV
2480         https://bugs.webkit.org/show_bug.cgi?id=144142
2481
2482         Reviewed by Dan Bernstein.
2483
2484         * wtf/Platform.h:
2485
2486 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2487
2488         [iOS] WebKit services should inherit environment variables for home
2489         https://bugs.webkit.org/show_bug.cgi?id=144078
2490         rdar://problem/20571678
2491
2492         Reviewed by Dan Bernstein.
2493
2494         * wtf/spi/darwin/XPCSPI.h: Added xpc_copy_bootstrap and xpc_dictionary_apply.
2495
2496 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2497
2498         Undo the WTF part of the previous build fix, we don't use private headers in WTF.
2499
2500         * WTF.xcodeproj/project.pbxproj:
2501
2502 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2503
2504         Build fix.
2505
2506         * WTF.xcodeproj/project.pbxproj: Make RAMSize.h a private header, now that it's used
2507         from outside WTF.
2508
2509 2015-04-23  Andreas Kling  <akling@apple.com>
2510
2511         There should only be one way to get the system memory size.
2512         <https://webkit.org/b/144081>
2513
2514         Reviewed by Antti Koivisto.
2515
2516         Merge all the logic from other RAM size fetcher helpers into WTF's.
2517
2518         Darwin ports now use host_info() instead of sysctl(), since that was the more common way
2519         of doing this.
2520
2521         Also bumped the fallback answer from 128 MB to 512 MB to bring it closer to today's hardware.
2522
2523         Finally, the number is rounded up to the next multiple of 128 MB, to avoid misunderstandings
2524         on some systems where the number returned by the kernel is slightly lower than the marketing
2525         number. Removed the "fudging" that was used in some places, since this fixes that cleanly.
2526
2527         * wtf/RAMSize.cpp:
2528         (WTF::computeRAMSize):
2529
2530 2015-04-22  Darin Adler  <darin@apple.com>
2531
2532         Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
2533         https://bugs.webkit.org/show_bug.cgi?id=143949
2534
2535         Reviewed by Andreas Kling.
2536
2537         * wtf/MathExtras.h:
2538         (wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
2539         fixed in Snow Leopard <rdar://problem/6286405>, so we don't need the workaround any more.
2540
2541 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2542
2543         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
2544         https://bugs.webkit.org/show_bug.cgi?id=144052
2545         rdar://problem/19754404
2546
2547         Build fix. Landing a forward declaration that should have been part of the original patch.
2548
2549         * wtf/spi/darwin/XPCSPI.h:
2550
2551 2015-04-21  Chris Dumez  <cdumez@apple.com>
2552
2553         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
2554         https://bugs.webkit.org/show_bug.cgi?id=143970
2555
2556         Reviewed by Darin Adler.
2557
2558         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
2559         constructor explicit as it copies the vector and it is easy to call it
2560         by mistake.
2561
2562         * wtf/RefCountedArray.h:
2563         (WTF::RefCountedArray::RefCountedArray):
2564         * wtf/Vector.h:
2565
2566 2015-04-21  Darin Adler  <darin@apple.com>
2567
2568         Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
2569         https://bugs.webkit.org/show_bug.cgi?id=143944
2570
2571         Reviewed by Andreas Kling.
2572
2573         * wtf/FilePrintStream.h: Removed unneeded include.
2574         * wtf/HashTable.h: Fixed class template name in comment.
2575         * wtf/HashTraits.h: Removed unneeded forward declaration.
2576         * wtf/ListHashSet.h: Removed unneeded includes.
2577         * wtf/ThreadingWin.cpp: Removed unneeded includes.
2578         (WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
2579         (WTF::createThreadInternal): Changed code to use make_unique and release.
2580         * wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.
2581
2582 2015-04-19  Darin Adler  <darin@apple.com>
2583
2584         Update RefPtr documentation and deprecation
2585         https://bugs.webkit.org/show_bug.cgi?id=143936
2586
2587         Reviewed by Andreas Kling.
2588
2589         * WTF.vcxproj/WTF.vcxproj: Removed PassRef.h
2590         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2591         * WTF.xcodeproj/project.pbxproj: Ditto.
2592         * wtf/CMakeLists.txt: Ditto.
2593
2594 2015-04-17  Alexey Proskuryakov  <ap@apple.com>
2595
2596         Use ASan poisoning to taint moved-out-of Refs
2597         https://bugs.webkit.org/show_bug.cgi?id=143894
2598         rdar://problem/19443723
2599
2600         Reviewed by Darin Adler.
2601
2602         * wtf/Ref.h: (WTF::Ref::~Ref):
2603
2604 2015-04-17  Alexey Proskuryakov  <ap@apple.com>
2605
2606         Remove unused BoundsCheckedPointer
2607         https://bugs.webkit.org/show_bug.cgi?id=143896
2608
2609         Reviewed by Geoffrey Garen.
2610
2611         * WTF.vcxproj/WTF.vcxproj:
2612         * WTF.vcxproj/WTF.vcxproj.filters:
2613         * WTF.xcodeproj/project.pbxproj:
2614         * wtf/BoundsCheckedPointer.h: Removed.
2615         * wtf/CMakeLists.txt:
2616
2617 2015-04-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2618
2619         [ES6] Implement Symbol.for and Symbol.keyFor
2620         https://bugs.webkit.org/show_bug.cgi?id=143404
2621
2622         Reviewed by Geoffrey Garen.
2623
2624         When we register symbolized StringImpl* into SymbolRegistry, symbolized StringImpl* is aware of that.
2625         And when destructing it, it removes its reference from SymbolRegistry as if atomic StringImpl do so with AtomicStringTable.
2626         While AtomicStringTable (in WebCore case) exists in thread local storage,
2627         SymbolRegistry exists per VM and StringImpl* has a reference to the registered SymbolRegistry.
2628
2629         Since StringImpl has isSymbol etc. members, it's class is aware of Symbol use cases.
2630         So introduce SymbolRegistry in WTF layers as if AtomicStringTable.
2631
2632         * WTF.vcxproj/WTF.vcxproj:
2633         * WTF.vcxproj/WTF.vcxproj.filters:
2634         * WTF.xcodeproj/project.pbxproj:
2635         * wtf/CMakeLists.txt:
2636         * wtf/text/AtomicString.cpp:
2637         (WTF::AtomicString::addSlowCase):
2638         (WTF::AtomicString::findSlowCase):
2639         (WTF::AtomicString::findInternal):
2640         (WTF::AtomicString::find): Deleted.
2641         * wtf/text/AtomicString.h:
2642         (WTF::AtomicString::find):
2643         * wtf/text/StringImpl.cpp:
2644         (WTF::StringImpl::~StringImpl):
2645         (WTF::StringImpl::createSymbol):
2646         (WTF::StringImpl::createSymbolEmpty):
2647         * wtf/text/StringImpl.h:
2648         (WTF::StringImpl::StringImpl):
2649         (WTF::StringImpl::extractFoldedStringInSymbol):
2650         (WTF::StringImpl::symbolRegistry):
2651         (WTF::StringImpl::createSymbolEmpty): Deleted.
2652         * wtf/text/SymbolRegistry.cpp: Copied from Source/JavaScriptCore/runtime/SymbolConstructor.h.
2653         (WTF::SymbolRegistry::~SymbolRegistry):
2654         (WTF::SymbolRegistry::symbolForKey):
2655         (WTF::SymbolRegistry::keyForSymbol):
2656         (WTF::SymbolRegistry::remove):
2657         * wtf/text/SymbolRegistry.h: Added.
2658         (WTF::SymbolRegistryKey::hash):
2659         (WTF::SymbolRegistryKey::impl):
2660         (WTF::SymbolRegistryKey::isHashTableDeletedValue):
2661         (WTF::SymbolRegistryKey::hashTableDeletedValue):
2662         (WTF::DefaultHash<SymbolRegistryKey>::Hash::hash):
2663         (WTF::DefaultHash<SymbolRegistryKey>::Hash::equal):
2664         (WTF::HashTraits<SymbolRegistryKey>::isEmptyValue):
2665         (WTF::SymbolRegistryKey::SymbolRegistryKey):
2666
2667 2015-04-16  Antti Koivisto  <antti@apple.com>
2668
2669         Use CommonCrypto for SHA1 and MD5
2670         https://bugs.webkit.org/show_bug.cgi?id=143826
2671
2672         Reviewed by Anders Carlsson.
2673
2674         CommonCrypto SHA1 implementation is ~4x faster than the naive WTF one. Use it when available.
2675
2676         These are covered by existing API tests.
2677
2678         * wtf/MD5.cpp:
2679         (WTF::MD5::MD5):
2680         (WTF::MD5::addBytes):
2681         (WTF::MD5::checksum):
2682         * wtf/MD5.h:
2683         * wtf/SHA1.cpp:
2684         (WTF::SHA1::SHA1):
2685         (WTF::SHA1::addBytes):
2686         (WTF::SHA1::computeHash):
2687
2688             Remove the side effect where computeHash resets the state. No one relies on it.
2689
2690         (WTF::SHA1::hexDigest):
2691         (WTF::SHA1::computeHexDigest):
2692         * wtf/SHA1.h:
2693
2694 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
2695
2696         Remove the unnecessary WTF_CHANGES define
2697         https://bugs.webkit.org/show_bug.cgi?id=143825
2698
2699         Reviewed by Andreas Kling.
2700
2701         * config.h:
2702
2703 2015-04-15  Руслан Ижбулатов  <lrn1986@gmail.com>
2704
2705         Harmonize binary semaphore ifdefs
2706
2707         They should be either OS(WINDOWS) (in which case we'd need
2708         BinarySemaphoreWin.cpp, which is not shipped by WebKitGTK)
2709         or PLATFORM(WIN) (in which case Mutex/ThreadCondition-based
2710         implementation is used).
2711
2712         This fixes errors like:
2713           CXX      Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo
2714         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In constructor 'WTF::BinarySemaphore::BinarySemaphore()':
2715         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:34:7: error: class 'WTF::BinarySemaphore' does not have any field named 'm_isSet'
2716              : m_isSet(false)
2717                ^
2718         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'void WTF::BinarySemaphore::signal()':
2719         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:44:24: error: 'm_mutex' was not declared in this scope
2720              MutexLocker locker(m_mutex);
2721                                 ^
2722         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:46:5: error: 'm_isSet' was not declared in this scope
2723              m_isSet = true;
2724              ^
2725         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:47:5: error: 'm_condition' was not declared in this scope
2726              m_condition.signal();
2727              ^
2728         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'bool WTF::BinarySemaphore::wait(double)':
2729         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:52:24: error: 'm_mutex' was not declared in this scope
2730              MutexLocker locker(m_mutex);
2731                                 ^
2732         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:55:13: error: 'm_isSet' was not declared in this scope
2733              while (!m_isSet) {
2734                      ^
2735         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:56:21: error: 'm_condition' was not declared in this scope
2736                  timedOut = !m_condition.timedWait(m_mutex, absoluteTime);
2737                              ^
2738         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:62:5: error: 'm_isSet' was not declared in this scope
2739              m_isSet = false;
2740              ^
2741         GNUmakefile:52762: recipe for target 'Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo' failed
2742
2743         [W32] Inconsistent ifdefs in BinarySemaphore.h and BinarySemaphore.cpp
2744         https://bugs.webkit.org/show_bug.cgi?id=143756
2745
2746         Reviewed by Darin Adler.
2747
2748         * wtf/threads/BinarySemaphore.h:
2749
2750 2015-04-12  Michael Catanzaro  <mcatanzaro@igalia.com>
2751
2752         Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
2753         https://bugs.webkit.org/show_bug.cgi?id=143457
2754
2755         Reviewed by Benjamin Poulain.
2756
2757         Tested by WTF.SaturatedArithmeticAddition and WTF.SaturatedArithmeticSubtraction.
2758
2759         * wtf/SaturatedArithmetic.h:
2760         (signedAddOverflows): Use && instead of & to avoid triggering -Wparentheses in newer
2761         versions of GCC and Clang, and to improve the clarity of the function.
2762         (signedSubtractOverflows): Changed correspondingly, although there was no warning here.
2763
2764 2015-04-08  Sam Weinig  <sam@webkit.org>
2765
2766         Allow LaunchServices to handle URLs on link navigations
2767         <rdar://problem/19446826>
2768         https://bugs.webkit.org/show_bug.cgi?id=143544
2769
2770         Reviewed by Anders Carlsson.
2771
2772         * wtf/Platform.h:
2773         Add HAVE macro for this functionality.
2774
2775 2015-04-09  Andy Estes  <aestes@apple.com>
2776
2777         [Cocoa] Add a HAVE(AVKIT) and use it
2778         https://bugs.webkit.org/show_bug.cgi?id=143593
2779
2780         Reviewed by David Kilzer.
2781
2782         * wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.
2783
2784 2015-04-09  Andy Estes  <aestes@apple.com>
2785
2786         [Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
2787         https://bugs.webkit.org/show_bug.cgi?id=143559
2788
2789         Reviewed by David Kilzer.
2790
2791         Added PLATFORM(WATCHOS). Used PLATFORM() since Watch OS is just a variant of OS(IOS).
2792         Defined HAVE(PARENTAL_CONTROLS) to be true on all Cocoa platforms except Watch OS.
2793
2794         * wtf/Platform.h:
2795
2796 2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
2797
2798         Add CMake build system for WinCairo port.
2799         https://bugs.webkit.org/show_bug.cgi?id=115944
2800
2801         Reviewed by Chris Dumez.
2802
2803         * wtf/FeatureDefines.h:
2804         * wtf/PlatformWin.cmake:
2805
2806 2015-04-05  Antti Koivisto  <antti@apple.com>
2807
2808         Bloom filter should support longer hashes
2809         https://bugs.webkit.org/show_bug.cgi?id=143419
2810
2811         Reviewed by Dan Bernstein.
2812
2813         It currently supports 'unsigned' hash only which is inconvenient and doesn't have enough independent bits for larger filters.
2814
2815         Support arbitrarily sized hashes of type std::array<uint8_t, hashSize> (like SHA1::Digest and MD5::Digest).
2816
2817         * wtf/BloomFilter.h:
2818         (WTF::BloomFilter<keyBits>::keysFromHash):
2819         (WTF::BloomFilter<keyBits>::mayContain):
2820         (WTF::BloomFilter<keyBits>::add):
2821
2822 2015-04-03  Antti Koivisto  <antti@apple.com>
2823
2824         Add non-counting Bloom filter implementation
2825         https://bugs.webkit.org/show_bug.cgi?id=143366
2826
2827         Reviewed by Sam Weinig.
2828
2829         Add a traditional single-bit-per-bucket Bloom filter in addition to the existing counting implementation.
2830
2831         - rename BloomFilter -> CountingBloomFilter.
2832         - add a new basic BloomFilter type.
2833         - update some terminology to match http://en.wikipedia.org/wiki/Bloom_filter and modernize the code a bit.
2834         - add API tests.
2835
2836         * wtf/BloomFilter.h:
2837         (WTF::BloomFilter::BloomFilter):
2838         (WTF::BloomFilter::add):
2839
2840             Also support merging.
2841
2842         (WTF::BloomFilter::mayContain):
2843         (WTF::BloomFilter::arrayIndex):
2844         (WTF::BloomFilter::bitMask):
2845         (WTF::BloomFilter<keyBits>::mayContain):
2846         (WTF::BloomFilter<keyBits>::add):
2847         (WTF::BloomFilter<keyBits>::isBitSet):
2848         (WTF::BloomFilter<keyBits>::setBit):
2849         (WTF::BloomFilter<keyBits>::clear):
2850         (WTF::CountingBloomFilter::CountingBloomFilter):
2851         (WTF::CountingBloomFilter::mayContain):
2852         (WTF::CountingBloomFilter::firstBucket):
2853         (WTF::CountingBloomFilter::secondBucket):
2854         (WTF::CountingBloomFilter<keyBits>::add):
2855         (WTF::CountingBloomFilter<keyBits>::remove):
2856         (WTF::CountingBloomFilter<keyBits>::clear):
2857         (WTF::CountingBloomFilter<keyBits>::likelyEmpty):
2858         (WTF::CountingBloomFilter<keyBits>::isClear):
2859         (WTF::BloomFilter::maximumCount): Deleted.
2860         (WTF::BloomFilter::firstSlot): Deleted.
2861         (WTF::BloomFilter::secondSlot): Deleted.
2862         (WTF::BloomFilter<keyBits>::remove): Deleted.
2863         (WTF::BloomFilter<keyBits>::likelyEmpty): Deleted.
2864         (WTF::BloomFilter<keyBits>::isClear): Deleted.
2865
2866 015-04-01  Antti Koivisto  <antti@apple.com>
2867
2868         Value assignment operator of Optional should be stricter
2869         https://bugs.webkit.org/show_bug.cgi?id=143303
2870
2871         Reviewed by Andreas Kling.
2872
2873         struct Foo { mutable Optional<std::chrono::seconds> s; };
2874         Foo foo, foo2;
2875         foo = foo2;
2876
2877         doesn't build because it tries to use wrong operator=.
2878
2879         * wtf/Optional.h:
2880
2881             Add enable_if test similar to std::experimental::optional.
2882
2883 2015-04-01  Alex Christensen  <achristensen@webkit.org>
2884
2885         Progress towards CMake on Windows and Mac.
2886         https://bugs.webkit.org/show_bug.cgi?id=143293
2887
2888         Reviewed by Filip Pizlo.
2889
2890         * wtf/CMakeLists.txt:
2891         Don't use bmalloc on Windows yet.
2892         * wtf/FeatureDefines.h:
2893         Temporarily disabled WebGL on Windows CMake builds.
2894         * wtf/PlatformMac.cmake:
2895         Tell open source builders where to find unicode headers.
2896
2897 2015-03-31  Alexey Proskuryakov  <ap@apple.com>
2898
2899         Fix the build after <http://trac.webkit.org/changeset/182205>.
2900
2901         * wtf/text/StringImpl.h: (WTF::StringImpl::extractFoldedStringInSymbol):
2902         A function cannot be both exported and inline.
2903
2904 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
2905
2906         Clean up Identifier factories to clarify the meaning of StringImpl*
2907         https://bugs.webkit.org/show_bug.cgi?id=143146
2908
2909         Reviewed by Filip Pizlo.
2910
2911         Introduce StringKind into `StringImpl`. There's 3 kinds
2912         1. StringNormal (non-atomic, non-symbol)
2913         2. StringAtomic (atomic, non-symbol)
2914         3. StringSymbol (non-atomic, symbol)
2915         They are mutually exclusive.
2916
2917         * wtf/text/AtomicString.cpp:
2918         (WTF::AtomicString::addSlowCase):
2919         (WTF::AtomicString::findSlowCase):
2920         When registering a string into AtomicStringTable,
2921         it should not be a symbol string
2922         because symbol and atomic types are mutually exclusive.
2923         When a symbol string comes, we extract an owner string
2924         from a symbol string by using `StringImpl::extractFoldedStringInSymbol()`.
2925         It always succeeds because a symbol (non empty) string
2926         is always BufferSubstring and has an owner string.
2927         Empty symbol string doesn't have an owner string.
2928         This case is filtered by `!string.length()` guard.
2929         * wtf/text/AtomicString.h:
2930         (WTF::AtomicString::add):
2931         (WTF::AtomicString::addWithStringTableProvider):
2932         * wtf/text/StringImpl.cpp:
2933         (WTF::StringImpl::~StringImpl):
2934         (WTF::StringImpl::createSymbol):
2935         (WTF::StringImpl::createUnique): Deleted.
2936         * wtf/text/StringImpl.h:
2937         (WTF::StringImpl::StringImpl):
2938         (WTF::StringImpl::createSymbolEmpty):
2939         (WTF::StringImpl::flagIsAtomic):
2940         (WTF::StringImpl::flagIsSymbol):
2941         (WTF::StringImpl::maskStringKind):
2942         (WTF::StringImpl::stringKind):
2943         (WTF::StringImpl::isSymbol):
2944         (WTF::StringImpl::isAtomic):
2945         (WTF::StringImpl::setIsAtomic):
2946         (WTF::StringImpl::extractFoldedStringInSymbol):
2947         (WTF::StringImpl::createUniqueEmpty): Deleted.
2948         (WTF::StringImpl::flagIsUnique): Deleted.
2949         (WTF::StringImpl::isUnique): Deleted.
2950         * wtf/text/StringStatics.cpp:
2951         (WTF::StringImpl::hashAndFlagsForSymbol):
2952         (WTF::StringImpl::hashAndFlagsForUnique): Deleted.
2953
2954 2015-03-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2955
2956         [CMake][EFL] Remove redundant library link and include path
2957         https://bugs.webkit.org/show_bug.cgi?id=143221
2958
2959         Reviewed by Csaba Osztrogonác.
2960
2961         * wtf/PlatformEfl.cmake: Remove unnecessary library link and include path.
2962
2963 2015-03-27  Myles C. Maxfield  <mmaxfield@apple.com>
2964
2965         Support building WTF on Windows without Cygwin
2966         https://bugs.webkit.org/show_bug.cgi?id=143084
2967
2968         Reviewed by Brent Fulgham.
2969
2970         Windows doesn't have "touch".
2971
2972         * WTF.vcxproj/WTFGenerated.make:
2973
2974 2015-03-26  Alex Christensen  <achristensen@webkit.org>
2975
2976         Progress towards CMake on Mac.
2977         https://bugs.webkit.org/show_bug.cgi?id=143112
2978
2979         Reviewed by Chris Dumez.
2980
2981         * wtf/PlatformMac.cmake:
2982
2983 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
2984
2985         Unreviewed, we have edited this file in 2015.
2986
2987         * wtf/Platform.h:
2988
2989 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
2990
2991         Heap variables shouldn't end up in the stack frame
2992         https://bugs.webkit.org/show_bug.cgi?id=141174
2993
2994         Reviewed by Geoffrey Garen.
2995
2996         * wtf/FastBitVector.h:
2997         (WTF::FastBitVector::resize): Small change: don't resize if you don't have to resize.
2998
2999 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
3000
3001         Change Atomic methods from using the_wrong_naming_conventions to using theRightNamingConventions. Also make seq_cst the default.
3002
3003         Rubber stamped by Geoffrey Garen.
3004
3005         * wtf/Atomics.h:
3006         (WTF::Atomic::load):
3007         (WTF::Atomic::store):
3008         (WTF::Atomic::compareExchangeWeak):
3009         (WTF::Atomic::compareExchangeStrong):
3010         (WTF::Atomic::compare_exchange_weak): Deleted.
3011         (WTF::Atomic::compare_exchange_strong): Deleted.
3012         * wtf/ByteSpinLock.h:
3013         (WTF::ByteSpinLock::lock):
3014         * wtf/SpinLock.h:
3015         (WTF::SpinLockBase::lock):
3016
3017 2015-03-24  Beth Dakin  <bdakin@apple.com>
3018
3019         Add events related to force click gesture
3020         https://bugs.webkit.org/show_bug.cgi?id=142836
3021         -and corresponding-
3022         rdar://problem/20210239
3023
3024         Reviewed by Dean Jackson.
3025
3026         New enable flag for the events.
3027         * wtf/FeatureDefines.h:
3028
3029 2015-03-23  Filip Pizlo  <fpizlo@apple.com>
3030
3031         JSC should have a low-cost asynchronous disassembler
3032         https://bugs.webkit.org/show_bug.cgi?id=142997
3033
3034         Reviewed by Mark Lam.
3035
3036         * wtf/StringPrintStream.h:
3037
3038 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
3039
3040         CSS Selectors: fix attribute case-insensitive matching of Contain and List
3041         https://bugs.webkit.org/show_bug.cgi?id=142932
3042
3043         Reviewed by Darin Adler.
3044
3045         Add some utility functions to the string classes to find substrings
3046         using ASCII case-insensitive comparisons.
3047
3048         * wtf/text/AtomicString.h:
3049         (WTF::AtomicString::contains):
3050         Add the light version that only lock one register.
3051
3052         (WTF::AtomicString::containsIgnoringASCIICase):
3053         (WTF::AtomicString::findIgnoringASCIICase):
3054
3055         * wtf/text/StringCommon.h:
3056         (WTF::findIgnoringASCIICase):
3057         This is the common implementation used by StringView and StringImpl.
3058
3059         * wtf/text/StringImpl.cpp:
3060         (WTF::StringImpl::findIgnoringASCIICase):
3061         * wtf/text/StringImpl.h:
3062         * wtf/text/StringView.cpp:
3063         (WTF::StringView::containsIgnoringASCIICase):
3064         (WTF::StringView::findIgnoringASCIICase):
3065         * wtf/text/StringView.h:
3066         * wtf/text/WTFString.h:
3067         (WTF::String::findIgnoringASCIICase):
3068         (WTF::String::contains):
3069         (WTF::String::containsIgnoringASCIICase):
3070
3071 2015-03-19  Andreas Kling  <akling@apple.com>
3072
3073         DFGAllocator should use bmalloc's aligned allocator.
3074         <https://webkit.org/b/142871>
3075
3076         Reviewed by Geoffrey Garen.
3077
3078         Remove PageAllocationAligned since it has no more clients.
3079
3080         * WTF.vcxproj/WTF.vcxproj:
3081         * WTF.vcxproj/WTF.vcxproj.filters:
3082         * WTF.xcodeproj/project.pbxproj:
3083         * wtf/CMakeLists.txt:
3084         * wtf/PageAllocationAligned.cpp: Removed.
3085         * wtf/PageAllocationAligned.h: Removed.
3086
3087 2015-03-18  Dhi Aurrahman  <diorahman@rockybars.com>
3088
3089         Fix StringView misplaced implementations after r181525 and r181558
3090         https://bugs.webkit.org/show_bug.cgi?id=142772
3091
3092         Reviewed by Darin Adler.
3093
3094         Fix misplaced implementations in StringView::startsWithIgnoringASCIICase and 
3095         StringView::endsWith. 
3096
3097         Add some tests in [1] to cover the StringView::startsWith, 
3098         StringView::startsWithIgnoringASCIICase, StringView::endsWith and 
3099         StringView::endsWithIgnoringASCIICase implementations.
3100
3101         [1] Tools/TestWebKitAPI/Tests/WTF/StringView.cpp.
3102
3103         * wtf/text/StringView.cpp:
3104         (WTF::StringView::startsWithIgnoringASCIICase):
3105         (WTF::StringView::endsWith):
3106         (WTF::StringView::endsWithIgnoringASCIICase):
3107
3108 2015-03-17  Michael Saboff  <msaboff@apple.com>
3109
3110         Windows X86-64 should use the fixed executable allocator
3111         https://bugs.webkit.org/show_bug.cgi?id=142749
3112
3113         Reviewed by Filip Pizlo.
3114
3115         Set ENABLE_EXECUTABLE_ALLOCATOR_FIXED for Windows.
3116         Needed to export MetaAllocator::currentStatistics() for use in JavaScriptCore.
3117
3118         * wtf/MetaAllocator.h:
3119         * wtf/Platform.h:
3120
3121 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
3122
3123         Enable ES6 classes by default
3124         https://bugs.webkit.org/show_bug.cgi?id=142774
3125
3126         Reviewed by Gavin Barraclough.
3127
3128         * wtf/FeatureDefines.h:
3129
3130 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
3131
3132         [ARM] Enable generating idiv instructions if it is supported
3133         https://bugs.webkit.org/show_bug.cgi?id=142725
3134
3135         Reviewed by Michael Saboff.
3136
3137         * wtf/Platform.h: Set HAVE_ARM_IDIV_INSTRUCTIONS based on GCC macro too.
3138
3139 2015-03-16  Benjamin Poulain  <benjamin@webkit.org>
3140
3141         Fix StringView after r181525
3142         Unreviewed.
3143
3144         Fix 2 silly mistakes I made in r181525.
3145
3146         * wtf/text/StringView.cpp:
3147         (WTF::StringView::startsWith):
3148         (WTF::StringView::startsWithIgnoringASCIICase):
3149         (WTF::StringView::endsWith):
3150         (WTF::StringView::endsWithIgnoringASCIICase):
3151         The implementation was inside the #ifdef.
3152
3153         * wtf/text/StringView.h:
3154         The symbols were not exported.
3155
3156 2015-03-16  Max Stepin  <maxstepin@gmail.com>
3157
3158         Add APNG support
3159         https://bugs.webkit.org/show_bug.cgi?id=17022
3160
3161         Reviewed by Carlos Garcia Campos.
3162
3163         * wtf/FeatureDefines.h:
3164
3165 2015-03-15  Benjamin Poulain  <benjamin@webkit.org>
3166
3167         CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
3168         https://bugs.webkit.org/show_bug.cgi?id=142715
3169
3170         Reviewed by Brent Fulgham.
3171
3172         Add the necessary infrastructure to test startsWith() and endsWith() with
3173         ASCII case-insentive comparisons.
3174
3175         * wtf/text/AtomicString.h:
3176         (WTF::AtomicString::startsWith):
3177         (WTF::AtomicString::startsWithIgnoringASCIICase):
3178         (WTF::AtomicString::endsWith):
3179         (WTF::AtomicString::endsWithIgnoringASCIICase):
3180
3181         * wtf/text/StringCommon.h:
3182         (WTF::loadUnaligned):
3183         (WTF::equal):
3184         I moved the low level equal() code from StringImpl to StringCommon
3185         since it is used by both StringImpl and StringView.
3186
3187         (WTF::equalCommon):
3188         (WTF::equalIgnoringASCIICaseCommon):
3189         Ideally we should drop the "Common" part of the name but StringView
3190         wants this inline for some reason. I prefered keeping the current behavior
3191         since I don't know how StringView's matching performance was evaluated.
3192
3193         (WTF::startsWith):
3194         (WTF::startsWithIgnoringASCIICase):
3195         (WTF::endsWith):
3196         (WTF::endsWithIgnoringASCIICase):
3197         Make all that code shared between StringView and Stringimpl.
3198
3199         * wtf/text/StringImpl.cpp:
3200         (WTF::StringImpl::startsWith):
3201         (WTF::StringImpl::startsWithIgnoringASCIICase):
3202         (WTF::StringImpl::endsWith):
3203         (WTF::StringImpl::endsWithIgnoringASCIICase):
3204         (WTF::equal):
3205         (WTF::stringImplContentEqual): Deleted.
3206         * wtf/text/StringImpl.h:
3207         (WTF::loadUnaligned): Deleted.
3208         (WTF::equal): Deleted.
3209
3210         * wtf/text/StringView.cpp:
3211         (WTF::StringView::startsWith):
3212         (WTF::StringView::startsWithIgnoringASCIICase):
3213         (WTF::StringView::endsWith):
3214         (WTF::StringView::endsWithIgnoringASCIICase):
3215         * wtf/text/StringView.h:
3216         Since those are new, we can safely make them out-of-line and
3217         evaluate the inlining impact as needed.
3218
3219         * wtf/text/WTFString.h:
3220         (WTF::String::startsWithIgnoringASCIICase):
3221         (WTF::String::endsWith):
3222         (WTF::String::endsWithIgnoringASCIICase):
3223
3224 2015-03-15  Benjamin Poulain  <bpoulain@apple.com>
3225
3226         Change the exact attribute matching to be ASCII case-insensitive
3227         https://bugs.webkit.org/show_bug.cgi?id=142609
3228
3229         Reviewed by Darin Adler.
3230
3231         Add support for ASCII case insensitive comparisons to all the string
3232         classes.
3233
3234         The new file StringCommon.h has the common algorithm to avoid repeating
3235         the same code with different types.
3236
3237         * WTF.vcxproj/WTF.vcxproj:
3238         * WTF.vcxproj/WTF.vcxproj.filters:
3239         * wtf/ASCIICType.h:
3240         (WTF::toASCIILower):
3241         * wtf/CMakeLists.txt:
3242         * wtf/text/AtomicString.h:
3243         (WTF::equalIgnoringASCIICase):
3244         * wtf/text/StringCommon.h: Added.
3245         (WTF::equalIgnoringASCIICase):
3246         (WTF::equalIgnoringASCIICaseCommon):
3247         * wtf/text/StringImpl.cpp:
3248         (WTF::equalIgnoringASCIICase):
3249         (WTF::equalIgnoringASCIICaseNonNull):
3250         (WTF::StringImpl::utf8Impl):
3251         (WTF::StringImpl::defaultWritingDirection): Deleted.
3252         (WTF::StringImpl::adopt): Deleted.
3253         (WTF::StringImpl::sizeInBytes): Deleted.
3254         (WTF::putUTF8Triple): Deleted.
3255         (WTF::StringImpl::utf8): Deleted.
3256         * wtf/text/StringImpl.h:
3257         (WTF::StringImpl::isSubString): Deleted.
3258         (WTF::find): Deleted.
3259
3260 2015-03-14  Michael Saboff  <msaboff@apple.com>
3261
3262         Disable Yarr JIT for ARMv7k
3263         https://bugs.webkit.org/show_bug.cgi?id=142645
3264
3265         Rubber stamped by Geoffrey Garen.
3266
3267         Changed the setting of ENABLE_YARR_JIT to be predicated on ENABLED_JIT.
3268
3269         * wtf/Platform.h:
3270
3271 2015-03-14  Michael Saboff  <msaboff@apple.com>
3272
3273         ES6: Add binary and octal literal support
3274         https://bugs.webkit.org/show_bug.cgi?id=142681
3275
3276         Reviewed by Ryosuke Niwa.
3277
3278         * wtf/ASCIICType.h:
3279         (WTF::isASCIIBinaryDigit): New support function.
3280         (WTF::isASCIIOctalDigit): Updated to use logical and (&&) instead of binary and (&).
3281
3282 2015-03-13  Mark Lam  <mark.lam@apple.com>
3283
3284         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
3285         <https://webkit.org/b/142674>
3286
3287         Reviewed by Filip Pizlo.
3288
3289         We no longer use TCMalloc in our code, and we now have C++11.  This replaces the
3290         TCMalloc_SpinLock with a new WTF::SpinLock based on WTF::Atomic (which is a
3291         wrapper around std::atomic).
3292
3293         Note that there is a StaticSpinLock and a SpinLock:
3294
3295         1. StaticSpinLock is an alias for SpinLockBase, and its initialization relies on
3296            static / global std:atomic being automatically initialized to 0 at compile time.
3297            Hence, StaticSpinLock should only be used for statics / globals (including
3298            static members of classes / structs).
3299
3300         2. SpinLock is derived from SpinLockBase, and adds a default constructor to
3301            initialize its internal atomic value to 0.  Because SpinLock has a constructor,
3302            it cannot be used for statics / globals.  Objects that want to embed a spin
3303            lock as an instance field should use SpinLock so that it is initialized properly.
3304            std::atomic will not automatically initialize instance fields to 0.  Hence,
3305            StaticSpinLock will not work correctly as instance fields of a class / struct.
3306
3307         * WTF.vcxproj/WTF.vcxproj:
3308         * WTF.vcxproj/WTF.vcxproj.filters:
3309         * WTF.xcodeproj/project.pbxproj:
3310         * wtf/CMakeLists.txt:
3311         * wtf/MetaAllocator.cpp:
3312         (WTF::MetaAllocator::~MetaAllocator):
3313         (WTF::MetaAllocator::MetaAllocator):
3314         * wtf/MetaAllocator.h:
3315         * wtf/SpinLock.h: Added.
3316         (WTF::SpinLockBase::lock):
3317         (WTF::SpinLockBase::unlock):
3318         (WTF::SpinLockBase::isLocked):
3319         (WTF::SpinLockBase::slowLock):
3320         (WTF::SpinLock::SpinLock):
3321         * wtf/TCSpinLock.h: Removed.
3322         * wtf/text/AtomicString.cpp:
3323
3324 2015-03-13  Mark Lam  <mark.lam@apple.com>
3325
3326         Introduce WTF::Atomic to wrap std::atomic for a friendlier CAS.
3327         <https://webkit.org/b/142661>
3328
3329         Reviewed by Filip Pizlo.
3330
3331         The CAS functions provided by std::atomic takes a reference to the expected
3332         value and modifies it if the CAS fails.  However, in a lot of our CAS usage,
3333         we don't want the expected value to change.  The solution to this is to
3334         provide a WTF::Atomic struct that wraps std::atomic, and provide CAS
3335         methods that won't alter the expected value if the CAS fails.
3336
3337         The method names in WTF::Atomic are chosen to be identical to those
3338         in std::atomic so that WTF::Atomic can be a simple drop in replacement
3339         for std::atomic.
3340
3341         Also changed ByteSpinLock to use WTF::Atomic instead of std::atomic.
3342
3343         * wtf/Atomics.h:
3344         (WTF::Atomic::load):
3345         (WTF::Atomic::store):
3346         (WTF::Atomic::compare_exchange_weak):
3347         (WTF::Atomic::compare_exchange_strong):
3348         * wtf/ByteSpinLock.h:
3349         (WTF::ByteSpinLock::ByteSpinLock):
3350         (WTF::ByteSpinLock::lock):
3351
3352 2015-03-12  Filip Pizlo  <fpizlo@apple.com>
3353
3354         Bytecode liveness analysis should have more lambdas and fewer sets
3355         https://bugs.webkit.org/show_bug.cgi?id=142647
3356
3357         Reviewed by Mark Lam.
3358         
3359         Add a method for iterating each set bit in a FastBitVector. Uses a functor as a callback since
3360         this allows for a more efficient algorithm.
3361
3362         * wtf/FastBitVector.h:
3363         (WTF::FastBitVector::forEachSetBit):
3364
3365 2015-03-12  Michael Saboff  <msaboff@apple.com>
3366
3367         Disable Yarr JIT for ARMv7k
3368         https://bugs.webkit.org/show_bug.cgi?id=142645
3369
3370         Reviewed by Oliver Hunt.
3371
3372         Make the setting of ENABLE_YARR_JIT match ENABLE_JIT for ARMv7k.
3373
3374         * wtf/Platform.h:
3375
3376 2015-03-12  Mark Lam  <mark.lam@apple.com>
3377
3378         Change WTF::ByteSpinLock to use std::atomic.
3379         <https://webkit.org/b/142644>
3380
3381         Reviewed by Filip Pizlo.
3382
3383         * wtf/ByteSpinLock.h:
3384         (WTF::ByteSpinLock::ByteSpinLock):
3385         (WTF::ByteSpinLock::lock):
3386         (WTF::ByteSpinLock::unlock):
3387         (WTF::ByteSpinLock::isHeld):
3388
3389 2015-03-12  Csaba Osztrogonác  <ossy@webkit.org>
3390
3391         [ARM][Linux] GC sometimes stuck in an infinite loop if parallel GC is enabled
3392         https://bugs.webkit.org/show_bug.cgi?id=141290
3393
3394         Reviewed by Carlos Garcia Campos.
3395
3396         * wtf/Platform.h: Enable parallel GC after r181319.
3397
3398 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
3399
3400         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
3401         https://bugs.webkit.org/show_bug.cgi?id=142569
3402
3403         Reviewed by David Hyatt.
3404
3405         Provide a callback to Optional::valueOrCompute() which is evaluated only if necessary.
3406
3407         * wtf/Optional.h:
3408         (WTF::Optional::valueOrCompute):
3409
3410 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
3411
3412         [Win] 17 different JSC tests started to fail in DST
3413         https://bugs.webkit.org/show_bug.cgi?id=142531
3414
3415         Reviewed by Chris Dumez.
3416
3417         The stock 'GetTimeZoneInformation' call does not always match the actual Daylight
3418         Savings calendar. This results in a period of time when these tests fail.
3419
3420         If available, we should take advantage of the new 'GetTimeZoneInformationForYear',
3421         which accesses a dynamic calendar of DST dates, which is presumbably updated by
3422         Microsoft from year-to-year.
3423
3424         * wtf/DateMath.cpp:
3425         (WTF::timeZoneInformationForYearFunction): New function to conditionally access
3426         some Vista (and newer) functionality.
3427         (WTF::calculateUTCOffset): Call new function (if available) to calculate proper UTC
3428         time offset.
3429
3430 2015-03-10  Alex Christensen  <achristensen@webkit.org>
3431
3432         Use unsigned for HashSet size.
3433         https://bugs.webkit.org/show_bug.cgi?id=142518
3434
3435         Reviewed by Benjamin Poulain.
3436
3437         * wtf/HashCountedSet.h:
3438         (WTF::Traits>::size):
3439         (WTF::Traits>::capacity):
3440         * wtf/HashMap.h:
3441         (WTF::X>::size):
3442         (WTF::X>::capacity):
3443         * wtf/HashSet.h:
3444         (WTF::V>::size):
3445         (WTF::V>::capacity):
3446         * wtf/HashTable.h:
3447         (WTF::HashTable::Stats::recordCollisionAtCount):
3448         (WTF::HashTable::Stats::dumpStats):
3449         (WTF::HashTable::size):
3450         (WTF::HashTable::capacity):
3451         (WTF::KeyTraits>::deallocateTable):
3452         (WTF::KeyTraits>::checkTableConsistencyExceptSize):
3453         * wtf/HashTraits.h:
3454         * wtf/ListHashSet.h:
3455         (WTF::U>::size):
3456         (WTF::U>::capacity):
3457
3458 2015-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
3459
3460         Remove PassRefPtr from svg/properties classes.
3461         https://bugs.webkit.org/show_bug.cgi?id=142063.
3462
3463         Reviewed by Darin Adler.
3464
3465         * wtf/Ref.h:
3466         (WTF::static_reference_cast): Add a stat_cast function to Ref<>.
3467
3468 2015-03-10  Mark Lam  <mark.lam@apple.com>
3469
3470         [Win] JSC Build Warnings Need to be Resolved.
3471         <https://webkit.org/b/142366>
3472
3473         Reviewed by Brent Fulgham.
3474
3475         * wtf/Compiler.h:
3476         - MSVC also does not have the CONSIDERS_UNREACHABLE_CODE quirk.
3477
3478 2015-03-10  Geoffrey Garen  <ggaren@apple.com>
3479
3480         bmalloc: tryFastMalloc shouldn't crash
3481         https://bugs.webkit.org/show_bug.cgi?id=142443
3482
3483         Reviewed by Sam Weinig.
3484
3485         Rolling back in r181307 with a check for whether bmalloc is enabled, to
3486         avoid crashes when running with ASan and GuardMalloc.
3487
3488         * wtf/FastMalloc.cpp:
3489         (WTF::fastMalloc):
3490         (WTF::fastRealloc):
3491         (WTF::fastAlignedMalloc):
3492         (WTF::tryFastMalloc):
3493         (WTF::tryFastRealloc): Deleted.
3494         * wtf/FastMalloc.h:
3495
3496 2015-03-10  Michael Catanzaro  <mcatanzaro@igalia.com>
3497
3498         GCC: CRASH() should be annotated with NORETURN
3499         https://bugs.webkit.org/show_bug.cgi?id=142524
3500
3501         Reviewed by Anders Carlsson.
3502
3503         Add COMPILER(GCC) to #ifdefs that already exist for Clang.
3504
3505         * wtf/Assertions.cpp:
3506         * wtf/Assertions.h:
3507
3508 2015-03-09  Commit Queue  <commit-queue@webkit.org>
3509
3510         Unreviewed, rolling out r181307.
3511         https://bugs.webkit.org/show_bug.cgi?id=142525
3512
3513         Broke ASan tests (Requested by ap on #webkit).
3514
3515         Reverted changeset:
3516
3517         "bmalloc: tryFastMalloc shouldn't crash"
3518         https://bugs.webkit.org/show_bug.cgi?id=142443
3519         http://trac.webkit.org/changeset/181307
3520
3521 2015-03-09  Geoffrey Garen  <ggaren@apple.com>
3522
3523         bmalloc: tryFastMalloc shouldn't crash
3524         https://bugs.webkit.org/show_bug.cgi?id=142443
3525
3526         Reviewed by Darin Adler.
3527
3528         * wtf/FastMalloc.cpp:
3529         (WTF::fastMalloc):
3530         (WTF::fastRealloc):
3531         (WTF::fastAlignedMalloc): Don't check for null. bmalloc automatically
3532         crashes on allocation failure, and we'd rather not pay for an extra check.
3533
3534         (WTF::tryFastMalloc): Added an opt-out API to return null rather than
3535         crashing, since some clients need this.
3536
3537         (WTF::tryFastRealloc): Deleted. Unused.
3538
3539         * wtf/FastMalloc.h:
3540
3541 2015-03-09  Mark Lam  <mark.lam@apple.com>
3542
3543         8-bit version of weakCompareAndSwap() can cause an infinite loop.
3544         https://webkit.org/b/142513>
3545
3546         Reviewed by Filip Pizlo.
3547
3548         Presently, Bitmap::concurrentTestAndSet() uses the 8-bit version of
3549         weakCompareAndSwap() (which compares and swaps an uint8_t value).
3550         Bitmap::concurrentTestAndSet() has a loop that checks if a bit in the
3551         byte of interest has been set.  If not, it will call the 8-bit CAS
3552         function to set the bit.
3553
3554         Under the covers, for ARM, the 8-bit CAS function actually works with a
3555         32-bit CAS.  The 8-bit CAS will first fetch the 32-bit value in memory
3556         that should contain the 8-bit value, and check if it contains the
3557         expected byte.  If the value in memory doesn't have the expected byte,
3558         it will return early to its caller.  The expectation is that the caller
3559         will reload the byte from memory and call the 8-bit CAS again.
3560
3561         Unfortunately, this code path that returns early does not have a
3562         compiler fence.  Without a compiler fence, the C++ compiler can
3563         optimize away the reloading of the expected byte value, leaving it
3564         unchanged.  As a result, we'll have a infinite loop here that checks a
3565         value that will never change, and the loop will not terminate until the
3566         value changes.
3567
3568         The fix is to eliminate the early return check in the 8-bit CAS, and
3569         have it always call down to the 32-bit CAS.  The 32-bit CAS has a
3570         compiler fence which will prevent this issue.
3571
3572         * wtf/Atomics.h:
3573         (WTF::weakCompareAndSwap):
3574
3575 2015-03-09  Martin Robinson  <mrobinson@igalia.com>
3576
3577         [EFL] Move DispatchQueue to WTF
3578         https://bugs.webkit.org/show_bug.cgi?id=142493
3579
3580         Reviewed by Csaba Osztrogonác.
3581
3582         * wtf/PlatformEfl.cmake: Add DispatchQueue to the source list.
3583         * wtf/efl/DispatchQueueEfl.cpp: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.cpp.
3584         * wtf/efl/DispatchQueueEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.h.
3585         * wtf/efl/DispatchQueueWorkItemEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h.
3586
3587 2015-03-08  Brent Fulgham  <bfulgham@apple.com>
3588
3589         [Win] WTF::WorkQueue does not balance ref/deref properly
3590         https://bugs.webkit.org/show_bug.cgi?id=142471
3591
3592         Reviewed by Antti Koivisto.
3593
3594         Make sure we deref the count when we execute a function in the
3595         WorkQueue.
3596
3597         * wtf/win/WorkQueueWin.cpp:
3598         (WTF::WorkQueue::performWorkOnRegisteredWorkThread):
3599
3600 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
3601
3602         [Win] Revive WTF::WorkQueue on Windows
3603         https://bugs.webkit.org/show_bug.cgi?id=142432
3604
3605         Reviewed by Darin Adler.
3606
3607         Revive the Windows implementation of WTF::WorkQueue.
3608
3609         * WTF.vcxproj/WTF.vcxproj:
3610         * WTF.vcxproj/WTF.vcxproj.filters:
3611         * wtf/WorkQueue.h:
3612         * wtf/win/WorkItemWin.cpp: Added.
3613         * wtf/win/WorkItemWin.h: Added.
3614         * wtf/win/WorkQueueWin.cpp: Added.
3615
3616 2015-03-06  Geoffrey Garen  <ggaren@apple.com>
3617
3618         Fix crashes seen on the the Windows buildbots after my last patch.
3619
3620         Unreviewed.
3621
3622         * wtf/FastMalloc.cpp:
3623         (WTF::fastAlignedMalloc): Let's pass these arguments in the right order.
3624
3625 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3626
3627         Crash in -[WebCascadeList objectAtIndex:] + 195
3628         https://bugs.webkit.org/show_bug.cgi?id=141274
3629
3630         Reviewed by David Kilzer.
3631
3632         * wtf/WeakPtr.h:
3633         (WTF::WeakPtrFactory::createWeakPtr): WebCascadeList uses a const FontCascade,
3634         and it calls createWeakPtr() on it. Therefore, createWeakPtr has to be marked
3635         const.
3636         (WTF::WeakPtrFactory::operator=): Removed because it was broken and had no
3637         callers
3638
3639 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
3640
3641         Allow tree dumping functions to be used in release builds by switching a flag
3642         https://bugs.webkit.org/show_bug.cgi?id=142379
3643
3644         Reviewed by Zalan Bujtas.
3645
3646         There are various tree dumping functions that are useful for debugging, and sometimes
3647         you want to be able to use them in release builds. Currently they are surrounded by
3648         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
3649         in wtf/Platform.h
3650
3651         * wtf/Platform.h:
3652
3653 2015-03-05  Chris Dumez  <cdumez@apple.com>
3654
3655         Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
3656         https://bugs.webkit.org/show_bug.cgi?id=142350
3657
3658         Reviewed by Michael Saboff and Benjamin Poulain.
3659
3660         Fix ASSERTION FAILED: !is8Bit() in StringImpl::characters16() from
3661         WTF::equalInner() after r173761. The code was incorrectly assuming that
3662         if stringImpl is 16-bit, then matchString is 16-bit too, which is not
3663         correct.
3664
3665         Also rename WTFString::startsWith() / endsWith() taking an offset to
3666         hasInfixStartingAt() / hasInfixEndingAt() for clarity. It seems odd
3667         to call it startsWith even though it won't technically *start* with
3668         the pattern if the input offset is greater than zero.
3669
3670         Also drop the caseSensitive argument as it is never used (always true
3671         at call sites.
3672
3673         * wtf/text/StringImpl.cpp:
3674         (WTF::equalInner):
3675         (WTF::StringImpl::hasInfixStartingAt):
3676         (WTF::StringImpl::hasInfixEndingAt):
3677         (WTF::StringImpl::startsWith): Deleted.
3678         (WTF::StringImpl::endsWith): Deleted.
3679         * wtf/text/StringImpl.h:
3680         * wtf/text/WTFString.h:
3681         (WTF::String::hasInfixStartingAt):
3682         (WTF::String::hasInfixEndingAt):
3683         (WTF::String::startsWith): Deleted.
3684         (WTF::String::endsWith): Deleted.
3685
3686 2015-03-05  Chris Dumez  <cdumez@apple.com>
3687
3688         NetworkCache efficacy logging is using too much CPU
3689         https://bugs.webkit.org/show_bug.cgi?id=142186
3690         <rdar://problem/19632080>
3691
3692         Reviewed by Antti Koivisto.
3693
3694         * wtf/HashMap.h:
3695         (WTF::copyToVector):
3696         Add copyToVector() utility function for HashMap that uses an std::pair<key, value>
3697         as element type.
3698
3699         * wtf/text/WTFString.h:
3700         (WTF::StringCapture::StringCapture):
3701         (WTF::StringCapture::operator=):
3702         Add default constructor and assignment operator to StringCapture so that
3703         it can be used in a Vector.
3704
3705 2015-03-05  Antti Koivisto  <antti@apple.com>
3706
3707         Support WorkQueue QOS classes on Mavericks
3708         https://bugs.webkit.org/show_bug.cgi?id=142328
3709
3710         Reviewed by Anders Carlsson.
3711
3712         "The priority of a dispatch queue is inherited from its target queue.  In order to
3713         change the priority of a queue created with dispatch_queue_create(), use the
3714         dispatch_get_global_queue() function to obtain a target queue of the desired prior-
3715         ity."
3716
3717         * wtf/cocoa/WorkQueueCocoa.cpp:
3718         (WTF::targetQueueForQOSClass):
3719         (WTF::WorkQueue::platformInitialize):
3720
3721 2015-03-03  Anders Carlsson  <andersca@apple.com>
3722
3723         Remove unused compression code
3724         https://bugs.webkit.org/show_bug.cgi?id=142237
3725
3726         Reviewed by Geoffrey Garen.
3727
3728         * WTF.vcxproj/WTF.vcxproj:
3729         * WTF.vcxproj/WTF.vcxproj.filters:
3730         * WTF.xcodeproj/project.pbxproj:
3731         * wtf/CMakeLists.txt:
3732         * wtf/Compression.cpp: Removed.
3733         * wtf/Compression.h: Removed.
3734
3735 2015-03-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3736
3737         [WK2] Remove unnecessary create() factory functions.
3738         https://bugs.webkit.org/show_bug.cgi?id=142161
3739
3740         Reviewed by Chris Dumez.
3741
3742         We can replace some create() factory functions with std::make_unique(). Because
3743         it just returns new instance. Even some of those functions have used std::unique_ptr<>
3744         instead of std::make_unique<>. Fixed all.
3745
3746         * wtf/efl/WorkQueueEfl.cpp:
3747         (WorkQueue::dispatch):
3748
3749 2015-03-02  Filip Pizlo  <fpizlo@apple.com>
3750
3751         DFG compile time measurements should really report milliseconds
3752         https://bugs.webkit.org/show_bug.cgi?id=142209
3753
3754         Reviewed by Benjamin Poulain.
3755         
3756         This bug was introduced because currentTimeMS() calls were converted to
3757         monotonicallyIncreasingTime() calls. Perhaps this bug would be less likely if there was a
3758         monotonicallyIncreasingTimeMS() function available, so this patch adds it.
3759
3760         * wtf/CurrentTime.h:
3761         (WTF::monotonicallyIncreasingTimeMS):
3762
3763 2015-02-27  Darin Adler  <darin@apple.com>
3764
3765         Remove unused PossiblyNull
3766         https://bugs.webkit.org/show_bug.cgi?id=142124
3767
3768         Reviewed by Andreas Kling.
3769
3770         * WTF.vcxproj/WTF.vcxproj: Removed the file.
3771         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
3772         * WTF.xcodeproj/project.pbxproj: Ditto.
3773         * wtf/CMakeLists.txt: Ditto.
3774         * wtf/PossiblyNull.h: Removed.
3775
3776         * wtf/FastMalloc.h: Moved everything to the left.
3777         Moved member functions out of the TryMallocReturnValue class definition.
3778         (WTF::TryMallocReturnValue::operator PossiblyNull<T>): Deleted.
3779         (WTF::TryMallocReturnValue::getValue): Marked inline, changed to work
3780         only with pointer types, not arbitrary non-pointer types.
3781
3782 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
3783
3784         [Win] Make build logs more legible by reducing noise
3785         https://bugs.webkit.org/show_bug.cgi?id=142034
3786
3787         Reviewed by Alexey Proskuryakov.
3788
3789         Modify batch files, makefiles, and DOS commands to remove
3790         uninteresting/unhelpful output.
3791
3792         * WTF.vcxproj/WTFGenerated.make:
3793         * WTF.vcxproj/WTFPreBuild.cmd:
3794         * WTF.vcxproj/copy-files.cmd:
3795
3796 2015-02-26  Landry Breuil  <landry@openbsd.org>
3797
3798         Revert bug 19975, now that gcc 4.7 is required.
3799         https://bugs.webkit.org/show_bug.cgi?id=129927
3800
3801         Reviewed by Andreas Kling.
3802
3803         isfinite() and signbit() are provided by gcc's cmath header.
3804
3805         * wtf/MathExtras.h:
3806
3807 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
3808
3809         UNREACHABLE_FOR_PLATFORM() should be release assert
3810         https://bugs.webkit.org/show_bug.cgi?id=141904
3811
3812         Reviewed by Darin Adler.
3813
3814         * wtf/Assertions.h:
3815         (UNREACHABLE_FOR_PLATFORM):
3816
3817 2015-02-25  Filip Pizlo  <fpizlo@apple.com>
3818
3819         Enable concurrent JIT on GTK
3820         https://bugs.webkit.org/show_bug.cgi?id=142007
3821
3822         Reviewed by Benjamin Poulain.
3823
3824         Seems weird that GTK keeps it off. No good reason for that as far as I can tell.
3825
3826         * wtf/Platform.h:
3827
3828 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
3829
3830         WTF::WeakPtr should rename 'forgot' to 'clear' and support nullptr assignment
3831         https://bugs.webkit.org/show_bug.cgi?id=141935
3832
3833         Reviewed by Myles C. Maxfield.
3834
3835         * wtf/WeakPtr.h:
3836         (WTF::WeakPtr::operator=): Added 'nullptr_t' overload.
3837         (WTF::WeakPtr::clear): Renamed from 'forget'
3838         (WTF::WeakPtr::forget): Deleted.
3839
3840 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
3841
3842         WTF::WeakPtr should have a 'forget' method
3843         https://bugs.webkit.org/show_bug.cgi?id=141923
3844
3845         Reviewed by Myles C. Maxfield.
3846
3847         * wtf/WeakPtr.h:
3848         (WTF::WeakPtr::forget): Added.
3849
3850 2015-02-20  Geoffrey Garen  <ggaren@apple.com>
3851
3852         Remove TCMalloc
3853         https://bugs.webkit.org/show_bug.cgi?id=141844
3854
3855         Reviewed by Andreas Kling.
3856
3857         It's unused.
3858
3859         * WTF.vcxproj/WTF.vcxproj:
3860         * WTF.vcxproj/WTF.vcxproj.filters:
3861         * WTF.xcodeproj/project.pbxproj:
3862         * wtf/CMakeLists.txt:
3863         * wtf/FastMalloc.cpp:
3864         (WTF::EntropySource<4>::value): Deleted.
3865         (WTF::EntropySource<8>::value): Deleted.
3866         (WTF::internalEntropyValue): Deleted.
3867         (WTF::freedObjectStartPoison): Deleted.
3868         (WTF::freedObjectEndPoison): Deleted.
3869         (WTF::ClassIndex): Deleted.
3870         (WTF::HardenedSLL::create): Deleted.
3871         (WTF::HardenedSLL::null): Deleted.
3872         (WTF::HardenedSLL::setValue): Deleted.
3873         (WTF::HardenedSLL::value): Deleted.
3874         (WTF::HardenedSLL::operator!): Deleted.
3875         (WTF::HardenedSLL::operator UnspecifiedBoolType): Deleted.
3876         (WTF::HardenedSLL::operator!=): Deleted.
3877         (WTF::HardenedSLL::operator==): Deleted.
3878         (WTF::LgFloor): Deleted.
3879         (WTF::SLL_Next): Deleted.
3880         (WTF::SLL_SetNext): Deleted.
3881         (WTF::SLL_Push): Deleted.
3882         (WTF::SLL_Pop): Deleted.
3883         (WTF::SLL_PopRange): Deleted.
3884         (WTF::SLL_PushRange): Deleted.
3885         (WTF::SizeClass): Deleted.
3886         (WTF::ByteSizeForClass): Deleted.
3887         (WTF::NumMoveSize): Deleted.
3888         (WTF::InitSizeClasses): Deleted.
3889         (WTF::MetaDataAlloc): Deleted.
3890         (WTF::PageHeapAllocator::Init): Deleted.
3891         (WTF::PageHeapAllocator::New): Deleted.
3892         (WTF::PageHeapAllocator::Delete): Deleted.
3893         (WTF::PageHeapAllocator::inuse): Deleted.
3894         (WTF::pages): Deleted.
3895         (WTF::AllocationSize): Deleted.
3896         (WTF::spanInitializerCookie): Deleted.
3897         (WTF::Span::next): Deleted.
3898         (WTF::Span::remoteNext): Deleted.
3899         (WTF::Span::prev): Deleted.
3900         (WTF::Span::setNext): Deleted.
3901         (WTF::Span::setPrev): Deleted.
3902         (WTF::Span::initCookie): Deleted.
3903         (WTF::Span::clearCookie): Deleted.
3904         (WTF::Span::isValid): Deleted.
3905         (WTF::Event): Deleted.
3906         (WTF::NewSpan): Deleted.
3907         (WTF::DeleteSpan): Deleted.
3908         (WTF::DLL_Init): Deleted.
3909         (WTF::DLL_Remove): Deleted.
3910         (WTF::DLL_IsEmpty): Deleted.
3911         (WTF::DLL_Length): Deleted.
3912         (WTF::DLL_Print): Deleted.
3913         (WTF::DLL_Prepend): Deleted.
3914         (WTF::TCMalloc_Central_FreeList::length): Deleted.
3915         (WTF::TCMalloc_Central_FreeList::tc_length): Deleted.
3916         (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Deleted.
3917         (WTF::TCMalloc_Central_FreeList::entropy): Deleted.
3918         (WTF::FastMallocZone::goodSize): Deleted.
3919         (WTF::FastMallocZone::check): Deleted.
3920         (WTF::FastMallocZone::print): Deleted.
3921         (WTF::FastMallocZone::log): Deleted.
3922         (WTF::FastMallocZone::forceLock): Deleted.
3923         (WTF::FastMallocZone::forceUnlock): Deleted.
3924         (WTF::FastMallocZone::statistics): Deleted.
3925         (WTF::FastMallocZone::zoneValloc): Deleted.
3926         (WTF::FastMallocZone::zoneDestroy): Deleted.
3927         (WTF::MallocHook::record): Deleted.
3928         (WTF::MallocHook::recordAllocation): Deleted.
3929         (WTF::MallocHook::recordDeallocation): Deleted.
3930         (WTF::MallocHook::init): Deleted.
3931         (WTF::MallocHook::InvokeNewHook): Deleted.
3932         (WTF::MallocHook::InvokeDeleteHook): Deleted.
3933         (WTF::KernelSupportsTLS): Deleted.
3934         (WTF::CheckIfKernelSupportsTLS): Deleted.
3935         (WTF::TCMalloc_PageHeap::GetDescriptor): Deleted.
3936         (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe): Deleted.
3937         (WTF::TCMalloc_PageHeap::SystemBytes): Deleted.
3938         (WTF::TCMalloc_PageHeap::FreeBytes): Deleted.
3939         (WTF::TCMalloc_PageHeap::GetSizeClassIfCached): Deleted.
3940         (WTF::TCMalloc_PageHeap::CacheSizeClass): Deleted.
3941         (WTF::TCMalloc_PageHeap::RecordSpan): Deleted.
3942         (WTF::TCMalloc_PageHeap::init): Deleted.
3943         (WTF::TCMalloc_PageHeap::initializeScavenger): Deleted.
3944         (WTF::TCMalloc_PageHeap::isScavengerSuspended): Deleted.
3945         (WTF::TCMalloc_PageHeap::scheduleScavenger): Deleted.
3946         (WTF::TCMalloc_PageHeap::rescheduleScavenger): Deleted.
3947         (WTF::TCMalloc_PageHeap::suspendScavenger): Deleted.
3948         (WTF::TCMalloc_PageHeap::scavengerTimerFired): Deleted.
3949         (WTF::TCMalloc_PageHeap::runScavengerThread): Deleted.
3950         (WTF::TCMalloc_PageHeap::signalScavenger): Deleted.
3951         (WTF::TCMalloc_PageHeap::scavenge): Deleted.
3952         (WTF::TCMalloc_PageHeap::shouldScavenge): Deleted.
3953         (WTF::TCMalloc_PageHeap::New): Deleted.
3954         (WTF::TCMalloc_PageHeap::AllocLarge): Deleted.
3955         (WTF::TCMalloc_PageHeap::Split): Deleted.
3956         (WTF::TCMalloc_PageHeap::Carve): Deleted.
3957         (WTF::mergeDecommittedStates): Deleted.
3958         (WTF::TCMalloc_PageHeap::Delete): Deleted.
3959         (WTF::TCMalloc_PageHeap::IncrementalScavenge): Deleted.
3960         (WTF::TCMalloc_PageHeap::RegisterSizeClass): Deleted.
3961         (WTF::TCMalloc_PageHeap::ReturnedBytes): Deleted.
3962         (WTF::PagesToMB): Deleted.
3963         (WTF::TCMalloc_PageHeap::Dump): Deleted.
3964         (WTF::TCMalloc_PageHeap::GrowHeap): Deleted.
3965         (WTF::TCMalloc_PageHeap::Check): Deleted.
3966         (WTF::TCMalloc_PageHeap::CheckList): Deleted.
3967         (WTF::TCMalloc_PageHeap::ReleaseFreeList): Deleted.
3968         (WTF::TCMalloc_PageHeap::ReleaseFreePages): Deleted.
3969         (WTF::TCMalloc_ThreadCache_FreeList::Init): Deleted.
3970         (WTF::TCMalloc_ThreadCache_FreeList::length): Deleted.
3971         (WTF::TCMalloc_ThreadCache_FreeList::empty): Deleted.
3972         (WTF::TCMalloc_ThreadCache_FreeList::lowwatermark): Deleted.
3973         (WTF::TCMalloc_ThreadCache_FreeList::clear_lowwatermark): Deleted.
3974         (WTF::TCMalloc_ThreadCache_FreeList::Push): Deleted.
3975         (WTF::TCMalloc_ThreadCache_FreeList::PushRange): Deleted.
3976         (WTF::TCMalloc_ThreadCache_FreeList::PopRange): Deleted.
3977         (WTF::TCMalloc_ThreadCache_FreeList::Pop): Deleted.
3978         (WTF::TCMalloc_ThreadCache_FreeList::Validate): Deleted.
3979         (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Deleted.
3980         (WTF::TCMalloc_ThreadCache::freelist_length): Deleted.
3981         (WTF::TCMalloc_ThreadCache::Size): Deleted.
3982         (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Deleted.
3983         (WTF::getPageHeap): Deleted.
3984         (WTF::fastMallocGoodSize): Deleted.
3985         (WTF::TCMalloc_PageHeap::periodicScavenge): Deleted.
3986         (WTF::TCMalloc_PageHeap::scavengerThread): Deleted.
3987         (WTF::setThreadHeap): Deleted.
3988         (WTF::TCMalloc_Central_FreeList::Init): Deleted.
3989         (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans): Deleted.
3990         (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): Deleted.
3991         (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass): Deleted.
3992         (WTF::TCMalloc_Central_FreeList::MakeCacheSpace): Deleted.
3993         (WTF::TCMalloc_Central_FreeList::ShrinkCache): Deleted.
3994         (WTF::TCMalloc_Central_FreeList::InsertRange): Deleted.
3995         (WTF::TCMalloc_Central_FreeList::RemoveRange): Deleted.
3996         (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe): Deleted.
3997         (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Deleted.
3998         (WTF::TCMalloc_Central_FreeList::Populate): Deleted.
3999         (WTF::TCMalloc_ThreadCache::SampleAllocation): Deleted.
4000         (WTF::TCMalloc_ThreadCache::Init): Deleted.
4001         (WTF::TCMalloc_ThreadCache::Cleanup): Deleted.
4002         (WTF::TCMalloc_ThreadCache::Allocate): Deleted.
4003         (WTF::TCMalloc_ThreadCache::Deallocate): Deleted.
4004         (WTF::TCMalloc_ThreadCache::FetchFromCentralCache): Deleted.
4005         (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache): Deleted.
4006         (WTF::TCMalloc_ThreadCache::Scavenge): Deleted.
4007         (WTF::TCMalloc_ThreadCache::PickNextSample): Deleted.
4008         (WTF::TCMalloc_ThreadCache::InitModule): Deleted.
4009         (WTF::TCMalloc_ThreadCache::NewHeap): Deleted.
4010         (WTF::TCMalloc_ThreadCache::GetThreadHeap): Deleted.
4011         (WTF::TCMalloc_ThreadCache::GetCache): Deleted.
4012         (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): Deleted.
4013         (WTF::TCMalloc_ThreadCache::InitTSD): Deleted.
4014         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): Deleted.
4015         * wtf/TCPackedCache.h: Removed.
4016         * wtf/TCPageMap.h: Removed.
4017         * wtf/TCSystemAlloc.cpp: Removed.
4018         * wtf/TCSystemAlloc.h: Removed.
4019
4020 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
4021
4022         Remove svn:keywords property.
4023
4024         As far as I can tell, the property had no effect on any of these files, but also,
4025         when it has effect it's likely harmful.
4026
4027         * wtf/DecimalNumber.cpp: Removed property svn:keywords.
4028         * wtf/spi/darwin/XPCSPI.h: Removed property svn:keywords.
4029
4030 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
4031
4032         EFL URTBF
4033
4034         * wtf/PlatformEfl.cmake:
4035
4036 2015-02-20  Simon Fraser  <simon.fraser@apple.com>
4037
4038         RunLoop::dispatch() should drop the mutex before calling wakeUp().
4039         https://bugs.webkit.org/show_bug.cgi?id=141820
4040
4041         Reviewed by Alexey Proskuryakov.
4042         
4043         RunLoop::wakeUp() calls into CoreFoundation which could take time,
4044         so scope the mutex just to protect m_functionQueue.
4045
4046         * wtf/RunLoop.cpp:
4047         (WTF::RunLoop::dispatch):
4048
4049 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4050
4051         Unreviewed, EFL build fix since r180410.
4052
4053         * wtf/PlatformEfl.cmake: Add WEBKIT2/Platform/efl path in order to include DispatchQueueEfl.h.
4054
4055 2015-02-20  Antti Koivisto  <antti@apple.com>
4056
4057         Move WorkQueue from WK2 to WTF
4058         https://bugs.webkit.org/show_bug.cgi?id=141797
4059
4060         Reviewed by Anders Carlsson.
4061
4062         It may be useful in WebCore.
4063
4064         Windows implementation is still missing.
4065
4066         * WTF.xcodeproj/project.pbxproj:
4067         * wtf/CMakeLists.txt:
4068         * wtf/PlatformGTK.cmake:
4069         * wtf/WorkQueue.cpp: Copied from Source/WebKit2/Platform/WorkQueue.cpp.
4070         * wtf/WorkQueue.h: Copied from Source/WebKit2/Platform/WorkQueue.h.
4071         * wtf/cocoa: Added.
4072         * wtf/cocoa/WorkQueueCocoa.cpp: Copied from Source/WebKit2/Platform/mac/WorkQueueMac.cpp.
4073         * wtf/efl/WorkQueueEfl.cpp: Copied from Source/WebKit2/Platform/efl/WorkQueueEfl.cpp.
4074         * wtf/gtk/WorkQueueGtk.cpp: Copied from Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp.
4075
4076 2015-02-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4077
4078         [EFL] Enable bmalloc for EFL port 
4079         https://bugs.webkit.org/show_bug.cgi?id=141459
4080
4081         Reviewed by Csaba Osztrogonác.
4082
4083         * wtf/CMakeLists.txt: Remove TCSystemAlloc.cpp/h.
4084         * wtf/FastMalloc.cpp: Enable BMALLOC for EFL port.
4085
4086 2015-02-13  Anders Carlsson  <andersca@apple.com>
4087
4088         Add a move constructor and move assignment operator to Deque
4089         https://bugs.webkit.org/show_bug.cgi?id=141571
4090
4091         Reviewed by Andreas Kling.
4092
4093         * wtf/Deque.h:
4094         (WTF::inlineCapacity>::Deque):
4095         (WTF::=): Deleted.
4096
4097 2015-02-13  Anders Carlsson  <andersca@apple.com>
4098
4099         Add an initializer list constructor to Deque
4100         https://bugs.webkit.org/show_bug.cgi?id=141565
4101
4102         Reviewed by Andreas Kling.
4103
4104         * wtf/Deque.h:
4105         (WTF::inlineCapacity>::Deque):
4106
4107 2015-02-13  Anders Carlsson  <andersca@apple.com>
4108
4109         Re-indent Deque.h
4110
4111         Rubber-stamped by Antti Koivisto.
4112
4113         * wtf/Deque.h:
4114
4115 2015-02-11  Brent Fulgham  <bfulgham@apple.com>
4116
4117         [Win] [64-bit] Work around MSVC2013 Runtime Bug
4118         https://bugs.webkit.org/show_bug.cgi?id=141498
4119         <rdar://problem/19803642>
4120
4121         Reviewed by Anders Carlsson.
4122
4123         Disable FMA3 instruction use in the MSVC math library to
4124         work around a VS2013 runtime crash. We can remove this
4125         workaround when we switch to VS2015.
4126
4127         * WTF.vcxproj/WTF.vcxproj: Add new files.
4128         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
4129         * wtf/win/WTFDLL.cpp: Added.
4130
4131 2015-02-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4132
4133         [EFL][GTK] Use bmalloc instead of tcmalloc
4134         https://bugs.webkit.org/show_bug.cgi?id=140162
4135
4136         Reviewed by Carlos Garcia Campos.
4137
4138         * wtf/CMakeLists.txt:
4139         * wtf/FastMalloc.cpp:
4140             Enable bmalloc on GTK ports, but EFL port will enable it when bmalloc supports
4141             memory statistics.
4142
4143 2015-02-10  Darin Adler  <darin@apple.com>
4144
4145         Add the crash-on-failure behavior to bmalloc-based fastMalloc
4146         https://bugs.webkit.org/show_bug.cgi?id=141434
4147
4148         Reviewed by Alexey Proskuryakov.
4149
4150         * wtf/FastMalloc.cpp: Removed unneeded includes.
4151         (WTF::fastMalloc): Added null check and CRASH.
4152         (WTF::fastCalloc): Added overflow checking, null check, and CRASH.
4153         (WTF::fastRealloc): Added null check and CRASH.
4154         (WTF::fastMallocSize): Added FIXME comment.
4155         (WTF::fastMallocGoodSize): Added FIXME comment.
4156         (WTF::fastAlignedMalloc): Added null check and CRASH.
4157         (WTF::tryFastMalloc): Changed to call bmalloc directly instead of
4158         calling fastMalloc, since fastMalloc will now crash on failure.
4159         (WTF::tryFastRealloc): Changed to call bmalloc directly instead of
4160         calling fastRealloc, since fastRealloc will now crash on failure.
4161         (WTF::tryFastCalloc): Added overflow checking.
4162         (WTF::fastMallocStatistics): Added FIXME comment.
4163
4164 2015-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
4165
4166         [GTK] GMutexLocker build issue
4167         https://bugs.webkit.org/show_bug.cgi?id=141381
4168
4169         Reviewed by Žan Doberšek.
4170
4171         Remove using WTF::GMutexLocker from the header, since newer glib
4172         versions have a GMutexLocker in the public API.
4173
4174         * wtf/gobject/GMutexLocker.h:
4175
4176 2015-02-09  Alexey Proskuryakov  <ap@apple.com>
4177
4178         REGRESSION: tryFastCalloc is no longer "try"
4179         https://bugs.webkit.org/show_bug.cgi?id=141406
4180
4181         Reviewed by Darin Adler.
4182
4183         This causes crashes on some WebKit regression test bots.
4184
4185         * wtf/FastMalloc.cpp: (WTF::tryFastCalloc): Fix what looks like a copy/paste mistake.
4186
4187 2015-02-07  Csaba Osztrogonác  <ossy@webkit.org>
4188
4189         [ARM] GC sometimes stuck in an infinite loop if parallel GC is enabled
4190         https://bugs.webkit.org/show_bug.cgi?id=141290
4191
4192         Reviewed by Anders Carlsson.
4193
4194         * wtf/Platform.h:
4195
4196 2015-02-07  Chris Dumez  <cdumez@apple.com>
4197
4198         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
4199         https://bugs.webkit.org/show_bug.cgi?id=141321
4200
4201         Reviewed by Darin Adler.
4202
4203         Add Vector::removeFirstMatching() / removeAllMatching() methods taking
4204         lambda functions to match the element(s) to remove. This simplifies the
4205         code a bit. Vector::removeAllMatching() is also more efficient than the
4206         manual removal alternative.
4207
4208         * wtf/Vector.h:
4209
4210 2015-02-06  Commit Queue  <commit-queue@webkit.org>
4211
4212         Unreviewed, rolling out r179743.
4213         https://bugs.webkit.org/show_bug.cgi?id=141335
4214
4215         caused missing symbols in non-WebKit clients of WTF::Vector
4216         (Requested by kling on #webkit).
4217
4218         Reverted changeset:
4219
4220         "Remove WTF::fastMallocGoodSize()."
4221         https://bugs.webkit.org/show_bug.cgi?id=141020
4222         http://trac.webkit.org/changeset/179743
4223
4224 2015-02-06  Andreas Kling  <akling@apple.com>
4225
4226         Remove WTF::fastMallocGoodSize().
4227         <https://webkit.org/b/141020>
4228
4229         Reviewed by Anders Carlsson.
4230
4231         bmalloc's good-size API just returns exactly whatever you pass it,
4232         so it's of no utility to us anymore.
4233
4234         This gets rid of a bunch of pointless out-of-line calls in Vector
4235         construction and growth.
4236
4237         * wtf/Compression.cpp:
4238         (WTF::GenericCompressedData::create):
4239         * wtf/FastMalloc.cpp:
4240         (WTF::fastMallocGoodSize): Deleted.
4241         * wtf/FastMalloc.h:
4242         * wtf/Vector.h:
4243         (WTF::VectorBufferBase::allocateBuffer):
4244         (WTF::VectorBufferBase::tryAllocateBuffer):
4245         (WTF::VectorBufferBase::reallocateBuffer):
4246
4247 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
4248
4249         [Streams API] Implement a barebone ReadableStream interface
4250         https://bugs.webkit.org/show_bug.cgi?id=141045
4251
4252         Reviewed by Benjamin Poulain.
4253
4254         * wtf/FeatureDefines.h:
4255
4256 2015-02-04  Alexey Proskuryakov  <ap@apple.com>
4257
4258         Optimized equal() functions in StringImpl.h are not ASan compatible
4259         https://bugs.webkit.org/show_bug.cgi?id=141258
4260
4261         Reviewed by Daniel Bates.
4262
4263         * wtf/text/StringImpl.h: (WTF::equal): Add custom implementations for ASan.
4264
4265 2015-02-04  Chris Dumez  <cdumez@apple.com>
4266
4267         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
4268         https://bugs.webkit.org/show_bug.cgi?id=141192
4269
4270         Reviewed by Benjamin Poulain.
4271
4272         Add removeFirst(value) / removeAll(value) convenience methods to
4273         WTF::Vector to reduce complexity a bit at call sites.
4274
4275         I am planning to add overloads for these taking a lambda function for
4276         matching in a follow-up patch as well. I have seen quite a few
4277         Vector::remove(index) call sites that would benefit from it.
4278
4279         * wtf/Vector.h:
4280         (WTF::OverflowHandler>::removeFirst):
4281         (