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