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