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