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