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