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