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