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