[CMake] [GTK] Organize and clean up unused CMake variables
[WebKit-https.git] / Source / WTF / ChangeLog
1 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2
3         [CMake] [GTK] Organize and clean up unused CMake variables
4         https://bugs.webkit.org/show_bug.cgi?id=144364
5
6         Reviewed by Gyuyoung Kim.
7
8         * wtf/PlatformGTK.cmake: Add variables specific to this project.
9
10 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
11
12         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
13         https://bugs.webkit.org/show_bug.cgi?id=144304
14
15         Reviewed by Geoffrey Garen.
16
17         No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
18
19         * wtf/Platform.h:
20
21 2015-04-28  Commit Queue  <commit-queue@webkit.org>
22
23         Unreviewed, rolling out r183514.
24         https://bugs.webkit.org/show_bug.cgi?id=144359
25
26         It broke cloop test bots (Requested by mcatanzaro on #webkit).
27
28         Reverted changeset:
29
30         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
31         https://bugs.webkit.org/show_bug.cgi?id=144304
32         http://trac.webkit.org/changeset/183514
33
34 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
35
36         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
37         https://bugs.webkit.org/show_bug.cgi?id=144304
38
39         Reviewed by Geoffrey Garen.
40
41         No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
42
43         * wtf/Platform.h:
44
45 2015-04-28  Alex Christensen  <achristensen@webkit.org>
46
47         Properly reset deleted count when clearing HashTables.
48         https://bugs.webkit.org/show_bug.cgi?id=144343
49
50         Reviewed by Andreas Kling.
51
52         * wtf/HashTable.h:
53         (WTF::KeyTraits>::clear):
54         Reset m_deletedCount, which appears to have been forgotten.
55
56 2015-04-28  Alex Christensen  <achristensen@webkit.org>
57
58         [Content Extensions] Use less memory for CombinedURLFilters.
59         https://bugs.webkit.org/show_bug.cgi?id=144290
60
61         Reviewed by Andreas Kling.
62
63         * wtf/Forward.h:
64         * wtf/Vector.h:
65         Added a minCapacity template parameter to allow changing the minimum size of an 
66         allocated buffer. The default minCapacity is kept at 16 unless otherwise specified 
67         to have no change on existing code, but this could be changed later. A smaller 
68         default minCapacity would use less memory with small Vectors but spend more time 
69         copying when expanding to large Vectors.
70
71 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
72
73         [Win] Deactivate WebGL until Windows tests work properly
74         https://bugs.webkit.org/show_bug.cgi?id=144291
75         <rdar://problem/20707307>
76
77         Reviewed by Zalan Bujtas.
78
79         * wtf/FeatureDefines.h: Force WebGL off for Windows builds.
80
81 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
82
83         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
84         https://bugs.webkit.org/show_bug.cgi?id=144193
85
86         Reviewed by Darin Adler.
87
88         * wtf/FeatureDefines.h:
89         * wtf/Platform.h:
90
91 2015-04-22  Martin Robinson  <mrobinson@igalia.com>
92
93         [CMake] Autogenerate cmakeconfig.h.cmake
94         https://bugs.webkit.org/show_bug.cgi?id=143997
95
96         Reviewed by Csaba Osztrogonác.
97
98         * wtf/Platform.h: Move a GTK-specific setting from cmakeconfig.h to here.
99
100 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
101
102         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
103         https://bugs.webkit.org/show_bug.cgi?id=144182
104
105         Reviewed by Simon Fraser.
106
107         * wtf/FeatureDefines.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
108
109 2015-04-24  Commit Queue  <commit-queue@webkit.org>
110
111         Unreviewed, rolling out r183288.
112         https://bugs.webkit.org/show_bug.cgi?id=144189
113
114         Made js/sort-with-side-effecting-comparisons.html time out in
115         debug builds (Requested by ap on #webkit).
116
117         Reverted changeset:
118
119         "It shouldn't take 1846 lines of code and 5 FIXMEs to sort an
120         array."
121         https://bugs.webkit.org/show_bug.cgi?id=144013
122         http://trac.webkit.org/changeset/183288
123
124 2015-04-21  Geoffrey Garen  <ggaren@apple.com>
125
126         It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
127         https://bugs.webkit.org/show_bug.cgi?id=144013
128
129         Reviewed by Mark Lam.
130
131         Remove this custom tree implementation because it is unused. (It was
132         previously used to achieve a stable array sort in certain cases.)
133
134         * WTF.vcxproj/WTF.vcxproj:
135         * WTF.vcxproj/WTF.vcxproj.filters:
136         * WTF.xcodeproj/project.pbxproj:
137         * wtf/AVLTree.h: Removed.
138         * wtf/CMakeLists.txt:
139
140 2015-04-24  Darin Adler  <darin@apple.com>
141
142         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
143         https://bugs.webkit.org/show_bug.cgi?id=128007
144
145         Reviewed by Anders Carlsson.
146
147         * WTF.vcxproj/WTF.vcxproj: Removed OwnPtr source files.
148         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
149         * WTF.xcodeproj/project.pbxproj: Ditto.
150         * wtf/CMakeLists.txt: Ditto.
151
152         * wtf/Forward.h: Removed OwnPtr and PassOwnPtr.
153         * wtf/HashTraits.h: Ditto.
154
155         * wtf/OwnPtr.h: Removed.
156         * wtf/OwnPtrCommon.h: Removed.
157         * wtf/PassOwnPtr.h: Removed.
158
159         * wtf/SizeLimits.cpp: Removed OwnPtr.
160         * wtf/VectorTraits.h: Removed OwnPtr specialization.
161
162 2015-04-23  Jer Noble  <jer.noble@apple.com>
163
164         Disable HAVE_AVKIT on AppleTV
165         https://bugs.webkit.org/show_bug.cgi?id=144142
166
167         Reviewed by Dan Bernstein.
168
169         * wtf/Platform.h:
170
171 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
172
173         [iOS] WebKit services should inherit environment variables for home
174         https://bugs.webkit.org/show_bug.cgi?id=144078
175         rdar://problem/20571678
176
177         Reviewed by Dan Bernstein.
178
179         * wtf/spi/darwin/XPCSPI.h: Added xpc_copy_bootstrap and xpc_dictionary_apply.
180
181 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
182
183         Undo the WTF part of the previous build fix, we don't use private headers in WTF.
184
185         * WTF.xcodeproj/project.pbxproj:
186
187 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
188
189         Build fix.
190
191         * WTF.xcodeproj/project.pbxproj: Make RAMSize.h a private header, now that it's used
192         from outside WTF.
193
194 2015-04-23  Andreas Kling  <akling@apple.com>
195
196         There should only be one way to get the system memory size.
197         <https://webkit.org/b/144081>
198
199         Reviewed by Antti Koivisto.
200
201         Merge all the logic from other RAM size fetcher helpers into WTF's.
202
203         Darwin ports now use host_info() instead of sysctl(), since that was the more common way
204         of doing this.
205
206         Also bumped the fallback answer from 128 MB to 512 MB to bring it closer to today's hardware.
207
208         Finally, the number is rounded up to the next multiple of 128 MB, to avoid misunderstandings
209         on some systems where the number returned by the kernel is slightly lower than the marketing
210         number. Removed the "fudging" that was used in some places, since this fixes that cleanly.
211
212         * wtf/RAMSize.cpp:
213         (WTF::computeRAMSize):
214
215 2015-04-22  Darin Adler  <darin@apple.com>
216
217         Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
218         https://bugs.webkit.org/show_bug.cgi?id=143949
219
220         Reviewed by Andreas Kling.
221
222         * wtf/MathExtras.h:
223         (wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
224         fixed in Snow Leopard <rdar://problem/6286405>, so we don't need the workaround any more.
225
226 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
227
228         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
229         https://bugs.webkit.org/show_bug.cgi?id=144052
230         rdar://problem/19754404
231
232         Build fix. Landing a forward declaration that should have been part of the original patch.
233
234         * wtf/spi/darwin/XPCSPI.h:
235
236 2015-04-21  Chris Dumez  <cdumez@apple.com>
237
238         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
239         https://bugs.webkit.org/show_bug.cgi?id=143970
240
241         Reviewed by Darin Adler.
242
243         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
244         constructor explicit as it copies the vector and it is easy to call it
245         by mistake.
246
247         * wtf/RefCountedArray.h:
248         (WTF::RefCountedArray::RefCountedArray):
249         * wtf/Vector.h:
250
251 2015-04-21  Darin Adler  <darin@apple.com>
252
253         Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
254         https://bugs.webkit.org/show_bug.cgi?id=143944
255
256         Reviewed by Andreas Kling.
257
258         * wtf/FilePrintStream.h: Removed unneeded include.
259         * wtf/HashTable.h: Fixed class template name in comment.
260         * wtf/HashTraits.h: Removed unneeded forward declaration.
261         * wtf/ListHashSet.h: Removed unneeded includes.
262         * wtf/ThreadingWin.cpp: Removed unneeded includes.
263         (WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
264         (WTF::createThreadInternal): Changed code to use make_unique and release.
265         * wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.
266
267 2015-04-19  Darin Adler  <darin@apple.com>
268
269         Update RefPtr documentation and deprecation
270         https://bugs.webkit.org/show_bug.cgi?id=143936
271
272         Reviewed by Andreas Kling.
273
274         * WTF.vcxproj/WTF.vcxproj: Removed PassRef.h
275         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
276         * WTF.xcodeproj/project.pbxproj: Ditto.
277         * wtf/CMakeLists.txt: Ditto.
278
279 2015-04-17  Alexey Proskuryakov  <ap@apple.com>
280
281         Use ASan poisoning to taint moved-out-of Refs
282         https://bugs.webkit.org/show_bug.cgi?id=143894
283         rdar://problem/19443723
284
285         Reviewed by Darin Adler.
286
287         * wtf/Ref.h: (WTF::Ref::~Ref):
288
289 2015-04-17  Alexey Proskuryakov  <ap@apple.com>
290
291         Remove unused BoundsCheckedPointer
292         https://bugs.webkit.org/show_bug.cgi?id=143896
293
294         Reviewed by Geoffrey Garen.
295
296         * WTF.vcxproj/WTF.vcxproj:
297         * WTF.vcxproj/WTF.vcxproj.filters:
298         * WTF.xcodeproj/project.pbxproj:
299         * wtf/BoundsCheckedPointer.h: Removed.
300         * wtf/CMakeLists.txt:
301
302 2015-04-16  Yusuke Suzuki  <utatane.tea@gmail.com>
303
304         [ES6] Implement Symbol.for and Symbol.keyFor
305         https://bugs.webkit.org/show_bug.cgi?id=143404
306
307         Reviewed by Geoffrey Garen.
308
309         When we register symbolized StringImpl* into SymbolRegistry, symbolized StringImpl* is aware of that.
310         And when destructing it, it removes its reference from SymbolRegistry as if atomic StringImpl do so with AtomicStringTable.
311         While AtomicStringTable (in WebCore case) exists in thread local storage,
312         SymbolRegistry exists per VM and StringImpl* has a reference to the registered SymbolRegistry.
313
314         Since StringImpl has isSymbol etc. members, it's class is aware of Symbol use cases.
315         So introduce SymbolRegistry in WTF layers as if AtomicStringTable.
316
317         * WTF.vcxproj/WTF.vcxproj:
318         * WTF.vcxproj/WTF.vcxproj.filters:
319         * WTF.xcodeproj/project.pbxproj:
320         * wtf/CMakeLists.txt:
321         * wtf/text/AtomicString.cpp:
322         (WTF::AtomicString::addSlowCase):
323         (WTF::AtomicString::findSlowCase):
324         (WTF::AtomicString::findInternal):
325         (WTF::AtomicString::find): Deleted.
326         * wtf/text/AtomicString.h:
327         (WTF::AtomicString::find):
328         * wtf/text/StringImpl.cpp:
329         (WTF::StringImpl::~StringImpl):
330         (WTF::StringImpl::createSymbol):
331         (WTF::StringImpl::createSymbolEmpty):
332         * wtf/text/StringImpl.h:
333         (WTF::StringImpl::StringImpl):
334         (WTF::StringImpl::extractFoldedStringInSymbol):
335         (WTF::StringImpl::symbolRegistry):
336         (WTF::StringImpl::createSymbolEmpty): Deleted.
337         * wtf/text/SymbolRegistry.cpp: Copied from Source/JavaScriptCore/runtime/SymbolConstructor.h.
338         (WTF::SymbolRegistry::~SymbolRegistry):
339         (WTF::SymbolRegistry::symbolForKey):
340         (WTF::SymbolRegistry::keyForSymbol):
341         (WTF::SymbolRegistry::remove):
342         * wtf/text/SymbolRegistry.h: Added.
343         (WTF::SymbolRegistryKey::hash):
344         (WTF::SymbolRegistryKey::impl):
345         (WTF::SymbolRegistryKey::isHashTableDeletedValue):
346         (WTF::SymbolRegistryKey::hashTableDeletedValue):
347         (WTF::DefaultHash<SymbolRegistryKey>::Hash::hash):
348         (WTF::DefaultHash<SymbolRegistryKey>::Hash::equal):
349         (WTF::HashTraits<SymbolRegistryKey>::isEmptyValue):
350         (WTF::SymbolRegistryKey::SymbolRegistryKey):
351
352 2015-04-16  Antti Koivisto  <antti@apple.com>
353
354         Use CommonCrypto for SHA1 and MD5
355         https://bugs.webkit.org/show_bug.cgi?id=143826
356
357         Reviewed by Anders Carlsson.
358
359         CommonCrypto SHA1 implementation is ~4x faster than the naive WTF one. Use it when available.
360
361         These are covered by existing API tests.
362
363         * wtf/MD5.cpp:
364         (WTF::MD5::MD5):
365         (WTF::MD5::addBytes):
366         (WTF::MD5::checksum):
367         * wtf/MD5.h:
368         * wtf/SHA1.cpp:
369         (WTF::SHA1::SHA1):
370         (WTF::SHA1::addBytes):
371         (WTF::SHA1::computeHash):
372
373             Remove the side effect where computeHash resets the state. No one relies on it.
374
375         (WTF::SHA1::hexDigest):
376         (WTF::SHA1::computeHexDigest):
377         * wtf/SHA1.h:
378
379 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
380
381         Remove the unnecessary WTF_CHANGES define
382         https://bugs.webkit.org/show_bug.cgi?id=143825
383
384         Reviewed by Andreas Kling.
385
386         * config.h:
387
388 2015-04-15  Руслан Ижбулатов  <lrn1986@gmail.com>
389
390         Harmonize binary semaphore ifdefs
391
392         They should be either OS(WINDOWS) (in which case we'd need
393         BinarySemaphoreWin.cpp, which is not shipped by WebKitGTK)
394         or PLATFORM(WIN) (in which case Mutex/ThreadCondition-based
395         implementation is used).
396
397         This fixes errors like:
398           CXX      Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo
399         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In constructor 'WTF::BinarySemaphore::BinarySemaphore()':
400         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:34:7: error: class 'WTF::BinarySemaphore' does not have any field named 'm_isSet'
401              : m_isSet(false)
402                ^
403         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'void WTF::BinarySemaphore::signal()':
404         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:44:24: error: 'm_mutex' was not declared in this scope
405              MutexLocker locker(m_mutex);
406                                 ^
407         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:46:5: error: 'm_isSet' was not declared in this scope
408              m_isSet = true;
409              ^
410         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:47:5: error: 'm_condition' was not declared in this scope
411              m_condition.signal();
412              ^
413         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'bool WTF::BinarySemaphore::wait(double)':
414         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:52:24: error: 'm_mutex' was not declared in this scope
415              MutexLocker locker(m_mutex);
416                                 ^
417         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:55:13: error: 'm_isSet' was not declared in this scope
418              while (!m_isSet) {
419                      ^
420         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:56:21: error: 'm_condition' was not declared in this scope
421                  timedOut = !m_condition.timedWait(m_mutex, absoluteTime);
422                              ^
423         ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:62:5: error: 'm_isSet' was not declared in this scope
424              m_isSet = false;
425              ^
426         GNUmakefile:52762: recipe for target 'Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo' failed
427
428         [W32] Inconsistent ifdefs in BinarySemaphore.h and BinarySemaphore.cpp
429         https://bugs.webkit.org/show_bug.cgi?id=143756
430
431         Reviewed by Darin Adler.
432
433         * wtf/threads/BinarySemaphore.h:
434
435 2015-04-12  Michael Catanzaro  <mcatanzaro@igalia.com>
436
437         Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
438         https://bugs.webkit.org/show_bug.cgi?id=143457
439
440         Reviewed by Benjamin Poulain.
441
442         Tested by WTF.SaturatedArithmeticAddition and WTF.SaturatedArithmeticSubtraction.
443
444         * wtf/SaturatedArithmetic.h:
445         (signedAddOverflows): Use && instead of & to avoid triggering -Wparentheses in newer
446         versions of GCC and Clang, and to improve the clarity of the function.
447         (signedSubtractOverflows): Changed correspondingly, although there was no warning here.
448
449 2015-04-08  Sam Weinig  <sam@webkit.org>
450
451         Allow LaunchServices to handle URLs on link navigations
452         <rdar://problem/19446826>
453         https://bugs.webkit.org/show_bug.cgi?id=143544
454
455         Reviewed by Anders Carlsson.
456
457         * wtf/Platform.h:
458         Add HAVE macro for this functionality.
459
460 2015-04-09  Andy Estes  <aestes@apple.com>
461
462         [Cocoa] Add a HAVE(AVKIT) and use it
463         https://bugs.webkit.org/show_bug.cgi?id=143593
464
465         Reviewed by David Kilzer.
466
467         * wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.
468
469 2015-04-09  Andy Estes  <aestes@apple.com>
470
471         [Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
472         https://bugs.webkit.org/show_bug.cgi?id=143559
473
474         Reviewed by David Kilzer.
475
476         Added PLATFORM(WATCHOS). Used PLATFORM() since Watch OS is just a variant of OS(IOS).
477         Defined HAVE(PARENTAL_CONTROLS) to be true on all Cocoa platforms except Watch OS.
478
479         * wtf/Platform.h:
480
481 2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
482
483         Add CMake build system for WinCairo port.
484         https://bugs.webkit.org/show_bug.cgi?id=115944
485
486         Reviewed by Chris Dumez.
487
488         * wtf/FeatureDefines.h:
489         * wtf/PlatformWin.cmake:
490
491 2015-04-05  Antti Koivisto  <antti@apple.com>
492
493         Bloom filter should support longer hashes
494         https://bugs.webkit.org/show_bug.cgi?id=143419
495
496         Reviewed by Dan Bernstein.
497
498         It currently supports 'unsigned' hash only which is inconvenient and doesn't have enough independent bits for larger filters.
499
500         Support arbitrarily sized hashes of type std::array<uint8_t, hashSize> (like SHA1::Digest and MD5::Digest).
501
502         * wtf/BloomFilter.h:
503         (WTF::BloomFilter<keyBits>::keysFromHash):
504         (WTF::BloomFilter<keyBits>::mayContain):
505         (WTF::BloomFilter<keyBits>::add):
506
507 2015-04-03  Antti Koivisto  <antti@apple.com>
508
509         Add non-counting Bloom filter implementation
510         https://bugs.webkit.org/show_bug.cgi?id=143366
511
512         Reviewed by Sam Weinig.
513
514         Add a traditional single-bit-per-bucket Bloom filter in addition to the existing counting implementation.
515
516         - rename BloomFilter -> CountingBloomFilter.
517         - add a new basic BloomFilter type.
518         - update some terminology to match http://en.wikipedia.org/wiki/Bloom_filter and modernize the code a bit.
519         - add API tests.
520
521         * wtf/BloomFilter.h:
522         (WTF::BloomFilter::BloomFilter):
523         (WTF::BloomFilter::add):
524
525             Also support merging.
526
527         (WTF::BloomFilter::mayContain):
528         (WTF::BloomFilter::arrayIndex):
529         (WTF::BloomFilter::bitMask):
530         (WTF::BloomFilter<keyBits>::mayContain):
531         (WTF::BloomFilter<keyBits>::add):
532         (WTF::BloomFilter<keyBits>::isBitSet):
533         (WTF::BloomFilter<keyBits>::setBit):
534         (WTF::BloomFilter<keyBits>::clear):
535         (WTF::CountingBloomFilter::CountingBloomFilter):
536         (WTF::CountingBloomFilter::mayContain):
537         (WTF::CountingBloomFilter::firstBucket):
538         (WTF::CountingBloomFilter::secondBucket):
539         (WTF::CountingBloomFilter<keyBits>::add):
540         (WTF::CountingBloomFilter<keyBits>::remove):
541         (WTF::CountingBloomFilter<keyBits>::clear):
542         (WTF::CountingBloomFilter<keyBits>::likelyEmpty):
543         (WTF::CountingBloomFilter<keyBits>::isClear):
544         (WTF::BloomFilter::maximumCount): Deleted.
545         (WTF::BloomFilter::firstSlot): Deleted.
546         (WTF::BloomFilter::secondSlot): Deleted.
547         (WTF::BloomFilter<keyBits>::remove): Deleted.
548         (WTF::BloomFilter<keyBits>::likelyEmpty): Deleted.
549         (WTF::BloomFilter<keyBits>::isClear): Deleted.
550
551 015-04-01  Antti Koivisto  <antti@apple.com>
552
553         Value assignment operator of Optional should be stricter
554         https://bugs.webkit.org/show_bug.cgi?id=143303
555
556         Reviewed by Andreas Kling.
557
558         struct Foo { mutable Optional<std::chrono::seconds> s; };
559         Foo foo, foo2;
560         foo = foo2;
561
562         doesn't build because it tries to use wrong operator=.
563
564         * wtf/Optional.h:
565
566             Add enable_if test similar to std::experimental::optional.
567
568 2015-04-01  Alex Christensen  <achristensen@webkit.org>
569
570         Progress towards CMake on Windows and Mac.
571         https://bugs.webkit.org/show_bug.cgi?id=143293
572
573         Reviewed by Filip Pizlo.
574
575         * wtf/CMakeLists.txt:
576         Don't use bmalloc on Windows yet.
577         * wtf/FeatureDefines.h:
578         Temporarily disabled WebGL on Windows CMake builds.
579         * wtf/PlatformMac.cmake:
580         Tell open source builders where to find unicode headers.
581
582 2015-03-31  Alexey Proskuryakov  <ap@apple.com>
583
584         Fix the build after <http://trac.webkit.org/changeset/182205>.
585
586         * wtf/text/StringImpl.h: (WTF::StringImpl::extractFoldedStringInSymbol):
587         A function cannot be both exported and inline.
588
589 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
590
591         Clean up Identifier factories to clarify the meaning of StringImpl*
592         https://bugs.webkit.org/show_bug.cgi?id=143146
593
594         Reviewed by Filip Pizlo.
595
596         Introduce StringKind into `StringImpl`. There's 3 kinds
597         1. StringNormal (non-atomic, non-symbol)
598         2. StringAtomic (atomic, non-symbol)
599         3. StringSymbol (non-atomic, symbol)
600         They are mutually exclusive.
601
602         * wtf/text/AtomicString.cpp:
603         (WTF::AtomicString::addSlowCase):
604         (WTF::AtomicString::findSlowCase):
605         When registering a string into AtomicStringTable,
606         it should not be a symbol string
607         because symbol and atomic types are mutually exclusive.
608         When a symbol string comes, we extract an owner string
609         from a symbol string by using `StringImpl::extractFoldedStringInSymbol()`.
610         It always succeeds because a symbol (non empty) string
611         is always BufferSubstring and has an owner string.
612         Empty symbol string doesn't have an owner string.
613         This case is filtered by `!string.length()` guard.
614         * wtf/text/AtomicString.h:
615         (WTF::AtomicString::add):
616         (WTF::AtomicString::addWithStringTableProvider):
617         * wtf/text/StringImpl.cpp:
618         (WTF::StringImpl::~StringImpl):
619         (WTF::StringImpl::createSymbol):
620         (WTF::StringImpl::createUnique): Deleted.
621         * wtf/text/StringImpl.h:
622         (WTF::StringImpl::StringImpl):
623         (WTF::StringImpl::createSymbolEmpty):
624         (WTF::StringImpl::flagIsAtomic):
625         (WTF::StringImpl::flagIsSymbol):
626         (WTF::StringImpl::maskStringKind):
627         (WTF::StringImpl::stringKind):
628         (WTF::StringImpl::isSymbol):
629         (WTF::StringImpl::isAtomic):
630         (WTF::StringImpl::setIsAtomic):
631         (WTF::StringImpl::extractFoldedStringInSymbol):
632         (WTF::StringImpl::createUniqueEmpty): Deleted.
633         (WTF::StringImpl::flagIsUnique): Deleted.
634         (WTF::StringImpl::isUnique): Deleted.
635         * wtf/text/StringStatics.cpp:
636         (WTF::StringImpl::hashAndFlagsForSymbol):
637         (WTF::StringImpl::hashAndFlagsForUnique): Deleted.
638
639 2015-03-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
640
641         [CMake][EFL] Remove redundant library link and include path
642         https://bugs.webkit.org/show_bug.cgi?id=143221
643
644         Reviewed by Csaba Osztrogonác.
645
646         * wtf/PlatformEfl.cmake: Remove unnecessary library link and include path.
647
648 2015-03-27  Myles C. Maxfield  <mmaxfield@apple.com>
649
650         Support building WTF on Windows without Cygwin
651         https://bugs.webkit.org/show_bug.cgi?id=143084
652
653         Reviewed by Brent Fulgham.
654
655         Windows doesn't have "touch".
656
657         * WTF.vcxproj/WTFGenerated.make:
658
659 2015-03-26  Alex Christensen  <achristensen@webkit.org>
660
661         Progress towards CMake on Mac.
662         https://bugs.webkit.org/show_bug.cgi?id=143112
663
664         Reviewed by Chris Dumez.
665
666         * wtf/PlatformMac.cmake:
667
668 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
669
670         Unreviewed, we have edited this file in 2015.
671
672         * wtf/Platform.h:
673
674 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
675
676         Heap variables shouldn't end up in the stack frame
677         https://bugs.webkit.org/show_bug.cgi?id=141174
678
679         Reviewed by Geoffrey Garen.
680
681         * wtf/FastBitVector.h:
682         (WTF::FastBitVector::resize): Small change: don't resize if you don't have to resize.
683
684 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
685
686         Change Atomic methods from using the_wrong_naming_conventions to using theRightNamingConventions. Also make seq_cst the default.
687
688         Rubber stamped by Geoffrey Garen.
689
690         * wtf/Atomics.h:
691         (WTF::Atomic::load):
692         (WTF::Atomic::store):
693         (WTF::Atomic::compareExchangeWeak):
694         (WTF::Atomic::compareExchangeStrong):
695         (WTF::Atomic::compare_exchange_weak): Deleted.
696         (WTF::Atomic::compare_exchange_strong): Deleted.
697         * wtf/ByteSpinLock.h:
698         (WTF::ByteSpinLock::lock):
699         * wtf/SpinLock.h:
700         (WTF::SpinLockBase::lock):
701
702 2015-03-24  Beth Dakin  <bdakin@apple.com>
703
704         Add events related to force click gesture
705         https://bugs.webkit.org/show_bug.cgi?id=142836
706         -and corresponding-
707         rdar://problem/20210239
708
709         Reviewed by Dean Jackson.
710
711         New enable flag for the events.
712         * wtf/FeatureDefines.h:
713
714 2015-03-23  Filip Pizlo  <fpizlo@apple.com>
715
716         JSC should have a low-cost asynchronous disassembler
717         https://bugs.webkit.org/show_bug.cgi?id=142997
718
719         Reviewed by Mark Lam.
720
721         * wtf/StringPrintStream.h:
722
723 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
724
725         CSS Selectors: fix attribute case-insensitive matching of Contain and List
726         https://bugs.webkit.org/show_bug.cgi?id=142932
727
728         Reviewed by Darin Adler.
729
730         Add some utility functions to the string classes to find substrings
731         using ASCII case-insensitive comparisons.
732
733         * wtf/text/AtomicString.h:
734         (WTF::AtomicString::contains):
735         Add the light version that only lock one register.
736
737         (WTF::AtomicString::containsIgnoringASCIICase):
738         (WTF::AtomicString::findIgnoringASCIICase):
739
740         * wtf/text/StringCommon.h:
741         (WTF::findIgnoringASCIICase):
742         This is the common implementation used by StringView and StringImpl.
743
744         * wtf/text/StringImpl.cpp:
745         (WTF::StringImpl::findIgnoringASCIICase):
746         * wtf/text/StringImpl.h:
747         * wtf/text/StringView.cpp:
748         (WTF::StringView::containsIgnoringASCIICase):
749         (WTF::StringView::findIgnoringASCIICase):
750         * wtf/text/StringView.h:
751         * wtf/text/WTFString.h:
752         (WTF::String::findIgnoringASCIICase):
753         (WTF::String::contains):
754         (WTF::String::containsIgnoringASCIICase):
755
756 2015-03-19  Andreas Kling  <akling@apple.com>
757
758         DFGAllocator should use bmalloc's aligned allocator.
759         <https://webkit.org/b/142871>
760
761         Reviewed by Geoffrey Garen.
762
763         Remove PageAllocationAligned since it has no more clients.
764
765         * WTF.vcxproj/WTF.vcxproj:
766         * WTF.vcxproj/WTF.vcxproj.filters:
767         * WTF.xcodeproj/project.pbxproj:
768         * wtf/CMakeLists.txt:
769         * wtf/PageAllocationAligned.cpp: Removed.
770         * wtf/PageAllocationAligned.h: Removed.
771
772 2015-03-18  Dhi Aurrahman  <diorahman@rockybars.com>
773
774         Fix StringView misplaced implementations after r181525 and r181558
775         https://bugs.webkit.org/show_bug.cgi?id=142772
776
777         Reviewed by Darin Adler.
778
779         Fix misplaced implementations in StringView::startsWithIgnoringASCIICase and 
780         StringView::endsWith. 
781
782         Add some tests in [1] to cover the StringView::startsWith, 
783         StringView::startsWithIgnoringASCIICase, StringView::endsWith and 
784         StringView::endsWithIgnoringASCIICase implementations.
785
786         [1] Tools/TestWebKitAPI/Tests/WTF/StringView.cpp.
787
788         * wtf/text/StringView.cpp:
789         (WTF::StringView::startsWithIgnoringASCIICase):
790         (WTF::StringView::endsWith):
791         (WTF::StringView::endsWithIgnoringASCIICase):
792
793 2015-03-17  Michael Saboff  <msaboff@apple.com>
794
795         Windows X86-64 should use the fixed executable allocator
796         https://bugs.webkit.org/show_bug.cgi?id=142749
797
798         Reviewed by Filip Pizlo.
799
800         Set ENABLE_EXECUTABLE_ALLOCATOR_FIXED for Windows.
801         Needed to export MetaAllocator::currentStatistics() for use in JavaScriptCore.
802
803         * wtf/MetaAllocator.h:
804         * wtf/Platform.h:
805
806 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
807
808         Enable ES6 classes by default
809         https://bugs.webkit.org/show_bug.cgi?id=142774
810
811         Reviewed by Gavin Barraclough.
812
813         * wtf/FeatureDefines.h:
814
815 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
816
817         [ARM] Enable generating idiv instructions if it is supported
818         https://bugs.webkit.org/show_bug.cgi?id=142725
819
820         Reviewed by Michael Saboff.
821
822         * wtf/Platform.h: Set HAVE_ARM_IDIV_INSTRUCTIONS based on GCC macro too.
823
824 2015-03-16  Benjamin Poulain  <benjamin@webkit.org>
825
826         Fix StringView after r181525
827         Unreviewed.
828
829         Fix 2 silly mistakes I made in r181525.
830
831         * wtf/text/StringView.cpp:
832         (WTF::StringView::startsWith):
833         (WTF::StringView::startsWithIgnoringASCIICase):
834         (WTF::StringView::endsWith):
835         (WTF::StringView::endsWithIgnoringASCIICase):
836         The implementation was inside the #ifdef.
837
838         * wtf/text/StringView.h:
839         The symbols were not exported.
840
841 2015-03-16  Max Stepin  <maxstepin@gmail.com>
842
843         Add APNG support
844         https://bugs.webkit.org/show_bug.cgi?id=17022
845
846         Reviewed by Carlos Garcia Campos.
847
848         * wtf/FeatureDefines.h:
849
850 2015-03-15  Benjamin Poulain  <benjamin@webkit.org>
851
852         CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
853         https://bugs.webkit.org/show_bug.cgi?id=142715
854
855         Reviewed by Brent Fulgham.
856
857         Add the necessary infrastructure to test startsWith() and endsWith() with
858         ASCII case-insentive comparisons.
859
860         * wtf/text/AtomicString.h:
861         (WTF::AtomicString::startsWith):
862         (WTF::AtomicString::startsWithIgnoringASCIICase):
863         (WTF::AtomicString::endsWith):
864         (WTF::AtomicString::endsWithIgnoringASCIICase):
865
866         * wtf/text/StringCommon.h:
867         (WTF::loadUnaligned):
868         (WTF::equal):
869         I moved the low level equal() code from StringImpl to StringCommon
870         since it is used by both StringImpl and StringView.
871
872         (WTF::equalCommon):
873         (WTF::equalIgnoringASCIICaseCommon):
874         Ideally we should drop the "Common" part of the name but StringView
875         wants this inline for some reason. I prefered keeping the current behavior
876         since I don't know how StringView's matching performance was evaluated.
877
878         (WTF::startsWith):
879         (WTF::startsWithIgnoringASCIICase):
880         (WTF::endsWith):
881         (WTF::endsWithIgnoringASCIICase):
882         Make all that code shared between StringView and Stringimpl.
883
884         * wtf/text/StringImpl.cpp:
885         (WTF::StringImpl::startsWith):
886         (WTF::StringImpl::startsWithIgnoringASCIICase):
887         (WTF::StringImpl::endsWith):
888         (WTF::StringImpl::endsWithIgnoringASCIICase):
889         (WTF::equal):
890         (WTF::stringImplContentEqual): Deleted.
891         * wtf/text/StringImpl.h:
892         (WTF::loadUnaligned): Deleted.
893         (WTF::equal): Deleted.
894
895         * wtf/text/StringView.cpp:
896         (WTF::StringView::startsWith):
897         (WTF::StringView::startsWithIgnoringASCIICase):
898         (WTF::StringView::endsWith):
899         (WTF::StringView::endsWithIgnoringASCIICase):
900         * wtf/text/StringView.h:
901         Since those are new, we can safely make them out-of-line and
902         evaluate the inlining impact as needed.
903
904         * wtf/text/WTFString.h:
905         (WTF::String::startsWithIgnoringASCIICase):
906         (WTF::String::endsWith):
907         (WTF::String::endsWithIgnoringASCIICase):
908
909 2015-03-15  Benjamin Poulain  <bpoulain@apple.com>
910
911         Change the exact attribute matching to be ASCII case-insensitive
912         https://bugs.webkit.org/show_bug.cgi?id=142609
913
914         Reviewed by Darin Adler.
915
916         Add support for ASCII case insensitive comparisons to all the string
917         classes.
918
919         The new file StringCommon.h has the common algorithm to avoid repeating
920         the same code with different types.
921
922         * WTF.vcxproj/WTF.vcxproj:
923         * WTF.vcxproj/WTF.vcxproj.filters:
924         * wtf/ASCIICType.h:
925         (WTF::toASCIILower):
926         * wtf/CMakeLists.txt:
927         * wtf/text/AtomicString.h:
928         (WTF::equalIgnoringASCIICase):
929         * wtf/text/StringCommon.h: Added.
930         (WTF::equalIgnoringASCIICase):
931         (WTF::equalIgnoringASCIICaseCommon):
932         * wtf/text/StringImpl.cpp:
933         (WTF::equalIgnoringASCIICase):
934         (WTF::equalIgnoringASCIICaseNonNull):
935         (WTF::StringImpl::utf8Impl):
936         (WTF::StringImpl::defaultWritingDirection): Deleted.
937         (WTF::StringImpl::adopt): Deleted.
938         (WTF::StringImpl::sizeInBytes): Deleted.
939         (WTF::putUTF8Triple): Deleted.
940         (WTF::StringImpl::utf8): Deleted.
941         * wtf/text/StringImpl.h:
942         (WTF::StringImpl::isSubString): Deleted.
943         (WTF::find): Deleted.
944
945 2015-03-14  Michael Saboff  <msaboff@apple.com>
946
947         Disable Yarr JIT for ARMv7k
948         https://bugs.webkit.org/show_bug.cgi?id=142645
949
950         Rubber stamped by Geoffrey Garen.
951
952         Changed the setting of ENABLE_YARR_JIT to be predicated on ENABLED_JIT.
953
954         * wtf/Platform.h:
955
956 2015-03-14  Michael Saboff  <msaboff@apple.com>
957
958         ES6: Add binary and octal literal support
959         https://bugs.webkit.org/show_bug.cgi?id=142681
960
961         Reviewed by Ryosuke Niwa.
962
963         * wtf/ASCIICType.h:
964         (WTF::isASCIIBinaryDigit): New support function.
965         (WTF::isASCIIOctalDigit): Updated to use logical and (&&) instead of binary and (&).
966
967 2015-03-13  Mark Lam  <mark.lam@apple.com>
968
969         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
970         <https://webkit.org/b/142674>
971
972         Reviewed by Filip Pizlo.
973
974         We no longer use TCMalloc in our code, and we now have C++11.  This replaces the
975         TCMalloc_SpinLock with a new WTF::SpinLock based on WTF::Atomic (which is a
976         wrapper around std::atomic).
977
978         Note that there is a StaticSpinLock and a SpinLock:
979
980         1. StaticSpinLock is an alias for SpinLockBase, and its initialization relies on
981            static / global std:atomic being automatically initialized to 0 at compile time.
982            Hence, StaticSpinLock should only be used for statics / globals (including
983            static members of classes / structs).
984
985         2. SpinLock is derived from SpinLockBase, and adds a default constructor to
986            initialize its internal atomic value to 0.  Because SpinLock has a constructor,
987            it cannot be used for statics / globals.  Objects that want to embed a spin
988            lock as an instance field should use SpinLock so that it is initialized properly.
989            std::atomic will not automatically initialize instance fields to 0.  Hence,
990            StaticSpinLock will not work correctly as instance fields of a class / struct.
991
992         * WTF.vcxproj/WTF.vcxproj:
993         * WTF.vcxproj/WTF.vcxproj.filters:
994         * WTF.xcodeproj/project.pbxproj:
995         * wtf/CMakeLists.txt:
996         * wtf/MetaAllocator.cpp:
997         (WTF::MetaAllocator::~MetaAllocator):
998         (WTF::MetaAllocator::MetaAllocator):
999         * wtf/MetaAllocator.h:
1000         * wtf/SpinLock.h: Added.
1001         (WTF::SpinLockBase::lock):
1002         (WTF::SpinLockBase::unlock):
1003         (WTF::SpinLockBase::isLocked):
1004         (WTF::SpinLockBase::slowLock):
1005         (WTF::SpinLock::SpinLock):
1006         * wtf/TCSpinLock.h: Removed.
1007         * wtf/text/AtomicString.cpp:
1008
1009 2015-03-13  Mark Lam  <mark.lam@apple.com>
1010
1011         Introduce WTF::Atomic to wrap std::atomic for a friendlier CAS.
1012         <https://webkit.org/b/142661>
1013
1014         Reviewed by Filip Pizlo.
1015
1016         The CAS functions provided by std::atomic takes a reference to the expected
1017         value and modifies it if the CAS fails.  However, in a lot of our CAS usage,
1018         we don't want the expected value to change.  The solution to this is to
1019         provide a WTF::Atomic struct that wraps std::atomic, and provide CAS
1020         methods that won't alter the expected value if the CAS fails.
1021
1022         The method names in WTF::Atomic are chosen to be identical to those
1023         in std::atomic so that WTF::Atomic can be a simple drop in replacement
1024         for std::atomic.
1025
1026         Also changed ByteSpinLock to use WTF::Atomic instead of std::atomic.
1027
1028         * wtf/Atomics.h:
1029         (WTF::Atomic::load):
1030         (WTF::Atomic::store):
1031         (WTF::Atomic::compare_exchange_weak):
1032         (WTF::Atomic::compare_exchange_strong):
1033         * wtf/ByteSpinLock.h:
1034         (WTF::ByteSpinLock::ByteSpinLock):
1035         (WTF::ByteSpinLock::lock):
1036
1037 2015-03-12  Filip Pizlo  <fpizlo@apple.com>
1038
1039         Bytecode liveness analysis should have more lambdas and fewer sets
1040         https://bugs.webkit.org/show_bug.cgi?id=142647
1041
1042         Reviewed by Mark Lam.
1043         
1044         Add a method for iterating each set bit in a FastBitVector. Uses a functor as a callback since
1045         this allows for a more efficient algorithm.
1046
1047         * wtf/FastBitVector.h:
1048         (WTF::FastBitVector::forEachSetBit):
1049
1050 2015-03-12  Michael Saboff  <msaboff@apple.com>
1051
1052         Disable Yarr JIT for ARMv7k
1053         https://bugs.webkit.org/show_bug.cgi?id=142645
1054
1055         Reviewed by Oliver Hunt.
1056
1057         Make the setting of ENABLE_YARR_JIT match ENABLE_JIT for ARMv7k.
1058
1059         * wtf/Platform.h:
1060
1061 2015-03-12  Mark Lam  <mark.lam@apple.com>
1062
1063         Change WTF::ByteSpinLock to use std::atomic.
1064         <https://webkit.org/b/142644>
1065
1066         Reviewed by Filip Pizlo.
1067
1068         * wtf/ByteSpinLock.h:
1069         (WTF::ByteSpinLock::ByteSpinLock):
1070         (WTF::ByteSpinLock::lock):
1071         (WTF::ByteSpinLock::unlock):
1072         (WTF::ByteSpinLock::isHeld):
1073
1074 2015-03-12  Csaba Osztrogonác  <ossy@webkit.org>
1075
1076         [ARM][Linux] GC sometimes stuck in an infinite loop if parallel GC is enabled
1077         https://bugs.webkit.org/show_bug.cgi?id=141290
1078
1079         Reviewed by Carlos Garcia Campos.
1080
1081         * wtf/Platform.h: Enable parallel GC after r181319.
1082
1083 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
1084
1085         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
1086         https://bugs.webkit.org/show_bug.cgi?id=142569
1087
1088         Reviewed by David Hyatt.
1089
1090         Provide a callback to Optional::valueOrCompute() which is evaluated only if necessary.
1091
1092         * wtf/Optional.h:
1093         (WTF::Optional::valueOrCompute):
1094
1095 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
1096
1097         [Win] 17 different JSC tests started to fail in DST
1098         https://bugs.webkit.org/show_bug.cgi?id=142531
1099
1100         Reviewed by Chris Dumez.
1101
1102         The stock 'GetTimeZoneInformation' call does not always match the actual Daylight
1103         Savings calendar. This results in a period of time when these tests fail.
1104
1105         If available, we should take advantage of the new 'GetTimeZoneInformationForYear',
1106         which accesses a dynamic calendar of DST dates, which is presumbably updated by
1107         Microsoft from year-to-year.
1108
1109         * wtf/DateMath.cpp:
1110         (WTF::timeZoneInformationForYearFunction): New function to conditionally access
1111         some Vista (and newer) functionality.
1112         (WTF::calculateUTCOffset): Call new function (if available) to calculate proper UTC
1113         time offset.
1114
1115 2015-03-10  Alex Christensen  <achristensen@webkit.org>
1116
1117         Use unsigned for HashSet size.
1118         https://bugs.webkit.org/show_bug.cgi?id=142518
1119
1120         Reviewed by Benjamin Poulain.
1121
1122         * wtf/HashCountedSet.h:
1123         (WTF::Traits>::size):
1124         (WTF::Traits>::capacity):
1125         * wtf/HashMap.h:
1126         (WTF::X>::size):
1127         (WTF::X>::capacity):
1128         * wtf/HashSet.h:
1129         (WTF::V>::size):
1130         (WTF::V>::capacity):
1131         * wtf/HashTable.h:
1132         (WTF::HashTable::Stats::recordCollisionAtCount):
1133         (WTF::HashTable::Stats::dumpStats):
1134         (WTF::HashTable::size):
1135         (WTF::HashTable::capacity):
1136         (WTF::KeyTraits>::deallocateTable):
1137         (WTF::KeyTraits>::checkTableConsistencyExceptSize):
1138         * wtf/HashTraits.h:
1139         * wtf/ListHashSet.h:
1140         (WTF::U>::size):
1141         (WTF::U>::capacity):
1142
1143 2015-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
1144
1145         Remove PassRefPtr from svg/properties classes.
1146         https://bugs.webkit.org/show_bug.cgi?id=142063.
1147
1148         Reviewed by Darin Adler.
1149
1150         * wtf/Ref.h:
1151         (WTF::static_reference_cast): Add a stat_cast function to Ref<>.
1152
1153 2015-03-10  Mark Lam  <mark.lam@apple.com>
1154
1155         [Win] JSC Build Warnings Need to be Resolved.
1156         <https://webkit.org/b/142366>
1157
1158         Reviewed by Brent Fulgham.
1159
1160         * wtf/Compiler.h:
1161         - MSVC also does not have the CONSIDERS_UNREACHABLE_CODE quirk.
1162
1163 2015-03-10  Geoffrey Garen  <ggaren@apple.com>
1164
1165         bmalloc: tryFastMalloc shouldn't crash
1166         https://bugs.webkit.org/show_bug.cgi?id=142443
1167
1168         Reviewed by Sam Weinig.
1169
1170         Rolling back in r181307 with a check for whether bmalloc is enabled, to
1171         avoid crashes when running with ASan and GuardMalloc.
1172
1173         * wtf/FastMalloc.cpp:
1174         (WTF::fastMalloc):
1175         (WTF::fastRealloc):
1176         (WTF::fastAlignedMalloc):
1177         (WTF::tryFastMalloc):
1178         (WTF::tryFastRealloc): Deleted.
1179         * wtf/FastMalloc.h:
1180
1181 2015-03-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1182
1183         GCC: CRASH() should be annotated with NORETURN
1184         https://bugs.webkit.org/show_bug.cgi?id=142524
1185
1186         Reviewed by Anders Carlsson.
1187
1188         Add COMPILER(GCC) to #ifdefs that already exist for Clang.
1189
1190         * wtf/Assertions.cpp:
1191         * wtf/Assertions.h:
1192
1193 2015-03-09  Commit Queue  <commit-queue@webkit.org>
1194
1195         Unreviewed, rolling out r181307.
1196         https://bugs.webkit.org/show_bug.cgi?id=142525
1197
1198         Broke ASan tests (Requested by ap on #webkit).
1199
1200         Reverted changeset:
1201
1202         "bmalloc: tryFastMalloc shouldn't crash"
1203         https://bugs.webkit.org/show_bug.cgi?id=142443
1204         http://trac.webkit.org/changeset/181307
1205
1206 2015-03-09  Geoffrey Garen  <ggaren@apple.com>
1207
1208         bmalloc: tryFastMalloc shouldn't crash
1209         https://bugs.webkit.org/show_bug.cgi?id=142443
1210
1211         Reviewed by Darin Adler.
1212
1213         * wtf/FastMalloc.cpp:
1214         (WTF::fastMalloc):
1215         (WTF::fastRealloc):
1216         (WTF::fastAlignedMalloc): Don't check for null. bmalloc automatically
1217         crashes on allocation failure, and we'd rather not pay for an extra check.
1218
1219         (WTF::tryFastMalloc): Added an opt-out API to return null rather than
1220         crashing, since some clients need this.
1221
1222         (WTF::tryFastRealloc): Deleted. Unused.
1223
1224         * wtf/FastMalloc.h:
1225
1226 2015-03-09  Mark Lam  <mark.lam@apple.com>
1227
1228         8-bit version of weakCompareAndSwap() can cause an infinite loop.
1229         https://webkit.org/b/142513>
1230
1231         Reviewed by Filip Pizlo.
1232
1233         Presently, Bitmap::concurrentTestAndSet() uses the 8-bit version of
1234         weakCompareAndSwap() (which compares and swaps an uint8_t value).
1235         Bitmap::concurrentTestAndSet() has a loop that checks if a bit in the
1236         byte of interest has been set.  If not, it will call the 8-bit CAS
1237         function to set the bit.
1238
1239         Under the covers, for ARM, the 8-bit CAS function actually works with a
1240         32-bit CAS.  The 8-bit CAS will first fetch the 32-bit value in memory
1241         that should contain the 8-bit value, and check if it contains the
1242         expected byte.  If the value in memory doesn't have the expected byte,
1243         it will return early to its caller.  The expectation is that the caller
1244         will reload the byte from memory and call the 8-bit CAS again.
1245
1246         Unfortunately, this code path that returns early does not have a
1247         compiler fence.  Without a compiler fence, the C++ compiler can
1248         optimize away the reloading of the expected byte value, leaving it
1249         unchanged.  As a result, we'll have a infinite loop here that checks a
1250         value that will never change, and the loop will not terminate until the
1251         value changes.
1252
1253         The fix is to eliminate the early return check in the 8-bit CAS, and
1254         have it always call down to the 32-bit CAS.  The 32-bit CAS has a
1255         compiler fence which will prevent this issue.
1256
1257         * wtf/Atomics.h:
1258         (WTF::weakCompareAndSwap):
1259
1260 2015-03-09  Martin Robinson  <mrobinson@igalia.com>
1261
1262         [EFL] Move DispatchQueue to WTF
1263         https://bugs.webkit.org/show_bug.cgi?id=142493
1264
1265         Reviewed by Csaba Osztrogonác.
1266
1267         * wtf/PlatformEfl.cmake: Add DispatchQueue to the source list.
1268         * wtf/efl/DispatchQueueEfl.cpp: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.cpp.
1269         * wtf/efl/DispatchQueueEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.h.
1270         * wtf/efl/DispatchQueueWorkItemEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h.
1271
1272 2015-03-08  Brent Fulgham  <bfulgham@apple.com>
1273
1274         [Win] WTF::WorkQueue does not balance ref/deref properly
1275         https://bugs.webkit.org/show_bug.cgi?id=142471
1276
1277         Reviewed by Antti Koivisto.
1278
1279         Make sure we deref the count when we execute a function in the
1280         WorkQueue.
1281
1282         * wtf/win/WorkQueueWin.cpp:
1283         (WTF::WorkQueue::performWorkOnRegisteredWorkThread):
1284
1285 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
1286
1287         [Win] Revive WTF::WorkQueue on Windows
1288         https://bugs.webkit.org/show_bug.cgi?id=142432
1289
1290         Reviewed by Darin Adler.
1291
1292         Revive the Windows implementation of WTF::WorkQueue.
1293
1294         * WTF.vcxproj/WTF.vcxproj:
1295         * WTF.vcxproj/WTF.vcxproj.filters:
1296         * wtf/WorkQueue.h:
1297         * wtf/win/WorkItemWin.cpp: Added.
1298         * wtf/win/WorkItemWin.h: Added.
1299         * wtf/win/WorkQueueWin.cpp: Added.
1300
1301 2015-03-06  Geoffrey Garen  <ggaren@apple.com>
1302
1303         Fix crashes seen on the the Windows buildbots after my last patch.
1304
1305         Unreviewed.
1306
1307         * wtf/FastMalloc.cpp:
1308         (WTF::fastAlignedMalloc): Let's pass these arguments in the right order.
1309
1310 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
1311
1312         Crash in -[WebCascadeList objectAtIndex:] + 195
1313         https://bugs.webkit.org/show_bug.cgi?id=141274
1314
1315         Reviewed by David Kilzer.
1316
1317         * wtf/WeakPtr.h:
1318         (WTF::WeakPtrFactory::createWeakPtr): WebCascadeList uses a const FontCascade,
1319         and it calls createWeakPtr() on it. Therefore, createWeakPtr has to be marked
1320         const.
1321         (WTF::WeakPtrFactory::operator=): Removed because it was broken and had no
1322         callers
1323
1324 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
1325
1326         Allow tree dumping functions to be used in release builds by switching a flag
1327         https://bugs.webkit.org/show_bug.cgi?id=142379
1328
1329         Reviewed by Zalan Bujtas.
1330
1331         There are various tree dumping functions that are useful for debugging, and sometimes
1332         you want to be able to use them in release builds. Currently they are surrounded by
1333         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
1334         in wtf/Platform.h
1335
1336         * wtf/Platform.h:
1337
1338 2015-03-05  Chris Dumez  <cdumez@apple.com>
1339
1340         Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
1341         https://bugs.webkit.org/show_bug.cgi?id=142350
1342
1343         Reviewed by Michael Saboff and Benjamin Poulain.
1344
1345         Fix ASSERTION FAILED: !is8Bit() in StringImpl::characters16() from
1346         WTF::equalInner() after r173761. The code was incorrectly assuming that
1347         if stringImpl is 16-bit, then matchString is 16-bit too, which is not
1348         correct.
1349
1350         Also rename WTFString::startsWith() / endsWith() taking an offset to
1351         hasInfixStartingAt() / hasInfixEndingAt() for clarity. It seems odd
1352         to call it startsWith even though it won't technically *start* with
1353         the pattern if the input offset is greater than zero.
1354
1355         Also drop the caseSensitive argument as it is never used (always true
1356         at call sites.
1357
1358         * wtf/text/StringImpl.cpp:
1359         (WTF::equalInner):
1360         (WTF::StringImpl::hasInfixStartingAt):
1361         (WTF::StringImpl::hasInfixEndingAt):
1362         (WTF::StringImpl::startsWith): Deleted.
1363         (WTF::StringImpl::endsWith): Deleted.
1364         * wtf/text/StringImpl.h:
1365         * wtf/text/WTFString.h:
1366         (WTF::String::hasInfixStartingAt):
1367         (WTF::String::hasInfixEndingAt):
1368         (WTF::String::startsWith): Deleted.
1369         (WTF::String::endsWith): Deleted.
1370
1371 2015-03-05  Chris Dumez  <cdumez@apple.com>
1372
1373         NetworkCache efficacy logging is using too much CPU
1374         https://bugs.webkit.org/show_bug.cgi?id=142186
1375         <rdar://problem/19632080>
1376
1377         Reviewed by Antti Koivisto.
1378
1379         * wtf/HashMap.h:
1380         (WTF::copyToVector):
1381         Add copyToVector() utility function for HashMap that uses an std::pair<key, value>
1382         as element type.
1383
1384         * wtf/text/WTFString.h:
1385         (WTF::StringCapture::StringCapture):
1386         (WTF::StringCapture::operator=):
1387         Add default constructor and assignment operator to StringCapture so that
1388         it can be used in a Vector.
1389
1390 2015-03-05  Antti Koivisto  <antti@apple.com>
1391
1392         Support WorkQueue QOS classes on Mavericks
1393         https://bugs.webkit.org/show_bug.cgi?id=142328
1394
1395         Reviewed by Anders Carlsson.
1396
1397         "The priority of a dispatch queue is inherited from its target queue.  In order to
1398         change the priority of a queue created with dispatch_queue_create(), use the
1399         dispatch_get_global_queue() function to obtain a target queue of the desired prior-
1400         ity."
1401
1402         * wtf/cocoa/WorkQueueCocoa.cpp:
1403         (WTF::targetQueueForQOSClass):
1404         (WTF::WorkQueue::platformInitialize):
1405
1406 2015-03-03  Anders Carlsson  <andersca@apple.com>
1407
1408         Remove unused compression code
1409         https://bugs.webkit.org/show_bug.cgi?id=142237
1410
1411         Reviewed by Geoffrey Garen.
1412
1413         * WTF.vcxproj/WTF.vcxproj:
1414         * WTF.vcxproj/WTF.vcxproj.filters:
1415         * WTF.xcodeproj/project.pbxproj:
1416         * wtf/CMakeLists.txt:
1417         * wtf/Compression.cpp: Removed.
1418         * wtf/Compression.h: Removed.
1419
1420 2015-03-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1421
1422         [WK2] Remove unnecessary create() factory functions.
1423         https://bugs.webkit.org/show_bug.cgi?id=142161
1424
1425         Reviewed by Chris Dumez.
1426
1427         We can replace some create() factory functions with std::make_unique(). Because
1428         it just returns new instance. Even some of those functions have used std::unique_ptr<>
1429         instead of std::make_unique<>. Fixed all.
1430
1431         * wtf/efl/WorkQueueEfl.cpp:
1432         (WorkQueue::dispatch):
1433
1434 2015-03-02  Filip Pizlo  <fpizlo@apple.com>
1435
1436         DFG compile time measurements should really report milliseconds
1437         https://bugs.webkit.org/show_bug.cgi?id=142209
1438
1439         Reviewed by Benjamin Poulain.
1440         
1441         This bug was introduced because currentTimeMS() calls were converted to
1442         monotonicallyIncreasingTime() calls. Perhaps this bug would be less likely if there was a
1443         monotonicallyIncreasingTimeMS() function available, so this patch adds it.
1444
1445         * wtf/CurrentTime.h:
1446         (WTF::monotonicallyIncreasingTimeMS):
1447
1448 2015-02-27  Darin Adler  <darin@apple.com>
1449
1450         Remove unused PossiblyNull
1451         https://bugs.webkit.org/show_bug.cgi?id=142124
1452
1453         Reviewed by Andreas Kling.
1454
1455         * WTF.vcxproj/WTF.vcxproj: Removed the file.
1456         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1457         * WTF.xcodeproj/project.pbxproj: Ditto.
1458         * wtf/CMakeLists.txt: Ditto.
1459         * wtf/PossiblyNull.h: Removed.
1460
1461         * wtf/FastMalloc.h: Moved everything to the left.
1462         Moved member functions out of the TryMallocReturnValue class definition.
1463         (WTF::TryMallocReturnValue::operator PossiblyNull<T>): Deleted.
1464         (WTF::TryMallocReturnValue::getValue): Marked inline, changed to work
1465         only with pointer types, not arbitrary non-pointer types.
1466
1467 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1468
1469         [Win] Make build logs more legible by reducing noise
1470         https://bugs.webkit.org/show_bug.cgi?id=142034
1471
1472         Reviewed by Alexey Proskuryakov.
1473
1474         Modify batch files, makefiles, and DOS commands to remove
1475         uninteresting/unhelpful output.
1476
1477         * WTF.vcxproj/WTFGenerated.make:
1478         * WTF.vcxproj/WTFPreBuild.cmd:
1479         * WTF.vcxproj/copy-files.cmd:
1480
1481 2015-02-26  Landry Breuil  <landry@openbsd.org>
1482
1483         Revert bug 19975, now that gcc 4.7 is required.
1484         https://bugs.webkit.org/show_bug.cgi?id=129927
1485
1486         Reviewed by Andreas Kling.
1487
1488         isfinite() and signbit() are provided by gcc's cmath header.
1489
1490         * wtf/MathExtras.h:
1491
1492 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
1493
1494         UNREACHABLE_FOR_PLATFORM() should be release assert
1495         https://bugs.webkit.org/show_bug.cgi?id=141904
1496
1497         Reviewed by Darin Adler.
1498
1499         * wtf/Assertions.h:
1500         (UNREACHABLE_FOR_PLATFORM):
1501
1502 2015-02-25  Filip Pizlo  <fpizlo@apple.com>
1503
1504         Enable concurrent JIT on GTK
1505         https://bugs.webkit.org/show_bug.cgi?id=142007
1506
1507         Reviewed by Benjamin Poulain.
1508
1509         Seems weird that GTK keeps it off. No good reason for that as far as I can tell.
1510
1511         * wtf/Platform.h:
1512
1513 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
1514
1515         WTF::WeakPtr should rename 'forgot' to 'clear' and support nullptr assignment
1516         https://bugs.webkit.org/show_bug.cgi?id=141935
1517
1518         Reviewed by Myles C. Maxfield.
1519
1520         * wtf/WeakPtr.h:
1521         (WTF::WeakPtr::operator=): Added 'nullptr_t' overload.
1522         (WTF::WeakPtr::clear): Renamed from 'forget'
1523         (WTF::WeakPtr::forget): Deleted.
1524
1525 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
1526
1527         WTF::WeakPtr should have a 'forget' method
1528         https://bugs.webkit.org/show_bug.cgi?id=141923
1529
1530         Reviewed by Myles C. Maxfield.
1531
1532         * wtf/WeakPtr.h:
1533         (WTF::WeakPtr::forget): Added.
1534
1535 2015-02-20  Geoffrey Garen  <ggaren@apple.com>
1536
1537         Remove TCMalloc
1538         https://bugs.webkit.org/show_bug.cgi?id=141844
1539
1540         Reviewed by Andreas Kling.
1541
1542         It's unused.
1543
1544         * WTF.vcxproj/WTF.vcxproj:
1545         * WTF.vcxproj/WTF.vcxproj.filters:
1546         * WTF.xcodeproj/project.pbxproj:
1547         * wtf/CMakeLists.txt:
1548         * wtf/FastMalloc.cpp:
1549         (WTF::EntropySource<4>::value): Deleted.
1550         (WTF::EntropySource<8>::value): Deleted.
1551         (WTF::internalEntropyValue): Deleted.
1552         (WTF::freedObjectStartPoison): Deleted.
1553         (WTF::freedObjectEndPoison): Deleted.
1554         (WTF::ClassIndex): Deleted.
1555         (WTF::HardenedSLL::create): Deleted.
1556         (WTF::HardenedSLL::null): Deleted.
1557         (WTF::HardenedSLL::setValue): Deleted.
1558         (WTF::HardenedSLL::value): Deleted.
1559         (WTF::HardenedSLL::operator!): Deleted.
1560         (WTF::HardenedSLL::operator UnspecifiedBoolType): Deleted.
1561         (WTF::HardenedSLL::operator!=): Deleted.
1562         (WTF::HardenedSLL::operator==): Deleted.
1563         (WTF::LgFloor): Deleted.
1564         (WTF::SLL_Next): Deleted.
1565         (WTF::SLL_SetNext): Deleted.
1566         (WTF::SLL_Push): Deleted.
1567         (WTF::SLL_Pop): Deleted.
1568         (WTF::SLL_PopRange): Deleted.
1569         (WTF::SLL_PushRange): Deleted.
1570         (WTF::SizeClass): Deleted.
1571         (WTF::ByteSizeForClass): Deleted.
1572         (WTF::NumMoveSize): Deleted.
1573         (WTF::InitSizeClasses): Deleted.
1574         (WTF::MetaDataAlloc): Deleted.
1575         (WTF::PageHeapAllocator::Init): Deleted.
1576         (WTF::PageHeapAllocator::New): Deleted.
1577         (WTF::PageHeapAllocator::Delete): Deleted.
1578         (WTF::PageHeapAllocator::inuse): Deleted.
1579         (WTF::pages): Deleted.
1580         (WTF::AllocationSize): Deleted.
1581         (WTF::spanInitializerCookie): Deleted.
1582         (WTF::Span::next): Deleted.
1583         (WTF::Span::remoteNext): Deleted.
1584         (WTF::Span::prev): Deleted.
1585         (WTF::Span::setNext): Deleted.
1586         (WTF::Span::setPrev): Deleted.
1587         (WTF::Span::initCookie): Deleted.
1588         (WTF::Span::clearCookie): Deleted.
1589         (WTF::Span::isValid): Deleted.
1590         (WTF::Event): Deleted.
1591         (WTF::NewSpan): Deleted.
1592         (WTF::DeleteSpan): Deleted.
1593         (WTF::DLL_Init): Deleted.
1594         (WTF::DLL_Remove): Deleted.
1595         (WTF::DLL_IsEmpty): Deleted.
1596         (WTF::DLL_Length): Deleted.
1597         (WTF::DLL_Print): Deleted.
1598         (WTF::DLL_Prepend): Deleted.
1599         (WTF::TCMalloc_Central_FreeList::length): Deleted.
1600         (WTF::TCMalloc_Central_FreeList::tc_length): Deleted.
1601         (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Deleted.
1602         (WTF::TCMalloc_Central_FreeList::entropy): Deleted.
1603         (WTF::FastMallocZone::goodSize): Deleted.
1604         (WTF::FastMallocZone::check): Deleted.
1605         (WTF::FastMallocZone::print): Deleted.
1606         (WTF::FastMallocZone::log): Deleted.
1607         (WTF::FastMallocZone::forceLock): Deleted.
1608         (WTF::FastMallocZone::forceUnlock): Deleted.
1609         (WTF::FastMallocZone::statistics): Deleted.
1610         (WTF::FastMallocZone::zoneValloc): Deleted.
1611         (WTF::FastMallocZone::zoneDestroy): Deleted.
1612         (WTF::MallocHook::record): Deleted.
1613         (WTF::MallocHook::recordAllocation): Deleted.
1614         (WTF::MallocHook::recordDeallocation): Deleted.
1615         (WTF::MallocHook::init): Deleted.
1616         (WTF::MallocHook::InvokeNewHook): Deleted.
1617         (WTF::MallocHook::InvokeDeleteHook): Deleted.
1618         (WTF::KernelSupportsTLS): Deleted.
1619         (WTF::CheckIfKernelSupportsTLS): Deleted.
1620         (WTF::TCMalloc_PageHeap::GetDescriptor): Deleted.
1621         (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe): Deleted.
1622         (WTF::TCMalloc_PageHeap::SystemBytes): Deleted.
1623         (WTF::TCMalloc_PageHeap::FreeBytes): Deleted.
1624         (WTF::TCMalloc_PageHeap::GetSizeClassIfCached): Deleted.
1625         (WTF::TCMalloc_PageHeap::CacheSizeClass): Deleted.
1626         (WTF::TCMalloc_PageHeap::RecordSpan): Deleted.
1627         (WTF::TCMalloc_PageHeap::init): Deleted.
1628         (WTF::TCMalloc_PageHeap::initializeScavenger): Deleted.
1629         (WTF::TCMalloc_PageHeap::isScavengerSuspended): Deleted.
1630         (WTF::TCMalloc_PageHeap::scheduleScavenger): Deleted.
1631         (WTF::TCMalloc_PageHeap::rescheduleScavenger): Deleted.
1632         (WTF::TCMalloc_PageHeap::suspendScavenger): Deleted.
1633         (WTF::TCMalloc_PageHeap::scavengerTimerFired): Deleted.
1634         (WTF::TCMalloc_PageHeap::runScavengerThread): Deleted.
1635         (WTF::TCMalloc_PageHeap::signalScavenger): Deleted.
1636         (WTF::TCMalloc_PageHeap::scavenge): Deleted.
1637         (WTF::TCMalloc_PageHeap::shouldScavenge): Deleted.
1638         (WTF::TCMalloc_PageHeap::New): Deleted.
1639         (WTF::TCMalloc_PageHeap::AllocLarge): Deleted.
1640         (WTF::TCMalloc_PageHeap::Split): Deleted.
1641         (WTF::TCMalloc_PageHeap::Carve): Deleted.
1642         (WTF::mergeDecommittedStates): Deleted.
1643         (WTF::TCMalloc_PageHeap::Delete): Deleted.
1644         (WTF::TCMalloc_PageHeap::IncrementalScavenge): Deleted.
1645         (WTF::TCMalloc_PageHeap::RegisterSizeClass): Deleted.
1646         (WTF::TCMalloc_PageHeap::ReturnedBytes): Deleted.
1647         (WTF::PagesToMB): Deleted.
1648         (WTF::TCMalloc_PageHeap::Dump): Deleted.
1649         (WTF::TCMalloc_PageHeap::GrowHeap): Deleted.
1650         (WTF::TCMalloc_PageHeap::Check): Deleted.
1651         (WTF::TCMalloc_PageHeap::CheckList): Deleted.
1652         (WTF::TCMalloc_PageHeap::ReleaseFreeList): Deleted.
1653         (WTF::TCMalloc_PageHeap::ReleaseFreePages): Deleted.
1654         (WTF::TCMalloc_ThreadCache_FreeList::Init): Deleted.
1655         (WTF::TCMalloc_ThreadCache_FreeList::length): Deleted.
1656         (WTF::TCMalloc_ThreadCache_FreeList::empty): Deleted.
1657         (WTF::TCMalloc_ThreadCache_FreeList::lowwatermark): Deleted.
1658         (WTF::TCMalloc_ThreadCache_FreeList::clear_lowwatermark): Deleted.
1659         (WTF::TCMalloc_ThreadCache_FreeList::Push): Deleted.
1660         (WTF::TCMalloc_ThreadCache_FreeList::PushRange): Deleted.
1661         (WTF::TCMalloc_ThreadCache_FreeList::PopRange): Deleted.
1662         (WTF::TCMalloc_ThreadCache_FreeList::Pop): Deleted.
1663         (WTF::TCMalloc_ThreadCache_FreeList::Validate): Deleted.
1664         (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Deleted.
1665         (WTF::TCMalloc_ThreadCache::freelist_length): Deleted.
1666         (WTF::TCMalloc_ThreadCache::Size): Deleted.
1667         (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Deleted.
1668         (WTF::getPageHeap): Deleted.
1669         (WTF::fastMallocGoodSize): Deleted.
1670         (WTF::TCMalloc_PageHeap::periodicScavenge): Deleted.
1671         (WTF::TCMalloc_PageHeap::scavengerThread): Deleted.
1672         (WTF::setThreadHeap): Deleted.
1673         (WTF::TCMalloc_Central_FreeList::Init): Deleted.
1674         (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans): Deleted.
1675         (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): Deleted.
1676         (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass): Deleted.
1677         (WTF::TCMalloc_Central_FreeList::MakeCacheSpace): Deleted.
1678         (WTF::TCMalloc_Central_FreeList::ShrinkCache): Deleted.
1679         (WTF::TCMalloc_Central_FreeList::InsertRange): Deleted.
1680         (WTF::TCMalloc_Central_FreeList::RemoveRange): Deleted.
1681         (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe): Deleted.
1682         (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Deleted.
1683         (WTF::TCMalloc_Central_FreeList::Populate): Deleted.
1684         (WTF::TCMalloc_ThreadCache::SampleAllocation): Deleted.
1685         (WTF::TCMalloc_ThreadCache::Init): Deleted.
1686         (WTF::TCMalloc_ThreadCache::Cleanup): Deleted.
1687         (WTF::TCMalloc_ThreadCache::Allocate): Deleted.
1688         (WTF::TCMalloc_ThreadCache::Deallocate): Deleted.
1689         (WTF::TCMalloc_ThreadCache::FetchFromCentralCache): Deleted.
1690         (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache): Deleted.
1691         (WTF::TCMalloc_ThreadCache::Scavenge): Deleted.
1692         (WTF::TCMalloc_ThreadCache::PickNextSample): Deleted.
1693         (WTF::TCMalloc_ThreadCache::InitModule): Deleted.
1694         (WTF::TCMalloc_ThreadCache::NewHeap): Deleted.
1695         (WTF::TCMalloc_ThreadCache::GetThreadHeap): Deleted.
1696         (WTF::TCMalloc_ThreadCache::GetCache): Deleted.
1697         (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): Deleted.
1698         (WTF::TCMalloc_ThreadCache::InitTSD): Deleted.
1699         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): Deleted.
1700         * wtf/TCPackedCache.h: Removed.
1701         * wtf/TCPageMap.h: Removed.
1702         * wtf/TCSystemAlloc.cpp: Removed.
1703         * wtf/TCSystemAlloc.h: Removed.
1704
1705 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
1706
1707         Remove svn:keywords property.
1708
1709         As far as I can tell, the property had no effect on any of these files, but also,
1710         when it has effect it's likely harmful.
1711
1712         * wtf/DecimalNumber.cpp: Removed property svn:keywords.
1713         * wtf/spi/darwin/XPCSPI.h: Removed property svn:keywords.
1714
1715 2015-02-20  Csaba Osztrogonác  <ossy@webkit.org>
1716
1717         EFL URTBF
1718
1719         * wtf/PlatformEfl.cmake:
1720
1721 2015-02-20  Simon Fraser  <simon.fraser@apple.com>
1722
1723         RunLoop::dispatch() should drop the mutex before calling wakeUp().
1724         https://bugs.webkit.org/show_bug.cgi?id=141820
1725
1726         Reviewed by Alexey Proskuryakov.
1727         
1728         RunLoop::wakeUp() calls into CoreFoundation which could take time,
1729         so scope the mutex just to protect m_functionQueue.
1730
1731         * wtf/RunLoop.cpp:
1732         (WTF::RunLoop::dispatch):
1733
1734 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1735
1736         Unreviewed, EFL build fix since r180410.
1737
1738         * wtf/PlatformEfl.cmake: Add WEBKIT2/Platform/efl path in order to include DispatchQueueEfl.h.
1739
1740 2015-02-20  Antti Koivisto  <antti@apple.com>
1741
1742         Move WorkQueue from WK2 to WTF
1743         https://bugs.webkit.org/show_bug.cgi?id=141797
1744
1745         Reviewed by Anders Carlsson.
1746
1747         It may be useful in WebCore.
1748
1749         Windows implementation is still missing.
1750
1751         * WTF.xcodeproj/project.pbxproj:
1752         * wtf/CMakeLists.txt:
1753         * wtf/PlatformGTK.cmake:
1754         * wtf/WorkQueue.cpp: Copied from Source/WebKit2/Platform/WorkQueue.cpp.
1755         * wtf/WorkQueue.h: Copied from Source/WebKit2/Platform/WorkQueue.h.
1756         * wtf/cocoa: Added.
1757         * wtf/cocoa/WorkQueueCocoa.cpp: Copied from Source/WebKit2/Platform/mac/WorkQueueMac.cpp.
1758         * wtf/efl/WorkQueueEfl.cpp: Copied from Source/WebKit2/Platform/efl/WorkQueueEfl.cpp.
1759         * wtf/gtk/WorkQueueGtk.cpp: Copied from Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp.
1760
1761 2015-02-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1762
1763         [EFL] Enable bmalloc for EFL port 
1764         https://bugs.webkit.org/show_bug.cgi?id=141459
1765
1766         Reviewed by Csaba Osztrogonác.
1767
1768         * wtf/CMakeLists.txt: Remove TCSystemAlloc.cpp/h.
1769         * wtf/FastMalloc.cpp: Enable BMALLOC for EFL port.
1770
1771 2015-02-13  Anders Carlsson  <andersca@apple.com>
1772
1773         Add a move constructor and move assignment operator to Deque
1774         https://bugs.webkit.org/show_bug.cgi?id=141571
1775
1776         Reviewed by Andreas Kling.
1777
1778         * wtf/Deque.h:
1779         (WTF::inlineCapacity>::Deque):
1780         (WTF::=): Deleted.
1781
1782 2015-02-13  Anders Carlsson  <andersca@apple.com>
1783
1784         Add an initializer list constructor to Deque
1785         https://bugs.webkit.org/show_bug.cgi?id=141565
1786
1787         Reviewed by Andreas Kling.
1788
1789         * wtf/Deque.h:
1790         (WTF::inlineCapacity>::Deque):
1791
1792 2015-02-13  Anders Carlsson  <andersca@apple.com>
1793
1794         Re-indent Deque.h
1795
1796         Rubber-stamped by Antti Koivisto.
1797
1798         * wtf/Deque.h:
1799
1800 2015-02-11  Brent Fulgham  <bfulgham@apple.com>
1801
1802         [Win] [64-bit] Work around MSVC2013 Runtime Bug
1803         https://bugs.webkit.org/show_bug.cgi?id=141498
1804         <rdar://problem/19803642>
1805
1806         Reviewed by Anders Carlsson.
1807
1808         Disable FMA3 instruction use in the MSVC math library to
1809         work around a VS2013 runtime crash. We can remove this
1810         workaround when we switch to VS2015.
1811
1812         * WTF.vcxproj/WTF.vcxproj: Add new files.
1813         * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1814         * wtf/win/WTFDLL.cpp: Added.
1815
1816 2015-02-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1817
1818         [EFL][GTK] Use bmalloc instead of tcmalloc
1819         https://bugs.webkit.org/show_bug.cgi?id=140162
1820
1821         Reviewed by Carlos Garcia Campos.
1822
1823         * wtf/CMakeLists.txt:
1824         * wtf/FastMalloc.cpp:
1825             Enable bmalloc on GTK ports, but EFL port will enable it when bmalloc supports
1826             memory statistics.
1827
1828 2015-02-10  Darin Adler  <darin@apple.com>
1829
1830         Add the crash-on-failure behavior to bmalloc-based fastMalloc
1831         https://bugs.webkit.org/show_bug.cgi?id=141434
1832
1833         Reviewed by Alexey Proskuryakov.
1834
1835         * wtf/FastMalloc.cpp: Removed unneeded includes.
1836         (WTF::fastMalloc): Added null check and CRASH.
1837         (WTF::fastCalloc): Added overflow checking, null check, and CRASH.
1838         (WTF::fastRealloc): Added null check and CRASH.
1839         (WTF::fastMallocSize): Added FIXME comment.
1840         (WTF::fastMallocGoodSize): Added FIXME comment.
1841         (WTF::fastAlignedMalloc): Added null check and CRASH.
1842         (WTF::tryFastMalloc): Changed to call bmalloc directly instead of
1843         calling fastMalloc, since fastMalloc will now crash on failure.
1844         (WTF::tryFastRealloc): Changed to call bmalloc directly instead of
1845         calling fastRealloc, since fastRealloc will now crash on failure.
1846         (WTF::tryFastCalloc): Added overflow checking.
1847         (WTF::fastMallocStatistics): Added FIXME comment.
1848
1849 2015-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1850
1851         [GTK] GMutexLocker build issue
1852         https://bugs.webkit.org/show_bug.cgi?id=141381
1853
1854         Reviewed by Žan Doberšek.
1855
1856         Remove using WTF::GMutexLocker from the header, since newer glib
1857         versions have a GMutexLocker in the public API.
1858
1859         * wtf/gobject/GMutexLocker.h:
1860
1861 2015-02-09  Alexey Proskuryakov  <ap@apple.com>
1862
1863         REGRESSION: tryFastCalloc is no longer "try"
1864         https://bugs.webkit.org/show_bug.cgi?id=141406
1865
1866         Reviewed by Darin Adler.
1867
1868         This causes crashes on some WebKit regression test bots.
1869
1870         * wtf/FastMalloc.cpp: (WTF::tryFastCalloc): Fix what looks like a copy/paste mistake.
1871
1872 2015-02-07  Csaba Osztrogonác  <ossy@webkit.org>
1873
1874         [ARM] GC sometimes stuck in an infinite loop if parallel GC is enabled
1875         https://bugs.webkit.org/show_bug.cgi?id=141290
1876
1877         Reviewed by Anders Carlsson.
1878
1879         * wtf/Platform.h:
1880
1881 2015-02-07  Chris Dumez  <cdumez@apple.com>
1882
1883         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
1884         https://bugs.webkit.org/show_bug.cgi?id=141321
1885
1886         Reviewed by Darin Adler.
1887
1888         Add Vector::removeFirstMatching() / removeAllMatching() methods taking
1889         lambda functions to match the element(s) to remove. This simplifies the
1890         code a bit. Vector::removeAllMatching() is also more efficient than the
1891         manual removal alternative.
1892
1893         * wtf/Vector.h:
1894
1895 2015-02-06  Commit Queue  <commit-queue@webkit.org>
1896
1897         Unreviewed, rolling out r179743.
1898         https://bugs.webkit.org/show_bug.cgi?id=141335
1899
1900         caused missing symbols in non-WebKit clients of WTF::Vector
1901         (Requested by kling on #webkit).
1902
1903         Reverted changeset:
1904
1905         "Remove WTF::fastMallocGoodSize()."
1906         https://bugs.webkit.org/show_bug.cgi?id=141020
1907         http://trac.webkit.org/changeset/179743
1908
1909 2015-02-06  Andreas Kling  <akling@apple.com>
1910
1911         Remove WTF::fastMallocGoodSize().
1912         <https://webkit.org/b/141020>
1913
1914         Reviewed by Anders Carlsson.
1915
1916         bmalloc's good-size API just returns exactly whatever you pass it,
1917         so it's of no utility to us anymore.
1918
1919         This gets rid of a bunch of pointless out-of-line calls in Vector
1920         construction and growth.
1921
1922         * wtf/Compression.cpp:
1923         (WTF::GenericCompressedData::create):
1924         * wtf/FastMalloc.cpp:
1925         (WTF::fastMallocGoodSize): Deleted.
1926         * wtf/FastMalloc.h:
1927         * wtf/Vector.h:
1928         (WTF::VectorBufferBase::allocateBuffer):
1929         (WTF::VectorBufferBase::tryAllocateBuffer):
1930         (WTF::VectorBufferBase::reallocateBuffer):
1931
1932 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
1933
1934         [Streams API] Implement a barebone ReadableStream interface
1935         https://bugs.webkit.org/show_bug.cgi?id=141045
1936
1937         Reviewed by Benjamin Poulain.
1938
1939         * wtf/FeatureDefines.h:
1940
1941 2015-02-04  Alexey Proskuryakov  <ap@apple.com>
1942
1943         Optimized equal() functions in StringImpl.h are not ASan compatible
1944         https://bugs.webkit.org/show_bug.cgi?id=141258
1945
1946         Reviewed by Daniel Bates.
1947
1948         * wtf/text/StringImpl.h: (WTF::equal): Add custom implementations for ASan.
1949
1950 2015-02-04  Chris Dumez  <cdumez@apple.com>
1951
1952         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
1953         https://bugs.webkit.org/show_bug.cgi?id=141192
1954
1955         Reviewed by Benjamin Poulain.
1956
1957         Add removeFirst(value) / removeAll(value) convenience methods to
1958         WTF::Vector to reduce complexity a bit at call sites.
1959
1960         I am planning to add overloads for these taking a lambda function for
1961         matching in a follow-up patch as well. I have seen quite a few
1962         Vector::remove(index) call sites that would benefit from it.
1963
1964         * wtf/Vector.h:
1965         (WTF::OverflowHandler>::removeFirst):
1966         (WTF::OverflowHandler>::removeAll):
1967
1968 2015-02-02  Dhi Aurrahman  <diorahman@rockybars.com>
1969
1970         Optimize matchesLangPseudoClass() of :lang()
1971         https://bugs.webkit.org/show_bug.cgi?id=140873
1972
1973         Reviewed by Darin Adler.
1974
1975         Add some basic equality comparison operators.
1976
1977         * wtf/text/StringView.h:
1978         (WTF::operator==):
1979         (WTF::operator!=):
1980         (WTF::equal):
1981         (WTF::equalIgnoringASCIICase):
1982
1983 2015-02-02  Geoffrey Garen  <ggaren@apple.com>
1984
1985         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
1986         https://bugs.webkit.org/show_bug.cgi?id=140900
1987
1988         Reviewed by Mark Hahnenberg.
1989
1990         Re-landing just the HandleBlock piece of this patch.
1991
1992         * wtf/FastMalloc.cpp:
1993         (WTF::fastAlignedMalloc):
1994         (WTF::fastAlignedFree):
1995         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1996         * wtf/FastMalloc.h:
1997
1998 2015-02-02  Daniel Bates  <dabates@apple.com>
1999
2000         [iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
2001         https://bugs.webkit.org/show_bug.cgi?id=141057
2002         <rdar://problem/19068790>
2003
2004         Reviewed by Alexey Proskuryakov.
2005
2006         * wtf/MainThread.h:
2007         * wtf/mac/MainThreadMac.mm:
2008         (WTF::callOnWebThreadOrDispatchAsyncOnMainThread): Added.
2009
2010 2015-01-31  Sam Weinig  <sam@webkit.org>
2011
2012         Remove even more Mountain Lion support
2013         https://bugs.webkit.org/show_bug.cgi?id=141124
2014
2015         Reviewed by Alexey Proskuryakov.
2016
2017         * Configurations/Base.xcconfig:
2018         * Configurations/DebugRelease.xcconfig:
2019         * wtf/Assertions.cpp:
2020         * wtf/FeatureDefines.h:
2021         * wtf/Platform.h:
2022
2023 2015-01-31  Commit Queue  <commit-queue@webkit.org>
2024
2025         Unreviewed, rolling out r179426.
2026         https://bugs.webkit.org/show_bug.cgi?id=141119
2027
2028         "caused a memory use regression" (Requested by Guest45 on
2029         #webkit).
2030
2031         Reverted changeset:
2032
2033         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
2034         pages"
2035         https://bugs.webkit.org/show_bug.cgi?id=140900
2036         http://trac.webkit.org/changeset/179426
2037
2038 2015-01-31  Commit Queue  <commit-queue@webkit.org>
2039
2040         Unreviewed, rolling out r179408.
2041         https://bugs.webkit.org/show_bug.cgi?id=141117
2042
2043         This didn't fully fix the issue (Requested by anttik on
2044         #webkit).
2045
2046         Reverted changeset:
2047
2048         "OSObjectPtr does not work with dispatch_data_t on Maverics"
2049         https://bugs.webkit.org/show_bug.cgi?id=141081
2050         http://trac.webkit.org/changeset/179408
2051
2052 2015-01-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2053
2054         Implement ES6 Symbol
2055         https://bugs.webkit.org/show_bug.cgi?id=140435
2056
2057         Reviewed by Geoffrey Garen.
2058
2059         Introduce new unique string mechanizm into StringImpl.
2060         It is used for implementing Symbol which holds a [[Description]] value.
2061
2062         * wtf/text/AtomicString.h:
2063         (WTF::AtomicString::add):
2064         (WTF::AtomicString::addWithStringTableProvider):
2065
2066         Previously, we checked `isAtomic()` or `!length()`. This guard can filter out EmptyUnique.
2067         But now, we introduced new unique StringImpl. Since it has an actual string value, we need to check `isUnique()`.
2068
2069         * wtf/text/StringImpl.cpp:
2070         (WTF::StringImpl::~StringImpl):
2071         (WTF::StringImpl::createUnique):
2072
2073         In createUnique, we leverage Substring mechanizm to produce a new unique
2074         string from an existing string.
2075
2076         * wtf/text/StringImpl.h:
2077         (WTF::StringImpl::StringImpl):
2078         (WTF::StringImpl::createUniqueEmpty):
2079         (WTF::StringImpl::flagIsUnique):
2080         (WTF::StringImpl::isUnique):
2081         (WTF::StringImpl::setIsAtomic):
2082         (WTF::StringImpl::createEmptyUnique): Deleted.
2083         (WTF::StringImpl::isEmptyUnique): Deleted.
2084
2085         Instead of EmptyUnique, we introduced new flag to StringImpl, `isUnique`.
2086         While EmptyUnique cannot hold any string values except for empty string,
2087         the unique StringImpl can hold any String values.
2088         We fold the Symbol's descriptiveString value here.
2089
2090         * wtf/text/StringStatics.cpp:
2091         (WTF::StringImpl::hashAndFlagsForUnique):
2092         (WTF::StringImpl::hashAndFlagsForEmptyUnique): Deleted.
2093
2094 2015-01-30  Geoffrey Garen  <ggaren@apple.com>
2095
2096         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
2097         https://bugs.webkit.org/show_bug.cgi?id=140900
2098
2099         Reviewed by Mark Hahnenberg.
2100
2101         Re-landing just the HandleBlock piece of this patch.
2102
2103         * wtf/FastMalloc.cpp:
2104         (WTF::fastAlignedMalloc):
2105         (WTF::fastAlignedFree):
2106         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2107         * wtf/FastMalloc.h:
2108
2109 2015-01-30  Namhoon Kim  <yanhkim@gmail.com>
2110
2111         Call vsnprintf instead of _vsnprintf in vprintf_stderr_common
2112         https://bugs.webkit.org/show_bug.cgi?id=141078
2113
2114         In windows _vsnprintf api does not place null character
2115         automatically. Simply replace it with vsnprintf. Which is
2116         polyfill to call wtf_vsnprintf in windows.
2117
2118         Reviewed by Brent Fulgham.
2119
2120         * wtf/Assertions.cpp:
2121
2122 2015-01-30  Brian J. Burg  <burg@cs.washington.edu>
2123
2124         Web Inspector: ASSERT in InspectorTimelineAgent::internalStop
2125         https://bugs.webkit.org/show_bug.cgi?id=141039
2126
2127         Reviewed by Timothy Hatcher.
2128
2129         Add messages to Stopwatch assertions, and clean up constructor.
2130
2131         * wtf/Stopwatch.h:
2132         (WTF::Stopwatch::Stopwatch):
2133         (WTF::Stopwatch::start):
2134         (WTF::Stopwatch::stop):
2135
2136 2015-01-30  Chris Dumez  <cdumez@apple.com>
2137
2138         Add match_constness<Reference, T> helper struct
2139         https://bugs.webkit.org/show_bug.cgi?id=140905
2140
2141         Reviewed by Benjamin Poulain.
2142
2143         Add match_constness<Reference, T> helper struct to simplify downcast<>()
2144         a bit. The purpose of this helper is to update T's constness to match
2145         Reference's.
2146
2147         * wtf/TypeCasts.h:
2148         (WTF::downcast):
2149
2150 2015-01-30  Chris Dumez  <cdumez@apple.com>
2151
2152         Add assertion in RefPtr's operator*() to make sure we don't dereference nullptr
2153         https://bugs.webkit.org/show_bug.cgi?id=141092
2154
2155         Reviewed by Anders Carlsson.
2156
2157         Add assertion in RefPtr's operator*() to make sure we don't dereference
2158         nullptr.
2159
2160         * wtf/RefPtr.h:
2161         (WTF::RefPtr::operator*):
2162
2163 2015-01-30  Geoffrey Garen  <ggaren@apple.com>
2164
2165         GC marking threads should clear malloc caches
2166         https://bugs.webkit.org/show_bug.cgi?id=141097
2167
2168         Reviewed by Andreas Kling.
2169
2170         Split the scavenging API into per-thread vs global, so that you can
2171         request to scavenge your own thread without scavenging the whole heap.
2172
2173         * wtf/FastMalloc.cpp:
2174         (WTF::releaseFastMallocFreeMemoryForThisThread):
2175         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2176         * wtf/FastMalloc.h:
2177
2178 2015-01-30  Antti Koivisto  <antti@apple.com>
2179
2180         OSObjectPtr does not work with dispatch_data_t on Maverics
2181         https://bugs.webkit.org/show_bug.cgi?id=141081
2182
2183         Reviewed by Pratik Solanki.
2184         
2185         Trying to use OSObjectPtr<dispatch_data_t> throws 
2186         
2187         -[OS_dispatch_data _xref_dispose]: unrecognized selector sent to instance 0
2188
2189         * wtf/OSObjectPtr.h:
2190         (WTF::retainOSObject<dispatch_data_t>):
2191         (WTF::releaseOSObject<dispatch_data_t>):
2192         
2193             Add specialization for dispatch_data_t on Maverics.
2194
2195 2015-01-29  Santosh Mahto  <santoshbit2007@gmail.com>
2196
2197         Refactor String::format to handle unreached va_end.
2198         https://bugs.webkit.org/show_bug.cgi?id=140938
2199
2200         Reviewed by Alexey Proskuryakov.
2201
2202         Now va_end is called for all platform after getting length
2203         of formatted string and again va_start/va_end is called to write
2204         formatted string in buffer. This way it ensure va_end is always
2205         reached for each va_start.
2206
2207         * wtf/text/WTFString.cpp:
2208
2209 2015-01-29  Csaba Osztrogonác  <ossy@webkit.org>
2210
2211         Move HAVE_DTRACE definition back to Platform.h
2212         https://bugs.webkit.org/show_bug.cgi?id=141033
2213
2214         Reviewed by Dan Bernstein.
2215
2216         * wtf/Platform.h:
2217
2218 2015-01-28  Namhoon Kim  <namkim@ea.com>
2219
2220         Windows return -1 when calling vsnprintf with arguments that exceed target buffer size
2221         https://bugs.webkit.org/show_bug.cgi?id=140917
2222
2223         Reviewed by Brent Fulgham.
2224
2225         Fix return value of vsnprintf when windows API return -1 to denote
2226         requested buffer exceeded. Replace return value by calling vscprintf.
2227
2228         * wtf/StringExtras.h:
2229         (snprintf): Fix return value by calling vscprintf when buffer exceeded.
2230         (wtf_vsnprintf): Ditto.
2231
2232 2015-01-28  Geoffrey Garen  <ggaren@apple.com>
2233
2234         Removed fastMallocForbid / fastMallocAllow
2235         https://bugs.webkit.org/show_bug.cgi?id=141012
2236
2237         Reviewed by Mark Hahnenberg.
2238
2239         Removed the forbid / allow API because it is no longer used.
2240
2241         * wtf/FastMalloc.cpp:
2242         (WTF::tryFastMalloc):
2243         (WTF::fastMalloc):
2244         (WTF::tryFastCalloc):
2245         (WTF::fastCalloc):
2246         (WTF::fastFree):
2247         (WTF::tryFastRealloc):
2248         (WTF::fastRealloc):
2249         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2250         (WTF::isForbidden): Deleted.
2251         (WTF::fastMallocForbid): Deleted.
2252         (WTF::fastMallocAllow): Deleted.
2253         (WTF::initializeIsForbiddenKey): Deleted.
2254         * wtf/FastMalloc.h:
2255
2256 2015-01-28  Dana Burkart  <dburkart@apple.com>
2257
2258         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
2259         https://bugs.webkit.org/show_bug.cgi?id=136765
2260
2261         Reviewed by Alexey Proskuryakov.
2262
2263         * Configurations/Base.xcconfig:
2264         * Configurations/DebugRelease.xcconfig:
2265
2266 2015-01-28  Darin Adler  <darin@apple.com>
2267
2268         Fix small leak in Collator
2269         https://bugs.webkit.org/show_bug.cgi?id=140990
2270
2271         Reviewed by Andreas Kling.
2272
2273         * wtf/unicode/icu/CollatorICU.cpp:
2274         (WTF::Collator::Collator): Use fastStrDup instead of strdup.
2275         (WTF::Collator::~Collator): Use fastFree on the collator locale that we
2276         are abandoning. The old code instead just called free on a null pointer.
2277
2278 2015-01-27  Geoffrey Garen  <ggaren@apple.com>
2279
2280         Removed WTF_MALLOC_VALIDATION
2281         https://bugs.webkit.org/show_bug.cgi?id=140958
2282
2283         Reviewed by Anders Carlsson.
2284
2285         I don't think anyone has been using this, and the #ifdefs were driving
2286         me crazy.
2287
2288         We have other options for validation -- like MallocGuardEdges,
2289         MallocCheckHeapEach, MallocScribble, and GuardMalloc.
2290
2291         * wtf/FastMalloc.cpp:
2292         (WTF::tryFastMalloc):
2293         (WTF::fastMalloc):
2294         (WTF::tryFastCalloc):
2295         (WTF::fastCalloc):
2296         (WTF::fastFree):
2297         (WTF::tryFastRealloc):
2298         (WTF::fastRealloc):
2299         (WTF::fastMallocSize):
2300         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2301         (WTF::Internal::fastMallocMatchFailed): Deleted.
2302         * wtf/FastMalloc.h:
2303         (WTF::Internal::fastMallocValidationHeader): Deleted.
2304         (WTF::Internal::fastMallocValidationSuffix): Deleted.
2305         (WTF::Internal::fastMallocMatchValidationType): Deleted.
2306         (WTF::Internal::setFastMallocMatchValidationType): Deleted.
2307         (WTF::fastMallocMatchValidateMalloc): Deleted.
2308         (WTF::fastMallocMatchValidateFree): Deleted.
2309         (WTF::fastMallocValidate): Deleted.
2310
2311 2015-01-27  Commit Queue  <commit-queue@webkit.org>
2312
2313         Unreviewed, rolling out r179192.
2314         https://bugs.webkit.org/show_bug.cgi?id=140953
2315
2316         Caused numerous layout test failures (Requested by mattbaker_
2317         on #webkit).
2318
2319         Reverted changeset:
2320
2321         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
2322         pages"
2323         https://bugs.webkit.org/show_bug.cgi?id=140900
2324         http://trac.webkit.org/changeset/179192
2325
2326 2015-01-26  Geoffrey Garen  <ggaren@apple.com>
2327
2328         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
2329         https://bugs.webkit.org/show_bug.cgi?id=140900
2330
2331         Reviewed by Mark Hahnenberg.
2332
2333         New interface for aligned allocation: fastAlignedMalloc / fastAlignedFree.
2334         We require a special function call on free because Windows.
2335
2336         * wtf/FastMalloc.cpp:
2337         (WTF::fastAlignedMalloc):
2338         (WTF::fastAlignedFree): Do it.
2339
2340         (WTF::do_memalign): Un-ifdef this, since we use it now.
2341
2342         * wtf/FastMalloc.h: Make our new function names visible like the rest
2343         of fastMalloc.
2344
2345 2015-01-26  Brent Fulgham  <bfulgham@apple.com>
2346
2347         [Win] ASSERTION FAILED !m_ptr under AccessibilityController::winAddNotificationListener
2348         https://bugs.webkit.org/show_bug.cgi?id=87426
2349         <rdar://problem/11527899>
2350
2351         Reviewed by Darin Adler.
2352
2353         Revise internal containers to use std::addressof in preference to
2354         to using the '&' operator.
2355
2356         * wtf/Deque.h:
2357         (WTF::inlineCapacity>::append):
2358         (WTF::inlineCapacity>::prepend):
2359         (WTF::inlineCapacity>::removeFirst):
2360         (WTF::inlineCapacity>::removeLast):
2361         (WTF::inlineCapacity>::remove):
2362         (WTF::inlineCapacity>::after):
2363         (WTF::inlineCapacity>::before):
2364         * wtf/GetPtr.h:
2365         * wtf/HashTable.h:
2366         (WTF::HashTableBucketInitializer<false>::initialize):
2367         * wtf/HashTraits.h:
2368         (WTF::SimpleClassHashTraits::constructDeletedValue):
2369         (WTF::CustomHashTraits::constructDeletedValue):
2370         * wtf/ListHashSet.h:
2371         (WTF::ListHashSetConstIterator::get):
2372         * wtf/Vector.h:
2373         (WTF::Vector::swap):
2374         (WTF::OverflowHandler>::append):
2375         (WTF::OverflowHandler>::tryAppend):
2376         (WTF::OverflowHandler>::insert):
2377
2378 2015-01-24  Chris Dumez  <cdumez@apple.com>
2379
2380         Provide implementation for WTF::DefaultHash<bool>
2381         https://bugs.webkit.org/show_bug.cgi?id=140848
2382
2383         Reviewed by Anders Carlsson.
2384
2385         Provide implementation for WTF::DefaultHash<bool> so that we can use
2386         HashMap<std::pair<XXX, bool>> in the code base. Right now, we need to
2387         use some integer type to work around the issue.
2388
2389         * wtf/HashFunctions.h:
2390
2391 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2392
2393         [GTK] Add missing null check in some derefGPtr implementations
2394         https://bugs.webkit.org/show_bug.cgi?id=140822
2395
2396         Reviewed by Sergio Villar Senin.
2397
2398         It's missing in GHashTable and GVariant implementations.
2399
2400         * wtf/gobject/GRefPtr.cpp:
2401         (WTF::derefGPtr):
2402
2403 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2404
2405         [GTK] Add initial database process support
2406         https://bugs.webkit.org/show_bug.cgi?id=139491
2407
2408         Reviewed by Sergio Villar Senin.
2409
2410         Add support for using GRefPtr with GVariantBuilder.
2411
2412         * wtf/gobject/GRefPtr.cpp:
2413         (WTF::refGPtr):
2414         (WTF::derefGPtr):
2415         * wtf/gobject/GRefPtr.h:
2416         * wtf/gobject/GTypedefs.h:
2417
2418 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
2419
2420         Add a build flag for ES6 class syntax
2421         https://bugs.webkit.org/show_bug.cgi?id=140760
2422
2423         Reviewed by Michael Saboff.
2424
2425         * wtf/FeatureDefines.h:
2426
2427 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
2428
2429         Remove ENABLE(INSPECTOR) ifdef guards
2430         https://bugs.webkit.org/show_bug.cgi?id=140668
2431
2432         Reviewed by Darin Adler.
2433
2434         * wtf/FeatureDefines.h:
2435
2436 2015-01-20  YunQiang Su  <wzssyqa@gmail.com>
2437
2438         Fix failed to build for Linux/MIPS64EL
2439         https://bugs.webkit.org/show_bug.cgi?id=124370
2440
2441         Reviewed by Darin Adler.
2442
2443         Add MIPS64EL support.
2444
2445         * wtf/Platform.h:
2446         * wtf/dtoa/utils.h:
2447
2448 2015-01-19  Alexey Proskuryakov  <ap@apple.com>
2449
2450         Make ASan do bounds checks for WTF::Vector
2451         https://bugs.webkit.org/show_bug.cgi?id=140631
2452         rdar://problem/19437718
2453
2454         Reviewed by Darin Adler.
2455
2456         * wtf/SizeLimits.cpp: Disable Vector object size checks for ASan enabled builds.
2457
2458         * wtf/Vector.h:
2459         (WTF::VectorBuffer::endOfBuffer):
2460         (WTF::Vector::Vector):
2461         (WTF::Vector::~Vector):
2462         (WTF::Vector::swap):
2463         (WTF::OverflowHandler>::Vector):
2464         (WTF::=):
2465         (WTF::OverflowHandler>::fill):
2466         (WTF::OverflowHandler>::resize):
2467         (WTF::OverflowHandler>::shrink):
2468         (WTF::OverflowHandler>::grow):
2469         (WTF::OverflowHandler>::asanSetInitialBufferSizeTo):
2470         (WTF::OverflowHandler>::asanSetBufferSizeToFullCapacity):
2471         (WTF::OverflowHandler>::asanBufferSizeWillChangeTo):
2472         (WTF::OverflowHandler>::reserveCapacity):
2473         (WTF::OverflowHandler>::tryReserveCapacity):
2474         (WTF::OverflowHandler>::shrinkCapacity):
2475         (WTF::OverflowHandler>::append):
2476         (WTF::OverflowHandler>::tryAppend):
2477         (WTF::OverflowHandler>::appendSlowCase):
2478         (WTF::OverflowHandler>::uncheckedAppend):
2479         (WTF::OverflowHandler>::insert):
2480         (WTF::OverflowHandler>::remove):
2481         (WTF::OverflowHandler>::releaseBuffer):
2482
2483         * wtf/Compiler.h: Changed ASAN_ENABLED macro fallback value from false to 0,
2484         MSVC was not happy with false.
2485
2486 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
2487
2488         Remove non-Windows cruft from WebKit/win/Plugins
2489         https://bugs.webkit.org/show_bug.cgi?id=140675
2490
2491         Reviewed by Anders Carlsson.
2492
2493         * wtf/FeatureDefines.h:
2494
2495 2015-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2496
2497         WeakPtr functions crash when created with default constructor
2498         https://bugs.webkit.org/show_bug.cgi?id=140479
2499
2500         Reviewed by Andreas Kling.
2501
2502         This patch rearranges how WeakPtr works, and has the following ideas behind it:
2503
2504         1. WeakPtr should use Ref internally. This solves the crash by always having a
2505         valid WeakReference.
2506         2. Clients should not be able to construct WeakReferences directly. Instead,
2507         only WeakPtrFactory (and WeakPtr's default constructor) should be able to
2508         construct them. They are considered an implementation detail of WeakPtr.
2509         3. Except for the default constructor, clients should not be able to construct
2510         WeakPtrs directly. Instead, the WeakPtrFactory must construct them. This
2511         guarantees that the WeakPtrs all reference the same WeakReference.
2512         4. Clients can construct a WeakPtr using its default constructor, and then
2513         use the assignment operator to make it non-null. (Or they could use
2514         WeakPtrFactory to make it non-null at creation-time.)
2515         5. No one was using WeakReference::bindTo(), and it doesn't seem useful, so I
2516         removed it.
2517
2518         Tests: WTF_WeakPtr API tests
2519
2520         * wtf/Ref.h:
2521         (WTF::Ref::Ref): Added extra ASSERT()s, and explicitly deleted copy
2522         constructors with a comment.
2523         (WTF::Ref::operator=): Added extra ASSERT()s, and explicitly deleted copy
2524         assignment operators with a comment.
2525         * wtf/WeakPtr.h:
2526         (WTF::WeakReference::clear): Used nullptr.
2527         (WTF::WeakReference::create): Moved to private:
2528         (WTF::WeakPtr::WeakPtr): For the default constructor, initialized the Ref with
2529         a new WeakReference. For the other constructor, moved it to private:. Also added
2530         copy constructors and copy assignment operators (since Ref doesn't have them but
2531         RefPtr does). These constructors/operators are relied upon in various places
2532         throughout WebCore.
2533         (WTF::WeakPtr::operator bool): Made non-explicit.
2534         (WTF::WeakReference::createUnbound): Deleted.
2535         (WTF::WeakReference::bindTo): Deleted.
2536         (WTF::WeakReference::WeakReference): Deleted.
2537         (WTF::WeakPtrFactory::WeakPtrFactory): Deleted.
2538
2539 2015-01-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2540
2541         std::all_of requires complete C++ iterators in GCC 4.8
2542         https://bugs.webkit.org/show_bug.cgi?id=140530
2543
2544         Reviewed by Darin Adler.
2545
2546         In the WebKit2/UIProcess/WebProcessLifetimeObserver.cpp, std::all_of
2547         is used for HashIterators. However, std::all_of requires the complete
2548         C++ iterator interface including iterator_category typedef member and
2549         it raises compile error in GCC 4.8 (and libstdc++) environment.
2550
2551         This patch inherits std::iterator with appropriate type parameters.
2552         It automatically defines required typedefs including iterator_category.
2553
2554         * wtf/HashIterators.h:
2555
2556 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
2557
2558         Remove ENABLE(SQL_DATABASE) guards
2559         https://bugs.webkit.org/show_bug.cgi?id=140434
2560
2561         Reviewed by Darin Adler.
2562
2563         * wtf/FeatureDefines.h:
2564
2565 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
2566
2567         Unreviewed fix after r163330.
2568
2569         * wtf/Platform.h: Use C style comment.
2570
2571 2015-01-14  Marc Juul  <juul@sudomesh.org>
2572
2573         C++ style comment was preventing compile if CPU(ARM_NEON)
2574         https://bugs.webkit.org/show_bug.cgi?id=133827
2575
2576         Reviewed by Csaba Osztrogonác.
2577
2578         * wtf/Platform.h:
2579
2580 2015-01-13  Chris Dumez  <cdumez@apple.com>
2581
2582         Make WTF::Optional work with msvc 2013
2583         https://bugs.webkit.org/show_bug.cgi?id=140401
2584
2585         Reviewed by Anders Carlsson.
2586
2587         Update the WTF::Optional implementation to use std::aligned_memory and
2588         placement new instead of an unrestricted union because msvc 2013 still
2589         doesn't support unrestricted unions.
2590
2591         This change is a pre-requirement to fix Bug 140347 as this change uses
2592         WTF::Optional with types that have non-trivial copy constructors.
2593
2594         This change is covered by the existing Optional WTF test.
2595
2596         * wtf/Optional.h:
2597
2598 2015-01-11  Sam Weinig  <sam@webkit.org>
2599
2600         Remove support for SharedWorkers
2601         https://bugs.webkit.org/show_bug.cgi?id=140344
2602
2603         Reviewed by Anders Carlsson.
2604
2605         * wtf/FeatureDefines.h:
2606
2607 2015-01-12  Darin Adler  <darin@apple.com>
2608
2609         Modernize and streamline HTMLTokenizer
2610         https://bugs.webkit.org/show_bug.cgi?id=140166
2611
2612         Reviewed by Sam Weinig.
2613
2614         * wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
2615
2616 2015-01-09  Commit Queue  <commit-queue@webkit.org>
2617
2618         Unreviewed, rolling out r178154, r178163, and r178164.
2619         https://bugs.webkit.org/show_bug.cgi?id=140292
2620
2621         Still multiple assertion failures on tests (Requested by ap on
2622         #webkit).
2623
2624         Reverted changesets:
2625
2626         "Modernize and streamline HTMLTokenizer"
2627         https://bugs.webkit.org/show_bug.cgi?id=140166
2628         http://trac.webkit.org/changeset/178154
2629
2630         "Unreviewed speculative buildfix after r178154."
2631         http://trac.webkit.org/changeset/178163
2632
2633         "One more unreviewed speculative buildfix after r178154."
2634         http://trac.webkit.org/changeset/178164
2635
2636 2015-01-08  Darin Adler  <darin@apple.com>
2637
2638         Modernize and streamline HTMLTokenizer
2639         https://bugs.webkit.org/show_bug.cgi?id=140166
2640
2641         Reviewed by Sam Weinig.
2642
2643         * wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
2644
2645 2015-01-08  Benjamin Poulain  <benjamin@webkit.org>
2646
2647         [WK2] Start a prototype for declarative site specific extensions
2648         https://bugs.webkit.org/show_bug.cgi?id=140160
2649
2650         Reviewed by Andreas Kling.
2651
2652         * wtf/FeatureDefines.h:
2653
2654 2015-01-07  Daniel Bates  <dabates@apple.com>
2655
2656         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2657         https://bugs.webkit.org/show_bug.cgi?id=137371
2658
2659         As pointed out by Tim Horton, use C-style comment instead of C++-style comment as
2660         wtf/Compiler.h is included in the sandbox profile and the sandbox profile compiler
2661         doesn't understand C++-style comments.
2662
2663         * wtf/Compiler.h:
2664
2665 2015-01-07  Daniel Bates  <dabates@apple.com>
2666
2667         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2668         https://bugs.webkit.org/show_bug.cgi?id=137371
2669
2670         Reviewed by David Kilzer.
2671
2672         Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
2673         rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
2674         can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
2675
2676         I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
2677         remove EXTERN_C in a subsequent commit(s).
2678
2679         * wtf/Compiler.h:
2680
2681 2015-01-07  Commit Queue  <commit-queue@webkit.org>
2682
2683         Unreviewed, rolling out r178068.
2684         https://bugs.webkit.org/show_bug.cgi?id=140235
2685
2686         Breaks the iOS build (Requested by enrica on #webkit).
2687
2688         Reverted changeset:
2689
2690         "[iOS] Make WebKit2 build with public iOS SDK and more build
2691         fixes for DRT"
2692         https://bugs.webkit.org/show_bug.cgi?id=137371
2693         http://trac.webkit.org/changeset/178068
2694
2695 2015-01-07  Daniel Bates  <dabates@apple.com>
2696
2697         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2698         https://bugs.webkit.org/show_bug.cgi?id=137371
2699
2700         Reviewed by David Kilzer.
2701
2702         Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
2703         rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
2704         can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
2705
2706         I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
2707         remove EXTERN_C in a subsequent commit(s).
2708
2709         * wtf/Compiler.h:
2710
2711 2015-01-07  Brian J. Burg  <burg@cs.washington.edu>
2712
2713         Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
2714         https://bugs.webkit.org/show_bug.cgi?id=140053
2715
2716         Reviewed by Andreas Kling.
2717
2718         * wtf/Stopwatch.h:
2719         (WTF::Stopwatch::create): Return a Ref.
2720
2721 2015-01-07  Commit Queue  <commit-queue@webkit.org>
2722
2723         Unreviewed, rolling out r178039.
2724         https://bugs.webkit.org/show_bug.cgi?id=140187
2725
2726         Breaks ObjC Inspector Protocol (Requested by JoePeck on
2727         #webkit).
2728
2729         Reverted changeset:
2730
2731         "Web Inspector: purge PassRefPtr from Inspector code and use
2732         Ref for typed and untyped protocol objects"
2733         https://bugs.webkit.org/show_bug.cgi?id=140053
2734         http://trac.webkit.org/changeset/178039
2735
2736 2015-01-06  Brian J. Burg  <burg@cs.washington.edu>
2737
2738         Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
2739         https://bugs.webkit.org/show_bug.cgi?id=140053
2740
2741         Reviewed by Andreas Kling.
2742
2743         * wtf/Stopwatch.h:
2744         (WTF::Stopwatch::create): Return a Ref.
2745
2746 2015-01-06  Alexey Proskuryakov  <ap@apple.com>
2747
2748         ADDRESS_SANITIZER macro is overloaded
2749         https://bugs.webkit.org/show_bug.cgi?id=140130
2750
2751         Reviewed by Anders Carlsson.
2752
2753         * wtf/Compiler.h: Added an ASAN_ENABLED macro. The abbreviation should become well
2754         known - we already use it in tools.
2755
2756         * wtf/Assertions.h:
2757         * wtf/RefCounted.h:
2758         * wtf/SizeLimits.cpp:
2759         Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
2760         in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.
2761
2762 2015-01-05  Andreas Kling  <akling@apple.com>
2763
2764         Purge PassRefPtr from Page.
2765         <https://webkit.org/b/140089>
2766
2767         Reviewed by Anders Carlsson.
2768
2769         Make SchedulePair::create() return Ref since it never fails.
2770
2771         * wtf/SchedulePair.h:
2772         (WTF::SchedulePair::create):
2773
2774 2015-01-01  Darin Adler  <darin@apple.com>
2775
2776         Rework code that hides characters in password fields to streamline a little
2777         https://bugs.webkit.org/show_bug.cgi?id=140035
2778
2779         Reviewed by Sam Weinig.
2780
2781         * wtf/text/StringImpl.cpp:
2782         (WTF::StringImpl::fill): Deleted.
2783         * wtf/text/StringImpl.h: Deleted StringImpl::fill.
2784         * wtf/text/WTFString.h:
2785         (WTF::String::fill): Deleted.
2786
2787 2014-12-26  Dan Bernstein  <mitz@apple.com>
2788
2789         Build fix.
2790
2791         Removed use of __builtin_s{add,sub}_overflow introduced in r177729 that was causing a compiler used at Apple to crash because of <rdar://problem/19347133>.
2792
2793         * wtf/SaturatedArithmetic.h:
2794         (signedAddOverflows):
2795         (signedSubtractOverflows):
2796
2797 2014-12-26  Dan Bernstein  <mitz@apple.com>
2798
2799         <rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
2800         https://bugs.webkit.org/show_bug.cgi?id=139950
2801
2802         Reviewed by David Kilzer.
2803
2804         * Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
2805         in a manner that works with Xcode 5.1.1.
2806
2807 2014-12-25  Dan Bernstein  <mitz@apple.com>
2808
2809         Try to fix the Windows build after r177733.
2810
2811         * wtf/Ref.h:
2812
2813 2014-12-25  Alexey Proskuryakov  <ap@apple.com>
2814
2815         Simplify saturated integer add/sub
2816         https://bugs.webkit.org/show_bug.cgi?id=139854
2817
2818         Address Darin's post-commit feedback to fix API tests.
2819
2820         * wtf/SaturatedArithmetic.h: (saturatedSubtraction):
2821
2822 2014-12-24  Benjamin Poulain  <benjamin@webkit.org>
2823
2824         Simplify saturated integer add/sub
2825         https://bugs.webkit.org/show_bug.cgi?id=139854
2826
2827         Reviewed by Darin Adler.
2828
2829         * wtf/Compiler.h:
2830         Make a wrapper for __has_builtin for compilers that do not support it.
2831
2832         * wtf/SaturatedArithmetic.h:
2833         (saturatedAddition):
2834         (saturatedSubtraction):
2835         Use the builtins when possible instead of reinventing the wheel.
2836         On ARMv7, use the saturated math instructions.
2837
2838 2014-12-23  Anders Carlsson  <andersca@apple.com>
2839
2840         Move dynamic_objc_cast to RetainPtr.h
2841         https://bugs.webkit.org/show_bug.cgi?id=139915
2842
2843         Reviewed by Sam Weinig.
2844
2845         * wtf/RetainPtr.h:
2846         (WTF::dynamic_objc_cast):
2847
2848 2014-12-23  Anders Carlsson  <andersca@apple.com>
2849
2850         Re-indent RefPtr.h and RetainPtr.h.
2851
2852         Rubber-stamped by Sam Weinig.
2853
2854         * wtf/RefPtr.h:
2855         * wtf/RetainPtr.h:
2856
2857 2014-12-20  Eric Carlson  <eric.carlson@apple.com>
2858
2859         [iOS] add optimized fullscreen API
2860         https://bugs.webkit.org/show_bug.cgi?id=139833
2861         <rdar://problem/18844486>
2862
2863         Reviewed by Simon Fraser.
2864
2865         * wtf/Platform.h: Define ENABLE_VIDEO_PRESENTATION_MODE.
2866
2867 2014-12-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2868
2869         Fix build break on EFL and GTK since r177523
2870         https://bugs.webkit.org/show_bug.cgi?id=139805
2871
2872         Reviewed by Csaba Osztrogonác.
2873
2874         * wtf/Ref.h: Include <wtf/StdLibExtras.h> to use std::exchange().
2875
2876 2014-12-18  Gavin Barraclough  <barraclough@apple.com>
2877
2878         Add strong typing to RefCounter interface, return value as a bool.
2879         https://bugs.webkit.org/show_bug.cgi?id=139776
2880
2881         Unreviewed style fixes.
2882
2883         * wtf/RefCounter.h:
2884         (WTF::=):
2885
2886 2014-12-18  Brent Fulgham  <bfulgham@apple.com>
2887
2888         [Win] Build correction after r177541.
2889
2890         * wtf/RefCounter.h:
2891         (WTF::RefCounter::Token<T>::Token): Revise constructor inlines to correct
2892         syntax error.
2893
2894 2014-12-18  Gavin Barraclough  <barraclough@apple.com>
2895
2896         Add strong typing to RefCounter interface, return value as a bool.
2897         https://bugs.webkit.org/show_bug.cgi?id=139776
2898
2899         Reviewed by Geoff Garen.
2900
2901         Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
2902         This means there is no compile time type checking to prevent mistakes. Update the count()
2903         method to token<>(), templated on type used to identify the token being returned.
2904         Calls to token<T>() will return a result of type RefCounter::Token<T>.
2905
2906         There are a few problems with the fact the counter will return you an exact count of the
2907         number of outstanding tokens:
2908           - It is desirable to only fire the callback on zero-edge changes; it is more consistent
2909             to do so if the value is only readable as a boolean.
2910           - It is desirable to provide the value as an argument to the callback, however to make
2911             this useful for integer values it is also necessary to indicate the direction of change
2912             (0->1 is often interesting where 2->1 is not).
2913           - There is a mismatch between the precision of returning a count, and the inherent
2914             imprecision of a token based mechanism, where it may be difficult to guarantee
2915             absolutely no unnecessary refcount churn, and thus unintentional counter values.
2916
2917         * wtf/RefCounter.cpp:
2918         (WTF::RefCounter::Count::ref):
2919         (WTF::RefCounter::Count::deref):
2920             - only call the callback on zero-edge changes; provide the value.
2921         (WTF::RefCounter::RefCounter):
2922             - callback now takes a bool argument.
2923         * wtf/RefCounter.h:
2924         (WTF::RefCounter::Token::Token):
2925             - New opaque type to reference the RefCounter::Count.
2926         (WTF::RefCounter::Token::operator!):
2927             - ! operator checks for null / anasigned Tokens.
2928         (WTF::RefCounter::RefCounter):
2929             - callback now takes a bool argument.
2930         (WTF::RefCounter::token):
2931             - renamed from count(), templated on type of token returned.
2932         (WTF::RefCounter::value):
2933             - now returns a bool.
2934         (WTF::RefCounter::Token<T>::Token):
2935         (WTF::=):
2936             - Tokens can be copied & assigned.
2937         (WTF::RefCounter::count): Deleted.
2938             - renamed to token<>().
2939
2940 2014-12-18  Anders Carlsson  <andersca@apple.com>
2941
2942         Simplify smart pointer classes by using std::exchange
2943         https://bugs.webkit.org/show_bug.cgi?id=139790
2944
2945         Reviewed by Andreas Kling.
2946
2947         * wtf/MallocPtr.h:
2948         * wtf/OSObjectPtr.h:
2949         * wtf/OwnPtr.h:
2950         (WTF::OwnPtr<T>::clear):
2951         (WTF::OwnPtr<T>::release):
2952         (WTF::OwnPtr<T>::leakPtr):
2953         (WTF::=):
2954         * wtf/PassOwnPtr.h:
2955         (WTF::PassOwnPtr<T>::leakPtr):
2956         * wtf/PassRefPtr.h:
2957         (WTF::PassRefPtr<T>::leakRef):
2958         * wtf/Ref.h:
2959         * wtf/RefPtr.h:
2960         (WTF::RefPtr<T>::clear):
2961         (WTF::RefPtr<T>::leakRef):
2962         * wtf/RetainPtr.h:
2963         (WTF::RetainPtr<T>::leakRef):
2964
2965 2014-12-18  Anders Carlsson  <andersca@apple.com>
2966
2967         Clean up MachSendRight and add a copySendRight member function
2968         https://bugs.webkit.org/show_bug.cgi?id=139788
2969
2970         Reviewed by Tim Horton.
2971
2972         * wtf/StdLibExtras.h:
2973         (std::exchange):
2974         Add an implementation of std::exchange.
2975
2976 2014-12-17  Chris Dumez  <cdumez@apple.com>
2977
2978         [iOS] Make it possible to toggle FeatureCounter support at runtime
2979         https://bugs.webkit.org/show_bug.cgi?id=139688
2980         <rdar://problem/19266254>
2981
2982         Reviewed by Andreas Kling.
2983
2984         Remove FeatureCounter API from WTF and move it to WebCore/platform
2985         instead so that it can log conditionally based on a WebCore setting.
2986
2987         * WTF.vcxproj/WTF.vcxproj:
2988         * WTF.xcodeproj/project.pbxproj:
2989         * wtf/CMakeLists.txt:
2990
2991 2014-12-17  Brent Fulgham  <bfulgham@apple.com>
2992
2993         [Win] Correct DebugSuffix builds under MSBuild
2994         https://bugs.webkit.org/show_bug.cgi?id=139733
2995         <rdar://problem/19276880>
2996
2997         Reviewed by Simon Fraser.
2998
2999         * WTF.vcxproj/WTF.proj: Make sure to use the '_debug' suffix
3000         when building the DebugSuffix target.
3001
3002 2014-12-17  Anders Carlsson  <andersca@apple.com>
3003
3004         Make Ref::copyRef const and ref-qualified
3005         https://bugs.webkit.org/show_bug.cgi?id=139730
3006
3007         Reviewed by Andreas Kling.
3008
3009         * wtf/Ref.h:
3010
3011 2014-12-16  Daniel Bates  <dabates@apple.com>
3012
3013         [iOS] WTF fails to build with public SDK due to missing header CPAggregateDictionary.h
3014         https://bugs.webkit.org/show_bug.cgi?id=139695
3015
3016         Reviewed by Chris Dumez.
3017
3018         Add USE(APPLE_INTERNAL_SDK)-guard around iOS-specific feature counter implementation
3019         as we are only interested in counting features in builds of iOS WebKit that were built
3020         with the Apple Internal SDK.
3021
3022         * wtf/FeatureCounter.cpp:
3023         * wtf/ios/FeatureCounter.mm:
3024
3025 2014-12-16  Geoffrey Garen  <ggaren@apple.com>
3026
3027         Enable FastMalloc in debug builds
3028         https://bugs.webkit.org/show_bug.cgi?id=139692
3029
3030         Reviewed by Alexey Proskuryakov.
3031
3032         This will give debug builds greater fidelity to the real thing.
3033
3034         FastMalloc now transparently supports all the malloc debugging APIs I
3035         know of by disabling itself at runtime -- and it should be easy to add
3036         support for any APIs I missed -- so there's no need to turn it off in
3037         debug builds.
3038
3039         * wtf/FastMalloc.cpp:
3040
3041 2014-12-16  Anders Carlsson  <andersca@apple.com>
3042
3043         RefPtr::copyRef should be const
3044         https://bugs.webkit.org/show_bug.cgi?id=139689
3045
3046         Reviewed by Andreas Kling.
3047
3048         copyRef() doesn't modify the original object so it should be const.
3049         Also, add a && qualified overload and mark it deleted so that calls to copyRef() where
3050         the object is an rvalue will fail to compile.
3051
3052         * wtf/RefPtr.h:
3053
3054 2014-12-15  Chris Dumez  <cdumez@apple.com>
3055
3056         [iOS] Add feature counting support
3057         https://bugs.webkit.org/show_bug.cgi?id=139652
3058         <rdar://problem/19255690>
3059
3060         Reviewed by Gavin Barraclough.
3061
3062         Add a FeatureCounter API for to log / count when a feature
3063         is used. For now, this is only implementated on iOS.
3064
3065         * WTF.vcxproj/WTF.vcxproj:
3066         * WTF.xcodeproj/project.pbxproj:
3067         * wtf/CMakeLists.txt:
3068         * wtf/FeatureCounter.cpp: Added.
3069         (WTF::incrementFeatureCounterKey):
3070         (WTF::setFeatureCounterKey):
3071         * wtf/FeatureCounter.h: Added.
3072         * wtf/ios/FeatureCounter.mm: Added.
3073         (WTF::incrementFeatureCounterKey):
3074         (WTF::setFeatureCounterKey):
3075
3076 2014-12-12  Anders Carlsson  <andersca@apple.com>
3077
3078         Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
3079         https://bugs.webkit.org/show_bug.cgi?id=139613
3080
3081         Reviewed by Sam Weinig.
3082
3083         * wtf/Platform.h:
3084         Remove the #define.
3085
3086 2014-12-15  Commit Queue  <commit-queue@webkit.org>
3087
3088         Unreviewed, rolling out r177284.
3089         https://bugs.webkit.org/show_bug.cgi?id=139658
3090
3091         "Breaks API tests and LayoutTests on Yosemite Debug"
3092         (Requested by msaboff on #webkit).
3093
3094         Reverted changeset:
3095
3096         "Make sure range based iteration of Vector<> still receives
3097         bounds checking"
3098         https://bugs.webkit.org/show_bug.cgi?id=138821
3099         http://trac.webkit.org/changeset/177284
3100
3101 2014-12-15  Andreas Kling  <akling@apple.com>
3102
3103         Purge PassRefPtr from FocusEvent code.
3104         <https://webkit.org/b/139647>
3105
3106         Reviewed by Anders Carlsson.
3107
3108         Add a RefPtr::copyRef() to use when passing a RefPtr to a RefPtr&& without
3109         transferring the ownership.
3110
3111         * wtf/RefPtr.h:
3112
3113 2014-12-15  Oliver Hunt  <oliver@apple.com>
3114
3115         Make sure range based iteration of Vector<> still receives bounds checking
3116         https://bugs.webkit.org/show_bug.cgi?id=138821
3117
3118         Reviewed by Mark Lam.
3119
3120         Add a new IndexedIterator struct to WTF that wraps a
3121         Vector type and index to provide pointer like semantics
3122         while still performing runtime bounds checking, even in
3123         release builds. We store a simple index into the vector
3124         which means that this iterator allows vector resizing
3125         during iteration. If the vector is resized such that the
3126         iterator is out of bounds, then any attempt to dereference
3127         the iterator will crash safely.
3128
3129         For the purpose of retaining semantically equivalent
3130         behaviour, the iterator can be moved to m_index == size()
3131         as that is the standard "end" terminator for these types.
3132         Attempting to dereference at that point will still crash
3133         rather than perform an unsafe memory operation.
3134
3135         By necessity there are many overrides for operator + and - as
3136         we otherwise hit many different type promotion ambiguities when
3137         performing arithmetic with iterators. These ambiguities are also
3138         different for 32- vs. 64-bit, so duplicating the functions
3139         and then forwarding to the core implementations that performed
3140         the bounds checking and mutation seemed like the right call.
3141
3142         * WTF.vcxproj/WTF.vcxproj:
3143         * WTF.vcxproj/WTF.vcxproj.filters:
3144         * WTF.xcodeproj/project.pbxproj:
3145         * wtf/IndexedIterator.h: Added.
3146         (WTF::IndexedIterator::IndexedIterator):
3147         (WTF::IndexedIterator::operator->):
3148         (WTF::IndexedIterator::operator*):
3149         (WTF::IndexedIterator::get):
3150         (WTF::IndexedIterator::operator++):
3151         (WTF::IndexedIterator::operator--):
3152         (WTF::IndexedIterator::operator UnspecifiedBoolType):
3153         (WTF::IndexedIterator::operator-):
3154         (WTF::IndexedIterator::operator=):
3155         (WTF::IndexedIterator::operator==):
3156         (WTF::IndexedIterator::operator!=):
3157         (WTF::IndexedIterator::operator<):
3158         (WTF::IndexedIterator::operator<=):
3159         (WTF::IndexedIterator::operator>):
3160         (WTF::IndexedIterator::operator>=):
3161         (WTF::IndexedIterator::operator const_iterator):
3162         (WTF::IndexedIterator::unsafeGet):
3163         (WTF::getPtr):
3164         (WTF::operator-):
3165         (WTF::operator==):
3166         (WTF::operator!=):
3167         (WTF::operator<=):
3168         (WTF::operator>=):
3169         (WTF::operator<):
3170         (WTF::operator>):
3171         (WTF::IndexedIteratorSelector::makeIterator):
3172         (WTF::IndexedIteratorSelector::makeConstIterator):
3173         * wtf/RefCountedArray.h:
3174         (WTF::RefCountedArray::RefCountedArray):
3175         * wtf/Vector.h:
3176         (WTF::Vector::Vector):
3177         (WTF::Vector::begin):
3178         (WTF::Vector::end):
3179         (WTF::OverflowHandler>::Vector):
3180         (WTF::=):
3181         (WTF::OverflowHandler>::fill):
3182         (WTF::OverflowHandler>::expandCapacity):
3183         (WTF::OverflowHandler>::tryExpandCapacity):
3184         (WTF::OverflowHandler>::resize):
3185         (WTF::OverflowHandler>::shrink):
3186         (WTF::OverflowHandler>::grow):
3187         (WTF::OverflowHandler>::reserveCapacity):
3188         (WTF::OverflowHandler>::tryReserveCapacity):
3189         (WTF::OverflowHandler>::shrinkCapacity):
3190         (WTF::OverflowHandler>::append):
3191         (WTF::OverflowHandler>::tryAppend):
3192         (WTF::OverflowHandler>::appendSlowCase):
3193         (WTF::OverflowHandler>::uncheckedAppend):
3194         (WTF::OverflowHandler>::appendVector):
3195         (WTF::OverflowHandler>::insert):
3196         (WTF::OverflowHandler>::insertVector):
3197         (WTF::OverflowHandler>::remove):
3198
3199 2014-12-14  Andreas Kling  <akling@apple.com>
3200
3201         Minor follow-up tweaks suggested by Darin on bug 139587.
3202
3203         * wtf/text/WTFString.h:
3204         (WTF::String::String):
3205
3206 2014-12-14  Andreas Kling  <akling@apple.com>
3207
3208         Replace PassRef with Ref/Ref&& across the board.
3209         <https://webkit.org/b/139587>
3210
3211         Reviewed by Darin Adler.
3212
3213         Kill the PassRef class and replace it by Ref/Ref&&.
3214         Usage is simple:
3215
3216             - For locals and members, keep using Ref<T>.
3217             - For return types, use Ref<T>.
3218             - For (ownership-transferring) arguments, use Ref<T>&&.
3219
3220         When passing to a Ref&&, use WTF::move() to mobilize the value
3221         at the call site, e.g:
3222
3223             void myFunction(Ref<Foo>&&);
3224
3225             Ref<Foo> myFoo(Foo::create());
3226             myFunction(WTF::move(myFoo));
3227             // 'myFoo' is invalid from this point forward.
3228
3229         As you can see, it works a lot like PassRefPtr, but unlike PassRefPtr
3230         it won't surprise you by becoming null *unless* you WTF::move it.
3231
3232         I've also added a Ref::copyRef() for instances where you want to
3233         return a Ref *without* transferring ownership, e.g code like:
3234
3235             Ref<Foo> foo() { return m_foo; }
3236
3237         ... now becomes ...
3238
3239             Ref<Foo> foo() { return m_foo.copyRef(); }
3240
3241         This makes it explicit that a refcount bump will occur.
3242
3243         Finally, do note that unlike last year's PassRef, Ref&& does not
3244         require you to move it to avoid leaking; it will clean itself up.
3245
3246         * wtf/PassRef.h:
3247         (WTF::adopted): Deleted.
3248         (WTF::PassRef<T>::PassRef): Deleted.
3249         (WTF::PassRef<T>::~PassRef): Deleted.
3250         (WTF::PassRef<T>::get): Deleted.
3251         (WTF::PassRef<T>::ptr): Deleted.
3252         (WTF::PassRef<T>::leakRef): Deleted.
3253         (WTF::adoptRef): Deleted.
3254         (WTF::createRefCounted): Deleted.
3255         * wtf/PassRefPtr.h:
3256         (WTF::PassRefPtr::PassRefPtr):
3257         * wtf/Ref.h:
3258         (WTF::adopted):
3259         (WTF::Ref::~Ref):
3260         (WTF::Ref::Ref):
3261         (WTF::Ref::operator=):
3262         (WTF::Ref::operator->):
3263         (WTF::Ref::ptr):
3264         (WTF::Ref::get):
3265         (WTF::Ref::operator T&):
3266         (WTF::Ref::operator const T&):
3267         (WTF::Ref<T>::replace):
3268         (WTF::adoptRef):
3269         * wtf/RefCounter.h:
3270         (WTF::RefCounter::count):
3271         * wtf/RefPtr.h:
3272         (WTF::RefPtr::releaseNonNull):
3273         (WTF::RefPtr<T>::RefPtr):
3274         (WTF::=):
3275         * wtf/text/AtomicString.cpp:
3276         (WTF::addToStringTable):
3277         (WTF::AtomicString::add):
3278         (WTF::AtomicString::addFromLiteralData):
3279         (WTF::AtomicString::addSlowCase):
3280         * wtf/text/AtomicString.h:
3281         * wtf/text/StringImpl.cpp:
3282         (WTF::StringImpl::createFromLiteral):
3283         (WTF::StringImpl::createWithoutCopying):
3284         (WTF::StringImpl::createUninitializedInternal):
3285         (WTF::StringImpl::createUninitializedInternalNonEmpty):
3286         (WTF::StringImpl::createUninitialized):
3287         (WTF::StringImpl::reallocateInternal):
3288         (WTF::StringImpl::reallocate):
3289         (WTF::StringImpl::createInternal):
3290         (WTF::StringImpl::create):
3291         (WTF::StringImpl::create8BitIfPossible):
3292         (WTF::StringImpl::substring):
3293         (WTF::StringImpl::lower):
3294         (WTF::StringImpl::upper):
3295         (WTF::StringImpl::fill):
3296         (WTF::StringImpl::foldCase):
3297         (WTF::StringImpl::convertToASCIILowercase):
3298         (WTF::StringImpl::stripMatchedCharacters):
3299         (WTF::StringImpl::stripWhiteSpace):
3300         (WTF::StringImpl::removeCharacters):
3301         (WTF::StringImpl::simplifyMatchedCharactersToSpace):
3302         (WTF::StringImpl::simplifyWhiteSpace):
3303         (WTF::StringImpl::replace):
3304         (WTF::StringImpl::adopt):
3305         * wtf/text/StringImpl.h:
3306         (WTF::StringImpl::create8BitIfPossible):
3307         (WTF::StringImpl::create):
3308         (WTF::StringImpl::createSubstringSharingImpl8):
3309         (WTF::StringImpl::createSubstringSharingImpl):
3310         (WTF::StringImpl::createFromLiteral):
3311         (WTF::StringImpl::createEmptyUnique):
3312         (WTF::StringImpl::adopt):
3313         (WTF::StringImpl::replace):
3314         (WTF::StringImpl::constructInternal<LChar>):
3315         (WTF::StringImpl::constructInternal<UChar>):
3316         (WTF::StringImpl::isolatedCopy):
3317         * wtf/text/WTFString.h:
3318         (WTF::String::String):
3319
3320 2014-12-10  Geoffrey Garen  <ggaren@apple.com>
3321
3322         Please disable the webkitFirstVersionWithInitConstructorSupport check on Apple TV
3323         https://bugs.webkit.org/show_bug.cgi?id=139501
3324
3325         Reviewed by Gavin Barraclough.
3326
3327         Added a platform definition for APPLETV.
3328
3329         (It's not an OS because it's not mutually exclusive with other OS definitions.)
3330
3331         * wtf/Platform.h:
3332
3333 2014-12-10  Martin Robinson  <mrobinson@igalia.com>
3334
3335         [GTK] Add support for text-decoration-skip
3336         https://bugs.webkit.org/show_bug.cgi?id=131540
3337
3338         Reviewed by Gustavo Noronha Silva.
3339
3340         * wtf/Platform.h: Enable text decoration skip by default.
3341
3342 2014-12-09  David Kilzer  <ddkilzer@apple.com>
3343
3344         Switch from using PLATFORM_NAME to SDK selectors in ANGLE, bmalloc, gtest, JavaScriptCore, WTF
3345         <http://webkit.org/b/139212>
3346
3347         Reviewed by Joseph Pecoraro.
3348
3349         * Configurations/Base.xcconfig:
3350         - Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
3351           on OS X.
3352         * Configurations/DebugRelease.xcconfig:
3353         - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
3354
3355 2014-12-09  Dean Jackson  <dino@apple.com>
3356
3357         [Apple] Use Accelerate framework to speed-up FEGaussianBlur
3358         https://bugs.webkit.org/show_bug.cgi?id=139310
3359
3360         Unreviewed followup, after comments by Andreas Kling.
3361
3362         It was pointed out that we already have a USE(ACCELERATE), so
3363         we don't need a HAVE(ACCELERATE) :)
3364
3365         * wtf/Platform.h:
3366
3367 2014-12-09  Alberto Garcia  <berto@igalia.com>
3368
3369         Undefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit GTK Mac OS X on Snow Leopard
3370         https://bugs.webkit.org/show_bug.cgi?id=58737
3371
3372         Reviewed by Darin Adler.
3373
3374         Replace OS(MAC_OS_X) with PLATFORM(MAC) to prevent using
3375         osx-specific code in WebKitGTK+ builds.
3376
3377         * wtf/ThreadingPthreads.cpp:
3378         (WTF::initializeCurrentThreadInternal):
3379
3380 2014-12-08  Dean Jackson  <dino@apple.com>
3381
3382         [Apple] Use Accelerate framework to speed-up FEGaussianBlur
3383         https://bugs.webkit.org/show_bug.cgi?id=139310
3384         <rdar://problem/18434594>
3385
3386         Reviewed by Simon Fraser.
3387
3388         Add a HAVE_ACCELERATE flag, true on Apple platforms.
3389
3390         * wtf/Platform.h:
3391
3392 2014-12-08  Myles C. Maxfield  <mmaxfield@apple.com>
3393
3394         Fix iOS build after r176971.
3395
3396         I had previously modified the WTF forwarding header instead of modifying the real source.
3397
3398         * wtf/unicode/CharacterNames.h:
3399
3400 2014-12-08  Anders Carlsson  <andersca@apple.com>
3401
3402         Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
3403         https://bugs.webkit.org/show_bug.cgi?id=139410
3404
3405         Reviewed by Andreas Kling.
3406
3407         * wtf/CurrentTime.cpp:
3408         (WTF::currentCPUTime):
3409         (WTF::currentCPUTimeMS): Deleted.
3410         * wtf/CurrentTime.h:
3411
3412 2014-12-08  Chris Dumez  <cdumez@apple.com>
3413
3414         Revert r176293 & r176275
3415
3416         Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
3417         instead of size_t. There is some disagreement regarding the long-term direction
3418         of the API and we shouldn’t leave the API partly transitioned to unsigned type
3419         while making a decision.
3420
3421         * wtf/Forward.h:
3422         * wtf/Vector.h:
3423         (WTF::VectorTypeOperations::compare):
3424         (WTF::VectorBufferBase::allocateBuffer):
3425         (WTF::VectorBufferBase::tryAllocateBuffer):
3426         (WTF::VectorBufferBase::shouldReallocateBuffer):
3427         (WTF::VectorBufferBase::reallocateBuffer):
3428         (WTF::VectorBufferBase::capacity):
3429         (WTF::VectorBufferBase::VectorBufferBase):
3430         (WTF::VectorBuffer::VectorBuffer):
3431         (WTF::VectorBuffer::allocateBuffer):
3432         (WTF::VectorBuffer::tryAllocateBuffer):
3433         (WTF::VectorBuffer::shouldReallocateBuffer):
3434         (WTF::VectorBuffer::reallocateBuffer):
3435         (WTF::VectorBuffer::swap):
3436         (WTF::VectorBuffer::swapInlineBuffer):
3437         (WTF::VectorBuffer::swapInlineBuffers):
3438         (WTF::Vector::Vector):
3439         (WTF::Vector::capacity):
3440         (WTF::Vector::at):
3441         (WTF::Vector::operator[]):
3442         (WTF::OverflowHandler>::find):
3443         (WTF::OverflowHandler>::reverseFind):
3444         (WTF::OverflowHandler>::fill):
3445         (WTF::OverflowHandler>::expandCapacity):
3446         (WTF::OverflowHandler>::tryExpandCapacity):
3447         (WTF::OverflowHandler>::resize):
3448         (WTF::OverflowHandler>::resizeToFit):
3449         (WTF::OverflowHandler>::shrink):
3450         (WTF::OverflowHandler>::grow):
3451         (WTF::OverflowHandler>::reserveCapacity):
3452         (WTF::OverflowHandler>::tryReserveCapacity):
3453         (WTF::OverflowHandler>::reserveInitialCapacity):
3454         (WTF::OverflowHandler>::shrinkCapacity):
3455         (WTF::OverflowHandler>::append):
3456         (WTF::OverflowHandler>::tryAppend):
3457         (WTF::OverflowHandler>::insert):
3458         (WTF::OverflowHandler>::insertVector):
3459         (WTF::OverflowHandler>::remove):
3460         (WTF::OverflowHandler>::reverse):
3461         (WTF::OverflowHandler>::checkConsistency):
3462         * wtf/text/AtomicString.h:
3463         * wtf/text/StringImpl.h:
3464         (WTF::StringImpl::adopt):
3465         (WTF::equalIgnoringNullity):
3466         * wtf/text/StringView.h:
3467         (WTF::append):
3468         * wtf/text/WTFString.h:
3469
3470 2014-12-07  Andreas Kling  <akling@apple.com>
3471
3472         Use more PassRef in AtomicString.
3473         <https://webkit.org/b/139319>
3474
3475         Reviewed by Antti Koivisto.
3476
3477         Make a pass over AtomicString and convert functions that return PassRefPtr
3478         into returning RefPtr (where it may be null) and PassRef otherwise.
3479         This allows the compiler to skip null checks in many places.
3480
3481         * wtf/text/AtomicString.cpp:
3482         (WTF::addToStringTable):
3483         (WTF::AtomicString::add):
3484         (WTF::AtomicString::addFromLiteralData):
3485         (WTF::AtomicString::addSlowCase):
3486         * wtf/text/AtomicString.h:
3487         (WTF::AtomicString::add):
3488         (WTF::AtomicString::addWithStringTableProvider):
3489         * wtf/text/cf/AtomicStringCF.cpp:
3490         (WTF::AtomicString::add):
3491
3492 2014-12-05  Roger Fong  <roger_fong@apple.com>
3493
3494         [Win] proj files copying over too many resources..
3495         https://bugs.webkit.org/show_bug.cgi?id=139315.
3496         <rdar://problem/19148278>
3497
3498         Reviewed by Brent Fulgham.
3499
3500         * WTF.vcxproj/WTF.proj: Only copy WTF.dll.
3501
3502 2014-12-05  Andreas Kling  <akling@apple.com>
3503
3504         PassRef should deref on destruction if pointee was not moved.
3505         <https://webkit.org/b/139309>
3506
3507         Reviewed by Antti Koivisto.
3508
3509         Let PassRef become nullptr internally after having WTF::move()'d the pointee.
3510         This means that PassRef is now essentially a PassRefPtr that can only be
3511         constructed with a non-null pointee.
3512
3513         This should make it possible for all ::create()-style construction helpers to
3514         return PassRef, removing a branch in each case.
3515
3516         * wtf/PassRef.h:
3517         (WTF::PassRef<T>::PassRef):
3518         (WTF::PassRef<T>::~PassRef):
3519         (WTF::PassRef<T>::get):
3520         (WTF::PassRef<T>::ptr):
3521         (WTF::PassRef<T>::leakRef):
3522         (WTF::PassRef<T>::dropRef): Deleted.
3523
3524 2014-12-05  Jer Noble  <jer.noble@apple.com>
3525
3526         [WTF] MediaTime should support round-tripping from and to doubles.
3527         https://bugs.webkit.org/show_bug.cgi?id=139248
3528
3529         Reviewed by Eric Carlson.
3530
3531         MediaTimes should be able to return precisely the same double value as was used
3532         when the MediaTime was created, so long as that MediaTime was not modified in a
3533         non-destructive way. This will allow API which accepts floating-point values to
3534         return the exact same value when asked, but still be able to store that value
3535         as a MediaTime.
3536
3537         * wtf/MediaTime.cpp:
3538         (WTF::MediaTime::createWithFloat): Added; store the floating-point value in a union.
3539         (WTF::MediaTime::createWithDouble): Ditto.
3540         (WTF::MediaTime::toFloat): If the value is a double, just return it.
3541         (WTF::MediaTime::toDouble): Ditto.
3542         (WTF::MediaTime::operator+): Special case when one or both sides are doubles.
3543         (WTF::MediaTime::operator-): Ditto.
3544         (WTF::MediaTime::operator*): Ditto.
3545         (WTF::MediaTime::compare): Ditto.
3546         (WTF::abs): Ditto.
3547         (WTF::MediaTime::setTimeScale): Convert the MediaTime from a double.
3548
3549 2014-12-05  peavo@outlook.com  <peavo@outlook.com>
3550
3551         [WinCairo] WTF project is missing a GStreamer source file.
3552         https://bugs.webkit.org/show_bug.cgi?id=139296
3553
3554         Reviewed by Philippe Normand.
3555
3556         The WTF project file is missing a GStreamer source file,
3557         causing a link error when compiling with GStreamer enabled.
3558
3559         * WTF.vcxproj/WTF.vcxproj:
3560         * WTF.vcxproj/WTF.vcxproj.filters:
3561
3562 2014-12-04  David Kilzer  <ddkilzer@apple.com>
3563
3564         REGRESSION (r176683): RefCounter.h is installed outside SDKROOT
3565
3566         * WTF.xcodeproj/project.pbxproj: Don't mark RefCounter.h as a
3567         private header.  WTF headers use a special build phase script to
3568         be installed.
3569
3570 2014-12-04  Anders Carlsson  <andersca@apple.com>
3571
3572         Make API::String copy the underlying strings if needed, for thread safety
3573         https://bugs.webkit.org/show_bug.cgi?id=139261
3574
3575         Reviewed by Sam Weinig.
3576
3577         * wtf/RefPtr.h:
3578         (WTF::RefPtr<T>::leakRef):
3579         Add a leakRef() to RefPtr so we don't have to go through PassRefPtr.
3580
3581         * wtf/text/WTFString.cpp:
3582         (WTF::String::isSafeToSendToAnotherThread):
3583         Check if the string is empty before checking whether it's in an atomic string table.
3584         It's safe to send empty strings to other threads even if they're in the atomic string table
3585         since they will never be deallocated.
3586
3587 2014-12-04  Csaba Osztrogonác  <ossy@webkit.org>
3588
3589         Fix cast-align warning in StringImpl.h
3590         https://bugs.webkit.org/show_bug.cgi?id=139222
3591
3592         Reviewed by Anders Carlsson.
3593
3594         * wtf/text/StringImpl.h:
3595         (WTF::StringImpl::tailPointer):
3596
3597 2014-12-02  Mark Lam  <mark.lam@apple.com>
3598
3599         Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
3600         https://bugs.webkit.org/show_bug.cgi?id=138821
3601
3602         Not reviewed.
3603
3604         * WTF.vcxproj/WTF.vcxproj:
3605         * WTF.vcxproj/WTF.vcxproj.filters:
3606         * WTF.xcodeproj/project.pbxproj:
3607         * wtf/IndexedIterator.h: Removed.
3608         * wtf/RefCountedArray.h:
3609         (WTF::RefCountedArray::RefCountedArray):
3610         * wtf/Vector.h:
3611         (WTF::Vector::Vector):
3612         (WTF::Vector::begin):
3613         (WTF::Vector::end):
3614         (WTF::OverflowHandler>::Vector):
3615         (WTF::=):
3616         (WTF::OverflowHandler>::fill):
3617         (WTF::OverflowHandler>::expandCapacity):
3618         (WTF::OverflowHandler>::tryExpandCapacity):
3619         (WTF::OverflowHandler>::resize):
3620         (WTF::OverflowHandler>::shrink):
3621         (WTF::OverflowHandler>::grow):
3622         (WTF::OverflowHandler>::reserveCapacity):
3623         (WTF::OverflowHandler>::tryReserveCapacity):
3624         (WTF::OverflowHandler>::shrinkCapacity):
3625         (WTF::OverflowHandler>::append):
3626         (WTF::OverflowHandler>::tryAppend):
3627         (WTF::OverflowHandler>::appendSlowCase):
3628         (WTF::OverflowHandler>::uncheckedAppend):
3629         (WTF::OverflowHandler>::appendVector):
3630         (WTF::OverflowHandler>::insert):
3631         (WTF::OverflowHandler>::insertVector):
3632         (WTF::OverflowHandler>::remove):
3633
3634 2014-12-02  Oliver Hunt  <oliver@apple.com>
3635
3636         Fix IOS builds.
3637
3638         * wtf/IndexedIterator.h:
3639
3640 2014-12-02  Gavin Barraclough  <barraclough@apple.com>
3641
3642         Generalize PageActivityAssertionToken
3643         https://bugs.webkit.org/show_bug.cgi?id=139106
3644
3645         Reviewed by Sam Weinig.
3646
3647         PageActivityAssertionToken is a RAII mechanism implementing a counter, used by PageThrottler
3648         to count user visible activity in progress on the page (currently page load and media playback).
3649         Use of an RAII type is prevents a number of possible errors, including double counting a single