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