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