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