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