1 2015-01-21 Csaba Osztrogonác <ossy@webkit.org>
3 Remove ENABLE(INSPECTOR) ifdef guards
4 https://bugs.webkit.org/show_bug.cgi?id=140668
6 Reviewed by Darin Adler.
8 * wtf/FeatureDefines.h:
10 2015-01-20 YunQiang Su <wzssyqa@gmail.com>
12 Fix failed to build for Linux/MIPS64EL
13 https://bugs.webkit.org/show_bug.cgi?id=124370
15 Reviewed by Darin Adler.
22 2015-01-19 Alexey Proskuryakov <ap@apple.com>
24 Make ASan do bounds checks for WTF::Vector
25 https://bugs.webkit.org/show_bug.cgi?id=140631
26 rdar://problem/19437718
28 Reviewed by Darin Adler.
30 * wtf/SizeLimits.cpp: Disable Vector object size checks for ASan enabled builds.
33 (WTF::VectorBuffer::endOfBuffer):
34 (WTF::Vector::Vector):
35 (WTF::Vector::~Vector):
37 (WTF::OverflowHandler>::Vector):
39 (WTF::OverflowHandler>::fill):
40 (WTF::OverflowHandler>::resize):
41 (WTF::OverflowHandler>::shrink):
42 (WTF::OverflowHandler>::grow):
43 (WTF::OverflowHandler>::asanSetInitialBufferSizeTo):
44 (WTF::OverflowHandler>::asanSetBufferSizeToFullCapacity):
45 (WTF::OverflowHandler>::asanBufferSizeWillChangeTo):
46 (WTF::OverflowHandler>::reserveCapacity):
47 (WTF::OverflowHandler>::tryReserveCapacity):
48 (WTF::OverflowHandler>::shrinkCapacity):
49 (WTF::OverflowHandler>::append):
50 (WTF::OverflowHandler>::tryAppend):
51 (WTF::OverflowHandler>::appendSlowCase):
52 (WTF::OverflowHandler>::uncheckedAppend):
53 (WTF::OverflowHandler>::insert):
54 (WTF::OverflowHandler>::remove):
55 (WTF::OverflowHandler>::releaseBuffer):
57 * wtf/Compiler.h: Changed ASAN_ENABLED macro fallback value from false to 0,
58 MSVC was not happy with false.
60 2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
62 Remove non-Windows cruft from WebKit/win/Plugins
63 https://bugs.webkit.org/show_bug.cgi?id=140675
65 Reviewed by Anders Carlsson.
67 * wtf/FeatureDefines.h:
69 2015-01-16 Myles C. Maxfield <mmaxfield@apple.com>
71 WeakPtr functions crash when created with default constructor
72 https://bugs.webkit.org/show_bug.cgi?id=140479
74 Reviewed by Andreas Kling.
76 This patch rearranges how WeakPtr works, and has the following ideas behind it:
78 1. WeakPtr should use Ref internally. This solves the crash by always having a
80 2. Clients should not be able to construct WeakReferences directly. Instead,
81 only WeakPtrFactory (and WeakPtr's default constructor) should be able to
82 construct them. They are considered an implementation detail of WeakPtr.
83 3. Except for the default constructor, clients should not be able to construct
84 WeakPtrs directly. Instead, the WeakPtrFactory must construct them. This
85 guarantees that the WeakPtrs all reference the same WeakReference.
86 4. Clients can construct a WeakPtr using its default constructor, and then
87 use the assignment operator to make it non-null. (Or they could use
88 WeakPtrFactory to make it non-null at creation-time.)
89 5. No one was using WeakReference::bindTo(), and it doesn't seem useful, so I
92 Tests: WTF_WeakPtr API tests
95 (WTF::Ref::Ref): Added extra ASSERT()s, and explicitly deleted copy
96 constructors with a comment.
97 (WTF::Ref::operator=): Added extra ASSERT()s, and explicitly deleted copy
98 assignment operators with a comment.
100 (WTF::WeakReference::clear): Used nullptr.
101 (WTF::WeakReference::create): Moved to private:
102 (WTF::WeakPtr::WeakPtr): For the default constructor, initialized the Ref with
103 a new WeakReference. For the other constructor, moved it to private:. Also added
104 copy constructors and copy assignment operators (since Ref doesn't have them but
105 RefPtr does). These constructors/operators are relied upon in various places
107 (WTF::WeakPtr::operator bool): Made non-explicit.
108 (WTF::WeakReference::createUnbound): Deleted.
109 (WTF::WeakReference::bindTo): Deleted.
110 (WTF::WeakReference::WeakReference): Deleted.
111 (WTF::WeakPtrFactory::WeakPtrFactory): Deleted.
113 2015-01-16 Yusuke Suzuki <utatane.tea@gmail.com>
115 std::all_of requires complete C++ iterators in GCC 4.8
116 https://bugs.webkit.org/show_bug.cgi?id=140530
118 Reviewed by Darin Adler.
120 In the WebKit2/UIProcess/WebProcessLifetimeObserver.cpp, std::all_of
121 is used for HashIterators. However, std::all_of requires the complete
122 C++ iterator interface including iterator_category typedef member and
123 it raises compile error in GCC 4.8 (and libstdc++) environment.
125 This patch inherits std::iterator with appropriate type parameters.
126 It automatically defines required typedefs including iterator_category.
128 * wtf/HashIterators.h:
130 2015-01-15 Csaba Osztrogonác <ossy@webkit.org>
132 Remove ENABLE(SQL_DATABASE) guards
133 https://bugs.webkit.org/show_bug.cgi?id=140434
135 Reviewed by Darin Adler.
137 * wtf/FeatureDefines.h:
139 2015-01-14 Csaba Osztrogonác <ossy@webkit.org>
141 Unreviewed fix after r163330.
143 * wtf/Platform.h: Use C style comment.
145 2015-01-14 Marc Juul <juul@sudomesh.org>
147 C++ style comment was preventing compile if CPU(ARM_NEON)
148 https://bugs.webkit.org/show_bug.cgi?id=133827
150 Reviewed by Csaba Osztrogonác.
154 2015-01-13 Chris Dumez <cdumez@apple.com>
156 Make WTF::Optional work with msvc 2013
157 https://bugs.webkit.org/show_bug.cgi?id=140401
159 Reviewed by Anders Carlsson.
161 Update the WTF::Optional implementation to use std::aligned_memory and
162 placement new instead of an unrestricted union because msvc 2013 still
163 doesn't support unrestricted unions.
165 This change is a pre-requirement to fix Bug 140347 as this change uses
166 WTF::Optional with types that have non-trivial copy constructors.
168 This change is covered by the existing Optional WTF test.
172 2015-01-11 Sam Weinig <sam@webkit.org>
174 Remove support for SharedWorkers
175 https://bugs.webkit.org/show_bug.cgi?id=140344
177 Reviewed by Anders Carlsson.
179 * wtf/FeatureDefines.h:
181 2015-01-12 Darin Adler <darin@apple.com>
183 Modernize and streamline HTMLTokenizer
184 https://bugs.webkit.org/show_bug.cgi?id=140166
186 Reviewed by Sam Weinig.
188 * wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
190 2015-01-09 Commit Queue <commit-queue@webkit.org>
192 Unreviewed, rolling out r178154, r178163, and r178164.
193 https://bugs.webkit.org/show_bug.cgi?id=140292
195 Still multiple assertion failures on tests (Requested by ap on
200 "Modernize and streamline HTMLTokenizer"
201 https://bugs.webkit.org/show_bug.cgi?id=140166
202 http://trac.webkit.org/changeset/178154
204 "Unreviewed speculative buildfix after r178154."
205 http://trac.webkit.org/changeset/178163
207 "One more unreviewed speculative buildfix after r178154."
208 http://trac.webkit.org/changeset/178164
210 2015-01-08 Darin Adler <darin@apple.com>
212 Modernize and streamline HTMLTokenizer
213 https://bugs.webkit.org/show_bug.cgi?id=140166
215 Reviewed by Sam Weinig.
217 * wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
219 2015-01-08 Benjamin Poulain <benjamin@webkit.org>
221 [WK2] Start a prototype for declarative site specific extensions
222 https://bugs.webkit.org/show_bug.cgi?id=140160
224 Reviewed by Andreas Kling.
226 * wtf/FeatureDefines.h:
228 2015-01-07 Daniel Bates <dabates@apple.com>
230 [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
231 https://bugs.webkit.org/show_bug.cgi?id=137371
233 As pointed out by Tim Horton, use C-style comment instead of C++-style comment as
234 wtf/Compiler.h is included in the sandbox profile and the sandbox profile compiler
235 doesn't understand C++-style comments.
239 2015-01-07 Daniel Bates <dabates@apple.com>
241 [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
242 https://bugs.webkit.org/show_bug.cgi?id=137371
244 Reviewed by David Kilzer.
246 Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
247 rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
248 can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
250 I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
251 remove EXTERN_C in a subsequent commit(s).
255 2015-01-07 Commit Queue <commit-queue@webkit.org>
257 Unreviewed, rolling out r178068.
258 https://bugs.webkit.org/show_bug.cgi?id=140235
260 Breaks the iOS build (Requested by enrica on #webkit).
264 "[iOS] Make WebKit2 build with public iOS SDK and more build
266 https://bugs.webkit.org/show_bug.cgi?id=137371
267 http://trac.webkit.org/changeset/178068
269 2015-01-07 Daniel Bates <dabates@apple.com>
271 [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
272 https://bugs.webkit.org/show_bug.cgi?id=137371
274 Reviewed by David Kilzer.
276 Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
277 rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
278 can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
280 I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
281 remove EXTERN_C in a subsequent commit(s).
285 2015-01-07 Brian J. Burg <burg@cs.washington.edu>
287 Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
288 https://bugs.webkit.org/show_bug.cgi?id=140053
290 Reviewed by Andreas Kling.
293 (WTF::Stopwatch::create): Return a Ref.
295 2015-01-07 Commit Queue <commit-queue@webkit.org>
297 Unreviewed, rolling out r178039.
298 https://bugs.webkit.org/show_bug.cgi?id=140187
300 Breaks ObjC Inspector Protocol (Requested by JoePeck on
305 "Web Inspector: purge PassRefPtr from Inspector code and use
306 Ref for typed and untyped protocol objects"
307 https://bugs.webkit.org/show_bug.cgi?id=140053
308 http://trac.webkit.org/changeset/178039
310 2015-01-06 Brian J. Burg <burg@cs.washington.edu>
312 Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
313 https://bugs.webkit.org/show_bug.cgi?id=140053
315 Reviewed by Andreas Kling.
318 (WTF::Stopwatch::create): Return a Ref.
320 2015-01-06 Alexey Proskuryakov <ap@apple.com>
322 ADDRESS_SANITIZER macro is overloaded
323 https://bugs.webkit.org/show_bug.cgi?id=140130
325 Reviewed by Anders Carlsson.
327 * wtf/Compiler.h: Added an ASAN_ENABLED macro. The abbreviation should become well
328 known - we already use it in tools.
332 * wtf/SizeLimits.cpp:
333 Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
334 in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.
336 2015-01-05 Andreas Kling <akling@apple.com>
338 Purge PassRefPtr from Page.
339 <https://webkit.org/b/140089>
341 Reviewed by Anders Carlsson.
343 Make SchedulePair::create() return Ref since it never fails.
345 * wtf/SchedulePair.h:
346 (WTF::SchedulePair::create):
348 2015-01-01 Darin Adler <darin@apple.com>
350 Rework code that hides characters in password fields to streamline a little
351 https://bugs.webkit.org/show_bug.cgi?id=140035
353 Reviewed by Sam Weinig.
355 * wtf/text/StringImpl.cpp:
356 (WTF::StringImpl::fill): Deleted.
357 * wtf/text/StringImpl.h: Deleted StringImpl::fill.
358 * wtf/text/WTFString.h:
359 (WTF::String::fill): Deleted.
361 2014-12-26 Dan Bernstein <mitz@apple.com>
365 Removed use of __builtin_s{add,sub}_overflow introduced in r177729 that was causing a compiler used at Apple to crash because of <rdar://problem/19347133>.
367 * wtf/SaturatedArithmetic.h:
368 (signedAddOverflows):
369 (signedSubtractOverflows):
371 2014-12-26 Dan Bernstein <mitz@apple.com>
373 <rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
374 https://bugs.webkit.org/show_bug.cgi?id=139950
376 Reviewed by David Kilzer.
378 * Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
379 in a manner that works with Xcode 5.1.1.
381 2014-12-25 Dan Bernstein <mitz@apple.com>
383 Try to fix the Windows build after r177733.
387 2014-12-25 Alexey Proskuryakov <ap@apple.com>
389 Simplify saturated integer add/sub
390 https://bugs.webkit.org/show_bug.cgi?id=139854
392 Address Darin's post-commit feedback to fix API tests.
394 * wtf/SaturatedArithmetic.h: (saturatedSubtraction):
396 2014-12-24 Benjamin Poulain <benjamin@webkit.org>
398 Simplify saturated integer add/sub
399 https://bugs.webkit.org/show_bug.cgi?id=139854
401 Reviewed by Darin Adler.
404 Make a wrapper for __has_builtin for compilers that do not support it.
406 * wtf/SaturatedArithmetic.h:
408 (saturatedSubtraction):
409 Use the builtins when possible instead of reinventing the wheel.
410 On ARMv7, use the saturated math instructions.
412 2014-12-23 Anders Carlsson <andersca@apple.com>
414 Move dynamic_objc_cast to RetainPtr.h
415 https://bugs.webkit.org/show_bug.cgi?id=139915
417 Reviewed by Sam Weinig.
420 (WTF::dynamic_objc_cast):
422 2014-12-23 Anders Carlsson <andersca@apple.com>
424 Re-indent RefPtr.h and RetainPtr.h.
426 Rubber-stamped by Sam Weinig.
431 2014-12-20 Eric Carlson <eric.carlson@apple.com>
433 [iOS] add optimized fullscreen API
434 https://bugs.webkit.org/show_bug.cgi?id=139833
435 <rdar://problem/18844486>
437 Reviewed by Simon Fraser.
439 * wtf/Platform.h: Define ENABLE_VIDEO_PRESENTATION_MODE.
441 2014-12-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
443 Fix build break on EFL and GTK since r177523
444 https://bugs.webkit.org/show_bug.cgi?id=139805
446 Reviewed by Csaba Osztrogonác.
448 * wtf/Ref.h: Include <wtf/StdLibExtras.h> to use std::exchange().
450 2014-12-18 Gavin Barraclough <barraclough@apple.com>
452 Add strong typing to RefCounter interface, return value as a bool.
453 https://bugs.webkit.org/show_bug.cgi?id=139776
455 Unreviewed style fixes.
460 2014-12-18 Brent Fulgham <bfulgham@apple.com>
462 [Win] Build correction after r177541.
465 (WTF::RefCounter::Token<T>::Token): Revise constructor inlines to correct
468 2014-12-18 Gavin Barraclough <barraclough@apple.com>
470 Add strong typing to RefCounter interface, return value as a bool.
471 https://bugs.webkit.org/show_bug.cgi?id=139776
473 Reviewed by Geoff Garen.
475 Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
476 This means there is no compile time type checking to prevent mistakes. Update the count()
477 method to token<>(), templated on type used to identify the token being returned.
478 Calls to token<T>() will return a result of type RefCounter::Token<T>.
480 There are a few problems with the fact the counter will return you an exact count of the
481 number of outstanding tokens:
482 - It is desirable to only fire the callback on zero-edge changes; it is more consistent
483 to do so if the value is only readable as a boolean.
484 - It is desirable to provide the value as an argument to the callback, however to make
485 this useful for integer values it is also necessary to indicate the direction of change
486 (0->1 is often interesting where 2->1 is not).
487 - There is a mismatch between the precision of returning a count, and the inherent
488 imprecision of a token based mechanism, where it may be difficult to guarantee
489 absolutely no unnecessary refcount churn, and thus unintentional counter values.
491 * wtf/RefCounter.cpp:
492 (WTF::RefCounter::Count::ref):
493 (WTF::RefCounter::Count::deref):
494 - only call the callback on zero-edge changes; provide the value.
495 (WTF::RefCounter::RefCounter):
496 - callback now takes a bool argument.
498 (WTF::RefCounter::Token::Token):
499 - New opaque type to reference the RefCounter::Count.
500 (WTF::RefCounter::Token::operator!):
501 - ! operator checks for null / anasigned Tokens.
502 (WTF::RefCounter::RefCounter):
503 - callback now takes a bool argument.
504 (WTF::RefCounter::token):
505 - renamed from count(), templated on type of token returned.
506 (WTF::RefCounter::value):
507 - now returns a bool.
508 (WTF::RefCounter::Token<T>::Token):
510 - Tokens can be copied & assigned.
511 (WTF::RefCounter::count): Deleted.
512 - renamed to token<>().
514 2014-12-18 Anders Carlsson <andersca@apple.com>
516 Simplify smart pointer classes by using std::exchange
517 https://bugs.webkit.org/show_bug.cgi?id=139790
519 Reviewed by Andreas Kling.
524 (WTF::OwnPtr<T>::clear):
525 (WTF::OwnPtr<T>::release):
526 (WTF::OwnPtr<T>::leakPtr):
529 (WTF::PassOwnPtr<T>::leakPtr):
531 (WTF::PassRefPtr<T>::leakRef):
534 (WTF::RefPtr<T>::clear):
535 (WTF::RefPtr<T>::leakRef):
537 (WTF::RetainPtr<T>::leakRef):
539 2014-12-18 Anders Carlsson <andersca@apple.com>
541 Clean up MachSendRight and add a copySendRight member function
542 https://bugs.webkit.org/show_bug.cgi?id=139788
544 Reviewed by Tim Horton.
546 * wtf/StdLibExtras.h:
548 Add an implementation of std::exchange.
550 2014-12-17 Chris Dumez <cdumez@apple.com>
552 [iOS] Make it possible to toggle FeatureCounter support at runtime
553 https://bugs.webkit.org/show_bug.cgi?id=139688
554 <rdar://problem/19266254>
556 Reviewed by Andreas Kling.
558 Remove FeatureCounter API from WTF and move it to WebCore/platform
559 instead so that it can log conditionally based on a WebCore setting.
561 * WTF.vcxproj/WTF.vcxproj:
562 * WTF.xcodeproj/project.pbxproj:
563 * wtf/CMakeLists.txt:
565 2014-12-17 Brent Fulgham <bfulgham@apple.com>
567 [Win] Correct DebugSuffix builds under MSBuild
568 https://bugs.webkit.org/show_bug.cgi?id=139733
569 <rdar://problem/19276880>
571 Reviewed by Simon Fraser.
573 * WTF.vcxproj/WTF.proj: Make sure to use the '_debug' suffix
574 when building the DebugSuffix target.
576 2014-12-17 Anders Carlsson <andersca@apple.com>
578 Make Ref::copyRef const and ref-qualified
579 https://bugs.webkit.org/show_bug.cgi?id=139730
581 Reviewed by Andreas Kling.
585 2014-12-16 Daniel Bates <dabates@apple.com>
587 [iOS] WTF fails to build with public SDK due to missing header CPAggregateDictionary.h
588 https://bugs.webkit.org/show_bug.cgi?id=139695
590 Reviewed by Chris Dumez.
592 Add USE(APPLE_INTERNAL_SDK)-guard around iOS-specific feature counter implementation
593 as we are only interested in counting features in builds of iOS WebKit that were built
594 with the Apple Internal SDK.
596 * wtf/FeatureCounter.cpp:
597 * wtf/ios/FeatureCounter.mm:
599 2014-12-16 Geoffrey Garen <ggaren@apple.com>
601 Enable FastMalloc in debug builds
602 https://bugs.webkit.org/show_bug.cgi?id=139692
604 Reviewed by Alexey Proskuryakov.
606 This will give debug builds greater fidelity to the real thing.
608 FastMalloc now transparently supports all the malloc debugging APIs I
609 know of by disabling itself at runtime -- and it should be easy to add
610 support for any APIs I missed -- so there's no need to turn it off in
613 * wtf/FastMalloc.cpp:
615 2014-12-16 Anders Carlsson <andersca@apple.com>
617 RefPtr::copyRef should be const
618 https://bugs.webkit.org/show_bug.cgi?id=139689
620 Reviewed by Andreas Kling.
622 copyRef() doesn't modify the original object so it should be const.
623 Also, add a && qualified overload and mark it deleted so that calls to copyRef() where
624 the object is an rvalue will fail to compile.
628 2014-12-15 Chris Dumez <cdumez@apple.com>
630 [iOS] Add feature counting support
631 https://bugs.webkit.org/show_bug.cgi?id=139652
632 <rdar://problem/19255690>
634 Reviewed by Gavin Barraclough.
636 Add a FeatureCounter API for to log / count when a feature
637 is used. For now, this is only implementated on iOS.
639 * WTF.vcxproj/WTF.vcxproj:
640 * WTF.xcodeproj/project.pbxproj:
641 * wtf/CMakeLists.txt:
642 * wtf/FeatureCounter.cpp: Added.
643 (WTF::incrementFeatureCounterKey):
644 (WTF::setFeatureCounterKey):
645 * wtf/FeatureCounter.h: Added.
646 * wtf/ios/FeatureCounter.mm: Added.
647 (WTF::incrementFeatureCounterKey):
648 (WTF::setFeatureCounterKey):
650 2014-12-12 Anders Carlsson <andersca@apple.com>
652 Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
653 https://bugs.webkit.org/show_bug.cgi?id=139613
655 Reviewed by Sam Weinig.
660 2014-12-15 Commit Queue <commit-queue@webkit.org>
662 Unreviewed, rolling out r177284.
663 https://bugs.webkit.org/show_bug.cgi?id=139658
665 "Breaks API tests and LayoutTests on Yosemite Debug"
666 (Requested by msaboff on #webkit).
670 "Make sure range based iteration of Vector<> still receives
672 https://bugs.webkit.org/show_bug.cgi?id=138821
673 http://trac.webkit.org/changeset/177284
675 2014-12-15 Andreas Kling <akling@apple.com>
677 Purge PassRefPtr from FocusEvent code.
678 <https://webkit.org/b/139647>
680 Reviewed by Anders Carlsson.
682 Add a RefPtr::copyRef() to use when passing a RefPtr to a RefPtr&& without
683 transferring the ownership.
687 2014-12-15 Oliver Hunt <oliver@apple.com>
689 Make sure range based iteration of Vector<> still receives bounds checking
690 https://bugs.webkit.org/show_bug.cgi?id=138821
692 Reviewed by Mark Lam.
694 Add a new IndexedIterator struct to WTF that wraps a
695 Vector type and index to provide pointer like semantics
696 while still performing runtime bounds checking, even in
697 release builds. We store a simple index into the vector
698 which means that this iterator allows vector resizing
699 during iteration. If the vector is resized such that the
700 iterator is out of bounds, then any attempt to dereference
701 the iterator will crash safely.
703 For the purpose of retaining semantically equivalent
704 behaviour, the iterator can be moved to m_index == size()
705 as that is the standard "end" terminator for these types.
706 Attempting to dereference at that point will still crash
707 rather than perform an unsafe memory operation.
709 By necessity there are many overrides for operator + and - as
710 we otherwise hit many different type promotion ambiguities when
711 performing arithmetic with iterators. These ambiguities are also
712 different for 32- vs. 64-bit, so duplicating the functions
713 and then forwarding to the core implementations that performed
714 the bounds checking and mutation seemed like the right call.
716 * WTF.vcxproj/WTF.vcxproj:
717 * WTF.vcxproj/WTF.vcxproj.filters:
718 * WTF.xcodeproj/project.pbxproj:
719 * wtf/IndexedIterator.h: Added.
720 (WTF::IndexedIterator::IndexedIterator):
721 (WTF::IndexedIterator::operator->):
722 (WTF::IndexedIterator::operator*):
723 (WTF::IndexedIterator::get):
724 (WTF::IndexedIterator::operator++):
725 (WTF::IndexedIterator::operator--):
726 (WTF::IndexedIterator::operator UnspecifiedBoolType):
727 (WTF::IndexedIterator::operator-):
728 (WTF::IndexedIterator::operator=):
729 (WTF::IndexedIterator::operator==):
730 (WTF::IndexedIterator::operator!=):
731 (WTF::IndexedIterator::operator<):
732 (WTF::IndexedIterator::operator<=):
733 (WTF::IndexedIterator::operator>):
734 (WTF::IndexedIterator::operator>=):
735 (WTF::IndexedIterator::operator const_iterator):
736 (WTF::IndexedIterator::unsafeGet):
745 (WTF::IndexedIteratorSelector::makeIterator):
746 (WTF::IndexedIteratorSelector::makeConstIterator):
747 * wtf/RefCountedArray.h:
748 (WTF::RefCountedArray::RefCountedArray):
750 (WTF::Vector::Vector):
751 (WTF::Vector::begin):
753 (WTF::OverflowHandler>::Vector):
755 (WTF::OverflowHandler>::fill):
756 (WTF::OverflowHandler>::expandCapacity):
757 (WTF::OverflowHandler>::tryExpandCapacity):
758 (WTF::OverflowHandler>::resize):
759 (WTF::OverflowHandler>::shrink):
760 (WTF::OverflowHandler>::grow):
761 (WTF::OverflowHandler>::reserveCapacity):
762 (WTF::OverflowHandler>::tryReserveCapacity):
763 (WTF::OverflowHandler>::shrinkCapacity):
764 (WTF::OverflowHandler>::append):
765 (WTF::OverflowHandler>::tryAppend):
766 (WTF::OverflowHandler>::appendSlowCase):
767 (WTF::OverflowHandler>::uncheckedAppend):
768 (WTF::OverflowHandler>::appendVector):
769 (WTF::OverflowHandler>::insert):
770 (WTF::OverflowHandler>::insertVector):
771 (WTF::OverflowHandler>::remove):
773 2014-12-14 Andreas Kling <akling@apple.com>
775 Minor follow-up tweaks suggested by Darin on bug 139587.
777 * wtf/text/WTFString.h:
778 (WTF::String::String):
780 2014-12-14 Andreas Kling <akling@apple.com>
782 Replace PassRef with Ref/Ref&& across the board.
783 <https://webkit.org/b/139587>
785 Reviewed by Darin Adler.
787 Kill the PassRef class and replace it by Ref/Ref&&.
790 - For locals and members, keep using Ref<T>.
791 - For return types, use Ref<T>.
792 - For (ownership-transferring) arguments, use Ref<T>&&.
794 When passing to a Ref&&, use WTF::move() to mobilize the value
795 at the call site, e.g:
797 void myFunction(Ref<Foo>&&);
799 Ref<Foo> myFoo(Foo::create());
800 myFunction(WTF::move(myFoo));
801 // 'myFoo' is invalid from this point forward.
803 As you can see, it works a lot like PassRefPtr, but unlike PassRefPtr
804 it won't surprise you by becoming null *unless* you WTF::move it.
806 I've also added a Ref::copyRef() for instances where you want to
807 return a Ref *without* transferring ownership, e.g code like:
809 Ref<Foo> foo() { return m_foo; }
813 Ref<Foo> foo() { return m_foo.copyRef(); }
815 This makes it explicit that a refcount bump will occur.
817 Finally, do note that unlike last year's PassRef, Ref&& does not
818 require you to move it to avoid leaking; it will clean itself up.
821 (WTF::adopted): Deleted.
822 (WTF::PassRef<T>::PassRef): Deleted.
823 (WTF::PassRef<T>::~PassRef): Deleted.
824 (WTF::PassRef<T>::get): Deleted.
825 (WTF::PassRef<T>::ptr): Deleted.
826 (WTF::PassRef<T>::leakRef): Deleted.
827 (WTF::adoptRef): Deleted.
828 (WTF::createRefCounted): Deleted.
830 (WTF::PassRefPtr::PassRefPtr):
835 (WTF::Ref::operator=):
836 (WTF::Ref::operator->):
839 (WTF::Ref::operator T&):
840 (WTF::Ref::operator const T&):
841 (WTF::Ref<T>::replace):
844 (WTF::RefCounter::count):
846 (WTF::RefPtr::releaseNonNull):
847 (WTF::RefPtr<T>::RefPtr):
849 * wtf/text/AtomicString.cpp:
850 (WTF::addToStringTable):
851 (WTF::AtomicString::add):
852 (WTF::AtomicString::addFromLiteralData):
853 (WTF::AtomicString::addSlowCase):
854 * wtf/text/AtomicString.h:
855 * wtf/text/StringImpl.cpp:
856 (WTF::StringImpl::createFromLiteral):
857 (WTF::StringImpl::createWithoutCopying):
858 (WTF::StringImpl::createUninitializedInternal):
859 (WTF::StringImpl::createUninitializedInternalNonEmpty):
860 (WTF::StringImpl::createUninitialized):
861 (WTF::StringImpl::reallocateInternal):
862 (WTF::StringImpl::reallocate):
863 (WTF::StringImpl::createInternal):
864 (WTF::StringImpl::create):
865 (WTF::StringImpl::create8BitIfPossible):
866 (WTF::StringImpl::substring):
867 (WTF::StringImpl::lower):
868 (WTF::StringImpl::upper):
869 (WTF::StringImpl::fill):
870 (WTF::StringImpl::foldCase):
871 (WTF::StringImpl::convertToASCIILowercase):
872 (WTF::StringImpl::stripMatchedCharacters):
873 (WTF::StringImpl::stripWhiteSpace):
874 (WTF::StringImpl::removeCharacters):
875 (WTF::StringImpl::simplifyMatchedCharactersToSpace):
876 (WTF::StringImpl::simplifyWhiteSpace):
877 (WTF::StringImpl::replace):
878 (WTF::StringImpl::adopt):
879 * wtf/text/StringImpl.h:
880 (WTF::StringImpl::create8BitIfPossible):
881 (WTF::StringImpl::create):
882 (WTF::StringImpl::createSubstringSharingImpl8):
883 (WTF::StringImpl::createSubstringSharingImpl):
884 (WTF::StringImpl::createFromLiteral):
885 (WTF::StringImpl::createEmptyUnique):
886 (WTF::StringImpl::adopt):
887 (WTF::StringImpl::replace):
888 (WTF::StringImpl::constructInternal<LChar>):
889 (WTF::StringImpl::constructInternal<UChar>):
890 (WTF::StringImpl::isolatedCopy):
891 * wtf/text/WTFString.h:
892 (WTF::String::String):
894 2014-12-10 Geoffrey Garen <ggaren@apple.com>
896 Please disable the webkitFirstVersionWithInitConstructorSupport check on Apple TV
897 https://bugs.webkit.org/show_bug.cgi?id=139501
899 Reviewed by Gavin Barraclough.
901 Added a platform definition for APPLETV.
903 (It's not an OS because it's not mutually exclusive with other OS definitions.)
907 2014-12-10 Martin Robinson <mrobinson@igalia.com>
909 [GTK] Add support for text-decoration-skip
910 https://bugs.webkit.org/show_bug.cgi?id=131540
912 Reviewed by Gustavo Noronha Silva.
914 * wtf/Platform.h: Enable text decoration skip by default.
916 2014-12-09 David Kilzer <ddkilzer@apple.com>
918 Switch from using PLATFORM_NAME to SDK selectors in ANGLE, bmalloc, gtest, JavaScriptCore, WTF
919 <http://webkit.org/b/139212>
921 Reviewed by Joseph Pecoraro.
923 * Configurations/Base.xcconfig:
924 - Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
926 * Configurations/DebugRelease.xcconfig:
927 - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
929 2014-12-09 Dean Jackson <dino@apple.com>
931 [Apple] Use Accelerate framework to speed-up FEGaussianBlur
932 https://bugs.webkit.org/show_bug.cgi?id=139310
934 Unreviewed followup, after comments by Andreas Kling.
936 It was pointed out that we already have a USE(ACCELERATE), so
937 we don't need a HAVE(ACCELERATE) :)
941 2014-12-09 Alberto Garcia <berto@igalia.com>
943 Undefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit GTK Mac OS X on Snow Leopard
944 https://bugs.webkit.org/show_bug.cgi?id=58737
946 Reviewed by Darin Adler.
948 Replace OS(MAC_OS_X) with PLATFORM(MAC) to prevent using
949 osx-specific code in WebKitGTK+ builds.
951 * wtf/ThreadingPthreads.cpp:
952 (WTF::initializeCurrentThreadInternal):
954 2014-12-08 Dean Jackson <dino@apple.com>
956 [Apple] Use Accelerate framework to speed-up FEGaussianBlur
957 https://bugs.webkit.org/show_bug.cgi?id=139310
958 <rdar://problem/18434594>
960 Reviewed by Simon Fraser.
962 Add a HAVE_ACCELERATE flag, true on Apple platforms.
966 2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
968 Fix iOS build after r176971.
970 I had previously modified the WTF forwarding header instead of modifying the real source.
972 * wtf/unicode/CharacterNames.h:
974 2014-12-08 Anders Carlsson <andersca@apple.com>
976 Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
977 https://bugs.webkit.org/show_bug.cgi?id=139410
979 Reviewed by Andreas Kling.
981 * wtf/CurrentTime.cpp:
982 (WTF::currentCPUTime):
983 (WTF::currentCPUTimeMS): Deleted.
986 2014-12-08 Chris Dumez <cdumez@apple.com>
988 Revert r176293 & r176275
990 Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
991 instead of size_t. There is some disagreement regarding the long-term direction
992 of the API and we shouldn’t leave the API partly transitioned to unsigned type
993 while making a decision.
997 (WTF::VectorTypeOperations::compare):
998 (WTF::VectorBufferBase::allocateBuffer):
999 (WTF::VectorBufferBase::tryAllocateBuffer):
1000 (WTF::VectorBufferBase::shouldReallocateBuffer):
1001 (WTF::VectorBufferBase::reallocateBuffer):
1002 (WTF::VectorBufferBase::capacity):
1003 (WTF::VectorBufferBase::VectorBufferBase):
1004 (WTF::VectorBuffer::VectorBuffer):
1005 (WTF::VectorBuffer::allocateBuffer):
1006 (WTF::VectorBuffer::tryAllocateBuffer):
1007 (WTF::VectorBuffer::shouldReallocateBuffer):
1008 (WTF::VectorBuffer::reallocateBuffer):
1009 (WTF::VectorBuffer::swap):
1010 (WTF::VectorBuffer::swapInlineBuffer):
1011 (WTF::VectorBuffer::swapInlineBuffers):
1012 (WTF::Vector::Vector):
1013 (WTF::Vector::capacity):
1015 (WTF::Vector::operator[]):
1016 (WTF::OverflowHandler>::find):
1017 (WTF::OverflowHandler>::reverseFind):
1018 (WTF::OverflowHandler>::fill):
1019 (WTF::OverflowHandler>::expandCapacity):
1020 (WTF::OverflowHandler>::tryExpandCapacity):
1021 (WTF::OverflowHandler>::resize):
1022 (WTF::OverflowHandler>::resizeToFit):
1023 (WTF::OverflowHandler>::shrink):
1024 (WTF::OverflowHandler>::grow):
1025 (WTF::OverflowHandler>::reserveCapacity):
1026 (WTF::OverflowHandler>::tryReserveCapacity):
1027 (WTF::OverflowHandler>::reserveInitialCapacity):
1028 (WTF::OverflowHandler>::shrinkCapacity):
1029 (WTF::OverflowHandler>::append):
1030 (WTF::OverflowHandler>::tryAppend):
1031 (WTF::OverflowHandler>::insert):
1032 (WTF::OverflowHandler>::insertVector):
1033 (WTF::OverflowHandler>::remove):
1034 (WTF::OverflowHandler>::reverse):
1035 (WTF::OverflowHandler>::checkConsistency):
1036 * wtf/text/AtomicString.h:
1037 * wtf/text/StringImpl.h:
1038 (WTF::StringImpl::adopt):
1039 (WTF::equalIgnoringNullity):
1040 * wtf/text/StringView.h:
1042 * wtf/text/WTFString.h:
1044 2014-12-07 Andreas Kling <akling@apple.com>
1046 Use more PassRef in AtomicString.
1047 <https://webkit.org/b/139319>
1049 Reviewed by Antti Koivisto.
1051 Make a pass over AtomicString and convert functions that return PassRefPtr
1052 into returning RefPtr (where it may be null) and PassRef otherwise.
1053 This allows the compiler to skip null checks in many places.
1055 * wtf/text/AtomicString.cpp:
1056 (WTF::addToStringTable):
1057 (WTF::AtomicString::add):
1058 (WTF::AtomicString::addFromLiteralData):
1059 (WTF::AtomicString::addSlowCase):
1060 * wtf/text/AtomicString.h:
1061 (WTF::AtomicString::add):
1062 (WTF::AtomicString::addWithStringTableProvider):
1063 * wtf/text/cf/AtomicStringCF.cpp:
1064 (WTF::AtomicString::add):
1066 2014-12-05 Roger Fong <roger_fong@apple.com>
1068 [Win] proj files copying over too many resources..
1069 https://bugs.webkit.org/show_bug.cgi?id=139315.
1070 <rdar://problem/19148278>
1072 Reviewed by Brent Fulgham.
1074 * WTF.vcxproj/WTF.proj: Only copy WTF.dll.
1076 2014-12-05 Andreas Kling <akling@apple.com>
1078 PassRef should deref on destruction if pointee was not moved.
1079 <https://webkit.org/b/139309>
1081 Reviewed by Antti Koivisto.
1083 Let PassRef become nullptr internally after having WTF::move()'d the pointee.
1084 This means that PassRef is now essentially a PassRefPtr that can only be
1085 constructed with a non-null pointee.
1087 This should make it possible for all ::create()-style construction helpers to
1088 return PassRef, removing a branch in each case.
1091 (WTF::PassRef<T>::PassRef):
1092 (WTF::PassRef<T>::~PassRef):
1093 (WTF::PassRef<T>::get):
1094 (WTF::PassRef<T>::ptr):
1095 (WTF::PassRef<T>::leakRef):
1096 (WTF::PassRef<T>::dropRef): Deleted.
1098 2014-12-05 Jer Noble <jer.noble@apple.com>
1100 [WTF] MediaTime should support round-tripping from and to doubles.
1101 https://bugs.webkit.org/show_bug.cgi?id=139248
1103 Reviewed by Eric Carlson.
1105 MediaTimes should be able to return precisely the same double value as was used
1106 when the MediaTime was created, so long as that MediaTime was not modified in a
1107 non-destructive way. This will allow API which accepts floating-point values to
1108 return the exact same value when asked, but still be able to store that value
1111 * wtf/MediaTime.cpp:
1112 (WTF::MediaTime::createWithFloat): Added; store the floating-point value in a union.
1113 (WTF::MediaTime::createWithDouble): Ditto.
1114 (WTF::MediaTime::toFloat): If the value is a double, just return it.
1115 (WTF::MediaTime::toDouble): Ditto.
1116 (WTF::MediaTime::operator+): Special case when one or both sides are doubles.
1117 (WTF::MediaTime::operator-): Ditto.
1118 (WTF::MediaTime::operator*): Ditto.
1119 (WTF::MediaTime::compare): Ditto.
1121 (WTF::MediaTime::setTimeScale): Convert the MediaTime from a double.
1123 2014-12-05 peavo@outlook.com <peavo@outlook.com>
1125 [WinCairo] WTF project is missing a GStreamer source file.
1126 https://bugs.webkit.org/show_bug.cgi?id=139296
1128 Reviewed by Philippe Normand.
1130 The WTF project file is missing a GStreamer source file,
1131 causing a link error when compiling with GStreamer enabled.
1133 * WTF.vcxproj/WTF.vcxproj:
1134 * WTF.vcxproj/WTF.vcxproj.filters:
1136 2014-12-04 David Kilzer <ddkilzer@apple.com>
1138 REGRESSION (r176683): RefCounter.h is installed outside SDKROOT
1140 * WTF.xcodeproj/project.pbxproj: Don't mark RefCounter.h as a
1141 private header. WTF headers use a special build phase script to
1144 2014-12-04 Anders Carlsson <andersca@apple.com>
1146 Make API::String copy the underlying strings if needed, for thread safety
1147 https://bugs.webkit.org/show_bug.cgi?id=139261
1149 Reviewed by Sam Weinig.
1152 (WTF::RefPtr<T>::leakRef):
1153 Add a leakRef() to RefPtr so we don't have to go through PassRefPtr.
1155 * wtf/text/WTFString.cpp:
1156 (WTF::String::isSafeToSendToAnotherThread):
1157 Check if the string is empty before checking whether it's in an atomic string table.
1158 It's safe to send empty strings to other threads even if they're in the atomic string table
1159 since they will never be deallocated.
1161 2014-12-04 Csaba Osztrogonác <ossy@webkit.org>
1163 Fix cast-align warning in StringImpl.h
1164 https://bugs.webkit.org/show_bug.cgi?id=139222
1166 Reviewed by Anders Carlsson.
1168 * wtf/text/StringImpl.h:
1169 (WTF::StringImpl::tailPointer):
1171 2014-12-02 Mark Lam <mark.lam@apple.com>
1173 Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
1174 https://bugs.webkit.org/show_bug.cgi?id=138821
1178 * WTF.vcxproj/WTF.vcxproj:
1179 * WTF.vcxproj/WTF.vcxproj.filters:
1180 * WTF.xcodeproj/project.pbxproj:
1181 * wtf/IndexedIterator.h: Removed.
1182 * wtf/RefCountedArray.h:
1183 (WTF::RefCountedArray::RefCountedArray):
1185 (WTF::Vector::Vector):
1186 (WTF::Vector::begin):
1188 (WTF::OverflowHandler>::Vector):
1190 (WTF::OverflowHandler>::fill):
1191 (WTF::OverflowHandler>::expandCapacity):
1192 (WTF::OverflowHandler>::tryExpandCapacity):
1193 (WTF::OverflowHandler>::resize):
1194 (WTF::OverflowHandler>::shrink):
1195 (WTF::OverflowHandler>::grow):
1196 (WTF::OverflowHandler>::reserveCapacity):
1197 (WTF::OverflowHandler>::tryReserveCapacity):
1198 (WTF::OverflowHandler>::shrinkCapacity):
1199 (WTF::OverflowHandler>::append):
1200 (WTF::OverflowHandler>::tryAppend):
1201 (WTF::OverflowHandler>::appendSlowCase):
1202 (WTF::OverflowHandler>::uncheckedAppend):
1203 (WTF::OverflowHandler>::appendVector):
1204 (WTF::OverflowHandler>::insert):
1205 (WTF::OverflowHandler>::insertVector):
1206 (WTF::OverflowHandler>::remove):
1208 2014-12-02 Oliver Hunt <oliver@apple.com>
1212 * wtf/IndexedIterator.h:
1214 2014-12-02 Gavin Barraclough <barraclough@apple.com>
1216 Generalize PageActivityAssertionToken
1217 https://bugs.webkit.org/show_bug.cgi?id=139106
1219 Reviewed by Sam Weinig.
1221 PageActivityAssertionToken is a RAII mechanism implementing a counter, used by PageThrottler
1222 to count user visible activity in progress on the page (currently page load and media playback).
1223 Use of an RAII type is prevents a number of possible errors, including double counting a single
1224 media element, or failing to decrement the count after a media element has been deallocated.
1226 The current implementation has a number of drawbacks that have been addressed by this refactoring:
1227 - specific to single use in PageThrottler class - not reusable.
1228 - incomplete encapsulation - the counter and WeakPtrFactory that comprise the current implementation
1229 are not encapsulated (are in the client type, PageThrottler).
1230 - tokens are not shared - PageActivityAssertionToken instances are managed by std::unique, every
1231 increment requires an object allocation.
1232 - redundancy - the current implementation uses a WeakPtr to safely reference the PageThrottler, this
1233 is internally implemented using a reference counted type, resulting in two counters being
1234 incremented (one in the PageActivityAssertionToken, one in the PageThrottler).
1236 In the reimplementation:
1237 - a callback is provided via a lambda function, which allows for easy reuse without a lot of
1239 - the counter, callback and ownership of the otherwise weakly-owned token is encapsulated within the
1241 - a single count within RefCounter::Count stores the counter value, and also manage the lifetime
1243 - standard RefPtrs are used to manage references to the RefCounter::Count.
1245 * WTF.xcodeproj/project.pbxproj:
1246 - added RefCounter.cpp/.h
1247 * wtf/RefCounter.cpp: Added.
1248 (WTF::RefCounter::Count::ref):
1249 - increment the counter.
1250 (WTF::RefCounter::Count::deref):
1251 - decrement the counter, and delete as necessary.
1252 (WTF::RefCounter::RefCounter):
1253 - create a RefCounter::Count.
1254 (WTF::RefCounter::~RefCounter):
1255 - eagerly delete the Counter if it has no references, otherwise let it be deleted on last deref.
1256 * wtf/RefCounter.h: Added.
1257 (WTF::RefCounter::Count::Count):
1258 - initialize count to 0.
1259 (WTF::RefCounter::RefCounter):
1260 - takes a lambda to be called when the value changes.
1261 (WTF::RefCounter::count):
1262 - reference the counter (and in doing so increment the count).
1263 (WTF::RefCounter::value):
1264 - access the current value of the counter.
1266 2014-12-01 Andreas Kling <akling@apple.com>
1268 Optimize constructing JSC::Identifier from AtomicString.
1269 <https://webkit.org/b/139157>
1271 Reviewed by Michael Saboff.
1273 Make AtomicString::isInAtomicStringTable() public so it can be used
1274 in some Identifier assertions.
1276 * wtf/text/AtomicString.h:
1278 2014-12-01 Oliver Hunt <oliver@apple.com>
1282 * wtf/IndexedIterator.h:
1284 2014-12-01 Oliver Hunt <oliver@apple.com>
1288 * wtf/IndexedIterator.h:
1290 2014-11-17 Oliver Hunt <oliver@apple.com>
1292 Make sure range based iteration of Vector<> still receives bounds checking
1293 https://bugs.webkit.org/show_bug.cgi?id=138821
1295 Reviewed by Mark Lam.
1297 Add a new IndexedIterator struct to WTF that wraps a
1298 Vector type and index to provide pointer like semantics
1299 while still performing runtime bounds checking, even in
1300 release builds. We store a simple index into the vector
1301 which means that this iterator allows vector resizing
1302 during iteration. If the vector is resized such that the
1303 iterator is out of bounds, then any attempt to dereference
1304 the iterator will crash safely. Any other errors, including
1305 overflows, and over extending the iterator will likewise
1308 For the purpose of retaining semantically equivalent
1309 behaviour, the iterator can be moved to m_index == size()
1310 as that is the standard "end" terminator for these types.
1311 Attempting to dereference at that point will still crash
1312 rather than perform an unsafe memory operation.
1314 In order to maintain the validity of all the bounds checking,
1315 we perform full integer range checking prior to any mutation
1316 of the iterator location. If we detect an arithmetic overflow
1317 we will crash rather than attempting to carry on.
1319 By necessity there are many overrides for operator + and - as
1320 we otherwise hit many different type promotion ambiguities when
1321 performing arithmetic with iterators. These ambiguities are also
1322 different for 32- vs. 64-bit, so duplicating the functions
1323 and then forwarding to the core implementations that performed
1324 the bounds checking and mutation seemed like the right call.
1326 * WTF.xcodeproj/project.pbxproj:
1327 * wtf/IndexedIterator.h: Added.
1328 (WTF::IndexedIterator::IndexedIterator):
1329 (WTF::IndexedIterator::operator->):
1330 (WTF::IndexedIterator::operator*):
1331 (WTF::IndexedIterator::get):
1332 (WTF::IndexedIterator::operator++):
1333 (WTF::IndexedIterator::operator--):
1334 (WTF::IndexedIterator::operator UnspecifiedBoolType):
1335 (WTF::IndexedIterator::operator+=):
1336 (WTF::IndexedIterator::operator-=):
1337 (WTF::IndexedIterator::operator+):
1338 (WTF::IndexedIterator::operator-):
1339 (WTF::IndexedIterator::operator=):
1340 (WTF::IndexedIterator::operator==):
1341 (WTF::IndexedIterator::operator!=):
1342 (WTF::IndexedIterator::operator<):
1343 (WTF::IndexedIterator::operator<=):
1344 (WTF::IndexedIterator::operator>):
1345 (WTF::IndexedIterator::operator>=):
1346 (WTF::IndexedIterator::operator const_iterator):
1347 (WTF::IndexedIterator::isSafeToCompare):
1348 (WTF::IndexedIterator::unsafeGet):
1357 (WTF::IndexedIteratorSelector::makeIterator):
1358 (WTF::IndexedIteratorSelector::makeConstIterator):
1359 * wtf/RefCountedArray.h:
1360 (WTF::RefCountedArray::RefCountedArray):
1362 (WTF::Vector::Vector):
1363 (WTF::Vector::begin):
1365 (WTF::OverflowHandler>::Vector):
1367 (WTF::OverflowHandler>::fill):
1368 (WTF::OverflowHandler>::expandCapacity):
1369 (WTF::OverflowHandler>::tryExpandCapacity):
1370 (WTF::OverflowHandler>::resize):
1371 (WTF::OverflowHandler>::shrink):
1372 (WTF::OverflowHandler>::grow):
1373 (WTF::OverflowHandler>::reserveCapacity):
1374 (WTF::OverflowHandler>::tryReserveCapacity):
1375 (WTF::OverflowHandler>::shrinkCapacity):
1376 (WTF::OverflowHandler>::append):
1377 (WTF::OverflowHandler>::tryAppend):
1378 (WTF::OverflowHandler>::appendSlowCase):
1379 (WTF::OverflowHandler>::uncheckedAppend):
1380 (WTF::OverflowHandler>::appendVector):
1381 (WTF::OverflowHandler>::insert):
1382 (WTF::OverflowHandler>::insertVector):
1383 (WTF::OverflowHandler>::remove):
1385 2014-11-30 Ryuan Choi <ryuan.choi@navercorp.com>
1387 [EFL] Drop support for the EFL 1.7
1388 https://bugs.webkit.org/show_bug.cgi?id=139114
1390 Reviewed by Gyuyoung Kim.
1392 * wtf/efl/EflTypedefs.h: Removed old definitions which EFL 1.7 used.
1394 2014-11-21 Anders Carlsson <andersca@apple.com>
1396 Remove the Timer parameters from timer callbacks
1397 https://bugs.webkit.org/show_bug.cgi?id=138974
1399 Reviewed by Antti Koivisto.
1401 * wtf/RunLoopTimer.h:
1402 (WTF::RunLoopTimer::RunLoopTimer):
1403 (WTF::RunLoopTimer::fired):
1405 2014-11-18 Chris Dumez <cdumez@apple.com>
1407 Have Vector::capacity() return an unsigned instead of a size_t
1408 https://bugs.webkit.org/show_bug.cgi?id=138842
1410 Reviewed by Andreas Kling.
1412 Have Vector::capacity() return an unsigned instead of a size_t as
1413 capacity is stored as an unsigned internally.
1416 (WTF::Vector::capacity):
1417 (WTF::OverflowHandler>::expandCapacity):
1418 (WTF::OverflowHandler>::tryExpandCapacity):
1420 2014-11-18 Geoffrey Garen <ggaren@apple.com>
1422 Removed the custom allocator for ListHashSet nodes
1423 https://bugs.webkit.org/show_bug.cgi?id=138841
1425 Reviewed by Andreas Kling.
1427 bmalloc is fast, so we don't need a custom allocator.
1429 The MallocBench test for linked list node allocation (list_allocate) is
1430 4.09X faster in bmalloc than TCMalloc. Also, I wrote a stress test to
1431 add/remove link elements, which modify a ListHashSet on insertion and
1432 removal, and it was 1% faster / in the noise with bmalloc enabled.
1434 * wtf/ListHashSet.h:
1435 (WTF::ListHashSetNode::ListHashSetNode):
1436 (WTF::ListHashSetTranslator::translate):
1437 (WTF::U>::ListHashSet):
1440 (WTF::U>::~ListHashSet):
1442 (WTF::U>::capacity):
1445 (WTF::U>::removeFirst):
1446 (WTF::U>::takeFirst):
1448 (WTF::U>::removeLast):
1449 (WTF::U>::takeLast):
1450 (WTF::U>::contains):
1454 (WTF::U>::unlinkAndDelete):
1455 (WTF::U>::appendNode):
1456 (WTF::U>::prependNode):
1457 (WTF::U>::insertNodeBefore):
1458 (WTF::U>::deleteAllNodes):
1459 (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Deleted.
1460 (WTF::ListHashSetNodeAllocator::allocate): Deleted.
1461 (WTF::ListHashSetNodeAllocator::deallocate): Deleted.
1462 (WTF::ListHashSetNodeAllocator::pool): Deleted.
1463 (WTF::ListHashSetNodeAllocator::pastPool): Deleted.
1464 (WTF::ListHashSetNodeAllocator::inPool): Deleted.
1465 (WTF::ListHashSetNode::operator new): Deleted.
1466 (WTF::ListHashSetNode::destroy): Deleted.
1468 2014-11-18 Chris Dumez <cdumez@apple.com>
1470 Update the Vector API to deal with unsigned types instead of size_t
1471 https://bugs.webkit.org/show_bug.cgi?id=138824
1473 Reviewed by Andreas Kling.
1475 Update part of the Vector API to deal with unsigned types instead of
1476 size_t. The Vector class is already using unsigned type for its
1477 capacity and size data members. However, the Vector API was never
1478 updated accordingly.
1480 The rest of the Vector API will be ported in follow-up patches to
1481 make the change smaller and more easily reviewable.
1485 (WTF::VectorTypeOperations::compare):
1486 (WTF::VectorBufferBase::allocateBuffer):
1487 (WTF::VectorBufferBase::tryAllocateBuffer):
1488 (WTF::VectorBufferBase::shouldReallocateBuffer):
1489 (WTF::VectorBufferBase::reallocateBuffer):
1490 (WTF::VectorBufferBase::capacity):
1491 (WTF::VectorBufferBase::VectorBufferBase):
1492 (WTF::VectorBuffer::VectorBuffer):
1493 (WTF::VectorBuffer::allocateBuffer):
1494 (WTF::VectorBuffer::tryAllocateBuffer):
1495 (WTF::VectorBuffer::shouldReallocateBuffer):
1496 (WTF::VectorBuffer::reallocateBuffer):
1497 (WTF::VectorBuffer::swap):
1498 (WTF::VectorBuffer::swapInlineBuffer):
1499 (WTF::VectorBuffer::swapInlineBuffers):
1500 (WTF::Vector::Vector):
1502 (WTF::Vector::operator[]):
1503 (WTF::OverflowHandler>::find):
1504 (WTF::OverflowHandler>::reverseFind):
1505 (WTF::OverflowHandler>::fill):
1506 (WTF::OverflowHandler>::expandCapacity):
1507 (WTF::OverflowHandler>::tryExpandCapacity):
1508 (WTF::OverflowHandler>::resize):
1509 (WTF::OverflowHandler>::resizeToFit):
1510 (WTF::OverflowHandler>::shrink):
1511 (WTF::OverflowHandler>::grow):
1512 (WTF::OverflowHandler>::reserveCapacity):
1513 (WTF::OverflowHandler>::tryReserveCapacity):
1514 (WTF::OverflowHandler>::reserveInitialCapacity):
1515 (WTF::OverflowHandler>::shrinkCapacity):
1516 (WTF::OverflowHandler>::append):
1517 (WTF::OverflowHandler>::tryAppend):
1518 (WTF::OverflowHandler>::insert):
1519 (WTF::OverflowHandler>::insertVector):
1520 (WTF::OverflowHandler>::remove):
1521 (WTF::OverflowHandler>::reverse):
1522 (WTF::OverflowHandler>::checkConsistency):
1523 * wtf/text/AtomicString.h:
1524 * wtf/text/StringImpl.h:
1525 (WTF::StringImpl::adopt):
1526 (WTF::equalIgnoringNullity):
1527 * wtf/text/StringView.h:
1529 * wtf/text/WTFString.h:
1531 2014-11-18 peavo@outlook.com <peavo@outlook.com>
1533 [WinCairo] Compile errors when GStreamer is enabled.
1534 https://bugs.webkit.org/show_bug.cgi?id=137000
1536 Reviewed by Philippe Normand.
1538 MSVC does not allow the keyword default on move constructors and move assignment operators.
1540 * wtf/gobject/GMainLoopSource.cpp:
1541 (WTF::GMainLoopSource::cancel):
1542 (WTF::GMainLoopSource::socketCallback):
1543 * wtf/gobject/GMainLoopSource.h:
1544 (WTF::GMainLoopSource::Context::operator=):
1546 2014-11-17 Anders Carlsson <andersca@apple.com>
1548 Fix WTF build with newer versions of clang.
1549 <rdar://problem/18978705>
1552 (WTF::removeIterator):
1554 (WTF::double_conversion::BitCast):
1556 2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
1558 Allow constructing a base PassRef with a derived Ref
1559 https://bugs.webkit.org/show_bug.cgi?id=138701
1561 Reviewed by Andreas Kling
1564 (WTF::PassRef<T>::PassRef):
1566 2014-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
1568 [EFL] Fix the build with EFL 1.12
1569 https://bugs.webkit.org/show_bug.cgi?id=138245
1571 Reviewed by Gyuyoung Kim.
1573 * wtf/efl/UniquePtrEfl.h:
1574 Removed Evas_GL.h from UniquePtrEfl.h, which is commonly included, because
1575 it should not be included with official GL headers.
1577 2014-11-12 Mark Lam <mark.lam@apple.com>
1579 Rename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
1580 <https://webkit.org/b/138661>
1582 Reviewed by Michael Saboff.
1584 Also move the switch for enabling the use of MASM_PROBE from JavaScriptCore's
1585 config.h to WTF's Platform.h. This ensures that the setting is consistently
1586 applied even when building WebCore parts as well.
1590 2014-11-09 Antti Koivisto <antti@apple.com>
1592 Remove BloomFilter size limit
1593 https://bugs.webkit.org/show_bug.cgi?id=138549
1595 Reviewed by Andreas Kling.
1597 * wtf/BloomFilter.h: Remove the static_assert, the code works fine with somewhat larger sizes.
1599 2014-11-09 Chris Dumez <cdumez@apple.com>
1601 Add a more correct way to compare floating point numbers and use it
1602 https://bugs.webkit.org/show_bug.cgi?id=138527
1604 Reviewed by Darin Adler.
1606 To compare floating point numbers in the code base, we would often rely
1607 on the following check:
1608 std::abs(a - b) <= std::numeric_limits<T>::epsilon()
1610 However, this is not correct for arbitrary floating point values, and
1611 will fail for values that are not close to zero.
1613 This patch introduces a WTF::areEssentiallyEqual() templated function
1614 that can only be called with floating point types and relies on the
1615 following formula from [1][2] that defines u as being "essentially
1616 equal" to v if: | u - v | / |u| <= e and | u - v | / |v| <= e
1618 [1] Knuth, D. E. "Accuracy of Floating Point Arithmetic." The Art of
1619 Computer Programming. 3rd ed. Vol. 2. Boston: Addison-Wesley, 1998.
1621 [2] http://www.boost.org/doc/libs/1_34_0/libs/test/doc/components/test_tools/floating_point_comparison.html
1624 (WTF::safeFPDivision):
1625 (WTF::areEssentiallyEqual):
1626 (WTF::withinEpsilon): Deleted.
1628 2014-11-08 Darin Adler <darin@apple.com>
1630 Replace FileThread class with a single function
1631 https://bugs.webkit.org/show_bug.cgi?id=138282
1633 Reviewed by Alexey Proskuryakov.
1635 * wtf/MessageQueue.h: Made queue work on any type and not require wrapping
1636 everything in a unique_ptr.
1638 * wtf/Threading.cpp:
1639 (WTF::threadEntryPoint): Changed to use a std::function instead of a function pointer.
1640 (WTF::createThread): Add a version that takes a std::function. Reimplemented the
1641 old version using lambdas. Removed the obsolete versions that were there just to support
1642 binary compatibility with very old versions of Safari.
1644 * wtf/Threading.h: Removed an incorrect license header that covers code that was long ago
1645 moved to a different file. Changed createThread to take a std::function instead of a function
1646 pointer and data pointer. Moved internal functions after public functions.
1648 2014-11-05 Chris Dumez <cdumez@apple.com>
1650 Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
1651 https://bugs.webkit.org/show_bug.cgi?id=138440
1653 Reviewed by Geoffrey Garen.
1655 Move the withinEpsilon() function to WTF to avoid code duplication.
1658 (WTF::withinEpsilon):
1660 2014-11-05 Chris Dumez <cdumez@apple.com>
1662 Allow constructing a PassRef from a Ref
1663 https://bugs.webkit.org/show_bug.cgi?id=138389
1665 Reviewed by Andreas Kling.
1667 Allow constructing a PassRef from a Ref, similarly to PassRefPtr that
1668 can be constructed from a RefPtr already. This avoids having to call
1669 Ref::get() and simplifies the code a bit.
1672 (WTF::PassRef<T>::PassRef):
1674 2014-11-05 Dan Bernstein <mitz@apple.com>
1676 Remove the unused deletion UI feature
1677 https://bugs.webkit.org/show_bug.cgi?id=138442
1679 Rubber-stamped by Alexey Proskuryakov.
1681 * wtf/FeatureDefines.h: Removed definition of ENABLE_DELETION_UI.
1683 2014-11-03 Dean Jackson <dino@apple.com>
1685 Add ENABLE_FILTERS_LEVEL_2 feature guard.
1686 https://bugs.webkit.org/show_bug.cgi?id=138362
1688 Reviewed by Tim Horton.
1690 Add a new feature define for Level 2 of CSS Filters.
1691 http://dev.w3.org/fxtf/filters-2/
1693 * wtf/FeatureDefines.h:
1695 2014-11-05 Csaba Osztrogonác <ossy@webkit.org>
1697 Enable ARMv7 disassembler for all platforms
1698 https://bugs.webkit.org/show_bug.cgi?id=138415
1700 Reviewed by Darin Adler.
1704 2014-11-04 Chris Dumez <cdumez@apple.com>
1706 Add ptr() method to Ref class
1707 https://bugs.webkit.org/show_bug.cgi?id=138361
1709 Reviewed by Darin Adler.
1711 It is a very common pattern in our code base to get a pointer from a
1712 Ref object. Previously, we have to call Ref.get() and take its address
1713 which is not very nice. This patch adds a ptr() method to Ref class
1714 to simplify the code a bit.
1717 (WTF::PassRef<T>::ptr):
1720 (WTF::GetPtrHelper<Ref<T>>::getPtr):
1722 2014-11-04 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
1724 ATTR_USED incorrectly applying to Clang
1725 https://bugs.webkit.org/show_bug.cgi?id=138313
1727 Reviewed by Csaba Osztrogonác.
1729 ATTR_USED was only intended for GCC. Also limit it to ENABLE(FTL_NATIVE_CALL_INLINING)
1730 since that's the only thing it's needed for.
1734 2014-11-03 Chris Dumez <cdumez@apple.com>
1736 Allow implicit conversion from Ref<T> to T&
1737 https://bugs.webkit.org/show_bug.cgi?id=138331
1739 Reviewed by Andreas Kling.
1741 Allow implicit conversion from Ref<T> to T& to reduce the amount of
1742 Ref<>::get() calls in the code and increase readability. Unlike for
1743 RefPtr, doing this for Ref should not be error prone.
1746 (WTF::Ref::operator T&):
1747 (WTF::Ref::operator const T&):
1749 (WTF::RunLoop::Holder::runLoop):
1751 2014-10-31 Jeffrey Pfau <jpfau@apple.com>
1753 Unreviewed, fix ASan build after r175382
1755 * wtf/SizeLimits.cpp:
1757 2014-10-31 Geoffrey Garen <ggaren@apple.com>
1761 WebKit was failing to build 32bit on some Apple internal systems because
1762 those systems were configured to build bmalloc 64-bit-only. Those systems
1763 have been updated to build bmalloc as a universal binary, so everything
1764 should work fine now.
1766 The relevant setting is controlled by an environment variable on the
1767 build system, and not by the project file in the source tree, so there's
1768 no new code change here.
1770 Enable bmalloc in 32bit builds
1771 https://bugs.webkit.org/show_bug.cgi?id=138232
1773 Reviewed by Andreas Kling.
1775 * wtf/FastMalloc.cpp:
1777 2014-10-31 Lucas Forschler <lforschler@apple.com>
1779 Unreviewed rollout r175389.
1781 2014-10-30 Dana Burkart <dburkart@apple.com>
1783 <rdar://problem/18821260> Prepare for the mysterious future
1785 Reviewed by Lucas Forschler.
1787 * Configurations/Base.xcconfig:
1788 * Configurations/DebugRelease.xcconfig:
1790 2014-10-30 Geoffrey Garen <ggaren@apple.com>
1792 Enable bmalloc in 32bit builds
1793 https://bugs.webkit.org/show_bug.cgi?id=138232
1795 Reviewed by Andreas Kling.
1799 * wtf/FastMalloc.cpp:
1801 2014-10-30 Jeffrey Pfau <jpfau@apple.com>
1803 ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
1804 https://bugs.webkit.org/show_bug.cgi?id=138141
1806 Reviewed by Alexey Proskuryakov.
1809 (WTF::RefCountedBase::ref):
1810 (WTF::RefCountedBase::relaxAdoptionRequirement):
1811 (WTF::RefCountedBase::derefBase):
1814 2014-10-28 Milan Crha <mcrha@redhat.com>
1816 Use constants from wtf/MathExtras.h
1817 https://bugs.webkit.org/show_bug.cgi?id=137967
1819 Reviewed by Darin Adler.
1823 2014-10-28 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
1825 [EFL] Remove unnecessary defines from OptionsEfl.cmake
1826 https://bugs.webkit.org/show_bug.cgi?id=138132
1828 Reviewed by Csaba Osztrogonác.
1832 2014-10-27 Chris Dumez <cdumez@apple.com>
1834 Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
1835 https://bugs.webkit.org/show_bug.cgi?id=138079
1837 Reviewed by Anders Carlsson.
1839 Add HashTraits for C++11 strong enum types. Using integer HashTraits for
1840 strong enums would be inconvenient as it would require casting between
1841 integer and strong enum types.
1844 (WTF::StrongEnumHashTraits::emptyValue):
1845 (WTF::StrongEnumHashTraits::constructDeletedValue):
1846 (WTF::StrongEnumHashTraits::isDeletedValue):
1848 2014-10-25 Brian J. Burg <burg@cs.washington.edu>
1850 Web Inspector: timelines should not count time elapsed while paused in the debugger
1851 https://bugs.webkit.org/show_bug.cgi?id=136351
1853 Unreviewed, follow-up fix after r175203. The debugger agent should not assume
1854 that the inspector environment's stopwatch has already been started.
1857 (WTF::Stopwatch::isActive): Added. Allow peeking at the stopwatch state.
1859 2014-10-18 Brian J. Burg <burg@cs.washington.edu>
1861 Web Inspector: timelines should not count time elapsed while paused in the debugger
1862 https://bugs.webkit.org/show_bug.cgi?id=136351
1864 Reviewed by Timothy Hatcher.
1866 * WTF.vcxproj/WTF.vcxproj:
1867 * WTF.vcxproj/WTF.vcxproj.filters:
1868 * WTF.xcodeproj/project.pbxproj:
1869 * wtf/CMakeLists.txt:
1870 * wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
1871 (WTF::Stopwatch::create):
1872 (WTF::Stopwatch::Stopwatch):
1873 (WTF::Stopwatch::reset):
1874 (WTF::Stopwatch::start):
1875 (WTF::Stopwatch::stop):
1876 (WTF::Stopwatch::elapsedTime):
1878 2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
1880 Web Inspector: Provide a way to have alternate inspector agents
1881 https://bugs.webkit.org/show_bug.cgi?id=137901
1883 Reviewed by Brian Burg.
1885 * wtf/FeatureDefines.h:
1887 2014-10-23 Alberto Garcia <berto@igalia.com>
1889 [GTK] Fix build on Hurd
1890 https://bugs.webkit.org/show_bug.cgi?id=138003
1892 Reviewed by Carlos Garcia Campos.
1897 2014-10-22 Byungseon Shin <sun.shin@lge.com>
1899 String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
1900 https://bugs.webkit.org/show_bug.cgi?id=130967
1902 Reviewed by Mark Lam.
1904 By definition of calculateLocalTimeOffset, input time should be UTC time.
1905 But there are many cases when input time is based on local time.
1906 So, it gives erroneous results while calculating offset of DST boundary time.
1907 By adding a argument to distinguish UTC and local time, we can get the correct offset.
1910 (WTF::calculateLocalTimeOffset):
1911 (WTF::parseDateFromNullTerminatedCharacters):
1912 Compensate time offset depends on UTC time or local time.
1914 Add argument to differenciate UTC or local time.
1916 2014-10-21 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
1918 Fix FTL Native Inlining for EFL
1919 https://bugs.webkit.org/show_bug.cgi?id=137774
1921 Reviewed by Michael Saboff.
1923 Updated guard definition for Native Inlining, and added an attribute define for marking functions
1924 that should not be left out of the symbol table.
1928 2014-10-20 Chris Dumez <cdumez@apple.com>
1930 Use is<>() / downcast<>() for Accessibility objects
1931 https://bugs.webkit.org/show_bug.cgi?id=137286
1933 Reviewed by Darin Adler.
1935 Remove the legacy TYPE_CASTS_BASE() macro now that it is no longer
1940 2014-10-18 Dan Bernstein <mitz@apple.com>
1942 WorkQueue dispatches functions but isn’t a FunctionDispatcher
1943 https://bugs.webkit.org/show_bug.cgi?id=137853
1945 Reviewed by Anders Carlsson.
1947 * wtf/FunctionDispatcher.h: Added header guards.
1949 2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
1951 [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1952 https://bugs.webkit.org/show_bug.cgi?id=137782
1954 Reviewed by Sergio Villar Senin.
1956 In some cases when we have a double with the time in seconds, the
1957 conversion to milliseconds ends up truncating the value to 0, and
1958 the source scheduled immediately.
1960 * wtf/gobject/GMainLoopSource.cpp:
1961 (WTF::createMicrosecondsTimeoutSource): Use a custom timeout
1962 source that handles the interval in microseconds instead of milliseconds.
1963 (WTF::GMainLoopSource::scheduleAfterDelay): Use MicrosecondsTimeoutSource.
1964 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Ditto.
1965 * wtf/gobject/GMainLoopSource.h:
1967 2014-10-17 Dan Bernstein <mitz@apple.com>
1969 Reverted incorrect build fix attempt.
1971 * wtf/Threading.cpp:
1973 2014-10-17 Dan Bernstein <mitz@apple.com>
1975 Tried to fix the Yosemite build.
1977 * wtf/Threading.cpp:
1979 2014-10-16 Dan Bernstein <mitz@apple.com>
1981 OSObjectPtr is missing leakRef()
1982 https://bugs.webkit.org/show_bug.cgi?id=137798
1984 Reviewed by Sam Weinig.
1986 * wtf/OSObjectPtr.h:
1988 2014-10-14 Brent Fulgham <bfulgham@apple.com>
1990 [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
1992 * WTF.vcxproj: Modified property svn:ignore.
1994 2014-10-13 Antti Koivisto <antti@apple.com>
1996 Add StringCapture helper for thread-safe lambda capture
1997 https://bugs.webkit.org/show_bug.cgi?id=137664
1999 Reviewed by Anders Carlsson.
2001 There is currently no clean way to capture a String in a thread-safe manner. This will now work:
2003 StringCapture stringCapture(string);
2004 auto lambdaThatRunsInAnotherThread = [stringCapture] { String string = stringCapture.string(); ... }
2006 This type won't be necessary with C++14 initialized lambda capture: [string = string.isolatedCopy()].
2008 * wtf/text/WTFString.h:
2009 (WTF::StringCapture::StringCapture): Create isolated copy in copy-constructor.
2010 (WTF::StringCapture::string):
2012 2014-10-11 KwangHyuk Kim <hyuki.kim@samsung.com>
2014 [EFL] Enable WebP support.
2015 https://bugs.webkit.org/show_bug.cgi?id=136156
2017 Reviewed by Gyuyoung Kim.
2019 Enable WTF_USE_WEBP macro for WK2 Efl.
2023 2014-10-11 Carlos Garcia Campos <cgarcia@igalia.com>
2025 [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
2026 https://bugs.webkit.org/show_bug.cgi?id=137485
2028 Reviewed by Sergio Villar Senin.
2030 We made GMainLoopSource thread safe, but in most of the cases we
2031 know the sources are used by a single thread, which has an impact
2032 in the performance (mutex, GCancellable, etc.). The new class
2033 GThreadSafeMainLoopSource inherits from GMainLoopSource overriding
2034 the new virtual methods and calling the parent for the common code.
2035 GMutexLocker now supports recursive mutexes, it's a template that
2036 can wrap a GMutex or a GRecMutex. GThreadSafeMainLoopSource uses a
2037 recursive mutex using the new GMutexLocker API.
2039 * wtf/PlatformEfl.cmake: Add new file to compilation.
2040 * wtf/PlatformGTK.cmake: Ditto.
2041 * wtf/gobject/GMainLoopSource.cpp:
2042 (WTF::GMainLoopSource::GMainLoopSource):
2043 (WTF::GMainLoopSource::~GMainLoopSource):
2044 (WTF::GMainLoopSource::cancel):
2045 (WTF::GMainLoopSource::schedule):
2046 (WTF::GMainLoopSource::scheduleAfterDelay):
2047 (WTF::GMainLoopSource::prepareVoidCallback):
2048 (WTF::GMainLoopSource::finishVoidCallback):
2049 (WTF::GMainLoopSource::voidCallback):
2050 (WTF::GMainLoopSource::prepareBoolCallback):
2051 (WTF::GMainLoopSource::finishBoolCallback):
2052 (WTF::GMainLoopSource::boolCallback):
2053 (WTF::GMainLoopSource::socketCallback):
2054 (WTF::GMainLoopSource::cancelWithoutLocking): Deleted.
2055 * wtf/gobject/GMainLoopSource.h:
2056 * wtf/gobject/GMutexLocker.h:
2057 (WTF::MutexWrapper<GMutex>::lock):
2058 (WTF::MutexWrapper<GMutex>::unlock):
2059 (WTF::MutexWrapper<GRecMutex>::lock):
2060 (WTF::MutexWrapper<GRecMutex>::unlock):
2061 (WTF::GMutexLocker::GMutexLocker):
2062 (WTF::GMutexLocker::lock):
2063 (WTF::GMutexLocker::unlock):
2064 * wtf/gobject/GThreadSafeMainLoopSource.cpp: Added.
2065 (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource):
2066 (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource):
2067 (WTF::GThreadSafeMainLoopSource::cancel):
2068 (WTF::GThreadSafeMainLoopSource::schedule):
2069 (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay):
2070 (WTF::GThreadSafeMainLoopSource::prepareVoidCallback):
2071 (WTF::GThreadSafeMainLoopSource::finishVoidCallback):
2072 (WTF::GThreadSafeMainLoopSource::voidCallback):
2073 (WTF::GThreadSafeMainLoopSource::prepareBoolCallback):
2074 (WTF::GThreadSafeMainLoopSource::finishBoolCallback):
2075 (WTF::GThreadSafeMainLoopSource::boolCallback):
2076 * wtf/gobject/GThreadSafeMainLoopSource.h: Added.
2078 2014-10-09 Dean Jackson <dino@apple.com>
2080 Remove ENABLE_CSS3_CONDITIONAL_RULES
2081 https://bugs.webkit.org/show_bug.cgi?id=137571
2083 Reviewed by Simon Fraser.
2085 * wtf/FeatureDefines.h:
2087 2014-10-09 Akos Kiss <akiss@inf.u-szeged.hu>
2089 Enable ARM64 disassembler for all platforms
2090 https://bugs.webkit.org/show_bug.cgi?id=137560
2092 Reviewed by Michael Saboff.
2094 Remove PLATFORM conditions from around WTF_USE_ARM64_DISASSEMBLER since
2095 the ARM64 disassembler has no platform dependencies anymore.
2099 2014-10-08 peavo@outlook.com <peavo@outlook.com>
2101 [WinCairo] Enable JIT on 32-bit.
2102 https://bugs.webkit.org/show_bug.cgi?id=137521
2104 Reviewed by Mark Lam.
2106 Enable JIT on Windows 32-bit, but disable it at runtime if SSE2 is not present.
2110 2014-10-08 Brent Fulgham <bfulgham@apple.com>
2112 [Win] Resolve warnings about missing __has_include macro under MSVC
2113 https://bugs.webkit.org/show_bug.cgi?id=137524
2115 Reviewed by Anders Carlsson.
2117 * wtf/Compiler.h: Provide a dummy implementation of __has_include that
2118 avoids the warning without changing compile behavior.
2120 2014-10-07 Brent Fulgham <bfulgham@apple.com>
2122 [Win] Resolve some MSVC static analyzer warnings
2123 https://bugs.webkit.org/show_bug.cgi?id=137504
2125 Reviewed by Dean Jackson.
2127 * wtf/GregorianDateTime.cpp:
2128 (WTF::GregorianDateTime::setToCurrentLocalTime): Properly handle
2129 possible timezone error case.
2130 * wtf/OSAllocatorWin.cpp:
2131 (WTF::OSAllocator::decommit): Silence a spurious warning about using
2132 MEM_DECOMMIT instead of MEM_RELEASE.
2133 * wtf/ThreadingWin.cpp: Silence a spurious warning about how the
2134 tryLock method is implemented.
2136 2014-10-07 Christophe Dumez <cdumez@apple.com>
2138 [WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses
2139 https://bugs.webkit.org/show_bug.cgi?id=137477
2141 Reviewed by Andreas Kling.
2143 Rename wtf/cf/TypeCasts.h to wtf/cf/TypeCastsCF.h to avoid conflict
2144 with wtf/TypeCasts.h. They were using the same #ifndef guard and it
2145 was causing problems when both were included in the same context.
2147 * WTF.xcodeproj/project.pbxproj:
2148 * wtf/cf/TypeCastsCF.h: Renamed from Source/WTF/wtf/cf/TypeCasts.h.
2149 (WTF::dynamic_cf_cast):
2150 (WTF::checked_cf_cast):
2152 2014-10-07 Anders Carlsson <andersca@apple.com>
2154 Try to fix the Mountain Lion build.
2156 * wtf/text/StringView.h:
2157 (WTF::StringView::underlyingStringIsValid):
2158 (WTF::StringView::setUnderlyingString):
2159 (WTF::StringView::invalidate):
2161 2014-10-07 Anders Carlsson <andersca@apple.com>
2163 Use "1", not "true".
2165 * wtf/text/StringView.h:
2167 2014-10-07 Anders Carlsson <andersca@apple.com>
2169 Temporarily disable the StringView lifetime checking.
2171 * wtf/text/StringView.h:
2173 2014-10-07 Anders Carlsson <andersca@apple.com>
2175 Another build fix attempt.
2177 * wtf/text/StringView.cpp:
2178 (WTF::StringView::UnderlyingString::UnderlyingString):
2180 2014-10-07 Anders Carlsson <andersca@apple.com>
2182 Try to fix the Windows build.
2184 * wtf/text/StringView.cpp:
2185 (WTF::StringView::UnderlyingString::UnderlyingString):
2187 2014-10-06 Darin Adler <darin@apple.com>
2189 Make StringView check the lifetime of the StringImpl it's created from
2190 https://bugs.webkit.org/show_bug.cgi?id=137202
2192 Reviewed by Anders Carlsson.
2194 * WTF.vcxproj/WTF.vcxproj: Added StringView.cpp.
2195 * WTF.vcxproj/WTF.vcxproj.filters: Added StringView.cpp.
2196 * WTF.xcodeproj/project.pbxproj: Added StringView.cpp.
2197 * wtf/CMakeLists.txt: Added StringView.cpp.
2199 * wtf/text/StringImpl.cpp:
2200 (WTF::StringImpl::~StringImpl): Call StringView::invalidate.
2202 * wtf/text/StringView.cpp: Added.
2203 (WTF::underlyingStrings): Returns map from StringImpl to the underlying
2204 string object used by StringView to track validity.
2205 (WTF::StringView::invalidate): Mark the underlying string object invalid,
2206 and remove it from the map, so any future StringImpl will get a new one,
2207 even if it has the same pointer.
2208 (WTF::StringView::underlyingStringIsValid): Return true only if the
2209 underlying string is still valid.
2210 (WTF::StringView::setUnderlyingString): Create and manage reference counts
2211 of underlying string objects as needed.
2213 * wtf/text/StringView.h: Moved function bodies out of the class definition,
2214 so we can now read a clean class definition to see the class design and what
2215 functions it offers.
2216 (WTF::StringView::StringView): Added a comment to the default constructor.
2217 Also added copy and move constructors so they can call setUnderlyingString
2218 and assert the underlying string is valid as needed, replacing the
2219 compiler-generated ones.
2220 (WTF::StringView::~StringView): Added a call to setUnderlyingString.
2221 (WTF::StringView::operator=): Added these assignment operators with the same
2222 job as the constructors above.
2223 (WTF::StringView::initialize): Added a comment.
2224 (WTF::StringView::characters8): Added an assertion that the underlying
2226 (WTF::StringView::characters16): Ditto.
2227 (WTF::StringView::substring): Added code to propagate the underlying string
2228 from the original string to the substring.
2229 (WTF::StringView::invalidate): Inline empty version of this function for
2231 (WTF::StringView::underlyingStringIsValid): Ditto.
2232 (WTF::StringView::setUnderlyingString): Ditto.
2234 2014-10-06 Brent Fulgham <bfulgham@apple.com>
2236 [Win] DateMath's calculateUTFOffset does not account for DST.
2237 https://bugs.webkit.org/show_bug.cgi?id=137458
2238 <rdar://problem/18559172>
2240 Reviewed by Geoffrey Garen.
2242 Check the return value of GetTimeZoneInformation and use the
2243 proper bias against UTC (depending on whether we are in daylight
2244 savings time, or standard time).
2246 Also, handle possible error cases in the FileTimeToSystemTime
2247 and SystemTimeToTzSpecificLocalTime, rather than using potentially
2248 uninitialized values.
2251 (WTF::calculateUTCOffset): Use proper daylight-savings-time state.
2252 (WTF::calculateDSTOffset): Avoid uninitialized data due to failing
2255 2014-10-06 Christophe Dumez <cdumez@apple.com>
2257 Add is<>() / downcast<>() support for RenderObject subclasses
2258 https://bugs.webkit.org/show_bug.cgi?id=137424
2260 Reviewed by Benjamin Poulain.
2262 Handle correctly calling TypeCastTraits<ExpectedType, ArgType>::isOfType(ArgType&)
2263 with ExpectedType being a base class of ArgType (or the same as ArgType). The
2264 previous template specialization was only meant to support the case where
2265 ExpectedType is the same as ArgType but even that wasn't working as the compiler
2266 would complain about ambiguous partial specializations. Since this is needed by
2267 RenderTraversal functions, this patch adds an extra isBaseType template parameter
2268 to TypeCastTraits to resolve the ambiguity and relies on std::is_base_of for the
2273 2014-10-06 Brent Fulgham <bfulgham@apple.com>
2275 [Win] Project file gardening.
2277 * WTF.vcxproj/WTF.vcxproj.filters: Move HashMethod.h and
2278 FastBitVector.cpp to proper places in hierarchy.
2280 2014-10-04 Brian J. Burg <burg@cs.washington.edu>
2282 Unreviewed, rolling out r174319.
2284 Causes assertions in fast/profiler tests. Needs nontrivial
2285 investigation, will take offline.
2289 "Web Inspector: timelines should not count time elapsed while
2290 paused in the debugger"
2291 https://bugs.webkit.org/show_bug.cgi?id=136351
2292 http://trac.webkit.org/changeset/174319
2294 2014-10-04 Brian J. Burg <burg@cs.washington.edu>
2296 Web Inspector: timelines should not count time elapsed while paused in the debugger
2297 https://bugs.webkit.org/show_bug.cgi?id=136351
2299 Reviewed by Timothy Hatcher.
2301 * WTF.vcxproj/WTF.vcxproj:
2302 * WTF.vcxproj/WTF.vcxproj.filters:
2303 * WTF.xcodeproj/project.pbxproj:
2304 * wtf/CMakeLists.txt:
2305 * wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
2306 (WTF::Stopwatch::reset):
2307 (WTF::Stopwatch::start):
2308 (WTF::Stopwatch::stop):
2310 2014-10-04 Filip Pizlo <fpizlo@apple.com>
2312 FTL should sink PutLocals
2313 https://bugs.webkit.org/show_bug.cgi?id=137168
2315 Reviewed by Oliver Hunt.
2317 Make the set bits of a BitVector iterable.
2320 (WTF::BitVector::SetBitsIterable::SetBitsIterable):
2321 (WTF::BitVector::SetBitsIterable::iterator::iterator):
2322 (WTF::BitVector::SetBitsIterable::iterator::operator*):
2323 (WTF::BitVector::SetBitsIterable::iterator::operator++):
2324 (WTF::BitVector::SetBitsIterable::iterator::operator==):
2325 (WTF::BitVector::SetBitsIterable::iterator::operator!=):
2326 (WTF::BitVector::SetBitsIterable::begin):
2327 (WTF::BitVector::SetBitsIterable::end):
2328 (WTF::BitVector::setBits):
2330 2014-10-03 Commit Queue <commit-queue@webkit.org>
2332 Unreviewed, rolling out r174275.
2333 https://bugs.webkit.org/show_bug.cgi?id=137408
2335 Build failures on the internal bots. (Requested by dethbakin
2340 "FTL should sink PutLocals"
2341 https://bugs.webkit.org/show_bug.cgi?id=137168
2342 http://trac.webkit.org/changeset/174275
2344 2014-10-03 Christophe Dumez <cdumez@apple.com>
2346 Add TypeCasts.h to xcodeproject
2347 https://bugs.webkit.org/show_bug.cgi?id=137403
2349 Reviewed by Benjamin Poulain.
2351 Add TypeCasts.h to xcodeproject.
2353 * WTF.xcodeproj/project.pbxproj:
2355 2014-09-28 Filip Pizlo <fpizlo@apple.com>
2357 FTL should sink PutLocals
2358 https://bugs.webkit.org/show_bug.cgi?id=137168
2360 Reviewed by Oliver Hunt.
2362 Make the set bits of a BitVector iterable.
2365 (WTF::BitVector::SetBitsIterable::SetBitsIterable):
2366 (WTF::BitVector::SetBitsIterable::iterator::iterator):
2367 (WTF::BitVector::SetBitsIterable::iterator::operator*):
2368 (WTF::BitVector::SetBitsIterable::iterator::operator++):
2369 (WTF::BitVector::SetBitsIterable::iterator::operator==):
2370 (WTF::BitVector::SetBitsIterable::iterator::operator!=):
2371 (WTF::BitVector::SetBitsIterable::begin):
2372 (WTF::BitVector::SetBitsIterable::end):
2373 (WTF::BitVector::setBits):
2375 2014-10-03 Myles C. Maxfield <mmaxfield@apple.com>
2377 Support modern for loops over StringViews
2378 https://bugs.webkit.org/show_bug.cgi?id=137165
2380 Reviewed by Darin Adler.
2382 This patch adds two functions, codePoints() and codeUnits(), on StringView.
2383 These two functions return small objects which have begin() and end() functions,
2384 which means it can be used by the modern for loop style. This small class also
2385 has an inner iterator class which can be incremented, dereferenced, and
2388 Using these new objects looks like this:
2389 for (UChar codeunit : stringView.codeUnits()) { } and
2390 for (UChar32 codepoint : stringView.codePoints()) { }.
2392 * wtf/text/StringView.h:
2393 (WTF::StringView::codepoints):
2394 (WTF::StringView::codeunits):
2395 (WTF::StringViewCodePointIterator::StringViewCodePointIterator):
2396 (WTF::StringViewCodePointIterator::Iterator::Iterator):
2397 (WTF::StringViewCodePointIterator::Iterator::operator*):
2398 (WTF::StringViewCodePointIterator::Iterator::operator!=):
2399 (WTF::StringViewCodeUnitIterator::StringViewCodeUnitIterator):
2400 (WTF::StringViewCodeUnitIterator::Iterator::Iterator):
2401 (WTF::StringViewCodeUnitIterator::Iterator::operator*):
2402 (WTF::StringViewCodeUnitIterator::Iterator::operator!=):
2404 2014-09-28 Sam Weinig <sam@webkit.org>
2406 Remove RefPtrHashMap
2407 https://bugs.webkit.org/show_bug.cgi?id=137200
2409 Reviewed by Darin Adler.
2411 HashMap now has all the features of the RefPtr specialization of HashMap
2412 (which lived in RefPtrHashMap.h) and is in fact more efficient when moving
2413 items into it. For instance:
2415 For HashMap<RefPtr<Foo>, Bar> map:
2417 RefPtr<Foo> foo = ...;
2418 map.add(WTF::move(foo), Bar());
2420 will now not cause a ref() / deref(), but will successfully move the item in
2421 without churn. The same is true if foo.release() was used.
2423 * WTF.vcxproj/WTF.vcxproj:
2424 * WTF.vcxproj/WTF.vcxproj.filters:
2425 * WTF.xcodeproj/project.pbxproj:
2426 * wtf/CMakeLists.txt:
2427 Remove references to RefPtrHashMap.h.
2429 * wtf/RefPtrHashMap.h: Removed.
2432 Remove #include of RefPtrHashMap.h and add inlineGet to match the interface
2433 exposed by the RefPtrHashMap specialization.
2435 2014-10-02 Anders Carlsson <andersca@apple.com>
2437 Add back debugging/testing code that I accidentally removed.
2439 * wtf/text/StringConcatenate.h:
2440 (WTF::StringTypeAdapter<String>::writeTo):
2442 2014-10-02 Anders Carlsson <andersca@apple.com>
2444 Simplify StringTypeAdapter templates
2445 https://bugs.webkit.org/show_bug.cgi?id=137356
2447 Reviewed by Andreas Kling.
2449 * wtf/text/StringConcatenate.h:
2450 Use StringView for copying characters. Use inheritance for char* vs const char* etc. Make all StringAdapter member functions const.
2452 * wtf/text/StringView.h:
2453 Move enough functions out of line so we can include WTFString.h after the StringView class definition.
2455 2014-10-01 Christophe Dumez <cdumez@apple.com>
2457 Have is<>(T*) function do a null check on the pointer argument
2458 https://bugs.webkit.org/show_bug.cgi?id=137333
2460 Reviewed by Gavin Barraclough.
2462 Have is<>(T*) function do a null check on the argument instead of a
2463 simple assertion. This makes sense for 2 reasons:
2464 1. It is more consistent with downcast<>(T*), which will succeed even
2465 if the argument is a nullptr.
2466 2. It simplifies the code a bit as it gets rid of a lot of explicit
2472 2014-10-02 Daniel Bates <dabates@apple.com>
2474 Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
2475 https://bugs.webkit.org/show_bug.cgi?id=137277
2477 Reviewed by Alexey Proskuryakov.
2479 Towards centralizing the declarations of XPC functions used in JavaScriptCore
2480 and WebKit2, add a header that wraps these function declarations called XPCSPI.h
2481 and use it instead of including the corresponding XPC API/SPI headers/forward
2482 declaring XPC functions. This will also aid in the effort to make WebKit2 build
2483 for iOS with the public iOS SDK.
2485 * WTF.xcodeproj/project.pbxproj:
2486 * wtf/spi/darwin/XPCSPI.h: Added.
2488 2014-10-01 Christophe Dumez <cdumez@apple.com>
2490 Unreviewed build fix after r174193.
2492 Adding a return statement as that function is returning a boolean.
2495 (WTF::TypeCastTraits::isOfType):
2497 2014-10-01 Christophe Dumez <cdumez@apple.com>
2499 Fail better when is<>() / downcast<>() is used for an unsupported type
2500 https://bugs.webkit.org/show_bug.cgi?id=137323
2502 Reviewed by Benjamin Poulain.
2504 We should fail better when is<>() / downcast<>() is used for an
2505 unsupported type (i.e. a type that doesn't have the needed
2506 TypeCastTraits template specialization). Previously, we would get an
2507 obscure linking error, which was sub-optimal.
2509 With this patch, you would now hit a static_assert() at build time if
2510 you tried to use is<>() / downcast<>() for a type that did not have the
2511 needed template specialization. There is also a helpful comment above
2512 the assertion letting the developer know how to add the needed template
2516 (WTF::TypeCastTraits::isOfType):
2518 2014-10-01 Commit Queue <commit-queue@webkit.org>
2520 Unreviewed, rolling out r174180, r174183, and r174186.
2521 https://bugs.webkit.org/show_bug.cgi?id=137320
2523 Broke the Mac MountainLion build. Will investigate offline.
2524 (Requested by dydz on #webkit).
2526 Reverted changesets:
2528 "Clean up: Move XPC forward declarations in JavaScriptCore to
2529 WTF SPI wrapper header"
2530 https://bugs.webkit.org/show_bug.cgi?id=137277
2531 http://trac.webkit.org/changeset/174180
2533 "Attempt to fix the build after
2534 <https://trac.webkit.org/changeset/174180>"
2535 https://bugs.webkit.org/show_bug.cgi?id=137277
2536 http://trac.webkit.org/changeset/174183
2538 "Another attempt to fix the Mac build after
2539 <https://trac.webkit.org/changeset/174180>"
2540 https://bugs.webkit.org/show_bug.cgi?id=137277
2541 http://trac.webkit.org/changeset/174186
2543 2014-10-01 Daniel Bates <dabates@apple.com>
2545 Another attempt to fix the Mac build after <https://trac.webkit.org/changeset/174180>
2546 (https://bugs.webkit.org/show_bug.cgi?id=137277)
2548 Include header AvailabilityMacros.h instead of Availability.h, which actually defines the
2549 macro __MAC_OS_X_VERSION_MIN_REQUIRED.
2551 * wtf/spi/darwin/XPCSPI.h:
2553 2014-10-01 Daniel Bates <dabates@apple.com>
2555 Attempt to fix the build after <https://trac.webkit.org/changeset/174180>
2556 (https://bugs.webkit.org/show_bug.cgi?id=137277)
2558 Include header <Availability.h> for the definition of __MAC_OS_X_VERSION_MIN_REQUIRED.
2559 Also, we want to define CONST_ON_OR_AFTER_MAC_OS_X_VERSION_1090 to be const when building
2562 * wtf/spi/darwin/XPCSPI.h:
2564 2014-10-01 Daniel Bates <dabates@apple.com>
2566 Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
2567 https://bugs.webkit.org/show_bug.cgi?id=137277
2569 Reviewed by Alexey Proskuryakov.
2571 Towards centralizing the declarations of XPC functions used in JavaScriptCore
2572 and WebKit2, add a header that wraps these function declarations called XPCSPI.h
2573 and use it instead of including the corresponding XPC API/SPI headers/forward
2574 declaring XPC functions. This will also aid in the effort to make WebKit2 build
2575 for iOS with the public iOS SDK.
2577 * WTF.xcodeproj/project.pbxproj:
2578 * wtf/spi/darwin/XPCSPI.h: Added.
2580 2014-10-01 Brent Fulgham <bfulgham@apple.com>
2582 [Win] 32-bit JavaScriptCore should limit itself to the C loop
2583 https://bugs.webkit.org/show_bug.cgi?id=137304
2584 <rdar://problem/18375370>
2586 Reviewed by Michael Saboff.
2588 * wtf/Platform.h: Force the C loop when building for 32-bit Windows.
2590 2014-09-30 Christophe Dumez <cdumez@apple.com>
2592 Generalize is<>() / downcast<>() support to all types
2593 https://bugs.webkit.org/show_bug.cgi?id=137243
2595 Reviewed by Benjamin Poulain.
2597 Generalize is<>() / downcast<>() support to all types, not just Nodes.
2600 * wtf/TypeCasts.h: Added.
2604 2014-09-30 Anders Carlsson <andersca@apple.com>
2606 Get the STRING_STATS codepath compiling again, and add calls to ref/deref
2607 https://bugs.webkit.org/show_bug.cgi?id=137259
2609 Reviewed by Andreas Kling.
2611 * wtf/text/StringImpl.cpp:
2612 (WTF::StringStats::removeString):
2613 (WTF::StringStats::printStats):
2614 (WTF::StringImpl::~StringImpl):
2615 * wtf/text/StringImpl.h:
2616 (WTF::StringImpl::StringImpl):
2617 (WTF::StringImpl::isSubString):
2618 (WTF::StringImpl::ref):
2619 (WTF::StringImpl::deref):
2620 (WTF::StringStats::addUpconvertedString): Deleted.
2622 2014-09-30 Daniel Bates <dabates@apple.com>
2624 REGRESSION (r172532): JSBase.h declares NSMapTable functions that are SPI
2625 https://bugs.webkit.org/show_bug.cgi?id=137170
2626 <rdar://problem/18477384>
2628 Reviewed by Geoffrey Garen.
2630 Add SPI wrapper header, NSMapTableSPI.h.
2632 Additionally, define convenience macro EXTERN_C that can be used to specify the C linkage
2633 convention for a declaration. For example, the declaration "EXTERN_C const int x;" will
2640 extern "C" const int x;
2642 when used in a C and C++ file, respectively.
2644 * WTF.xcodeproj/project.pbxproj:
2646 * wtf/spi/cocoa/NSMapTableSPI.h: Added.
2648 2014-09-29 Commit Queue <commit-queue@webkit.org>
2650 Unreviewed, rolling out r174045.
2651 https://bugs.webkit.org/show_bug.cgi?id=137231
2653 Introduced a crash during page loading tests on Mac (Requested
2654 by rniwa on #webkit).
2658 "Replace OSObjectPtr with RetainPtr/adoptOS"
2659 https://bugs.webkit.org/show_bug.cgi?id=137158
2660 http://trac.webkit.org/changeset/174045
2662 2014-09-26 Sam Weinig <sam@webkit.org>
2664 Replace OSObjectPtr with RetainPtr/adoptOS
2665 https://bugs.webkit.org/show_bug.cgi?id=137158
2667 Reviewed by Dan Bernstein.
2669 * WTF.xcodeproj/project.pbxproj:
2670 * wtf/OSObjectPtr.h: Removed.
2673 Added. This adopt function is slightly different than both adoptCF and adoptNS,
2674 in that unlike adoptCF(), it can be passed an Objective-C type (since OS objects
2675 are sometimes Objective-C objects, but not always), and unlike adoptNS() it doesn't
2676 require us to jump through hoops to appease GC (since OS objects are not Objective-C
2677 objects if GC is enabled).
2679 2014-09-24 Filip Pizlo <fpizlo@apple.com>
2681 FTL should sink object allocations
2682 https://bugs.webkit.org/show_bug.cgi?id=136330
2684 Reviewed by Oliver Hunt.
2686 Make it possible to reset a Bag.
2693 2014-09-25 Roger Fong <roger_fong@apple.com>
2695 [Windows] Unreviewed build fix. Ensure that python2.7 is used for Windows builds.
2697 * WTF.vcxproj/WTFGenerated.make:
2699 2014-09-25 Csaba Osztrogonác <ossy@webkit.org>
2701 Remove WinCE port from trunk
2702 https://bugs.webkit.org/show_bug.cgi?id=136951
2704 Reviewed by Alex Christensen.
2707 * wtf/Assertions.cpp:
2710 (WTF::weakCompareAndSwap):
2711 * wtf/CurrentTime.cpp:
2712 (WTF::lowResUTCTime):
2715 (WTF::getLocalTime):
2716 (WTF::calculateDSTOffset):
2717 * wtf/FastMalloc.cpp:
2718 * wtf/FeatureDefines.h:
2719 * wtf/OSAllocator.h:
2720 (WTF::OSAllocator::decommitAndRelease):
2722 * wtf/PlatformWin.cmake:
2724 (WTF::computeRAMSize):
2725 * wtf/RandomNumberSeed.h:
2726 (WTF::initializeRandomNumberGenerator):
2727 * wtf/StackBounds.cpp:
2728 (WTF::StackBounds::initialize):
2729 * wtf/StackBounds.h:
2730 (WTF::StackBounds::isGrowingDownward):
2731 * wtf/StdLibExtras.h:
2732 (wtf_bsearch): Deleted.
2733 * wtf/StringExtras.h:
2734 (strnicmp): Deleted.
2737 * wtf/ThreadSpecific.h:
2738 * wtf/ThreadingWin.cpp:
2739 (WTF::createThreadInternal):
2740 * wtf/WindowsExtras.h:
2741 (WTF::getRegistryValue):
2742 (WTF::getWindowPointer):
2743 (WTF::setWindowPointer):
2745 * wtf/text/WTFString.cpp:
2746 (WTF::String::format):
2748 2014-09-24 Geoffrey Garen <ggaren@apple.com>
2751 https://bugs.webkit.org/show_bug.cgi?id=132629
2753 Reviewed by Gavin Barraclough.
2755 64-bit only for now, just to try it out.
2757 * wtf/FastMalloc.cpp:
2759 2014-09-23 Geoffrey Garen <ggaren@apple.com>
2763 bmalloc should honor the FastMalloc statistics API
2764 https://bugs.webkit.org/show_bug.cgi?id=136592
2766 This didn't really work. Because we allow ranges with and without
2767 physical pages to merge, and we allow double-committing and
2768 double-decommitting, we can't rely on commit actions to track memory
2771 * wtf/FastMalloc.cpp:
2772 (WTF::fastMallocStatistics):
2774 2014-09-23 Joseph Pecoraro <pecoraro@apple.com>
2776 Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
2777 https://bugs.webkit.org/show_bug.cgi?id=136893
2779 Reviewed by Timothy Hatcher.
2781 Currently automatic inspection only happens in processes that have a
2782 debugger attached. That condition may change in the future, but this
2783 function can stand on its own in WTF. It may be useful in the future
2784 to perhaps continue though ASSERTs if you have a debugger attached.
2786 * wtf/Assertions.cpp:
2789 2014-09-22 Sam Weinig <sam@webkit.org>
2791 Eliminate redundant PtrHash specializations
2792 https://bugs.webkit.org/show_bug.cgi?id=136990
2794 Reviewed by Darin Adler.
2796 Now that we have IsSmartPtr, we can eliminate all the specializations
2797 of PtrHash that we had (for RefPtr, OwnPtr, RetainPtr, and std::unique_ptr)
2798 and instead just have one that uses GetPtrHelper.
2800 No changes of behavior intended.
2803 Remove unnecessary const_cast that Darin noticed.
2805 * wtf/HashFunctions.h:
2806 (WTF::PtrHash::hash): Deleted.
2807 (WTF::PtrHash::equal): Deleted.
2808 (WTF::PtrHash<RefPtr<P>>::hash): Deleted.
2809 (WTF::PtrHash<RefPtr<P>>::equal): Deleted.
2810 Specialize PtrHash based on whether the type is a smart pointer, and use GetPtrHelper
2811 to implement the smart pointer specialized variant.
2814 Remove include of GetPtr.h that is now included by HashFunctions.h
2817 (WTF::PtrHash<OwnPtr<P>>::hash): Deleted.
2818 (WTF::PtrHash<OwnPtr<P>>::equal): Deleted.
2819 Remove unnecessary specialization of PtrHash.
2822 (WTF::PtrHash<RetainPtr<P>>::hash): Deleted.
2823 (WTF::PtrHash<RetainPtr<P>>::equal): Deleted.
2824 Specialize IsSmartPointer for RetainPtr and remove the then unnecessary specialization of PtrHash.
2825 (This is already tested in the API test WTF/cf/RetainPtrHashing).
2827 2014-09-20 Sam Weinig <sam@webkit.org>
2829 Make possible HashSet<std::unique_ptr<>>
2830 https://bugs.webkit.org/show_bug.cgi?id=136166
2832 Reviewed by Darin Adler.
2836 (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr):
2837 Make specializing GetPtrHelper a bit cleaner (you don't have to put
2838 IsSmartPtr<T>::value everywhere any more) and add specializations for
2841 * wtf/HashFunctions.h:
2842 (WTF::PtrHash<std::unique_ptr<P>>):
2843 Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash
2848 Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that
2849 take the raw pointer type as the parameter. These use SFINAE to make themselves only available
2850 when the IsSmartPtr<KeyType>::value is true.
2853 Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization
2854 since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue
2855 and function named isHashTableDeletedValue().
2858 (WTF::OwnPtr::OwnPtr):
2859 (WTF::OwnPtr::isHashTableDeletedValue):
2860 (WTF::OwnPtr::hashTableDeletedValue):
2861 Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue()
2862 hash traits to work.
2864 (WTF::PtrHash<OwnPtr<P>>::hash):
2865 (WTF::PtrHash<OwnPtr<P>>::equal):
2866 Add specialization for PtrHash for OwnPtr and set it as the DefaultHash
2870 Update for the less verbose GetPtrHelper specialization.
2872 2014-09-19 Chris Dumez <cdumez@apple.com>
2874 Allow DOM methods to return references instead of pointers
2875 https://bugs.webkit.org/show_bug.cgi?id=136931
2877 Add support for having WTF::getPtr() transform reference arguments
2878 into raw pointers so that DOM methods can now return references when
2879 appropriate and so that the generated bindings code can handle this
2882 This patch had to alter the way getPtr() was overloaded for smart
2883 pointer types so that we don't call &p on smart pointers but p.get().
2884 This was needed because the new WTF::getPtr(T&) was being called for
2885 RefPtr<T> arguments instead of the getPtr(const RefPtr<T>&) overload.
2886 This was addressed using traits and template specialization to
2887 distinguish WTF smart pointers from other types.
2889 Reviewed by Sam Weinig.
2894 (WTF::getPtr): Deleted.
2896 (WTF::getPtr): Deleted.
2898 (WTF::getPtr): Deleted.
2901 (WTF::getPtr): Deleted.
2902 * wtf/gobject/GRefPtr.h:
2903 (WTF::getPtr): Deleted.
2905 2014-09-19 Daniel Bates <dabates@apple.com>
2907 Always assume internal SDK when building configuration Production
2908 https://bugs.webkit.org/show_bug.cgi?id=136925
2909 <rdar://problem/18362399>
2911 Reviewed by Dan Bernstein.
2913 * Configurations/Base.xcconfig:
2915 2014-09-19 Diego Pino Garcia <dpino@igalia.com>
2917 Simple ES6 feature:String prototype additions
2918 https://bugs.webkit.org/show_bug.cgi?id=131704
2920 Reviewed by Darin Adler.
2922 * wtf/text/StringImpl.cpp:
2923 (WTF::StringImpl::find):
2924 (WTF::equalInner): Added.
2925 (WTF::StringImpl::startsWith): Add implementation that supports
2926 'startOffset' parameter.
2927 (WTF::StringImpl::endsWith): Add implementation that supports
2928 'endOffset' parameter.
2929 * wtf/text/StringImpl.h:
2930 * wtf/text/WTFString.h:
2931 (WTF::String::contains): Modify current implementation to allow
2932 setting a startOffset, 0 by default.
2933 (WTF::String::startsWith):
2934 (WTF::String::endsWith):
2936 2014-09-18 Carlos Garcia Campos <cgarcia@igalia.com>
2938 [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
2939 https://bugs.webkit.org/show_bug.cgi?id=136923
2941 Reviewed by Gustavo Noronha Silva.
2943 We have several asserts to ensure that delete-on-destroy sources
2944 are not misused, like not scheduling socket sources on a
2945 delete-on-destroy GMainLoopSource or not allowing to cancel them
2946 before they have been dispatched. It's better to ensure all those
2947 things at compile time, using static methods to schedule sources
2948 creating a delete-on-destroy GMainLoopSource that is not returned
2951 * wtf/gobject/GMainLoopSource.cpp:
2952 (WTF::GMainLoopSource::create): Private static method to create a
2953 delete-on-destroy GMainLoopSource.
2954 (WTF::GMainLoopSource::cancelWithoutLocking): Return early in case
2955 of delete-on-destroy source, since they can't be cancelled.
2956 (WTF::GMainLoopSource::schedule): Remove assertion to ensure
2957 socket sources are not scheduled on a delete-on-destroy GMainLoopSource.
2958 (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy):
2959 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy):
2960 (WTF::GMainLoopSource::createAndDeleteOnDestroy): Deleted.
2961 * wtf/gobject/GMainLoopSource.h:
2962 * wtf/gtk/MainThreadGtk.cpp:
2963 (WTF::scheduleDispatchFunctionsOnMainThread): Use GMainLoopSource::scheduleAndDeleteOnDestroy()
2964 * wtf/gtk/RunLoopGtk.cpp:
2965 (WTF::RunLoop::wakeUp): Ditto.
2967 2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
2969 Unreviewed rollout r173731. Broke multiple builds.
2971 * wtf/Assertions.cpp:
2974 2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
2976 Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
2977 https://bugs.webkit.org/show_bug.cgi?id=136893
2979 Reviewed by Timothy Hatcher.
2981 Currently automatic inspection only happens in processes that have a
2982 debugger attached. That condition may change in the future, but this
2983 function can stand on its own in WTF. It may be useful in the future
2984 to perhaps continue though ASSERTs if you have a debugger attached.
2986 * wtf/Assertions.cpp:
2989 2014-09-18 Zan Dobersek <zdobersek@igalia.com>
2991 GMainLoopSource is exposed to race conditions
2992 https://bugs.webkit.org/show_bug.cgi?id=135800
2994 Reviewed by Carlos Garcia Campos.
2996 GMainLoopSource objects can be dispatching tasks on one thread
2997 while having a new task scheduled on a different thread. This
2998 can for instance occur in WebKitVideoSink, where the timeout
2999 callback can be called on main thread while at the same time
3000 it is being rescheduled on a different thread (created through
3003 The initial solution is to use GMutex to prevent parallel data
3004 access from different threads. In the future I plan to look at
3005 the possibility of creating thread-specific GMainLoopSource
3006 objects that wouldn't require the use of GMutex.
3008 GSource, GCancellable and std::function<> objects are now packed
3009 into an internal Context structure. Using the C++11 move semantics
3010 it's simple to, at the time of dispatch, move the current context
3011 out of the GMainLoopSource object in case the dispatch causes a
3012 rescheduling on that same object.
3014 Also added in the Context struct is a new GCancellable. The pointer
3015 of that object is shared with the GMainLoopSource before the Context
3016 is moved out for the callback dispatch. This makes it safe to cancel
3017 or even delete the GMainLoopSource during the dispatch and prevents
3018 use-after-delete on GMainLoopSource once the dispatch is done in
3019 the GMainLoopSource::*Callback() methods.
3021 All the schedule*() methods and the cancelWithoutLocking() method
3022 callers now lock the GMutex to ensure no one else is accessing the
3023 data at that moment. Similar goes for the dispatch methods, but those
3024 do the dispatch and possible destruction duties with the mutex unlocked.
3025 The dispatch can cause rescheduling on the same GMainLoopSource object,
3026 which must not be done with a locked mutex.
3028 * wtf/gobject/GMainLoopSource.cpp:
3029 (WTF::GMainLoopSource::GMainLoopSource):
3030 (WTF::GMainLoopSource::~GMainLoopSource):
3031 (WTF::GMainLoopSource::cancel):
3032 (WTF::GMainLoopSource::cancelWithoutLocking):
3033 (WTF::GMainLoopSource::scheduleIdleSource):
3034 (WTF::GMainLoopSource::schedule):
3035 (WTF::GMainLoopSource::scheduleTimeoutSource):
3036 (WTF::GMainLoopSource::scheduleAfterDelay):
3037 (WTF::GMainLoopSource::voidCallback):
3038 (WTF::GMainLoopSource::boolCallback):
3039 (WTF::GMainLoopSource::socketCallback):
3040 (WTF::GMainLoopSource::socketSourceCallback):
3041 (WTF::GMainLoopSource::Context::destroySource):
3042 (WTF::GMainLoopSource::reset): Deleted.
3043 (WTF::GMainLoopSource::destroy): Deleted.
3044 * wtf/gobject/GMainLoopSource.h:
3046 2014-09-17 Daniel Bates <dabates@apple.com>
3048 Unreviewed, rolling out r173695.
3050 Broke building third-party Legacy WebKit apps; will
3055 "[iOS] Make WebCore build with public iOS SDK"
3056 https://bugs.webkit.org/show_bug.cgi?id=136487
3057 http://trac.webkit.org/changeset/173695
3059 2014-09-17 Benjamin Poulain <bpoulain@apple.com>
3061 CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
3062 https://bugs.webkit.org/show_bug.cgi?id=136807
3064 Reviewed by Antti Koivisto.
3066 * wtf/text/AtomicString.h:
3067 (WTF::AtomicString::find):
3069 2014-09-17 Daniel Bates <dabates@apple.com>
3071 [iOS] Make WebCore build with public iOS SDK
3072 https://bugs.webkit.org/show_bug.cgi?id=136487
3074 Reviewed by David Kilzer.
3076 Define convenience macro EXTERN_C that can be used to specify the C linkage convention
3077 for a declaration. For example, the declaration "EXTERN_C const int x;" will expand to:
3083 extern "C" const int x;
3085 when used in a C and C++ file, respectively.
3089 2014-09-16 Filip Pizlo <fpizlo@apple.com>
3091 Unreviewed, disable native inlining because it causes build failures.
3095 2014-09-15 Jer Noble <jer.noble@apple.com>
3097 [Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
3098 https://bugs.webkit.org/show_bug.cgi?id=135042
3100 Reviewed by Eric Carlson.
3102 * wtf/Platform.h: Add WTF_USE_MEDIATOOLBOX.
3104 2014-09-15 peavo@outlook.com <peavo@outlook.com>
3106 [WinCairo] Make it easier to enable/disable GStreamer.
3107 https://bugs.webkit.org/show_bug.cgi?id=135766
3109 Reviewed by Brent Fulgham.
3111 Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.
3113 * WTF.vcxproj/WTFDebugWinCairo.props: Import GStreamer property file.
3114 * WTF.vcxproj/WTFReleaseWinCairo.props: Ditto.
3115 * wtf/Platform.h: Enable GStreamer if ENABLE(GSTREAMER_WINCAIRO) is true, otherwise use Media Foundation.
3117 2014-09-10 Jon Honeycutt <jhoneycutt@apple.com>
3119 Re-add the request autocomplete feature
3121 <https://bugs.webkit.org/show_bug.cgi?id=136730>
3123 This feature was rolled out in r148731 because it was only used by
3124 Chromium. As we consider supporting this feature, roll it back in, but
3127 This rolls out r148731 (which removed the feature) with small changes
3128 needed to make the code build in ToT, to make the tests run, and to
3131 Reviewed by Andy Estes.
3133 * wtf/FeatureDefines.h:
3135 2014-09-12 Tim Horton <timothy_horton@apple.com>
3137 Swiping back from a Twitter image to Twitter flashes to the wrong position
3138 https://bugs.webkit.org/show_bug.cgi?id=136798
3139 <rdar://problem/18324338>
3141 Reviewed by Darin Adler and Sam Weinig.
3144 (WTF::RunLoop::TimerBase::startRepeating):
3145 Add a std::chrono veresion of RunLoop::TimerBase::startRepeating.
3147 2014-09-12 Geoffrey Garen <ggaren@apple.com>
3151 It broke the Membuster performance bot, and it's still slightly profligate
3155 https://bugs.webkit.org/show_bug.cgi?id=132629
3157 * wtf/FastMalloc.cpp:
3159 2014-09-11 Geoffrey Garen <ggaren@apple.com>
3162 https://bugs.webkit.org/show_bug.cgi?id=132629
3164 Reviewed by Michael Saboff.
3166 64-bit only for now, just to try it out.
3168 * wtf/FastMalloc.cpp:
3170 2014-09-09 Benjamin Poulain <bpoulain@apple.com>
3172 Disable the "unreachable-code" warning
3173 https://bugs.webkit.org/show_bug.cgi?id=136677
3175 Reviewed by Darin Adler.
3177 The warning causes various build errors depending on which Clang you are using.
3179 For example, with recent clangs, it breaks all the ARCHS dependent code like this:
3180 if (sizeof(uintptr_t) == 4)
3181 // Something for 32 bits.
3183 // Somethign for 64 bits.
3185 * Configurations/Base.xcconfig:
3187 2014-09-07 Filip Pizlo <fpizlo@apple.com>
3189 DFG should have a reusable SSA builder
3190 https://bugs.webkit.org/show_bug.cgi?id=136331
3192 Reviewed by Oliver Hunt.
3194 Update the alloc() method to use variadic templates. This makes it more natural to use.
3196 * wtf/SegmentedVector.h:
3197 (WTF::SegmentedVector::alloc):
3199 2014-09-08 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
3202 https://bugs.webkit.org/show_bug.cgi?id=136571
3204 Reviewed by Darin Adler.
3206 * wtf/FeatureDefines.h:
3208 2014-09-08 Dan Bernstein <mitz@apple.com>
3210 HAVE(VOUCHERS) is not available outside of WebKit2
3211 https://bugs.webkit.org/show_bug.cgi?id=136637
3213 Reviewed by Tim Horton.
3215 * wtf/Platform.h: Moved the definition of HAVE_VOUCHERS from WebKit2’s config.h here.
3217 2014-09-08 Tim Horton <timothy_horton@apple.com>
3219 Try to fix the build after r173383, part 2.
3221 * wtf/OSObjectPtr.h:
3223 2014-09-08 Tim Horton <timothy_horton@apple.com>
3225 Try to fix the build after r173383.
3227 * wtf/OSObjectPtr.h:
3229 2014-09-07 Sam Weinig <sam@webkit.org>
3231 Make OSObjectPtr a bit more like RefPtr
3232 https://bugs.webkit.org/show_bug.cgi?id=136613
3234 Reviewed by Darin Adler.
3236 Address some of Darin's feedback by:
3237 - Making the adopting constructor private and friending adoptOSObject().
3238 - Implementing the assignment operator using swap.
3239 - Adding a move assignment operator.
3241 * wtf/OSObjectPtr.h:
3242 (WTF::OSObjectPtr::operator=):
3243 (WTF::OSObjectPtr::swap):
3244 (WTF::OSObjectPtr::OSObjectPtr):
3246 2014-09-08 Jessie Berlin <jberlin@apple.com>
3248 More build fixes after r173374.
3250 * wtf/dtoa/strtod.cc:
3252 2014-09-08 Jessie Berlin <jberlin@apple.com>
3254 Build fix after r173374.
3256 * wtf/dtoa/strtod.cc:
3258 2014-09-08 Jessie Berlin <jberlin@apple.com>
3260 Speculative build fix after r173364.
3262 * wtf/dtoa/strtod.cc:
3264 2014-09-07 Maciej Stachowiak <mjs@apple.com>
3266 Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it
3267 https://bugs.webkit.org/show_bug.cgi?id=136616
3269 Reviewed by Darin Adler.
3271 * wtf/Compiler.h: Define the quirk for all compilers but clang.
3273 2014-09-06 Sam Weinig <sam@webkit.org>
3275 XPCPtr should be converted into an all purpose smart pointer for os_objects
3276 https://bugs.webkit.org/show_bug.cgi?id=136602
3278 Reviewed by Darin Adler.
3280 * WTF.xcodeproj/project.pbxproj:
3281 * wtf/OSObjectPtr.h: Copied from Source/WebKit2/Platform/IPC/mac/XPCPtr.h.
3282 (WTF::retainOSObject):
3283 (WTF::releaseOSObject):
3284 (WTF::OSObjectPtr::OSObjectPtr):
3285 (WTF::OSObjectPtr::~OSObjectPtr):
3286 (WTF::OSObjectPtr::operator=):
3287 (WTF::adoptOSObject):
3288 (IPC::XPCPtr::XPCPtr): Deleted.
3289 (IPC::XPCPtr::~XPCPtr): Deleted.
3290 (IPC::XPCPtr::operator=): Deleted.
3291 (IPC::adoptXPC): Deleted.
3292 Rename/move XPCPtr to OSObjectPtr and make it work with any os_object.
3294 2014-09-06 Darin Adler <darin@apple.com>
3296 Make updates suggested by new version of Xcode
3297 https://bugs.webkit.org/show_bug.cgi?id=136603
3299 Reviewed by Mark Rowe.
3301 * Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE,
3302 COMBINE_HIDPI_IMAGES, and ENABLE_STRICT_OBJC_MSGSEND as suggested by
3303 Xcode upgrade check.
3305 * WTF.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
3307 2014-09-05 Geoffrey Garen <ggaren@apple.com>
3309 bmalloc should honor the FastMalloc statistics API
3310 https://bugs.webkit.org/show_bug.cgi?id=136592
3312 Reviewed by Gavin Barraclough.
3314 * wtf/FastMalloc.cpp:
3315 (WTF::fastMallocStatistics):
3317 2014-09-05 Geoffrey Garen <ggaren@apple.com>
3319 bmalloc should honor the FastMalloc scavenging API
3320 https://bugs.webkit.org/show_bug.cgi?id=136588
3322 Reviewed by Andreas Kling.
3324 * wtf/FastMalloc.cpp:
3325 (WTF::releaseFastMallocFreeMemory):
3327 2014-09-05 Geoffrey Garen <ggaren@apple.com>
3329 Rolled out <http://trac.webkit.org/changeset/173313>.
3331 It seems to have broken the PLT bot.
3334 https://bugs.webkit.org/show_bug.cgi?id=132629
3336 * wtf/FastMalloc.cpp:
3338 2014-06-06 Jer Noble <jer.noble@apple.com>
3340 Refactoring: make MediaTime the primary time type for audiovisual times.
3341 https://bugs.webkit.org/show_bug.cgi?id=133579
3343 Reviewed by Eric Carlson.
3345 Add a unary minus operator, and add unimplemented private casting operators, to make
3346 unintentional double->MediaTime and MediaTime->double casts hard errors.
3348 * wtf/MediaTime.cpp:
3349 (WTF::MediaTime::operator-):
3352 2014-09-04 Geoffrey Garen <ggaren@apple.com>
3355 https://bugs.webkit.org/show_bug.cgi?id=132629
3357 Reviewed by Michael Saboff.
3359 64-bit only for now, just to try it out.
3361 * wtf/FastMalloc.cpp:
3363 2014-09-05 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
3365 Enable GenGC on ARM Traditional
3366 https://bugs.webkit.org/show_bug.cgi?id=136567
3368 Reviewed by Csaba Osztrogonác.
3372 2014-09-04 Filip Pizlo <fpizlo@apple.com>
3374 Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
3375 https://bugs.webkit.org/show_bug.cgi?id=136520
3377 Fix bug found in Geoff's review but not landed in previous commit.
3379 * wtf/BitVector.cpp:
3380 (WTF::BitVector::equalsSlowCaseFast): return true.
3382 2014-09-03 Filip Pizlo <fpizlo@apple.com>
3384 Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
3385 https://bugs.webkit.org/show_bug.cgi?id=136520
3387 Reviewed by Geoffrey Garen.
3389 Give BitVector a way to quickly find the next set (or unset) bit. Make BitVector equality
3390 faster. Fix a minor closure goof in Spectrum.
3392 * wtf/BitVector.cpp:
3393 (WTF::BitVector::equalsSlowCase):
3394 (WTF::BitVector::equalsSlowCaseFast):
3395 (WTF::BitVector::equalsSlowCaseSimple):
3397 (WTF::BitVector::findBit):
3398 (WTF::BitVector::findBitFast):
3399 (WTF::BitVector::findBitSimple):
3400 (WTF::BitVector::findBitInWord):
3402 (WTF::Spectrum::removeIf):
3404 2014-09-04 Anders Carlsson <andersca@apple.com>
3406 Make hash table classes final
3407 https://bugs.webkit.org/show_bug.cgi?id=136540
3409 Reviewed by Antti Koivisto.
3411 We don't want anybody inheriting from these classes, so make them final.
3413 * wtf/HashCountedSet.h:
3417 2014-09-04 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
3419 Remove CSS_FILTERS flag
3420 https://bugs.webkit.org/show_bug.cgi?id=136529
3422 Reviewed by Dirk Schulze.
3424 * wtf/FeatureDefines.h:
3426 2014-09-04 Commit Queue <commit-queue@webkit.org>
3428 Unreviewed, rolling out r173201.
3429 https://bugs.webkit.org/show_bug.cgi?id=136538
3431 Improves the situation but also introduces additional crashes.
3432 (Requested by zdobersek on #webkit).
3436 "GMainLoopSource is exposed to race conditions"
3437 https://bugs.webkit.org/show_bug.cgi?id=135800
3438 http://trac.webkit.org/changeset/173201
3440 2014-09-04 Pratik Solanki <psolanki@apple.com>
3442 Remove iOS specific disk image cache
3443 https://bugs.webkit.org/show_bug.cgi?id=136517
3445 Reviewed by Antti Koivisto.
3447 Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
3448 this now since we don't enable it in WebKit2 on iOS.
3450 * wtf/FeatureDefines.h:
3452 2014-09-03 Dan Bernstein <mitz@apple.com>
3454 Get rid of HIGH_DPI_CANVAS leftovers
3455 https://bugs.webkit.org/show_bug.cgi?id=136491
3457 Reviewed by Benjamin Poulain.
3459 * wtf/FeatureDefines.h: Removed definition of ENABLE_HIGH_DPI_CANVAS.
3461 2014-09-03 Zan Dobersek <zdobersek@igalia.com>
3463 GMainLoopSource is exposed to race conditions
3464 https://bugs.webkit.org/show_bug.cgi?id=135800
3466 Reviewed by Carlos Garcia Campos.
3468 GMainLoopSource objects can be dispatching tasks on one thread
3469 while having a new task scheduled on a different thread. This
3470 can for instance occur in WebKitVideoSink, where the timeout
3471 callback can be called on main thread while at the same time
3472 it is being rescheduled on a different thread (created through
3475 The initial solution is to use GMutex to prevent parallel data
3476 access from different threads. In the future I plan to add better
3477 assertions, some meaningful comments and look at the possibility
3478 of creating thread-specific GMainLoopSource objects that wouldn't
3479 require the use of GMutex.
3481 GSource, GCancellable and std::function<> objects are now packed
3482 into an internal Context structure. Using the C++11 move semantics
3483 it's simple to, at the time of dispatch, move the current context
3484 out of the GMainLoopSource object in case the dispatch causes a
3485 rescheduling on that same object.
3487 All the schedule*() methods and the cancelInternal() method callers
3488 now lock the GMutex to ensure no one else is accessing the data at
3489 that moment. Similar goes for the dispatch methods, but those do
3490 the dispatch and possible destruction duties with the mutex unlocked.
3491 The dispatch can cause rescheduling on the same GMainLoopSource object,
3492 which must not be done with a locked mutex.
3494 * wtf/gobject/GMainLoopSource.cpp:
3495 (WTF::GMainLoopSource::GMainLoopSource):
3496 (WTF::GMainLoopSource::~GMainLoopSource):
3497 (WTF::GMainLoopSource::cancel):
3498 (WTF::GMainLoopSource::cancelInternal):
3499 (WTF::GMainLoopSource::scheduleIdleSource):
3500 (WTF::GMainLoopSource::schedule):
3501 (WTF::GMainLoopSource::scheduleTimeoutSource):
3502 (WTF::GMainLoopSource::scheduleAfterDelay):
3503 (WTF::GMainLoopSource::voidCallback):
3504 (WTF::GMainLoopSource::boolCallback):
3505 (WTF::GMainLoopSource::socketCallback):
3506 (WTF::GMainLoopSource::destroy):
3507 (WTF::GMainLoopSource::reset): Deleted.
3508 * wtf/gobject/GMainLoopSource.h:
3510 2014-09-02 Daniel Bates <dabates@apple.com>
3512 [iOS] Support using Foundation networking code
3513 https://bugs.webkit.org/show_bug.cgi?id=136467
3515 Reviewed by Pratik Solanki.
3517 Disable USE(CFNETWORK) and use the Foundation networking code by default when building
3518 iOS WebKit without the Apple Internal SDK.
3522 2014-08-26 Maciej Stachowiak <mjs@apple.com>
3524 Use RetainPtr::autorelease in some places where it seems appropriate
3525 https://bugs.webkit.org/show_bug.cgi?id=136280
3527 Reviewed by Darin Adler.
3529 * wtf/text/mac/StringImplMac.mm:
3530 (WTF::StringImpl::operator NSString *): Use autorelease() instead of
3531 CFBridgingRelease(leakRef())
3533 2014-08-29 Joseph Pecoraro <pecoraro@apple.com>
3535 JavaScriptCore: Use ASCIILiteral where possible
3536 https://bugs.webkit.org/show_bug.cgi?id=136179
3538 Reviewed by Michael Saboff.
3540 * wtf/text/WTFString.cpp:
3543 2014-08-27 Filip Pizlo <fpizlo@apple.com>
3545 DFG should compute immediate dominators using the O(n log n) form of Lengauer and Tarjan's "A Fast Algorithm for Finding Dominators in a Flowgraph"
3546 https://bugs.webkit.org/show_bug.cgi?id=93361
3548 Reviewed by Mark Hahnenberg.
3550 Make BitVector operations return the previous value of the bit you're changing. This is
3551 useful for the kinds of set operations that are commonplace in compiler graph searches.
3554 (WTF::BitVector::quickSet):
3555 (WTF::BitVector::quickClear):
3556 (WTF::BitVector::set):
3557 (WTF::BitVector::ensureSizeAndSet):
3558 (WTF::BitVector::clear):
3560 2014-08-27 Filip Pizlo <fpizlo@apple.com>
3562 FTL should be able to do polymorphic call inlining
3563 https://bugs.webkit.org/show_bug.cgi?id=135145
3565 Reviewed by Geoffrey Garen.
3567 Add some power that I need for call edge profiling.
3570 (WTF::OwnPtr<T>::createTransactionally):
3572 (WTF::Spectrum::add):
3573 (WTF::Spectrum::addAll):
3574 (WTF::Spectrum::get):
3575 (WTF::Spectrum::size):
3576 (WTF::Spectrum::KeyAndCount::KeyAndCount):
3577 (WTF::Spectrum::clear):
3578 (WTF::Spectrum::removeIf):
3580 2014-08-27 Nico Weber <thakis@chromium.org>
3582 Delete a MSVS2010 workaround.
3583 https://bugs.webkit.org/show_bug.cgi?id=136321
3585 Reviewed by Benjamin Poulain.
3587 Ports https://codereview.chromium.org/512923004/ by the talented
3588 Nico Weber from Blink. No intended behavior change.
3593 2014-08-27 Mark Rowe <mrowe@apple.com>
3595 JavaScriptCore is missing debug info for WTF because libWTF.a is stripped.
3596 <https://webkit.org/b/136320> / <rdar://problem/18148776>
3598 Reviewed by Dan Bernstein.
3600 * Configurations/WTF.xcconfig: Set STRIP_INSTALLED_PRODUCT = NO for the target
3601 that produces libWTF.a so that the debug symbols will be linked into JavaScriptCore
3602 and end up in its dSYM file.
3604 2014-08-26 Commit Queue <commit-queue@webkit.org>
3606 Unreviewed, rolling out r172940.
3607 https://bugs.webkit.org/show_bug.cgi?id=136256
3609 Caused assertions on fast/storage/serialized-script-
3610 value.html, and possibly flakiness on more tests (Requested by
3615 "FTL should be able to do polymorphic call inlining"
3616 https://bugs.webkit.org/show_bug.cgi?id=135145
3617 http://trac.webkit.org/changeset/172940
3619 2014-08-23 Filip Pizlo <fpizlo@apple.com>
3621 FTL should be able to do polymorphic call inlining
3622 https://bugs.webkit.org/show_bug.cgi?id=135145
3624 Reviewed by Geoffrey Garen.
3626 Add some power that I need for call edge profiling.
3629 (WTF::OwnPtr<T>::createTransactionally):
3631 (WTF::Spectrum::add):
3632 (WTF::Spectrum::addAll):
3633 (WTF::Spectrum::get):
3634 (WTF::Spectrum::size):
3635 (WTF::Spectrum::KeyAndCount::KeyAndCount):
3636 (WTF::Spectrum::clear):
3637 (WTF::Spectrum::removeIf):
3639 2014-08-25 Tomas Popela <tpopela@redhat.com>
3641 Add support for little-endian PowerPC64
3642 https://bugs.webkit.org/show_bug.cgi?id=135647
3644 Reviewed by Oliver Hunt.
3649 2014-08-24 Zan Dobersek <zdobersek@igalia.com>
3651 GenericHashTraits::peek() is producing copies of passed-in temporary values
3652 https://bugs.webkit.org/show_bug.cgi?id=131461
3654 Reviewed by Darin Adler.
3657 (WTF::GenericHashTraits::peek): Make this method a template that passes through
3658 the passed-in value without copying, achieved by using universal references and
3661 2014-08-22 Daniel Bates <dabates@apple.com>
3663 [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
3664 and ENABLE_XSLT when building with the iOS public SDK
3665 https://bugs.webkit.org/show_bug.cgi?id=135945
3667 Reviewed by Andy Estes.
3669 * wtf/FeatureDefines.h:
3671 2014-08-22 Akos Kiss <akiss@inf.u-szeged.hu>
3673 Enable fixed executable allocator for any ARM64 target.
3674 https://bugs.webkit.org/show_bug.cgi?id=136162
3676 Reviewed by Michael Saboff.
3678 The ARM64 macro assembler relies on near calls being implemented by BL
3679 instructions, which have only 128MB offset range from PC. The
3680 on-demand executable allocator cannot ensure that any two locations in
3681 memory allocated for the JIT-compiled code are within this range.
3682 However, the fixed executable allocator has a fixed 16MB memory pool for
3686 Define ENABLE_EXECUTABLE_ALLOCATOR_FIXED if CPU(ARM64), and update
3689 2014-08-22 Commit Queue <commit-queue@webkit.org>
3691 Unreviewed, rolling out r172844.
3692 https://bugs.webkit.org/show_bug.cgi?id=136164
3694 re-applying WEBCORE_EXPORTS patch (Requested by
3695 alexchristensen on #webkit).
3699 "Revert r172831, it broke the Windows build."
3700 http://trac.webkit.org/changeset/172844
3702 2014-08-22 Jon Lee <jonlee@apple.com>
3704 Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
3705 https://bugs.webkit.org/show_bug.cgi?id=136157
3707 Reviewed by Simon Fraser.
3709 * wtf/FeatureDefines.h: Remove ENABLE(RUBBER_BANDING) logic for Mac platform.
3711 2014-08-21 Tim Horton <timothy_horton@apple.com>
3713 Revert r172831, it broke the Windows build.
3715 * wtf/ExportMacros.h:
3717 2014-08-21 Zalan Bujtas <zalan@apple.com>
3719 Enable SATURATED_LAYOUT_ARITHMETIC.
3720 https://bugs.webkit.org/show_bug.cgi?id=136106
3722 Reviewed by Simon Fraser.
3724 SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
3725 (No measurable performance regression on Mac.)
3727 * wtf/FeatureDefines.h:
3729 2014-08-21 Alex Christensen <achristensen@webkit.org>
3731 More WEBCORE_EXPORT macros.
3732 https://bugs.webkit.org/show_bug.cgi?id=136129
3734 Reviewed by Tim Horton.
3736 * wtf/ExportMacros.h:
3737 Removed WTF_TESTING which isn't used.
3739 2014-08-20 Akos Kiss <akiss@inf.u-szeged.hu>
3741 Enable ARM64 disassembler on EFL
3742 https://bugs.webkit.org/show_bug.cgi?id=136089
3744 Reviewed by Filip Pizlo.
3747 Enable WTF_USE_ARM64_DISASSEMBLER for EFL as well.
3749 2014-08-19 Pratik Solanki <psolanki@apple.com>
3751 Remove PurgeableBuffer since it is not very useful any more
3752 https://bugs.webkit.org/show_bug.cgi?id=135939
3754 Reviewed by Andreas Kling.
3756 * wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
3757 * wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
3759 2014-08-19 Magnus Granberg <zorry@gentoo.org>
3761 TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
3762 https://bugs.webkit.org/show_bug.cgi?id=70610
3764 Reviewed by Darin Adler.
3766 Add PLT if we're building with PIC.
3770 2014-08-19 Zalan Bujtas <zalan@apple.com>
3772 Remove ENABLE(SUBPIXEL_LAYOUT).
3773 https://bugs.webkit.org/show_bug.cgi?id=136077
3775 Reviewed by Simon Fraser.
3777 Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
3779 * wtf/FeatureDefines.h:
3781 2014-08-18 Maciej Stachowiak <mjs@apple.com>
3783 Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
3784 https://bugs.webkit.org/show_bug.cgi?id=136035
3786 Reviewed by Dan Bernstein.
3788 * wtf/Platform.h: Define USE(APPLE_INTERNAL_SDK) by default on platforms that have it.
3790 2014-08-18 Commit Queue <commit-queue@webkit.org>
3792 Unreviewed, rolling out r172736.
3793 https://bugs.webkit.org/show_bug.cgi?id=136060
3795 Caused 14% PLT regressions (Requested by rniwa on #webkit).
3799 "Remove PurgeableBuffer since it is not very useful any more"
3800 https://bugs.webkit.org/show_bug.cgi?id=135939
3801 http://trac.webkit.org/changeset/172736
3803 2014-08-18 Pratik Solanki <psolanki@apple.com>
3805 Remove PurgeableBuffer since it is not very useful any more
3806 https://bugs.webkit.org/show_bug.cgi?id=135939
3808 Reviewed by Geoffrey Garen.
3810 * wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
3811 * wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
3813 2014-08-14 Benjamin Poulain <benjamin@webkit.org>
3815 CSS JIT: compile the :empty pseudo class
3816 https://bugs.webkit.org/show_bug.cgi?id=135958
3818 Reviewed by Andreas Kling.
3820 * wtf/text/StringImpl.h:
3821 (WTF::StringImpl::lengthMemoryOffset):
3823 2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
3825 Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is applied to them
3826 https://bugs.webkit.org/show_bug.cgi?id=135756
3828 Reviewed by Darin Adler.
3830 Add a method to StringView which passes through contains() to find().
3832 * wtf/text/StringView.h:
3833 (WTF::StringView::contains):
3835 2014-08-12 Pratik Solanki <psolanki@apple.com>
3837 Enable didReceiveDataArray callback on Mac
3838 https://bugs.webkit.org/show_bug.cgi?id=135554
3839 <rdar://problem/9170731>
3841 Reviewed by Andreas Kling.
3843 Enable WTF_USE_NETWORK_CFDATA_ARRAY_CALLBACK for all Cocoa platforms so that we use the same
3844 code path for Mac and iOS.
3848 2014-08-12 Alex Christensen <achristensen@webkit.org>
3850 Generate header detection headers for CMake on Windows.
3851 https://bugs.webkit.org/show_bug.cgi?id=135807
3853 Reviewed by Brent Fulgham.
3855 * wtf/CMakeLists.txt:
3856 * wtf/PlatformWin.cmake:
3857 Generate and include a stub WTFHeaderDetection.h.
3859 2014-08-11 Andy Estes <aestes@apple.com>
3861 [iOS] Get rid of iOS.xcconfig
3862 https://bugs.webkit.org/show_bug.cgi?id=135809
3864 Reviewed by Joseph Pecoraro.
3866 All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
3868 * Configurations/Base.xcconfig:
3869 * Configurations/iOS.xcconfig: Removed.
3870 * WTF.xcodeproj/project.pbxproj:
3872 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
3874 Clean up GMutexLocker
3875 https://bugs.webkit.org/show_bug.cgi?id=135833
3877 Reviewed by Carlos Garcia Campos.
3879 Place the GMutexLocker into the WTF namespace. There's no need for this
3880 class to use FastMalloc since it's always allocated on the stack. The
3881 constructor and class now operate on a GMutex reference. There's little
3882 need for an additional inline specifier for methods defined in the header.
3883 The mutex() method is removed as it was not used. m_val is renamed to a
3884 more descriptive m_locked and is made a boolean.
3886 * wtf/gobject/GMutexLocker.h:
3887 (WTF::GMutexLocker::GMutexLocker):
3888 (WTF::GMutexLocker::~GMutexLocker):
3889 (WTF::GMutexLocker::lock):
3890 (WTF::GMutexLocker::unlock):
3891 (WebCore::GMutexLocker::GMutexLocker): Deleted.
3892 (WebCore::GMutexLocker::~GMutexLocker): Deleted.
3893 (WebCore::GMutexLocker::lock): Deleted.
3894 (WebCore::GMutexLocker::unlock): Deleted.
3895 (WebCore::GMutexLocker::mutex): Deleted.
3897 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
3899 Make GRefPtr move-able
3900 https://bugs.webkit.org/show_bug.cgi?id=135801
3902 Reviewed by Carlos Garcia Campos.
3904 Add move constructor and move assignment operator for GRefPtr.
3906 * wtf/gobject/GRefPtr.h:
3907 (WTF::GRefPtr::GRefPtr):
3910 2014-08-10 Benjamin Poulain <benjamin@webkit.org>
3912 Update HashTable's operator= after r172167 per review comments
3915 Update the type as suggested by Darin.
3917 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
3919 Get rid of SCRIPTED_SPEECH
3920 https://bugs.webkit.org/show_bug.cgi?id=135729
3922 Reviewed by Brent Fulgham.
3924 * wtf/FeatureDefines.h:
3926 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
3928 Get rid of INPUT_SPEECH
3929 https://bugs.webkit.org/show_bug.cgi?id=135672
3931 Reviewed by Andreas Kling.
3933 * wtf/FeatureDefines.h:
3935 2014-08-06 Dean Jackson <dino@apple.com>
3937 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
3938 https://bugs.webkit.org/show_bug.cgi?id=135675
3940 Reviewed by Sam Weinig.
3942 * wtf/FeatureDefines.h:
3944 2014-08-06 Benjamin Poulain <benjamin@webkit.org>
3946 HashTable based classes leak a lot
3947 https://bugs.webkit.org/show_bug.cgi?id=135638
3949 Reviewed by Darin Adler.
3952 The operator= taking a rvalue reference was never freeing the memory allocated
3953 for the table of the left hand side object.
3955 This patch fixes the leaks by doing an alloc+swap with a new object.
3956 The object temp gets the reference to m_table, and destroys it in the regular destructor
3957 when going out of scope.
3959 Kudos to Pratik Solanki for finding the leaks.
3961 2014-08-06 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
3963 [JSC] Build fix for FTL on EFL after ftlopt merge
3964 https://bugs.webkit.org/show_bug.cgi?id=135565
3966 Reviewed by Mark Lam.
3968 Added ENABLE(FTL_NATIVE_CALL_INLINING).
3972 2014-08-04 Alex Christensen <achristensen@webkit.org>
3974 Progress towards CMake on Mac.
3975 https://bugs.webkit.org/show_bug.cgi?id=135528
3977 Reviewed by Gyuyoung Kim.
3979 * wtf/CMakeLists.txt:
3980 Include text directory.
3981 * wtf/PlatformMac.cmake: Added.
3983 2014-07-31 Alex Christensen <achristensen@webkit.org>
3985 Progress towards cmake on Windows.
3986 https://bugs.webkit.org/show_bug.cgi?id=135484
3988 Reviewed by Martin Robinson.
3990 * wtf/CMakeLists.txt:
3991 Added WTF_LIBRARY_TYPE because Windows needs WTF to be a shared library.
3993 2014-07-30 Andreas Kling <akling@apple.com>
3995 PropertyName's internal string is always atomic.
3996 <https://webkit.org/b/135451>
3998 Remove AtomicString::findStringWithHash() since nobody uses it anymore.
4000 Reviewed by Benjamin Poulain.
4002 * wtf/text/AtomicString.cpp:
4003 (WTF::findString): Deleted.
4004 (WTF::AtomicString::findStringWithHash): Deleted.
4005 * wtf/text/AtomicString.h:
4007 2014-07-30 Andy Estes <aestes@apple.com>
4009 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
4010 https://bugs.webkit.org/show_bug.cgi?id=135439
4012 Reviewed by Tim Horton.
4014 We now support two different platform content filters, and will soon support a mock content filter (as part of
4015 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
4016 library. ENABLE() is the correct macro to use for such a feature.
4020 2014-07-29 Brent Fulgham <bfulgham@apple.com>
4022 [Win] Modify version numbering scheme to support 5-tuple versions
4023 https://bugs.webkit.org/show_bug.cgi?id=135400
4024 <rdar://problem/17849033>
4026 Reviewed by David Kilzer.
4028 * WTF.vcxproj/WTFPostBuild.cmd: Use new version-stamp.pl script
4030 * WTF.vcxproj/WTFPreBuild.cmd: Make sure we have created the
4031 appropriate version resource during builds.
4033 2014-07-29 Daniel Bates <dabates@apple.com>
4035 Use WTF::move() instead of std::move() to help ensure move semantics
4036 https://bugs.webkit.org/show_bug.cgi?id=135351
4038 Reviewed by Alexey Proskuryakov.
4041 (WTF::KeyTraits>::HashTable):
4043 2014-07-28 Brian J. Burg <burg@cs.washington.edu>
4045 Should not export symbols for base64Encode inline adapter methods
4046 https://bugs.webkit.org/show_bug.cgi?id=135355
4048 Unreviewed build fix.
4050 Fixes the build break introduced by r171682, where a base64Encode
4051 inline adapter method was used in another header, thus creating
4052 multiple definitions of it (and problems with with weak symbols).
4054 * wtf/text/Base64.h: Remove WTF_EXPORT_PRIVATE for inlined methods.
4056 2014-07-27 Filip Pizlo <fpizlo@apple.com>
4058 Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
4060 * wtf/text/WTFString.h:
4062 2014-07-26 Filip Pizlo <fpizlo@apple.com>
4064 Unreviewed, roll out r171641-r171644. It broke some tests; will investigate and
4067 * wtf/text/WTFString.h:
4069 2014-07-25 Filip Pizlo <fpizlo@apple.com>
4071 Attempt to fix Windows.
4073 * wtf/text/WTFString.h:
4075 2014-07-25 Gavin Barraclough <baraclough@apple.com>
4077 Yosemite version number is 101000
4078 https://bugs.webkit.org/show_bug.cgi?id=135301
4080 Reviewed by Sam Weinig.
4082 * wtf/FeatureDefines.h:
4085 2014-07-23 Brent Fulgham <bfulgham@apple.com>
4087 [Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
4088 https://bugs.webkit.org/show_bug.cgi?id=13519
4090 Reviewed by Mark Lam.
4092 * wtf/Assertions.h: Add MSVC to list of compilers supporting this macro.
4093 * wtf/FastMalloc.cpp: Correct function declaration for NO_RETURN_DUE_TO_CRASH.
4095 2014-07-22 Filip Pizlo <fpizlo@apple.com>
4097 Merge r169148, r169185, r169188, r169578, r169582, r169584, r169588, r169753 from ftlopt.
4099 2014-06-04 Filip Pizlo <fpizlo@apple.com>
4101 [ftlopt] AI should be able track structure sets larger than 1
4102 https://bugs.webkit.org/show_bug.cgi?id=128073
4104 Reviewed by Oliver Hunt.
4107 (WTF::Bag::Node::Node):
4110 2014-07-22 Filip Pizlo <fpizlo@apple.com>
4112 Merge r168635, r168780, r169005, r169014, and r169143 from ftlopt.
4114 2014-05-20 Filip Pizlo <fpizlo@apple.com>
4116 [ftlopt] DFG bytecode parser should turn GetById with nothing but a Getter stub as stuff+handleCall, and handleCall should be allowed to inline if it wants to
4117 https://bugs.webkit.org/show_bug.cgi?id=133105
4119 Reviewed by Michael Saboff.
4122 (WTF::Bag::iterator::operator!=):
4124 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
4126 [WTF] Add the move constructor, move assignment operator for HashTable
4127 https://bugs.webkit.org/show_bug.cgi?id=130772
4129 Reviewed by Darin Adler.
4131 HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
4132 and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
4133 copies when moves can be performed.
4136 (WTF::KeyTraits>::HashTable):
4138 2014-07-15 Commit Queue <commit-queue@webkit.org>
4140 Unreviewed, rolling out r171107.
4141 https://bugs.webkit.org/show_bug.cgi?id=134959
4143 This was not the problem! (Requested by kling on #webkit).
4147 "Revert: Run the FastMalloc scavenger thread on iOS as well."
4148 https://bugs.webkit.org/show_bug.cgi?id=134927
4149 http://trac.webkit.org/changeset/171107
4151 2014-07-15 Andreas Kling <akling@apple.com>
4153 Revert: Run the FastMalloc scavenger thread on iOS as well.
4154 <https://webkit.org/b/134927>
4155 <rdar://problem/17485079>
4157 This appears to be the cause of some elusive crashes, and since I don't
4158 have a way to reproduce them, let's just go back to not running the
4159 scavenger thread on iOS.
4161 Reviewed by Antti Koivisto.
4163 * wtf/FastMalloc.cpp:
4165 2014-07-13 Filip Pizlo <fpizlo@apple.com>
4167 HashMap should have removeIf()
4168 https://bugs.webkit.org/show_bug.cgi?id=134870
4170 Reviewed by Sam Weinig.
4172 Expose a new HashMap method, called removeIf(), which allows you to do an efficient
4173 pass over the map and remove a bunch of things at once. This is used by DFG GCSE as
4174 part of https://bugs.webkit.org/show_bug.cgi?id=134677.
4177 (WTF::X>::removeIf):
4179 (WTF::KeyTraits>::removeIf):
4181 2014-07-11 peavo@outlook.com <peavo@outlook.com>
4183 [Win] Enable DFG JIT.
4184 https://bugs.webkit.org/show_bug.cgi?id=123615
4186 Reviewed by Mark Lam.
4190 2014-07-11 Commit Queue <commit-queue@webkit.org>
4192 Unreviewed, rolling out r170995.
4193 https://bugs.webkit.org/show_bug.cgi?id=134831
4195 Causing odd crashes in debug builds (Requested by zdobersek on
4200 "[WTF] Add the move constructor, move assignment operator for
4202 https://bugs.webkit.org/show_bug.cgi?id=130772
4203 http://trac.webkit.org/changeset/170995
4205 2014-07-09 Zan Dobersek <zdobersek@igalia.com>
4207 [WTF] Add the move constructor, move assignment operator for HashTable
4208 https://bugs.webkit.org/show_bug.cgi?id=130772
4210 Reviewed by Darin Adler.
4212 HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
4213 and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
4214 copies when moves can be performed.
4217 (WTF::KeyTraits>::HashTable):
4219 2014-07-10 Alex Christensen <achristensen@webkit.org>
4221 Enable same features on all Windows ports.
4222 https://bugs.webkit.org/show_bug.cgi?id=134715
4224 Reviewed by Brent Fulgham.
4227 Use REQUEST_ANIMATION_FRAME_TIMER on WinCairo.
4229 2014-07-09 Brent Fulgham <bfulgham@apple.com>
4231 [Win] Unreviewed build fix after r170930.
4233 * WTF.vcxproj/copy-files.cmd: Include cf files in
4234 post-build copy operation.
4236 2014-07-09 Brent Fulgham <bfulgham@apple.com>
4238 [Win] Remove uses of 'bash' in build system
4239 https://bugs.webkit.org/show_bug.cgi?id=134782
4240 <rdar://problem/17615533>
4242 Reviewed by Dean Jackson.
4244 Remove uses of 'bash' by replacing Windows-specific bash scripts
4245 with Perl equivalents.
4247 * WTF.vcxproj/WTFGenerated.make:
4248 * WTF.vcxproj/WTFGenerated.vcxproj:
4249 * WTF.vcxproj/WTFGenerated.vcxproj.filters:
4250 * WTF.vcxproj/WTFPreBuild.cmd:
4251 * WTF.vcxproj/build-generated-files.pl: Copied from Source/WTF/WTF.vcxproj/build-generated-files.sh.
4252 * WTF.vcxproj/build-generated-files.sh: Removed.
4254 2014-07-09 Brent Fulgham <bfulgham@apple.com>
4256 [Win] Remove use of 'grep' in build steps
4257 https://bugs.webkit.org/show_bug.cgi?id=134770
4258 <rdar://problem/17608783>
4260 Reviewed by Tim Horton.
4262 Replace uses of the grep command in Windows builds with the equivalent
4265 * WTF.vcxproj/WTFPreBuild.cmd:
4267 2014-07-07 Zan Dobersek <zdobersek@igalia.com>
4269 Enable ARMv7 disassembler for the GTK port
4270 https://bugs.webkit.org/show_bug.cgi?id=134676
4272 Reviewed by Benjamin Poulain.
4274 * wtf/Platform.h: Enable the ARMv7 disassembler for the GTK port when
4275 targeting the ARMv7 architecture.
4277 2014-07-06 Yoav Weiss <yoav@yoav.ws>
4279 Turn on img@sizes compile flag
4280 https://bugs.webkit.org/show_bug.cgi?id=134634
4282 Reviewed by Benjamin Poulain.
4284 * wtf/FeatureDefines.h: Added compile flag definition.
4286 2014-07-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
4288 Unreivewed, fix build break on EFL and GTK since r170767.
4290 * wtf/CMakeLists.txt: Exclude Decoder.h and Encoder.h because those files were removed.
4292 2014-07-03 Daniel Bates <dabates@apple.com>
4295 https://bugs.webkit.org/show_bug.cgi?id=134500
4297 Reviewed by Darin Adler.
4299 Substitution of WTF::move() for std::move() rubber-stamped by Anders Carlsson.
4301 Implement WTF::move(), a replacement for std::move(). WTF::move() is less error
4302 prone than std::move() as it compile asserts that its argument is a non-const
4303 lvalue reference before ultimately casting it to a rvalue reference (via std::move).
4305 * wtf/Deque.h: Substitute WTF::move() for std::move().
4306 * wtf/HashMap.h: Ditto.
4307 * wtf/HashSet.h: Ditto.
4308 * wtf/HashTable.h: Ditto.
4309 * wtf/IteratorAdaptors.h: Ditto.
4310 * wtf/IteratorRange.h: Ditto.
4311 * wtf/ListHashSet.h: Ditto.
4312 * wtf/MainThread.cpp: Ditto.
4314 * wtf/StdLibExtras.h:
4318 2014-07-03 Anders Carlsson <andersca@apple.com>
4320 Get rid of Encoder.h and Decoder.h from WTF