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