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