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