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