1 2015-06-24 Commit Queue <commit-queue@webkit.org>
3 Unreviewed, rolling out r185906.
4 https://bugs.webkit.org/show_bug.cgi?id=146276
6 MSVC doesn't yet provide a const-qualified std::array<T,
7 N>::size(), failing to compile the static_assert (Requested by
12 "Improve the source code generated by make_names.pl"
13 https://bugs.webkit.org/show_bug.cgi?id=146208
14 http://trac.webkit.org/changeset/185906
16 2015-06-24 Zan Dobersek <zdobersek@igalia.com>
18 Improve the source code generated by make_names.pl
19 https://bugs.webkit.org/show_bug.cgi?id=146208
21 Reviewed by Darin Adler.
23 * wtf/text/StringImpl.h:
24 (WTF::StringImpl::assertHashIsCorrect): Make this method const-qualified.
26 2015-06-22 Darin Adler <darin@apple.com>
28 Make Array.join work directly on substrings without reifying them
29 https://bugs.webkit.org/show_bug.cgi?id=146191
31 Reviewed by Andreas Kling.
33 * wtf/Vector.h: Added an overload of uncheckedAppend like the one we added
34 a while back, a non-template function that forwards through to the function
35 template. This lets us call uncheckedAppend on an argument list and have it
36 properly convert it to the Vector's element type.
38 * wtf/text/StringView.h:
39 (WTF::StringView::getCharactersWithUpconvert): Changed to not use memcpy;
40 saw some indication the hand-written loop was faster when profiling. Also
41 use m_length directly when we know we are dealing with an 8-bit string,
42 since the masking that the index function does is not needed in that case.
43 (WTF::StringView::UpconvertedCharacters::UpconvertedCharacters): Ditto.
44 (WTF::StringView::toString): Ditto.
45 (WTF::StringView::toFloat): Ditto.
46 (WTF::StringView::toInt): Ditto.
47 (WTF::StringView::toStringWithoutCopying): Ditto.
48 (WTF::StringView::find): Ditto.
50 2015-06-22 YunQiang Su <wzssyqa@gmail.com>
52 [WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
53 https://bugs.webkit.org/show_bug.cgi?id=145113
55 Reviewed by Csaba Osztrogonác.
59 2015-06-22 Anders Carlsson <andersca@apple.com>
63 * wtf/threads/BinarySemaphore.cpp:
65 2015-06-22 Anders Carlsson <andersca@apple.com>
67 Get rid of the Windows specific BinarySemaphore implementation
68 https://bugs.webkit.org/show_bug.cgi?id=146216
70 Reviewed by Andreas Kling.
72 The fact that the Windows implementation uses a HEVENT internally was only useful
73 to the Windows port of WebKit2; we can get rid of it now.
75 * WTF.vcxproj/WTF.vcxproj:
76 * WTF.vcxproj/WTF.vcxproj.filters:
77 * wtf/threads/BinarySemaphore.h:
78 (WTF::BinarySemaphore::event): Deleted.
79 * wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
80 (WTF::BinarySemaphore::BinarySemaphore): Deleted.
81 (WTF::BinarySemaphore::~BinarySemaphore): Deleted.
82 (WTF::BinarySemaphore::signal): Deleted.
83 (WTF::BinarySemaphore::wait): Deleted.
85 2015-06-21 Gavin Barraclough <barraclough@apple.com>
87 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
88 https://bugs.webkit.org/show_bug.cgi?id=146198
92 * wtf/glib/GUniquePtr.h:
94 2015-06-20 Michael Catanzaro <mcatanzaro@igalia.com>
96 [EFL][GTK] Define GLIB_VERSION_MIN_REQUIRED and require glib 2.36 for GTK
97 https://bugs.webkit.org/show_bug.cgi?id=146181
99 Reviewed by Martin Robinson.
101 Define GLIB_VERSION_MIN_REQUIRED to avoid deprecation warnings.
105 2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
107 [SOUP] Define SOUP_VERSION_MIN_REQUIRED
108 https://bugs.webkit.org/show_bug.cgi?id=146165
110 Reviewed by Martin Robinson.
112 Define SOUP_VERSION_MIN_REQUIRED to avoid deprecation warnings.
116 2015-06-19 Mark Lam <mark.lam@apple.com>
118 Gardening: build fixes for GTK and EFL for CheckedArithmetic change.
122 * wtf/CheckedArithmetic.h:
123 (WTF::Checked::operator<):
124 (WTF::Checked::operator<=):
125 (WTF::Checked::operator>):
126 (WTF::Checked::operator>=):
128 2015-06-19 Mark Lam <mark.lam@apple.com>
130 CheckedArithmetic's operator bool() and operator==() is broken.
131 https://bugs.webkit.org/show_bug.cgi?id=146129
133 Reviewed by Geoffrey Garen and Oliver Hunt.
135 The existing operator UnspecifiedBoolType*() in CheckedArithmetic is erroneously
136 allowing the Checked value to be implicitly casted into pointer types. This is
137 because it is doing a reinterpret_cast<UnspecifiedBoolType*>(1) whereas the idiom
138 relies on the address of a member e.g. &Checked::m_value. As a result,
139 ImageBufferData::putData() was getting an implicit cast of a Checked value to
140 (void*)1 and doing incorrect pointer comparisons on it.
142 Also, 2 of CheckedArithmetic's operator==() will crash if used on an overflowed
143 value, while a 3rd one does not. The 3rd one should be consistent and also crash
144 if used on an overflowed Checked value.
146 In this fix, we replace operator UnspecifiedBoolType*() with an explicit operator
147 bool(). We also add the missing operators <, <=, >, and >=. That takes care of
148 the comparisons in ImageBufferData::putData().
150 * wtf/CheckedArithmetic.h:
151 (WTF::CrashOnOverflow::overflowed):
152 (WTF::CrashOnOverflow::crash):
153 (WTF::RecordOverflow::crash):
155 (WTF::Checked::operator!):
156 (WTF::Checked::operator bool):
157 (WTF::Checked::unsafeGet):
158 - Don't call CRASH() directly. Delegate to the handler.
160 (WTF::Checked::operator==):
161 - Should call the handler's crash() to be consistent with the other 2 versions of
162 operator== which will crash in unsafeGet() if used on an overflowed Checked
165 (WTF::Checked::operator<):
166 (WTF::Checked::operator<=):
167 (WTF::Checked::operator>):
168 (WTF::Checked::operator>=):
169 - Add missing operators.
171 (WTF::Checked::operator UnspecifiedBoolType*): Deleted.
173 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
175 [WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
176 https://bugs.webkit.org/show_bug.cgi?id=145252
178 Reviewed by Tim Horton.
180 * wtf/FeatureDefines.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC
181 here from Source/WebKit2/WebProcess/WebPage/WebPage.h
183 2015-06-17 Andreas Kling <akling@apple.com>
185 SegmentedVector should waste less memory.
186 <https://webkit.org/b/146069>
188 Reviewed by Anders Carlsson.
190 We were wasting sizeof(Vector) on every segment in SegmentVector.
191 The segments were using inline capacity, and would never go beyond it,
192 so all the size/capacity/out-of-line-buffer metadata was useless.
194 Change the internal representation to Vector<T[SegmentSize]> instead.
195 This saves 16 bytes per segment, so lower SegmentSize -> bigger savings!
197 * wtf/SegmentedVector.h:
198 (WTF::SegmentedVectorIterator::operator*):
199 (WTF::SegmentedVectorIterator::operator->):
200 (WTF::SegmentedVectorIterator::operator++):
201 (WTF::SegmentedVectorIterator::operator==):
202 (WTF::SegmentedVectorIterator::operator!=):
203 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
204 (WTF::SegmentedVector::at):
205 (WTF::SegmentedVector::append):
206 (WTF::SegmentedVector::removeLast):
207 (WTF::SegmentedVector::grow):
208 (WTF::SegmentedVector::begin):
209 (WTF::SegmentedVector::end):
210 (WTF::SegmentedVector::deleteAllSegments):
211 (WTF::SegmentedVector::ensureSegmentsFor):
212 (WTF::SegmentedVector::ensureSegment):
213 (WTF::SegmentedVector::allocateSegment):
214 (WTF::SegmentedVectorIterator::operator=): Deleted.
215 (WTF::SegmentedVector::SegmentedVector): Deleted.
217 2015-06-16 Andreas Kling <akling@apple.com>
219 Remove unused template parameter InlineCapacity from SegmentedVector.
220 <https://webkit.org/b/146044>
222 Reviewed by Anders Carlsson.
224 * wtf/SegmentedVector.h:
225 (WTF::SegmentedVectorIterator::operator=):
226 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
227 (WTF::SegmentedVector::at):
229 2015-06-16 Mark Lam <mark.lam@apple.com>
231 Use NakedPtr<Exception>& to return exception results.
232 https://bugs.webkit.org/show_bug.cgi?id=145870
234 Reviewed by Anders Carlsson and Filip Pizlo.
236 Introducing the NakedPtr class.
238 * WTF.xcodeproj/project.pbxproj:
239 * wtf/NakedPtr.h: Added.
240 (WTF::NakedPtr::NakedPtr):
241 (WTF::NakedPtr::get):
242 (WTF::NakedPtr::clear):
243 (WTF::NakedPtr::operator*):
244 (WTF::NakedPtr::operator->):
245 (WTF::NakedPtr::operator T*):
246 (WTF::NakedPtr::operator!):
247 (WTF::NakedPtr::operator bool):
249 (WTF::NakedPtr<T>::swap):
252 2015-06-12 Zan Dobersek <zdobersek@igalia.com>
254 [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
255 https://bugs.webkit.org/show_bug.cgi?id=145799
257 Reviewed by Carlos Garcia Campos.
259 Move the GLib-specific files to the Source/WTF/wtf/glib/ directory.
260 'gobject' wasn't the most appropriate name for the directory since
261 GObject is a submodule of GLib, but a lot of the code there didn't
262 have much to do with GObject specifically.
264 Build rules for the moved files are also updated.
266 * WTF.vcxproj/WTF.vcxproj:
267 * WTF.vcxproj/WTF.vcxproj.filters:
269 * wtf/PlatformEfl.cmake:
270 * wtf/PlatformGTK.cmake:
273 * wtf/glib/GLibUtilities.cpp: Renamed from Source/WTF/wtf/gobject/GlibUtilities.cpp.
274 (getCurrentExecutablePath):
275 * wtf/glib/GLibUtilities.h: Renamed from Source/WTF/wtf/gobject/GlibUtilities.h.
276 * wtf/glib/GMainLoopSource.cpp: Renamed from Source/WTF/wtf/gobject/GMainLoopSource.cpp.
277 (WTF::GMainLoopSource::create):
278 (WTF::GMainLoopSource::GMainLoopSource):
279 (WTF::GMainLoopSource::~GMainLoopSource):
280 (WTF::GMainLoopSource::isScheduled):
281 (WTF::GMainLoopSource::isActive):
282 (WTF::GMainLoopSource::cancel):
283 (WTF::GMainLoopSource::scheduleIdleSource):
284 (WTF::GMainLoopSource::schedule):
285 (WTF::GMainLoopSource::scheduleTimeoutSource):
286 (WTF::GMainLoopSource::scheduleAfterDelay):
287 (WTF::createMicrosecondsTimeoutSource):
288 (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy):
289 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy):
290 (WTF::GMainLoopSource::prepareVoidCallback):
291 (WTF::GMainLoopSource::finishVoidCallback):
292 (WTF::GMainLoopSource::voidCallback):
293 (WTF::GMainLoopSource::prepareBoolCallback):
294 (WTF::GMainLoopSource::finishBoolCallback):
295 (WTF::GMainLoopSource::boolCallback):
296 (WTF::GMainLoopSource::socketCallback):
297 (WTF::GMainLoopSource::voidSourceCallback):
298 (WTF::GMainLoopSource::boolSourceCallback):
299 (WTF::GMainLoopSource::socketSourceCallback):
300 (WTF::GMainLoopSource::Context::destroySource):
301 * wtf/glib/GMainLoopSource.h: Renamed from Source/WTF/wtf/gobject/GMainLoopSource.h.
302 (WTF::GMainLoopSource::Context::operator=):
303 * wtf/glib/GMutexLocker.h: Renamed from Source/WTF/wtf/gobject/GMutexLocker.h.
304 (WTF::MutexWrapper<GMutex>::lock):
305 (WTF::MutexWrapper<GMutex>::unlock):
306 (WTF::MutexWrapper<GRecMutex>::lock):
307 (WTF::MutexWrapper<GRecMutex>::unlock):
308 (WTF::GMutexLocker::GMutexLocker):
309 (WTF::GMutexLocker::~GMutexLocker):
310 (WTF::GMutexLocker::lock):
311 (WTF::GMutexLocker::unlock):
312 * wtf/glib/GRefPtr.cpp: Renamed from Source/WTF/wtf/gobject/GRefPtr.cpp.
315 * wtf/glib/GRefPtr.h: Renamed from Source/WTF/wtf/gobject/GRefPtr.h.
316 (WTF::GRefPtr::GRefPtr):
317 (WTF::GRefPtr::~GRefPtr):
318 (WTF::GRefPtr::clear):
319 (WTF::GRefPtr::outPtr):
320 (WTF::GRefPtr::isHashTableDeletedValue):
322 (WTF::GRefPtr::operator*):
323 (WTF::GRefPtr::operator->):
324 (WTF::GRefPtr::operator!):
325 (WTF::GRefPtr::operator UnspecifiedBoolType):
326 (WTF::GRefPtr::hashTableDeletedValue):
328 (WTF::GRefPtr<T>::swap):
332 (WTF::static_pointer_cast):
333 (WTF::const_pointer_cast):
337 * wtf/glib/GThreadSafeMainLoopSource.cpp: Renamed from Source/WTF/wtf/gobject/GThreadSafeMainLoopSource.cpp.
338 (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource):
339 (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource):
340 (WTF::GThreadSafeMainLoopSource::cancel):
341 (WTF::GThreadSafeMainLoopSource::schedule):
342 (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay):
343 (WTF::GThreadSafeMainLoopSource::prepareVoidCallback):
344 (WTF::GThreadSafeMainLoopSource::finishVoidCallback):
345 (WTF::GThreadSafeMainLoopSource::voidCallback):
346 (WTF::GThreadSafeMainLoopSource::prepareBoolCallback):
347 (WTF::GThreadSafeMainLoopSource::finishBoolCallback):
348 (WTF::GThreadSafeMainLoopSource::boolCallback):
349 * wtf/glib/GThreadSafeMainLoopSource.h: Renamed from Source/WTF/wtf/gobject/GThreadSafeMainLoopSource.h.
350 * wtf/glib/GTypedefs.h: Renamed from Source/WTF/wtf/gobject/GTypedefs.h.
351 * wtf/glib/GUniquePtr.h: Renamed from Source/WTF/wtf/gobject/GUniquePtr.h.
352 (WTF::GPtrDeleter::operator()):
353 (WTF::GUniqueOutPtr::GUniqueOutPtr):
354 (WTF::GUniqueOutPtr::~GUniqueOutPtr):
355 (WTF::GUniqueOutPtr::outPtr):
356 (WTF::GUniqueOutPtr::release):
357 (WTF::GUniqueOutPtr::operator*):
358 (WTF::GUniqueOutPtr::operator->):
359 (WTF::GUniqueOutPtr::get):
360 (WTF::GUniqueOutPtr::operator!):
361 (WTF::GUniqueOutPtr::operator UnspecifiedBoolType):
362 (WTF::GUniqueOutPtr::reset):
363 * wtf/glib/MainThreadGLib.cpp:
364 * wtf/gobject/GMainLoopSource.cpp:
365 (WTF::GMainLoopSource::create): Deleted.
366 (WTF::GMainLoopSource::GMainLoopSource): Deleted.
367 (WTF::GMainLoopSource::~GMainLoopSource): Deleted.
368 (WTF::GMainLoopSource::isScheduled): Deleted.
369 (WTF::GMainLoopSource::isActive): Deleted.
370 (WTF::GMainLoopSource::cancel): Deleted.
371 (WTF::GMainLoopSource::scheduleIdleSource): Deleted.
372 (WTF::GMainLoopSource::schedule): Deleted.
373 (WTF::GMainLoopSource::scheduleTimeoutSource): Deleted.
374 (WTF::GMainLoopSource::scheduleAfterDelay): Deleted.
375 (WTF::createMicrosecondsTimeoutSource): Deleted.
376 (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy): Deleted.
377 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Deleted.
378 (WTF::GMainLoopSource::prepareVoidCallback): Deleted.
379 (WTF::GMainLoopSource::finishVoidCallback): Deleted.
380 (WTF::GMainLoopSource::voidCallback): Deleted.
381 (WTF::GMainLoopSource::prepareBoolCallback): Deleted.
382 (WTF::GMainLoopSource::finishBoolCallback): Deleted.
383 (WTF::GMainLoopSource::boolCallback): Deleted.
384 (WTF::GMainLoopSource::socketCallback): Deleted.
385 (WTF::GMainLoopSource::voidSourceCallback): Deleted.
386 (WTF::GMainLoopSource::boolSourceCallback): Deleted.
387 (WTF::GMainLoopSource::socketSourceCallback): Deleted.
388 (WTF::GMainLoopSource::Context::destroySource): Deleted.
389 * wtf/gobject/GMainLoopSource.h:
390 (WTF::GMainLoopSource::Context::operator=): Deleted.
391 * wtf/gobject/GMutexLocker.h:
392 (WTF::MutexWrapper<GMutex>::lock): Deleted.
393 (WTF::MutexWrapper<GMutex>::unlock): Deleted.
394 (WTF::MutexWrapper<GRecMutex>::lock): Deleted.
395 (WTF::MutexWrapper<GRecMutex>::unlock): Deleted.
396 (WTF::GMutexLocker::GMutexLocker): Deleted.
397 (WTF::GMutexLocker::~GMutexLocker): Deleted.
398 (WTF::GMutexLocker::lock): Deleted.
399 (WTF::GMutexLocker::unlock): Deleted.
400 * wtf/gobject/GRefPtr.cpp:
401 (WTF::refGPtr): Deleted.
402 (WTF::derefGPtr): Deleted.
403 * wtf/gobject/GRefPtr.h:
404 (WTF::GRefPtr::GRefPtr): Deleted.
405 (WTF::GRefPtr::~GRefPtr): Deleted.
406 (WTF::GRefPtr::clear): Deleted.
407 (WTF::GRefPtr::outPtr): Deleted.
408 (WTF::GRefPtr::isHashTableDeletedValue): Deleted.
409 (WTF::GRefPtr::get): Deleted.
410 (WTF::GRefPtr::operator*): Deleted.
411 (WTF::GRefPtr::operator->): Deleted.
412 (WTF::GRefPtr::operator!): Deleted.
413 (WTF::GRefPtr::operator UnspecifiedBoolType): Deleted.
414 (WTF::GRefPtr::hashTableDeletedValue): Deleted.
416 (WTF::GRefPtr<T>::swap): Deleted.
417 (WTF::swap): Deleted.
418 (WTF::operator==): Deleted.
419 (WTF::operator!=): Deleted.
420 (WTF::static_pointer_cast): Deleted.
421 (WTF::const_pointer_cast): Deleted.
422 (WTF::adoptGRef): Deleted.
423 (WTF::refGPtr): Deleted.
424 (WTF::derefGPtr): Deleted.
425 * wtf/gobject/GThreadSafeMainLoopSource.cpp:
426 (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource): Deleted.
427 (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource): Deleted.
428 (WTF::GThreadSafeMainLoopSource::cancel): Deleted.
429 (WTF::GThreadSafeMainLoopSource::schedule): Deleted.
430 (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay): Deleted.
431 (WTF::GThreadSafeMainLoopSource::prepareVoidCallback): Deleted.
432 (WTF::GThreadSafeMainLoopSource::finishVoidCallback): Deleted.
433 (WTF::GThreadSafeMainLoopSource::voidCallback): Deleted.
434 (WTF::GThreadSafeMainLoopSource::prepareBoolCallback): Deleted.
435 (WTF::GThreadSafeMainLoopSource::finishBoolCallback): Deleted.
436 (WTF::GThreadSafeMainLoopSource::boolCallback): Deleted.
437 * wtf/gobject/GUniquePtr.h:
438 (WTF::GPtrDeleter::operator()): Deleted.
439 (WTF::GUniqueOutPtr::GUniqueOutPtr): Deleted.
440 (WTF::GUniqueOutPtr::~GUniqueOutPtr): Deleted.
441 (WTF::GUniqueOutPtr::outPtr): Deleted.
442 (WTF::GUniqueOutPtr::release): Deleted.
443 (WTF::GUniqueOutPtr::operator*): Deleted.
444 (WTF::GUniqueOutPtr::operator->): Deleted.
445 (WTF::GUniqueOutPtr::get): Deleted.
446 (WTF::GUniqueOutPtr::operator!): Deleted.
447 (WTF::GUniqueOutPtr::operator UnspecifiedBoolType): Deleted.
448 (WTF::GUniqueOutPtr::reset): Deleted.
449 * wtf/gobject/GlibUtilities.cpp:
450 (getCurrentExecutablePath): Deleted.
452 2015-06-10 Basile Clement <basile_clement@apple.com>
454 Unreviewed, fix an typo in unused template code.
457 (WTF::TinyPtrSet::iterator::operator*): s/at(index)/at(m_index)/
459 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
461 [cmake] Fix the style issues in cmake project files
462 https://bugs.webkit.org/show_bug.cgi?id=145755
464 Reviewed by Darin Adler.
466 * wtf/CMakeLists.txt:
468 2015-06-08 Alexey Proskuryakov <ap@apple.com>
472 * wtf/TinyPtrSet.h: (WTF::TinyPtrSet::isEmpty): s/poointer/pointer/
474 2015-06-07 Filip Pizlo <fpizlo@apple.com>
476 The tiny set magic in StructureSet should be available in WTF
477 https://bugs.webkit.org/show_bug.cgi?id=145722
479 Reviewed by Geoffrey Garen.
481 As the management of structure sets evolved in JSC, the StructureSet data structure grew
482 increasingly smart. It's got some smart stuff for managing small sets of pointers. I
483 wanted to take the generic logic out of JSC and put it into a reusable templatized class
486 * WTF.vcxproj/WTF.vcxproj:
487 * WTF.xcodeproj/project.pbxproj:
488 * wtf/CMakeLists.txt:
489 * wtf/TinyPtrSet.h: Added.
490 (WTF::TinyPtrSet::TinyPtrSet):
491 (WTF::TinyPtrSet::operator=):
492 (WTF::TinyPtrSet::~TinyPtrSet):
493 (WTF::TinyPtrSet::clear):
494 (WTF::TinyPtrSet::onlyEntry):
495 (WTF::TinyPtrSet::isEmpty):
496 (WTF::TinyPtrSet::add):
497 (WTF::TinyPtrSet::remove):
498 (WTF::TinyPtrSet::contains):
499 (WTF::TinyPtrSet::merge):
500 (WTF::TinyPtrSet::forEach):
501 (WTF::TinyPtrSet::genericFilter):
502 (WTF::TinyPtrSet::filter):
503 (WTF::TinyPtrSet::exclude):
504 (WTF::TinyPtrSet::isSubsetOf):
505 (WTF::TinyPtrSet::isSupersetOf):
506 (WTF::TinyPtrSet::overlaps):
507 (WTF::TinyPtrSet::size):
508 (WTF::TinyPtrSet::at):
509 (WTF::TinyPtrSet::operator[]):
510 (WTF::TinyPtrSet::last):
511 (WTF::TinyPtrSet::iterator::iterator):
512 (WTF::TinyPtrSet::iterator::operator*):
513 (WTF::TinyPtrSet::iterator::operator++):
514 (WTF::TinyPtrSet::iterator::operator==):
515 (WTF::TinyPtrSet::iterator::operator!=):
516 (WTF::TinyPtrSet::begin):
517 (WTF::TinyPtrSet::end):
518 (WTF::TinyPtrSet::operator==):
519 (WTF::TinyPtrSet::addOutOfLine):
520 (WTF::TinyPtrSet::containsOutOfLine):
521 (WTF::TinyPtrSet::copyFrom):
522 (WTF::TinyPtrSet::copyFromOutOfLine):
523 (WTF::TinyPtrSet::OutOfLineList::create):
524 (WTF::TinyPtrSet::OutOfLineList::destroy):
525 (WTF::TinyPtrSet::OutOfLineList::list):
526 (WTF::TinyPtrSet::OutOfLineList::OutOfLineList):
527 (WTF::TinyPtrSet::deleteListIfNecessary):
528 (WTF::TinyPtrSet::isThin):
529 (WTF::TinyPtrSet::pointer):
530 (WTF::TinyPtrSet::singleEntry):
531 (WTF::TinyPtrSet::list):
532 (WTF::TinyPtrSet::set):
533 (WTF::TinyPtrSet::setEmpty):
534 (WTF::TinyPtrSet::getReservedFlag):
535 (WTF::TinyPtrSet::setReservedFlag):
537 2015-06-05 Chris Dumez <cdumez@apple.com>
539 [WK2][iOS] Limit the number of vnodes used by the WebContent processes
540 https://bugs.webkit.org/show_bug.cgi?id=145672
541 <rdar://problem/21126637>
543 Reviewed by Antti Koivisto.
546 (WTF::RefCounter::value):
548 Expose the actual refcount instead of a boolean value.
550 2015-06-05 Alex Christensen <achristensen@webkit.org>
552 [Web Timing] Use new SPI to enable data collection.
553 https://bugs.webkit.org/show_bug.cgi?id=145650
554 rdar://problem/21203358
556 Reviewed by Chris Dumez.
559 Added HAVE_TIMINGDATAOPTIONS for platform and version dependent feature.
561 2015-06-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
563 [Streams API] ReadableStream should store callbacks as a Deque
564 https://bugs.webkit.org/show_bug.cgi?id=145641
566 Reviewed by Darin Adler.
569 (WTF::Deque::append): Adding not templated append method, forwarding to templated append method.
571 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
573 [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
574 https://bugs.webkit.org/show_bug.cgi?id=144907
576 Reviewed by Darin Adler.
579 (WTF::Vector::append): Adding not templated append method, forwarding to ValueType templated append method.
581 2015-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
583 Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
584 https://bugs.webkit.org/show_bug.cgi?id=145532
586 Reviewed by Geoffrey Garen.
588 Return `RefPtr<AtomicStringImpl>` instead of `AtomicStringImpl*`.
590 * wtf/text/AtomicStringImpl.cpp:
591 (WTF::AtomicStringImpl::lookUpSlowCase):
592 (WTF::AtomicStringImpl::lookUpInternal):
593 * wtf/text/AtomicStringImpl.h:
594 (WTF::AtomicStringImpl::lookUp):
596 2015-06-01 Anders Carlsson <andersca@apple.com>
598 Use xpc_connection_set_oneshot_instance where possible
599 https://bugs.webkit.org/show_bug.cgi?id=145535
600 rdar://problem/21109994
602 Reviewed by Sam Weinig.
606 * wtf/spi/darwin/XPCSPI.h:
608 2015-05-29 Anders Carlsson <andersca@apple.com>
610 Missing #import of Platform.h in several WTF headers
611 https://bugs.webkit.org/show_bug.cgi?id=145475
612 rdar://problem/21161818
614 Reviewed by Darin Adler.
616 Add Platform.h #includes.
621 2015-05-29 Commit Queue <commit-queue@webkit.org>
623 Unreviewed, rolling out r184949.
624 https://bugs.webkit.org/show_bug.cgi?id=145458
626 Ends up generating worse code for HashTable move constructors
627 (Requested by zdobersek on #webkit).
631 "Clean up HashTable constructors"
632 https://bugs.webkit.org/show_bug.cgi?id=145369
633 http://trac.webkit.org/changeset/184949
635 2015-05-28 Gyuyoung Kim <gyuyoung.kim@webkit.org>
637 Purge PassRefPtr in StringConcatenate.h
638 https://bugs.webkit.org/show_bug.cgi?id=145376
640 Reviewed by Darin Adler.
642 Replace PassRefPtr with RefPtr. Additionally use nullptr instead of 0.
644 * wtf/text/StringConcatenate.h:
645 (WTF::tryMakeString):
648 2015-05-28 Zan Dobersek <zdobersek@igalia.com>
650 Clean up HashTable constructors
651 https://bugs.webkit.org/show_bug.cgi?id=145369
653 Reviewed by Andreas Kling.
655 Use nullptr to initialize pointer member variables in the HashTable
656 default constructor. Copy and move constructors can use constructor
657 delegation instead of replicating all member initializations. Move
658 constructor should simply call HashTable::swap() instead of replicating
659 all the swap operations.
662 (WTF::KeyTraits>::HashTable):
664 2015-05-27 Alexey Proskuryakov <ap@apple.com>
666 [Mac] Fix clang static analyzer build
667 https://bugs.webkit.org/show_bug.cgi?id=145426
668 rdar://problem/20947408
670 Reviewed by Dan Bernstein.
672 * wtf/spi/darwin/XPCSPI.h: Correct declarations of xpc_retain and xpc_release.
674 2015-05-27 Dean Jackson <dino@apple.com>
676 img.currentSrc problem in strict mode with old picturefill
677 https://bugs.webkit.org/show_bug.cgi?id=144095
678 <rdar://problem/21087013>
680 Reviewed by Simon Fraser.
682 Add a PICTURE_SIZES flag.
684 * wtf/FeatureDefines.h:
686 2015-05-26 Andreas Kling <akling@apple.com>
688 StringView should have find(StringView, start).
689 <https://webkit.org/b/145351>
691 Reviewed by Darin Adler.
693 Move the class agnostic guts of StringImpl's find() implementation from StringImpl
694 to StringCommon.h and templatize the code into a findCommon() helper.
696 StringImpl::find() and StringView::find() now both call findCommon().
698 * wtf/text/StringCommon.h:
702 * wtf/text/StringImpl.cpp:
703 (WTF::StringImpl::find):
704 (WTF::findInner): Deleted.
705 * wtf/text/StringImpl.h:
706 (WTF::find): Deleted.
707 * wtf/text/StringView.cpp:
708 (WTF::StringView::find):
709 * wtf/text/StringView.h:
712 2015-05-26 Dan Bernstein <mitz@apple.com>
714 <rdar://problem/21104551> Update build settings
716 Reviewed by Anders Carlsson.
718 * Configurations/DebugRelease.xcconfig:
720 2015-05-23 Dan Bernstein <mitz@apple.com>
722 Remove unused definitions of WEBKIT_VERSION_MIN_REQUIRED
723 https://bugs.webkit.org/show_bug.cgi?id=145345
725 Reviewed by Sam Weinig.
727 * Configurations/Base.xcconfig: Also changed to use $(inherited).
729 2015-05-23 Yusuke Suzuki <utatane.tea@gmail.com>
731 Introduce UniquedStringImpl and SymbolImpl to separate symbolic strings from AtomicStringImpl
732 https://bugs.webkit.org/show_bug.cgi?id=144848
734 Reviewed by Darin Adler.
736 he current AtomicStringImpl accidentally means the symbol OR atomic StringImpl.
737 t's not correct to its name and it's error prone.
739 In this patch, we'll introduce/changes classes into WTF.
742 It's derived class from StringImpl. And it represents symbol || atomic StringImpl.
745 It's derived class from UniquedStringImpl. Only symbol strings can become this.
746 It ensures the given StringImpl is symbol in compile time.
749 It's derived class from UniquedStringImpl. Only atomic (non-normal && non-symbol) strings can become this.
750 It ensures the given StringImpl is atomic in compile time.
752 And, in this time, I just accept UniqueStringImpl in AtomicString. As the result,
753 1. Now AtomicStringImpl issue is fixed. Its SymbolImpl is separated and UniquedStringImpl is introduced.
754 2. But AtomicString still have both symbol and atomic strings.
755 This should be solved in the separated patch.
757 * WTF.vcxproj/WTF.vcxproj:
758 * WTF.vcxproj/WTF.vcxproj.filters:
759 * WTF.xcodeproj/project.pbxproj:
760 * wtf/CMakeLists.txt:
761 * wtf/PrintStream.cpp:
763 (WTF::printInternal):
764 * wtf/text/AtomicString.h:
765 (WTF::AtomicString::AtomicString):
766 * wtf/text/AtomicStringImpl.h:
767 * wtf/text/StringImpl.cpp:
768 (WTF::StringImpl::~StringImpl):
769 (WTF::StringImpl::createSymbol):
770 (WTF::StringImpl::createSymbolEmpty):
771 * wtf/text/StringImpl.h:
772 * wtf/text/SymbolImpl.h: Copied from Source/JavaScriptCore/runtime/PrivateName.h.
773 * wtf/text/SymbolRegistry.cpp:
774 (WTF::SymbolRegistry::symbolForKey):
775 (WTF::SymbolRegistry::keyForSymbol):
776 (WTF::SymbolRegistry::remove):
777 * wtf/text/SymbolRegistry.h:
778 * wtf/text/UniquedStringImpl.h: Copied from Source/JavaScriptCore/runtime/PrivateName.h.
780 2015-05-20 Zan Dobersek <zdobersek@igalia.com>
782 [GTK] Move MainThreadGtk, RunLoopGtk, WorkQueueGtk under Source/WTF/wtf/glib/
783 https://bugs.webkit.org/show_bug.cgi?id=145117
785 Reviewed by Csaba Osztrogonác.
787 Move the MainThreadGtk, RunLoopGtk and WorkQueueGtk implementation files from
788 Source/WTF/wtf/gtk/ to Source/WTF/wtf/glib/. These implementations are not
789 GTK-specific and only depend on GLib, so they are renamed as well.
791 There are other such implementations under Source/WTF/wtf/gobject/ (GObject
792 is just a subset of GLib) that will be moved under the new directory in
795 * wtf/PlatformGTK.cmake:
796 * wtf/glib/MainThreadGLib.cpp: Renamed from Source/WTF/wtf/gtk/MainThreadGtk.cpp.
797 (WTF::initializeMainThreadPlatform):
798 (WTF::scheduleDispatchFunctionsOnMainThread):
799 * wtf/glib/RunLoopGLib.cpp: Renamed from Source/WTF/wtf/gtk/RunLoopGtk.cpp.
800 (WTF::RunLoop::RunLoop):
801 (WTF::RunLoop::~RunLoop):
803 (WTF::RunLoop::stop):
804 (WTF::RunLoop::wakeUp):
805 (WTF::RunLoop::TimerBase::TimerBase):
806 (WTF::RunLoop::TimerBase::~TimerBase):
807 (WTF::RunLoop::TimerBase::start):
808 (WTF::RunLoop::TimerBase::stop):
809 (WTF::RunLoop::TimerBase::isActive):
810 * wtf/glib/WorkQueueGLib.cpp: Renamed from Source/WTF/wtf/gtk/WorkQueueGtk.cpp.
811 (WTF::WorkQueue::platformInitialize):
812 (WTF::WorkQueue::platformInvalidate):
813 (WTF::WorkQueue::registerSocketEventHandler):
814 (WTF::WorkQueue::unregisterSocketEventHandler):
815 (WTF::WorkQueue::dispatch):
816 (WTF::WorkQueue::dispatchAfter):
818 2015-05-19 Andreas Kling <akling@apple.com>
820 Give StringView a utf8() API.
821 <https://webkit.org/b/145201>
823 Reviewed by Anders Carlsson
825 Added an LChar version of StringImpl::utf8ForCharacters() and use that to give
826 StringView a utf8() API just like String has.
828 * wtf/text/StringImpl.cpp:
829 (WTF::StringImpl::utf8ForCharacters):
830 * wtf/text/StringImpl.h:
831 * wtf/text/StringView.cpp:
832 (WTF::StringView::utf8):
833 * wtf/text/StringView.h:
835 2015-05-19 Yusuke Suzuki <utatane.tea@gmail.com>
837 Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
838 https://bugs.webkit.org/show_bug.cgi?id=145109
840 Reviewed by Darin Adler.
842 Now AtomicStringImpl table operations are located in AtomicString.
843 But they should be under AtomicStringImpl.
844 This patch simply moves these operations to AtomicStringImpl.
846 And this patch renames static AtomicString::find to static AtomicStringImpl::lookUp
847 because it conflicts with AtomicStringImpl's member function name.
849 * WTF.vcxproj/WTF.vcxproj:
850 * WTF.vcxproj/WTF.vcxproj.filters:
851 * WTF.vcxproj/copy-files.cmd:
852 * WTF.xcodeproj/project.pbxproj:
853 * wtf/CMakeLists.txt:
854 * wtf/PlatformMac.cmake:
855 * wtf/PlatformWin.cmake:
856 * wtf/text/AtomicString.cpp:
857 (WTF::AtomicString::lower):
858 (WTF::AtomicString::convertToASCIILowercase):
859 (WTF::AtomicString::fromUTF8Internal):
860 (WTF::AtomicStringTableLocker::AtomicStringTableLocker): Deleted.
861 (WTF::stringTable): Deleted.
862 (WTF::addToStringTable): Deleted.
863 (WTF::CStringTranslator::hash): Deleted.
864 (WTF::CStringTranslator::equal): Deleted.
865 (WTF::CStringTranslator::translate): Deleted.
866 (WTF::AtomicString::add): Deleted.
867 (WTF::UCharBufferTranslator::hash): Deleted.
868 (WTF::UCharBufferTranslator::equal): Deleted.
869 (WTF::UCharBufferTranslator::translate): Deleted.
870 (WTF::HashAndCharactersTranslator::hash): Deleted.
871 (WTF::HashAndCharactersTranslator::equal): Deleted.
872 (WTF::HashAndCharactersTranslator::translate): Deleted.
873 (WTF::HashAndUTF8CharactersTranslator::hash): Deleted.
874 (WTF::HashAndUTF8CharactersTranslator::equal): Deleted.
875 (WTF::HashAndUTF8CharactersTranslator::translate): Deleted.
876 (WTF::SubstringTranslator::translate): Deleted.
877 (WTF::SubstringTranslator8::hash): Deleted.
878 (WTF::SubstringTranslator8::equal): Deleted.
879 (WTF::SubstringTranslator16::hash): Deleted.
880 (WTF::SubstringTranslator16::equal): Deleted.
881 (WTF::LCharBufferTranslator::hash): Deleted.
882 (WTF::LCharBufferTranslator::equal): Deleted.
883 (WTF::LCharBufferTranslator::translate): Deleted.
884 (WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
885 (WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
886 (WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
887 (WTF::AtomicString::addFromLiteralData): Deleted.
888 (WTF::AtomicString::addSlowCase): Deleted.
889 (WTF::AtomicString::remove): Deleted.
890 (WTF::AtomicString::findSlowCase): Deleted.
891 (WTF::AtomicString::findInternal): Deleted.
892 (WTF::AtomicString::isInAtomicStringTable): Deleted.
893 * wtf/text/AtomicString.h:
894 (WTF::AtomicString::AtomicString):
895 (WTF::AtomicString::fromUTF8):
896 (WTF::AtomicString::find): Deleted.
897 (WTF::AtomicString::add): Deleted.
898 (WTF::AtomicString::addWithStringTableProvider): Deleted.
899 * wtf/text/AtomicStringImpl.cpp: Copied from Source/WTF/wtf/text/AtomicString.cpp.
900 (WTF::AtomicStringTableLocker::AtomicStringTableLocker):
902 (WTF::addToStringTable):
903 (WTF::CStringTranslator::hash):
904 (WTF::CStringTranslator::equal):
905 (WTF::CStringTranslator::translate):
906 (WTF::AtomicStringImpl::add):
907 (WTF::UCharBufferTranslator::hash):
908 (WTF::UCharBufferTranslator::equal):
909 (WTF::UCharBufferTranslator::translate):
910 (WTF::HashAndCharactersTranslator::hash):
911 (WTF::HashAndCharactersTranslator::equal):
912 (WTF::HashAndCharactersTranslator::translate):
913 (WTF::HashAndUTF8CharactersTranslator::hash):
914 (WTF::HashAndUTF8CharactersTranslator::equal):
915 (WTF::HashAndUTF8CharactersTranslator::translate):
916 (WTF::SubstringTranslator::translate):
917 (WTF::SubstringTranslator8::hash):
918 (WTF::SubstringTranslator8::equal):
919 (WTF::SubstringTranslator16::hash):
920 (WTF::SubstringTranslator16::equal):
921 (WTF::LCharBufferTranslator::hash):
922 (WTF::LCharBufferTranslator::equal):
923 (WTF::LCharBufferTranslator::translate):
924 (WTF::CharBufferFromLiteralDataTranslator::hash):
925 (WTF::CharBufferFromLiteralDataTranslator::equal):
926 (WTF::CharBufferFromLiteralDataTranslator::translate):
927 (WTF::AtomicStringImpl::addLiteral):
928 (WTF::AtomicStringImpl::addSlowCase):
929 (WTF::AtomicStringImpl::remove):
930 (WTF::AtomicStringImpl::lookUpSlowCase):
931 (WTF::AtomicStringImpl::addUTF8):
932 (WTF::AtomicStringImpl::lookUpInternal):
933 (WTF::AtomicStringImpl::isInAtomicStringTable):
934 * wtf/text/AtomicStringImpl.h:
935 (WTF::AtomicStringImpl::lookUp):
936 (WTF::AtomicStringImpl::add):
937 (WTF::AtomicStringImpl::addWithStringTableProvider):
938 (WTF::AtomicStringImpl::AtomicStringImpl): Deleted.
939 * wtf/text/StringImpl.cpp:
940 (WTF::StringImpl::~StringImpl):
941 * wtf/text/StringImpl.h:
942 * wtf/text/WTFString.h:
943 (WTF::String::String):
944 * wtf/text/cf/AtomicStringCF.cpp:
945 (WTF::AtomicString::add): Deleted.
946 * wtf/text/cf/AtomicStringImplCF.cpp: Renamed from Source/WTF/wtf/text/cf/AtomicStringCF.cpp.
947 (WTF::AtomicStringImpl::add):
949 2015-05-19 Ting-Wei Lan <lantw44@gmail.com>
951 [SOUP] Use st_birthtime to get creation time of files on systems support it
952 https://bugs.webkit.org/show_bug.cgi?id=144989
954 Reviewed by Carlos Garcia Campos.
956 Define HAVE(STAT_BIRTHTIME) as 1 on operating systems supporting
957 getting creation time of files using st_birthtime in stat.
961 2015-05-19 Chris Dumez <cdumez@apple.com>
963 Mark static variables as const when possible
964 https://bugs.webkit.org/show_bug.cgi?id=145161
966 Reviewed by Andreas Kling.
971 2015-05-19 Gyuyoung Kim <gyuyoung.kim@webkit.org>
973 [EFL] Remove unnecessary PLATFORM(EFL) macro in EFL specific files
974 https://bugs.webkit.org/show_bug.cgi?id=145160
976 Reviewed by Csaba Osztrogonác.
978 * wtf/efl/EflTypedefs.h: Remove PLATFORM(EFL).
979 * wtf/efl/UniquePtrEfl.h: ditto.
981 2015-05-18 Michael Catanzaro <mcatanzaro@igalia.com>
983 [CMake] Ignore warnings in system headers
984 https://bugs.webkit.org/show_bug.cgi?id=144747
986 Reviewed by Darin Adler.
988 Separate include directories into WebKit project includes and system includes. Suppress all
989 warnings from headers in system include directories using the SYSTEM argument to
990 the include_directories command.
992 * wtf/CMakeLists.txt:
993 * wtf/PlatformEfl.cmake:
994 * wtf/PlatformGTK.cmake:
996 2015-05-18 Myles C. Maxfield <mmaxfield@apple.com>
998 Addressing post-review comments on r184353
999 https://bugs.webkit.org/show_bug.cgi?id=145146
1001 Reviewed by Benjamin Poulain.
1003 Create an overload for equalIgnoringASCIICase() for AtomicString and string literals.
1005 * wtf/text/AtomicString.h:
1006 (WTF::equalIgnoringASCIICase):
1008 2015-05-18 Skachkov Alexandr <gskachkov@gmail.com>
1010 [ES6] Arrow function syntax. Feature flag for arrow function
1011 https://bugs.webkit.org/show_bug.cgi?id=145108
1013 Reviewed by Ryosuke Niwa.
1015 Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
1017 * wtf/FeatureDefines.h:
1019 2015-05-17 Benjamin Poulain <benjamin@webkit.org>
1021 Do not use fastMallocGoodSize anywhere
1022 https://bugs.webkit.org/show_bug.cgi?id=145103
1024 Reviewed by Michael Saboff.
1026 It is silly we see fastMallocGoodSize in profiles, it does absolutely nothing.
1028 This patch keeps fastMallocGoodSize() around for older code linking
1029 with newer WebKit, but remove any use of it inside WebKit.
1031 * wtf/FastMalloc.cpp:
1032 (WTF::fastMallocGoodSize):
1035 (WTF::VectorBufferBase::allocateBuffer):
1036 (WTF::VectorBufferBase::tryAllocateBuffer):
1037 (WTF::VectorBufferBase::reallocateBuffer):
1039 2015-05-15 Dan Bernstein <mitz@apple.com>
1041 Build fix for some versions of clang.
1043 * wtf/SaturatedArithmetic.h:
1044 (signedAddOverflows):
1045 (signedSubtractOverflows):
1047 2015-05-14 Dan Bernstein <mitz@apple.com>
1049 Reverted r177753, now that <rdar://problem/19347133> is fixed.
1051 Rubber-stamped by Benjamin Poulain.
1053 * wtf/SaturatedArithmetic.h:
1054 (signedAddOverflows):
1055 (signedSubtractOverflows):
1057 2015-05-14 Myles C. Maxfield <mmaxfield@apple.com>
1059 Add String literal overloads to equalIgnoringASCIICase()
1060 https://bugs.webkit.org/show_bug.cgi?id=145008
1062 Reviewed by Benjamin Poulain.
1064 Create an overload for equalIgnoringASCIICase for string literals.
1066 * wtf/text/StringImpl.h:
1067 (WTF::equalIgnoringASCIICase): Use a non-templated helper function.
1068 * wtf/text/StringImpl.cpp:
1069 (WTF::equalIgnoringASCIICase): Implement it.
1070 * wtf/text/StringView.h:
1071 (WTF::equalIgnoringASCIICase): Use a non-templated helper function.
1072 * wtf/text/StringView.cpp:
1073 (WTF::equalIgnoringASCIICase): Implement it.
1074 * wtf/text/WTFString.h:
1075 (WTF::equalIgnoringASCIICase): Delegate to StringImpl's implementation.
1077 2015-05-14 Žan Doberšek <zdobersek@igalia.com>
1079 [GTK] RunLoop constructor should properly retrieve or establish the thread-default GMainContext
1080 https://bugs.webkit.org/show_bug.cgi?id=144732
1082 Reviewed by Carlos Garcia Campos.
1084 RunLoop constructor in the GTK implementation should use the
1085 existing thread-default context, create a new one if not on
1086 the main thread, or use the global-default one if on the main
1089 In RunLoop::run(), the GMainContext should then be pushed as
1090 the thread-default before calling g_main_loop_run(), and popped
1091 off when the main loop stops.
1093 * wtf/gtk/RunLoopGtk.cpp:
1094 (WTF::RunLoop::RunLoop):
1095 (WTF::RunLoop::run):
1097 2015-05-13 Oliver Hunt <oliver@apple.com>
1098 Ensure that all the smart pointer types in WTF clear their pointer before deref
1099 https://bugs.webkit.org/show_bug.cgi?id=143789
1101 Reviewed by Ryosuke Niwa.
1103 In order to prevent use after free bugs caused by destructors
1104 that end up trying to access the smart pointer itself, we should
1105 make sure we always clear the m_ptr field before calling deref.
1107 Essentially the UaF path is:
1108 struct Foo : RefCounted<Foo> {
1111 ~Foo() { m_wibble->doSomethingLikeCleanup(); }
1115 void doSomethingLikeCleanup()
1118 /* if this branch is not here we get a null deref */
1119 m_foo->doSomething();
1122 void replaceFoo(Foo* foo) { m_foo = foo; }
1126 Wibble* someWibble = /* a Wibble with m_foo->m_refCount == 1 */;
1127 /* and m_foo points to someWibble */;
1129 someWibble->replaceFoo(someOtherFoo);
1130 + someWibble->m_foo->m_ptr->deref();
1131 + someWibble->m_foo->m_ptr->~Foo()
1132 + someWibble->m_foo->m_ptr->m_wibble->doSomethingLikeCleanup()
1133 + someWibble->m_foo->m_ptr->m_wibble /* someWibble */ ->m_foo->m_ptr /*logically dead*/ ->doSomething()
1135 By clearing m_ptr first we either force a null pointer deref or
1136 we force our code down a path that does not use the dead smart
1140 (WTF::PassRefPtr::~PassRefPtr):
1143 (WTF::Ref::operator=):
1145 (WTF::RefPtr::~RefPtr):
1147 (WTF::RetainPtr::~RetainPtr):
1148 (WTF::RetainPtr<T>::clear):
1150 2015-05-12 Michael Saboff <msaboff@apple.com>
1152 If JSC cannot get executable memory, it shouldn't call madvise
1153 https://bugs.webkit.org/show_bug.cgi?id=144931
1155 Reviewed by Mark Lam.
1157 Made calling madvise conditional on really getting mmapped memory.
1159 * wtf/OSAllocatorPosix.cpp:
1160 (WTF::OSAllocator::reserveUncommitted):
1162 2015-05-11 Brent Fulgham <bfulgham@apple.com>
1164 [Win] Move Windows build target to Windows 7 (or newer)
1165 https://bugs.webkit.org/show_bug.cgi?id=144890
1166 <rdar://problem/20707307>
1168 Reviewed by Anders Carlsson.
1170 Update linked SDK and minimal Windows level to be compatible with
1173 * WTF.vcxproj/WTF.vcxproj:
1174 * WTF.vcxproj/WTFGenerated.vcxproj:
1177 2015-05-11 Carlos Garcia Campos <cgarcia@igalia.com>
1179 [GTK] WorkQueue objects are not released
1180 https://bugs.webkit.org/show_bug.cgi?id=144824
1182 Reviewed by Žan Doberšek.
1184 Do not keep a reference of the WorkQueue for the entire life of
1185 its worker thread, since every task scheduled on the WorkQueue
1186 already takes a reference. Instead, take a reference of the main
1187 loop to make sure that when the worker thread starts, the main
1188 loop hasn't been released to avoid runtime warnings (see
1189 webkit.org/b/140998). Also removed the g_main_context_pop_thread_default()
1190 from the thread body, since the thread-specific context queue will
1191 be freed anyway when the thread exits.
1192 If the WorkQueue is released early, before the thread has started,
1193 schedule a main loop quit in the context, to make sure it will
1194 be the first thing run by the main loop and the thread will exit.
1196 * wtf/WorkQueue.h: Remove unused event loop mutex.
1197 * wtf/gtk/WorkQueueGtk.cpp:
1198 (WTF::WorkQueue::platformInitialize):
1199 (WTF::WorkQueue::platformInvalidate):
1201 2015-05-09 Yoav Weiss <yoav@yoav.ws>
1203 Remove the PICTURE_SIZES build flag
1204 https://bugs.webkit.org/show_bug.cgi?id=144679
1206 Reviewed by Benjamin Poulain.
1208 Removed the PICTURE_SIZES build time flag.
1210 * wtf/FeatureDefines.h:
1212 2015-05-08 Myles C. Maxfield <mmaxfield@apple.com>
1214 Remove convenience constructors for TextRun
1215 https://bugs.webkit.org/show_bug.cgi?id=144752
1217 Reviewed by Anders Carlsson.
1219 No reason why StringView shouldn't have a StringImpl* constructor.
1221 Test: StringView8Bit in TestWebKitAPI
1223 * wtf/text/StringView.h: Add the constructor.
1225 2015-05-08 Commit Queue <commit-queue@webkit.org>
1227 Unreviewed, rolling out r183996.
1228 https://bugs.webkit.org/show_bug.cgi?id=144806
1230 ASan detected use-after free (Requested by ap on #webkit).
1234 "Remove convenience constructors for TextRun"
1235 https://bugs.webkit.org/show_bug.cgi?id=144752
1236 http://trac.webkit.org/changeset/183996
1238 2015-05-08 Myles C. Maxfield <mmaxfield@apple.com>
1240 Remove convenience constructors for TextRun
1241 https://bugs.webkit.org/show_bug.cgi?id=144752
1243 Reviewed by Anders Carlsson.
1245 No reason why StringView shouldn't have a StringImpl* constructor.
1247 Test: StringView8Bit in TestWebKitAPI
1249 * wtf/text/StringView.h: Add the constructor.
1251 2015-05-08 Andreas Kling <akling@apple.com>
1253 Optimize serialization of quoted JSON strings.
1254 <https://webkit.org/b/144754>
1256 Reviewed by Darin Adler.
1258 Add a StringBuilder API for appending a quoted JSON string. This is used by
1259 JSON.stringify() to implement efficient appending of strings while escaping
1260 quotes, control characters and \uNNNN-style characters.
1262 The main benefit comes from only doing a single buffer expansion up front,
1263 instead of doing it every time we append something. The fudge factor is pretty
1264 large, since the maximum number of output characters per input character is 6.
1266 The first landing of this patch had two bugs in it:
1268 - Made \uNNNN escapes uppercase hexadecimal instead of lowercase.
1269 - Didn't preallocate enough space for 8-bit input strings.
1271 Both were caught by existing tests on our bots, and both were due to last-minute
1272 changes before landing. :/
1274 * wtf/text/StringBuilder.cpp:
1275 (WTF::appendQuotedJSONStringInternal):
1276 (WTF::StringBuilder::appendQuotedJSONString):
1277 * wtf/text/StringBuilder.h:
1279 2015-05-07 Commit Queue <commit-queue@webkit.org>
1281 Unreviewed, rolling out r183961.
1282 https://bugs.webkit.org/show_bug.cgi?id=144784
1284 Broke js/dom/JSON-stringify.html (Requested by kling on
1289 "Optimize serialization of quoted JSON strings."
1290 https://bugs.webkit.org/show_bug.cgi?id=144754
1291 http://trac.webkit.org/changeset/183961
1293 2015-05-07 Andreas Kling <akling@apple.com>
1295 Optimize serialization of quoted JSON strings.
1296 <https://webkit.org/b/144754>
1298 Reviewed by Darin Adler.
1300 Add a StringBuilder API for appending a quoted JSON string. This is used by
1301 JSON.stringify() to implement efficient appending of strings while escaping
1302 quotes, control characters and \uNNNN-style characters.
1304 The main benefit comes from only doing a single buffer expansion up front,
1305 instead of doing it every time we append something. The fudge factor is pretty
1306 large for 16-bit strings, since the maximum number of output characters per
1307 input character is 6.
1309 * wtf/text/StringBuilder.cpp:
1310 (WTF::appendQuotedJSONStringInternal):
1311 (WTF::StringBuilder::appendQuotedJSONString):
1312 * wtf/text/StringBuilder.h:
1314 2015-05-07 Martin Robinson <mrobinson@igalia.com>
1316 [GTK] All spell checking layout tests fail
1317 https://bugs.webkit.org/show_bug.cgi?id=144648
1319 Reviewed by Carlos Garcia Campos.
1321 * wtf/Platform.h: Activate UNIFIED_TEXT_CHECKING for GTK+.
1323 2015-05-07 Dan Bernstein <mitz@apple.com>
1325 <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
1326 https://bugs.webkit.org/show_bug.cgi?id=144727
1328 Reviewed by Darin Adler.
1330 * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
1331 INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
1333 2015-05-07 Žan Doberšek <zdobersek@igalia.com>
1335 [GTK] Clean up RunLoop implementation
1336 https://bugs.webkit.org/show_bug.cgi?id=144729
1338 Reviewed by Carlos Garcia Campos.
1340 Clean up the RunLoop implementation for the GTK port,
1341 removing unnecessary methods and using simpler variable names.
1343 Nested GMainLoops in RunLoop::run() are now created for the
1344 RunLoop's GMainContext, and not for the default context (enforced
1345 through the null argument to g_main_loop_new()).
1348 * wtf/gtk/RunLoopGtk.cpp:
1349 (WTF::RunLoop::RunLoop):
1350 (WTF::RunLoop::~RunLoop):
1351 (WTF::RunLoop::run):
1352 (WTF::RunLoop::stop):
1353 (WTF::RunLoop::wakeUp):
1354 (WTF::RunLoop::TimerBase::start):
1355 (WTF::RunLoop::innermostLoop): Deleted.
1356 (WTF::RunLoop::pushNestedMainLoop): Deleted.
1357 (WTF::RunLoop::popNestedMainLoop): Deleted.
1359 2015-05-05 Carlos Garcia Campos <cgarcia@igalia.com>
1361 [GTK] Async operations running in the WorkQueue thread should schedule their sources to the WorkQueue main lopp
1362 https://bugs.webkit.org/show_bug.cgi?id=144541
1364 Reviewed by Žan Doberšek.
1366 They are currently sent to the main thread run loop, because we
1367 are not setting the WorkQueue main context as the default one in
1370 * wtf/gtk/WorkQueueGtk.cpp:
1371 (WTF::WorkQueue::platformInitialize): Call
1372 g_main_context_push_thread_default() to set the WorkQueue main
1373 context as the default of the thread before running the main loop,
1374 and g_main_context_pop_thread_default() when the main loop quits.
1376 2015-05-04 Commit Queue <commit-queue@webkit.org>
1378 Unreviewed, rolling out r183661.
1379 https://bugs.webkit.org/show_bug.cgi?id=144594
1381 Caused ~3.5MB regression on membuster(!) (Requested by kling_
1386 "Decrease minimum Vector size."
1387 https://bugs.webkit.org/show_bug.cgi?id=144453
1388 http://trac.webkit.org/changeset/183661
1390 2015-05-04 Zan Dobersek <zdobersek@igalia.com>
1392 [WTF] Remove Functional.h inclusions
1393 https://bugs.webkit.org/show_bug.cgi?id=144400
1395 Reviewed by Darin Adler.
1397 Remove most of the Functional.h header inclusions. The header is preserved
1398 since it's still used by older versions of Safari, and for the callOnMainThread()
1399 stub in DeprecatedSymbolsUsedBySafari.mm.
1401 * wtf/MainThread.cpp:
1403 * wtf/WorkQueue.cpp:
1405 * wtf/efl/DispatchQueueEfl.h:
1406 * wtf/efl/DispatchQueueWorkItemEfl.h:
1408 2015-05-02 Commit Queue <commit-queue@webkit.org>
1410 Unreviewed, rolling out r183722.
1411 https://bugs.webkit.org/show_bug.cgi?id=144534
1413 Made all the tests assert (Requested by ap on #webkit).
1417 "Generated static StringImpls should have static flag set."
1418 https://bugs.webkit.org/show_bug.cgi?id=144516
1419 http://trac.webkit.org/changeset/183722
1421 2015-05-02 Andreas Kling <akling@apple.com>
1423 Generated static StringImpls should have static flag set.
1424 <https://webkit.org/b/144516>
1426 Reviewed by Darin Adler.
1428 Discovered this while tracking down a string ref leak. Turns out that the strings
1429 generated by StaticString.pm were not getting the static flag set on them.
1431 The only practical difference from this AFAICT is that now the garbage collector
1432 will correctly see that these strings have no extra memory cost to worry about.
1434 * wtf/text/StringImpl.h:
1436 2015-05-01 Martin Robinson <mrobinson@igalia.com>
1438 USE(...) macro should expect unprefixed variables
1439 https://bugs.webkit.org/show_bug.cgi?id=144454
1441 Reviewed by Daniel Bates.
1443 * wtf/Assertions.cpp: Replace all occurrences WTF_USE with USE.
1444 * wtf/Platform.h: Replace all occurrences WTF_USE with USE. Modify the USE
1445 macro to look for unprefixed variables.
1446 * wtf/WTFThreadData.h: Replace all occurrences WTF_USE with USE.
1448 2015-05-01 Joseph Pecoraro <pecoraro@apple.com>
1450 Enable ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX by default on all ports (Windows was missed)
1451 https://bugs.webkit.org/show_bug.cgi?id=144495
1453 Reviewed by Csaba Osztrogonác.
1455 * wtf/FeatureDefines.h:
1456 This covers all ports that haven't defined the flag otherwise.
1458 2015-04-30 Alex Christensen <achristensen@webkit.org>
1460 Decrease minimum Vector size.
1461 https://bugs.webkit.org/show_bug.cgi?id=144453
1463 Reviewed by Andreas Kling.
1466 Make the default min size 4 to save memory on small Vectors.
1468 2015-04-30 Yusuke Suzuki <utatane.tea@gmail.com>
1470 Use the default hash value for Symbolized StringImpl
1471 https://bugs.webkit.org/show_bug.cgi?id=144347
1473 Reviewed by Darin Adler.
1475 Use a default hash value calculation for symbolized StringImpl.
1477 * wtf/text/StringImpl.cpp:
1478 (WTF::StringImpl::createSymbol):
1479 * wtf/text/StringImpl.h:
1480 (WTF::StringImpl::StringImpl):
1481 (WTF::StringImpl::symbolAwareHash):
1482 (WTF::StringImpl::existingSymbolAwareHash):
1483 (WTF::StringImpl::hashForSymbol):
1484 * wtf/text/StringStatics.cpp:
1485 (WTF::StringImpl::nextHashForSymbol):
1486 (WTF::StringImpl::hashAndFlagsForSymbol): Deleted.
1488 2015-04-29 Alexey Proskuryakov <ap@apple.com>
1490 LazyNeverDestroyed is not thread safe in debug builds, causing assertions
1491 https://bugs.webkit.org/show_bug.cgi?id=144378
1493 Reviewed by Darin Adler.
1495 * wtf/NeverDestroyed.h:
1497 2015-04-28 Geoffrey Garen <ggaren@apple.com>
1499 It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
1500 https://bugs.webkit.org/show_bug.cgi?id=144013
1502 Reviewed by Mark Lam.
1504 Remove this custom tree implementation because it is unused. (It was
1505 previously used to achieve a stable array sort in certain cases.)
1507 * WTF.vcxproj/WTF.vcxproj:
1508 * WTF.vcxproj/WTF.vcxproj.filters:
1509 * WTF.xcodeproj/project.pbxproj:
1510 * wtf/AVLTree.h: Removed.
1511 * wtf/CMakeLists.txt:
1513 2015-04-29 Myles C. Maxfield <mmaxfield@apple.com>
1515 [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1516 https://bugs.webkit.org/show_bug.cgi?id=132159
1518 Reviewed by Darin Adler.
1522 Opt-in using ENABLE(PLATFORM_FONT_LOOKUP)
1524 2015-04-29 Yusuke Suzuki <utatane.tea@gmail.com>
1526 REGRESSION (r183373): ASSERT failed in wtf/SHA1.h
1527 https://bugs.webkit.org/show_bug.cgi?id=144257
1529 Reviewed by Darin Adler.
1532 (WTF::SHA1::addBytes):
1534 2015-04-29 Martin Robinson <mrobinson@igalia.com>
1536 [CMake] [GTK] Organize and clean up unused CMake variables
1537 https://bugs.webkit.org/show_bug.cgi?id=144364
1539 Reviewed by Gyuyoung Kim.
1541 * wtf/PlatformGTK.cmake: Add variables specific to this project.
1543 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1545 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1546 https://bugs.webkit.org/show_bug.cgi?id=144304
1548 Reviewed by Geoffrey Garen.
1550 No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
1554 2015-04-28 Commit Queue <commit-queue@webkit.org>
1556 Unreviewed, rolling out r183514.
1557 https://bugs.webkit.org/show_bug.cgi?id=144359
1559 It broke cloop test bots (Requested by mcatanzaro on #webkit).
1563 "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1564 https://bugs.webkit.org/show_bug.cgi?id=144304
1565 http://trac.webkit.org/changeset/183514
1567 2015-04-28 Michael Catanzaro <mcatanzaro@igalia.com>
1569 Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1570 https://bugs.webkit.org/show_bug.cgi?id=144304
1572 Reviewed by Geoffrey Garen.
1574 No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.
1578 2015-04-28 Alex Christensen <achristensen@webkit.org>
1580 Properly reset deleted count when clearing HashTables.
1581 https://bugs.webkit.org/show_bug.cgi?id=144343
1583 Reviewed by Andreas Kling.
1586 (WTF::KeyTraits>::clear):
1587 Reset m_deletedCount, which appears to have been forgotten.
1589 2015-04-28 Alex Christensen <achristensen@webkit.org>
1591 [Content Extensions] Use less memory for CombinedURLFilters.
1592 https://bugs.webkit.org/show_bug.cgi?id=144290
1594 Reviewed by Andreas Kling.
1598 Added a minCapacity template parameter to allow changing the minimum size of an
1599 allocated buffer. The default minCapacity is kept at 16 unless otherwise specified
1600 to have no change on existing code, but this could be changed later. A smaller
1601 default minCapacity would use less memory with small Vectors but spend more time
1602 copying when expanding to large Vectors.
1604 2015-04-27 Brent Fulgham <bfulgham@apple.com>
1606 [Win] Deactivate WebGL until Windows tests work properly
1607 https://bugs.webkit.org/show_bug.cgi?id=144291
1608 <rdar://problem/20707307>
1610 Reviewed by Zalan Bujtas.
1612 * wtf/FeatureDefines.h: Force WebGL off for Windows builds.
1614 2015-04-27 Michael Catanzaro <mcatanzaro@igalia.com>
1616 Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1617 https://bugs.webkit.org/show_bug.cgi?id=144193
1619 Reviewed by Darin Adler.
1621 * wtf/FeatureDefines.h:
1624 2015-04-22 Martin Robinson <mrobinson@igalia.com>
1626 [CMake] Autogenerate cmakeconfig.h.cmake
1627 https://bugs.webkit.org/show_bug.cgi?id=143997
1629 Reviewed by Csaba Osztrogonác.
1631 * wtf/Platform.h: Move a GTK-specific setting from cmakeconfig.h to here.
1633 2015-04-25 Martin Robinson <mrobinson@igalia.com>
1635 Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
1636 https://bugs.webkit.org/show_bug.cgi?id=144182
1638 Reviewed by Simon Fraser.
1640 * wtf/FeatureDefines.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
1642 2015-04-24 Commit Queue <commit-queue@webkit.org>
1644 Unreviewed, rolling out r183288.
1645 https://bugs.webkit.org/show_bug.cgi?id=144189
1647 Made js/sort-with-side-effecting-comparisons.html time out in
1648 debug builds (Requested by ap on #webkit).
1652 "It shouldn't take 1846 lines of code and 5 FIXMEs to sort an
1654 https://bugs.webkit.org/show_bug.cgi?id=144013
1655 http://trac.webkit.org/changeset/183288
1657 2015-04-21 Geoffrey Garen <ggaren@apple.com>
1659 It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
1660 https://bugs.webkit.org/show_bug.cgi?id=144013
1662 Reviewed by Mark Lam.
1664 Remove this custom tree implementation because it is unused. (It was
1665 previously used to achieve a stable array sort in certain cases.)
1667 * WTF.vcxproj/WTF.vcxproj:
1668 * WTF.vcxproj/WTF.vcxproj.filters:
1669 * WTF.xcodeproj/project.pbxproj:
1670 * wtf/AVLTree.h: Removed.
1671 * wtf/CMakeLists.txt:
1673 2015-04-24 Darin Adler <darin@apple.com>
1675 Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1676 https://bugs.webkit.org/show_bug.cgi?id=128007
1678 Reviewed by Anders Carlsson.
1680 * WTF.vcxproj/WTF.vcxproj: Removed OwnPtr source files.
1681 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1682 * WTF.xcodeproj/project.pbxproj: Ditto.
1683 * wtf/CMakeLists.txt: Ditto.
1685 * wtf/Forward.h: Removed OwnPtr and PassOwnPtr.
1686 * wtf/HashTraits.h: Ditto.
1688 * wtf/OwnPtr.h: Removed.
1689 * wtf/OwnPtrCommon.h: Removed.
1690 * wtf/PassOwnPtr.h: Removed.
1692 * wtf/SizeLimits.cpp: Removed OwnPtr.
1693 * wtf/VectorTraits.h: Removed OwnPtr specialization.
1695 2015-04-23 Jer Noble <jer.noble@apple.com>
1697 Disable HAVE_AVKIT on AppleTV
1698 https://bugs.webkit.org/show_bug.cgi?id=144142
1700 Reviewed by Dan Bernstein.
1704 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1706 [iOS] WebKit services should inherit environment variables for home
1707 https://bugs.webkit.org/show_bug.cgi?id=144078
1708 rdar://problem/20571678
1710 Reviewed by Dan Bernstein.
1712 * wtf/spi/darwin/XPCSPI.h: Added xpc_copy_bootstrap and xpc_dictionary_apply.
1714 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1716 Undo the WTF part of the previous build fix, we don't use private headers in WTF.
1718 * WTF.xcodeproj/project.pbxproj:
1720 2015-04-23 Alexey Proskuryakov <ap@apple.com>
1724 * WTF.xcodeproj/project.pbxproj: Make RAMSize.h a private header, now that it's used
1727 2015-04-23 Andreas Kling <akling@apple.com>
1729 There should only be one way to get the system memory size.
1730 <https://webkit.org/b/144081>
1732 Reviewed by Antti Koivisto.
1734 Merge all the logic from other RAM size fetcher helpers into WTF's.
1736 Darwin ports now use host_info() instead of sysctl(), since that was the more common way
1739 Also bumped the fallback answer from 128 MB to 512 MB to bring it closer to today's hardware.
1741 Finally, the number is rounded up to the next multiple of 128 MB, to avoid misunderstandings
1742 on some systems where the number returned by the kernel is slightly lower than the marketing
1743 number. Removed the "fudging" that was used in some places, since this fixes that cleanly.
1746 (WTF::computeRAMSize):
1748 2015-04-22 Darin Adler <darin@apple.com>
1750 Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
1751 https://bugs.webkit.org/show_bug.cgi?id=143949
1753 Reviewed by Andreas Kling.
1756 (wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
1757 fixed in Snow Leopard <rdar://problem/6286405>, so we don't need the workaround any more.
1759 2015-04-22 Alexey Proskuryakov <ap@apple.com>
1761 [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1762 https://bugs.webkit.org/show_bug.cgi?id=144052
1763 rdar://problem/19754404
1765 Build fix. Landing a forward declaration that should have been part of the original patch.
1767 * wtf/spi/darwin/XPCSPI.h:
1769 2015-04-21 Chris Dumez <cdumez@apple.com>
1771 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
1772 https://bugs.webkit.org/show_bug.cgi?id=143970
1774 Reviewed by Darin Adler.
1776 Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
1777 constructor explicit as it copies the vector and it is easy to call it
1780 * wtf/RefCountedArray.h:
1781 (WTF::RefCountedArray::RefCountedArray):
1784 2015-04-21 Darin Adler <darin@apple.com>
1786 Remove some stray uses of OwnPtr and PassOwnPtr in WTF (outside of the template definitions and traits)
1787 https://bugs.webkit.org/show_bug.cgi?id=143944
1789 Reviewed by Andreas Kling.
1791 * wtf/FilePrintStream.h: Removed unneeded include.
1792 * wtf/HashTable.h: Fixed class template name in comment.
1793 * wtf/HashTraits.h: Removed unneeded forward declaration.
1794 * wtf/ListHashSet.h: Removed unneeded includes.
1795 * wtf/ThreadingWin.cpp: Removed unneeded includes.
1796 (WTF::wtfThreadEntryPoint): Changed code to use unique_ptr.
1797 (WTF::createThreadInternal): Changed code to use make_unique and release.
1798 * wtf/efl/RunLoopEfl.cpp: Removed unneeded includes.
1800 2015-04-19 Darin Adler <darin@apple.com>
1802 Update RefPtr documentation and deprecation
1803 https://bugs.webkit.org/show_bug.cgi?id=143936
1805 Reviewed by Andreas Kling.
1807 * WTF.vcxproj/WTF.vcxproj: Removed PassRef.h
1808 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1809 * WTF.xcodeproj/project.pbxproj: Ditto.
1810 * wtf/CMakeLists.txt: Ditto.
1812 2015-04-17 Alexey Proskuryakov <ap@apple.com>
1814 Use ASan poisoning to taint moved-out-of Refs
1815 https://bugs.webkit.org/show_bug.cgi?id=143894
1816 rdar://problem/19443723
1818 Reviewed by Darin Adler.
1820 * wtf/Ref.h: (WTF::Ref::~Ref):
1822 2015-04-17 Alexey Proskuryakov <ap@apple.com>
1824 Remove unused BoundsCheckedPointer
1825 https://bugs.webkit.org/show_bug.cgi?id=143896
1827 Reviewed by Geoffrey Garen.
1829 * WTF.vcxproj/WTF.vcxproj:
1830 * WTF.vcxproj/WTF.vcxproj.filters:
1831 * WTF.xcodeproj/project.pbxproj:
1832 * wtf/BoundsCheckedPointer.h: Removed.
1833 * wtf/CMakeLists.txt:
1835 2015-04-16 Yusuke Suzuki <utatane.tea@gmail.com>
1837 [ES6] Implement Symbol.for and Symbol.keyFor
1838 https://bugs.webkit.org/show_bug.cgi?id=143404
1840 Reviewed by Geoffrey Garen.
1842 When we register symbolized StringImpl* into SymbolRegistry, symbolized StringImpl* is aware of that.
1843 And when destructing it, it removes its reference from SymbolRegistry as if atomic StringImpl do so with AtomicStringTable.
1844 While AtomicStringTable (in WebCore case) exists in thread local storage,
1845 SymbolRegistry exists per VM and StringImpl* has a reference to the registered SymbolRegistry.
1847 Since StringImpl has isSymbol etc. members, it's class is aware of Symbol use cases.
1848 So introduce SymbolRegistry in WTF layers as if AtomicStringTable.
1850 * WTF.vcxproj/WTF.vcxproj:
1851 * WTF.vcxproj/WTF.vcxproj.filters:
1852 * WTF.xcodeproj/project.pbxproj:
1853 * wtf/CMakeLists.txt:
1854 * wtf/text/AtomicString.cpp:
1855 (WTF::AtomicString::addSlowCase):
1856 (WTF::AtomicString::findSlowCase):
1857 (WTF::AtomicString::findInternal):
1858 (WTF::AtomicString::find): Deleted.
1859 * wtf/text/AtomicString.h:
1860 (WTF::AtomicString::find):
1861 * wtf/text/StringImpl.cpp:
1862 (WTF::StringImpl::~StringImpl):
1863 (WTF::StringImpl::createSymbol):
1864 (WTF::StringImpl::createSymbolEmpty):
1865 * wtf/text/StringImpl.h:
1866 (WTF::StringImpl::StringImpl):
1867 (WTF::StringImpl::extractFoldedStringInSymbol):
1868 (WTF::StringImpl::symbolRegistry):
1869 (WTF::StringImpl::createSymbolEmpty): Deleted.
1870 * wtf/text/SymbolRegistry.cpp: Copied from Source/JavaScriptCore/runtime/SymbolConstructor.h.
1871 (WTF::SymbolRegistry::~SymbolRegistry):
1872 (WTF::SymbolRegistry::symbolForKey):
1873 (WTF::SymbolRegistry::keyForSymbol):
1874 (WTF::SymbolRegistry::remove):
1875 * wtf/text/SymbolRegistry.h: Added.
1876 (WTF::SymbolRegistryKey::hash):
1877 (WTF::SymbolRegistryKey::impl):
1878 (WTF::SymbolRegistryKey::isHashTableDeletedValue):
1879 (WTF::SymbolRegistryKey::hashTableDeletedValue):
1880 (WTF::DefaultHash<SymbolRegistryKey>::Hash::hash):
1881 (WTF::DefaultHash<SymbolRegistryKey>::Hash::equal):
1882 (WTF::HashTraits<SymbolRegistryKey>::isEmptyValue):
1883 (WTF::SymbolRegistryKey::SymbolRegistryKey):
1885 2015-04-16 Antti Koivisto <antti@apple.com>
1887 Use CommonCrypto for SHA1 and MD5
1888 https://bugs.webkit.org/show_bug.cgi?id=143826
1890 Reviewed by Anders Carlsson.
1892 CommonCrypto SHA1 implementation is ~4x faster than the naive WTF one. Use it when available.
1894 These are covered by existing API tests.
1898 (WTF::MD5::addBytes):
1899 (WTF::MD5::checksum):
1903 (WTF::SHA1::addBytes):
1904 (WTF::SHA1::computeHash):
1906 Remove the side effect where computeHash resets the state. No one relies on it.
1908 (WTF::SHA1::hexDigest):
1909 (WTF::SHA1::computeHexDigest):
1912 2015-04-16 Csaba Osztrogonác <ossy@webkit.org>
1914 Remove the unnecessary WTF_CHANGES define
1915 https://bugs.webkit.org/show_bug.cgi?id=143825
1917 Reviewed by Andreas Kling.
1921 2015-04-15 Руслан Ижбулатов <lrn1986@gmail.com>
1923 Harmonize binary semaphore ifdefs
1925 They should be either OS(WINDOWS) (in which case we'd need
1926 BinarySemaphoreWin.cpp, which is not shipped by WebKitGTK)
1927 or PLATFORM(WIN) (in which case Mutex/ThreadCondition-based
1928 implementation is used).
1930 This fixes errors like:
1931 CXX Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo
1932 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In constructor 'WTF::BinarySemaphore::BinarySemaphore()':
1933 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:34:7: error: class 'WTF::BinarySemaphore' does not have any field named 'm_isSet'
1936 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'void WTF::BinarySemaphore::signal()':
1937 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:44:24: error: 'm_mutex' was not declared in this scope
1938 MutexLocker locker(m_mutex);
1940 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:46:5: error: 'm_isSet' was not declared in this scope
1943 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:47:5: error: 'm_condition' was not declared in this scope
1944 m_condition.signal();
1946 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp: In member function 'bool WTF::BinarySemaphore::wait(double)':
1947 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:52:24: error: 'm_mutex' was not declared in this scope
1948 MutexLocker locker(m_mutex);
1950 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:55:13: error: 'm_isSet' was not declared in this scope
1953 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:56:21: error: 'm_condition' was not declared in this scope
1954 timedOut = !m_condition.timedWait(m_mutex, absoluteTime);
1956 ../webkitgtk-2.4.8/Source/WTF/wtf/threads/BinarySemaphore.cpp:62:5: error: 'm_isSet' was not declared in this scope
1959 GNUmakefile:52762: recipe for target 'Source/WTF/wtf/threads/libWTF_la-BinarySemaphore.lo' failed
1961 [W32] Inconsistent ifdefs in BinarySemaphore.h and BinarySemaphore.cpp
1962 https://bugs.webkit.org/show_bug.cgi?id=143756
1964 Reviewed by Darin Adler.
1966 * wtf/threads/BinarySemaphore.h:
1968 2015-04-12 Michael Catanzaro <mcatanzaro@igalia.com>
1970 Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
1971 https://bugs.webkit.org/show_bug.cgi?id=143457
1973 Reviewed by Benjamin Poulain.
1975 Tested by WTF.SaturatedArithmeticAddition and WTF.SaturatedArithmeticSubtraction.
1977 * wtf/SaturatedArithmetic.h:
1978 (signedAddOverflows): Use && instead of & to avoid triggering -Wparentheses in newer
1979 versions of GCC and Clang, and to improve the clarity of the function.
1980 (signedSubtractOverflows): Changed correspondingly, although there was no warning here.
1982 2015-04-08 Sam Weinig <sam@webkit.org>
1984 Allow LaunchServices to handle URLs on link navigations
1985 <rdar://problem/19446826>
1986 https://bugs.webkit.org/show_bug.cgi?id=143544
1988 Reviewed by Anders Carlsson.
1991 Add HAVE macro for this functionality.
1993 2015-04-09 Andy Estes <aestes@apple.com>
1995 [Cocoa] Add a HAVE(AVKIT) and use it
1996 https://bugs.webkit.org/show_bug.cgi?id=143593
1998 Reviewed by David Kilzer.
2000 * wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.
2002 2015-04-09 Andy Estes <aestes@apple.com>
2004 [Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
2005 https://bugs.webkit.org/show_bug.cgi?id=143559
2007 Reviewed by David Kilzer.
2009 Added PLATFORM(WATCHOS). Used PLATFORM() since Watch OS is just a variant of OS(IOS).
2010 Defined HAVE(PARENTAL_CONTROLS) to be true on all Cocoa platforms except Watch OS.
2014 2015-04-08 Alex Christensen <achristensen@webkit.org> and Patrick Gansterer <paroga@webkit.org>
2016 Add CMake build system for WinCairo port.
2017 https://bugs.webkit.org/show_bug.cgi?id=115944
2019 Reviewed by Chris Dumez.
2021 * wtf/FeatureDefines.h:
2022 * wtf/PlatformWin.cmake:
2024 2015-04-05 Antti Koivisto <antti@apple.com>
2026 Bloom filter should support longer hashes
2027 https://bugs.webkit.org/show_bug.cgi?id=143419
2029 Reviewed by Dan Bernstein.
2031 It currently supports 'unsigned' hash only which is inconvenient and doesn't have enough independent bits for larger filters.
2033 Support arbitrarily sized hashes of type std::array<uint8_t, hashSize> (like SHA1::Digest and MD5::Digest).
2035 * wtf/BloomFilter.h:
2036 (WTF::BloomFilter<keyBits>::keysFromHash):
2037 (WTF::BloomFilter<keyBits>::mayContain):
2038 (WTF::BloomFilter<keyBits>::add):
2040 2015-04-03 Antti Koivisto <antti@apple.com>
2042 Add non-counting Bloom filter implementation
2043 https://bugs.webkit.org/show_bug.cgi?id=143366
2045 Reviewed by Sam Weinig.
2047 Add a traditional single-bit-per-bucket Bloom filter in addition to the existing counting implementation.
2049 - rename BloomFilter -> CountingBloomFilter.
2050 - add a new basic BloomFilter type.
2051 - update some terminology to match http://en.wikipedia.org/wiki/Bloom_filter and modernize the code a bit.
2054 * wtf/BloomFilter.h:
2055 (WTF::BloomFilter::BloomFilter):
2056 (WTF::BloomFilter::add):
2058 Also support merging.
2060 (WTF::BloomFilter::mayContain):
2061 (WTF::BloomFilter::arrayIndex):
2062 (WTF::BloomFilter::bitMask):
2063 (WTF::BloomFilter<keyBits>::mayContain):
2064 (WTF::BloomFilter<keyBits>::add):
2065 (WTF::BloomFilter<keyBits>::isBitSet):
2066 (WTF::BloomFilter<keyBits>::setBit):
2067 (WTF::BloomFilter<keyBits>::clear):
2068 (WTF::CountingBloomFilter::CountingBloomFilter):
2069 (WTF::CountingBloomFilter::mayContain):
2070 (WTF::CountingBloomFilter::firstBucket):
2071 (WTF::CountingBloomFilter::secondBucket):
2072 (WTF::CountingBloomFilter<keyBits>::add):
2073 (WTF::CountingBloomFilter<keyBits>::remove):
2074 (WTF::CountingBloomFilter<keyBits>::clear):
2075 (WTF::CountingBloomFilter<keyBits>::likelyEmpty):
2076 (WTF::CountingBloomFilter<keyBits>::isClear):
2077 (WTF::BloomFilter::maximumCount): Deleted.
2078 (WTF::BloomFilter::firstSlot): Deleted.
2079 (WTF::BloomFilter::secondSlot): Deleted.
2080 (WTF::BloomFilter<keyBits>::remove): Deleted.
2081 (WTF::BloomFilter<keyBits>::likelyEmpty): Deleted.
2082 (WTF::BloomFilter<keyBits>::isClear): Deleted.
2084 015-04-01 Antti Koivisto <antti@apple.com>
2086 Value assignment operator of Optional should be stricter
2087 https://bugs.webkit.org/show_bug.cgi?id=143303
2089 Reviewed by Andreas Kling.
2091 struct Foo { mutable Optional<std::chrono::seconds> s; };
2095 doesn't build because it tries to use wrong operator=.
2099 Add enable_if test similar to std::experimental::optional.
2101 2015-04-01 Alex Christensen <achristensen@webkit.org>
2103 Progress towards CMake on Windows and Mac.
2104 https://bugs.webkit.org/show_bug.cgi?id=143293
2106 Reviewed by Filip Pizlo.
2108 * wtf/CMakeLists.txt:
2109 Don't use bmalloc on Windows yet.
2110 * wtf/FeatureDefines.h:
2111 Temporarily disabled WebGL on Windows CMake builds.
2112 * wtf/PlatformMac.cmake:
2113 Tell open source builders where to find unicode headers.
2115 2015-03-31 Alexey Proskuryakov <ap@apple.com>
2117 Fix the build after <http://trac.webkit.org/changeset/182205>.
2119 * wtf/text/StringImpl.h: (WTF::StringImpl::extractFoldedStringInSymbol):
2120 A function cannot be both exported and inline.
2122 2015-03-31 Yusuke Suzuki <utatane.tea@gmail.com>
2124 Clean up Identifier factories to clarify the meaning of StringImpl*
2125 https://bugs.webkit.org/show_bug.cgi?id=143146
2127 Reviewed by Filip Pizlo.
2129 Introduce StringKind into `StringImpl`. There's 3 kinds
2130 1. StringNormal (non-atomic, non-symbol)
2131 2. StringAtomic (atomic, non-symbol)
2132 3. StringSymbol (non-atomic, symbol)
2133 They are mutually exclusive.
2135 * wtf/text/AtomicString.cpp:
2136 (WTF::AtomicString::addSlowCase):
2137 (WTF::AtomicString::findSlowCase):
2138 When registering a string into AtomicStringTable,
2139 it should not be a symbol string
2140 because symbol and atomic types are mutually exclusive.
2141 When a symbol string comes, we extract an owner string
2142 from a symbol string by using `StringImpl::extractFoldedStringInSymbol()`.
2143 It always succeeds because a symbol (non empty) string
2144 is always BufferSubstring and has an owner string.
2145 Empty symbol string doesn't have an owner string.
2146 This case is filtered by `!string.length()` guard.
2147 * wtf/text/AtomicString.h:
2148 (WTF::AtomicString::add):
2149 (WTF::AtomicString::addWithStringTableProvider):
2150 * wtf/text/StringImpl.cpp:
2151 (WTF::StringImpl::~StringImpl):
2152 (WTF::StringImpl::createSymbol):
2153 (WTF::StringImpl::createUnique): Deleted.
2154 * wtf/text/StringImpl.h:
2155 (WTF::StringImpl::StringImpl):
2156 (WTF::StringImpl::createSymbolEmpty):
2157 (WTF::StringImpl::flagIsAtomic):
2158 (WTF::StringImpl::flagIsSymbol):
2159 (WTF::StringImpl::maskStringKind):
2160 (WTF::StringImpl::stringKind):
2161 (WTF::StringImpl::isSymbol):
2162 (WTF::StringImpl::isAtomic):
2163 (WTF::StringImpl::setIsAtomic):
2164 (WTF::StringImpl::extractFoldedStringInSymbol):
2165 (WTF::StringImpl::createUniqueEmpty): Deleted.
2166 (WTF::StringImpl::flagIsUnique): Deleted.
2167 (WTF::StringImpl::isUnique): Deleted.
2168 * wtf/text/StringStatics.cpp:
2169 (WTF::StringImpl::hashAndFlagsForSymbol):
2170 (WTF::StringImpl::hashAndFlagsForUnique): Deleted.
2172 2015-03-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2174 [CMake][EFL] Remove redundant library link and include path
2175 https://bugs.webkit.org/show_bug.cgi?id=143221
2177 Reviewed by Csaba Osztrogonác.
2179 * wtf/PlatformEfl.cmake: Remove unnecessary library link and include path.
2181 2015-03-27 Myles C. Maxfield <mmaxfield@apple.com>
2183 Support building WTF on Windows without Cygwin
2184 https://bugs.webkit.org/show_bug.cgi?id=143084
2186 Reviewed by Brent Fulgham.
2188 Windows doesn't have "touch".
2190 * WTF.vcxproj/WTFGenerated.make:
2192 2015-03-26 Alex Christensen <achristensen@webkit.org>
2194 Progress towards CMake on Mac.
2195 https://bugs.webkit.org/show_bug.cgi?id=143112
2197 Reviewed by Chris Dumez.
2199 * wtf/PlatformMac.cmake:
2201 2015-03-25 Filip Pizlo <fpizlo@apple.com>
2203 Unreviewed, we have edited this file in 2015.
2207 2015-03-25 Filip Pizlo <fpizlo@apple.com>
2209 Heap variables shouldn't end up in the stack frame
2210 https://bugs.webkit.org/show_bug.cgi?id=141174
2212 Reviewed by Geoffrey Garen.
2214 * wtf/FastBitVector.h:
2215 (WTF::FastBitVector::resize): Small change: don't resize if you don't have to resize.
2217 2015-03-25 Filip Pizlo <fpizlo@apple.com>
2219 Change Atomic methods from using the_wrong_naming_conventions to using theRightNamingConventions. Also make seq_cst the default.
2221 Rubber stamped by Geoffrey Garen.
2224 (WTF::Atomic::load):
2225 (WTF::Atomic::store):
2226 (WTF::Atomic::compareExchangeWeak):
2227 (WTF::Atomic::compareExchangeStrong):
2228 (WTF::Atomic::compare_exchange_weak): Deleted.
2229 (WTF::Atomic::compare_exchange_strong): Deleted.
2230 * wtf/ByteSpinLock.h:
2231 (WTF::ByteSpinLock::lock):
2233 (WTF::SpinLockBase::lock):
2235 2015-03-24 Beth Dakin <bdakin@apple.com>
2237 Add events related to force click gesture
2238 https://bugs.webkit.org/show_bug.cgi?id=142836
2240 rdar://problem/20210239
2242 Reviewed by Dean Jackson.
2244 New enable flag for the events.
2245 * wtf/FeatureDefines.h:
2247 2015-03-23 Filip Pizlo <fpizlo@apple.com>
2249 JSC should have a low-cost asynchronous disassembler
2250 https://bugs.webkit.org/show_bug.cgi?id=142997
2252 Reviewed by Mark Lam.
2254 * wtf/StringPrintStream.h:
2256 2015-03-22 Benjamin Poulain <benjamin@webkit.org>
2258 CSS Selectors: fix attribute case-insensitive matching of Contain and List
2259 https://bugs.webkit.org/show_bug.cgi?id=142932
2261 Reviewed by Darin Adler.
2263 Add some utility functions to the string classes to find substrings
2264 using ASCII case-insensitive comparisons.
2266 * wtf/text/AtomicString.h:
2267 (WTF::AtomicString::contains):
2268 Add the light version that only lock one register.
2270 (WTF::AtomicString::containsIgnoringASCIICase):
2271 (WTF::AtomicString::findIgnoringASCIICase):
2273 * wtf/text/StringCommon.h:
2274 (WTF::findIgnoringASCIICase):
2275 This is the common implementation used by StringView and StringImpl.
2277 * wtf/text/StringImpl.cpp:
2278 (WTF::StringImpl::findIgnoringASCIICase):
2279 * wtf/text/StringImpl.h:
2280 * wtf/text/StringView.cpp:
2281 (WTF::StringView::containsIgnoringASCIICase):
2282 (WTF::StringView::findIgnoringASCIICase):
2283 * wtf/text/StringView.h:
2284 * wtf/text/WTFString.h:
2285 (WTF::String::findIgnoringASCIICase):
2286 (WTF::String::contains):
2287 (WTF::String::containsIgnoringASCIICase):
2289 2015-03-19 Andreas Kling <akling@apple.com>
2291 DFGAllocator should use bmalloc's aligned allocator.
2292 <https://webkit.org/b/142871>
2294 Reviewed by Geoffrey Garen.
2296 Remove PageAllocationAligned since it has no more clients.
2298 * WTF.vcxproj/WTF.vcxproj:
2299 * WTF.vcxproj/WTF.vcxproj.filters:
2300 * WTF.xcodeproj/project.pbxproj:
2301 * wtf/CMakeLists.txt:
2302 * wtf/PageAllocationAligned.cpp: Removed.
2303 * wtf/PageAllocationAligned.h: Removed.
2305 2015-03-18 Dhi Aurrahman <diorahman@rockybars.com>
2307 Fix StringView misplaced implementations after r181525 and r181558
2308 https://bugs.webkit.org/show_bug.cgi?id=142772
2310 Reviewed by Darin Adler.
2312 Fix misplaced implementations in StringView::startsWithIgnoringASCIICase and
2313 StringView::endsWith.
2315 Add some tests in [1] to cover the StringView::startsWith,
2316 StringView::startsWithIgnoringASCIICase, StringView::endsWith and
2317 StringView::endsWithIgnoringASCIICase implementations.
2319 [1] Tools/TestWebKitAPI/Tests/WTF/StringView.cpp.
2321 * wtf/text/StringView.cpp:
2322 (WTF::StringView::startsWithIgnoringASCIICase):
2323 (WTF::StringView::endsWith):
2324 (WTF::StringView::endsWithIgnoringASCIICase):
2326 2015-03-17 Michael Saboff <msaboff@apple.com>
2328 Windows X86-64 should use the fixed executable allocator
2329 https://bugs.webkit.org/show_bug.cgi?id=142749
2331 Reviewed by Filip Pizlo.
2333 Set ENABLE_EXECUTABLE_ALLOCATOR_FIXED for Windows.
2334 Needed to export MetaAllocator::currentStatistics() for use in JavaScriptCore.
2336 * wtf/MetaAllocator.h:
2339 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
2341 Enable ES6 classes by default
2342 https://bugs.webkit.org/show_bug.cgi?id=142774
2344 Reviewed by Gavin Barraclough.
2346 * wtf/FeatureDefines.h:
2348 2015-03-16 Csaba Osztrogonác <ossy@webkit.org>
2350 [ARM] Enable generating idiv instructions if it is supported
2351 https://bugs.webkit.org/show_bug.cgi?id=142725
2353 Reviewed by Michael Saboff.
2355 * wtf/Platform.h: Set HAVE_ARM_IDIV_INSTRUCTIONS based on GCC macro too.
2357 2015-03-16 Benjamin Poulain <benjamin@webkit.org>
2359 Fix StringView after r181525
2362 Fix 2 silly mistakes I made in r181525.
2364 * wtf/text/StringView.cpp:
2365 (WTF::StringView::startsWith):
2366 (WTF::StringView::startsWithIgnoringASCIICase):
2367 (WTF::StringView::endsWith):
2368 (WTF::StringView::endsWithIgnoringASCIICase):
2369 The implementation was inside the #ifdef.
2371 * wtf/text/StringView.h:
2372 The symbols were not exported.
2374 2015-03-16 Max Stepin <maxstepin@gmail.com>
2377 https://bugs.webkit.org/show_bug.cgi?id=17022
2379 Reviewed by Carlos Garcia Campos.
2381 * wtf/FeatureDefines.h:
2383 2015-03-15 Benjamin Poulain <benjamin@webkit.org>
2385 CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
2386 https://bugs.webkit.org/show_bug.cgi?id=142715
2388 Reviewed by Brent Fulgham.
2390 Add the necessary infrastructure to test startsWith() and endsWith() with
2391 ASCII case-insentive comparisons.
2393 * wtf/text/AtomicString.h:
2394 (WTF::AtomicString::startsWith):
2395 (WTF::AtomicString::startsWithIgnoringASCIICase):
2396 (WTF::AtomicString::endsWith):
2397 (WTF::AtomicString::endsWithIgnoringASCIICase):
2399 * wtf/text/StringCommon.h:
2400 (WTF::loadUnaligned):
2402 I moved the low level equal() code from StringImpl to StringCommon
2403 since it is used by both StringImpl and StringView.
2406 (WTF::equalIgnoringASCIICaseCommon):
2407 Ideally we should drop the "Common" part of the name but StringView
2408 wants this inline for some reason. I prefered keeping the current behavior
2409 since I don't know how StringView's matching performance was evaluated.
2412 (WTF::startsWithIgnoringASCIICase):
2414 (WTF::endsWithIgnoringASCIICase):
2415 Make all that code shared between StringView and Stringimpl.
2417 * wtf/text/StringImpl.cpp:
2418 (WTF::StringImpl::startsWith):
2419 (WTF::StringImpl::startsWithIgnoringASCIICase):
2420 (WTF::StringImpl::endsWith):
2421 (WTF::StringImpl::endsWithIgnoringASCIICase):
2423 (WTF::stringImplContentEqual): Deleted.
2424 * wtf/text/StringImpl.h:
2425 (WTF::loadUnaligned): Deleted.
2426 (WTF::equal): Deleted.
2428 * wtf/text/StringView.cpp:
2429 (WTF::StringView::startsWith):
2430 (WTF::StringView::startsWithIgnoringASCIICase):
2431 (WTF::StringView::endsWith):
2432 (WTF::StringView::endsWithIgnoringASCIICase):
2433 * wtf/text/StringView.h:
2434 Since those are new, we can safely make them out-of-line and
2435 evaluate the inlining impact as needed.
2437 * wtf/text/WTFString.h:
2438 (WTF::String::startsWithIgnoringASCIICase):
2439 (WTF::String::endsWith):
2440 (WTF::String::endsWithIgnoringASCIICase):
2442 2015-03-15 Benjamin Poulain <bpoulain@apple.com>
2444 Change the exact attribute matching to be ASCII case-insensitive
2445 https://bugs.webkit.org/show_bug.cgi?id=142609
2447 Reviewed by Darin Adler.
2449 Add support for ASCII case insensitive comparisons to all the string
2452 The new file StringCommon.h has the common algorithm to avoid repeating
2453 the same code with different types.
2455 * WTF.vcxproj/WTF.vcxproj:
2456 * WTF.vcxproj/WTF.vcxproj.filters:
2458 (WTF::toASCIILower):
2459 * wtf/CMakeLists.txt:
2460 * wtf/text/AtomicString.h:
2461 (WTF::equalIgnoringASCIICase):
2462 * wtf/text/StringCommon.h: Added.
2463 (WTF::equalIgnoringASCIICase):
2464 (WTF::equalIgnoringASCIICaseCommon):
2465 * wtf/text/StringImpl.cpp:
2466 (WTF::equalIgnoringASCIICase):
2467 (WTF::equalIgnoringASCIICaseNonNull):
2468 (WTF::StringImpl::utf8Impl):
2469 (WTF::StringImpl::defaultWritingDirection): Deleted.
2470 (WTF::StringImpl::adopt): Deleted.
2471 (WTF::StringImpl::sizeInBytes): Deleted.
2472 (WTF::putUTF8Triple): Deleted.
2473 (WTF::StringImpl::utf8): Deleted.
2474 * wtf/text/StringImpl.h:
2475 (WTF::StringImpl::isSubString): Deleted.
2476 (WTF::find): Deleted.
2478 2015-03-14 Michael Saboff <msaboff@apple.com>
2480 Disable Yarr JIT for ARMv7k
2481 https://bugs.webkit.org/show_bug.cgi?id=142645
2483 Rubber stamped by Geoffrey Garen.
2485 Changed the setting of ENABLE_YARR_JIT to be predicated on ENABLED_JIT.
2489 2015-03-14 Michael Saboff <msaboff@apple.com>
2491 ES6: Add binary and octal literal support
2492 https://bugs.webkit.org/show_bug.cgi?id=142681
2494 Reviewed by Ryosuke Niwa.
2497 (WTF::isASCIIBinaryDigit): New support function.
2498 (WTF::isASCIIOctalDigit): Updated to use logical and (&&) instead of binary and (&).
2500 2015-03-13 Mark Lam <mark.lam@apple.com>
2502 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
2503 <https://webkit.org/b/142674>
2505 Reviewed by Filip Pizlo.
2507 We no longer use TCMalloc in our code, and we now have C++11. This replaces the
2508 TCMalloc_SpinLock with a new WTF::SpinLock based on WTF::Atomic (which is a
2509 wrapper around std::atomic).
2511 Note that there is a StaticSpinLock and a SpinLock:
2513 1. StaticSpinLock is an alias for SpinLockBase, and its initialization relies on
2514 static / global std:atomic being automatically initialized to 0 at compile time.
2515 Hence, StaticSpinLock should only be used for statics / globals (including
2516 static members of classes / structs).
2518 2. SpinLock is derived from SpinLockBase, and adds a default constructor to
2519 initialize its internal atomic value to 0. Because SpinLock has a constructor,
2520 it cannot be used for statics / globals. Objects that want to embed a spin
2521 lock as an instance field should use SpinLock so that it is initialized properly.
2522 std::atomic will not automatically initialize instance fields to 0. Hence,
2523 StaticSpinLock will not work correctly as instance fields of a class / struct.
2525 * WTF.vcxproj/WTF.vcxproj:
2526 * WTF.vcxproj/WTF.vcxproj.filters:
2527 * WTF.xcodeproj/project.pbxproj:
2528 * wtf/CMakeLists.txt:
2529 * wtf/MetaAllocator.cpp:
2530 (WTF::MetaAllocator::~MetaAllocator):
2531 (WTF::MetaAllocator::MetaAllocator):
2532 * wtf/MetaAllocator.h:
2533 * wtf/SpinLock.h: Added.
2534 (WTF::SpinLockBase::lock):
2535 (WTF::SpinLockBase::unlock):
2536 (WTF::SpinLockBase::isLocked):
2537 (WTF::SpinLockBase::slowLock):
2538 (WTF::SpinLock::SpinLock):
2539 * wtf/TCSpinLock.h: Removed.
2540 * wtf/text/AtomicString.cpp:
2542 2015-03-13 Mark Lam <mark.lam@apple.com>
2544 Introduce WTF::Atomic to wrap std::atomic for a friendlier CAS.
2545 <https://webkit.org/b/142661>
2547 Reviewed by Filip Pizlo.
2549 The CAS functions provided by std::atomic takes a reference to the expected
2550 value and modifies it if the CAS fails. However, in a lot of our CAS usage,
2551 we don't want the expected value to change. The solution to this is to
2552 provide a WTF::Atomic struct that wraps std::atomic, and provide CAS
2553 methods that won't alter the expected value if the CAS fails.
2555 The method names in WTF::Atomic are chosen to be identical to those
2556 in std::atomic so that WTF::Atomic can be a simple drop in replacement
2559 Also changed ByteSpinLock to use WTF::Atomic instead of std::atomic.
2562 (WTF::Atomic::load):
2563 (WTF::Atomic::store):
2564 (WTF::Atomic::compare_exchange_weak):
2565 (WTF::Atomic::compare_exchange_strong):
2566 * wtf/ByteSpinLock.h:
2567 (WTF::ByteSpinLock::ByteSpinLock):
2568 (WTF::ByteSpinLock::lock):
2570 2015-03-12 Filip Pizlo <fpizlo@apple.com>
2572 Bytecode liveness analysis should have more lambdas and fewer sets
2573 https://bugs.webkit.org/show_bug.cgi?id=142647
2575 Reviewed by Mark Lam.
2577 Add a method for iterating each set bit in a FastBitVector. Uses a functor as a callback since
2578 this allows for a more efficient algorithm.
2580 * wtf/FastBitVector.h:
2581 (WTF::FastBitVector::forEachSetBit):
2583 2015-03-12 Michael Saboff <msaboff@apple.com>
2585 Disable Yarr JIT for ARMv7k
2586 https://bugs.webkit.org/show_bug.cgi?id=142645
2588 Reviewed by Oliver Hunt.
2590 Make the setting of ENABLE_YARR_JIT match ENABLE_JIT for ARMv7k.
2594 2015-03-12 Mark Lam <mark.lam@apple.com>
2596 Change WTF::ByteSpinLock to use std::atomic.
2597 <https://webkit.org/b/142644>
2599 Reviewed by Filip Pizlo.
2601 * wtf/ByteSpinLock.h:
2602 (WTF::ByteSpinLock::ByteSpinLock):
2603 (WTF::ByteSpinLock::lock):
2604 (WTF::ByteSpinLock::unlock):
2605 (WTF::ByteSpinLock::isHeld):
2607 2015-03-12 Csaba Osztrogonác <ossy@webkit.org>
2609 [ARM][Linux] GC sometimes stuck in an infinite loop if parallel GC is enabled
2610 https://bugs.webkit.org/show_bug.cgi?id=141290
2612 Reviewed by Carlos Garcia Campos.
2614 * wtf/Platform.h: Enable parallel GC after r181319.
2616 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
2618 Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
2619 https://bugs.webkit.org/show_bug.cgi?id=142569
2621 Reviewed by David Hyatt.
2623 Provide a callback to Optional::valueOrCompute() which is evaluated only if necessary.
2626 (WTF::Optional::valueOrCompute):
2628 2015-03-10 Brent Fulgham <bfulgham@apple.com>
2630 [Win] 17 different JSC tests started to fail in DST
2631 https://bugs.webkit.org/show_bug.cgi?id=142531
2633 Reviewed by Chris Dumez.
2635 The stock 'GetTimeZoneInformation' call does not always match the actual Daylight
2636 Savings calendar. This results in a period of time when these tests fail.
2638 If available, we should take advantage of the new 'GetTimeZoneInformationForYear',
2639 which accesses a dynamic calendar of DST dates, which is presumbably updated by
2640 Microsoft from year-to-year.
2643 (WTF::timeZoneInformationForYearFunction): New function to conditionally access
2644 some Vista (and newer) functionality.
2645 (WTF::calculateUTCOffset): Call new function (if available) to calculate proper UTC
2648 2015-03-10 Alex Christensen <achristensen@webkit.org>
2650 Use unsigned for HashSet size.
2651 https://bugs.webkit.org/show_bug.cgi?id=142518
2653 Reviewed by Benjamin Poulain.
2655 * wtf/HashCountedSet.h:
2656 (WTF::Traits>::size):
2657 (WTF::Traits>::capacity):
2660 (WTF::X>::capacity):
2663 (WTF::V>::capacity):
2665 (WTF::HashTable::Stats::recordCollisionAtCount):
2666 (WTF::HashTable::Stats::dumpStats):
2667 (WTF::HashTable::size):
2668 (WTF::HashTable::capacity):
2669 (WTF::KeyTraits>::deallocateTable):
2670 (WTF::KeyTraits>::checkTableConsistencyExceptSize):
2672 * wtf/ListHashSet.h:
2674 (WTF::U>::capacity):
2676 2015-03-10 Said Abou-Hallawa <sabouhallawa@apple.com>
2678 Remove PassRefPtr from svg/properties classes.
2679 https://bugs.webkit.org/show_bug.cgi?id=142063.
2681 Reviewed by Darin Adler.
2684 (WTF::static_reference_cast): Add a stat_cast function to Ref<>.
2686 2015-03-10 Mark Lam <mark.lam@apple.com>
2688 [Win] JSC Build Warnings Need to be Resolved.
2689 <https://webkit.org/b/142366>
2691 Reviewed by Brent Fulgham.
2694 - MSVC also does not have the CONSIDERS_UNREACHABLE_CODE quirk.
2696 2015-03-10 Geoffrey Garen <ggaren@apple.com>
2698 bmalloc: tryFastMalloc shouldn't crash
2699 https://bugs.webkit.org/show_bug.cgi?id=142443
2701 Reviewed by Sam Weinig.
2703 Rolling back in r181307 with a check for whether bmalloc is enabled, to
2704 avoid crashes when running with ASan and GuardMalloc.
2706 * wtf/FastMalloc.cpp:
2709 (WTF::fastAlignedMalloc):
2710 (WTF::tryFastMalloc):
2711 (WTF::tryFastRealloc): Deleted.
2714 2015-03-10 Michael Catanzaro <mcatanzaro@igalia.com>
2716 GCC: CRASH() should be annotated with NORETURN
2717 https://bugs.webkit.org/show_bug.cgi?id=142524
2719 Reviewed by Anders Carlsson.
2721 Add COMPILER(GCC) to #ifdefs that already exist for Clang.
2723 * wtf/Assertions.cpp:
2726 2015-03-09 Commit Queue <commit-queue@webkit.org>
2728 Unreviewed, rolling out r181307.
2729 https://bugs.webkit.org/show_bug.cgi?id=142525
2731 Broke ASan tests (Requested by ap on #webkit).
2735 "bmalloc: tryFastMalloc shouldn't crash"
2736 https://bugs.webkit.org/show_bug.cgi?id=142443
2737 http://trac.webkit.org/changeset/181307
2739 2015-03-09 Geoffrey Garen <ggaren@apple.com>
2741 bmalloc: tryFastMalloc shouldn't crash
2742 https://bugs.webkit.org/show_bug.cgi?id=142443
2744 Reviewed by Darin Adler.
2746 * wtf/FastMalloc.cpp:
2749 (WTF::fastAlignedMalloc): Don't check for null. bmalloc automatically
2750 crashes on allocation failure, and we'd rather not pay for an extra check.
2752 (WTF::tryFastMalloc): Added an opt-out API to return null rather than
2753 crashing, since some clients need this.
2755 (WTF::tryFastRealloc): Deleted. Unused.
2759 2015-03-09 Mark Lam <mark.lam@apple.com>
2761 8-bit version of weakCompareAndSwap() can cause an infinite loop.
2762 https://webkit.org/b/142513>
2764 Reviewed by Filip Pizlo.
2766 Presently, Bitmap::concurrentTestAndSet() uses the 8-bit version of
2767 weakCompareAndSwap() (which compares and swaps an uint8_t value).
2768 Bitmap::concurrentTestAndSet() has a loop that checks if a bit in the
2769 byte of interest has been set. If not, it will call the 8-bit CAS
2770 function to set the bit.
2772 Under the covers, for ARM, the 8-bit CAS function actually works with a
2773 32-bit CAS. The 8-bit CAS will first fetch the 32-bit value in memory
2774 that should contain the 8-bit value, and check if it contains the
2775 expected byte. If the value in memory doesn't have the expected byte,
2776 it will return early to its caller. The expectation is that the caller
2777 will reload the byte from memory and call the 8-bit CAS again.
2779 Unfortunately, this code path that returns early does not have a
2780 compiler fence. Without a compiler fence, the C++ compiler can
2781 optimize away the reloading of the expected byte value, leaving it
2782 unchanged. As a result, we'll have a infinite loop here that checks a
2783 value that will never change, and the loop will not terminate until the
2786 The fix is to eliminate the early return check in the 8-bit CAS, and
2787 have it always call down to the 32-bit CAS. The 32-bit CAS has a
2788 compiler fence which will prevent this issue.
2791 (WTF::weakCompareAndSwap):
2793 2015-03-09 Martin Robinson <mrobinson@igalia.com>
2795 [EFL] Move DispatchQueue to WTF
2796 https://bugs.webkit.org/show_bug.cgi?id=142493
2798 Reviewed by Csaba Osztrogonác.
2800 * wtf/PlatformEfl.cmake: Add DispatchQueue to the source list.
2801 * wtf/efl/DispatchQueueEfl.cpp: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.cpp.
2802 * wtf/efl/DispatchQueueEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.h.
2803 * wtf/efl/DispatchQueueWorkItemEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h.
2805 2015-03-08 Brent Fulgham <bfulgham@apple.com>
2807 [Win] WTF::WorkQueue does not balance ref/deref properly
2808 https://bugs.webkit.org/show_bug.cgi?id=142471
2810 Reviewed by Antti Koivisto.
2812 Make sure we deref the count when we execute a function in the
2815 * wtf/win/WorkQueueWin.cpp:
2816 (WTF::WorkQueue::performWorkOnRegisteredWorkThread):
2818 2015-03-07 Brent Fulgham <bfulgham@apple.com>
2820 [Win] Revive WTF::WorkQueue on Windows
2821 https://bugs.webkit.org/show_bug.cgi?id=142432
2823 Reviewed by Darin Adler.
2825 Revive the Windows implementation of WTF::WorkQueue.
2827 * WTF.vcxproj/WTF.vcxproj:
2828 * WTF.vcxproj/WTF.vcxproj.filters:
2830 * wtf/win/WorkItemWin.cpp: Added.
2831 * wtf/win/WorkItemWin.h: Added.
2832 * wtf/win/WorkQueueWin.cpp: Added.
2834 2015-03-06 Geoffrey Garen <ggaren@apple.com>
2836 Fix crashes seen on the the Windows buildbots after my last patch.
2840 * wtf/FastMalloc.cpp:
2841 (WTF::fastAlignedMalloc): Let's pass these arguments in the right order.
2843 2015-03-06 Myles C. Maxfield <mmaxfield@apple.com>
2845 Crash in -[WebCascadeList objectAtIndex:] + 195
2846 https://bugs.webkit.org/show_bug.cgi?id=141274
2848 Reviewed by David Kilzer.
2851 (WTF::WeakPtrFactory::createWeakPtr): WebCascadeList uses a const FontCascade,
2852 and it calls createWeakPtr() on it. Therefore, createWeakPtr has to be marked
2854 (WTF::WeakPtrFactory::operator=): Removed because it was broken and had no
2857 2015-03-06 Simon Fraser <simon.fraser@apple.com>
2859 Allow tree dumping functions to be used in release builds by switching a flag
2860 https://bugs.webkit.org/show_bug.cgi?id=142379
2862 Reviewed by Zalan Bujtas.
2864 There are various tree dumping functions that are useful for debugging, and sometimes
2865 you want to be able to use them in release builds. Currently they are surrounded by
2866 #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
2871 2015-03-05 Chris Dumez <cdumez@apple.com>
2873 Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
2874 https://bugs.webkit.org/show_bug.cgi?id=142350
2876 Reviewed by Michael Saboff and Benjamin Poulain.
2878 Fix ASSERTION FAILED: !is8Bit() in StringImpl::characters16() from
2879 WTF::equalInner() after r173761. The code was incorrectly assuming that
2880 if stringImpl is 16-bit, then matchString is 16-bit too, which is not
2883 Also rename WTFString::startsWith() / endsWith() taking an offset to
2884 hasInfixStartingAt() / hasInfixEndingAt() for clarity. It seems odd
2885 to call it startsWith even though it won't technically *start* with
2886 the pattern if the input offset is greater than zero.
2888 Also drop the caseSensitive argument as it is never used (always true
2891 * wtf/text/StringImpl.cpp:
2893 (WTF::StringImpl::hasInfixStartingAt):
2894 (WTF::StringImpl::hasInfixEndingAt):
2895 (WTF::StringImpl::startsWith): Deleted.
2896 (WTF::StringImpl::endsWith): Deleted.
2897 * wtf/text/StringImpl.h:
2898 * wtf/text/WTFString.h:
2899 (WTF::String::hasInfixStartingAt):
2900 (WTF::String::hasInfixEndingAt):
2901 (WTF::String::startsWith): Deleted.
2902 (WTF::String::endsWith): Deleted.
2904 2015-03-05 Chris Dumez <cdumez@apple.com>
2906 NetworkCache efficacy logging is using too much CPU
2907 https://bugs.webkit.org/show_bug.cgi?id=142186
2908 <rdar://problem/19632080>
2910 Reviewed by Antti Koivisto.
2913 (WTF::copyToVector):
2914 Add copyToVector() utility function for HashMap that uses an std::pair<key, value>
2917 * wtf/text/WTFString.h:
2918 (WTF::StringCapture::StringCapture):
2919 (WTF::StringCapture::operator=):
2920 Add default constructor and assignment operator to StringCapture so that
2921 it can be used in a Vector.
2923 2015-03-05 Antti Koivisto <antti@apple.com>
2925 Support WorkQueue QOS classes on Mavericks
2926 https://bugs.webkit.org/show_bug.cgi?id=142328
2928 Reviewed by Anders Carlsson.
2930 "The priority of a dispatch queue is inherited from its target queue. In order to
2931 change the priority of a queue created with dispatch_queue_create(), use the
2932 dispatch_get_global_queue() function to obtain a target queue of the desired prior-
2935 * wtf/cocoa/WorkQueueCocoa.cpp:
2936 (WTF::targetQueueForQOSClass):
2937 (WTF::WorkQueue::platformInitialize):
2939 2015-03-03 Anders Carlsson <andersca@apple.com>
2941 Remove unused compression code
2942 https://bugs.webkit.org/show_bug.cgi?id=142237
2944 Reviewed by Geoffrey Garen.
2946 * WTF.vcxproj/WTF.vcxproj:
2947 * WTF.vcxproj/WTF.vcxproj.filters:
2948 * WTF.xcodeproj/project.pbxproj:
2949 * wtf/CMakeLists.txt:
2950 * wtf/Compression.cpp: Removed.
2951 * wtf/Compression.h: Removed.
2953 2015-03-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2955 [WK2] Remove unnecessary create() factory functions.
2956 https://bugs.webkit.org/show_bug.cgi?id=142161
2958 Reviewed by Chris Dumez.
2960 We can replace some create() factory functions with std::make_unique(). Because
2961 it just returns new instance. Even some of those functions have used std::unique_ptr<>
2962 instead of std::make_unique<>. Fixed all.
2964 * wtf/efl/WorkQueueEfl.cpp:
2965 (WorkQueue::dispatch):
2967 2015-03-02 Filip Pizlo <fpizlo@apple.com>
2969 DFG compile time measurements should really report milliseconds
2970 https://bugs.webkit.org/show_bug.cgi?id=142209
2972 Reviewed by Benjamin Poulain.
2974 This bug was introduced because currentTimeMS() calls were converted to
2975 monotonicallyIncreasingTime() calls. Perhaps this bug would be less likely if there was a
2976 monotonicallyIncreasingTimeMS() function available, so this patch adds it.
2978 * wtf/CurrentTime.h:
2979 (WTF::monotonicallyIncreasingTimeMS):
2981 2015-02-27 Darin Adler <darin@apple.com>
2983 Remove unused PossiblyNull
2984 https://bugs.webkit.org/show_bug.cgi?id=142124
2986 Reviewed by Andreas Kling.
2988 * WTF.vcxproj/WTF.vcxproj: Removed the file.
2989 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2990 * WTF.xcodeproj/project.pbxproj: Ditto.
2991 * wtf/CMakeLists.txt: Ditto.
2992 * wtf/PossiblyNull.h: Removed.
2994 * wtf/FastMalloc.h: Moved everything to the left.
2995 Moved member functions out of the TryMallocReturnValue class definition.
2996 (WTF::TryMallocReturnValue::operator PossiblyNull<T>): Deleted.
2997 (WTF::TryMallocReturnValue::getValue): Marked inline, changed to work
2998 only with pointer types, not arbitrary non-pointer types.
3000 2015-02-26 Brent Fulgham <bfulgham@apple.com>
3002 [Win] Make build logs more legible by reducing noise
3003 https://bugs.webkit.org/show_bug.cgi?id=142034
3005 Reviewed by Alexey Proskuryakov.
3007 Modify batch files, makefiles, and DOS commands to remove
3008 uninteresting/unhelpful output.
3010 * WTF.vcxproj/WTFGenerated.make:
3011 * WTF.vcxproj/WTFPreBuild.cmd:
3012 * WTF.vcxproj/copy-files.cmd:
3014 2015-02-26 Landry Breuil <landry@openbsd.org>
3016 Revert bug 19975, now that gcc 4.7 is required.
3017 https://bugs.webkit.org/show_bug.cgi?id=129927
3019 Reviewed by Andreas Kling.
3021 isfinite() and signbit() are provided by gcc's cmath header.
3025 2015-02-26 Csaba Osztrogonác <ossy@webkit.org>
3027 UNREACHABLE_FOR_PLATFORM() should be release assert
3028 https://bugs.webkit.org/show_bug.cgi?id=141904
3030 Reviewed by Darin Adler.
3033 (UNREACHABLE_FOR_PLATFORM):
3035 2015-02-25 Filip Pizlo <fpizlo@apple.com>
3037 Enable concurrent JIT on GTK
3038 https://bugs.webkit.org/show_bug.cgi?id=142007
3040 Reviewed by Benjamin Poulain.
3042 Seems weird that GTK keeps it off. No good reason for that as far as I can tell.
3046 2015-02-23 Brent Fulgham <bfulgham@apple.com>
3048 WTF::WeakPtr should rename 'forgot' to 'clear' and support nullptr assignment
3049 https://bugs.webkit.org/show_bug.cgi?id=141935
3051 Reviewed by Myles C. Maxfield.
3054 (WTF::WeakPtr::operator=): Added 'nullptr_t' overload.
3055 (WTF::WeakPtr::clear): Renamed from 'forget'
3056 (WTF::WeakPtr::forget): Deleted.
3058 2015-02-23 Brent Fulgham <bfulgham@apple.com>
3060 WTF::WeakPtr should have a 'forget' method
3061 https://bugs.webkit.org/show_bug.cgi?id=141923
3063 Reviewed by Myles C. Maxfield.
3066 (WTF::WeakPtr::forget): Added.
3068 2015-02-20 Geoffrey Garen <ggaren@apple.com>
3071 https://bugs.webkit.org/show_bug.cgi?id=141844
3073 Reviewed by Andreas Kling.
3077 * WTF.vcxproj/WTF.vcxproj:
3078 * WTF.vcxproj/WTF.vcxproj.filters:
3079 * WTF.xcodeproj/project.pbxproj:
3080 * wtf/CMakeLists.txt:
3081 * wtf/FastMalloc.cpp:
3082 (WTF::EntropySource<4>::value): Deleted.
3083 (WTF::EntropySource<8>::value): Deleted.
3084 (WTF::internalEntropyValue): Deleted.
3085 (WTF::freedObjectStartPoison): Deleted.
3086 (WTF::freedObjectEndPoison): Deleted.
3087 (WTF::ClassIndex): Deleted.
3088 (WTF::HardenedSLL::create): Deleted.
3089 (WTF::HardenedSLL::null): Deleted.
3090 (WTF::HardenedSLL::setValue): Deleted.
3091 (WTF::HardenedSLL::value): Deleted.
3092 (WTF::HardenedSLL::operator!): Deleted.
3093 (WTF::HardenedSLL::operator UnspecifiedBoolType): Deleted.
3094 (WTF::HardenedSLL::operator!=): Deleted.
3095 (WTF::HardenedSLL::operator==): Deleted.
3096 (WTF::LgFloor): Deleted.
3097 (WTF::SLL_Next): Deleted.
3098 (WTF::SLL_SetNext): Deleted.
3099 (WTF::SLL_Push): Deleted.
3100 (WTF::SLL_Pop): Deleted.
3101 (WTF::SLL_PopRange): Deleted.
3102 (WTF::SLL_PushRange): Deleted.
3103 (WTF::SizeClass): Deleted.
3104 (WTF::ByteSizeForClass): Deleted.
3105 (WTF::NumMoveSize): Deleted.
3106 (WTF::InitSizeClasses): Deleted.
3107 (WTF::MetaDataAlloc): Deleted.
3108 (WTF::PageHeapAllocator::Init): Deleted.
3109 (WTF::PageHeapAllocator::New): Deleted.
3110 (WTF::PageHeapAllocator::Delete): Deleted.
3111 (WTF::PageHeapAllocator::inuse): Deleted.
3112 (WTF::pages): Deleted.
3113 (WTF::AllocationSize): Deleted.
3114 (WTF::spanInitializerCookie): Deleted.
3115 (WTF::Span::next): Deleted.
3116 (WTF::Span::remoteNext): Deleted.
3117 (WTF::Span::prev): Deleted.
3118 (WTF::Span::setNext): Deleted.
3119 (WTF::Span::setPrev): Deleted.
3120 (WTF::Span::initCookie): Deleted.
3121 (WTF::Span::clearCookie): Deleted.
3122 (WTF::Span::isValid): Deleted.
3123 (WTF::Event): Deleted.
3124 (WTF::NewSpan): Deleted.
3125 (WTF::DeleteSpan): Deleted.
3126 (WTF::DLL_Init): Deleted.
3127 (WTF::DLL_Remove): Deleted.
3128 (WTF::DLL_IsEmpty): Deleted.
3129 (WTF::DLL_Length): Deleted.
3130 (WTF::DLL_Print): Deleted.
3131 (WTF::DLL_Prepend): Deleted.
3132 (WTF::TCMalloc_Central_FreeList::length): Deleted.
3133 (WTF::TCMalloc_Central_FreeList::tc_length): Deleted.
3134 (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Deleted.
3135 (WTF::TCMalloc_Central_FreeList::entropy): Deleted.
3136 (WTF::FastMallocZone::goodSize): Deleted.
3137 (WTF::FastMallocZone::check): Deleted.
3138 (WTF::FastMallocZone::print): Deleted.
3139 (WTF::FastMallocZone::log): Deleted.
3140 (WTF::FastMallocZone::forceLock): Deleted.
3141 (WTF::FastMallocZone::forceUnlock): Deleted.
3142 (WTF::FastMallocZone::statistics): Deleted.
3143 (WTF::FastMallocZone::zoneValloc): Deleted.
3144 (WTF::FastMallocZone::zoneDestroy): Deleted.
3145 (WTF::MallocHook::record): Deleted.
3146 (WTF::MallocHook::recordAllocation): Deleted.
3147 (WTF::MallocHook::recordDeallocation): Deleted.
3148 (WTF::MallocHook::init): Deleted.
3149 (WTF::MallocHook::InvokeNewHook): Deleted.
3150 (WTF::MallocHook::InvokeDeleteHook): Deleted.
3151 (WTF::KernelSupportsTLS): Deleted.
3152 (WTF::CheckIfKernelSupportsTLS): Deleted.
3153 (WTF::TCMalloc_PageHeap::GetDescriptor): Deleted.
3154 (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe): Deleted.
3155 (WTF::TCMalloc_PageHeap::SystemBytes): Deleted.
3156 (WTF::TCMalloc_PageHeap::FreeBytes): Deleted.
3157 (WTF::TCMalloc_PageHeap::GetSizeClassIfCached): Deleted.
3158 (WTF::TCMalloc_PageHeap::CacheSizeClass): Deleted.
3159 (WTF::TCMalloc_PageHeap::RecordSpan): Deleted.
3160 (WTF::TCMalloc_PageHeap::init): Deleted.
3161 (WTF::TCMalloc_PageHeap::initializeScavenger): Deleted.
3162 (WTF::TCMalloc_PageHeap::isScavengerSuspended): Deleted.
3163 (WTF::TCMalloc_PageHeap::scheduleScavenger): Deleted.
3164 (WTF::TCMalloc_PageHeap::rescheduleScavenger): Deleted.
3165 (WTF::TCMalloc_PageHeap::suspendScavenger): Deleted.
3166 (WTF::TCMalloc_PageHeap::scavengerTimerFired): Deleted.
3167 (WTF::TCMalloc_PageHeap::runScavengerThread): Deleted.
3168 (WTF::TCMalloc_PageHeap::signalScavenger): Deleted.
3169 (WTF::TCMalloc_PageHeap::scavenge): Deleted.
3170 (WTF::TCMalloc_PageHeap::shouldScavenge): Deleted.
3171 (WTF::TCMalloc_PageHeap::New): Deleted.
3172 (WTF::TCMalloc_PageHeap::AllocLarge): Deleted.
3173 (WTF::TCMalloc_PageHeap::Split): Deleted.
3174 (WTF::TCMalloc_PageHeap::Carve): Deleted.
3175 (WTF::mergeDecommittedStates): Deleted.
3176 (WTF::TCMalloc_PageHeap::Delete): Deleted.
3177 (WTF::TCMalloc_PageHeap::IncrementalScavenge): Deleted.
3178 (WTF::TCMalloc_PageHeap::RegisterSizeClass): Deleted.
3179 (WTF::TCMalloc_PageHeap::ReturnedBytes): Deleted.
3180 (WTF::PagesToMB): Deleted.
3181 (WTF::TCMalloc_PageHeap::Dump): Deleted.
3182 (WTF::TCMalloc_PageHeap::GrowHeap): Deleted.
3183 (WTF::TCMalloc_PageHeap::Check): Deleted.
3184 (WTF::TCMalloc_PageHeap::CheckList): Deleted.
3185 (WTF::TCMalloc_PageHeap::ReleaseFreeList): Deleted.
3186 (WTF::TCMalloc_PageHeap::ReleaseFreePages): Deleted.
3187 (WTF::TCMalloc_ThreadCache_FreeList::Init): Deleted.
3188 (WTF::TCMalloc_ThreadCache_FreeList::length): Deleted.
3189 (WTF::TCMalloc_ThreadCache_FreeList::empty): Deleted.
3190 (WTF::TCMalloc_ThreadCache_FreeList::lowwatermark): Deleted.
3191 (WTF::TCMalloc_ThreadCache_FreeList::clear_lowwatermark): Deleted.
3192 (WTF::TCMalloc_ThreadCache_FreeList::Push): Deleted.
3193 (WTF::TCMalloc_ThreadCache_FreeList::PushRange): Deleted.
3194 (WTF::TCMalloc_ThreadCache_FreeList::PopRange): Deleted.
3195 (WTF::TCMalloc_ThreadCache_FreeList::Pop): Deleted.
3196 (WTF::TCMalloc_ThreadCache_FreeList::Validate): Deleted.
3197 (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Deleted.
3198 (WTF::TCMalloc_ThreadCache::freelist_length): Deleted.
3199 (WTF::TCMalloc_ThreadCache::Size): Deleted.
3200 (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Deleted.
3201 (WTF::getPageHeap): Deleted.
3202 (WTF::fastMallocGoodSize): Deleted.
3203 (WTF::TCMalloc_PageHeap::periodicScavenge): Deleted.
3204 (WTF::TCMalloc_PageHeap::scavengerThread): Deleted.
3205 (WTF::setThreadHeap): Deleted.
3206 (WTF::TCMalloc_Central_FreeList::Init): Deleted.
3207 (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans): Deleted.
3208 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): Deleted.
3209 (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass): Deleted.
3210 (WTF::TCMalloc_Central_FreeList::MakeCacheSpace): Deleted.
3211 (WTF::TCMalloc_Central_FreeList::ShrinkCache): Deleted.
3212 (WTF::TCMalloc_Central_FreeList::InsertRange): Deleted.
3213 (WTF::TCMalloc_Central_FreeList::RemoveRange): Deleted.
3214 (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe): Deleted.
3215 (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Deleted.
3216 (WTF::TCMalloc_Central_FreeList::Populate): Deleted.
3217 (WTF::TCMalloc_ThreadCache::SampleAllocation): Deleted.
3218 (WTF::TCMalloc_ThreadCache::Init): Deleted.
3219 (WTF::TCMalloc_ThreadCache::Cleanup): Deleted.
3220 (WTF::TCMalloc_ThreadCache::Allocate): Deleted.
3221 (WTF::TCMalloc_ThreadCache::Deallocate): Deleted.
3222 (WTF::TCMalloc_ThreadCache::FetchFromCentralCache): Deleted.
3223 (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache): Deleted.
3224 (WTF::TCMalloc_ThreadCache::Scavenge): Deleted.
3225 (WTF::TCMalloc_ThreadCache::PickNextSample): Deleted.
3226 (WTF::TCMalloc_ThreadCache::InitModule): Deleted.
3227 (WTF::TCMalloc_ThreadCache::NewHeap): Deleted.
3228 (WTF::TCMalloc_ThreadCache::GetThreadHeap): Deleted.
3229 (WTF::TCMalloc_ThreadCache::GetCache): Deleted.
3230 (WTF::TCMalloc_ThreadCache::GetCacheIfPresent): Deleted.
3231 (WTF::TCMalloc_ThreadCache::InitTSD): Deleted.
3232 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): Deleted.
3233 * wtf/TCPackedCache.h: Removed.
3234 * wtf/TCPageMap.h: Removed.
3235 * wtf/TCSystemAlloc.cpp: Removed.
3236 * wtf/TCSystemAlloc.h: Removed.
3238 2015-02-20 Alexey Proskuryakov <ap@apple.com>
3240 Remove svn:keywords property.
3242 As far as I can tell, the property had no effect on any of these files, but also,
3243 when it has effect it's likely harmful.
3245 * wtf/DecimalNumber.cpp: Removed property svn:keywords.
3246 * wtf/spi/darwin/XPCSPI.h: Removed property svn:keywords.
3248 2015-02-20 Csaba Osztrogonác <ossy@webkit.org>
3252 * wtf/PlatformEfl.cmake:
3254 2015-02-20 Simon Fraser <simon.fraser@apple.com>
3256 RunLoop::dispatch() should drop the mutex before calling wakeUp().
3257 https://bugs.webkit.org/show_bug.cgi?id=141820
3259 Reviewed by Alexey Proskuryakov.
3261 RunLoop::wakeUp() calls into CoreFoundation which could take time,
3262 so scope the mutex just to protect m_functionQueue.
3265 (WTF::RunLoop::dispatch):
3267 2015-02-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3269 Unreviewed, EFL build fix since r180410.
3271 * wtf/PlatformEfl.cmake: Add WEBKIT2/Platform/efl path in order to include DispatchQueueEfl.h.
3273 2015-02-20 Antti Koivisto <antti@apple.com>
3275 Move WorkQueue from WK2 to WTF
3276 https://bugs.webkit.org/show_bug.cgi?id=141797
3278 Reviewed by Anders Carlsson.
3280 It may be useful in WebCore.
3282 Windows implementation is still missing.
3284 * WTF.xcodeproj/project.pbxproj:
3285 * wtf/CMakeLists.txt:
3286 * wtf/PlatformGTK.cmake:
3287 * wtf/WorkQueue.cpp: Copied from Source/WebKit2/Platform/WorkQueue.cpp.
3288 * wtf/WorkQueue.h: Copied from Source/WebKit2/Platform/WorkQueue.h.
3290 * wtf/cocoa/WorkQueueCocoa.cpp: Copied from Source/WebKit2/Platform/mac/WorkQueueMac.cpp.
3291 * wtf/efl/WorkQueueEfl.cpp: Copied from Source/WebKit2/Platform/efl/WorkQueueEfl.cpp.
3292 * wtf/gtk/WorkQueueGtk.cpp: Copied from Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp.
3294 2015-02-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3296 [EFL] Enable bmalloc for EFL port
3297 https://bugs.webkit.org/show_bug.cgi?id=141459
3299 Reviewed by Csaba Osztrogonác.
3301 * wtf/CMakeLists.txt: Remove TCSystemAlloc.cpp/h.
3302 * wtf/FastMalloc.cpp: Enable BMALLOC for EFL port.
3304 2015-02-13 Anders Carlsson <andersca@apple.com>
3306 Add a move constructor and move assignment operator to Deque
3307 https://bugs.webkit.org/show_bug.cgi?id=141571
3309 Reviewed by Andreas Kling.
3312 (WTF::inlineCapacity>::Deque):
3315 2015-02-13 Anders Carlsson <andersca@apple.com>
3317 Add an initializer list constructor to Deque
3318 https://bugs.webkit.org/show_bug.cgi?id=141565
3320 Reviewed by Andreas Kling.
3323 (WTF::inlineCapacity>::Deque):
3325 2015-02-13 Anders Carlsson <andersca@apple.com>
3329 Rubber-stamped by Antti Koivisto.
3333 2015-02-11 Brent Fulgham <bfulgham@apple.com>
3335 [Win] [64-bit] Work around MSVC2013 Runtime Bug
3336 https://bugs.webkit.org/show_bug.cgi?id=141498
3337 <rdar://problem/19803642>
3339 Reviewed by Anders Carlsson.
3341 Disable FMA3 instruction use in the MSVC math library to
3342 work around a VS2013 runtime crash. We can remove this
3343 workaround when we switch to VS2015.
3345 * WTF.vcxproj/WTF.vcxproj: Add new files.
3346 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
3347 * wtf/win/WTFDLL.cpp: Added.
3349 2015-02-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3351 [EFL][GTK] Use bmalloc instead of tcmalloc
3352 https://bugs.webkit.org/show_bug.cgi?id=140162
3354 Reviewed by Carlos Garcia Campos.
3356 * wtf/CMakeLists.txt:
3357 * wtf/FastMalloc.cpp:
3358 Enable bmalloc on GTK ports, but EFL port will enable it when bmalloc supports
3361 2015-02-10 Darin Adler <darin@apple.com>
3363 Add the crash-on-failure behavior to bmalloc-based fastMalloc
3364 https://bugs.webkit.org/show_bug.cgi?id=141434
3366 Reviewed by Alexey Proskuryakov.
3368 * wtf/FastMalloc.cpp: Removed unneeded includes.
3369 (WTF::fastMalloc): Added null check and CRASH.
3370 (WTF::fastCalloc): Added overflow checking, null check, and CRASH.
3371 (WTF::fastRealloc): Added null check and CRASH.
3372 (WTF::fastMallocSize): Added FIXME comment.
3373 (WTF::fastMallocGoodSize): Added FIXME comment.
3374 (WTF::fastAlignedMalloc): Added null check and CRASH.
3375 (WTF::tryFastMalloc): Changed to call bmalloc directly instead of
3376 calling fastMalloc, since fastMalloc will now crash on failure.
3377 (WTF::tryFastRealloc): Changed to call bmalloc directly instead of
3378 calling fastRealloc, since fastRealloc will now crash on failure.
3379 (WTF::tryFastCalloc): Added overflow checking.
3380 (WTF::fastMallocStatistics): Added FIXME comment.
3382 2015-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
3384 [GTK] GMutexLocker build issue
3385 https://bugs.webkit.org/show_bug.cgi?id=141381
3387 Reviewed by Žan Doberšek.
3389 Remove using WTF::GMutexLocker from the header, since newer glib
3390 versions have a GMutexLocker in the public API.
3392 * wtf/gobject/GMutexLocker.h:
3394 2015-02-09 Alexey Proskuryakov <ap@apple.com>
3396 REGRESSION: tryFastCalloc is no longer "try"
3397 https://bugs.webkit.org/show_bug.cgi?id=141406
3399 Reviewed by Darin Adler.
3401 This causes crashes on some WebKit regression test bots.
3403 * wtf/FastMalloc.cpp: (WTF::tryFastCalloc): Fix what looks like a copy/paste mistake.
3405 2015-02-07 Csaba Osztrogonác <ossy@webkit.org>
3407 [ARM] GC sometimes stuck in an infinite loop if parallel GC is enabled
3408 https://bugs.webkit.org/show_bug.cgi?id=141290
3410 Reviewed by Anders Carlsson.
3414 2015-02-07 Chris Dumez <cdumez@apple.com>
3416 Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
3417 https://bugs.webkit.org/show_bug.cgi?id=141321
3419 Reviewed by Darin Adler.
3421 Add Vector::removeFirstMatching() / removeAllMatching() methods taking
3422 lambda functions to match the element(s) to remove. This simplifies the
3423 code a bit. Vector::removeAllMatching() is also more efficient than the
3424 manual removal alternative.
3428 2015-02-06 Commit Queue <commit-queue@webkit.org>
3430 Unreviewed, rolling out r179743.
3431 https://bugs.webkit.org/show_bug.cgi?id=141335
3433 caused missing symbols in non-WebKit clients of WTF::Vector
3434 (Requested by kling on #webkit).
3438 "Remove WTF::fastMallocGoodSize()."
3439 https://bugs.webkit.org/show_bug.cgi?id=141020
3440 http://trac.webkit.org/changeset/179743
3442 2015-02-06 Andreas Kling <akling@apple.com>
3444 Remove WTF::fastMallocGoodSize().
3445 <https://webkit.org/b/141020>
3447 Reviewed by Anders Carlsson.
3449 bmalloc's good-size API just returns exactly whatever you pass it,
3450 so it's of no utility to us anymore.
3452 This gets rid of a bunch of pointless out-of-line calls in Vector
3453 construction and growth.
3455 * wtf/Compression.cpp:
3456 (WTF::GenericCompressedData::create):
3457 * wtf/FastMalloc.cpp:
3458 (WTF::fastMallocGoodSize): Deleted.
3461 (WTF::VectorBufferBase::allocateBuffer):
3462 (WTF::VectorBufferBase::tryAllocateBuffer):
3463 (WTF::VectorBufferBase::reallocateBuffer):
3465 2015-02-05 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
3467 [Streams API] Implement a barebone ReadableStream interface
3468 https://bugs.webkit.org/show_bug.cgi?id=141045
3470 Reviewed by Benjamin Poulain.
3472 * wtf/FeatureDefines.h:
3474 2015-02-04 Alexey Proskuryakov <ap@apple.com>
3476 Optimized equal() functions in StringImpl.h are not ASan compatible
3477 https://bugs.webkit.org/show_bug.cgi?id=141258
3479 Reviewed by Daniel Bates.
3481 * wtf/text/StringImpl.h: (WTF::equal): Add custom implementations for ASan.
3483 2015-02-04 Chris Dumez <cdumez@apple.com>
3485 Add removeFirst(value) / removeAll(value) methods to WTF::Vector
3486 https://bugs.webkit.org/show_bug.cgi?id=141192
3488 Reviewed by Benjamin Poulain.
3490 Add removeFirst(value) / removeAll(value) convenience methods to
3491 WTF::Vector to reduce complexity a bit at call sites.
3493 I am planning to add overloads for these taking a lambda function for
3494 matching in a follow-up patch as well. I have seen quite a few
3495 Vector::remove(index) call sites that would benefit from it.
3498 (WTF::OverflowHandler>::removeFirst):
3499 (WTF::OverflowHandler>::removeAll):
3501 2015-02-02 Dhi Aurrahman <diorahman@rockybars.com>
3503 Optimize matchesLangPseudoClass() of :lang()
3504 https://bugs.webkit.org/show_bug.cgi?id=140873
3506 Reviewed by Darin Adler.
3508 Add some basic equality comparison operators.
3510 * wtf/text/StringView.h:
3514 (WTF::equalIgnoringASCIICase):
3516 2015-02-02 Geoffrey Garen <ggaren@apple.com>
3518 Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
3519 https://bugs.webkit.org/show_bug.cgi?id=140900
3521 Reviewed by Mark Hahnenberg.
3523 Re-landing just the HandleBlock piece of this patch.
3525 * wtf/FastMalloc.cpp:
3526 (WTF::fastAlignedMalloc):
3527 (WTF::fastAlignedFree):
3528 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
3531 2015-02-02 Daniel Bates <dabates@apple.com>
3533 [iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
3534 https://bugs.webkit.org/show_bug.cgi?id=141057
3535 <rdar://problem/19068790>
3537 Reviewed by Alexey Proskuryakov.
3540 * wtf/mac/MainThreadMac.mm:
3541 (WTF::callOnWebThreadOrDispatchAsyncOnMainThread): Added.
3543 2015-01-31 Sam Weinig <sam@webkit.org>
3545 Remove even more Mountain Lion support
3546 https://bugs.webkit.org/show_bug.cgi?id=141124
3548 Reviewed by Alexey Proskuryakov.
3550 * Configurations/Base.xcconfig:
3551 * Configurations/DebugRelease.xcconfig:
3552 * wtf/Assertions.cpp:
3553 * wtf/FeatureDefines.h:
3556 2015-01-31 Commit Queue <commit-queue@webkit.org>
3558 Unreviewed, rolling out r179426.
3559 https://bugs.webkit.org/show_bug.cgi?id=141119
3561 "caused a memory use regression" (Requested by Guest45 on
3566 "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
3568 https://bugs.webkit.org/show_bug.cgi?id=140900
3569 http://trac.webkit.org/changeset/179426
3571 2015-01-31 Commit Queue <commit-queue@webkit.org>
3573 Unreviewed, rolling out r179408.
3574 https://bugs.webkit.org/show_bug.cgi?id=141117
3576 This didn't fully fix the issue (Requested by anttik on
3581 "OSObjectPtr does not work with dispatch_data_t on Maverics"
3582 https://bugs.webkit.org/show_bug.cgi?id=141081
3583 http://trac.webkit.org/changeset/179408
3585 2015-01-30 Yusuke Suzuki <utatane.tea@gmail.com>
3587 Implement ES6 Symbol
3588 https://bugs.webkit.org/show_bug.cgi?id=140435
3590 Reviewed by Geoffrey Garen.
3592 Introduce new unique string mechanizm into StringImpl.
3593 It is used for implementing Symbol which holds a [[Description]] value.
3595 * wtf/text/AtomicString.h:
3596 (WTF::AtomicString::add):
3597 (WTF::AtomicString::addWithStringTableProvider):
3599 Previously, we checked `isAtomic()` or `!length()`. This guard can filter out EmptyUnique.
3600 But now, we introduced new unique StringImpl. Since it has an actual string value, we need to check `isUnique()`.
3602 * wtf/text/StringImpl.cpp:
3603 (WTF::StringImpl::~StringImpl):
3604 (WTF::StringImpl::createUnique):
3606 In createUnique, we leverage Substring mechanizm to produce a new unique
3607 string from an existing string.
3609 * wtf/text/StringImpl.h:
3610 (WTF::StringImpl::StringImpl):
3611 (WTF::StringImpl::createUniqueEmpty):
3612 (WTF::StringImpl::flagIsUnique):
3613 (WTF::StringImpl::isUnique):
3614 (WTF::StringImpl::setIsAtomic):
3615 (WTF::StringImpl::createEmptyUnique): Deleted.
3616 (WTF::StringImpl::isEmptyUnique): Deleted.
3618 Instead of EmptyUnique, we introduced new flag to StringImpl, `isUnique`.
3619 While EmptyUnique cannot hold any string values except for empty string,
3620 the unique StringImpl can hold any String values.
3621 We fold the Symbol's descriptiveString value here.
3623 * wtf/text/StringStatics.cpp:
3624 (WTF::StringImpl::hashAndFlagsForUnique):
3625 (WTF::StringImpl::hashAndFlagsForEmptyUnique): Deleted.
3627 2015-01-30 Geoffrey Garen <ggaren@apple.com>
3629 Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
3630 https://bugs.webkit.org/show_bug.cgi?id=140900
3632 Reviewed by Mark Hahnenberg.