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