blob: f8b9597298239b2cf862c5626a31f22ef8846373 [file] [log] [blame]
2015-01-24 Chris Dumez <cdumez@apple.com>
Provide implementation for WTF::DefaultHash<bool>
https://bugs.webkit.org/show_bug.cgi?id=140848
Reviewed by Anders Carlsson.
Provide implementation for WTF::DefaultHash<bool> so that we can use
HashMap<std::pair<XXX, bool>> in the code base. Right now, we need to
use some integer type to work around the issue.
* wtf/HashFunctions.h:
2015-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add missing null check in some derefGPtr implementations
https://bugs.webkit.org/show_bug.cgi?id=140822
Reviewed by Sergio Villar Senin.
It's missing in GHashTable and GVariant implementations.
* wtf/gobject/GRefPtr.cpp:
(WTF::derefGPtr):
2015-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add initial database process support
https://bugs.webkit.org/show_bug.cgi?id=139491
Reviewed by Sergio Villar Senin.
Add support for using GRefPtr with GVariantBuilder.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
* wtf/gobject/GTypedefs.h:
2015-01-22 Ryosuke Niwa <rniwa@webkit.org>
Add a build flag for ES6 class syntax
https://bugs.webkit.org/show_bug.cgi?id=140760
Reviewed by Michael Saboff.
* wtf/FeatureDefines.h:
2015-01-21 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(INSPECTOR) ifdef guards
https://bugs.webkit.org/show_bug.cgi?id=140668
Reviewed by Darin Adler.
* wtf/FeatureDefines.h:
2015-01-20 YunQiang Su <wzssyqa@gmail.com>
Fix failed to build for Linux/MIPS64EL
https://bugs.webkit.org/show_bug.cgi?id=124370
Reviewed by Darin Adler.
Add MIPS64EL support.
* wtf/Platform.h:
* wtf/dtoa/utils.h:
2015-01-19 Alexey Proskuryakov <ap@apple.com>
Make ASan do bounds checks for WTF::Vector
https://bugs.webkit.org/show_bug.cgi?id=140631
rdar://problem/19437718
Reviewed by Darin Adler.
* wtf/SizeLimits.cpp: Disable Vector object size checks for ASan enabled builds.
* wtf/Vector.h:
(WTF::VectorBuffer::endOfBuffer):
(WTF::Vector::Vector):
(WTF::Vector::~Vector):
(WTF::Vector::swap):
(WTF::OverflowHandler>::Vector):
(WTF::=):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::asanSetInitialBufferSizeTo):
(WTF::OverflowHandler>::asanSetBufferSizeToFullCapacity):
(WTF::OverflowHandler>::asanBufferSizeWillChangeTo):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::appendSlowCase):
(WTF::OverflowHandler>::uncheckedAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::releaseBuffer):
* wtf/Compiler.h: Changed ASAN_ENABLED macro fallback value from false to 0,
MSVC was not happy with false.
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
Remove non-Windows cruft from WebKit/win/Plugins
https://bugs.webkit.org/show_bug.cgi?id=140675
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2015-01-16 Myles C. Maxfield <mmaxfield@apple.com>
WeakPtr functions crash when created with default constructor
https://bugs.webkit.org/show_bug.cgi?id=140479
Reviewed by Andreas Kling.
This patch rearranges how WeakPtr works, and has the following ideas behind it:
1. WeakPtr should use Ref internally. This solves the crash by always having a
valid WeakReference.
2. Clients should not be able to construct WeakReferences directly. Instead,
only WeakPtrFactory (and WeakPtr's default constructor) should be able to
construct them. They are considered an implementation detail of WeakPtr.
3. Except for the default constructor, clients should not be able to construct
WeakPtrs directly. Instead, the WeakPtrFactory must construct them. This
guarantees that the WeakPtrs all reference the same WeakReference.
4. Clients can construct a WeakPtr using its default constructor, and then
use the assignment operator to make it non-null. (Or they could use
WeakPtrFactory to make it non-null at creation-time.)
5. No one was using WeakReference::bindTo(), and it doesn't seem useful, so I
removed it.
Tests: WTF_WeakPtr API tests
* wtf/Ref.h:
(WTF::Ref::Ref): Added extra ASSERT()s, and explicitly deleted copy
constructors with a comment.
(WTF::Ref::operator=): Added extra ASSERT()s, and explicitly deleted copy
assignment operators with a comment.
* wtf/WeakPtr.h:
(WTF::WeakReference::clear): Used nullptr.
(WTF::WeakReference::create): Moved to private:
(WTF::WeakPtr::WeakPtr): For the default constructor, initialized the Ref with
a new WeakReference. For the other constructor, moved it to private:. Also added
copy constructors and copy assignment operators (since Ref doesn't have them but
RefPtr does). These constructors/operators are relied upon in various places
throughout WebCore.
(WTF::WeakPtr::operator bool): Made non-explicit.
(WTF::WeakReference::createUnbound): Deleted.
(WTF::WeakReference::bindTo): Deleted.
(WTF::WeakReference::WeakReference): Deleted.
(WTF::WeakPtrFactory::WeakPtrFactory): Deleted.
2015-01-16 Yusuke Suzuki <utatane.tea@gmail.com>
std::all_of requires complete C++ iterators in GCC 4.8
https://bugs.webkit.org/show_bug.cgi?id=140530
Reviewed by Darin Adler.
In the WebKit2/UIProcess/WebProcessLifetimeObserver.cpp, std::all_of
is used for HashIterators. However, std::all_of requires the complete
C++ iterator interface including iterator_category typedef member and
it raises compile error in GCC 4.8 (and libstdc++) environment.
This patch inherits std::iterator with appropriate type parameters.
It automatically defines required typedefs including iterator_category.
* wtf/HashIterators.h:
2015-01-15 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(SQL_DATABASE) guards
https://bugs.webkit.org/show_bug.cgi?id=140434
Reviewed by Darin Adler.
* wtf/FeatureDefines.h:
2015-01-14 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed fix after r163330.
* wtf/Platform.h: Use C style comment.
2015-01-14 Marc Juul <juul@sudomesh.org>
C++ style comment was preventing compile if CPU(ARM_NEON)
https://bugs.webkit.org/show_bug.cgi?id=133827
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2015-01-13 Chris Dumez <cdumez@apple.com>
Make WTF::Optional work with msvc 2013
https://bugs.webkit.org/show_bug.cgi?id=140401
Reviewed by Anders Carlsson.
Update the WTF::Optional implementation to use std::aligned_memory and
placement new instead of an unrestricted union because msvc 2013 still
doesn't support unrestricted unions.
This change is a pre-requirement to fix Bug 140347 as this change uses
WTF::Optional with types that have non-trivial copy constructors.
This change is covered by the existing Optional WTF test.
* wtf/Optional.h:
2015-01-11 Sam Weinig <sam@webkit.org>
Remove support for SharedWorkers
https://bugs.webkit.org/show_bug.cgi?id=140344
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2015-01-12 Darin Adler <darin@apple.com>
Modernize and streamline HTMLTokenizer
https://bugs.webkit.org/show_bug.cgi?id=140166
Reviewed by Sam Weinig.
* wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
2015-01-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178154, r178163, and r178164.
https://bugs.webkit.org/show_bug.cgi?id=140292
Still multiple assertion failures on tests (Requested by ap on
#webkit).
Reverted changesets:
"Modernize and streamline HTMLTokenizer"
https://bugs.webkit.org/show_bug.cgi?id=140166
http://trac.webkit.org/changeset/178154
"Unreviewed speculative buildfix after r178154."
http://trac.webkit.org/changeset/178163
"One more unreviewed speculative buildfix after r178154."
http://trac.webkit.org/changeset/178164
2015-01-08 Darin Adler <darin@apple.com>
Modernize and streamline HTMLTokenizer
https://bugs.webkit.org/show_bug.cgi?id=140166
Reviewed by Sam Weinig.
* wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.
2015-01-08 Benjamin Poulain <benjamin@webkit.org>
[WK2] Start a prototype for declarative site specific extensions
https://bugs.webkit.org/show_bug.cgi?id=140160
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h:
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
As pointed out by Tim Horton, use C-style comment instead of C++-style comment as
wtf/Compiler.h is included in the sandbox profile and the sandbox profile compiler
doesn't understand C++-style comments.
* wtf/Compiler.h:
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
remove EXTERN_C in a subsequent commit(s).
* wtf/Compiler.h:
2015-01-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178068.
https://bugs.webkit.org/show_bug.cgi?id=140235
Breaks the iOS build (Requested by enrica on #webkit).
Reverted changeset:
"[iOS] Make WebKit2 build with public iOS SDK and more build
fixes for DRT"
https://bugs.webkit.org/show_bug.cgi?id=137371
http://trac.webkit.org/changeset/178068
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
Move EXTERN_C_BEGIN and EXTERN_C_END macros from file WebKit2/config.h to here and
rename them to WTF_EXTERN_C_BEGIN and WTF_EXTERN_C_END, respectively, so that we
can make use of these macros in SPI wrapper headers (e.g. UIKitSPI.h).
I'll look to transition existing code to WTF_EXTERN_C_BEGIN/WTF_EXTERN_C_END and
remove EXTERN_C in a subsequent commit(s).
* wtf/Compiler.h:
2015-01-07 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
https://bugs.webkit.org/show_bug.cgi?id=140053
Reviewed by Andreas Kling.
* wtf/Stopwatch.h:
(WTF::Stopwatch::create): Return a Ref.
2015-01-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178039.
https://bugs.webkit.org/show_bug.cgi?id=140187
Breaks ObjC Inspector Protocol (Requested by JoePeck on
#webkit).
Reverted changeset:
"Web Inspector: purge PassRefPtr from Inspector code and use
Ref for typed and untyped protocol objects"
https://bugs.webkit.org/show_bug.cgi?id=140053
http://trac.webkit.org/changeset/178039
2015-01-06 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
https://bugs.webkit.org/show_bug.cgi?id=140053
Reviewed by Andreas Kling.
* wtf/Stopwatch.h:
(WTF::Stopwatch::create): Return a Ref.
2015-01-06 Alexey Proskuryakov <ap@apple.com>
ADDRESS_SANITIZER macro is overloaded
https://bugs.webkit.org/show_bug.cgi?id=140130
Reviewed by Anders Carlsson.
* wtf/Compiler.h: Added an ASAN_ENABLED macro. The abbreviation should become well
known - we already use it in tools.
* wtf/Assertions.h:
* wtf/RefCounted.h:
* wtf/SizeLimits.cpp:
Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.
2015-01-05 Andreas Kling <akling@apple.com>
Purge PassRefPtr from Page.
<https://webkit.org/b/140089>
Reviewed by Anders Carlsson.
Make SchedulePair::create() return Ref since it never fails.
* wtf/SchedulePair.h:
(WTF::SchedulePair::create):
2015-01-01 Darin Adler <darin@apple.com>
Rework code that hides characters in password fields to streamline a little
https://bugs.webkit.org/show_bug.cgi?id=140035
Reviewed by Sam Weinig.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::fill): Deleted.
* wtf/text/StringImpl.h: Deleted StringImpl::fill.
* wtf/text/WTFString.h:
(WTF::String::fill): Deleted.
2014-12-26 Dan Bernstein <mitz@apple.com>
Build fix.
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>.
* wtf/SaturatedArithmetic.h:
(signedAddOverflows):
(signedSubtractOverflows):
2014-12-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
https://bugs.webkit.org/show_bug.cgi?id=139950
Reviewed by David Kilzer.
* Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
in a manner that works with Xcode 5.1.1.
2014-12-25 Dan Bernstein <mitz@apple.com>
Try to fix the Windows build after r177733.
* wtf/Ref.h:
2014-12-25 Alexey Proskuryakov <ap@apple.com>
Simplify saturated integer add/sub
https://bugs.webkit.org/show_bug.cgi?id=139854
Address Darin's post-commit feedback to fix API tests.
* wtf/SaturatedArithmetic.h: (saturatedSubtraction):
2014-12-24 Benjamin Poulain <benjamin@webkit.org>
Simplify saturated integer add/sub
https://bugs.webkit.org/show_bug.cgi?id=139854
Reviewed by Darin Adler.
* wtf/Compiler.h:
Make a wrapper for __has_builtin for compilers that do not support it.
* wtf/SaturatedArithmetic.h:
(saturatedAddition):
(saturatedSubtraction):
Use the builtins when possible instead of reinventing the wheel.
On ARMv7, use the saturated math instructions.
2014-12-23 Anders Carlsson <andersca@apple.com>
Move dynamic_objc_cast to RetainPtr.h
https://bugs.webkit.org/show_bug.cgi?id=139915
Reviewed by Sam Weinig.
* wtf/RetainPtr.h:
(WTF::dynamic_objc_cast):
2014-12-23 Anders Carlsson <andersca@apple.com>
Re-indent RefPtr.h and RetainPtr.h.
Rubber-stamped by Sam Weinig.
* wtf/RefPtr.h:
* wtf/RetainPtr.h:
2014-12-20 Eric Carlson <eric.carlson@apple.com>
[iOS] add optimized fullscreen API
https://bugs.webkit.org/show_bug.cgi?id=139833
<rdar://problem/18844486>
Reviewed by Simon Fraser.
* wtf/Platform.h: Define ENABLE_VIDEO_PRESENTATION_MODE.
2014-12-18 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL and GTK since r177523
https://bugs.webkit.org/show_bug.cgi?id=139805
Reviewed by Csaba Osztrogonác.
* wtf/Ref.h: Include <wtf/StdLibExtras.h> to use std::exchange().
2014-12-18 Gavin Barraclough <barraclough@apple.com>
Add strong typing to RefCounter interface, return value as a bool.
https://bugs.webkit.org/show_bug.cgi?id=139776
Unreviewed style fixes.
* wtf/RefCounter.h:
(WTF::=):
2014-12-18 Brent Fulgham <bfulgham@apple.com>
[Win] Build correction after r177541.
* wtf/RefCounter.h:
(WTF::RefCounter::Token<T>::Token): Revise constructor inlines to correct
syntax error.
2014-12-18 Gavin Barraclough <barraclough@apple.com>
Add strong typing to RefCounter interface, return value as a bool.
https://bugs.webkit.org/show_bug.cgi?id=139776
Reviewed by Geoff Garen.
Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
This means there is no compile time type checking to prevent mistakes. Update the count()
method to token<>(), templated on type used to identify the token being returned.
Calls to token<T>() will return a result of type RefCounter::Token<T>.
There are a few problems with the fact the counter will return you an exact count of the
number of outstanding tokens:
- It is desirable to only fire the callback on zero-edge changes; it is more consistent
to do so if the value is only readable as a boolean.
- It is desirable to provide the value as an argument to the callback, however to make
this useful for integer values it is also necessary to indicate the direction of change
(0->1 is often interesting where 2->1 is not).
- There is a mismatch between the precision of returning a count, and the inherent
imprecision of a token based mechanism, where it may be difficult to guarantee
absolutely no unnecessary refcount churn, and thus unintentional counter values.
* wtf/RefCounter.cpp:
(WTF::RefCounter::Count::ref):
(WTF::RefCounter::Count::deref):
- only call the callback on zero-edge changes; provide the value.
(WTF::RefCounter::RefCounter):
- callback now takes a bool argument.
* wtf/RefCounter.h:
(WTF::RefCounter::Token::Token):
- New opaque type to reference the RefCounter::Count.
(WTF::RefCounter::Token::operator!):
- ! operator checks for null / anasigned Tokens.
(WTF::RefCounter::RefCounter):
- callback now takes a bool argument.
(WTF::RefCounter::token):
- renamed from count(), templated on type of token returned.
(WTF::RefCounter::value):
- now returns a bool.
(WTF::RefCounter::Token<T>::Token):
(WTF::=):
- Tokens can be copied & assigned.
(WTF::RefCounter::count): Deleted.
- renamed to token<>().
2014-12-18 Anders Carlsson <andersca@apple.com>
Simplify smart pointer classes by using std::exchange
https://bugs.webkit.org/show_bug.cgi?id=139790
Reviewed by Andreas Kling.
* wtf/MallocPtr.h:
* wtf/OSObjectPtr.h:
* wtf/OwnPtr.h:
(WTF::OwnPtr<T>::clear):
(WTF::OwnPtr<T>::release):
(WTF::OwnPtr<T>::leakPtr):
(WTF::=):
* wtf/PassOwnPtr.h:
(WTF::PassOwnPtr<T>::leakPtr):
* wtf/PassRefPtr.h:
(WTF::PassRefPtr<T>::leakRef):
* wtf/Ref.h:
* wtf/RefPtr.h:
(WTF::RefPtr<T>::clear):
(WTF::RefPtr<T>::leakRef):
* wtf/RetainPtr.h:
(WTF::RetainPtr<T>::leakRef):
2014-12-18 Anders Carlsson <andersca@apple.com>
Clean up MachSendRight and add a copySendRight member function
https://bugs.webkit.org/show_bug.cgi?id=139788
Reviewed by Tim Horton.
* wtf/StdLibExtras.h:
(std::exchange):
Add an implementation of std::exchange.
2014-12-17 Chris Dumez <cdumez@apple.com>
[iOS] Make it possible to toggle FeatureCounter support at runtime
https://bugs.webkit.org/show_bug.cgi?id=139688
<rdar://problem/19266254>
Reviewed by Andreas Kling.
Remove FeatureCounter API from WTF and move it to WebCore/platform
instead so that it can log conditionally based on a WebCore setting.
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
2014-12-17 Brent Fulgham <bfulgham@apple.com>
[Win] Correct DebugSuffix builds under MSBuild
https://bugs.webkit.org/show_bug.cgi?id=139733
<rdar://problem/19276880>
Reviewed by Simon Fraser.
* WTF.vcxproj/WTF.proj: Make sure to use the '_debug' suffix
when building the DebugSuffix target.
2014-12-17 Anders Carlsson <andersca@apple.com>
Make Ref::copyRef const and ref-qualified
https://bugs.webkit.org/show_bug.cgi?id=139730
Reviewed by Andreas Kling.
* wtf/Ref.h:
2014-12-16 Daniel Bates <dabates@apple.com>
[iOS] WTF fails to build with public SDK due to missing header CPAggregateDictionary.h
https://bugs.webkit.org/show_bug.cgi?id=139695
Reviewed by Chris Dumez.
Add USE(APPLE_INTERNAL_SDK)-guard around iOS-specific feature counter implementation
as we are only interested in counting features in builds of iOS WebKit that were built
with the Apple Internal SDK.
* wtf/FeatureCounter.cpp:
* wtf/ios/FeatureCounter.mm:
2014-12-16 Geoffrey Garen <ggaren@apple.com>
Enable FastMalloc in debug builds
https://bugs.webkit.org/show_bug.cgi?id=139692
Reviewed by Alexey Proskuryakov.
This will give debug builds greater fidelity to the real thing.
FastMalloc now transparently supports all the malloc debugging APIs I
know of by disabling itself at runtime -- and it should be easy to add
support for any APIs I missed -- so there's no need to turn it off in
debug builds.
* wtf/FastMalloc.cpp:
2014-12-16 Anders Carlsson <andersca@apple.com>
RefPtr::copyRef should be const
https://bugs.webkit.org/show_bug.cgi?id=139689
Reviewed by Andreas Kling.
copyRef() doesn't modify the original object so it should be const.
Also, add a && qualified overload and mark it deleted so that calls to copyRef() where
the object is an rvalue will fail to compile.
* wtf/RefPtr.h:
2014-12-15 Chris Dumez <cdumez@apple.com>
[iOS] Add feature counting support
https://bugs.webkit.org/show_bug.cgi?id=139652
<rdar://problem/19255690>
Reviewed by Gavin Barraclough.
Add a FeatureCounter API for to log / count when a feature
is used. For now, this is only implementated on iOS.
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FeatureCounter.cpp: Added.
(WTF::incrementFeatureCounterKey):
(WTF::setFeatureCounterKey):
* wtf/FeatureCounter.h: Added.
* wtf/ios/FeatureCounter.mm: Added.
(WTF::incrementFeatureCounterKey):
(WTF::setFeatureCounterKey):
2014-12-12 Anders Carlsson <andersca@apple.com>
Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
https://bugs.webkit.org/show_bug.cgi?id=139613
Reviewed by Sam Weinig.
* wtf/Platform.h:
Remove the #define.
2014-12-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177284.
https://bugs.webkit.org/show_bug.cgi?id=139658
"Breaks API tests and LayoutTests on Yosemite Debug"
(Requested by msaboff on #webkit).
Reverted changeset:
"Make sure range based iteration of Vector<> still receives
bounds checking"
https://bugs.webkit.org/show_bug.cgi?id=138821
http://trac.webkit.org/changeset/177284
2014-12-15 Andreas Kling <akling@apple.com>
Purge PassRefPtr from FocusEvent code.
<https://webkit.org/b/139647>
Reviewed by Anders Carlsson.
Add a RefPtr::copyRef() to use when passing a RefPtr to a RefPtr&& without
transferring the ownership.
* wtf/RefPtr.h:
2014-12-15 Oliver Hunt <oliver@apple.com>
Make sure range based iteration of Vector<> still receives bounds checking
https://bugs.webkit.org/show_bug.cgi?id=138821
Reviewed by Mark Lam.
Add a new IndexedIterator struct to WTF that wraps a
Vector type and index to provide pointer like semantics
while still performing runtime bounds checking, even in
release builds. We store a simple index into the vector
which means that this iterator allows vector resizing
during iteration. If the vector is resized such that the
iterator is out of bounds, then any attempt to dereference
the iterator will crash safely.
For the purpose of retaining semantically equivalent
behaviour, the iterator can be moved to m_index == size()
as that is the standard "end" terminator for these types.
Attempting to dereference at that point will still crash
rather than perform an unsafe memory operation.
By necessity there are many overrides for operator + and - as
we otherwise hit many different type promotion ambiguities when
performing arithmetic with iterators. These ambiguities are also
different for 32- vs. 64-bit, so duplicating the functions
and then forwarding to the core implementations that performed
the bounds checking and mutation seemed like the right call.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/IndexedIterator.h: Added.
(WTF::IndexedIterator::IndexedIterator):
(WTF::IndexedIterator::operator->):
(WTF::IndexedIterator::operator*):
(WTF::IndexedIterator::get):
(WTF::IndexedIterator::operator++):
(WTF::IndexedIterator::operator--):
(WTF::IndexedIterator::operator UnspecifiedBoolType):
(WTF::IndexedIterator::operator-):
(WTF::IndexedIterator::operator=):
(WTF::IndexedIterator::operator==):
(WTF::IndexedIterator::operator!=):
(WTF::IndexedIterator::operator<):
(WTF::IndexedIterator::operator<=):
(WTF::IndexedIterator::operator>):
(WTF::IndexedIterator::operator>=):
(WTF::IndexedIterator::operator const_iterator):
(WTF::IndexedIterator::unsafeGet):
(WTF::getPtr):
(WTF::operator-):
(WTF::operator==):
(WTF::operator!=):
(WTF::operator<=):
(WTF::operator>=):
(WTF::operator<):
(WTF::operator>):
(WTF::IndexedIteratorSelector::makeIterator):
(WTF::IndexedIteratorSelector::makeConstIterator):
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/Vector.h:
(WTF::Vector::Vector):
(WTF::Vector::begin):
(WTF::Vector::end):
(WTF::OverflowHandler>::Vector):
(WTF::=):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::appendSlowCase):
(WTF::OverflowHandler>::uncheckedAppend):
(WTF::OverflowHandler>::appendVector):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
2014-12-14 Andreas Kling <akling@apple.com>
Minor follow-up tweaks suggested by Darin on bug 139587.
* wtf/text/WTFString.h:
(WTF::String::String):
2014-12-14 Andreas Kling <akling@apple.com>
Replace PassRef with Ref/Ref&& across the board.
<https://webkit.org/b/139587>
Reviewed by Darin Adler.
Kill the PassRef class and replace it by Ref/Ref&&.
Usage is simple:
- For locals and members, keep using Ref<T>.
- For return types, use Ref<T>.
- For (ownership-transferring) arguments, use Ref<T>&&.
When passing to a Ref&&, use WTF::move() to mobilize the value
at the call site, e.g:
void myFunction(Ref<Foo>&&);
Ref<Foo> myFoo(Foo::create());
myFunction(WTF::move(myFoo));
// 'myFoo' is invalid from this point forward.
As you can see, it works a lot like PassRefPtr, but unlike PassRefPtr
it won't surprise you by becoming null *unless* you WTF::move it.
I've also added a Ref::copyRef() for instances where you want to
return a Ref *without* transferring ownership, e.g code like:
Ref<Foo> foo() { return m_foo; }
... now becomes ...
Ref<Foo> foo() { return m_foo.copyRef(); }
This makes it explicit that a refcount bump will occur.
Finally, do note that unlike last year's PassRef, Ref&& does not
require you to move it to avoid leaking; it will clean itself up.
* wtf/PassRef.h:
(WTF::adopted): Deleted.
(WTF::PassRef<T>::PassRef): Deleted.
(WTF::PassRef<T>::~PassRef): Deleted.
(WTF::PassRef<T>::get): Deleted.
(WTF::PassRef<T>::ptr): Deleted.
(WTF::PassRef<T>::leakRef): Deleted.
(WTF::adoptRef): Deleted.
(WTF::createRefCounted): Deleted.
* wtf/PassRefPtr.h:
(WTF::PassRefPtr::PassRefPtr):
* wtf/Ref.h:
(WTF::adopted):
(WTF::Ref::~Ref):
(WTF::Ref::Ref):
(WTF::Ref::operator=):
(WTF::Ref::operator->):
(WTF::Ref::ptr):
(WTF::Ref::get):
(WTF::Ref::operator T&):
(WTF::Ref::operator const T&):
(WTF::Ref<T>::replace):
(WTF::adoptRef):
* wtf/RefCounter.h:
(WTF::RefCounter::count):
* wtf/RefPtr.h:
(WTF::RefPtr::releaseNonNull):
(WTF::RefPtr<T>::RefPtr):
(WTF::=):
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::AtomicString::add):
(WTF::AtomicString::addFromLiteralData):
(WTF::AtomicString::addSlowCase):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::createWithoutCopying):
(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::createUninitialized):
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::createInternal):
(WTF::StringImpl::create):
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::substring):
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
(WTF::StringImpl::fill):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::convertToASCIILowercase):
(WTF::StringImpl::stripMatchedCharacters):
(WTF::StringImpl::stripWhiteSpace):
(WTF::StringImpl::removeCharacters):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::StringImpl::simplifyWhiteSpace):
(WTF::StringImpl::replace):
(WTF::StringImpl::adopt):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::create):
(WTF::StringImpl::createSubstringSharingImpl8):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::createEmptyUnique):
(WTF::StringImpl::adopt):
(WTF::StringImpl::replace):
(WTF::StringImpl::constructInternal<LChar>):
(WTF::StringImpl::constructInternal<UChar>):
(WTF::StringImpl::isolatedCopy):
* wtf/text/WTFString.h:
(WTF::String::String):
2014-12-10 Geoffrey Garen <ggaren@apple.com>
Please disable the webkitFirstVersionWithInitConstructorSupport check on Apple TV
https://bugs.webkit.org/show_bug.cgi?id=139501
Reviewed by Gavin Barraclough.
Added a platform definition for APPLETV.
(It's not an OS because it's not mutually exclusive with other OS definitions.)
* wtf/Platform.h:
2014-12-10 Martin Robinson <mrobinson@igalia.com>
[GTK] Add support for text-decoration-skip
https://bugs.webkit.org/show_bug.cgi?id=131540
Reviewed by Gustavo Noronha Silva.
* wtf/Platform.h: Enable text decoration skip by default.
2014-12-09 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in ANGLE, bmalloc, gtest, JavaScriptCore, WTF
<http://webkit.org/b/139212>
Reviewed by Joseph Pecoraro.
* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
on OS X.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
2014-12-09 Dean Jackson <dino@apple.com>
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310
Unreviewed followup, after comments by Andreas Kling.
It was pointed out that we already have a USE(ACCELERATE), so
we don't need a HAVE(ACCELERATE) :)
* wtf/Platform.h:
2014-12-09 Alberto Garcia <berto@igalia.com>
Undefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit GTK Mac OS X on Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=58737
Reviewed by Darin Adler.
Replace OS(MAC_OS_X) with PLATFORM(MAC) to prevent using
osx-specific code in WebKitGTK+ builds.
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):
2014-12-08 Dean Jackson <dino@apple.com>
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310
<rdar://problem/18434594>
Reviewed by Simon Fraser.
Add a HAVE_ACCELERATE flag, true on Apple platforms.
* wtf/Platform.h:
2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
Fix iOS build after r176971.
I had previously modified the WTF forwarding header instead of modifying the real source.
* wtf/unicode/CharacterNames.h:
2014-12-08 Anders Carlsson <andersca@apple.com>
Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
https://bugs.webkit.org/show_bug.cgi?id=139410
Reviewed by Andreas Kling.
* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::currentCPUTimeMS): Deleted.
* wtf/CurrentTime.h:
2014-12-08 Chris Dumez <cdumez@apple.com>
Revert r176293 & r176275
Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
instead of size_t. There is some disagreement regarding the long-term direction
of the API and we shouldn’t leave the API partly transitioned to unsigned type
while making a decision.
* wtf/Forward.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::compare):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::shouldReallocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::Vector):
(WTF::Vector::capacity):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::OverflowHandler>::find):
(WTF::OverflowHandler>::reverseFind):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::resizeToFit):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::reserveInitialCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::reverse):
(WTF::OverflowHandler>::checkConsistency):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::adopt):
(WTF::equalIgnoringNullity):
* wtf/text/StringView.h:
(WTF::append):
* wtf/text/WTFString.h:
2014-12-07 Andreas Kling <akling@apple.com>
Use more PassRef in AtomicString.
<https://webkit.org/b/139319>
Reviewed by Antti Koivisto.
Make a pass over AtomicString and convert functions that return PassRefPtr
into returning RefPtr (where it may be null) and PassRef otherwise.
This allows the compiler to skip null checks in many places.
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::AtomicString::add):
(WTF::AtomicString::addFromLiteralData):
(WTF::AtomicString::addSlowCase):
* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
(WTF::AtomicString::addWithStringTableProvider):
* wtf/text/cf/AtomicStringCF.cpp:
(WTF::AtomicString::add):
2014-12-05 Roger Fong <roger_fong@apple.com>
[Win] proj files copying over too many resources..
https://bugs.webkit.org/show_bug.cgi?id=139315.
<rdar://problem/19148278>
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.proj: Only copy WTF.dll.
2014-12-05 Andreas Kling <akling@apple.com>
PassRef should deref on destruction if pointee was not moved.
<https://webkit.org/b/139309>
Reviewed by Antti Koivisto.
Let PassRef become nullptr internally after having WTF::move()'d the pointee.
This means that PassRef is now essentially a PassRefPtr that can only be
constructed with a non-null pointee.
This should make it possible for all ::create()-style construction helpers to
return PassRef, removing a branch in each case.
* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):
(WTF::PassRef<T>::~PassRef):
(WTF::PassRef<T>::get):
(WTF::PassRef<T>::ptr):
(WTF::PassRef<T>::leakRef):
(WTF::PassRef<T>::dropRef): Deleted.
2014-12-05 Jer Noble <jer.noble@apple.com>
[WTF] MediaTime should support round-tripping from and to doubles.
https://bugs.webkit.org/show_bug.cgi?id=139248
Reviewed by Eric Carlson.
MediaTimes should be able to return precisely the same double value as was used
when the MediaTime was created, so long as that MediaTime was not modified in a
non-destructive way. This will allow API which accepts floating-point values to
return the exact same value when asked, but still be able to store that value
as a MediaTime.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat): Added; store the floating-point value in a union.
(WTF::MediaTime::createWithDouble): Ditto.
(WTF::MediaTime::toFloat): If the value is a double, just return it.
(WTF::MediaTime::toDouble): Ditto.
(WTF::MediaTime::operator+): Special case when one or both sides are doubles.
(WTF::MediaTime::operator-): Ditto.
(WTF::MediaTime::operator*): Ditto.
(WTF::MediaTime::compare): Ditto.
(WTF::abs): Ditto.
(WTF::MediaTime::setTimeScale): Convert the MediaTime from a double.
2014-12-05 peavo@outlook.com <peavo@outlook.com>
[WinCairo] WTF project is missing a GStreamer source file.
https://bugs.webkit.org/show_bug.cgi?id=139296
Reviewed by Philippe Normand.
The WTF project file is missing a GStreamer source file,
causing a link error when compiling with GStreamer enabled.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
2014-12-04 David Kilzer <ddkilzer@apple.com>
REGRESSION (r176683): RefCounter.h is installed outside SDKROOT
* WTF.xcodeproj/project.pbxproj: Don't mark RefCounter.h as a
private header. WTF headers use a special build phase script to
be installed.
2014-12-04 Anders Carlsson <andersca@apple.com>
Make API::String copy the underlying strings if needed, for thread safety
https://bugs.webkit.org/show_bug.cgi?id=139261
Reviewed by Sam Weinig.
* wtf/RefPtr.h:
(WTF::RefPtr<T>::leakRef):
Add a leakRef() to RefPtr so we don't have to go through PassRefPtr.
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread):
Check if the string is empty before checking whether it's in an atomic string table.
It's safe to send empty strings to other threads even if they're in the atomic string table
since they will never be deallocated.
2014-12-04 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warning in StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=139222
Reviewed by Anders Carlsson.
* wtf/text/StringImpl.h:
(WTF::StringImpl::tailPointer):
2014-12-02 Mark Lam <mark.lam@apple.com>
Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
https://bugs.webkit.org/show_bug.cgi?id=138821
Not reviewed.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/IndexedIterator.h: Removed.
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/Vector.h:
(WTF::Vector::Vector):
(WTF::Vector::begin):
(WTF::Vector::end):
(WTF::OverflowHandler>::Vector):
(WTF::=):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::appendSlowCase):
(WTF::OverflowHandler>::uncheckedAppend):
(WTF::OverflowHandler>::appendVector):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
2014-12-02 Oliver Hunt <oliver@apple.com>
Fix IOS builds.
* wtf/IndexedIterator.h:
2014-12-02 Gavin Barraclough <barraclough@apple.com>
Generalize PageActivityAssertionToken
https://bugs.webkit.org/show_bug.cgi?id=139106
Reviewed by Sam Weinig.
PageActivityAssertionToken is a RAII mechanism implementing a counter, used by PageThrottler
to count user visible activity in progress on the page (currently page load and media playback).
Use of an RAII type is prevents a number of possible errors, including double counting a single
media element, or failing to decrement the count after a media element has been deallocated.
The current implementation has a number of drawbacks that have been addressed by this refactoring:
- specific to single use in PageThrottler class - not reusable.
- incomplete encapsulation - the counter and WeakPtrFactory that comprise the current implementation
are not encapsulated (are in the client type, PageThrottler).
- tokens are not shared - PageActivityAssertionToken instances are managed by std::unique, every
increment requires an object allocation.
- redundancy - the current implementation uses a WeakPtr to safely reference the PageThrottler, this
is internally implemented using a reference counted type, resulting in two counters being
incremented (one in the PageActivityAssertionToken, one in the PageThrottler).
In the reimplementation:
- a callback is provided via a lambda function, which allows for easy reuse without a lot of
boilerplate code.
- the counter, callback and ownership of the otherwise weakly-owned token is encapsulated within the
RefCounter type.
- a single count within RefCounter::Count stores the counter value, and also manage the lifetime
of this object.
- standard RefPtrs are used to manage references to the RefCounter::Count.
* WTF.xcodeproj/project.pbxproj:
- added RefCounter.cpp/.h
* wtf/RefCounter.cpp: Added.
(WTF::RefCounter::Count::ref):
- increment the counter.
(WTF::RefCounter::Count::deref):
- decrement the counter, and delete as necessary.
(WTF::RefCounter::RefCounter):
- create a RefCounter::Count.
(WTF::RefCounter::~RefCounter):
- eagerly delete the Counter if it has no references, otherwise let it be deleted on last deref.
* wtf/RefCounter.h: Added.
(WTF::RefCounter::Count::Count):
- initialize count to 0.
(WTF::RefCounter::RefCounter):
- takes a lambda to be called when the value changes.
(WTF::RefCounter::count):
- reference the counter (and in doing so increment the count).
(WTF::RefCounter::value):
- access the current value of the counter.
2014-12-01 Andreas Kling <akling@apple.com>
Optimize constructing JSC::Identifier from AtomicString.
<https://webkit.org/b/139157>
Reviewed by Michael Saboff.
Make AtomicString::isInAtomicStringTable() public so it can be used
in some Identifier assertions.
* wtf/text/AtomicString.h:
2014-12-01 Oliver Hunt <oliver@apple.com>
Fix non-mac builds.
* wtf/IndexedIterator.h:
2014-12-01 Oliver Hunt <oliver@apple.com>
Fix 32-bit build.
* wtf/IndexedIterator.h:
2014-11-17 Oliver Hunt <oliver@apple.com>
Make sure range based iteration of Vector<> still receives bounds checking
https://bugs.webkit.org/show_bug.cgi?id=138821
Reviewed by Mark Lam.
Add a new IndexedIterator struct to WTF that wraps a
Vector type and index to provide pointer like semantics
while still performing runtime bounds checking, even in
release builds. We store a simple index into the vector
which means that this iterator allows vector resizing
during iteration. If the vector is resized such that the
iterator is out of bounds, then any attempt to dereference
the iterator will crash safely. Any other errors, including
overflows, and over extending the iterator will likewise
crash.
For the purpose of retaining semantically equivalent
behaviour, the iterator can be moved to m_index == size()
as that is the standard "end" terminator for these types.
Attempting to dereference at that point will still crash
rather than perform an unsafe memory operation.
In order to maintain the validity of all the bounds checking,
we perform full integer range checking prior to any mutation
of the iterator location. If we detect an arithmetic overflow
we will crash rather than attempting to carry on.
By necessity there are many overrides for operator + and - as
we otherwise hit many different type promotion ambiguities when
performing arithmetic with iterators. These ambiguities are also
different for 32- vs. 64-bit, so duplicating the functions
and then forwarding to the core implementations that performed
the bounds checking and mutation seemed like the right call.
* WTF.xcodeproj/project.pbxproj:
* wtf/IndexedIterator.h: Added.
(WTF::IndexedIterator::IndexedIterator):
(WTF::IndexedIterator::operator->):
(WTF::IndexedIterator::operator*):
(WTF::IndexedIterator::get):
(WTF::IndexedIterator::operator++):
(WTF::IndexedIterator::operator--):
(WTF::IndexedIterator::operator UnspecifiedBoolType):
(WTF::IndexedIterator::operator+=):
(WTF::IndexedIterator::operator-=):
(WTF::IndexedIterator::operator+):
(WTF::IndexedIterator::operator-):
(WTF::IndexedIterator::operator=):
(WTF::IndexedIterator::operator==):
(WTF::IndexedIterator::operator!=):
(WTF::IndexedIterator::operator<):
(WTF::IndexedIterator::operator<=):
(WTF::IndexedIterator::operator>):
(WTF::IndexedIterator::operator>=):
(WTF::IndexedIterator::operator const_iterator):
(WTF::IndexedIterator::isSafeToCompare):
(WTF::IndexedIterator::unsafeGet):
(WTF::getPtr):
(WTF::operator-):
(WTF::operator==):
(WTF::operator!=):
(WTF::operator<=):
(WTF::operator>=):
(WTF::operator<):
(WTF::operator>):
(WTF::IndexedIteratorSelector::makeIterator):
(WTF::IndexedIteratorSelector::makeConstIterator):
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/Vector.h:
(WTF::Vector::Vector):
(WTF::Vector::begin):
(WTF::Vector::end):
(WTF::OverflowHandler>::Vector):
(WTF::=):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::appendSlowCase):
(WTF::OverflowHandler>::uncheckedAppend):
(WTF::OverflowHandler>::appendVector):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
2014-11-30 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Drop support for the EFL 1.7
https://bugs.webkit.org/show_bug.cgi?id=139114
Reviewed by Gyuyoung Kim.
* wtf/efl/EflTypedefs.h: Removed old definitions which EFL 1.7 used.
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* wtf/RunLoopTimer.h:
(WTF::RunLoopTimer::RunLoopTimer):
(WTF::RunLoopTimer::fired):
2014-11-18 Chris Dumez <cdumez@apple.com>
Have Vector::capacity() return an unsigned instead of a size_t
https://bugs.webkit.org/show_bug.cgi?id=138842
Reviewed by Andreas Kling.
Have Vector::capacity() return an unsigned instead of a size_t as
capacity is stored as an unsigned internally.
* wtf/Vector.h:
(WTF::Vector::capacity):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
2014-11-18 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for ListHashSet nodes
https://bugs.webkit.org/show_bug.cgi?id=138841
Reviewed by Andreas Kling.
bmalloc is fast, so we don't need a custom allocator.
The MallocBench test for linked list node allocation (list_allocate) is
4.09X faster in bmalloc than TCMalloc. Also, I wrote a stress test to
add/remove link elements, which modify a ListHashSet on insertion and
removal, and it was 1% faster / in the noise with bmalloc enabled.
* wtf/ListHashSet.h:
(WTF::ListHashSetNode::ListHashSetNode):
(WTF::ListHashSetTranslator::translate):
(WTF::U>::ListHashSet):
(WTF::=):
(WTF::U>::swap):
(WTF::U>::~ListHashSet):
(WTF::U>::size):
(WTF::U>::capacity):
(WTF::U>::isEmpty):
(WTF::U>::first):
(WTF::U>::removeFirst):
(WTF::U>::takeFirst):
(WTF::U>::last):
(WTF::U>::removeLast):
(WTF::U>::takeLast):
(WTF::U>::contains):
(WTF::U>::remove):
(WTF::U>::clear):
(WTF::U>::unlink):
(WTF::U>::unlinkAndDelete):
(WTF::U>::appendNode):
(WTF::U>::prependNode):
(WTF::U>::insertNodeBefore):
(WTF::U>::deleteAllNodes):
(WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Deleted.
(WTF::ListHashSetNodeAllocator::allocate): Deleted.
(WTF::ListHashSetNodeAllocator::deallocate): Deleted.
(WTF::ListHashSetNodeAllocator::pool): Deleted.
(WTF::ListHashSetNodeAllocator::pastPool): Deleted.
(WTF::ListHashSetNodeAllocator::inPool): Deleted.
(WTF::ListHashSetNode::operator new): Deleted.
(WTF::ListHashSetNode::destroy): Deleted.
2014-11-18 Chris Dumez <cdumez@apple.com>
Update the Vector API to deal with unsigned types instead of size_t
https://bugs.webkit.org/show_bug.cgi?id=138824
Reviewed by Andreas Kling.
Update part of the Vector API to deal with unsigned types instead of
size_t. The Vector class is already using unsigned type for its
capacity and size data members. However, the Vector API was never
updated accordingly.
The rest of the Vector API will be ported in follow-up patches to
make the change smaller and more easily reviewable.
* wtf/Forward.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::compare):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::shouldReallocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::Vector):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::OverflowHandler>::find):
(WTF::OverflowHandler>::reverseFind):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::resizeToFit):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::reserveInitialCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::reverse):
(WTF::OverflowHandler>::checkConsistency):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::adopt):
(WTF::equalIgnoringNullity):
* wtf/text/StringView.h:
(WTF::append):
* wtf/text/WTFString.h:
2014-11-18 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile errors when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=137000
Reviewed by Philippe Normand.
MSVC does not allow the keyword default on move constructors and move assignment operators.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::socketCallback):
* wtf/gobject/GMainLoopSource.h:
(WTF::GMainLoopSource::Context::operator=):
2014-11-17 Anders Carlsson <andersca@apple.com>
Fix WTF build with newer versions of clang.
<rdar://problem/18978705>
* wtf/HashTable.h:
(WTF::removeIterator):
* wtf/dtoa/utils.h:
(WTF::double_conversion::BitCast):
2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
Allow constructing a base PassRef with a derived Ref
https://bugs.webkit.org/show_bug.cgi?id=138701
Reviewed by Andreas Kling
* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):
2014-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Fix the build with EFL 1.12
https://bugs.webkit.org/show_bug.cgi?id=138245
Reviewed by Gyuyoung Kim.
* wtf/efl/UniquePtrEfl.h:
Removed Evas_GL.h from UniquePtrEfl.h, which is commonly included, because
it should not be included with official GL headers.
2014-11-12 Mark Lam <mark.lam@apple.com>
Rename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
<https://webkit.org/b/138661>
Reviewed by Michael Saboff.
Also move the switch for enabling the use of MASM_PROBE from JavaScriptCore's
config.h to WTF's Platform.h. This ensures that the setting is consistently
applied even when building WebCore parts as well.
* wtf/Platform.h:
2014-11-09 Antti Koivisto <antti@apple.com>
Remove BloomFilter size limit
https://bugs.webkit.org/show_bug.cgi?id=138549
Reviewed by Andreas Kling.
* wtf/BloomFilter.h: Remove the static_assert, the code works fine with somewhat larger sizes.
2014-11-09 Chris Dumez <cdumez@apple.com>
Add a more correct way to compare floating point numbers and use it
https://bugs.webkit.org/show_bug.cgi?id=138527
Reviewed by Darin Adler.
To compare floating point numbers in the code base, we would often rely
on the following check:
std::abs(a - b) <= std::numeric_limits<T>::epsilon()
However, this is not correct for arbitrary floating point values, and
will fail for values that are not close to zero.
This patch introduces a WTF::areEssentiallyEqual() templated function
that can only be called with floating point types and relies on the
following formula from [1][2] that defines u as being "essentially
equal" to v if: | u - v | / |u| <= e and | u - v | / |v| <= e
[1] Knuth, D. E. "Accuracy of Floating Point Arithmetic." The Art of
Computer Programming. 3rd ed. Vol. 2. Boston: Addison-Wesley, 1998.
229-45.
[2] http://www.boost.org/doc/libs/1_34_0/libs/test/doc/components/test_tools/floating_point_comparison.html
* wtf/MathExtras.h:
(WTF::safeFPDivision):
(WTF::areEssentiallyEqual):
(WTF::withinEpsilon): Deleted.
2014-11-08 Darin Adler <darin@apple.com>
Replace FileThread class with a single function
https://bugs.webkit.org/show_bug.cgi?id=138282
Reviewed by Alexey Proskuryakov.
* wtf/MessageQueue.h: Made queue work on any type and not require wrapping
everything in a unique_ptr.
* wtf/Threading.cpp:
(WTF::threadEntryPoint): Changed to use a std::function instead of a function pointer.
(WTF::createThread): Add a version that takes a std::function. Reimplemented the
old version using lambdas. Removed the obsolete versions that were there just to support
binary compatibility with very old versions of Safari.
* wtf/Threading.h: Removed an incorrect license header that covers code that was long ago
moved to a different file. Changed createThread to take a std::function instead of a function
pointer and data pointer. Moved internal functions after public functions.
2014-11-05 Chris Dumez <cdumez@apple.com>
Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
https://bugs.webkit.org/show_bug.cgi?id=138440
Reviewed by Geoffrey Garen.
Move the withinEpsilon() function to WTF to avoid code duplication.
* wtf/MathExtras.h:
(WTF::withinEpsilon):
2014-11-05 Chris Dumez <cdumez@apple.com>
Allow constructing a PassRef from a Ref
https://bugs.webkit.org/show_bug.cgi?id=138389
Reviewed by Andreas Kling.
Allow constructing a PassRef from a Ref, similarly to PassRefPtr that
can be constructed from a RefPtr already. This avoids having to call
Ref::get() and simplifies the code a bit.
* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):
2014-11-05 Dan Bernstein <mitz@apple.com>
Remove the unused deletion UI feature
https://bugs.webkit.org/show_bug.cgi?id=138442
Rubber-stamped by Alexey Proskuryakov.
* wtf/FeatureDefines.h: Removed definition of ENABLE_DELETION_UI.
2014-11-03 Dean Jackson <dino@apple.com>
Add ENABLE_FILTERS_LEVEL_2 feature guard.
https://bugs.webkit.org/show_bug.cgi?id=138362
Reviewed by Tim Horton.
Add a new feature define for Level 2 of CSS Filters.
http://dev.w3.org/fxtf/filters-2/
* wtf/FeatureDefines.h:
2014-11-05 Csaba Osztrogonác <ossy@webkit.org>
Enable ARMv7 disassembler for all platforms
https://bugs.webkit.org/show_bug.cgi?id=138415
Reviewed by Darin Adler.
* wtf/Platform.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361
Reviewed by Darin Adler.
It is a very common pattern in our code base to get a pointer from a
Ref object. Previously, we have to call Ref.get() and take its address
which is not very nice. This patch adds a ptr() method to Ref class
to simplify the code a bit.
* wtf/PassRef.h:
(WTF::PassRef<T>::ptr):
* wtf/Ref.h:
(WTF::Ref::ptr):
(WTF::GetPtrHelper<Ref<T>>::getPtr):
2014-11-04 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
ATTR_USED incorrectly applying to Clang
https://bugs.webkit.org/show_bug.cgi?id=138313
Reviewed by Csaba Osztrogonác.
ATTR_USED was only intended for GCC. Also limit it to ENABLE(FTL_NATIVE_CALL_INLINING)
since that's the only thing it's needed for.
* wtf/Platform.h:
2014-11-03 Chris Dumez <cdumez@apple.com>
Allow implicit conversion from Ref<T> to T&
https://bugs.webkit.org/show_bug.cgi?id=138331
Reviewed by Andreas Kling.
Allow implicit conversion from Ref<T> to T& to reduce the amount of
Ref<>::get() calls in the code and increase readability. Unlike for
RefPtr, doing this for Ref should not be error prone.
* wtf/Ref.h:
(WTF::Ref::operator T&):
(WTF::Ref::operator const T&):
* wtf/RunLoop.cpp:
(WTF::RunLoop::Holder::runLoop):
2014-10-31 Jeffrey Pfau <jpfau@apple.com>
Unreviewed, fix ASan build after r175382
* wtf/SizeLimits.cpp:
2014-10-31 Geoffrey Garen <ggaren@apple.com>
Rolled in r175389.
WebKit was failing to build 32bit on some Apple internal systems because
those systems were configured to build bmalloc 64-bit-only. Those systems
have been updated to build bmalloc as a universal binary, so everything
should work fine now.
The relevant setting is controlled by an environment variable on the
build system, and not by the project file in the source tree, so there's
no new code change here.
Enable bmalloc in 32bit builds
https://bugs.webkit.org/show_bug.cgi?id=138232
Reviewed by Andreas Kling.
* wtf/FastMalloc.cpp:
2014-10-31 Lucas Forschler <lforschler@apple.com>
Unreviewed rollout r175389.
2014-10-30 Dana Burkart <dburkart@apple.com>
<rdar://problem/18821260> Prepare for the mysterious future
Reviewed by Lucas Forschler.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2014-10-30 Geoffrey Garen <ggaren@apple.com>
Enable bmalloc in 32bit builds
https://bugs.webkit.org/show_bug.cgi?id=138232
Reviewed by Andreas Kling.
Seems to work fine.
* wtf/FastMalloc.cpp:
2014-10-30 Jeffrey Pfau <jpfau@apple.com>
ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=138141
Reviewed by Alexey Proskuryakov.
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::derefBase):
(WTF::adopted):
2014-10-28 Milan Crha <mcrha@redhat.com>
Use constants from wtf/MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=137967
Reviewed by Darin Adler.
* wtf/MathExtras.h:
2014-10-28 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
[EFL] Remove unnecessary defines from OptionsEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=138132
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2014-10-27 Chris Dumez <cdumez@apple.com>
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=138079
Reviewed by Anders Carlsson.
Add HashTraits for C++11 strong enum types. Using integer HashTraits for
strong enums would be inconvenient as it would require casting between
integer and strong enum types.
* wtf/HashTraits.h:
(WTF::StrongEnumHashTraits::emptyValue):
(WTF::StrongEnumHashTraits::constructDeletedValue):
(WTF::StrongEnumHashTraits::isDeletedValue):
2014-10-25 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351
Unreviewed, follow-up fix after r175203. The debugger agent should not assume
that the inspector environment's stopwatch has already been started.
* wtf/Stopwatch.h:
(WTF::Stopwatch::isActive): Added. Allow peeking at the stopwatch state.
2014-10-18 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351
Reviewed by Timothy Hatcher.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
(WTF::Stopwatch::create):
(WTF::Stopwatch::Stopwatch):
(WTF::Stopwatch::reset):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):
(WTF::Stopwatch::elapsedTime):
2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to have alternate inspector agents
https://bugs.webkit.org/show_bug.cgi?id=137901
Reviewed by Brian Burg.
* wtf/FeatureDefines.h:
2014-10-23 Alberto Garcia <berto@igalia.com>
[GTK] Fix build on Hurd
https://bugs.webkit.org/show_bug.cgi?id=138003
Reviewed by Carlos Garcia Campos.
* wtf/InlineASM.h:
* wtf/Platform.h:
2014-10-22 Byungseon Shin <sun.shin@lge.com>
String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
https://bugs.webkit.org/show_bug.cgi?id=130967
Reviewed by Mark Lam.
By definition of calculateLocalTimeOffset, input time should be UTC time.
But there are many cases when input time is based on local time.
So, it gives erroneous results while calculating offset of DST boundary time.
By adding a argument to distinguish UTC and local time, we can get the correct offset.
* wtf/DateMath.cpp:
(WTF::calculateLocalTimeOffset):
(WTF::parseDateFromNullTerminatedCharacters):
Compensate time offset depends on UTC time or local time.
* wtf/DateMath.h:
Add argument to differenciate UTC or local time.
2014-10-21 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
Fix FTL Native Inlining for EFL
https://bugs.webkit.org/show_bug.cgi?id=137774
Reviewed by Michael Saboff.
Updated guard definition for Native Inlining, and added an attribute define for marking functions
that should not be left out of the symbol table.
* wtf/Platform.h:
2014-10-20 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Accessibility objects
https://bugs.webkit.org/show_bug.cgi?id=137286
Reviewed by Darin Adler.
Remove the legacy TYPE_CASTS_BASE() macro now that it is no longer
used.
* wtf/Assertions.h:
2014-10-18 Dan Bernstein <mitz@apple.com>
WorkQueue dispatches functions but isn’t a FunctionDispatcher
https://bugs.webkit.org/show_bug.cgi?id=137853
Reviewed by Anders Carlsson.
* wtf/FunctionDispatcher.h: Added header guards.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782
Reviewed by Sergio Villar Senin.
In some cases when we have a double with the time in seconds, the
conversion to milliseconds ends up truncating the value to 0, and
the source scheduled immediately.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::createMicrosecondsTimeoutSource): Use a custom timeout
source that handles the interval in microseconds instead of milliseconds.
(WTF::GMainLoopSource::scheduleAfterDelay): Use MicrosecondsTimeoutSource.
(WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Ditto.
* wtf/gobject/GMainLoopSource.h:
2014-10-17 Dan Bernstein <mitz@apple.com>
Reverted incorrect build fix attempt.
* wtf/Threading.cpp:
2014-10-17 Dan Bernstein <mitz@apple.com>
Tried to fix the Yosemite build.
* wtf/Threading.cpp:
2014-10-16 Dan Bernstein <mitz@apple.com>
OSObjectPtr is missing leakRef()
https://bugs.webkit.org/show_bug.cgi?id=137798
Reviewed by Sam Weinig.
* wtf/OSObjectPtr.h:
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
* WTF.vcxproj: Modified property svn:ignore.
2014-10-13 Antti Koivisto <antti@apple.com>
Add StringCapture helper for thread-safe lambda capture
https://bugs.webkit.org/show_bug.cgi?id=137664
Reviewed by Anders Carlsson.
There is currently no clean way to capture a String in a thread-safe manner. This will now work:
StringCapture stringCapture(string);
auto lambdaThatRunsInAnotherThread = [stringCapture] { String string = stringCapture.string(); ... }
This type won't be necessary with C++14 initialized lambda capture: [string = string.isolatedCopy()].
* wtf/text/WTFString.h:
(WTF::StringCapture::StringCapture): Create isolated copy in copy-constructor.
(WTF::StringCapture::string):
2014-10-11 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Enable WebP support.
https://bugs.webkit.org/show_bug.cgi?id=136156
Reviewed by Gyuyoung Kim.
Enable WTF_USE_WEBP macro for WK2 Efl.
* wtf/Platform.h:
2014-10-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=137485
Reviewed by Sergio Villar Senin.
We made GMainLoopSource thread safe, but in most of the cases we
know the sources are used by a single thread, which has an impact
in the performance (mutex, GCancellable, etc.). The new class
GThreadSafeMainLoopSource inherits from GMainLoopSource overriding
the new virtual methods and calling the parent for the common code.
GMutexLocker now supports recursive mutexes, it's a template that
can wrap a GMutex or a GRecMutex. GThreadSafeMainLoopSource uses a
recursive mutex using the new GMutexLocker API.
* wtf/PlatformEfl.cmake: Add new file to compilation.
* wtf/PlatformGTK.cmake: Ditto.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::GMainLoopSource):
(WTF::GMainLoopSource::~GMainLoopSource):
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::schedule):
(WTF::GMainLoopSource::scheduleAfterDelay):
(WTF::GMainLoopSource::prepareVoidCallback):
(WTF::GMainLoopSource::finishVoidCallback):
(WTF::GMainLoopSource::voidCallback):
(WTF::GMainLoopSource::prepareBoolCallback):
(WTF::GMainLoopSource::finishBoolCallback):
(WTF::GMainLoopSource::boolCallback):
(WTF::GMainLoopSource::socketCallback):
(WTF::GMainLoopSource::cancelWithoutLocking): Deleted.
* wtf/gobject/GMainLoopSource.h:
* wtf/gobject/GMutexLocker.h:
(WTF::MutexWrapper<GMutex>::lock):
(WTF::MutexWrapper<GMutex>::unlock):
(WTF::MutexWrapper<GRecMutex>::lock):
(WTF::MutexWrapper<GRecMutex>::unlock):
(WTF::GMutexLocker::GMutexLocker):
(WTF::GMutexLocker::lock):
(WTF::GMutexLocker::unlock):
* wtf/gobject/GThreadSafeMainLoopSource.cpp: Added.
(WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource):
(WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource):
(WTF::GThreadSafeMainLoopSource::cancel):
(WTF::GThreadSafeMainLoopSource::schedule):
(WTF::GThreadSafeMainLoopSource::scheduleAfterDelay):
(WTF::GThreadSafeMainLoopSource::prepareVoidCallback):
(WTF::GThreadSafeMainLoopSource::finishVoidCallback):
(WTF::GThreadSafeMainLoopSource::voidCallback):
(WTF::GThreadSafeMainLoopSource::prepareBoolCallback):
(WTF::GThreadSafeMainLoopSource::finishBoolCallback):
(WTF::GThreadSafeMainLoopSource::boolCallback):
* wtf/gobject/GThreadSafeMainLoopSource.h: Added.
2014-10-09 Dean Jackson <dino@apple.com>
Remove ENABLE_CSS3_CONDITIONAL_RULES
https://bugs.webkit.org/show_bug.cgi?id=137571
Reviewed by Simon Fraser.
* wtf/FeatureDefines.h:
2014-10-09 Akos Kiss <akiss@inf.u-szeged.hu>
Enable ARM64 disassembler for all platforms
https://bugs.webkit.org/show_bug.cgi?id=137560
Reviewed by Michael Saboff.
Remove PLATFORM conditions from around WTF_USE_ARM64_DISASSEMBLER since
the ARM64 disassembler has no platform dependencies anymore.
* wtf/Platform.h:
2014-10-08 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Enable JIT on 32-bit.
https://bugs.webkit.org/show_bug.cgi?id=137521
Reviewed by Mark Lam.
Enable JIT on Windows 32-bit, but disable it at runtime if SSE2 is not present.
* wtf/Platform.h:
2014-10-08 Brent Fulgham <bfulgham@apple.com>
[Win] Resolve warnings about missing __has_include macro under MSVC
https://bugs.webkit.org/show_bug.cgi?id=137524
Reviewed by Anders Carlsson.
* wtf/Compiler.h: Provide a dummy implementation of __has_include that
avoids the warning without changing compile behavior.
2014-10-07 Brent Fulgham <bfulgham@apple.com>
[Win] Resolve some MSVC static analyzer warnings
https://bugs.webkit.org/show_bug.cgi?id=137504
Reviewed by Dean Jackson.
* wtf/GregorianDateTime.cpp:
(WTF::GregorianDateTime::setToCurrentLocalTime): Properly handle
possible timezone error case.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::decommit): Silence a spurious warning about using
MEM_DECOMMIT instead of MEM_RELEASE.
* wtf/ThreadingWin.cpp: Silence a spurious warning about how the
tryLock method is implemented.
2014-10-07 Christophe Dumez <cdumez@apple.com>
[WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses
https://bugs.webkit.org/show_bug.cgi?id=137477
Reviewed by Andreas Kling.
Rename wtf/cf/TypeCasts.h to wtf/cf/TypeCastsCF.h to avoid conflict
with wtf/TypeCasts.h. They were using the same #ifndef guard and it
was causing problems when both were included in the same context.
* WTF.xcodeproj/project.pbxproj:
* wtf/cf/TypeCastsCF.h: Renamed from Source/WTF/wtf/cf/TypeCasts.h.
(WTF::dynamic_cf_cast):
(WTF::checked_cf_cast):
2014-10-07 Anders Carlsson <andersca@apple.com>
Try to fix the Mountain Lion build.
* wtf/text/StringView.h:
(WTF::StringView::underlyingStringIsValid):
(WTF::StringView::setUnderlyingString):
(WTF::StringView::invalidate):
2014-10-07 Anders Carlsson <andersca@apple.com>
Use "1", not "true".
* wtf/text/StringView.h:
2014-10-07 Anders Carlsson <andersca@apple.com>
Temporarily disable the StringView lifetime checking.
* wtf/text/StringView.h:
2014-10-07 Anders Carlsson <andersca@apple.com>
Another build fix attempt.
* wtf/text/StringView.cpp:
(WTF::StringView::UnderlyingString::UnderlyingString):
2014-10-07 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* wtf/text/StringView.cpp:
(WTF::StringView::UnderlyingString::UnderlyingString):
2014-10-06 Darin Adler <darin@apple.com>
Make StringView check the lifetime of the StringImpl it's created from
https://bugs.webkit.org/show_bug.cgi?id=137202
Reviewed by Anders Carlsson.
* WTF.vcxproj/WTF.vcxproj: Added StringView.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Added StringView.cpp.
* WTF.xcodeproj/project.pbxproj: Added StringView.cpp.
* wtf/CMakeLists.txt: Added StringView.cpp.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl): Call StringView::invalidate.
* wtf/text/StringView.cpp: Added.
(WTF::underlyingStrings): Returns map from StringImpl to the underlying
string object used by StringView to track validity.
(WTF::StringView::invalidate): Mark the underlying string object invalid,
and remove it from the map, so any future StringImpl will get a new one,
even if it has the same pointer.
(WTF::StringView::underlyingStringIsValid): Return true only if the
underlying string is still valid.
(WTF::StringView::setUnderlyingString): Create and manage reference counts
of underlying string objects as needed.
* wtf/text/StringView.h: Moved function bodies out of the class definition,
so we can now read a clean class definition to see the class design and what
functions it offers.
(WTF::StringView::StringView): Added a comment to the default constructor.
Also added copy and move constructors so they can call setUnderlyingString
and assert the underlying string is valid as needed, replacing the
compiler-generated ones.
(WTF::StringView::~StringView): Added a call to setUnderlyingString.
(WTF::StringView::operator=): Added these assignment operators with the same
job as the constructors above.
(WTF::StringView::initialize): Added a comment.
(WTF::StringView::characters8): Added an assertion that the underlying
string is valid.
(WTF::StringView::characters16): Ditto.
(WTF::StringView::substring): Added code to propagate the underlying string
from the original string to the substring.
(WTF::StringView::invalidate): Inline empty version of this function for
non-debug builds.
(WTF::StringView::underlyingStringIsValid): Ditto.
(WTF::StringView::setUnderlyingString): Ditto.
2014-10-06 Brent Fulgham <bfulgham@apple.com>
[Win] DateMath's calculateUTFOffset does not account for DST.
https://bugs.webkit.org/show_bug.cgi?id=137458
<rdar://problem/18559172>
Reviewed by Geoffrey Garen.
Check the return value of GetTimeZoneInformation and use the
proper bias against UTC (depending on whether we are in daylight
savings time, or standard time).
Also, handle possible error cases in the FileTimeToSystemTime
and SystemTimeToTzSpecificLocalTime, rather than using potentially
uninitialized values.
* wtf/DateMath.cpp:
(WTF::calculateUTCOffset): Use proper daylight-savings-time state.
(WTF::calculateDSTOffset): Avoid uninitialized data due to failing
API calls.
2014-10-06 Christophe Dumez <cdumez@apple.com>
Add is<>() / downcast<>() support for RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137424
Reviewed by Benjamin Poulain.
Handle correctly calling TypeCastTraits<ExpectedType, ArgType>::isOfType(ArgType&)
with ExpectedType being a base class of ArgType (or the same as ArgType). The
previous template specialization was only meant to support the case where
ExpectedType is the same as ArgType but even that wasn't working as the compiler
would complain about ambiguous partial specializations. Since this is needed by
RenderTraversal functions, this patch adds an extra isBaseType template parameter
to TypeCastTraits to resolve the ambiguity and relies on std::is_base_of for the
detection.
* wtf/TypeCasts.h:
2014-10-06 Brent Fulgham <bfulgham@apple.com>
[Win] Project file gardening.
* WTF.vcxproj/WTF.vcxproj.filters: Move HashMethod.h and
FastBitVector.cpp to proper places in hierarchy.
2014-10-04 Brian J. Burg <burg@cs.washington.edu>
Unreviewed, rolling out r174319.
Causes assertions in fast/profiler tests. Needs nontrivial
investigation, will take offline.
Reverted changeset:
"Web Inspector: timelines should not count time elapsed while
paused in the debugger"
https://bugs.webkit.org/show_bug.cgi?id=136351
http://trac.webkit.org/changeset/174319
2014-10-04 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351
Reviewed by Timothy Hatcher.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
(WTF::Stopwatch::reset):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):
2014-10-04 Filip Pizlo <fpizlo@apple.com>
FTL should sink PutLocals
https://bugs.webkit.org/show_bug.cgi?id=137168
Reviewed by Oliver Hunt.
Make the set bits of a BitVector iterable.
* wtf/BitVector.h:
(WTF::BitVector::SetBitsIterable::SetBitsIterable):
(WTF::BitVector::SetBitsIterable::iterator::iterator):
(WTF::BitVector::SetBitsIterable::iterator::operator*):
(WTF::BitVector::SetBitsIterable::iterator::operator++):
(WTF::BitVector::SetBitsIterable::iterator::operator==):
(WTF::BitVector::SetBitsIterable::iterator::operator!=):
(WTF::BitVector::SetBitsIterable::begin):
(WTF::BitVector::SetBitsIterable::end):
(WTF::BitVector::setBits):
2014-10-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174275.
https://bugs.webkit.org/show_bug.cgi?id=137408
Build failures on the internal bots. (Requested by dethbakin
on #webkit).
Reverted changeset:
"FTL should sink PutLocals"
https://bugs.webkit.org/show_bug.cgi?id=137168
http://trac.webkit.org/changeset/174275
2014-10-03 Christophe Dumez <cdumez@apple.com>
Add TypeCasts.h to xcodeproject
https://bugs.webkit.org/show_bug.cgi?id=137403
Reviewed by Benjamin Poulain.
Add TypeCasts.h to xcodeproject.
* WTF.xcodeproj/project.pbxproj:
2014-09-28 Filip Pizlo <fpizlo@apple.com>
FTL should sink PutLocals
https://bugs.webkit.org/show_bug.cgi?id=137168
Reviewed by Oliver Hunt.
Make the set bits of a BitVector iterable.
* wtf/BitVector.h:
(WTF::BitVector::SetBitsIterable::SetBitsIterable):
(WTF::BitVector::SetBitsIterable::iterator::iterator):
(WTF::BitVector::SetBitsIterable::iterator::operator*):
(WTF::BitVector::SetBitsIterable::iterator::operator++):
(WTF::BitVector::SetBitsIterable::iterator::operator==):
(WTF::BitVector::SetBitsIterable::iterator::operator!=):
(WTF::BitVector::SetBitsIterable::begin):
(WTF::BitVector::SetBitsIterable::end):
(WTF::BitVector::setBits):
2014-10-03 Myles C. Maxfield <mmaxfield@apple.com>
Support modern for loops over StringViews
https://bugs.webkit.org/show_bug.cgi?id=137165
Reviewed by Darin Adler.
This patch adds two functions, codePoints() and codeUnits(), on StringView.
These two functions return small objects which have begin() and end() functions,
which means it can be used by the modern for loop style. This small class also
has an inner iterator class which can be incremented, dereferenced, and
compared.
Using these new objects looks like this:
for (UChar codeunit : stringView.codeUnits()) { } and
for (UChar32 codepoint : stringView.codePoints()) { }.
* wtf/text/StringView.h:
(WTF::StringView::codepoints):
(WTF::StringView::codeunits):
(WTF::StringViewCodePointIterator::StringViewCodePointIterator):
(WTF::StringViewCodePointIterator::Iterator::Iterator):
(WTF::StringViewCodePointIterator::Iterator::operator*):
(WTF::StringViewCodePointIterator::Iterator::operator!=):
(WTF::StringViewCodeUnitIterator::StringViewCodeUnitIterator):
(WTF::StringViewCodeUnitIterator::Iterator::Iterator):
(WTF::StringViewCodeUnitIterator::Iterator::operator*):
(WTF::StringViewCodeUnitIterator::Iterator::operator!=):
2014-09-28 Sam Weinig <sam@webkit.org>
Remove RefPtrHashMap
https://bugs.webkit.org/show_bug.cgi?id=137200
Reviewed by Darin Adler.
HashMap now has all the features of the RefPtr specialization of HashMap
(which lived in RefPtrHashMap.h) and is in fact more efficient when moving
items into it. For instance:
For HashMap<RefPtr<Foo>, Bar> map:
RefPtr<Foo> foo = ...;
map.add(WTF::move(foo), Bar());
will now not cause a ref() / deref(), but will successfully move the item in
without churn. The same is true if foo.release() was used.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Remove references to RefPtrHashMap.h.
* wtf/RefPtrHashMap.h: Removed.
* wtf/HashMap.h:
Remove #include of RefPtrHashMap.h and add inlineGet to match the interface
exposed by the RefPtrHashMap specialization.
2014-10-02 Anders Carlsson <andersca@apple.com>
Add back debugging/testing code that I accidentally removed.
* wtf/text/StringConcatenate.h:
(WTF::StringTypeAdapter<String>::writeTo):
2014-10-02 Anders Carlsson <andersca@apple.com>
Simplify StringTypeAdapter templates
https://bugs.webkit.org/show_bug.cgi?id=137356
Reviewed by Andreas Kling.
* wtf/text/StringConcatenate.h:
Use StringView for copying characters. Use inheritance for char* vs const char* etc. Make all StringAdapter member functions const.
* wtf/text/StringView.h:
Move enough functions out of line so we can include WTFString.h after the StringView class definition.
2014-10-01 Christophe Dumez <cdumez@apple.com>
Have is<>(T*) function do a null check on the pointer argument
https://bugs.webkit.org/show_bug.cgi?id=137333
Reviewed by Gavin Barraclough.
Have is<>(T*) function do a null check on the argument instead of a
simple assertion. This makes sense for 2 reasons:
1. It is more consistent with downcast<>(T*), which will succeed even
if the argument is a nullptr.
2. It simplifies the code a bit as it gets rid of a lot of explicit
null checks.
* wtf/TypeCasts.h:
(WTF::is):
2014-10-02 Daniel Bates <dabates@apple.com>
Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
https://bugs.webkit.org/show_bug.cgi?id=137277
Reviewed by Alexey Proskuryakov.
Towards centralizing the declarations of XPC functions used in JavaScriptCore
and WebKit2, add a header that wraps these function declarations called XPCSPI.h
and use it instead of including the corresponding XPC API/SPI headers/forward
declaring XPC functions. This will also aid in the effort to make WebKit2 build
for iOS with the public iOS SDK.
* WTF.xcodeproj/project.pbxproj:
* wtf/spi/darwin/XPCSPI.h: Added.
2014-10-01 Christophe Dumez <cdumez@apple.com>
Unreviewed build fix after r174193.
Adding a return statement as that function is returning a boolean.
* wtf/TypeCasts.h:
(WTF::TypeCastTraits::isOfType):
2014-10-01 Christophe Dumez <cdumez@apple.com>
Fail better when is<>() / downcast<>() is used for an unsupported type
https://bugs.webkit.org/show_bug.cgi?id=137323
Reviewed by Benjamin Poulain.
We should fail better when is<>() / downcast<>() is used for an
unsupported type (i.e. a type that doesn't have the needed
TypeCastTraits template specialization). Previously, we would get an
obscure linking error, which was sub-optimal.
With this patch, you would now hit a static_assert() at build time if
you tried to use is<>() / downcast<>() for a type that did not have the
needed template specialization. There is also a helpful comment above
the assertion letting the developer know how to add the needed template
specialization.
* wtf/TypeCasts.h:
(WTF::TypeCastTraits::isOfType):
2014-10-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174180, r174183, and r174186.
https://bugs.webkit.org/show_bug.cgi?id=137320
Broke the Mac MountainLion build. Will investigate offline.
(Requested by dydz on #webkit).
Reverted changesets:
"Clean up: Move XPC forward declarations in JavaScriptCore to
WTF SPI wrapper header"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174180
"Attempt to fix the build after
<https://trac.webkit.org/changeset/174180>"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174183
"Another attempt to fix the Mac build after
<https://trac.webkit.org/changeset/174180>"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174186
2014-10-01 Daniel Bates <dabates@apple.com>
Another attempt to fix the Mac build after <https://trac.webkit.org/changeset/174180>
(https://bugs.webkit.org/show_bug.cgi?id=137277)
Include header AvailabilityMacros.h instead of Availability.h, which actually defines the
macro __MAC_OS_X_VERSION_MIN_REQUIRED.
* wtf/spi/darwin/XPCSPI.h:
2014-10-01 Daniel Bates <dabates@apple.com>
Attempt to fix the build after <https://trac.webkit.org/changeset/174180>
(https://bugs.webkit.org/show_bug.cgi?id=137277)
Include header <Availability.h> for the definition of __MAC_OS_X_VERSION_MIN_REQUIRED.
Also, we want to define CONST_ON_OR_AFTER_MAC_OS_X_VERSION_1090 to be const when building
on iOS.
* wtf/spi/darwin/XPCSPI.h:
2014-10-01 Daniel Bates <dabates@apple.com>
Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
https://bugs.webkit.org/show_bug.cgi?id=137277
Reviewed by Alexey Proskuryakov.
Towards centralizing the declarations of XPC functions used in JavaScriptCore
and WebKit2, add a header that wraps these function declarations called XPCSPI.h
and use it instead of including the corresponding XPC API/SPI headers/forward
declaring XPC functions. This will also aid in the effort to make WebKit2 build
for iOS with the public iOS SDK.
* WTF.xcodeproj/project.pbxproj:
* wtf/spi/darwin/XPCSPI.h: Added.
2014-10-01 Brent Fulgham <bfulgham@apple.com>
[Win] 32-bit JavaScriptCore should limit itself to the C loop
https://bugs.webkit.org/show_bug.cgi?id=137304
<rdar://problem/18375370>
Reviewed by Michael Saboff.
* wtf/Platform.h: Force the C loop when building for 32-bit Windows.
2014-09-30 Christophe Dumez <cdumez@apple.com>
Generalize is<>() / downcast<>() support to all types
https://bugs.webkit.org/show_bug.cgi?id=137243
Reviewed by Benjamin Poulain.
Generalize is<>() / downcast<>() support to all types, not just Nodes.
* wtf/Assertions.h:
* wtf/TypeCasts.h: Added.
(WTF::is):
(WTF::downcast):
2014-09-30 Anders Carlsson <andersca@apple.com>
Get the STRING_STATS codepath compiling again, and add calls to ref/deref
https://bugs.webkit.org/show_bug.cgi?id=137259
Reviewed by Andreas Kling.
* wtf/text/StringImpl.cpp:
(WTF::StringStats::removeString):
(WTF::StringStats::printStats):
(WTF::StringImpl::~StringImpl):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::isSubString):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
(WTF::StringStats::addUpconvertedString): Deleted.
2014-09-30 Daniel Bates <dabates@apple.com>
REGRESSION (r172532): JSBase.h declares NSMapTable functions that are SPI
https://bugs.webkit.org/show_bug.cgi?id=137170
<rdar://problem/18477384>
Reviewed by Geoffrey Garen.
Add SPI wrapper header, NSMapTableSPI.h.
Additionally, define convenience macro EXTERN_C that can be used to specify the C linkage
convention for a declaration. For example, the declaration "EXTERN_C const int x;" will
expand to:
extern const int x;
and
extern "C" const int x;
when used in a C and C++ file, respectively.
* WTF.xcodeproj/project.pbxproj:
* wtf/Compiler.h:
* wtf/spi/cocoa/NSMapTableSPI.h: Added.
2014-09-29 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174045.
https://bugs.webkit.org/show_bug.cgi?id=137231
Introduced a crash during page loading tests on Mac (Requested
by rniwa on #webkit).
Reverted changeset:
"Replace OSObjectPtr with RetainPtr/adoptOS"
https://bugs.webkit.org/show_bug.cgi?id=137158
http://trac.webkit.org/changeset/174045
2014-09-26 Sam Weinig <sam@webkit.org>
Replace OSObjectPtr with RetainPtr/adoptOS
https://bugs.webkit.org/show_bug.cgi?id=137158
Reviewed by Dan Bernstein.
* WTF.xcodeproj/project.pbxproj:
* wtf/OSObjectPtr.h: Removed.
* wtf/RetainPtr.h:
(WTF::adoptOS):
Added. This adopt function is slightly different than both adoptCF and adoptNS,
in that unlike adoptCF(), it can be passed an Objective-C type (since OS objects
are sometimes Objective-C objects, but not always), and unlike adoptNS() it doesn't
require us to jump through hoops to appease GC (since OS objects are not Objective-C
objects if GC is enabled).
2014-09-24 Filip Pizlo <fpizlo@apple.com>
FTL should sink object allocations
https://bugs.webkit.org/show_bug.cgi?id=136330
Reviewed by Oliver Hunt.
Make it possible to reset a Bag.
* wtf/Bag.h:
(WTF::Bag::Bag):
(WTF::Bag::~Bag):
(WTF::Bag::clear):
2014-09-25 Roger Fong <roger_fong@apple.com>
[Windows] Unreviewed build fix. Ensure that python2.7 is used for Windows builds.
* WTF.vcxproj/WTFGenerated.make:
2014-09-25 Csaba Osztrogonác <ossy@webkit.org>
Remove WinCE port from trunk
https://bugs.webkit.org/show_bug.cgi?id=136951
Reviewed by Alex Christensen.
* config.h:
* wtf/Assertions.cpp:
* wtf/Assertions.h:
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
* wtf/CurrentTime.cpp:
(WTF::lowResUTCTime):
* wtf/DataLog.cpp:
* wtf/DateMath.cpp:
(WTF::getLocalTime):
(WTF::calculateDSTOffset):
* wtf/FastMalloc.cpp:
* wtf/FeatureDefines.h:
* wtf/OSAllocator.h:
(WTF::OSAllocator::decommitAndRelease):
* wtf/Platform.h:
* wtf/PlatformWin.cmake:
* wtf/RAMSize.cpp:
(WTF::computeRAMSize):
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
* wtf/StackBounds.h:
(WTF::StackBounds::isGrowingDownward):
* wtf/StdLibExtras.h:
(wtf_bsearch): Deleted.
* wtf/StringExtras.h:
(strnicmp): Deleted.
(stricmp): Deleted.
(strdup): Deleted.
* wtf/ThreadSpecific.h:
* wtf/ThreadingWin.cpp:
(WTF::createThreadInternal):
* wtf/WindowsExtras.h:
(WTF::getRegistryValue):
(WTF::getWindowPointer):
(WTF::setWindowPointer):
* wtf/dtoa/utils.h:
* wtf/text/WTFString.cpp:
(WTF::String::format):
2014-09-24 Geoffrey Garen <ggaren@apple.com>
Do the bmalloc.
https://bugs.webkit.org/show_bug.cgi?id=132629
Reviewed by Gavin Barraclough.
64-bit only for now, just to try it out.
* wtf/FastMalloc.cpp:
2014-09-23 Geoffrey Garen <ggaren@apple.com>
Rolled out r173346.
bmalloc should honor the FastMalloc statistics API
https://bugs.webkit.org/show_bug.cgi?id=136592
This didn't really work. Because we allow ranges with and without
physical pages to merge, and we allow double-committing and
double-decommitting, we can't rely on commit actions to track memory
footprint.
* wtf/FastMalloc.cpp:
(WTF::fastMallocStatistics):
2014-09-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
https://bugs.webkit.org/show_bug.cgi?id=136893
Reviewed by Timothy Hatcher.
Currently automatic inspection only happens in processes that have a
debugger attached. That condition may change in the future, but this
function can stand on its own in WTF. It may be useful in the future
to perhaps continue though ASSERTs if you have a debugger attached.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2014-09-22 Sam Weinig <sam@webkit.org>
Eliminate redundant PtrHash specializations
https://bugs.webkit.org/show_bug.cgi?id=136990
Reviewed by Darin Adler.
Now that we have IsSmartPtr, we can eliminate all the specializations
of PtrHash that we had (for RefPtr, OwnPtr, RetainPtr, and std::unique_ptr)
and instead just have one that uses GetPtrHelper.
No changes of behavior intended.
* wtf/GetPtr.h:
Remove unnecessary const_cast that Darin noticed.
* wtf/HashFunctions.h:
(WTF::PtrHash::hash): Deleted.
(WTF::PtrHash::equal): Deleted.
(WTF::PtrHash<RefPtr<P>>::hash): Deleted.
(WTF::PtrHash<RefPtr<P>>::equal): Deleted.
Specialize PtrHash based on whether the type is a smart pointer, and use GetPtrHelper
to implement the smart pointer specialized variant.
* wtf/HashMap.h:
Remove include of GetPtr.h that is now included by HashFunctions.h
* wtf/OwnPtr.h:
(WTF::PtrHash<OwnPtr<P>>::hash): Deleted.
(WTF::PtrHash<OwnPtr<P>>::equal): Deleted.
Remove unnecessary specialization of PtrHash.
* wtf/RetainPtr.h:
(WTF::PtrHash<RetainPtr<P>>::hash): Deleted.
(WTF::PtrHash<RetainPtr<P>>::equal): Deleted.
Specialize IsSmartPointer for RetainPtr and remove the then unnecessary specialization of PtrHash.
(This is already tested in the API test WTF/cf/RetainPtrHashing).
2014-09-20 Sam Weinig <sam@webkit.org>
Make possible HashSet<std::unique_ptr<>>
https://bugs.webkit.org/show_bug.cgi?id=136166
Reviewed by Darin Adler.
* wtf/GetPtr.h:
(WTF::getPtr):
(WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr):
Make specializing GetPtrHelper a bit cleaner (you don't have to put
IsSmartPtr<T>::value everywhere any more) and add specializations for
std::unique_ptr.
* wtf/HashFunctions.h:
(WTF::PtrHash<std::unique_ptr<P>>):
Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash
for it as well.
* wtf/HashMap.h:
* wtf/HashSet.h:
Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that
take the raw pointer type as the parameter. These use SFINAE to make themselves only available
when the IsSmartPtr<KeyType>::value is true.
* wtf/HashTraits.h:
Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization
since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue
and function named isHashTableDeletedValue().
* wtf/OwnPtr.h:
(WTF::OwnPtr::OwnPtr):
(WTF::OwnPtr::isHashTableDeletedValue):
(WTF::OwnPtr::hashTableDeletedValue):
Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue()
hash traits to work.
(WTF::PtrHash<OwnPtr<P>>::hash):
(WTF::PtrHash<OwnPtr<P>>::equal):
Add specialization for PtrHash for OwnPtr and set it as the DefaultHash
for it as well.
* wtf/Ref.h:
Update for the less verbose GetPtrHelper specialization.
2014-09-19 Chris Dumez <cdumez@apple.com>
Allow DOM methods to return references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=136931
Add support for having WTF::getPtr() transform reference arguments
into raw pointers so that DOM methods can now return references when
appropriate and so that the generated bindings code can handle this
via WTF::getPtr().
This patch had to alter the way getPtr() was overloaded for smart
pointer types so that we don't call &p on smart pointers but p.get().
This was needed because the new WTF::getPtr(T&) was being called for
RefPtr<T> arguments instead of the getPtr(const RefPtr<T>&) overload.
This was addressed using traits and template specialization to
distinguish WTF smart pointers from other types.
Reviewed by Sam Weinig.
* wtf/GetPtr.h:
(WTF::getPtr):
* wtf/OwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassOwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassRefPtr.h:
(WTF::getPtr): Deleted.
* wtf/Ref.h:
* wtf/RefPtr.h:
(WTF::getPtr): Deleted.
* wtf/gobject/GRefPtr.h:
(WTF::getPtr): Deleted.
2014-09-19 Daniel Bates <dabates@apple.com>
Always assume internal SDK when building configuration Production
https://bugs.webkit.org/show_bug.cgi?id=136925
<rdar://problem/18362399>
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2014-09-19 Diego Pino Garcia <dpino@igalia.com>
Simple ES6 feature:String prototype additions
https://bugs.webkit.org/show_bug.cgi?id=131704
Reviewed by Darin Adler.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::equalInner): Added.
(WTF::StringImpl::startsWith): Add implementation that supports
'startOffset' parameter.
(WTF::StringImpl::endsWith): Add implementation that supports
'endOffset' parameter.
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::contains): Modify current implementation to allow
setting a startOffset, 0 by default.
(WTF::String::startsWith):
(WTF::String::endsWith):
2014-09-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Dot not allow to create delete-on-destroy GMainLoopSources
https://bugs.webkit.org/show_bug.cgi?id=136923
Reviewed by Gustavo Noronha Silva.
We have several asserts to ensure that delete-on-destroy sources
are not misused, like not scheduling socket sources on a
delete-on-destroy GMainLoopSource or not allowing to cancel them
before they have been dispatched. It's better to ensure all those
things at compile time, using static methods to schedule sources
creating a delete-on-destroy GMainLoopSource that is not returned
to the user.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::create): Private static method to create a
delete-on-destroy GMainLoopSource.
(WTF::GMainLoopSource::cancelWithoutLocking): Return early in case
of delete-on-destroy source, since they can't be cancelled.
(WTF::GMainLoopSource::schedule): Remove assertion to ensure
socket sources are not scheduled on a delete-on-destroy GMainLoopSource.
(WTF::GMainLoopSource::scheduleAndDeleteOnDestroy):
(WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy):
(WTF::GMainLoopSource::createAndDeleteOnDestroy): Deleted.
* wtf/gobject/GMainLoopSource.h:
* wtf/gtk/MainThreadGtk.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread): Use GMainLoopSource::scheduleAndDeleteOnDestroy()
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::wakeUp): Ditto.
2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed rollout r173731. Broke multiple builds.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
https://bugs.webkit.org/show_bug.cgi?id=136893
Reviewed by Timothy Hatcher.
Currently automatic inspection only happens in processes that have a
debugger attached. That condition may change in the future, but this
function can stand on its own in WTF. It may be useful in the future
to perhaps continue though ASSERTs if you have a debugger attached.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2014-09-18 Zan Dobersek <zdobersek@igalia.com>
GMainLoopSource is exposed to race conditions
https://bugs.webkit.org/show_bug.cgi?id=135800
Reviewed by Carlos Garcia Campos.
GMainLoopSource objects can be dispatching tasks on one thread
while having a new task scheduled on a different thread. This
can for instance occur in WebKitVideoSink, where the timeout
callback can be called on main thread while at the same time
it is being rescheduled on a different thread (created through
GStreamer).
The initial solution is to use GMutex to prevent parallel data
access from different threads. In the future I plan to look at
the possibility of creating thread-specific GMainLoopSource
objects that wouldn't require the use of GMutex.
GSource, GCancellable and std::function<> objects are now packed
into an internal Context structure. Using the C++11 move semantics
it's simple to, at the time of dispatch, move the current context
out of the GMainLoopSource object in case the dispatch causes a
rescheduling on that same object.
Also added in the Context struct is a new GCancellable. The pointer
of that object is shared with the GMainLoopSource before the Context
is moved out for the callback dispatch. This makes it safe to cancel
or even delete the GMainLoopSource during the dispatch and prevents
use-after-delete on GMainLoopSource once the dispatch is done in
the GMainLoopSource::*Callback() methods.
All the schedule*() methods and the cancelWithoutLocking() method
callers now lock the GMutex to ensure no one else is accessing the
data at that moment. Similar goes for the dispatch methods, but those
do the dispatch and possible destruction duties with the mutex unlocked.
The dispatch can cause rescheduling on the same GMainLoopSource object,
which must not be done with a locked mutex.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::GMainLoopSource):
(WTF::GMainLoopSource::~GMainLoopSource):
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::cancelWithoutLocking):
(WTF::GMainLoopSource::scheduleIdleSource):
(WTF::GMainLoopSource::schedule):
(WTF::GMainLoopSource::scheduleTimeoutSource):
(WTF::GMainLoopSource::scheduleAfterDelay):
(WTF::GMainLoopSource::voidCallback):
(WTF::GMainLoopSource::boolCallback):
(WTF::GMainLoopSource::socketCallback):
(WTF::GMainLoopSource::socketSourceCallback):
(WTF::GMainLoopSource::Context::destroySource):
(WTF::GMainLoopSource::reset): Deleted.
(WTF::GMainLoopSource::destroy): Deleted.
* wtf/gobject/GMainLoopSource.h:
2014-09-17 Daniel Bates <dabates@apple.com>
Unreviewed, rolling out r173695.
Broke building third-party Legacy WebKit apps; will
investigate offline
Reverted changeset:
"[iOS] Make WebCore build with public iOS SDK"
https://bugs.webkit.org/show_bug.cgi?id=136487
http://trac.webkit.org/changeset/173695
2014-09-17 Benjamin Poulain <bpoulain@apple.com>
CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
https://bugs.webkit.org/show_bug.cgi?id=136807
Reviewed by Antti Koivisto.
* wtf/text/AtomicString.h:
(WTF::AtomicString::find):
2014-09-17 Daniel Bates <dabates@apple.com>
[iOS] Make WebCore build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136487
Reviewed by David Kilzer.
Define convenience macro EXTERN_C that can be used to specify the C linkage convention
for a declaration. For example, the declaration "EXTERN_C const int x;" will expand to:
extern const int x;
and
extern "C" const int x;
when used in a C and C++ file, respectively.
* wtf/Compiler.h:
2014-09-16 Filip Pizlo <fpizlo@apple.com>
Unreviewed, disable native inlining because it causes build failures.
* wtf/Platform.h:
2014-09-15 Jer Noble <jer.noble@apple.com>
[Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
https://bugs.webkit.org/show_bug.cgi?id=135042
Reviewed by Eric Carlson.
* wtf/Platform.h: Add WTF_USE_MEDIATOOLBOX.
2014-09-15 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Make it easier to enable/disable GStreamer.
https://bugs.webkit.org/show_bug.cgi?id=135766
Reviewed by Brent Fulgham.
Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.
* WTF.vcxproj/WTFDebugWinCairo.props: Import GStreamer property file.
* WTF.vcxproj/WTFReleaseWinCairo.props: Ditto.
* wtf/Platform.h: Enable GStreamer if ENABLE(GSTREAMER_WINCAIRO) is true, otherwise use Media Foundation.
2014-09-10 Jon Honeycutt <jhoneycutt@apple.com>
Re-add the request autocomplete feature
<https://bugs.webkit.org/show_bug.cgi?id=136730>
This feature was rolled out in r148731 because it was only used by
Chromium. As we consider supporting this feature, roll it back in, but
leave it disabled.
This rolls out r148731 (which removed the feature) with small changes
needed to make the code build in ToT, to make the tests run, and to
remove unused code.
Reviewed by Andy Estes.
* wtf/FeatureDefines.h:
2014-09-12 Tim Horton <timothy_horton@apple.com>
Swiping back from a Twitter image to Twitter flashes to the wrong position
https://bugs.webkit.org/show_bug.cgi?id=136798
<rdar://problem/18324338>
Reviewed by Darin Adler and Sam Weinig.
* wtf/RunLoop.h:
(WTF::RunLoop::TimerBase::startRepeating):
Add a std::chrono veresion of RunLoop::TimerBase::startRepeating.
2014-09-12 Geoffrey Garen <ggaren@apple.com>
Rolled out r173540.
It broke the Membuster performance bot, and it's still slightly profligate
with memory.
Do the bmalloc.
https://bugs.webkit.org/show_bug.cgi?id=132629
* wtf/FastMalloc.cpp:
2014-09-11 Geoffrey Garen <ggaren@apple.com>
Do the bmalloc.
https://bugs.webkit.org/show_bug.cgi?id=132629
Reviewed by Michael Saboff.
64-bit only for now, just to try it out.
* wtf/FastMalloc.cpp:
2014-09-09 Benjamin Poulain <bpoulain@apple.com>
Disable the "unreachable-code" warning
https://bugs.webkit.org/show_bug.cgi?id=136677
Reviewed by Darin Adler.
The warning causes various build errors depending on which Clang you are using.
For example, with recent clangs, it breaks all the ARCHS dependent code like this:
if (sizeof(uintptr_t) == 4)
// Something for 32 bits.
else
// Somethign for 64 bits.
* Configurations/Base.xcconfig:
2014-09-07 Filip Pizlo <fpizlo@apple.com>
DFG should have a reusable SSA builder
https://bugs.webkit.org/show_bug.cgi?id=136331
Reviewed by Oliver Hunt.
Update the alloc() method to use variadic templates. This makes it more natural to use.
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::alloc):
2014-09-08 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove FILTERS flag
https://bugs.webkit.org/show_bug.cgi?id=136571
Reviewed by Darin Adler.
* wtf/FeatureDefines.h:
2014-09-08 Dan Bernstein <mitz@apple.com>
HAVE(VOUCHERS) is not available outside of WebKit2
https://bugs.webkit.org/show_bug.cgi?id=136637
Reviewed by Tim Horton.
* wtf/Platform.h: Moved the definition of HAVE_VOUCHERS from WebKit2’s config.h here.
2014-09-08 Tim Horton <timothy_horton@apple.com>
Try to fix the build after r173383, part 2.
* wtf/OSObjectPtr.h:
2014-09-08 Tim Horton <timothy_horton@apple.com>
Try to fix the build after r173383.
* wtf/OSObjectPtr.h:
2014-09-07 Sam Weinig <sam@webkit.org>
Make OSObjectPtr a bit more like RefPtr
https://bugs.webkit.org/show_bug.cgi?id=136613
Reviewed by Darin Adler.
Address some of Darin's feedback by:
- Making the adopting constructor private and friending adoptOSObject().
- Implementing the assignment operator using swap.
- Adding a move assignment operator.
* wtf/OSObjectPtr.h:
(WTF::OSObjectPtr::operator=):
(WTF::OSObjectPtr::swap):
(WTF::OSObjectPtr::OSObjectPtr):
2014-09-08 Jessie Berlin <jberlin@apple.com>
More build fixes after r173374.
* wtf/dtoa/strtod.cc:
2014-09-08 Jessie Berlin <jberlin@apple.com>
Build fix after r173374.
* wtf/dtoa/strtod.cc:
2014-09-08 Jessie Berlin <jberlin@apple.com>
Speculative build fix after r173364.
* wtf/dtoa/strtod.cc:
2014-09-07 Maciej Stachowiak <mjs@apple.com>
Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it
https://bugs.webkit.org/show_bug.cgi?id=136616
Reviewed by Darin Adler.
* wtf/Compiler.h: Define the quirk for all compilers but clang.
2014-09-06 Sam Weinig <sam@webkit.org>
XPCPtr should be converted into an all purpose smart pointer for os_objects
https://bugs.webkit.org/show_bug.cgi?id=136602
Reviewed by Darin Adler.
* WTF.xcodeproj/project.pbxproj:
* wtf/OSObjectPtr.h: Copied from Source/WebKit2/Platform/IPC/mac/XPCPtr.h.
(WTF::retainOSObject):
(WTF::releaseOSObject):
(WTF::OSObjectPtr::OSObjectPtr):
(WTF::OSObjectPtr::~OSObjectPtr):
(WTF::OSObjectPtr::operator=):
(WTF::adoptOSObject):
(IPC::XPCPtr::XPCPtr): Deleted.
(IPC::XPCPtr::~XPCPtr): Deleted.
(IPC::XPCPtr::operator=): Deleted.
(IPC::adoptXPC): Deleted.
Rename/move XPCPtr to OSObjectPtr and make it work with any os_object.
2014-09-06 Darin Adler <darin@apple.com>
Make updates suggested by new version of Xcode
https://bugs.webkit.org/show_bug.cgi?id=136603
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE,
COMBINE_HIDPI_IMAGES, and ENABLE_STRICT_OBJC_MSGSEND as suggested by
Xcode upgrade check.
* WTF.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
2014-09-05 Geoffrey Garen <ggaren@apple.com>
bmalloc should honor the FastMalloc statistics API
https://bugs.webkit.org/show_bug.cgi?id=136592
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
(WTF::fastMallocStatistics):
2014-09-05 Geoffrey Garen <ggaren@apple.com>
bmalloc should honor the FastMalloc scavenging API
https://bugs.webkit.org/show_bug.cgi?id=136588
Reviewed by Andreas Kling.
* wtf/FastMalloc.cpp:
(WTF::releaseFastMallocFreeMemory):
2014-09-05 Geoffrey Garen <ggaren@apple.com>
Rolled out <http://trac.webkit.org/changeset/173313>.
It seems to have broken the PLT bot.
Do the bmalloc.
https://bugs.webkit.org/show_bug.cgi?id=132629
* wtf/FastMalloc.cpp:
2014-06-06 Jer Noble <jer.noble@apple.com>
Refactoring: make MediaTime the primary time type for audiovisual times.
https://bugs.webkit.org/show_bug.cgi?id=133579
Reviewed by Eric Carlson.
Add a unary minus operator, and add unimplemented private casting operators, to make
unintentional double->MediaTime and MediaTime->double casts hard errors.
* wtf/MediaTime.cpp:
(WTF::MediaTime::operator-):
* wtf/MediaTime.h:
2014-09-04 Geoffrey Garen <ggaren@apple.com>
Do the bmalloc.
https://bugs.webkit.org/show_bug.cgi?id=132629
Reviewed by Michael Saboff.
64-bit only for now, just to try it out.
* wtf/FastMalloc.cpp:
2014-09-05 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
Enable GenGC on ARM Traditional
https://bugs.webkit.org/show_bug.cgi?id=136567
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2014-09-04 Filip Pizlo <fpizlo@apple.com>
Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
https://bugs.webkit.org/show_bug.cgi?id=136520
Fix bug found in Geoff's review but not landed in previous commit.
* wtf/BitVector.cpp:
(WTF::BitVector::equalsSlowCaseFast): return true.
2014-09-03 Filip Pizlo <fpizlo@apple.com>
Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
https://bugs.webkit.org/show_bug.cgi?id=136520
Reviewed by Geoffrey Garen.
Give BitVector a way to quickly find the next set (or unset) bit. Make BitVector equality
faster. Fix a minor closure goof in Spectrum.
* wtf/BitVector.cpp:
(WTF::BitVector::equalsSlowCase):
(WTF::BitVector::equalsSlowCaseFast):
(WTF::BitVector::equalsSlowCaseSimple):
* wtf/BitVector.h:
(WTF::BitVector::findBit):
(WTF::BitVector::findBitFast):
(WTF::BitVector::findBitSimple):
(WTF::BitVector::findBitInWord):
* wtf/Spectrum.h:
(WTF::Spectrum::removeIf):
2014-09-04 Anders Carlsson <andersca@apple.com>
Make hash table classes final
https://bugs.webkit.org/show_bug.cgi?id=136540
Reviewed by Antti Koivisto.
We don't want anybody inheriting from these classes, so make them final.
* wtf/HashCountedSet.h:
* wtf/HashMap.h:
* wtf/HashSet.h:
2014-09-04 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove CSS_FILTERS flag
https://bugs.webkit.org/show_bug.cgi?id=136529
Reviewed by Dirk Schulze.
* wtf/FeatureDefines.h:
2014-09-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r173201.
https://bugs.webkit.org/show_bug.cgi?id=136538
Improves the situation but also introduces additional crashes.
(Requested by zdobersek on #webkit).
Reverted changeset:
"GMainLoopSource is exposed to race conditions"
https://bugs.webkit.org/show_bug.cgi?id=135800
http://trac.webkit.org/changeset/173201
2014-09-04 Pratik Solanki <psolanki@apple.com>
Remove iOS specific disk image cache
https://bugs.webkit.org/show_bug.cgi?id=136517
Reviewed by Antti Koivisto.
Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
this now since we don't enable it in WebKit2 on iOS.
* wtf/FeatureDefines.h:
2014-09-03 Dan Bernstein <mitz@apple.com>
Get rid of HIGH_DPI_CANVAS leftovers
https://bugs.webkit.org/show_bug.cgi?id=136491
Reviewed by Benjamin Poulain.
* wtf/FeatureDefines.h: Removed definition of ENABLE_HIGH_DPI_CANVAS.
2014-09-03 Zan Dobersek <zdobersek@igalia.com>
GMainLoopSource is exposed to race conditions
https://bugs.webkit.org/show_bug.cgi?id=135800
Reviewed by Carlos Garcia Campos.
GMainLoopSource objects can be dispatching tasks on one thread
while having a new task scheduled on a different thread. This
can for instance occur in WebKitVideoSink, where the timeout
callback can be called on main thread while at the same time
it is being rescheduled on a different thread (created through
GStreamer).
The initial solution is to use GMutex to prevent parallel data
access from different threads. In the future I plan to add better
assertions, some meaningful comments and look at the possibility
of creating thread-specific GMainLoopSource objects that wouldn't
require the use of GMutex.
GSource, GCancellable and std::function<> objects are now packed
into an internal Context structure. Using the C++11 move semantics
it's simple to, at the time of dispatch, move the current context
out of the GMainLoopSource object in case the dispatch causes a
rescheduling on that same object.
All the schedule*() methods and the cancelInternal() method callers
now lock the GMutex to ensure no one else is accessing the data at
that moment. Similar goes for the dispatch methods, but those do
the dispatch and possible destruction duties with the mutex unlocked.
The dispatch can cause rescheduling on the same GMainLoopSource object,
which must not be done with a locked mutex.
* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::GMainLoopSource):
(WTF::GMainLoopSource::~GMainLoopSource):
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::cancelInternal):
(WTF::GMainLoopSource::scheduleIdleSource):
(WTF::GMainLoopSource::schedule):
(WTF::GMainLoopSource::scheduleTimeoutSource):
(WTF::GMainLoopSource::scheduleAfterDelay):
(WTF::GMainLoopSource::voidCallback):
(WTF::GMainLoopSource::boolCallback):
(WTF::GMainLoopSource::socketCallback):
(WTF::GMainLoopSource::destroy):
(WTF::GMainLoopSource::reset): Deleted.
* wtf/gobject/GMainLoopSource.h:
2014-09-02 Daniel Bates <dabates@apple.com>
[iOS] Support using Foundation networking code
https://bugs.webkit.org/show_bug.cgi?id=136467
Reviewed by Pratik Solanki.
Disable USE(CFNETWORK) and use the Foundation networking code by default when building
iOS WebKit without the Apple Internal SDK.
* wtf/Platform.h:
2014-08-26 Maciej Stachowiak <mjs@apple.com>
Use RetainPtr::autorelease in some places where it seems appropriate
https://bugs.webkit.org/show_bug.cgi?id=136280
Reviewed by Darin Adler.
* wtf/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *): Use autorelease() instead of
CFBridgingRelease(leakRef())
2014-08-29 Joseph Pecoraro <pecoraro@apple.com>
JavaScriptCore: Use ASCIILiteral where possible
https://bugs.webkit.org/show_bug.cgi?id=136179
Reviewed by Michael Saboff.
* wtf/text/WTFString.cpp:
(asciiDebug):
2014-08-27 Filip Pizlo <fpizlo@apple.com>
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"
https://bugs.webkit.org/show_bug.cgi?id=93361
Reviewed by Mark Hahnenberg.
Make BitVector operations return the previous value of the bit you're changing. This is
useful for the kinds of set operations that are commonplace in compiler graph searches.
* wtf/BitVector.h:
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
(WTF::BitVector::set):
(WTF::BitVector::ensureSizeAndSet):
(WTF::BitVector::clear):
2014-08-27 Filip Pizlo <fpizlo@apple.com>
FTL should be able to do polymorphic call inlining
https://bugs.webkit.org/show_bug.cgi?id=135145
Reviewed by Geoffrey Garen.
Add some power that I need for call edge profiling.
* wtf/OwnPtr.h:
(WTF::OwnPtr<T>::createTransactionally):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::addAll):
(WTF::Spectrum::get):
(WTF::Spectrum::size):
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(WTF::Spectrum::clear):
(WTF::Spectrum::removeIf):
2014-08-27 Nico Weber <thakis@chromium.org>
Delete a MSVS2010 workaround.
https://bugs.webkit.org/show_bug.cgi?id=136321
Reviewed by Benjamin Poulain.
Ports https://codereview.chromium.org/512923004/ by the talented
Nico Weber from Blink. No intended behavior change.
* wtf/Vector.h:
(WTF::=):
2014-08-27 Mark Rowe <mrowe@apple.com>
JavaScriptCore is missing debug info for WTF because libWTF.a is stripped.
<https://webkit.org/b/136320> / <rdar://problem/18148776>
Reviewed by Dan Bernstein.
* Configurations/WTF.xcconfig: Set STRIP_INSTALLED_PRODUCT = NO for the target
that produces libWTF.a so that the debug symbols will be linked into JavaScriptCore
and end up in its dSYM file.
2014-08-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r172940.
https://bugs.webkit.org/show_bug.cgi?id=136256
Caused assertions on fast/storage/serialized-script-
value.html, and possibly flakiness on more tests (Requested by
ap on #webkit).
Reverted changeset:
"FTL should be able to do polymorphic call inlining"
https://bugs.webkit.org/show_bug.cgi?id=135145
http://trac.webkit.org/changeset/172940
2014-08-23 Filip Pizlo <fpizlo@apple.com>
FTL should be able to do polymorphic call inlining
https://bugs.webkit.org/show_bug.cgi?id=135145
Reviewed by Geoffrey Garen.
Add some power that I need for call edge profiling.
* wtf/OwnPtr.h:
(WTF::OwnPtr<T>::createTransactionally):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::addAll):
(WTF::Spectrum::get):
(WTF::Spectrum::size):
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(WTF::Spectrum::clear):
(WTF::Spectrum::removeIf):
2014-08-25 Tomas Popela <tpopela@redhat.com>
Add support for little-endian PowerPC64
https://bugs.webkit.org/show_bug.cgi?id=135647
Reviewed by Oliver Hunt.
* wtf/Platform.h:
* wtf/dtoa/utils.h:
2014-08-24 Zan Dobersek <zdobersek@igalia.com>
GenericHashTraits::peek() is producing copies of passed-in temporary values
https://bugs.webkit.org/show_bug.cgi?id=131461
Reviewed by Darin Adler.
* wtf/HashTraits.h:
(WTF::GenericHashTraits::peek): Make this method a template that passes through
the passed-in value without copying, achieved by using universal references and
std::forward<>().
2014-08-22 Daniel Bates <dabates@apple.com>
[iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
and ENABLE_XSLT when building with the iOS public SDK
https://bugs.webkit.org/show_bug.cgi?id=135945
Reviewed by Andy Estes.
* wtf/FeatureDefines.h:
2014-08-22 Akos Kiss <akiss@inf.u-szeged.hu>
Enable fixed executable allocator for any ARM64 target.
https://bugs.webkit.org/show_bug.cgi?id=136162
Reviewed by Michael Saboff.
The ARM64 macro assembler relies on near calls being implemented by BL
instructions, which have only 128MB offset range from PC. The
on-demand executable allocator cannot ensure that any two locations in
memory allocated for the JIT-compiled code are within this range.
However, the fixed executable allocator has a fixed 16MB memory pool for
ARM64.
* wtf/Platform.h:
Define ENABLE_EXECUTABLE_ALLOCATOR_FIXED if CPU(ARM64), and update
attached comment.
2014-08-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r172844.
https://bugs.webkit.org/show_bug.cgi?id=136164
re-applying WEBCORE_EXPORTS patch (Requested by
alexchristensen on #webkit).
Reverted changeset:
"Revert r172831, it broke the Windows build."
http://trac.webkit.org/changeset/172844
2014-08-22 Jon Lee <jonlee@apple.com>
Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=136157
Reviewed by Simon Fraser.
* wtf/FeatureDefines.h: Remove ENABLE(RUBBER_BANDING) logic for Mac platform.
2014-08-21 Tim Horton <timothy_horton@apple.com>
Revert r172831, it broke the Windows build.
* wtf/ExportMacros.h:
2014-08-21 Zalan Bujtas <zalan@apple.com>
Enable SATURATED_LAYOUT_ARITHMETIC.
https://bugs.webkit.org/show_bug.cgi?id=136106
Reviewed by Simon Fraser.
SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
(No measurable performance regression on Mac.)
* wtf/FeatureDefines.h:
2014-08-21 Alex Christensen <achristensen@webkit.org>
More WEBCORE_EXPORT macros.
https://bugs.webkit.org/show_bug.cgi?id=136129
Reviewed by Tim Horton.
* wtf/ExportMacros.h:
Removed WTF_TESTING which isn't used.
2014-08-20 Akos Kiss <akiss@inf.u-szeged.hu>
Enable ARM64 disassembler on EFL
https://bugs.webkit.org/show_bug.cgi?id=136089
Reviewed by Filip Pizlo.
* wtf/Platform.h:
Enable WTF_USE_ARM64_DISASSEMBLER for EFL as well.
2014-08-19 Pratik Solanki <psolanki@apple.com>
Remove PurgeableBuffer since it is not very useful any more
https://bugs.webkit.org/show_bug.cgi?id=135939
Reviewed by Andreas Kling.
* wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
* wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
2014-08-19 Magnus Granberg <zorry@gentoo.org>
TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
https://bugs.webkit.org/show_bug.cgi?id=70610
Reviewed by Darin Adler.
Add PLT if we're building with PIC.
* wtf/InlineASM.h:
2014-08-19 Zalan Bujtas <zalan@apple.com>
Remove ENABLE(SUBPIXEL_LAYOUT).
https://bugs.webkit.org/show_bug.cgi?id=136077
Reviewed by Simon Fraser.
Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
* wtf/FeatureDefines.h:
2014-08-18 Maciej Stachowiak <mjs@apple.com>
Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
https://bugs.webkit.org/show_bug.cgi?id=136035
Reviewed by Dan Bernstein.
* wtf/Platform.h: Define USE(APPLE_INTERNAL_SDK) by default on platforms that have it.
2014-08-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r172736.
https://bugs.webkit.org/show_bug.cgi?id=136060
Caused 14% PLT regressions (Requested by rniwa on #webkit).
Reverted changeset:
"Remove PurgeableBuffer since it is not very useful any more"
https://bugs.webkit.org/show_bug.cgi?id=135939
http://trac.webkit.org/changeset/172736
2014-08-18 Pratik Solanki <psolanki@apple.com>
Remove PurgeableBuffer since it is not very useful any more
https://bugs.webkit.org/show_bug.cgi?id=135939
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
* wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
2014-08-14 Benjamin Poulain <benjamin@webkit.org>
CSS JIT: compile the :empty pseudo class
https://bugs.webkit.org/show_bug.cgi?id=135958
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h:
(WTF::StringImpl::lengthMemoryOffset):
2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is applied to them
https://bugs.webkit.org/show_bug.cgi?id=135756
Reviewed by Darin Adler.
Add a method to StringView which passes through contains() to find().
* wtf/text/StringView.h:
(WTF::StringView::contains):
2014-08-12 Pratik Solanki <psolanki@apple.com>
Enable didReceiveDataArray callback on Mac
https://bugs.webkit.org/show_bug.cgi?id=135554
<rdar://problem/9170731>
Reviewed by Andreas Kling.
Enable WTF_USE_NETWORK_CFDATA_ARRAY_CALLBACK for all Cocoa platforms so that we use the same
code path for Mac and iOS.
* wtf/Platform.h:
2014-08-12 Alex Christensen <achristensen@webkit.org>
Generate header detection headers for CMake on Windows.
https://bugs.webkit.org/show_bug.cgi?id=135807
Reviewed by Brent Fulgham.
* wtf/CMakeLists.txt:
* wtf/PlatformWin.cmake:
Generate and include a stub WTFHeaderDetection.h.
2014-08-11 Andy Estes <aestes@apple.com>
[iOS] Get rid of iOS.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=135809
Reviewed by Joseph Pecoraro.
All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WTF.xcodeproj/project.pbxproj:
2014-08-12 Zan Dobersek <zdobersek@igalia.com>
Clean up GMutexLocker
https://bugs.webkit.org/show_bug.cgi?id=135833
Reviewed by Carlos Garcia Campos.
Place the GMutexLocker into the WTF namespace. There's no need for this
class to use FastMalloc since it's always allocated on the stack. The
constructor and class now operate on a GMutex reference. There's little
need for an additional inline specifier for methods defined in the header.
The mutex() method is removed as it was not used. m_val is renamed to a
more descriptive m_locked and is made a boolean.
* wtf/gobject/GMutexLocker.h:
(WTF::GMutexLocker::GMutexLocker):
(WTF::GMutexLocker::~GMutexLocker):
(WTF::GMutexLocker::lock):
(WTF::GMutexLocker::unlock):
(WebCore::GMutexLocker::GMutexLocker): Deleted.
(WebCore::GMutexLocker::~GMutexLocker): Deleted.
(WebCore::GMutexLocker::lock): Deleted.
(WebCore::GMutexLocker::unlock): Deleted.
(WebCore::GMutexLocker::mutex): Deleted.
2014-08-12 Zan Dobersek <zdobersek@igalia.com>
Make GRefPtr move-able
https://bugs.webkit.org/show_bug.cgi?id=135801
Reviewed by Carlos Garcia Campos.
Add move constructor and move assignment operator for GRefPtr.
* wtf/gobject/GRefPtr.h:
(WTF::GRefPtr::GRefPtr):
(WTF::=):
2014-08-10 Benjamin Poulain <benjamin@webkit.org>
Update HashTable's operator= after r172167 per review comments
* wtf/HashTable.h:
Update the type as suggested by Darin.
2014-08-07 Benjamin Poulain <bpoulain@apple.com>
Get rid of SCRIPTED_SPEECH
https://bugs.webkit.org/show_bug.cgi?id=135729
Reviewed by Brent Fulgham.
* wtf/FeatureDefines.h:
2014-08-07 Benjamin Poulain <bpoulain@apple.com>
Get rid of INPUT_SPEECH
https://bugs.webkit.org/show_bug.cgi?id=135672
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h:
2014-08-06 Dean Jackson <dino@apple.com>
ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
https://bugs.webkit.org/show_bug.cgi?id=135675
Reviewed by Sam Weinig.
* wtf/FeatureDefines.h:
2014-08-06 Benjamin Poulain <benjamin@webkit.org>
HashTable based classes leak a lot
https://bugs.webkit.org/show_bug.cgi?id=135638
Reviewed by Darin Adler.
* wtf/HashTable.h:
The operator= taking a rvalue reference was never freeing the memory allocated
for the table of the left hand side object.
This patch fixes the leaks by doing an alloc+swap with a new object.
The object temp gets the reference to m_table, and destroys it in the regular destructor
when going out of scope.
Kudos to Pratik Solanki for finding the leaks.
2014-08-06 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
[JSC] Build fix for FTL on EFL after ftlopt merge
https://bugs.webkit.org/show_bug.cgi?id=135565
Reviewed by Mark Lam.
Added ENABLE(FTL_NATIVE_CALL_INLINING).
* wtf/Platform.h:
2014-08-04 Alex Christensen <achristensen@webkit.org>
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=135528
Reviewed by Gyuyoung Kim.
* wtf/CMakeLists.txt:
Include text directory.
* wtf/PlatformMac.cmake: Added.
2014-07-31 Alex Christensen <achristensen@webkit.org>
Progress towards cmake on Windows.
https://bugs.webkit.org/show_bug.cgi?id=135484
Reviewed by Martin Robinson.
* wtf/CMakeLists.txt:
Added WTF_LIBRARY_TYPE because Windows needs WTF to be a shared library.
2014-07-30 Andreas Kling <akling@apple.com>
PropertyName's internal string is always atomic.
<https://webkit.org/b/135451>
Remove AtomicString::findStringWithHash() since nobody uses it anymore.
Reviewed by Benjamin Poulain.
* wtf/text/AtomicString.cpp:
(WTF::findString): Deleted.
(WTF::AtomicString::findStringWithHash): Deleted.
* wtf/text/AtomicString.h:
2014-07-30 Andy Estes <aestes@apple.com>
USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
https://bugs.webkit.org/show_bug.cgi?id=135439
Reviewed by Tim Horton.
We now support two different platform content filters, and will soon support a mock content filter (as part of
webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
library. ENABLE() is the correct macro to use for such a feature.
* wtf/Platform.h:
2014-07-29 Brent Fulgham <bfulgham@apple.com>
[Win] Modify version numbering scheme to support 5-tuple versions
https://bugs.webkit.org/show_bug.cgi?id=135400
<rdar://problem/17849033>
Reviewed by David Kilzer.
* WTF.vcxproj/WTFPostBuild.cmd: Use new version-stamp.pl script
to version WTF.dll.
* WTF.vcxproj/WTFPreBuild.cmd: Make sure we have created the
appropriate version resource during builds.
2014-07-29 Daniel Bates <dabates@apple.com>
Use WTF::move() instead of std::move() to help ensure move semantics
https://bugs.webkit.org/show_bug.cgi?id=135351
Reviewed by Alexey Proskuryakov.
* wtf/HashTable.h:
(WTF::KeyTraits>::HashTable):
2014-07-28 Brian J. Burg <burg@cs.washington.edu>
Should not export symbols for base64Encode inline adapter methods
https://bugs.webkit.org/show_bug.cgi?id=135355
Unreviewed build fix.
Fixes the build break introduced by r171682, where a base64Encode
inline adapter method was used in another header, thus creating
multiple definitions of it (and problems with with weak symbols).
* wtf/text/Base64.h: Remove WTF_EXPORT_PRIVATE for inlined methods.
2014-07-27 Filip Pizlo <fpizlo@apple.com>
Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
* wtf/text/WTFString.h:
2014-07-26 Filip Pizlo <fpizlo@apple.com>
Unreviewed, roll out r171641-r171644. It broke some tests; will investigate and
reland later.
* wtf/text/WTFString.h:
2014-07-25 Filip Pizlo <fpizlo@apple.com>
Attempt to fix Windows.
* wtf/text/WTFString.h:
2014-07-25 Gavin Barraclough <baraclough@apple.com>
Yosemite version number is 101000
https://bugs.webkit.org/show_bug.cgi?id=135301
Reviewed by Sam Weinig.
* wtf/FeatureDefines.h:
* wtf/Platform.h:
2014-07-23 Brent Fulgham <bfulgham@apple.com>
[Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
https://bugs.webkit.org/show_bug.cgi?id=13519
Reviewed by Mark Lam.
* wtf/Assertions.h: Add MSVC to list of compilers supporting this macro.
* wtf/FastMalloc.cpp: Correct function declaration for NO_RETURN_DUE_TO_CRASH.
2014-07-22 Filip Pizlo <fpizlo@apple.com>
Merge r169148, r169185, r169188, r169578, r169582, r169584, r169588, r169753 from ftlopt.
2014-06-04 Filip Pizlo <fpizlo@apple.com>
[ftlopt] AI should be able track structure sets larger than 1
https://bugs.webkit.org/show_bug.cgi?id=128073
Reviewed by Oliver Hunt.
* wtf/Bag.h:
(WTF::Bag::Node::Node):
(WTF::Bag::add):
2014-07-22 Filip Pizlo <fpizlo@apple.com>
Merge r168635, r168780, r169005, r169014, and r169143 from ftlopt.
2014-05-20 Filip Pizlo <fpizlo@apple.com>
[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
https://bugs.webkit.org/show_bug.cgi?id=133105
Reviewed by Michael Saboff.
* wtf/Bag.h:
(WTF::Bag::iterator::operator!=):
2014-07-19 Zan Dobersek <zdobersek@igalia.com>
[WTF] Add the move constructor, move assignment operator for HashTable
https://bugs.webkit.org/show_bug.cgi?id=130772
Reviewed by Darin Adler.
HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
copies when moves can be performed.
* wtf/HashTable.h:
(WTF::KeyTraits>::HashTable):
2014-07-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r171107.
https://bugs.webkit.org/show_bug.cgi?id=134959
This was not the problem! (Requested by kling on #webkit).
Reverted changeset:
"Revert: Run the FastMalloc scavenger thread on iOS as well."
https://bugs.webkit.org/show_bug.cgi?id=134927
http://trac.webkit.org/changeset/171107
2014-07-15 Andreas Kling <akling@apple.com>
Revert: Run the FastMalloc scavenger thread on iOS as well.
<https://webkit.org/b/134927>
<rdar://problem/17485079>
This appears to be the cause of some elusive crashes, and since I don't
have a way to reproduce them, let's just go back to not running the
scavenger thread on iOS.
Reviewed by Antti Koivisto.
* wtf/FastMalloc.cpp:
2014-07-13 Filip Pizlo <fpizlo@apple.com>
HashMap should have removeIf()
https://bugs.webkit.org/show_bug.cgi?id=134870
Reviewed by Sam Weinig.
Expose a new HashMap method, called removeIf(), which allows you to do an efficient
pass over the map and remove a bunch of things at once. This is used by DFG GCSE as
part of https://bugs.webkit.org/show_bug.cgi?id=134677.
* wtf/HashMap.h:
(WTF::X>::removeIf):
* wtf/HashTable.h:
(WTF::KeyTraits>::removeIf):
2014-07-11 peavo@outlook.com <peavo@outlook.com>
[Win] Enable DFG JIT.
https://bugs.webkit.org/show_bug.cgi?id=123615
Reviewed by Mark Lam.
* wtf/Platform.h:
2014-07-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170995.
https://bugs.webkit.org/show_bug.cgi?id=134831
Causing odd crashes in debug builds (Requested by zdobersek on
#webkit).
Reverted changeset:
"[WTF] Add the move constructor, move assignment operator for
HashTable"
https://bugs.webkit.org/show_bug.cgi?id=130772
http://trac.webkit.org/changeset/170995
2014-07-09 Zan Dobersek <zdobersek@igalia.com>
[WTF] Add the move constructor, move assignment operator for HashTable
https://bugs.webkit.org/show_bug.cgi?id=130772
Reviewed by Darin Adler.
HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
copies when moves can be performed.
* wtf/HashTable.h:
(WTF::KeyTraits>::HashTable):
2014-07-10 Alex Christensen <achristensen@webkit.org>
Enable same features on all Windows ports.
https://bugs.webkit.org/show_bug.cgi?id=134715
Reviewed by Brent Fulgham.
* wtf/Platform.h:
Use REQUEST_ANIMATION_FRAME_TIMER on WinCairo.
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r170930.
* WTF.vcxproj/copy-files.cmd: Include cf files in
post-build copy operation.
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove uses of 'bash' in build system
https://bugs.webkit.org/show_bug.cgi?id=134782
<rdar://problem/17615533>
Reviewed by Dean Jackson.
Remove uses of 'bash' by replacing Windows-specific bash scripts
with Perl equivalents.
* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGenerated.vcxproj.filters:
* WTF.vcxproj/WTFPreBuild.cmd:
* WTF.vcxproj/build-generated-files.pl: Copied from Source/WTF/WTF.vcxproj/build-generated-files.sh.
* WTF.vcxproj/build-generated-files.sh: Removed.
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove use of 'grep' in build steps
https://bugs.webkit.org/show_bug.cgi?id=134770
<rdar://problem/17608783>
Reviewed by Tim Horton.
Replace uses of the grep command in Windows builds with the equivalent
Perl program.
* WTF.vcxproj/WTFPreBuild.cmd:
2014-07-07 Zan Dobersek <zdobersek@igalia.com>
Enable ARMv7 disassembler for the GTK port
https://bugs.webkit.org/show_bug.cgi?id=134676
Reviewed by Benjamin Poulain.
* wtf/Platform.h: Enable the ARMv7 disassembler for the GTK port when
targeting the ARMv7 architecture.
2014-07-06 Yoav Weiss <yoav@yoav.ws>
Turn on img@sizes compile flag
https://bugs.webkit.org/show_bug.cgi?id=134634
Reviewed by Benjamin Poulain.
* wtf/FeatureDefines.h: Added compile flag definition.
2014-07-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreivewed, fix build break on EFL and GTK since r170767.
* wtf/CMakeLists.txt: Exclude Decoder.h and Encoder.h because those files were removed.
2014-07-03 Daniel Bates <dabates@apple.com>
Add WTF::move()
https://bugs.webkit.org/show_bug.cgi?id=134500
Reviewed by Darin Adler.
Substitution of WTF::move() for std::move() rubber-stamped by Anders Carlsson.
Implement WTF::move(), a replacement for std::move(). WTF::move() is less error
prone than std::move() as it compile asserts that its argument is a non-const
lvalue reference before ultimately casting it to a rvalue reference (via std::move).
* wtf/Deque.h: Substitute WTF::move() for std::move().
* wtf/HashMap.h: Ditto.
* wtf/HashSet.h: Ditto.
* wtf/HashTable.h: Ditto.
* wtf/IteratorAdaptors.h: Ditto.
* wtf/IteratorRange.h: Ditto.
* wtf/ListHashSet.h: Ditto.
* wtf/MainThread.cpp: Ditto.
[...]
* wtf/StdLibExtras.h:
(WTF::move): Added.
[...]
2014-07-03 Anders Carlsson <andersca@apple.com>
Get rid of Encoder.h and Decoder.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=134600
Reviewed by Darin Adler.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/Decoder.h: Removed.
* wtf/Encoder.h: Removed.
2014-07-03 Ryuan Choi <ryuan.choi@samsung.com>
Broken build with build-webkit --no-video
https://bugs.webkit.org/show_bug.cgi?id=134587
Reviewed by Darin Adler.
MEDIA_CONTROLS_SCRIPT requires VIDEO enabled.
* wtf/FeatureDefines.h: Added error message for dependency failure.
2014-07-02 Enrica Casucci <enrica@apple.com>
iOS build fix after http://trac.webkit.org/changeset/170697.
Unreviewed.
* wtf/Deque.h:
2014-07-02 Dan Bernstein <mitz@apple.com>
Remove some code only needed for versions of Safari that are no longer supported
https://bugs.webkit.org/show_bug.cgi?id=134537
Reviewed by Anders Carlsson.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2014-07-01 Alex Christensen <achristensen@webkit.org>
Reduce dynamic memory allocation in css jit.
https://bugs.webkit.org/show_bug.cgi?id=134416
Reviewed by Benjamin Poulain.
* wtf/Deque.h:
Added inlineCapacity optional template parameter.
2014-06-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170605.
https://bugs.webkit.org/show_bug.cgi?id=134484
The changes cause crashes on ARM64 (Requested by benjaminp on
#webkit).
Reverted changeset:
"Reduce dynamic memory allocation in css jit."
https://bugs.webkit.org/show_bug.cgi?id=134416
http://trac.webkit.org/changeset/170605
2014-06-30 Daniel Bates <dabates@apple.com>
Make TransformIterator::TransformIterator() take rvalue references
https://bugs.webkit.org/show_bug.cgi?id=134468
Reviewed by Darin Adler.
It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
members of TransformIterator.
* wtf/IteratorAdaptors.h:
(WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
(WTF::makeTransformIterator): Substitute std::move() for std::forward().
2014-06-30 Alex Christensen <achristensen@webkit.org>
Reduce dynamic memory allocation in css jit.
https://bugs.webkit.org/show_bug.cgi?id=134416
Reviewed by Benjamin Poulain.
* wtf/Deque.h:
Added inlineCapacity optional template parameter.
2014-06-30 Anders Carlsson <andersca@apple.com>
Add code for encoding legacy session history entries
https://bugs.webkit.org/show_bug.cgi?id=134452
Reviewed by Andreas Kling.
* wtf/MallocPtr.h:
(WTF::MallocPtr::malloc):
(WTF::MallocPtr::realloc):
2014-06-27 Andreas Kling <akling@apple.com>
[ARMv7] Skip one particularly expensive fastFree() alignment check.
<https://webkit.org/b/134402>
The size class alignment check in fastFree() was crazy expensive on ARMv7
due to its use of modulo. Disabling it shaves 470ms off of PLT main thread
time in the web process.
Note that this was very hard to identify in profiles due to TCO.
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2014-06-26 Andreas Kling <akling@apple.com>
Bump FastMalloc thread cache max size to 1MB on iOS.
<https://webkit.org/b/134365>
The previous limit (512kB) comes from the old days of very-low-memory
devices, and we can now afford to spend another 512kB here.
Note that we already have a mechanism to purge FastMalloc caches on
system memory pressure.
Looks like a ~400ms progression on PLT.
Reviewed by Geoff Garen.
* wtf/FastMalloc.cpp:
2014-06-26 Laszlo Gombos <l.gombos@samsung.com>
Define TARGET_OS_IPHONE to 0 for non-darwin ports
https://bugs.webkit.org/show_bug.cgi?id=134347
Reviewed by Darin Adler.
A follow-up to r169880 to make it easier to reason about
the code. The purpose of this change to allow
"#if TARGET_OS_IPHONE" in public header files.
* wtf/Platform.h:
2014-06-26 Chris Fleizach <cfleizach@apple.com>
Add an undo group for each dictated utterance in WebKit
https://bugs.webkit.org/show_bug.cgi?id=134086
Applied review comments from Sam Weinig.
Move the associated USE #define into Platform.h.
* wtf/Platform.h:
2014-06-25 Geoffrey Garen <ggaren@apple.com>
Unreviewed, rolling out r166876.
Caused some ECMA test262 failures
Reverted changeset:
"Date object needs to check for ES5 15.9.1.14 TimeClip limit."
https://bugs.webkit.org/show_bug.cgi?id=131248
http://trac.webkit.org/changeset/166876
2014-06-25 peavo@outlook.com <peavo@outlook.com>
[Win64] ASM LLINT is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=130638
Reviewed by Mark Lam.
* wtf/Platform.h: Enable LLINT and JIT for Win64.
2014-06-25 Laszlo Gombos <l.gombos@samsung.com>
Remove build guard for progress element
https://bugs.webkit.org/show_bug.cgi?id=134292
Reviewed by Benjamin Poulain.
The build flag is no longer needed as it is always on.
* wtf/FeatureDefines.h:
2014-06-24 Andreas Kling <akling@apple.com>
Run the FastMalloc scavenger thread on iOS as well.
<https://webkit.org/b/134287>
<rdar://problem/17446198>
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
2014-06-24 Anders Carlsson <andersca@apple.com>
Add PageState to HistoryItem conversion code
https://bugs.webkit.org/show_bug.cgi?id=134259
Reviewed by Andreas Kling.
* wtf/Optional.h:
(WTF::Optional::valueOr):
2014-06-24 László Langó <llango.u-szeged@partner.samsung.com>
[JavaScriptCore] Enable concurrent JIT on EFL.
https://bugs.webkit.org/show_bug.cgi?id=134242
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2014-06-23 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
https://bugs.webkit.org/show_bug.cgi?id=134236
Reviewed by Gyuyoung Kim.
Although there are ref/unref for Evas_Object, it's bit odd so we should call evas_object_del to destroy it.
So, this patch replaced RefPtr<Evas_Object> with UniquePtrEfl for the simplicity.
* wtf/PlatformEfl.cmake: Removed RefPtrEfl.cpp from source list.
* wtf/efl/RefPtrEfl.cpp: Removed.
* wtf/efl/RefPtrEfl.h: Removed.
2014-06-21 Brady Eidson <beidson@apple.com>
Gamepad API - Deprecate the existing implementation
https://bugs.webkit.org/show_bug.cgi?id=134108
Reviewed by Timothy Hatcher.
-Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
-Move some implementation files into a "deprecated" subdirectory.
* wtf/FeatureDefines.h:
2014-06-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170244.
https://bugs.webkit.org/show_bug.cgi?id=134157
GTK/EFL bindings generator works differently, making this
patch not work there. Will fix entire patch after a rollout.
(Requested by bradee-oh on #webkit).
Reverted changeset:
"Gamepad API - Deprecate the existing implementation"
https://bugs.webkit.org/show_bug.cgi?id=134108
http://trac.webkit.org/changeset/170244
2014-06-21 Brady Eidson <beidson@apple.com>
Gamepad API - Deprecate the existing implementation
https://bugs.webkit.org/show_bug.cgi?id=134108
Reviewed by Timothy Hatcher.
-Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
-Add the "Deprecated" suffix to some implementation files
* wtf/FeatureDefines.h:
2014-06-21 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Removing PAGE_VISIBILITY_API compile guard.
https://bugs.webkit.org/show_bug.cgi?id=133844
Reviewed by Gavin Barraclough.
* wtf/FeatureDefines.h:
2014-06-20 Anders Carlsson <andersca@apple.com>
Add encoding and decoding support for WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=134125
Reviewed by Andreas Kling.
* wtf/Optional.h:
(WTF::Optional::operator=):
2014-06-20 Anders Carlsson <andersca@apple.com>
Add copy/move constructors and assignment operators to WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=134119
Reviewed by Andreas Kling.
* wtf/Optional.h:
(WTF::Optional::Optional):
(WTF::Optional::operator=):
2014-06-19 Anders Carlsson <andersca@apple.com>
Add WTF::Optional class
https://bugs.webkit.org/show_bug.cgi?id=134083
Reviewed by Andreas Kling.
* WTF.xcodeproj/project.pbxproj:
* wtf/Optional.h: Added.
(WTF::Optional::Optional):
(WTF::Optional::~Optional):
(WTF::Optional::operator bool):
(WTF::Optional::value):
2014-06-19 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
Remove ENABLE(LLINT) and ENABLE(LLINT_C_LOOP) guards
https://bugs.webkit.org/show_bug.cgi?id=130389
Reviewed by Mark Lam.
Removed ENABLE(LLINT) since we always build with it, and changed ENABLE(LLINT_C_LOOP)
into !ENABLE(JIT) since they are mutually exclusive.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:
2014-06-18 Anders Carlsson <andersca@apple.com>
Add CF type cast function templates and use them in KeyedDecoder in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=134033
Reviewed by Sam Weinig.
* WTF.xcodeproj/project.pbxproj:
* wtf/cf/TypeCasts.h: Added.
(WTF::dynamic_cf_cast):
Returns null if the given CFTypeRef object doesn't have the right type.
(WTF::checked_cf_cast):
ASSERTs (with security implication) if the given CFTypeRef object is null or doesn't have the right type.
2014-06-17 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Misused PLATFORM(MIDDLE_ENDIAN) and PLATFORM(BIG_ENDIAN).
https://bugs.webkit.org/show_bug.cgi?id=128301
Reviewed by Daniel Bates.
Endianness is a CPU attribute, not a PLATFORM. PLATFORM() macro is replaced to CPU().
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2014-06-17 Andreas Kling <akling@apple.com>
Web process main thread priority is lower than some network process threads.
<https://webkit.org/b/133987>
<rdar://problem/17330300>
Bring all of our threads to the appropriate priority level by opting in to the
threading QoS APIs. By marking them "user initiated", they still yield to UI
interaction, but take priority over background tasks.
Reviewed by Maciej Stachowiak.
* wtf/Platform.h:
* wtf/Threading.cpp:
(WTF::setCurrentThreadIsUserInitiated):
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
2014-06-17 Alex Christensen <achristensen@webkit.org>
Enable css jit for armv7 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=133961
<rdar://problem/17310631>
Reviewed by Andreas Kling.
* wtf/Platform.h:
Enable css jit for ARM thumb on iOS.
2014-06-17 Dan Bernstein <mitz@apple.com>
String::isolatedCopy doesn’t return an isolated copy when used on an rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=133968
Reviewed by Anders Carlsson.
Made the rvalue reference overload of isolatedCopy() non-const, so that std::move(*this) is
an rvalue reference that can be moved, rather than copied, into the returned String.
* wtf/text/WTFString.cpp:
(WTF::String::isolatedCopy):
* wtf/text/WTFString.h:
2014-06-15 Dan Bernstein <mitz@apple.com>
iOS build fix after r169995.
* wtf/RetainPtr.h:
2014-06-15 Anders Carlsson <andersca@apple.com>
Add an autorelease() member function to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=133929
Reviewed by Dan Bernstein.
* wtf/RetainPtr.h:
2014-06-13 Alex Christensen <achristensen@webkit.org>
Unreviewed disabling css jit on armv7. It's not quite ready yet.
* wtf/Platform.h:
Disable css jit on armv7.
2014-06-13 Alex Christensen <achristensen@webkit.org>
Enable css jit for armv7 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=133890
<rdar://problem/17310631>
Reviewed by Andreas Kling.
* wtf/Platform.h:
Enable css jit for ARM thumb on iOS.
2014-06-13 Mark Hahnenberg <mhahnenberg@apple.com>
OSR exit should barrier the Executables for all InlineCallFrames, not just those on the stack at the time of exit
https://bugs.webkit.org/show_bug.cgi?id=133880
Reviewed by Filip Pizlo.
* wtf/Bag.h:
(WTF::Bag::iterator::operator!=): Add != to the Bag iterator so we can use it in range-based iteration.
2014-06-12 Gavin Barraclough <barraclough@apple.com>
Add support for thread/WorkQueue QoS
https://bugs.webkit.org/show_bug.cgi?id=130688
Reviewed by Anders Carlson & Simon Fraser.
Add the ability to mark threads as UserInteractive.
* wtf/Threading.cpp:
(WTF::setCurrentThreadIsUserInteractive):
- added method to set QoS of current thread to UserInteractive.
* wtf/Threading.h:
- added declaration.
2014-06-12 Alexey Proskuryakov <ap@apple.com>
Fix Mac after r169880.
This revision added a C++ comment to Platform.h, which breaks sandbox profile
preprocessing.
Also, I do not believe that this comment was entirely accurate - we've always used
this technique with GCC, so there has to be more to it. So, I just removed the comment.
* wtf/Platform.h:
2014-06-11 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] Ultimate fix not to have build failures
in the future because of "#if TARGET_OS_IPHONE" guards.
Unreviewed buildfix.
* wtf/Platform.h: Define TARGET_OS_IPHONE to 0 on EFL and GTK.
2014-06-11 Ryosuke Niwa <rniwa@webkit.org>
Turning on DUMP_PROPERTYMAP_STATS causes a build failure
https://bugs.webkit.org/show_bug.cgi?id=133673
Reviewed by Andreas Kling.
Added DEFINE_GLOBAL_FOR_LOGGING to allow running a destructor in logging code
that needs to be enabled in release builds (e.g. for JavaScriptCore).
* wtf/StdLibExtras.h:
2014-06-09 Benjamin Poulain <bpoulain@apple.com>
Improve CSSPrimitiveValue::customCSSText for ARMv7
https://bugs.webkit.org/show_bug.cgi?id=133597
Reviewed by Andreas Kling.
* wtf/RefPtr.h:
(WTF::RefPtr<T>::RefPtr):
* wtf/text/WTFString.h:
(WTF::String::String):
2014-06-05 Yoav Weiss <yoav@yoav.ws>
Align srcset parser with recent spec changes
https://bugs.webkit.org/show_bug.cgi?id=133504
Reviewed by Darin Adler.
I've added toInt and toFloat methods to StringView, and exposed
charactersToInt so that they can be used by
HTMLSrcsetParser.cpp.
* wtf/text/WTFString.h:
* wtf/text/StringView.h:
(WTF::StringView::toInt):
(WTF::StringView::toFloat):
2014-06-04 Alex Christensen <achristensen@webkit.org>
Enable WebGL on Windows.
https://bugs.webkit.org/show_bug.cgi?id=133503
Reviewed by Brent Fulgham.
* wtf/FeatureDefines.h:
Enable WebGL for AppleWin and WinCairo ports.
2014-06-01 Jer Noble <jer.noble@apple.com>
[MSE] Appends of overlapping sample data do not clear existing samples properly.
https://bugs.webkit.org/show_bug.cgi?id=133435
Reviewed by Darin Adler.
Add a dump method to MediaTime, so that MediaTimes can be easily converted to strings (for logging purposes).
* wtf/MediaTime.cpp:
(WTF::MediaTime::dump):
* wtf/MediaTime.h:
2014-05-31 Anders Carlsson <andersca@apple.com>
Add a LazyNeverDestroyed class template and use it
https://bugs.webkit.org/show_bug.cgi?id=133425
Reviewed by Darin Adler.
LazyNeverDestroyed is similar to NeverDestroyed, except it's lazily constructed
by calling construct(). This makes it useful for using inside std::call_once functions.
* wtf/Forward.h:
* wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::construct):
(WTF::LazyNeverDestroyed::operator T&):
(WTF::LazyNeverDestroyed::get):
(WTF::LazyNeverDestroyed::asPtr):
(WTF::LazyNeverDestroyed::MaybeRelax::MaybeRelax):
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::atomicallyInitializedStaticMutex):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::cachedCollatorMutex):
2014-05-29 Alex Christensen <achristensen@webkit.org>
Enable css jit by default on arm64.
https://bugs.webkit.org/show_bug.cgi?id=133246
<rdar://problem/17073407>
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
Added arm64 to list of supported architectures.
2014-05-28 Filip Pizlo <fpizlo@apple.com>
DFG::DCEPhase inserts into an insertion set in reverse, causing hilarious basic block corruption if you kill a lot of NewArrays
https://bugs.webkit.org/show_bug.cgi?id=133368
Reviewed by Mark Lam.
* wtf/Insertion.h:
(WTF::executeInsertions): This algorithm is only correct if insertions are added in the right order. Assert that the order is right.
2014-05-27 Jon Lee <jonlee@apple.com>
Update ENABLE(MEDIA_SOURCE) on Mac
https://bugs.webkit.org/show_bug.cgi?id=133141
Reviewed by Darin Adler.
* wtf/FeatureDefines.h: #ifdef unneeded for Mac since it's covered in the .xcconfigs.
2014-05-27 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Remove BLOB guards
https://bugs.webkit.org/show_bug.cgi?id=132863
Reviewed by Csaba Osztrogonác.
* wtf/FeatureDefines.h:
2014-05-27 Gwang Yoon Hwang <yoon@igalia.com>
[GLIB] RunLoop::dispatch always executes the function on the main thread instead of the target thread.
https://bugs.webkit.org/show_bug.cgi?id=133291
Reviewed by Carlos Garcia Campos.
GMainLoopSource::schedule[AfterDelay] must be used with the appropriate
GMainContext. Because current implementations in RunLoopGtk passes nullptr
instead of its runLoopContext when using GMainLoopSource, all of dispatched
functions are executed on the main thread regardless of which runloops is used.
This patch fixes the issue by passing the m_runLoopContext instead the default
parameter to the GMainLoopSource::schedule[AfterDelay].
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::start):
2014-05-26 Darin Adler <darin@apple.com>
Class name matching should use ASCII case-insensitive matching, not Unicode case folding
https://bugs.webkit.org/show_bug.cgi?id=133292
Reviewed by Anders Carlsson.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::addSlowCase): Change to take references instead of pointers since these
arguments can never be null.
(WTF::AtomicString::lower): Rearranged slightly to use PassRef in a more efficient but
slightly uglier way.
(WTF::AtomicString::convertToASCIILowercase): Added.
* wtf/text/AtomicString.h: Updated for above changes.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertToASCIILowercase): Added.
* wtf/text/StringImpl.h: Updated for above.
* wtf/text/WTFString.cpp:
(WTF::String::convertToASCIILowercase): Added.
* wtf/text/WTFString.h: Updated for above.
2014-05-22 Zan Dobersek <zdobersek@igalia.com>
Add the partial specialization for VectorTraits<std::unique_ptr<P>>
https://bugs.webkit.org/show_bug.cgi?id=133083
Reviewed by Andreas Kling.
* wtf/VectorTraits.h: Like for RefPtr<P>, OwnPtr<P> and Ref<P>, the partial
specialization for VectorTraits<std::unique_ptr<P>> should exist and should
inherit from SimpleClassVector.
2014-05-20 Geoffrey Garen <ggaren@apple.com>
Rolled out <http://trac.webkit.org/changeset/166184>
https://bugs.webkit.org/show_bug.cgi?id=133144
Reviewed by Gavin Barraclough.
It caused a performance regression.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::runScavengerThread):
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
(WTF::setCurrentThreadQOSUtility): Deleted.
* wtf/ThreadingWin.cpp:
(WTF::setCurrentThreadQOSUtility): Deleted.
2014-05-20 Jer Noble <jer.noble@apple.com>
[Mac] AVAssets are never destroyed; lack of an autorelease pool when calling callOnMainThread.
https://bugs.webkit.org/show_bug.cgi?id=133130
Reviewed by Geoff Garen.
Wrap the function to be called in an autorelease pool, so that autoreleased objects are cleaned
up immediately after the end of the function.
* wtf/mac/MainThreadMac.mm:
(WTF::timerFired):
2014-05-18 Rik Cabanier <cabanier@adobe.com>
support for navigator.hardwareConcurrency
https://bugs.webkit.org/show_bug.cgi?id=132588
Reviewed by Filip Pizlo.
* wtf/FeatureDefines.h:
2014-05-14 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Remove CSS_STICKY_POSITION guards
https://bugs.webkit.org/show_bug.cgi?id=132676
Reviewed by Simon Fraser.
* wtf/FeatureDefines.h:
2014-05-13 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] background-attachment:fixed behaves very poorly
https://bugs.webkit.org/show_bug.cgi?id=132881
<rdar://problem/16789526>
Reviewed by Beth Dakin.
Remove ENABLE_FAST_MOBILE_SCROLLING. Ports can use the fixedBackgroundsPaintRelativeToDocument
setting now.
* wtf/FeatureDefines.h:
2014-05-08 Alexey Proskuryakov <ap@apple.com>
Automatically zip document bundles used via File API
https://bugs.webkit.org/show_bug.cgi?id=132713
<rdar://problem/13397892>
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h: Added ENABLE_FILE_REPLACEMENT for Mac.
2014-05-07 Filip Pizlo <fpizlo@apple.com>
UNREACHABLE_FOR_PLATFORM() is meant to be a release crash.
Rubber stamped by Mark Hahnenberg..
* wtf/Assertions.h:
(UNREACHABLE_FOR_PLATFORM):
2014-05-06 Alberto Garcia <berto@igalia.com>
There is no HW_AVAILCPU on FreeBSD, NetBSD, and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=132542
Reviewed by Michael Saboff.
Use sysconf() to get the number of processor cores.
* wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
2014-05-04 Darin Adler <darin@apple.com>
RetainPtr: Use adoptCF function instead of AdoptCF constructor argument
https://bugs.webkit.org/show_bug.cgi?id=80222
Reviewed by Alexey Proskuryakov.
All the clients are gone, so we can now remove AdoptCF and AdoptNS.
* wtf/RetainPtr.h: Removed the public constructors that let you specify AdoptCF
and AdoptNS. Instead, made the adoptCF and adoptNS functions be friends and use
a private constructor that takes an Adopt argument.
(WTF::adoptCF): Moved the Objective-C class check in here.
(WTF::adoptNS): Moved the code to deal with the CFRetain for garbage collection
in here; it used to be spread across the constructor and adoptNSReference.
2014-05-04 Andreas Kling <akling@apple.com>
Optimize JSRopeString for resolving directly to AtomicString.
<https://webkit.org/b/132548>
Add AtomicString::find([LU]Char*, unsigned length) helpers for finding
an existing AtomicString without a StringImpl on hand.
Reviewed by Filip Pizlo.
* wtf/text/AtomicString.h:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::find):
2014-05-01 Brent Fulgham <bfulgham@apple.com>
Fix handling of attributes prior to compiling shader
https://bugs.webkit.org/show_bug.cgi?id=132430
Reviewed by Dean Jackson.
WebGL programs that called bindAttribLocations prior to compiling shader sources
would perform the bind using the non-hashed symbol name, but would later create
the attributes as hashed names. Consequently, the program would refer to
attributes that were never actually part of any shader, resulting in some amazing
display artifacts.
This patch adds a dictionary of hashed symbol names so that we can tell the WebGL
program the proper name that will be used when the shader is eventually compiled,
allowing the WebGL program to link against the proper symbol after compiling and
linking completes.
* wtf/HexNumber.h:
(WTF::appendUnsigned64AsHex): Add uint64_t-compatible hex->string converter.
2014-04-30 Geoffrey Garen <ggaren@apple.com>
Link against bmalloc in production builds
https://bugs.webkit.org/show_bug.cgi?id=132413
Reviewed by Sam Weinig.
Production builders have been configured to handle this, so let's build
it.
* Configurations/WTF.xcconfig:
2014-05-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] There are many warnings with software backend
https://bugs.webkit.org/show_bug.cgi?id=132422
Reviewed by Gyuyoung Kim.
* wtf/efl/EflTypedefs.h: Added Ecore_X_Window typedef
2014-04-30 Simon Fraser <simon.fraser@apple.com>
Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
https://bugs.webkit.org/show_bug.cgi?id=132396
Reviewed by Eric Carlson.
Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
* wtf/FeatureDefines.h:
2014-04-30 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=132390
Reviewed by Philippe Normand.
Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
remove, in GTK+ and GST, the existing glib version guards.
This code was rollback from r149879 because Qt MIPS used it. But since
Qt is gone, it is safe to remove now.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Deleted.
(WTF::derefGPtr): Deleted.
2014-04-29 Alex Christensen <achristensen@webkit.org>
[WinCairo] Switch video from GStreamer to Media Foundation.
https://bugs.webkit.org/show_bug.cgi?id=132358
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
Removed dependencies on GStreamer.
* wtf/Platform.h:
Use Media Foundation instead of GStreamer and GLib.
2014-04-29 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix cloop build.
* wtf/Platform.h:
2014-04-29 Michael Saboff <msaboff@apple.com>
For DARWIN platforms, use system temporary directory for DataLog output
https://bugs.webkit.org/show_bug.cgi?id=132346
Reviewed by Geoffrey Garen.
Added code to call confstr() to access the process's temporary directory to use that
location instead of /tmp/. Put the code behind #ifdef DATA_LOG_TO_DARWIN_TEMP_DIR.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2014-04-25 Filip Pizlo <fpizlo@apple.com>
Figure out how many cores are available for realsies.
Rubber stamped by Andreas Kling.
HW_AVAILCPU is more canonical than HW_NCPU. For example if you use hacks to tell Darwin
to make it seem like there are fewer CPUs, HW_AVAILCPU will change but HW_NCPU won't.
HW_NCPU doesn't reflect how much actual paralellism you'll get; it's merely reporting
facts about the machine you're running on. HW_AVAILCPU is almost always what WebKit
wants since it uses this information to decide how many threads to launch for various
things.
* wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
2014-04-22 Brent Fulgham <bfulgham@apple.com>
[Win] Support Python 2.7 in Cygwin
https://bugs.webkit.org/show_bug.cgi?id=132023
Reviewed by Michael Saboff.
* WTF.vcxproj/WTFGenerated.make: Use proper path to Python.
2014-04-21 Eric Carlson <eric.carlson@apple.com>
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799
Reviewed by Dean Jackson.
* wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE.
2014-04-21 Darin Adler <darin@apple.com>
Add HashSet::takeAny
https://bugs.webkit.org/show_bug.cgi?id=131928
Reviewed by Benjamin Poulain.
* wtf/HashSet.h: Added an overload of take that takes an iterator,
and used it to implement both the existing take and new takeAny functions.
2014-04-20 Andreas Kling <akling@apple.com>
Speed up jsStringWithCache() through WeakGCMap inlining.
<https://webkit.org/b/131923>
Add HashMap::fastAdd(), which is the same as add() except we'll tell
the compiler to aggressively inline it.
Reviewed by Darin Adler.
* wtf/HashMap.h:
* wtf/HashTable.h:
2014-04-19 Filip Pizlo <fpizlo@apple.com>
Make it easier to check if an integer sum would overflow
https://bugs.webkit.org/show_bug.cgi?id=131900
Reviewed by Darin Adler.
* wtf/CheckedArithmetic.h:
(WTF::checkedSum):
(WTF::sumOverflows):
2014-04-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167527.
https://bugs.webkit.org/show_bug.cgi?id=131883
Broke 32-bit build (Requested by ap on #webkit).
Reverted changeset:
"[Mac] implement WebKitDataCue"
https://bugs.webkit.org/show_bug.cgi?id=131799
http://trac.webkit.org/changeset/167527
2014-04-18 Eric Carlson <eric.carlson@apple.com>
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799
Reviewed by Dean Jackson.
* wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE.
2014-04-18 Martin Robinson <mrobinson@igalia.com>
Remove DynamicAnnotations.h?
https://bugs.webkit.org/show_bug.cgi?id=131754
Reviewed by Simon Fraser.
This file, which helped support tools like Valgrind was unused.
* WTF.vcxproj/WTF.vcxproj: Remove references to the files.
* WTF.vcxproj/WTF.vcxproj.filters: Remove references to the files.
* WTF.xcodeproj/project.pbxproj: Remove references to the files.
* wtf/CMakeLists.txt: Remove references to the files.
* wtf/DynamicAnnotations.cpp: Removed.
* wtf/DynamicAnnotations.h: Removed.
* wtf/ThreadSafeRefCounted.h: Remove references to the files.
* wtf/text/StringStatics.cpp: Remove references to the files.
2014-04-18 Philippe Normand <pnormand@igalia.com>
Remove NETWORK_INFO support
https://bugs.webkit.org/show_bug.cgi?id=131841
Reviewed by Gyuyoung Kim.
* wtf/FeatureDefines.h:
2014-04-17 Filip Pizlo <fpizlo@apple.com>
Don't include CompilationThread.h from StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=131817
Reviewed by Simon Fraser.
* wtf/CompilationThread.h:
* wtf/StdLibExtras.h:
* wtf/text/StringImpl.h:
2014-04-17 Darin Adler <darin@apple.com>
Use HashMap<unique_ptr> and Vector<unique_ptr> instead of deprecatedDeleteAllValues
https://bugs.webkit.org/show_bug.cgi?id=73757
Reviewed by Brent Fulgham.
* wtf/Vector.h:
(WTF::deprecatedDeleteAllValues): Deleted.
2014-04-17 Darin Adler <darin@apple.com>
Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
https://bugs.webkit.org/show_bug.cgi?id=131785
rdar://problem/16003108
Reviewed by Brady Eidson.
* wtf/FeatureDefines.h: Added INDEXED_DATABASE_IN_WORKERS.
2014-04-16 Simon Fraser <simon.fraser@apple.com>
Don't include CryptographicallyRandomNumber.h in StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=131772
Reviewed by Sam Weinig.
* wtf/text/StringImpl.h:
2014-04-16 Gavin Barraclough <barraclough@apple.com>
Update to pthread QoS SPI
https://bugs.webkit.org/show_bug.cgi?id=131753
Rubber stamped by Benjamin Poulain
* wtf/ThreadingPthreads.cpp:
(WTF::setCurrentThreadQOSUtility):
2014-04-14 Geoffrey Garen <ggaren@apple.com>
WTF should have an optional mbmalloc target so we can benchmark FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=131662
Reviewed by Darin Adler.
* WTF.xcodeproj/project.pbxproj: Added the target.
* wtf/mbmalloc.cpp: Added. Implements the libmbmalloc.dylib API required
by MallocBench.
2014-04-16 Darin Adler <darin@apple.com>
Make Vector::takeLast work with move-only types (and optimize for types where move is faster)
https://bugs.webkit.org/show_bug.cgi?id=131735
Reviewed by Alexey Proskuryakov.
* wtf/Vector.h:
(WTF::Vector::takeLast): Added a missing std::move. All the other take functions have it.
2014-04-14 Mark Lam <mark.lam@apple.com>
monotonicallyIncreasingTime() should only initialize its static timebaseInfo once.
<https://webkit.org/b/131630>
Reviewed by Filip Pizlo.
The current initialization of the static field is not thread safe.
* wtf/CurrentTime.cpp:
(WTF::monotonicallyIncreasingTime):
2014-04-14 Benjamin Poulain <benjamin@webkit.org>
[JSC] Improve the call site of string comparison in some hot path
https://bugs.webkit.org/show_bug.cgi?id=131605
Reviewed by Darin Adler.
* wtf/text/StringImpl.cpp:
(WTF::stringImplContentEqual):
Inline that function to reduce the call overhead for JSC.
This is only inlined twice, it is not catastrophic for our binary.
2014-04-13 Andy Estes <aestes@apple.com>
Relax adoption requirements of RefCounted objects that are NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=131593
Reviewed by Dan Bernstein.
RefCounted objects that are created by NeverDestroyed<> won't have a
RefPtr adopting them, so call relaxAdoptionRequirements().
* wtf/NeverDestroyed.h:
(WTF::NeverDestroyed::NeverDestroyed):
(WTF::NeverDestroyed::MaybeRelax::MaybeRelax):
2014-04-10 Brent Fulgham <bfulgham@apple.com>
[Win] Clean up some 64-bit warnings from Visual Studio analyzer
https://bugs.webkit.org/show_bug.cgi?id=131514
Reviewed by Tim Horton.
* WTF.vcxproj/WTF.vcxproj: Use correct platform settings for
64-bit build.
* config.h: Ditto.
* wtf/CurrentTime.cpp:
(WTF::highResUpTime): Resolve warning about deprecated API.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize): Silence warning about
an uninitialized variable.
2014-04-09 Geoffrey Garen <ggaren@apple.com>
Rolled back in r166972.
This time, we conditionally exclude linking against bmalloc in Production
builds. Production builds will not be able to link against bmalloc
until the Production build system has been updated to build bmalloc.
WTF should link against bmalloc
https://bugs.webkit.org/show_bug.cgi?id=131403
Reviewed by Mark Rowe.
* Configurations/WTF.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2014-04-09 Geoffrey Garen <ggaren@apple.com>
Put bmalloc headers in the right place
https://bugs.webkit.org/show_bug.cgi?id=131464
Reviewed by Mark Rowe.
* wtf/FastMalloc.cpp: Use "<bmalloc/...>" syntax so we can find our
headers in <header-root>/usr/local/include/bmalloc/.
2014-04-09 Geoffrey Garen <ggaren@apple.com>
Rolled back out r166972.
The production buildbots are still broken because the build-root script
doesn't build bmalloc.
* WTF.xcodeproj/project.pbxproj:
2014-04-09 Geoffrey Garen <ggaren@apple.com>
Rolled back in r166972.
The iOS buildbot's scripts have been updated to build bmalloc, so the
build should now succeed on the bot.
Also renamed "Frameworks" to "Libraries" as suggested in a review comment.
WTF should link against bmalloc
https://bugs.webkit.org/show_bug.cgi?id=131403
Reviewed by Michael Saboff.
This is required to build successfullly with bmalloc enabled.
* WTF.xcodeproj/project.pbxproj:
2014-04-08 Geoffrey Garen <ggaren@apple.com>
Stop linking WTF against bmalloc.
Reviewed by Enrica Casucci.
This seems to have broken an iOS buildbot script. Disable it for now
until we can fix the script.
* WTF.xcodeproj/project.pbxproj:
2014-04-08 Geoffrey Garen <ggaren@apple.com>
WTF should link against bmalloc
https://bugs.webkit.org/show_bug.cgi?id=131403
Reviewed by Michael Saboff.
This is required to build successfullly with bmalloc enabled.
* WTF.xcodeproj/project.pbxproj:
2014-04-08 Geoffrey Garen <ggaren@apple.com>
Added a bmalloc back-end for FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=131387
Reviewed by Andreas Kling.
We'll need to rethink some things if we adopt this back-end. For example,
fastMallocSize() and fastMallocGoodSize() are no longer real things. But,
this is enough to test for now.
* wtf/FastMalloc.cpp:
(WTF::fastMalloc):
(WTF::fastCalloc):
(WTF::fastRealloc):
(WTF::fastFree):
(WTF::fastMallocSize):
(WTF::fastMallocGoodSize):
(WTF::tryFastMalloc):
(WTF::tryFastRealloc):
(WTF::tryFastCalloc):
(WTF::releaseFastMallocFreeMemory):
(WTF::fastMallocStatistics):
2014-04-08 Andres Gomez <agomez@igalia.com>
[GTK] [EFL] Build fails with GCC < 4.8.x
https://bugs.webkit.org/show_bug.cgi?id=130585
Reviewed by Martin Robinson.
The behavior in lower versions of GCC seem to be related to
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2132.
Provided explicit casts for the failing ambiguous overloads.
* wtf/gtk/MainThreadGtk.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::wakeUp): Provided lambda with a RefPtr instead of
ref and de-referring.
2014-04-04 Mark Lam <mark.lam@apple.com>
Date object needs to check for ES5 15.9.1.14 TimeClip limit.
<https://webkit.org/b/131248>
Reviewed by Mark Hahnenberg.
* wtf/DateMath.cpp:
- Moved the definition of maxECMAScriptTime to the .h file so that we
can use it in other files as well.
(WTF::msToYear):
- Removed a stale comment for parseDateFromNullTerminatedCharacters().
* wtf/DateMath.h:
2014-04-04 Mark Hahnenberg <mhahnenberg@apple.com>
Enhanced GC logging
https://bugs.webkit.org/show_bug.cgi?id=131246
Reviewed by Geoff Garen.
Remove OBJECT_MARK_LOGGING
* wtf/FeatureDefines.h:
* wtf/Platform.h:
2014-04-03 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
[EFL] Enable CSS JIT again, it works fine after r166666.
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2014-04-03 Javier Fernandez <jfernandez@igalia.com>
[GTK][Cmake] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131022
Reviewed by Martin Robinson.
* wtf/Platform.h: Enable CSS JIT for GTK port.
2014-04-02 Frédéric Wang <fred.wang@free.fr>
Operator stretching: read the Open Type MATH table
https://bugs.webkit.org/show_bug.cgi?id=130324
Reviewed by Chris Fleizach.
* wtf/Platform.h: enable OPENTYPE_MATH on platforms that can read OpenType tables.
2014-04-02 Alex Christensen <achristensen@webkit.org>
[WinCairo] Build fix with GMainLoopSource.
https://bugs.webkit.org/show_bug.cgi?id=131089
Reviewed by Carlos Garcia Campos.
* wtf/gobject/GMainLoopSource.cpp:
Only compile if glib is used, which fixes compile errors with video disabled in WinCairo.
* wtf/gobject/GMainLoopSource.h:
Export the GMainLoopSource functions to WTF.dll to link with where they are called in the GStreamer code.
Also removed spaces to appease style bot.
2014-04-01 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
[EFL] REGRESSION(166569): It made DoYouEvenBench/Full.html, CSS/QuerySelector.html and Dromaeo performance tests crash
https://bugs.webkit.org/show_bug.cgi?id=131039
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h: Disable CSS JIT on EFL until proper fix.
2014-04-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r166583.
https://bugs.webkit.org/show_bug.cgi?id=131040
It's causing frequent crashes when running Layout Tests
(Requested by svillar on #webkit).
Reverted changeset:
"[GTK][Cmake] Enable CSS JIT"
https://bugs.webkit.org/show_bug.cgi?id=131022
http://trac.webkit.org/changeset/166583
2014-04-01 Javier Fernandez <jfernandez@igalia.com>
[GTK][Cmake] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131022
Reviewed by Martin Robinson.
* wtf/Platform.h: Enable CSS JIT for GTK port.
2014-04-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMake][EFL] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131010
Reviewed by Benjamin Poulain.
* wtf/Platform.h: Enable CSS JIT for EFL port.
2014-03-31 Dean Jackson <dino@apple.com>
Remove WEB_ANIMATIONS
https://bugs.webkit.org/show_bug.cgi?id=130989
Reviewed by Simon Fraser.
Remove this feature flag until we plan to implement.
* wtf/FeatureDefines.h:
2014-03-31 Alex Christensen <achristensen@webkit.org>
Preparation for using Soup on Windows.
https://bugs.webkit.org/show_bug.cgi?id=130615
Reviewed by Carlos Garcia Campos.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
Add all gobject source files in WinCairo build.
* wtf/gobject/GRefPtr.h:
Export refGPtr and derefGPtr overloads in WTF.dll to fix linker errors with WebKit.dll when using soup.
2014-03-31 Zan Dobersek <zdobersek@igalia.com>
Use std::unique_ptr in WTF::CompressedVector, WTF::GenericCompressedData
https://bugs.webkit.org/show_bug.cgi?id=130737
Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
for the CompressedVector and GenericCompressedData classes.
* wtf/Compression.cpp:
(WTF::GenericCompressedData::create):
* wtf/Compression.h:
(WTF::CompressedVector::create):
(WTF::CompressibleVector::decompressIfNecessary):
2014-03-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Enable async text input implementation
https://bugs.webkit.org/show_bug.cgi?id=130856
Reviewed by Sam Weinig.
* wtf/Platform.h: Added a USE macro definition.
2014-03-28 peavo@outlook.com <peavo@outlook.com>
Null pointer crash in String::append(UChar).
https://bugs.webkit.org/show_bug.cgi?id=130900
Reviewed by Michael Saboff.
* wtf/text/WTFString.cpp:
(WTF::String::append): Check and initialize m_impl member first, to avoid null pointer crash.
2014-03-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r166360.
https://bugs.webkit.org/show_bug.cgi?id=130869
Seems to have broken PLT (Requested by ap on #webkit).
Reverted changeset:
"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360
2014-03-27 Alexey Proskuryakov <ap@apple.com>
Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
equivalents, ASSERT(!_data->_keyDownEventBeingResent)
https://bugs.webkit.org/show_bug.cgi?id=130767
<rdar://problem/16307487>
Reviewed by Darin Adler.
Changed RunLoop to wake up and fire timers only in default run loop mode by default,
and added an ability to add more modes (can't use AppKit symbols in WTF).
In addition to this bug, the change also blocks modal alerts from appearing under
menus during menu tracking.
* wtf/RunLoop.h:
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::addModeForWakeUpAndTimers):
(WTF::RunLoop::TimerBase::start):
2014-03-26 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Removing the remaining Automake cruft.
* GNUmakefile.list.am: Removed.
2014-03-25 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the autotools build
https://bugs.webkit.org/show_bug.cgi?id=130717
Reviewed by Anders Carlsson.
* GNUmakefile.am: Removed.
* config.h: Removed references to the autotools configure file.
2014-03-25 Gabor Rapcsanyi <rgabor@webkit.org>
[ARM64] GCC generates wrong code with -O2 flag in WTF::weakCompareAndSwap
https://bugs.webkit.org/show_bug.cgi?id=130500
Reviewed by Filip Pizlo.
Set the first operand to the exact register in the inline assembly with GCC.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2014-03-25 Gabor Rapcsanyi <rgabor@webkit.org>
[EFL] Add ARM64 build support
https://bugs.webkit.org/show_bug.cgi?id=130506
Rubber stamped by Gyuyoung Kim.
* wtf/Platform.h: Set WTF_CPU_ARM64 when __aarch64__ is defined.
2014-03-24 Andy Estes <aestes@apple.com>
Fix the iOS build.
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
(WTF::setCurrentThreadQOSUtility):
2014-03-24 Gavin Barraclough <barraclough@apple.com>
Add support for thread QoS
https://bugs.webkit.org/show_bug.cgi?id=130688
Speculative EFL build fix.
* wtf/ThreadingPthreads.cpp:
(WTF::setCurrentThreadQOSUtility):
2014-03-24 Gavin Barraclough <barraclough@apple.com>
Add support for thread QoS
https://bugs.webkit.org/show_bug.cgi?id=130688
Reviewed by Andreas Kling.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::runScavengerThread):
- block freeing is a utility activity.
* wtf/Threading.h:
- declaration.
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
- default to interactive.
(WTF::setCurrentThreadQOSUtility):
- implementation.
* wtf/ThreadingWin.cpp:
(WTF::setCurrentThreadQOSUtility):
- no-op implementation.
2014-03-23 Hyowon Kim <hw1008.kim@samsung.com>
Move all EFL typedefs into EflTypedefs.h.
https://bugs.webkit.org/show_bug.cgi?id=130511
Reviewed by Gyuyoung Kim.
* wtf/Platform.h: include EflTypedefs.h.
* wtf/efl/EflTypedefs.h: Added.
* wtf/efl/RefPtrEfl.h: Remove EFL typedefs.
2014-03-22 Darin Adler <darin@apple.com>
Remove String::deprecatedCharacters
https://bugs.webkit.org/show_bug.cgi?id=126854
Reviewed by Sam Weinig.
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::reifyString): Removed code to update 16-bit shadow.
* wtf/text/StringBuilder.h: Removed deprecatedCharacters.
(WTF::StringBuilder::StringBuilder): Removed m_valid16BitShadowLength.
(WTF::StringBuilder::clear): Removed code to clear m_valid16BitShadowLength.
(WTF::StringBuilder::swap): Removed code to swap m_valid16BitShadowLength.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl): Removed code to free m_copyData16.
(WTF::StringImpl::upper): Use StringView::upconvertedCharacters for slow case.
(WTF::StringImpl::lower): Ditto.
(WTF::StringImpl::find): Use characters8/16 rather than deprecatedCharacters.
Added an 8-bit code path to one of the overloads. Might want to revisit later
to decide whether to use templates instead of copy/paste, or even use StringView
to cut down on duplicate code paths.
(WTF::StringImpl::findIgnoringCase): Ditto.
(WTF::StringImpl::sizeInBytes): Remove code to handle has16BitShadow case.
(WTF::equalIgnoringNullity): Added. To be called by the Vector template in the header.
* wtf/text/StringImpl.h: Removed deprecatedCharacters, has16BitShadow,
upconvertCharacters, getData16SlowCase, s_hashFlagHas16BitShadow, and m_copyData16.
(WTF::equalIgnoringNullity): Changed the template function into an inline that calls
a non-inline helper function. The non-inline function handles both 8-bit and 16-bit
strings.
* wtf/text/StringView.h:
(WTF::StringView::StringView): Added an overload so we can make one of these directly
from a StringImpl without first wrapping it in a string. Added an adapter so we can
use StringView as part of string concatenation. Added an append function so we can
append to a Vector<UChar>.
* wtf/text/WTFString.cpp:
(WTF::String::append): Use StringView::getCharactersWithUpconvert. Also changed
single-character append so it won't always turn an 8-bit string into a 16-bit one.
(WTF::String::insert): Removed one insert overload and changed the other to use
StringView::getCharactersWithUpconvert.
(WTF::String::truncate): Changed to use StringImpl::substring.
(WTF::String::percentage): Added characters8/16 paths instead of using
deprecatedCharacters.
* wtf/text/WTFString.h: Removed deprecatedCharacters, getCharactersWithUpconvert,
insert(UChar*, unsigned, unsigned), and the append overload for Vector<UChar>.
2014-03-20 Darin Adler <darin@apple.com>
Fix a header guard mistake (harmless but clearly wrong)
https://bugs.webkit.org/show_bug.cgi?id=130559
Reviewed by Andreas Kling.
* wtf/text/StringConcatenate.h: Correct the macro name in the header guard.
2014-03-20 Hyowon Kim <hw1008.kim@samsung.com>
Move to using std::unique_ptr for EFL objects.
https://bugs.webkit.org/show_bug.cgi?id=129853
Reviewed by Gyuyoung Kim.
EflUniquePtr is a template alias of std::unique_ptr
with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
* wtf/OwnPtrCommon.h:
* wtf/PlatformEfl.cmake:
* wtf/RunLoop.h:
* wtf/efl/MainThreadEfl.cpp:
(WTF::pipeObject):
(WTF::initializeMainThreadPlatform):
* wtf/efl/OwnPtrEfl.cpp: Removed.
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::RunLoop):
* wtf/efl/UniquePtrEfl.h: Added.
(WTF::EflPtrDeleter::operator()):
2014-03-20 Gavin Barraclough <barraclough@apple.com>
Remove IdentifierTable typedef, isIdentifier()
https://bugs.webkit.org/show_bug.cgi?id=130533
Rubber stamped by Geoff Garen.
Code should use AtomicStringTable, isAtomic() directly.
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::setCurrentAtomicStringTable):
(WTF::WTFThreadData::resetCurrentAtomicStringTable):
- removed IdentifierTypedef.
* wtf/text/StringImpl.h:
(WTF::StringImpl::flagIsAtomic):
- renamed flagIsIdentfier -> flagIsAtomic.
2014-03-20 Gavin Barraclough <barraclough@apple.com>
Merge AtomicString, Identifier
https://bugs.webkit.org/show_bug.cgi?id=128624
Reviewed by Geoff Garen.
WTF::StringImpl currently supports two uniquing mechanism - AtomicString and
Identifer - that is one too many.
Remove Identifier in favour of AtomicString. Identifier had two interesting
mechanisms that we preserve.
(1) JSC API VMs each get their own string table, switch the string table on
API entry/exit.
(2) JSC caches a pointer to the string table on the VM to avoid a thread
specific access. Adds a new AtomicString::add method to support this.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
- remove allocation of IdentifierTable.
(WTF::WTFThreadData::~WTFThreadData):
- remove deletion of IdentifierTable.
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::atomicStringTable):
- table is now switched by JSC API, return the current table.
(WTF::WTFThreadData::currentIdentifierTable):
- now returns the current AtomicStringTable.
(WTF::WTFThreadData::setCurrentIdentifierTable):
- now sets the current AtomicStringTable.
(WTF::WTFThreadData::resetCurrentIdentifierTable):
- now resets the AtomicStringTable.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::addSlowCase):
- add without thread-specific access to access string table.
* wtf/text/AtomicString.h:
(WTF::AtomicString::addWithStringTableProvider):
- add without thread-specific access (used by JSC, string table provided by VM or ExecState).
* wtf/text/AtomicStringTable.cpp:
(WTF::AtomicStringTable::create):
- renamed m_atomicStringTable -> m_defaultAtomicStringTable.
(WTF::AtomicStringTable::~AtomicStringTable):
(WTF::AtomicStringTable::destroy):
- clearing of table moved from AtomicStringTable::destroy to destructor.
* wtf/text/AtomicStringTable.h:
- added destructor.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
- Identifers no longer exist; no need to remove them from IdentifierTable.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
- removed s_hashFlagIsIdentifier.
(WTF::StringImpl::flagIsIdentifier):
- s_hashFlagIsIdentifier -> s_hashFlagIsAtomic.
(WTF::StringImpl::isIdentifier):
- now synonymous to isAtomic().
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::hashAndFlagsForEmptyUnique):
- removed s_hashFlagIsIdentifier.
2014-03-20 Zan Dobersek <zdobersek@igalia.com>
Unreviewed Clang build fix for the GTK port after r165952.
* wtf/gobject/GMainLoopSource.h: Include the <functional> header for the std::function<> objects.
2014-03-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add GMainLoopSource class to wrap idle and timeout sources
https://bugs.webkit.org/show_bug.cgi?id=130027
Reviewed by Martin Robinson.
GLib main loop sources like idle and timeouts are sometimes
unconvenient to use and it's very common to forget canceling the
source when the object is destroyed or reset the source ID in the
callback when called. GMainLoopSource is a wrapper class to make it
easier to handle sources and also to avoid those typical mistakes.
It forces to create sources with a name and the user doesn't have
to deal with the source ID anymore. The source is cancelled when
the object is deleted or when a new source is scheduled. It uses
std::function for callbacks so that we no longer need to use the
"proxy" static callbacks either. We can use std::bind to use a
function pointer or a member or even lambda functions. It also handles
repeating sources automatically depending on whether the given
function returns a bool or not.
* GNUmakefile.list.am:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/RunLoop.h:
* wtf/gobject/GMainLoopSource.cpp: Added.
(WTF::GMainLoopSource::createAndDeleteOnDestroy):
(WTF::GMainLoopSource::GMainLoopSource):
(WTF::GMainLoopSource::~GMainLoopSource):
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::reset):
(WTF::GMainLoopSource::scheduleIdleSource):
(WTF::GMainLoopSource::schedule):
(WTF::GMainLoopSource::scheduleTimeoutSource):
(WTF::GMainLoopSource::scheduleAfterDelay):
(WTF::GMainLoopSource::voidCallback):
(WTF::GMainLoopSource::boolCallback):
(WTF::GMainLoopSource::socketCallback):
(WTF::GMainLoopSource::destroy):
(WTF::GMainLoopSource::voidSourceCallback):
(WTF::GMainLoopSource::boolSourceCallback):
(WTF::GMainLoopSource::socketSourceCallback):
* wtf/gobject/GMainLoopSource.h: Added.
(WTF::GMainLoopSource::isScheduled):
* wtf/gtk/MainThreadGtk.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
2014-03-19 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=130494
EmptyUnique strings are Identifiers/Atomic
Reviewed by Geoff Garen.
EmptyUnique strings should set the Identifier/Atomic flag.
* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
- Previously we assumed the only StringImpl that was validly allowed to claim to be
Atomic but not be in a table was the canonical empty string. Now that EmptyUniques
are also marked Atomic, all empty strings may pass this condition.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
- EmptyUnique strings are not in the Atomic/Identfiier tabels, so don't need removing.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
- Change EmptyUnique constructor to call hashAndFlagsForEmptyUnique.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::hashAndFlagsForEmptyUnique):
- Allocate a sequential hash code (this should be just as good for distribution & better
for debugging than the random value) and set flags, now including Atomic & Identifier.
2014-03-19 Gavin Barraclough <barraclough@apple.com>
Small cleanup of empty string
https://bugs.webkit.org/show_bug.cgi?id=130438
Reviewed by Anders Carlson.
The empty string is weird becuase it is used as the impl for an AtomicString, but isAtomic()
returns false.
Also, we set a valid pointer for the characters pointer due to an old PCRE bug; remove this.
Also, we currently only create one 'static' string, the empty string. Adding more might break
assumtions, inhibit the constructor from being used to create other static strings for now.
* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
- update assert.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
- Merge ConstructStaticString constructors, only allow the empty static string to be constructed.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
- ConstructStaticString -> ConstructEmptyString, remove arguments, DEPRECATED_DEFINE_STATIC_LOCAL -> NeverDestroyed.
2014-03-18 Darin Adler <darin@apple.com>
Reduce use of deprecatedCharacters in WebCore
https://bugs.webkit.org/show_bug.cgi?id=130318
Reviewed by Andreas Kling.
* wtf/text/WTFString.h: Export another overload of charactersToFloat since it's used
in WebCore now.
* wtf/text/cf/StringViewCF.cpp: Change so this can build on Windows.
* WTF.vcxproj/WTF.vcxproj: Added StringViewCF.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Added StringViewCF.cpp.
2014-03-18 Filip Pizlo <fpizlo@apple.com>
More FTL enabling.
Rubber stamped by Dan Bernstein and Mark Hahnenberg.
* wtf/Platform.h:
2014-03-17 Darin Adler <darin@apple.com>
Remove most uses of deprecatedCharacter in WTF
https://bugs.webkit.org/show_bug.cgi?id=130317
Reviewed by Andreas Kling.
Re-landing after fixing the "80 instead of 0x80" typo in equalLatin1WithUTF8.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
non-ASCII path.
(WTF::SubstringTranslator8::hash): Added.
(WTF::SubstringTranslator8::equal): Added.
(WTF::SubstringTranslator16::hash): Renamed class.
(WTF::SubstringTranslator16::equal): Ditto.
(WTF::AtomicString::add): Added an 8-bit code path to the substring case.
* wtf/text/Base64.cpp:
(WTF::base64Decode): Added an 8 bit code path.
(WTF::base64URLDecode): Ditto.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
without first using is8Bit. Need to return later to remove use of deprecatedCharacters.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
are ASCII. Also removed the aEnd argument, since the caller only calls this when the
lengths are equal.
(WTF::Unicode::equalLatin1WithUTF8): Added.
* wtf/unicode/UTF8.h: Updated as described above.
2014-03-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165721.
https://bugs.webkit.org/show_bug.cgi?id=130367
It makes the debug bots flaky (Requested by benjaminp on
#webkit).
Reverted changeset:
"Remove most uses of deprecatedCharacter in WTF"
https://bugs.webkit.org/show_bug.cgi?id=130317
http://trac.webkit.org/changeset/165721
2014-03-17 Zan Dobersek <zdobersek@igalia.com>
Use RunLoop objects through references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=130313
Reviewed by Andreas Kling.
Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead
of a pointer. RunLoop::Holder now uses a Ref<RunLoop> member. Timer and TimerBase
constructors take in a RunLoop reference, with TimerBase now storing a RunLoop
reference member instead of a pointer. Platform-specific bits of the RunLoop
class are updated accordingly.
* wtf/RunLoop.cpp:
(WTF::RunLoop::Holder::Holder):
(WTF::RunLoop::Holder::runLoop):
(WTF::RunLoop::initializeMainRunLoop):
(WTF::RunLoop::current):
(WTF::RunLoop::main):
(WTF::RunLoop::isMain):
* wtf/RunLoop.h:
(WTF::RunLoop::Timer::Timer):
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/win/RunLoopWin.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
2014-03-17 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
One more fix after r165725.
Reviewed by Csaba Osztrogonác.
* wtf/WTFThreadData.h:
2014-03-17 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Buildfix after r165725 for non Mac platforms.
Reviewed by Csaba Osztrogonác.
* wtf/WTFThreadData.h:
2014-03-17 Andreas Kling <akling@apple.com>
[Mac] WTFThreadData should use _pthread_getspecific_direct().
<https://webkit.org/b/130320>
Hack WTFThreadData to use a direct key for TLS access when available.
This mechanism uses a dedicated segment register and is the same way
we implement the fast path in FastMalloc.
Reviewed by Darin Adler.
* wtf/FastMalloc.cpp:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::createAndRegisterForGetspecificDirect):
* wtf/WTFThreadData.h:
(WTF::wtfThreadData):
2014-03-16 Darin Adler <darin@apple.com>
Remove most uses of deprecatedCharacter in WTF
https://bugs.webkit.org/show_bug.cgi?id=130317
Reviewed by Andreas Kling.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
non-ASCII path.
(WTF::SubstringTranslator8::hash): Added.
(WTF::SubstringTranslator8::equal): Added.
(WTF::SubstringTranslator16::hash): Renamed class.
(WTF::SubstringTranslator16::equal): Ditto.
(WTF::AtomicString::add): Added an 8-bit code path to the substring case.
* wtf/text/Base64.cpp:
(WTF::base64Decode): Added an 8 bit code path.
(WTF::base64URLDecode): Ditto.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
without first using is8Bit. Need to return later to remove use of deprecatedCharacters.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
are ASCII. Also removed the aEnd argument, since the caller only calls this when the
lengths are equal.
(WTF::Unicode::equalLatin1WithUTF8): Added.
* wtf/unicode/UTF8.h: Updated as described above.
2014-03-16 David Kilzer <ddkilzer@apple.com>
Follow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
<http://webkit.org/b/130283>
<rdar://problem/16281477>
Reviewed by Darin Adler.
* wtf/text/StringImpl.h:
(WTF::loadUnaligned): Restore behavior prior to r165681 for
compilers other than clang.
2014-03-16 Darin Adler <darin@apple.com>
Remove all uses of deprecatedCharacters from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=130304
Reviewed by Anders Carlsson.
* wtf/dtoa.h:
(WTF::parseDouble): Added an overload that takes a StringView.
2014-03-15 Darin Adler <darin@apple.com>
Remove all uses of deprecatedCharacters from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130197
Reviewed by Andreas Kling.
* wtf/text/StringView.h: Added new getCharactersWithUpconvert and upconvertedCharacters
functions. These are useful for callers that need UTF-16.
2014-03-15 Darin Adler <darin@apple.com>
Try to fix EFL build.
* wtf/ThreadingPthreads.cpp: (WTF::changeThreadPriority): Code in this function
was setting the priority of the current thread instead of the passed-in thread.
That was triggering an unused variable warning in the compiler used to build for
EFL. Fixed by using the thread handle instead of pthread_self.
2014-03-15 Michael Saboff <msaboff@apple.com>
It should be possible to adjust DFG and FTL compiler thread priorities
https://bugs.webkit.org/show_bug.cgi?id=130288
Reviewed by Filip Pizlo.
Added ability to change thread priorities relative to its current priority.
Created options to adjust the priority of the DFG and FTL compilation work thread
pools. For two core systems, there might be three runnable threads, the main thread,
the DFG compilation thread and the FTL compilation thread. With the same priority,
the scheduler is free to schedule whatever thread it wants. By lowering the
compilation threads, the main thread can run. Further tests may suggest better values
for the new options, priorityDeltaOfDFGCompilerThreads and priorityDeltaOfFTLCompilerThreads.
For a two-core device, this change has a net positive improvement of 1-3% across
SunSpider, Octane, Kraken and AsmBench.
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::changeThreadPriority):
* wtf/ThreadingWin.cpp:
(WTF::changeThreadPriority):
2014-03-15 David Kilzer <ddkilzer@apple.com>
Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
<http://webkit.org/b/130283>
<rdar://problem/16281477>
Reviewed by Geoff Garen.
* wtf/text/StringImpl.h:
(WTF::loadUnaligned): Add template method.
(WTF::equal): Switch to using loadUnaligned<>().
2014-03-14 Mark Rowe <mrowe@apple.com>
Fix the production build.
Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
be at the expected relative path when working from installed source.
* Configurations/Base.xcconfig:
2014-03-14 Maciej Stachowiak <mjs@apple.com>
Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
https://bugs.webkit.org/show_bug.cgi?id=130276
<rdar://problem/16266927>
Reviewed by Simon Fraser.
* wtf/ASCIICType.h:
* wtf/AVLTree.h:
* wtf/Assertions.cpp:
* wtf/Assertions.h:
* wtf/Atomics.cpp:
* wtf/Atomics.h:
* wtf/AutodrainedPool.h:
* wtf/AutodrainedPoolMac.mm:
* wtf/BoundsCheckedPointer.h:
* wtf/CryptographicUtilities.cpp:
* wtf/CryptographicallyRandomNumber.h:
* wtf/CurrentTime.h:
* wtf/Deque.h:
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/FeatureDefines.h:
* wtf/GetPtr.h:
* wtf/HashIterators.h:
* wtf/Locker.h:
* wtf/MainThread.cpp:
* wtf/MainThread.h:
* wtf/MathExtras.h:
* wtf/MediaTime.cpp:
* wtf/MediaTime.h:
* wtf/MessageQueue.h:
* wtf/MetaAllocator.cpp:
* wtf/MetaAllocator.h:
* wtf/MetaAllocatorHandle.h:
* wtf/OSRandomSource.cpp:
* wtf/OSRandomSource.h:
* wtf/Platform.h:
* wtf/RandomNumber.cpp:
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
* wtf/RedBlackTree.h:
* wtf/RunLoopTimer.h:
* wtf/RunLoopTimerCF.cpp:
* wtf/SchedulePair.h:
* wtf/SchedulePairCF.cpp:
* wtf/SchedulePairMac.mm:
* wtf/SegmentedVector.h:
* wtf/StackBounds.h:
* wtf/StaticConstructors.h:
* wtf/StringExtras.h:
* wtf/ThreadFunctionInvocation.h:
* wtf/ThreadSafeRefCounted.h:
* wtf/ThreadSpecific.h:
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/WTFThreadData.cpp:
* wtf/WTFThreadData.h:
* wtf/efl/OwnPtrEfl.cpp:
* wtf/mac/MainThreadMac.mm:
* wtf/text/AtomicStringHash.h:
* wtf/text/AtomicStringImpl.h:
* wtf/text/Base64.h:
* wtf/text/CString.cpp:
* wtf/text/CString.h:
* wtf/text/LChar.h:
* wtf/text/cf/StringCF.cpp:
* wtf/text/mac/StringMac.mm:
* wtf/unicode/CharacterNames.h:
* wtf/unicode/Collator.h:
* wtf/unicode/CollatorDefault.cpp:
* wtf/unicode/UTF8.cpp:
* wtf/unicode/UTF8.h:
* wtf/unicode/icu/CollatorICU.cpp:
* wtf/win/MainThreadWin.cpp:
2014-03-14 Byungseon Shin <sun.shin@lge.com>
Incorrect Date returned between March 1, 2034 and February 28, 2100.
https://bugs.webkit.org/show_bug.cgi?id=130123
Reviewed by Mark Lam.
Fix logic by using predefined Date APIs.
* wtf/DateMath.cpp:
(WTF::ymdhmsToSeconds):
2014-03-12 Sergio Villar Senin <svillar@igalia.com>
Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
https://bugs.webkit.org/show_bug.cgi?id=129612
Reviewed by Darin Adler.
For new code use static NeverDestroyed<T> instead.
* wtf/RunLoop.cpp:
(WTF::RunLoop::current):
* wtf/StdLibExtras.h:
* wtf/ThreadingPthreads.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):
* wtf/efl/MainThreadEfl.cpp:
(WTF::pipeObject):
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
2014-03-13 Radu Stavila <stavila@adobe.com>
Webkit not building on XCode 5.1 due to garbage collection no longer being supported
https://bugs.webkit.org/show_bug.cgi?id=130087
Reviewed by Mark Rowe.
Disable garbage collection on macosx when not using internal SDK.
* Configurations/Base.xcconfig:
2014-03-12 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Enable Parallel GC
https://bugs.webkit.org/show_bug.cgi?id=130177
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Turn on ENABLE_PARALLEL_GC for the EFL build.
2014-03-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
https://bugs.webkit.org/show_bug.cgi?id=130118
Reviewed by Timothy Hatcher.
* wtf/FeatureDefines.h:
2014-03-11 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening.
* wtf/MathExtras.h: VS2013 provides an lrint implementation. No need to implement
our own.
2014-03-10 Jer Noble <jer.noble@apple.com>
Improve WeakPtr operators.
https://bugs.webkit.org/show_bug.cgi?id=130053
Reviewed by Andreas Kling.
Replace the "operator!()" with an explicit bool operator. Add an "operator->()".
* wtf/WeakPtr.h:
(WTF::WeakPtr::operator bool):
(WTF::WeakPtr::operator->):
2014-03-10 Brent Fulgham <bfulgham@apple.com>
[Win] Pass environment to Pre-Build, Pre-Link, and Post-Build Stages.
https://bugs.webkit.org/show_bug.cgi?id=130023.
Reviewed by Dean Jackson.
* WTF.vcxproj/WTF.proj: Avoid putting trailing slashes in system paths to avoid
escaping during later string substitution.
* WTF.vcxproj/build-generated-files.sh: Accept environment values passed by VS.
2014-03-10 Mark Hahnenberg <mhahnenberg@apple.com>
Turn on GenGC on other 64-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=129258
Reviewed by Oliver Hunt.
* wtf/Platform.h:
2014-03-07 peavo@outlook.com <peavo@outlook.com>
[Win64] Compile error after r165128.
https://bugs.webkit.org/show_bug.cgi?id=129807
Reviewed by Mark Lam.
* wtf/Platform.h: MSVC does not support computed goto.
Also enabled COMPUTED_GOTO_OPCODES when !ENABLE(LLINT_C_LOOP). This is needed because the ASM LLINT operates like COMPUTED_GOTO_OPCODES,
and relies on the related data structures being defined to support this. On Win32, the platform does not HAVE_COMPUTED_GOTO support,
but does want ENABLE_COMPUTED_GOTO_OPCODES because it uses the ASM LLINT.
2014-03-06 Michael Saboff <msaboff@apple.com>
JSC should disable the JIT when building for ARMv7k
https://bugs.webkit.org/show_bug.cgi?id=129829
Reviewed by Oliver Hunt.
Added WTF_CPU_APPLE_ARMV7K CPU define. Disabled the JITs when
that feature define is set.
* wtf/Platform.h:
2014-03-06 Filip Pizlo <fpizlo@apple.com>
Use the LLVM disassembler on ARM64 if we are enabling the FTL
https://bugs.webkit.org/show_bug.cgi?id=129785
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
2014-03-05 peavo@outlook.com <peavo@outlook.com>
[Win32][LLINT] Crash when running JSC stress tests.
https://bugs.webkit.org/show_bug.cgi?id=129429
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Enable LLINT on Win32.
2014-03-04 Zan Dobersek <zdobersek@igalia.com>
[GTK] Build the Udis86 disassembler
https://bugs.webkit.org/show_bug.cgi?id=129679
Reviewed by Michael Saboff.
* wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux.
2014-03-02 Jaehun Lim <ljaehun.lim@samsung.com>
[EFL] Remove m_initEfl from RunLoop.
https://bugs.webkit.org/show_bug.cgi?id=129568
Reviewed by Gyuyoung Kim.
We don't use m_initEfl except RunLoop constructor.
* wtf/RunLoop.h:
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::RunLoop):
2014-03-02 Darin Adler <darin@apple.com>
Cut down use of OwnPtr within WTF itself
https://bugs.webkit.org/show_bug.cgi?id=129567
Reviewed by Sam Weinig.
* wtf/RefCounted.h: Removed OwnPtr includes.
* wtf/StreamBuffer.h: Removed OwnPtr includes and switched to use
std::make_unique and std::unique_ptr instead.
* wtf/Threading.cpp: Removed OwnPtr includes.
* wtf/ThreadingPthreads.cpp: Ditto.
* wtf/Vector.h: Ditto.
2014-02-26 Gavin Barraclough <barraclough@apple.com>
FastMalloc should use vm_page_shift intead of PAGE_SHIFT.
https://bugs.webkit.org/show_bug.cgi?id=129370
Reviewed by Mark Rowe.
"Doesn't this lead to the page map using fewer bits than it was before?
It seems like this will cause some page addresses to no longer be
representable in the map when using 4K pages. Am I missing something?"
* wtf/FastMalloc.cpp:
- bdash raises a valid point. This should make the TCMalloc_PageMap
larger than absolutely necessary, rather than potentially too small.
2014-02-25 Gavin Barraclough <barraclough@apple.com>
FastMalloc should use vm_page_shift intead of PAGE_SHIFT.
https://bugs.webkit.org/show_bug.cgi?id=129370
Reviewed by Geoff Garen.
Previously we used PAGE_SHIFT to initialize kPageShift.
Since this was a constant, it could be used to calculate other
contants used in the code. Some of these values are used in the
definition of certain data structures (specifiying the length of
some array members).
Make kPageShift & dependent properties variables setup during
initialization. Add upper bound values (K_PAGE_SHIFT_MAX,
K_NUM_CLASSES_MAX) for use in cases where we need a constant.
* wtf/FastMalloc.cpp:
(WTF::InitSizeClasses):
- initialize kPageShift, kNumClasses, kPageSize, kMaxValidPages.
(WTF::pages):
- added ASSERT.
(WTF::AllocationSize):
- added ASSERT.
(WTF::TCMalloc_PageHeap::FreeBytes):
- added ASSERT.
(WTF::TCMalloc_PageHeap::init):
- COMPILE_ASSERT -> ASSERT
(WTF::TCMalloc_PageHeap::scavenge):
- added ASSERT.
(WTF::TCMalloc_PageHeap::Carve):
- added ASSERT.
(WTF::mergeDecommittedStates):
- added ASSERT.
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
- added ASSERT.
(WTF::TCMalloc_PageHeap::ReturnedBytes):
- added ASSERT.
(WTF::PagesToMB):
- added ASSERT.
(WTF::TCMalloc_PageHeap::GrowHeap):
- added ASSERT.
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
- kNumClasses -> K_NUM_CLASSES_MAX
(WTF::TCMalloc_ThreadCache::enumerateFreeObjects):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::Init):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::MakeCacheSpace):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::InsertRange):
- added ASSERT.
(WTF::TCMalloc_Central_FreeList::Populate):
- added ASSERT.
(WTF::TCMalloc_ThreadCache::Init):
- added ASSERT.
(WTF::TCMalloc_ThreadCache::Cleanup):
- added ASSERT.
(WTF::TCMalloc_ThreadCache::Scavenge):
- added ASSERT.
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
- added ASSERT.
2014-02-24 Alex Christensen <achristensen@webkit.org>
Disabled WebGL on WinCairo.
Unreviewed.
* wtf/FeatureDefines.h:
Removed ENABLE_WEBGL definition for WinCairo port.
WebGL has not worked on WinCairo since r163079
and it was not compiling with a recent ANGLE update.
2014-02-24 Mark Hahnenberg <mhahnenberg@apple.com>
Turn GenGC on for 32-bit systems
https://bugs.webkit.org/show_bug.cgi?id=128824
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
2014-02-21 Benjamin Poulain <benjamin@webkit.org>
jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
https://bugs.webkit.org/show_bug.cgi?id=128893
Reviewed by Darin Adler.
AtomicString::find() is a special case optimized for the JavaScript bindings. The method can only
be called under specific conditions.
The method is renamed to findStringWithHash().
The new AtomicString::find is generic and does not require any propery on the input.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::findStringWithHash):
(WTF::AtomicString::findSlowCase):
* wtf/text/AtomicString.h:
(WTF::AtomicString::find):
2014-02-20 Csaba Osztrogonác <ossy@webkit.org>
Add StackStats sources to cmake and autotools build files
https://bugs.webkit.org/show_bug.cgi?id=129103
Reviewed by Anders Carlsson.
* GNUmakefile.list.am:
* wtf/CMakeLists.txt:
2014-02-20 Csaba Osztrogonác <ossy@webkit.org>
Get rid of redundant Platform.h includes
https://bugs.webkit.org/show_bug.cgi?id=128817
Reviewed by Brent Fulgham.
* wtf/Assertions.h:
* wtf/Atomics.h:
* wtf/ByteOrder.h:
* wtf/DataLog.h:
* wtf/DisallowCType.h:
* wtf/DynamicAnnotations.h:
* wtf/ExportMacros.h:
* wtf/FastMalloc.h:
* wtf/FlipBytes.h:
* wtf/InlineASM.h:
* wtf/PrintStream.h:
* wtf/ProcessID.h:
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
2014-02-19 Jon Honeycutt <jhoneycutt@apple.com>
Crash in WTF::StringBuilder::append()
https://bugs.webkit.org/show_bug.cgi?id=125817
<rdar://problem/15671883>
Reviewed by Oliver Hunt.
* wtf/text/StringBuilder.cpp:
(WTF::expandedCapacity):
Ensure that we return a new capacity of at least 'requiredLength' in
the case where requiredLength is large. Also, use unsigned rather than
size_t for the parameters and the return value, as callers pass
unsigned arguments and treat the result as an unsigned int.
2014-02-19 Anders Carlsson <andersca@apple.com>
Add WTF_MAKE_FAST_ALLOCATED to more classes
https://bugs.webkit.org/show_bug.cgi?id=129064
Reviewed by Andreas Kling.
* wtf/Bitmap.h:
2014-02-19 Zan Dobersek <zdobersek@igalia.com>
Make PrintStream::print() a variadic template
https://bugs.webkit.org/show_bug.cgi?id=126388
Reviewed by Brent Fulgham.
PrintStream::print() can be converted into a variadic template, printing the value
of the first parameter and recursively calling itself until the single parameter version
is used for printing the last value.
* wtf/DataLog.h:
(WTF::dataLog): Convert the function to a variadic template as well.
* wtf/PrintStream.h:
(WTF::PrintStream::print):
* wtf/StringPrintStream.h:
(WTF::toCString): Ditto.
(WTF::toString): Ditto.
2014-02-19 Zan Dobersek <zdobersek@igalia.com>
Use std::swap() in HashTable::swap()
https://bugs.webkit.org/show_bug.cgi?id=128995
Reviewed by Brent Fulgham.
Use std::swap() to swap the member variable values of two HashTable objects in HashTable::swap().
* wtf/HashTable.h:
(WTF::KeyTraits>::swap):
2014-02-19 Zan Dobersek <zdobersek@igalia.com>
SegmentedVector::append() should take in rvalue reference, forward it to Vector::uncheckedAppend()
https://bugs.webkit.org/show_bug.cgi?id=128996
Reviewed by Brent Fulgham.
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::append): Take in an rvalue reference of the object that's to be appended and
then forward it to Vector::uncheckedAppend(). This avoids unnecessary copies in the current situation
where a const lvalue is accepted and passed on.
2014-02-19 Dan Bernstein <mitz@apple.com>
Simplify PLATFORM(MAC) && !PLATFORM(IOS) and similar expressions
https://bugs.webkit.org/show_bug.cgi?id=129029
Reviewed by Mark Rowe.
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/Threading.cpp:
* wtf/text/cf/StringImplCF.cpp:
(garbageCollectionEnabled):
2014-02-18 Dan Bernstein <mitz@apple.com>
PLATFORM(MAC) is true when building for iOS
https://bugs.webkit.org/show_bug.cgi?id=129025
Reviewed by Mark Rowe.
* wtf/Platform.h: Changed to define WTF_PLATFORM_MAC only on when building for OS X (but
still not when WTF_PLATFORM_GTK or WTF_PLATFORM_EFL are defined).
2014-02-18 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitialized WebCoreWebThreadIsLockedOrDisabled
https://bugs.webkit.org/show_bug.cgi?id=128959
Reviewed by David Kilzer.
When JavaScriptCore is used without WebCore on iOS (e.g. JSContext)
the WebCoreWebThread* functions will not be initialized. Avoid
calling the function pointer if it is uninitialized. This was
happening with remote inspection via StringImpl::createCFString
for implicit NSString / WTFString conversion which uses isMainThread.
* wtf/mac/MainThreadMac.mm:
(WTF::webThreadIsUninitializedOrLockedOrDisabled):
(WTF::isMainThread):
(WTF::canAccessThreadLocalDataForThread):
2014-02-17 Filip Pizlo <fpizlo@apple.com>
More ARM FTL glue
https://bugs.webkit.org/show_bug.cgi?id=128948
Reviewed by Sam Weinig.
* wtf/Platform.h:
2014-02-17 Anders Carlsson <andersca@apple.com>
Remove ENABLE_GLOBAL_FASTMALLOC_NEW
https://bugs.webkit.org/show_bug.cgi?id=127067
Reviewed by Geoffrey Garen.
Remove the global operator new/operator delete overrides. Having ALWAYS_INLINE operators
like we do is really undefined behavior according to the C++ standard and we've been lucky enough
to get away with it so far, but any code that calls operator new/operator delete inside from the C++ standard
library (not from headers that are included) will be mismatched and potentially crash. libc++ calls
delete in it's std::thread implementation for example.
The only supported way to override operator new and operator delete globally is to not use inline
functions, but that would mean that any application using WebKit would not be able to provide custom
operator new/operator delete functions so we'll just reuse the already existing infrastructure consisting
of the WTF_MAKE_FAST_ALLOCATED macro.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FastMalloc.h:
* wtf/Platform.h:
2014-02-17 Ryan Lortie <desrt@desrt.ca>
Enable DFG_JIT on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=128898
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2014-02-15 Filip Pizlo <fpizlo@apple.com>
FTL should inline polymorphic heap accesses
https://bugs.webkit.org/show_bug.cgi?id=128795
Reviewed by Oliver Hunt.
* wtf/PrintStream.h:
(WTF::PointerDumpInContext::PointerDumpInContext):
(WTF::PointerDumpInContext::dump):
(WTF::pointerDumpInContext):
2014-02-16 Zan Dobersek <zdobersek@igalia.com>
Reintroduce const qualifiers for return types of (Filter|Transform)Iterator::operator*()
https://bugs.webkit.org/show_bug.cgi?id=126875
The const qualifiers for the return types of FilterIterator::operator*() and TransformIterator::operator*()
were removed in r161797 and r161802 because of compilation failures when using GCC and having an Iterator
type that already had the const qualifier. std::remove_const is now used to appease GCC and enforce the const
qualifier on the return type, regardless of the Iterator type and its qualifiers.
* wtf/IteratorAdaptors.h:
(WTF::FilterIterator::operator*):
(WTF::TransformIterator::operator*):
2014-02-15 Filip Pizlo <fpizlo@apple.com>
Vector with inline capacity should work with non-PODs
https://bugs.webkit.org/show_bug.cgi?id=128864
Reviewed by Michael Saboff.
Previously, we would copy the inline storage of a vector as if it was a bag of bits.
This presumed that the element type was relocatable. In general this is only true for
PODs.
This patch changes this by introducing a swap operation over inline storage. This swap
operation requires being told about the size that is in use.
Deques would have required some cleverness to make this work, because the swap
operation needs to know which subset of elements are in-use and assumes that a size is
sufficient for this. That's not true for deques. Instead of trying to do very clever
things, I just removed the inline capacity option from Deque. I believe that this is
fine since there are only two users of Deque with inline capacity, and both of them
appear to be allocated rarely enough that inline capacity probably doesn't help much.
* wtf/Deque.h:
(WTF::DequeIterator::DequeIterator):
(WTF::DequeConstIterator::DequeConstIterator):
(WTF::Deque<T>::checkValidity):
(WTF::Deque<T>::checkIndexValidity):
(WTF::Deque<T>::invalidateIterators):
(WTF::Deque<T>::Deque):
(WTF::=):
(WTF::Deque<T>::destroyAll):
(WTF::Deque<T>::~Deque):
(WTF::Deque<T>::swap):
(WTF::Deque<T>::clear):
(WTF::Deque<T>::expandCapacityIfNeeded):
(WTF::Deque<T>::expandCapacity):
(WTF::Deque<T>::append):
(WTF::Deque<T>::prepend):
(WTF::Deque<T>::removeFirst):
(WTF::Deque<T>::removeLast):
(WTF::Deque<T>::remove):
(WTF::DequeIteratorBase<T>::checkValidity):
(WTF::DequeIteratorBase<T>::addToIteratorsList):
(WTF::DequeIteratorBase<T>::removeFromIteratorsList):
(WTF::DequeIteratorBase<T>::DequeIteratorBase):
(WTF::DequeIteratorBase<T>::~DequeIteratorBase):
(WTF::DequeIteratorBase<T>::isEqual):
(WTF::DequeIteratorBase<T>::increment):
(WTF::DequeIteratorBase<T>::decrement):
(WTF::DequeIteratorBase<T>::after):
(WTF::DequeIteratorBase<T>::before):
* wtf/Vector.h:
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::swap):
2014-02-15 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove 'static' specifier from free inline functions in StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=118554
Reviewed by Darin Adler.
At first 'static' does not bring any use here, secondly static free
inline functions in headers is a bad practice in general as each instance
of function defined as inline is treated as a separate function and each
instance has its own copy of static locals and string literals.
* wtf/text/StringImpl.h:
(WTF::codePointCompare):
(WTF::codePointCompare8):
(WTF::codePointCompare16):
(WTF::codePointCompare8To16):
(WTF::isSpaceOrNewline):
2014-02-14 Benjamin Poulain <bpoulain@apple.com>
Improve the performance on mobile of FTPDirectoryDocument
https://bugs.webkit.org/show_bug.cgi?id=128778
Reviewed by Antti Koivisto.
* wtf/text/WTFString.h:
(WTF::String::endsWith): add a missing overload.
2014-02-14 Wojciech Bielawski <w.bielawski@samsung.com>
(try)append and insert operations don't need new operator for PODs
https://bugs.webkit.org/show_bug.cgi?id=128185
Reviewed by Darin Adler.
Vector's methods use VectorCopier to copy data.
VectorCopier for PODs exteded to be used with different types. For different types placement new copy approach is applied. For the same types memcpy is applied.
* wtf/Vector.h:
(WTF::OverflowHandler>::append): use VectorCopier to copy data.
(WTF::OverflowHandler>::tryAppend): use VectorCopier to copy data.
(WTF::OverflowHandler>::insert): use VectorCopier to copy data.
2014-02-13 Daniel Bates <dabates@apple.com>
Fix the iOS build after <http://trac.webkit.org/changeset/164064
* wtf/Platform.h:
2014-02-13 Daniel Bates <dabates@apple.com>
[iOS] Disable HAVE_ARM_NEON_INTRINSICS
For now, disable HAVE_ARM_NEON_INTRINSICS when building for iOS. We want
to audit the applicable code before we enable this define.
* wtf/Platform.h:
2014-02-11 Filip Pizlo <fpizlo@apple.com>
Hoist and combine array bounds checks
https://bugs.webkit.org/show_bug.cgi?id=125433
Reviewed by Mark Hahnenberg.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/HashMethod.h: Added.
(WTF::HashMethod::operator()):
2014-02-13 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Code cleanup: remove gcc<4.7 guards.
https://bugs.webkit.org/show_bug.cgi?id=128729
Reviewed by Anders Carlsson.
Remove GCC_VERSION_AT_LEAST guards when it checks for pre-4.7 versions,
as WK does not compile with earlier gcc versions.
* wtf/Assertions.cpp:
* wtf/Platform.h:
2014-02-12 Mark Lam <mark.lam@apple.com>
No need to save reservedZoneSize when dropping the JSLock.
<https://webkit.org/b/128719>
Reviewed by Geoffrey Garen.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
- removed unnneeded m_savedReservedZoneSize.
2014-02-11 Mark Hahnenberg <mhahnenberg@apple.com>
32-bit LLInt writeBarrierOnGlobalObject is wrong
https://bugs.webkit.org/show_bug.cgi?id=128556
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Removed OBJECT_MARK_LOGGING from Platform.h since it already exists in FeatureDefines.h
2014-02-11 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, deleted file in WTF.
https://bugs.webkit.org/show_bug.cgi?id=128601
Reviewed by Csaba Osztrogonác.
* WTF.vcxproj/WTF.vcxproj: Removed reference to deleted file.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2014-02-10 Michael Saboff <msaboff@apple.com>
Re-enable ARM Thumb2 disassembler
https://bugs.webkit.org/show_bug.cgi?id=128577
Reviewed by Filip Pizlo.
Added definition of WTF_USE_ARMV7_DISASSEMBLER back to Platform.h
* wtf/Platform.h:
2014-02-10 Benjamin Poulain <benjamin@webkit.org>
Add the basic infrastructure to compile attributes matching in selectors
https://bugs.webkit.org/show_bug.cgi?id=128484
Reviewed by Gavin Barraclough.
* wtf/Vector.h:
(WTF::VectorBufferBase::bufferMemoryOffset):
(WTF::Vector::sizeMemoryOffset):
(WTF::Vector::dataMemoryOffset):
Expose the memory offsets of Vector::size() and the memory buffer pointer for the JIT.
2014-02-10 Enrica Casucci <enrica@apple.com>
copyShortASCIIString crashes on iOS after r163793.
https://bugs.webkit.org/show_bug.cgi?id=128548.
Reviewed by Alexey Proskuryakov.
Adding null check.
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::copyShortASCIIString):
2014-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=127554
Reviewed by Gustavo Noronha Silva.
GUniqueOutPtr is a simplified version of GOwnPtr for the cases
where we need the address of the contained pointer. GUniqueOutPtr
uses GUniquePtr to free the contained object and to release the
container pointer. The API is very simple to make sure this is
only used when outPtr() is needed. It can't be constructed with a
pointer, and there's not method to set a new pointer. Another
difference with the old GOwnPtr is that outPtr() can be used
multiple times, because it frees any pointer previously set.
* GNUmakefile.list.am:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/gobject/GOwnPtr.cpp: Removed.
* wtf/gobject/GOwnPtr.h: Removed.
* wtf/gobject/GUniquePtr.h:
(WTF::GUniqueOutPtr::GUniqueOutPtr):
(WTF::GUniqueOutPtr::~GUniqueOutPtr):
(WTF::GUniqueOutPtr::outPtr):
(WTF::GUniqueOutPtr::reset):
(WTF::GUniqueOutPtr::release):
(WTF::GUniqueOutPtr::operator*):
(WTF::GUniqueOutPtr::operator->):
(WTF::GUniqueOutPtr::get):
(WTF::GUniqueOutPtr::operator!):
(WTF::GUniqueOutPtr::operator UnspecifiedBoolType):
2014-02-10 Darin Adler <darin@apple.com>
Stop using String::deprecatedCharacters to call WTF::Collator
https://bugs.webkit.org/show_bug.cgi?id=128517
WTF passes ICU’s deprecated ULOC_REQUESTED_LOCALE to ucol_getLocaleByType()
rdar://problem/15183390
Reviewed by Alexey Proskuryakov.
This patch fixes both bugs above by reworking WTF::Collator.
* wtf/unicode/Collator.h: Fixed formatting. Got rid of the Collator::Result type,
since the collator uses the same return value scheme as strcmp and as ICU; an int
will do for the return type. Simplified the support for UCONFIG_NO_COLLATION by
using a separate copy of the class definition. (We should check if anyone needs
UCONFIG_NO_COLLATION support, and remove it if not.) Changed the lower-first flag
from a separate function to a constructor argument. Changed the arguments to
the collate function to StringView. Added a collate UTF8 function. Changed the
m_collate data member to no longer be mutable since we no longer allocate it lazily.
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::collate): Rewrote to be simpler.
(WTF::Collator::collateUTF8): Added. Converts from UTF-8 to a String and then calls
the collate function above.
* wtf/unicode/icu/CollatorICU.cpp: Added a FIXME about the fact that this file
has the wrong name and location. Since we always use ICU, there's no need to mention
it in the file name.
(WTF::copyASCIIString): Added.
(WTF::copyDefaultLocale): Added.
(WTF::resolveDefaultLocale): Added. Maps null locale to a default on Mac and iOS,
since on those platforms ICU does not use the correct default locale when passed null.
(WTF::localesMatch): Added.
(WTF::Collator::Collator): Moved most of the code from createCollator here.
Simplified it by storing the collator configuration along with the collator in globals.
(WTF::Collator::~Collator): Moved most of the code from releaseCollator here.
(WTF::getIndexLatin1): Added.
(WTF::moveLatin1): Added.
(WTF::hasNextLatin1): Added.
(WTF::hasPreviousLatin1): Added.
(WTF::currentLatin1): Added.
(WTF::nextLatin1): Added.
(WTF::previousLatin1): Added.
(WTF::getStateLatin1): Added.
(WTF::setStateLatin1): Added.
(WTF::createLatin1Iterator): Added. Uses the functions above to make a UCharIterator
that works for a WTF::StringView-style Latin-1 string.
(WTF::createIterator): Added. Uses either createLatin1Iterator or uiter_setString to
make a UCharIterator that works for a WTF::StringView.
(WTF::Collator::collate): Changed to use ucol_strcollIter.
(WTF::createIteratorUTF8): Added. Uses uiter_setUTF8.
(WTF::Collator::collateUTF8): Added. Like collate, but for null-terminated UTF-8 strings.
2014-02-10 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Code cleanup: Remove BUILDING_ON / TARGETING definitions.
https://bugs.webkit.org/show_bug.cgi?id=128242
Reviewed by Brent Fulgham.
The BUILDING_ON_* and TARGETING_* macros have not been used for a while.
According to the FIXME: they are removed.
* wtf/Platform.h:
2014-02-09 Anders Carlsson <andersca@apple.com>
Add WTF_MAKE_FAST_ALLOCATED to more classes
https://bugs.webkit.org/show_bug.cgi?id=128506
Reviewed by Andreas Kling.
* wtf/Bag.h:
* wtf/ListHashSet.h:
2014-02-08 Anders Carlsson <andersca@apple.com>
Stop using getCharactersWithUpconvert in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=128457
Reviewed by Andreas Kling.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
Add a new overload that takes a StringView.
* wtf/text/StringView.h:
(WTF::StringView::find):
Add new find member function.
2014-02-08 Darin Adler <darin@apple.com>
Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters
https://bugs.webkit.org/show_bug.cgi?id=128233
Reviewed by Anders Carlsson.
* WTF.xcodeproj/project.pbxproj: Added new source files.
* wtf/text/StringView.h: Added operator[], createCFStringWithoutCopying, and
createNSStringWithoutCopying.
* wtf/text/cf/StringViewCF.cpp:
(WTF::StringView::createCFStringWithoutCopying): Added.
* wtf/text/mac/StringViewObjC.mm:
(WTF::StringView::createNSString): Added.
(WTF::StringView::createNSStringWithoutCopying): Added.
2014-02-06 Andreas Kling <akling@apple.com>
Remove unused ENABLE(REPAINT_THROTTLING) flag.
<https://webkit.org/b/128329>
Reviewed by Antti Koivisto.
* wtf/FeatureDefines.h:
2014-02-06 Filip Pizlo <fpizlo@apple.com>
More FTL build scaffolding
https://bugs.webkit.org/show_bug.cgi?id=128330
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
2014-02-06 Anders Carlsson <andersca@apple.com>
Use std::chrono functions in dispatchFunctionsFromMainThread()
https://bugs.webkit.org/show_bug.cgi?id=128308
Reviewed by Antti Koivisto.
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
2014-02-05 Zan Dobersek <zdobersek@igalia.com>
Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro
https://bugs.webkit.org/show_bug.cgi?id=128267
Reviewed by Andreas Kling.
Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro that was manually defined for compilers
that support the C++11 initializer lists. The feature is well supported in Clang, MSVC and also GCC. It
was actually already used unguarded in HashSet.
* wtf/Compiler.h:
* wtf/HashMap.h:
(WTF::HashMap::HashMap):
* wtf/Vector.h:
(WTF::Vector::Vector):
2014-02-05 Andreas Kling <akling@apple.com>
Remove ENABLE(DIRECTORY_UPLOAD).
<https://webkit.org/b/128275>
Rubber-stamped by Ryosuke Niwa.
* wtf/FeatureDefines.h:
2014-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
HashMap can't be used with std::unique_ptr as value when it has a custom deleter
https://bugs.webkit.org/show_bug.cgi?id=128250
Reviewed by Darin Adler.
The problem is that the HashMap is using a unique_ptr with the
default deleter, so that when trying to move the unique_ptr the
deleters don't match.
* wtf/HashTraits.h: Add the deleter also in the template
definitation of the parent class for the HashTraits<std::unique_ptr<T, Deleter>>
2014-02-05 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(SVG) guards
https://bugs.webkit.org/show_bug.cgi?id=127991
Reviewed by Sam Weinig.
* wtf/FeatureDefines.h:
2014-02-04 Mark Lam <mark.lam@apple.com>
The stack limit computation does not work for Windows.
<https://webkit.org/b/128226>
Reviewed by Geoffrey Garen.
The current stack limit computation assumes that the stack is allocated
in high memory. On Windows, the stack seems to be allocated very near
address 0, and is smaller in size than our Options::maxPerThreadStackUsage().
This combination triggers a bug where StackBounds::recursionLimit()
underflows and computes a limit address that is ridiculously high in memory.
The net effect is that the Windows port thinks its out of stack space all
the time.
We now check for potential underflows in StackBounds and return an
appropriate limit address.
* wtf/StackBounds.h:
(WTF::StackBounds::recursionLimit):
2014-02-04 Andreas Kling <akling@apple.com>
Remove <iframe seamless> support.
<https://webkit.org/b/128213>
Rubber-stamped by Antti Koivisto.
* wtf/FeatureDefines.h:
2014-02-04 Anders Carlsson <andersca@apple.com>
Store StringImpl substring backpointers as tail data
https://bugs.webkit.org/show_bug.cgi?id=128220
Reviewed by Geoffrey Garen.
This lets us get rid of m_substringBuffer from the union.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::getData16SlowCase):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createSubstringSharingImpl8):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::cost):
(WTF::StringImpl::costDuringGC):
(WTF::StringImpl::substringBuffer):
2014-02-04 Anders Carlsson <andersca@apple.com>
Rename the substring sharing StringImpl::create variants to better indicate what they do
https://bugs.webkit.org/show_bug.cgi?id=128214
Reviewed by Geoffrey Garen.
* wtf/text/AtomicString.cpp:
(WTF::SubstringTranslator::translate):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
* wtf/text/StringImpl.h:
(WTF::StringImpl::createSubstringSharingImpl8):
(WTF::StringImpl::createSubstringSharingImpl):
* wtf/text/WTFString.cpp:
(WTF::String::substringSharingImpl):
2014-02-04 Alexey Proskuryakov <ap@apple.com>
WebCrypto HMAC verification uses a non-constant-time memcmp
https://bugs.webkit.org/show_bug.cgi?id=128198
<rdar://problem/15976961>
Reviewed by Oliver Hunt.
Added a "constant time" memcmp that doesn't depend on data. The name is somewhat
strange, as the function is of course O(length) and not constant time at all,
but apparently this is how everyone calls such functions.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CryptographicUtilities.cpp: Added. (WTF::constantTimeMemcmp):
* wtf/CryptographicUtilities.h: Added.
2014-02-04 Anders Carlsson <andersca@apple.com>
Rename StringImpl::getCharacters to StringImpl::characters
https://bugs.webkit.org/show_bug.cgi?id=128205
Reviewed by Antti Koivisto.
This lets us use StringImpl::getCharacters for the upconverting version.
Also, change StringImpl::characters<UChar>() to call characters16() instead of deprecatedCharacters()
and audit all call sites to make sure we weren't relying on upconversion anywhere.
* wtf/text/AtomicString.cpp:
(WTF::findString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
* wtf/text/StringImpl.h:
(WTF::StringImpl::characters<LChar>):
(WTF::StringImpl::characters<UChar>):
2014-02-04 Anders Carlsson <andersca@apple.com>
Rename equalNonNull to equal and make it take const StringImpl& instead
https://bugs.webkit.org/show_bug.cgi?id=128206
Reviewed by Andreas Kling.
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
* wtf/text/StringImpl.cpp:
(WTF::stringImplContentEqual):
(WTF::equal):
* wtf/text/StringImpl.h:
2014-02-04 Anders Carlsson <andersca@apple.com>
Get rid of StringImpl::m_buffer
https://bugs.webkit.org/show_bug.cgi?id=128200
Reviewed by Michael Saboff.
Trade one lousy hack for another by changing the CreateEmptyUnique StringImpl
constructor to initialize its character buffer to point to m_length instead
since it will always be null.
Also change it to be an 8-bit string because why not.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
2014-02-04 Anders Carlsson <andersca@apple.com>
Rename String::getCharacters to String::characters
https://bugs.webkit.org/show_bug.cgi?id=128196
Reviewed by Andreas Kling.
This means String::characters() will end up calling either characters8() or characters16() which
makes more logical sense. It also frees up the getCharacters name so we can use it for a new function
that will do upconversion.
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendUninitializedSlow):
* wtf/text/WTFString.h:
(WTF::String::characters<LChar>):
(WTF::String::characters<UChar>):
2014-02-03 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* wtf/text/StringImpl.h:
(WTF::StringImpl::tailOffset):
2014-02-03 Anders Carlsson <andersca@apple.com>
StringImpl::tailOffset() should return the offset right after m_hashAndFlags
https://bugs.webkit.org/show_bug.cgi?id=128141
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h:
(WTF::StringImpl::tailOffset):
2014-02-03 Anders Carlsson <andersca@apple.com>
More tail pointer consolidation
https://bugs.webkit.org/show_bug.cgi?id=128139
Reviewed by Andreas Kling.
Add a new tailOffset() function and reimplement allocationSize() and tailPointer()
in terms of it. Use tailPointer() instead of reinterpret_cast-ing this + 1.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::tailOffset):
(WTF::StringImpl::tailPointer):
2014-02-03 Gustavo Noronha Silva <gns@gnome.org>
[GTK][CMake] Enable SUBPIXEL_LAYOUT in FeatureDefines.h like EFL does
https://bugs.webkit.org/show_bug.cgi?id=128136
Reviewed by Martin Robinson.
* wtf/FeatureDefines.h: enable SUBPIXEL_LAYOUT if it's not set, for GTK+.
2014-02-03 Mark Hahnenberg <mhahnenberg@apple.com>
Turn GenGC on
https://bugs.webkit.org/show_bug.cgi?id=128109
Reviewed by Oliver Hunt.
* wtf/Platform.h: Initially it will only be enabled for X86-64.
2014-02-03 Anders Carlsson <andersca@apple.com>
Consolidate StringImpl tail handling into two functions
https://bugs.webkit.org/show_bug.cgi?id=128122
Reviewed by Andreas Kling.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
* wtf/text/StringImpl.h:
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::tailPointer):
2014-02-03 Darin Adler <darin@apple.com>
Remove Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=128106
Reviewed by Anders Carlsson.
* GNUmakefile.list.am: Removed files.
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/unicode/ScriptCodesFromICU.h: Removed.
* wtf/unicode/Unicode.h: Removed.
* wtf/unicode/UnicodeMacrosFromICU.h: Removed.
* wtf/unicode/icu/UnicodeIcu.h: Removed.
* wtf/unicode/wchar/UnicodeWchar.cpp: Removed.
* wtf/unicode/wchar/UnicodeWchar.h: Removed.
2014-01-25 Darin Adler <darin@apple.com>
Stop using Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=127633
Reviewed by Anders Carlsson.
* wtf/StringHasher.h:
* wtf/dtoa.h:
* wtf/text/ASCIIFastPath.h:
* wtf/text/LChar.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
* wtf/unicode/CharacterNames.h:
* wtf/unicode/Collator.h:
* wtf/unicode/UTF8.h:
Removed includes of <wtf/unicode/Unicode.h>, adding includes of
ICU headers and <wtf/text/LChar.h> as needed to replace it.
2014-02-02 Darin Adler <darin@apple.com>
Obey "delete this" comments, including deleting String::characters and friends
https://bugs.webkit.org/show_bug.cgi?id=126865
Reviewed by Andreas Kling.
* wtf/text/AtomicString.h: Deleted the characters function.
* wtf/text/StringBuilder.h: Deleted the characters function, leaving behind the
deprecatedCharacters function.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.h: Ditto. Also added a constructor that takes a StringImpl&,
helpful for later string refactoring.
2014-02-02 Dan Bernstein <mitz@apple.com>
Stop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128089
Reviewed by Darin Adler.
Replaced all uses of PLATFORM(MAC) that weren’t accompanied by !PLATFORM(IOS) with
equivalent(*) tests that are more idiomatic and will not change once PLATFORM(MAC) changes to
be false when building for iOS.
* - One exception noted below.
* wtf/AutodrainedPool.h: Changed PLATFORM(MAC) to USE(FOUNDATION), because NSAutoreleasePool
is a Foundation class.
* wtf/CurrentTime.cpp:
(WTF::monotonicallyIncreasingTime): Changed PLATFORM(MAC) to OS(DARWIN), because Mach is
part of the Darwin kernel, but reordered such that the EFL and GLIB implementations continue
to take precedence regardless of the OS.
* wtf/MainThread.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
* wtf/MainThread.h: Ditto.
* wtf/Platform.h: Changed USE(CG) and USE(CA) to depend on COCOA, rather than MAC or IOS.
Ditto for USE(CFURLCACHE), HAVE(ACCESSIBILITY), USE(PROTECTION_SPACE_AUTH_CALLBACK),
USE(ACCESSIBILITY_CONTEXT_MENUS), USE(EXPORT_MACROS), USE(AVFOUNDATION),
USE(REQUEST_ANIMATION_FRAME_TIMER), USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR),
USE(CONTENT_FILTERING), USE(UNIFIED_TEXT_CHECKING), USE(MARKER_REMOVAL_UPON_EDITING),
USE(AUDIO_SESSION), USE(IOSURFACE), and ENABLE(CSS3_TEXT_DECORATION_SKIP_INK). Changed
PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) in controlling various
JavaScriptCore or JavaScriptCore-dependent behaviors.
* wtf/RunLoop.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* wtf/RunLoopTimerCF.cpp: Ditto.
* wtf/SchedulePair.h: Changed PLATFORM(MAC) to USE(FOUNDATION), since it was used to guard
usage of Foundation API.
* wtf/Threading.cpp: Added an explicit !PLATFORM(IOS) in a guard around something needed
only on OS X and Windows.
2014-01-31 Benjamin Poulain <bpoulain@apple.com>
Remove LEGACY_VIEWPORT_ADAPTION
https://bugs.webkit.org/show_bug.cgi?id=128028
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2014-01-31 Tim Horton <timothy_horton@apple.com>
[wk2] PlatformCALayerRemoteCustom doesn't work on iOS
https://bugs.webkit.org/show_bug.cgi?id=128025
<rdar://problem/15950271>
Reviewed by Simon Fraser.
* wtf/Platform.h:
Rename HAVE_LAYER_HOSTING_IN_WINDOW_SERVER to HAVE_OUT_OF_PROCESS_LAYER_HOSTING
and make it true on iOS.
2014-01-31 Michael Saboff <msaboff@apple.com>
REGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
https://bugs.webkit.org/show_bug.cgi?id=128017
Reviewed by Filip Pizlo.
Moved the setting and saving of VM::stackPointerAtVMEntry and the corresponding stack limit
to JSLock and JSLock::DropAllLocks. The saved data is now stored in per-thread in
WTFThreadData.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::savedStackPointerAtVMEntry):
(WTF::WTFThreadData::setSavedStackPointerAtVMEntry):
(WTF::WTFThreadData::savedLastStackTop):
(WTF::WTFThreadData::setSavedLastStackTop):
(WTF::WTFThreadData::savedReservedZoneSize):
(WTF::WTFThreadData::setSavedReservedZoneSize):
2014-01-30 Andrei Bucur <abucur@adobe.com>
Remove the ACCELERATED_COMPOSITING flag
https://bugs.webkit.org/show_bug.cgi?id=127833
Reviewed by Antti Koivisto.
Remove the USE(ACCELERATED_COMPOSITING) conditionals from the code base and make AC
mandatory.
* wtf/OwnPtrCommon.h:
* wtf/Platform.h:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
2014-01-28 Michael Saboff <msaboff@apple.com>
Merge the jsCStack branch
https://bugs.webkit.org/show_bug.cgi?id=127763
Reviewed by Mark Hahnenberg.
Changes from http://svn.webkit.org/repository/webkit/branches/jsCStack
up to changeset 162958.
2014-01-29 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(JAVASCRIPT_DEBUGGER) guards
https://bugs.webkit.org/show_bug.cgi?id=127840
Reviewed by Mark Lam.
* wtf/FeatureDefines.h:
2014-01-28 Anders Carlsson <andersca@apple.com>
Actually turn stack stats back off.
* wtf/StackStats.cpp:
* wtf/StackStats.h:
2014-01-28 Anders Carlsson <andersca@apple.com>
Turn stack stats back off.
* wtf/StackStats.cpp:
2014-01-28 Anders Carlsson <andersca@apple.com>
Use std::mutex instead of WTF::Mutex in WTF
https://bugs.webkit.org/show_bug.cgi?id=127783
Reviewed by Antti Koivisto.
* wtf/CryptographicallyRandomNumber.cpp:
* wtf/MainThread.cpp:
(WTF::mainThreadFunctionQueueMutex):
(WTF::functionQueue):
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
(WTF::cancelCallOnMainThread):
* wtf/StackStats.cpp:
(WTF::StackStats::initialize):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h:
2014-01-27 Joseph Pecoraro <pecoraro@apple.com>
WebCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
https://bugs.webkit.org/show_bug.cgi?id=127671
Reviewed by Ryosuke Niwa.
* wtf/text/WTFString.h:
(WTF::appendNumber):
2014-01-27 Jer Noble <jer.noble@apple.com>
[WK2] callOnMainThread() from main thread sometimes results in ASSERTs.
https://bugs.webkit.org/show_bug.cgi?id=127370
Reviewed by Alexey Proskuryakov.
When WEB_THREAD is enabled, and callOnMainThread() is called from the main
thread, if the web thread is locked, a timer is set and the passed-in function
is called on the next run-loop. However, by that time the web thread may have
been unlocked, and isMainThread() will no longer return true, resulting in
an assert.
Instead, scheduleDispatchFunctionsOnMainThread() should check isWebThread(),
which is equivalent to isMainThread() when the WEB_THREAD is disabled, but
will do the correct thing when WEB_THREAD is enabled.
* wtf/mac/MainThreadMac.mm:
(WTF::scheduleDispatchFunctionsOnMainThread):
2014-01-27 Dan Bernstein <mitz@apple.com>
Build fix.
* wtf/ThreadSafeRefCounted.h: Added a necessary #include.
2014-01-25 Sam Weinig <sam@webkit.org>
Remove unused support for DRAGGABLE_REGION
https://bugs.webkit.org/show_bug.cgi?id=127642
Reviewed by Simon Fraser.
* wtf/FeatureDefines.h:
2014-01-25 Joseph Pecoraro <pecoraro@apple.com>
Add FALLTHROUGH and -Wimplicit-fallthrough to warn about unannotated implicit fallthroughs in switches
https://bugs.webkit.org/show_bug.cgi?id=127637
Reviewed by Darin Adler.
For information about [[clang::fallthrough]], see:
<http://clang.llvm.org/docs/LanguageExtensions.html#the-clang-fallthrough-attribute>
* Configurations/Base.xcconfig:
Enable -Wimplicit-fallthrough warnings.
* wtf/Compiler.h:
Define FALLTHROUGH on clang and fallback to outputing nothing when unsupported.
* wtf/dtoa/fast-dtoa.cc:
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertLatin1ToUTF8):
(WTF::Unicode::convertUTF16ToUTF8):
(WTF::Unicode::isLegalUTF8):
(WTF::Unicode::readUTF8Sequence):
Explicitly annotate implicit fallthroughs with FALLTHROUGH.
2014-01-25 Darin Adler <darin@apple.com>
Call deprecatedCharacters instead of characters at more call sites
https://bugs.webkit.org/show_bug.cgi?id=127631
Reviewed by Sam Weinig.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
* wtf/text/WTFString.h:
(WTF::String::isAllSpecialCharacters):
Use the new name.
2014-01-25 Darin Adler <darin@apple.com>
Add a new separate LChar.h header file, to be used after we remove Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=127630
Reviewed by Sam Weinig.
* GNUmakefile.list.am: Added the new file
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/text/LChar.h: Added.
2014-01-25 Darin Adler <darin@apple.com>
Get rid of ICU_UNICODE and WCHAR_UNICODE remnants
https://bugs.webkit.org/show_bug.cgi?id=127623
Reviewed by Anders Carlsson.
* wtf/CMakeLists.txt: Removed WTF_USE_ICU_UNICODE and
WTF_USE_WCHAR_UNICODE since they are true and false respectively.
* wtf/Platform.h: Removed code to set WTF_USE_ICU_UNICODE.
* wtf/unicode/Collator.h: Removed ifdefs.
* wtf/unicode/CollatorDefault.cpp: Ditto.
* wtf/unicode/Unicode.h: Ditto.
* wtf/unicode/icu/CollatorICU.cpp: Ditto.
2014-01-25 Anders Carlsson <andersca@apple.com>
Remove atomicIncrement/atomicDecrement
https://bugs.webkit.org/show_bug.cgi?id=127625
Reviewed by Andreas Kling.
Replace atomicIncrement/atomicDecrement with std::atomic.
* wtf/Atomics.h:
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
(WTF::RefCountedLeakCounter::increment):
(WTF::RefCountedLeakCounter::decrement):
* wtf/RefCountedLeakCounter.h:
* wtf/ThreadSafeRefCounted.h:
(WTF::ThreadSafeRefCountedBase::ref):
(WTF::ThreadSafeRefCountedBase::refCount):
(WTF::ThreadSafeRefCountedBase::derefBase):
2014-01-25 Anders Carlsson <andersca@apple.com>
Modernize HashTable threading code
https://bugs.webkit.org/show_bug.cgi?id=127621
Reviewed by Darin Adler.
Use std::mutex and std::atomic instead of WTF threading primitives.
* wtf/DynamicAnnotations.h:
Include Platform.h here since this file relies on USE macros.
* wtf/HashTable.cpp:
(WTF::HashTableStats::recordCollisionAtCount):
Change this to take an unsigned.
(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(WTF::KeyTraits>::HashTable):
(WTF::KeyTraits>::remove):
(WTF::KeyTraits>::invalidateIterators):
Use a single probe counter.
(WTF::addIterator):
(WTF::removeIterator):
2014-01-25 Darin Adler <darin@apple.com>
Restore alphabetical order in Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127620
Reviewed by Sam Weinig.
* wtf/Compiler.h: Resorted some things into alphabetical order
2014-01-24 Brent Fulgham <bfulgham@apple.com>
[Win] Convert some NMake files to MSBuild project files
https://bugs.webkit.org/show_bug.cgi?id=127579
Reviewed by Tim Horton.
* WTF.vcxproj/WTF.make: Removed.
* WTF.vcxproj/WTF.proj: Added.
2014-01-24 Anders Carlsson <andersca@apple.com>
Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
https://bugs.webkit.org/show_bug.cgi?id=127571
Reviewed by Antti Koivisto.
* wtf/Compiler.h:
Add a CONSTEXPR define so we can still use constexpr on compilers that don't support them (MSVC).
* wtf/CurrentTime.h:
Remove monotonicallyIncreasingTimeMS().
* wtf/StdLibExtras.h:
(std::literals::chrono_literals::operator _s):
(std::literals::chrono_literals::operator _ms):
Add _s and _ms literals. Once we switch over to C++14, we can drop them and just use the built-in ones.
2014-01-24 Anders Carlsson <andersca@apple.com>
The CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
compilers support explicit conversions now so simply remove the #ifdef.
* wtf/RetainPtr.h:
2014-01-24 Darin Adler <darin@apple.com>
Simplify Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127491
Reviewed by Anders Carlsson.
* wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
we now have that for all compilers that can build WebKit.
* wtf/Compiler.h: Removed always true feature flags, including:
COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
nested #if and #else into separate checks for greater readability. Removed obsolete
check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.
* wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
that for all compilers that can build WebKit.
* wtf/RetainPtr.h: Ditto.
2014-01-23 Max Vujovic <mvujovic@adobe.com>
Remove CSS Custom Filters code and tests
https://bugs.webkit.org/show_bug.cgi?id=127382
Reviewed by Simon Fraser.
* wtf/FeatureDefines.h:
2014-01-22 Brent Fulgham <bfulgham@apple.com>
[Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457
Reviewed by Eric Carlson.
* WTF.vcxproj/WTF.submit.sln: Add x64 targets.
* WTF.vcxproj/WTF.vcxproj: Update for VS2013
2014-01-22 Myles C. Maxfield <mmaxfield@apple.com>
Remove CSS3_TEXT_DECORATION define
https://bugs.webkit.org/show_bug.cgi?id=127333
Reviewed by Simon Fraser.
This is required for unprefixing the text-decoration-* CSS properties.
* wtf/Platform.h:
2014-01-22 Jae Hyun Park <jae.park@company100.net>
Remove unnecessary include in Noncopyable.h
https://bugs.webkit.org/show_bug.cgi?id=127406
Reviewed by Anders Carlsson.
* wtf/Noncopyable.h: We don't need Compiler.h as of r162198.
2014-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add GUniquePtr
https://bugs.webkit.org/show_bug.cgi?id=127170
Reviewed by Gustavo Noronha Silva.
The idea is to replace GOwnPtr with a template alias of
std:unique_ptr. Not everything can be replaced, though, because
GOwnPtr::outPtr() doesn't seem to be possible to implement with
unique_ptr. This smart pointer is more flexible than GOwnPtr and
allows to transfer the ownership of the pointer using
std::move().
* GNUmakefile.list.am: Add new file to compilation.
* wtf/gobject/GUniquePtr.h: Added.
(WTF::GPtrDeleter::operator()):
2014-01-20 Anders Carlsson <andersca@apple.com>
Remove an unused member variable
https://bugs.webkit.org/show_bug.cgi?id=127295
Reviewed by Antti Koivisto.
* wtf/MainThread.cpp:
(WTF::FunctionWithContext::FunctionWithContext):
(WTF::FunctionWithContext::operator == ):
(WTF::dispatchFunctionsFromMainThread):
2014-01-20 Anders Carlsson <andersca@apple.com>
Remove MutexTryLocker
https://bugs.webkit.org/show_bug.cgi?id=127294
Reviewed by Antti Koivisto.
MutexTryLocker has been replaced with std::unique_lock with std::try_to_lock everywhere now.
* wtf/ThreadingPrimitives.h:
2014-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] GVariant floating references are not correctly handled by GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=127246
Reviewed by Martin Robinson.
GRefPtr should always use g_variant_ref_sink to deal with GVariant
floating references. In case of full references,
g_variant_ref_sink calls g_variant_ref, so it's safe to use it always.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Use g_variant_ref_sink().
2014-01-18 Anders Carlsson <andersca@apple.com>
Remove support for the viewsource attribute
https://bugs.webkit.org/show_bug.cgi?id=127232
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h:
2014-01-18 Anders Carlsson <andersca@apple.com>
Remove ENABLE_THREADED_HTML_PARSER defines everywhere
https://bugs.webkit.org/show_bug.cgi?id=127225
Reviewed by Andreas Kling.
This concludes the removal of over 8.8 million lines of threaded parser code.
* wtf/FeatureDefines.h:
2014-01-17 Anders Carlsson <andersca@apple.com>
Add a callOnMainThreadAndWait variant in SocketStreamHandle
https://bugs.webkit.org/show_bug.cgi?id=127180
Reviewed by Geoffrey Garen.
Remove callOnMainThreadAndWait from WTF.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
2014-01-17 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove workaround for compilers not supporting deleted functions
https://bugs.webkit.org/show_bug.cgi?id=127166
Reviewed by Andreas Kling.
* wtf/Compiler.h:
* wtf/Noncopyable.h:
* wtf/PassRefPtr.h:
2014-01-16 Benjamin Poulain <bpoulain@apple.com>
Remove Nix from WTF
https://bugs.webkit.org/show_bug.cgi?id=127150
Reviewed by Alexey Proskuryakov.
* wtf/DisallowCType.h:
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/PlatformNix.cmake: Removed.
* wtf/nix: Removed.
2014-01-16 Anders Carlsson <andersca@apple.com>
Remove FINAL macro
https://bugs.webkit.org/show_bug.cgi?id=127149
Reviewed by Tim Horton.
* wtf/Compiler.h:
2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove workaround for compilers not supporting explicit override control
https://bugs.webkit.org/show_bug.cgi?id=127111
Reviewed by Anders Carlsson.
Now all compilers support explicit override control, this workaround can be removed.
* wtf/Compiler.h:
* wtf/FilePrintStream.h:
* wtf/RunLoop.h:
* wtf/StringPrintStream.h:
2014-01-16 Alberto Garcia <berto@igalia.com>
Source/WTF/wtf/Atomics.h:300: Error: bad register name `%bpl'
https://bugs.webkit.org/show_bug.cgi?id=126985
Reviewed by Csaba Osztrogonác.
Use the 'q' constraint to force using a register that allows
access to its lower byte.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Fix unnecessary checks for Clang compiler if the compiler is MSVC.
https://bugs.webkit.org/show_bug.cgi?id=127037
Reviewed by Csaba Osztrogonác.
Inside the #if defined(_MSC_VER) there's no need for checking whether the compiler is not Clang.
* wtf/Compiler.h:
2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Require at least GCC version 4.7
https://bugs.webkit.org/show_bug.cgi?id=127049
Reviewed by Csaba Osztrogonác.
r161770 added a template alias, so the minimum GCC version is 4.7 now.
Also fixed a typo in the error message about old MSVC version.
* wtf/Compiler.h:
2014-01-15 Alberto Garcia <berto@igalia.com>
[GTK] v2.3.3 fails to build in Debian / FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=126502
Reviewed by Mark Lam.
* wtf/Platform.h: Add LLINT support to FreeBSD.
2014-01-15 Anders Carlsson <andersca@apple.com>
Get rid of RefCountedCustomAllocated
https://bugs.webkit.org/show_bug.cgi?id=127051
Reviewed by Antti Koivisto.
It's not used anywhere anymore, get rid of it.
* wtf/RefCounted.h:
* wtf/SizeLimits.cpp:
2014-01-14 Anders Carlsson <andersca@apple.com>
And yet another build fix.
* wtf/SizeLimits.cpp:
2014-01-14 Anders Carlsson <andersca@apple.com>
Another build fix.
* wtf/SizeLimits.cpp:
2014-01-14 Daniel Bates <dabates@apple.com>
[iOS] Enable WTF_USE_UIKIT_EDITING
* wtf/Platform.h:
2014-01-14 Daniel Bates <dabates@apple.com>
[iOS] Enable QuickLook
https://bugs.webkit.org/show_bug.cgi?id=126954
Reviewed by David Kilzer.
* wtf/Platform.h:
2014-01-14 Anders Carlsson <andersca@apple.com>
Get rid of ThreadRestrictionVerifier
https://bugs.webkit.org/show_bug.cgi?id=127004
Reviewed by Sam Weinig.
The ThreadRestrictionVerifier mechanism has been turned off for a while
since it doesn't really have a good solution for objects that are passed between threads.
Instead of having dead code in the tree, just get rid of it.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::derefBase):
* wtf/ThreadRestrictionVerifier.h: Removed.
2014-01-14 Benjamin Poulain <benjamin@webkit.org>
Enable the experimental selector code generator by default
https://bugs.webkit.org/show_bug.cgi?id=126953
Reviewed by Gavin Barraclough.
* wtf/Platform.h:
Enable CSS_SELECTOR_JIT on OS X x86_64 by default.
The feature is not ready to ship but it is stable enough to enable
for the bots and nightly.
2014-01-14 Brian J. Burg <burg@cs.washington.edu>
Add ENABLE(WEB_REPLAY) feature flag to the build system
https://bugs.webkit.org/show_bug.cgi?id=126949
Reviewed by Joseph Pecoraro.
* wtf/FeatureDefines.h: for now, disable the flag by default.
2014-01-14 peavo@outlook.com <peavo@outlook.com>
[Win] Application name in user agent string is truncated.
https://bugs.webkit.org/show_bug.cgi?id=126810
Reviewed by Anders Carlsson.
* wtf/text/StringConcatenate.h:
(WTF::tryMakeString): Add missing 8 bit check for last argument.
2014-01-13 Anders Carlsson <andersca@apple.com>
Move another deprecated symbol to DeprecatedSymbolsUsedBySafari.mm
https://bugs.webkit.org/show_bug.cgi?id=126909
Reviewed by Ryosuke Niwa.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::callOnMainThread):
2014-01-13 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading):
2014-01-13 Anders Carlsson <andersca@apple.com>
Remove AtomicallyInitializedStatic
https://bugs.webkit.org/show_bug.cgi?id=126864
Reviewed by Andreas Kling.
Remove the lockAtomicallyInitializedStaticMutex and unlockAtomicallyInitializedStaticMutex functions
everywhere except on Mac (where they unfortunately were used by Safari).
On Mac, add them to a separate file which will hold functions and symbols that we would like
to remove but that are used by Safari. Reimplement them in terms of std::call_once and std::mutex.
* WTF.xcodeproj/project.pbxproj:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading):
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm: Added.
(WTF::atomicallyInitializedStaticMutex):
(WTF::lockAtomicallyInitializedStaticMutex):
(WTF::unlockAtomicallyInitializedStaticMutex):
2014-01-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r161855.
http://trac.webkit.org/changeset/161855
https://bugs.webkit.org/show_bug.cgi?id=126880
Sister commit of r161852 (Requested by kling on #webkit).
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
2014-01-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r161852.
http://trac.webkit.org/changeset/161852
https://bugs.webkit.org/show_bug.cgi?id=126877
Broke ToT with system Safari (Requested by kling on #webkit).
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
(WTF::lockAtomicallyInitializedStaticMutex):
(WTF::unlockAtomicallyInitializedStaticMutex):
* wtf/ThreadingWin.cpp:
(WTF::lockAtomicallyInitializedStaticMutex):
(WTF::unlockAtomicallyInitializedStaticMutex):
(WTF::initializeThreading):
2014-01-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r161840.
http://trac.webkit.org/changeset/161840
https://bugs.webkit.org/show_bug.cgi?id=126870
Caused jsscore and layout test failures (Requested by smfr on
#webkit).
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
* wtf/text/WTFString.h:
(WTF::String::isAllSpecialCharacters):
2014-01-12 Dan Bernstein <mitz@apple.com>
Fix an assertion failure in initializeDates() when launching Safari, which was introduced in r161852.
Reviewed by Andy Estes.
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading): Set isInitialized to true.
2014-01-12 Darin Adler <darin@apple.com>
Add PLATFORM(COCOA) and USE(FOUNDATION)
https://bugs.webkit.org/show_bug.cgi?id=126859
Reviewed by Anders Carlsson.
* wtf/Platform.h: Added PLATFORM(COCOA), which for now is set at exactly the same
times that PLATFORM(MAC) is. Added USE(FOUNDATION), which is set at the same times
that PLATFORM(COCOA) is. Re-organize the PLATFORM(MAC) and PLATFORM(IOS) settings
in the header so they are a bit easier to read. Put HAVE_LANGINFO_H in with the
rest of the OS(UNIX) settings and put HAVE_READLINE in with the rest of the
OS(DARWIN) settings. Tweak formatting a bit.
2014-01-12 Anders Carlsson <andersca@apple.com>
Remove AtomicallyInitializedStatic
https://bugs.webkit.org/show_bug.cgi?id=126864
Reviewed by Darin Adler.
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading):
2014-01-12 Darin Adler <darin@apple.com>
Add deprecatedCharacters as a synonym for characters and convert most call sites
https://bugs.webkit.org/show_bug.cgi?id=126858
Reviewed by Anders Carlsson.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::SubstringTranslator::hash):
(WTF::SubstringTranslator::equal):
* wtf/text/AtomicString.h:
(WTF::AtomicString::characters):
* wtf/text/Base64.cpp:
(WTF::base64Decode):
(WTF::base64URLDecode):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::characters):
(WTF::StringBuilder::deprecatedCharacters):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::upper):
(WTF::StringImpl::lower):
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
* wtf/text/StringImpl.h:
(WTF::StringImpl::characters):
(WTF::StringImpl::deprecatedCharacters):
(WTF::StringImpl::getCharacters<UChar>):
(WTF::equalIgnoringNullity):
* wtf/text/WTFString.cpp:
(WTF::String::append):
(WTF::String::appendInternal):
(WTF::String::insert):
(WTF::String::truncate):
(WTF::String::percentage):
* wtf/text/WTFString.h:
(WTF::String::characters):
(WTF::String::deprecatedCharacters):
(WTF::String::getCharactersWithUpconvert<UChar>):
(WTF::append):
Use deprecatedCharacters instead of characters.
2014-01-12 Anders Carlsson <andersca@apple.com>
Remove the last remaining uses of AtomicallyInitializedStatic
https://bugs.webkit.org/show_bug.cgi?id=126863
Reviewed by Darin Adler.
* wtf/HashTable.cpp:
(WTF::hashTableStatsMutex):
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::cachedCollatorMutex):
(WTF::Collator::createCollator):
(WTF::Collator::releaseCollator):
2014-01-12 Darin Adler <darin@apple.com>
Reduce use of String::characters
https://bugs.webkit.org/show_bug.cgi?id=126854
Reviewed by Sam Weinig.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace): Use characters16 here since is8Bit was already checked.
* wtf/text/WTFString.h:
(WTF::String::isAllSpecialCharacters): Use characters16 here since is8Bit was
already checked. Also renamed "len" to "length".
2014-01-12 Anders Carlsson <andersca@apple.com>
Replace more uses of AtomicallyInitializedStatic with std::call_once
https://bugs.webkit.org/show_bug.cgi?id=126847
Reviewed by Sam Weinig.
* wtf/Forward.h:
Forward declare NeverDestroyed.
2014-01-11 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for ports using GCC after r161770.
* wtf/IteratorAdaptors.h:
(WTF::FilterIterator::operator*): Replicating r161797, the const qualifier for
FilterIterator::operator*() is removed since it clashes with some iterator types
that are also const, causing compilation failures with GCC.
2014-01-11 Anders Carlsson <andersca@apple.com>
Use std::call_once instead of AtomicallyInitializedStatic when creating a HTTP header set
https://bugs.webkit.org/show_bug.cgi?id=126837
Reviewed by Sam Weinig.
* wtf/HashSet.h:
(WTF::HashSet::HashSet):
Add a HashSet constructor that takes an initializer list.
2014-01-11 Sam Weinig <sam@webkit.org>
Fix the EFL build.
* wtf/IteratorAdaptors.h:
(WTF::TransformIterator::operator*):
2014-01-11 Sam Weinig <sam@webkit.org>
Add support for null StringViews
https://bugs.webkit.org/show_bug.cgi?id=126827
Reviewed by Anders Carlsson.
- Do some style cleanup while in the neighborhood.
* wtf/text/StringView.h:
(WTF::StringView::StringView):
Add default constructor to create a null StringView.
(WTF::StringView::isNull):
Add isNull(), matching the semantics of String.
(WTF::StringView::operator bool):
Add an explicit operator bool() to allow use in if-statements.
2014-01-11 Sam Weinig <sam@webkit.org>
Clean up iterator filter / iterator range code
https://bugs.webkit.org/show_bug.cgi?id=126817
Reviewed by Anders Carlsson.
- Renames IteratorPair to IteratorRange.
- Splits FilterIterator into FilterIterator (which now only filters) and
TransformIterator (which does the transform part of the old FilterIterator).
Move both of these to IteratorAdaptors.h
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FilterIterator.h: Removed.
Add/remove files.
* wtf/HashMap.h:
(WTF::HashMap::keys):
(WTF::HashMap::values):
* wtf/RefPtrHashMap.h:
Update for rename to IteratorRange. Simplify by using makeIteratorRange().
* wtf/IteratorAdaptors.h: Copied from wtf/FilterIterator.h.
(WTF::FilterIterator::FilterIterator):
(WTF::FilterIterator::operator*):
(WTF::makeFilterIterator):
(WTF::TransformIterator::TransformIterator):
(WTF::TransformIterator::operator++):
(WTF::TransformIterator::operator*):
(WTF::TransformIterator::operator==):
(WTF::TransformIterator::operator!=):
(WTF::makeTransformIterator):
Split up filtering and transforming. Add makeFilterIterator() and makeTransformIterator()
helpers.
* wtf/IteratorPair.h: Removed.
* wtf/IteratorRange.h: Copied from wtf/IteratorPair.h.
(WTF::IteratorRange::IteratorRange):
(WTF::makeIteratorRange):
Renamed to IteratorRange and adds makeIteratorRange() helper.
2014-01-10 David Kilzer <ddkilzer@apple.com>
Clean up architectures in xcconfig files
<http://webkit.org/b/126794>
Reviewed by Andy Estes.
* Configurations/Base.xcconfig:
- Add new arch.
2014-01-10 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
[EFL][JSC] Enable udis86 disassembler on efl.
https://bugs.webkit.org/show_bug.cgi?id=125502
Reviewed by Michael Saboff.
Enable udis86 disassembler on efl and fix build warnings.
* wtf/Platform.h:
Enable udis86 disassembler on EFL.
2014-01-10 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL] Enable the DFG_JIT on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=126742
Reviewed by Gyuyoung Kim.
Turn on ENABLE_DFG_JIT on ARMv7 for EFL.
* wtf/Platform.h:
2014-01-07 Mark Hahnenberg <mhahnenberg@apple.com>
Marking should be generational
https://bugs.webkit.org/show_bug.cgi?id=126552
Reviewed by Geoffrey Garen.
* wtf/Bitmap.h:
(WTF::WordType>::count): Added a cast that became necessary when Bitmap
is used with smaller types than int32_t.
2014-01-09 Simon Fraser <simon.fraser@apple.com>
Enable async scrolling for iOS
https://bugs.webkit.org/show_bug.cgi?id=126730
Reviewed by Tim Horton.
Turn on ENABLE_ASYNC_SCROLLING for iOS.
* wtf/FeatureDefines.h:
2014-01-09 Anders Carlsson <andersca@apple.com>
Remove Blackberry and QNX bits from WTF
https://bugs.webkit.org/show_bug.cgi?id=126726
Reviewed by Benjamin Poulain.
* wtf/Assertions.cpp:
* wtf/Atomics.h:
* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
* wtf/DateMath.cpp:
* wtf/DisallowCType.h:
* wtf/FeatureDefines.h:
* wtf/InlineASM.h:
* wtf/MathExtras.h:
* wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
* wtf/Platform.h:
* wtf/PlatformBlackBerry.cmake: Removed.
* wtf/RAMSize.cpp:
(WTF::computeRAMSize):
* wtf/StackBounds.cpp:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
(WTF::initializeCurrentThreadInternal):
* wtf/blackberry/MainThreadBlackBerry.cpp: Removed.
* wtf/blackberry/RunLoopBlackBerry.cpp: Removed.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
2014-01-09 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebCore/platform changes
https://bugs.webkit.org/show_bug.cgi?id=126654
Rubber-stamped by David Kilzer.
* wtf/MainThread.cpp:
(WTF::canAccessThreadLocalDataForThread):
* wtf/MainThread.h:
2014-01-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r161540.
http://trac.webkit.org/changeset/161540
https://bugs.webkit.org/show_bug.cgi?id=126704
Caused assertion failures on multiple tests (Requested by ap
on #webkit).
* wtf/Bitmap.h:
(WTF::WordType>::count):
2014-01-07 Mark Hahnenberg <mhahnenberg@apple.com>
Marking should be generational
https://bugs.webkit.org/show_bug.cgi?id=126552
Reviewed by Geoffrey Garen.
* wtf/Bitmap.h:
(WTF::WordType>::count): Added a cast that became necessary when Bitmap
is used with smaller types than int32_t.
2014-01-08 Anders Carlsson <andersca@apple.com>
Add WTF::StringView and use it for grammar checking
https://bugs.webkit.org/show_bug.cgi?id=126644
Reviewed by Antti Koivisto.
Add a new StringView class which is an immutable reference to either an 8-bit or a 16-bit string.
This makes it easier to pass substrings around without having to either copy string data
or upconvert and use UChar pointers.
The StringView class is very loosely based on the std::string_view class which is proposed for a future version of C++,
see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3609.html for more details.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/text/StringView.h: Added.
(WTF::StringView::StringView):
(WTF::StringView::empty):
(WTF::StringView::characters8):
(WTF::StringView::characters16):
(WTF::StringView::isEmpty):
(WTF::StringView::length):
(WTF::StringView::is8Bit):
(WTF::StringView::substring):
(WTF::StringView::toString):
(WTF::StringView::toStringWithoutCopying):
(WTF::StringView::encodedCharacters):
2014-01-07 David Farler <dfarler@apple.com>
[ASAN] Building with trunk clang corrupts sandbox profile with comment from Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=124532
Reviewed by David Kilzer.
* wtf/Compiler.h:
Remove this quirk - it does nothing.
2014-01-06 Filip Pizlo <fpizlo@apple.com>
Get rid of ENABLE(VALUE_PROFILER). It's on all the time now.
Rubber stamped by Mark Hahnenberg.
* wtf/Platform.h:
2014-01-06 Zan Dobersek <zdobersek@igalia.com>
Remove using directives for the std namespace from WTF
https://bugs.webkit.org/show_bug.cgi?id=126524
Reviewed by Alexey Proskuryakov.
Remove the using directives for the std namespace throughout the WTF code.
The more explicit std:: nested name specifier should be used instead.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create):
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
(WTF::reverseFindInner):
(WTF::StringImpl::reverseFind):
(WTF::reverseFindIgnoringCaseInner):
(WTF::StringImpl::reverseFindIgnoringCase):
(WTF::StringImpl::replace):
(WTF::StringImpl::utf8ForCharacters):
(WTF::StringImpl::utf8ForRange):
* wtf/text/WTFString.cpp:
(WTF::String::append):
(WTF::String::appendInternal):
(WTF::String::insert):
(WTF::String::substringSharingImpl):
(WTF::String::fromUTF8):
(WTF::toIntegralType):
* wtf/win/RunLoopWin.cpp:
2014-01-03 Mark Hahnenberg <mhahnenberg@apple.com>
DoublyLinkedLists can't be concatenated
https://bugs.webkit.org/show_bug.cgi?id=125976
Reviewed by Filip Pizlo.
* wtf/DoublyLinkedList.h:
(WTF::DoublyLinkedList<T>::append):
2014-01-04 Zan Dobersek <zdobersek@igalia.com>
Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
https://bugs.webkit.org/show_bug.cgi?id=126439
Reviewed by Andreas Kling.
* wtf/VectorTraits.h: Stop bringing std::pair into the current scope.
2014-01-02 Gavin Barraclough <barraclough@apple.com>
Refactor NSActivity handling code from ChildProcess to UserActivity
https://bugs.webkit.org/show_bug.cgi?id=126330
Reviewed by Sam Weinig.
UserActivity is a mechanism to express to the operating system (where appropriate)
that a user initiated activity is taking place, and as such that resources should be
made available to the process accordingly.
Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
to hold different activity tokens for different user actions (which simplifies the
handling, and aides debugging since the token can more accurately express the activity
taking place), and also will allow us to avoid the layering difficulty of calling back
up the stack to WebKit to register that an activity is taking place.
* wtf/Platform.h:
- added HAVE_NS_ACTIVITY.
2013-12-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r161157, r161158, r161160, r161161,
r161163, and r161165.
http://trac.webkit.org/changeset/161157
http://trac.webkit.org/changeset/161158
http://trac.webkit.org/changeset/161160
http://trac.webkit.org/changeset/161161
http://trac.webkit.org/changeset/161163
http://trac.webkit.org/changeset/161165
https://bugs.webkit.org/show_bug.cgi?id=126332
Broke WebKit2 on Mountain Lion (Requested by ap on #webkit).
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/PlatformWin.cmake:
* wtf/threads/BinarySemaphore.cpp: Added.
(WTF::BinarySemaphore::BinarySemaphore):
(WTF::BinarySemaphore::~BinarySemaphore):
(WTF::BinarySemaphore::signal):
(WTF::BinarySemaphore::wait):
* wtf/threads/BinarySemaphore.h: Added.
(WTF::BinarySemaphore::event):
* wtf/threads/win/BinarySemaphoreWin.cpp: Added.
(WTF::BinarySemaphore::BinarySemaphore):
(WTF::BinarySemaphore::~BinarySemaphore):
(WTF::BinarySemaphore::signal):
(WTF::BinarySemaphore::wait):
2013-12-30 Anders Carlsson <andersca@apple.com>
Replace yield() and pauseBriefly() with std::this_thread::yield()
https://bugs.webkit.org/show_bug.cgi?id=126105
Reviewed by Sam Weinig.
* wtf/ByteSpinLock.h:
(WTF::ByteSpinLock::lock):
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
2013-12-30 Sam Weinig <sam@webkit.org>
Remove unnecessary non-const overload in IteratorPair
https://bugs.webkit.org/show_bug.cgi?id=126314
Reviewed by Anders Carlsson.
* wtf/IteratorPair.h:
2013-12-30 Sam Weinig <sam@webkit.org>
Remove WTF's BinarySemaphore
https://bugs.webkit.org/show_bug.cgi?id=126310
Reviewed by Anders Carlsson.
It's unused. Also remove the now empty wtf/threads directory.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/PlatformWin.cmake:
* wtf/threads: Removed.
* wtf/threads/BinarySemaphore.cpp: Removed.
* wtf/threads/BinarySemaphore.h: Removed.
* wtf/threads/win: Removed.
* wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
2013-12-30 Roger Fong <roger_fong@apple.com>
[Windows] Unreviewed build fix following r160959.
* wtf/Platform.h:
2013-12-30 Anders Carlsson <andersca@apple.com>
Replace WTF::ThreadingOnce with std::call_once
https://bugs.webkit.org/show_bug.cgi?id=126215
Reviewed by Sam Weinig.
* GNUmakefile.list.am:
* wtf/CompilationThread.cpp:
(WTF::initializeCompilationThreads):
* wtf/ThreadingOnce.h: Removed.
2013-12-26 Sam Weinig <sam@webkit.org>
Move FilterIterator and IteratorPair to WTF and reimplement HashMap::keys() and HashMap::values() using IteratorPair
https://bugs.webkit.org/show_bug.cgi?id=126253
Reviewed by Anders Carlsson.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Add new files.
* wtf/HashMap.h:
* wtf/RefPtrHashMap.h:
Remove the old implementation of keys() and values() and replace it with one
that uses IteratorPair.
* wtf/FilterIterator.h: Copied from Source/WebKit2/Shared/FilterIterator.h.
* wtf/IteratorPair.h: Copied from Source/WebKit2/Shared/IteratorPair.h.
2013-12-27 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebCore/page changes
https://bugs.webkit.org/show_bug.cgi?id=126180
Reviewed by Darin Adler.
* wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
when building iOS with ENABLE(TOUCH_EVENTS).
2013-12-25 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Building with DRAG_SUPPORT enabled
https://bugs.webkit.org/show_bug.cgi?id=126233
Reviewed by Daniel Bates.
* wtf/nix/FeatureDefinesNix.h:
2013-12-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r160959.
http://trac.webkit.org/changeset/160959
https://bugs.webkit.org/show_bug.cgi?id=126222
Caused Windows build to fail (Requested by rfong on #webkit).
* wtf/ByteSpinLock.h:
(WTF::ByteSpinLock::lock):
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
(WTF::pauseBriefly):
* wtf/ThreadingPthreads.cpp:
(WTF::yield):
* wtf/ThreadingWin.cpp:
(WTF::yield):
2013-12-23 Benjamin Poulain <bpoulain@apple.com>
Fix the build after r161031
I enabled ENABLE_CSS_SELECTOR_JIT by accident.
* wtf/Platform.h:
2013-12-23 Zan Dobersek <zdobersek@igalia.com>
[GTK] Clean up compiler optimizations flags for libWTF, libJSC
https://bugs.webkit.org/show_bug.cgi?id=126157
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Remove the -fstrict-aliasing and -O3 compiler flags for libWTF.la. -O3 gets
overridden by -O2 that's listed in CXXFLAGS (or -O0 in case of debug builds) and -fstrict-aliasing
is enabled when -O2 is used (and shouldn't be enabled in debug builds anyway).
2013-12-20 Anders Carlsson <andersca@apple.com>
Replace yield() and pauseBriefly() with std::this_thread::yield()
https://bugs.webkit.org/show_bug.cgi?id=126105
Reviewed by Sam Weinig.
* wtf/ByteSpinLock.h:
(WTF::ByteSpinLock::lock):
* wtf/Threading.h:
* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
2013-12-20 Anders Carlsson <andersca@apple.com>
Speed up case folding for 8-bit strings
https://bugs.webkit.org/show_bug.cgi?id=126098
Reviewed by Geoffrey Garen.
Add a case folding lookup table for 8-bit strings and use it instead of calling down to u_foldCase.
On a simple microbenchmark using a lookup table is about 15x faster.
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::foldCase):
* wtf/text/StringImpl.cpp:
(WTF::equalIgnoringCase):
* wtf/text/StringImpl.h:
2013-12-20 Myles C. Maxfield <mmaxfield@apple.com>
Faster implementation of text-decoration-skip: ink
https://bugs.webkit.org/show_bug.cgi?id=125718
Reviewed by Simon Fraser.
This creates a new preprocessor define, CSS3_TEXT_DECORATION_SKIP_INK,
which enables the use of the text-decoration-skip: ink CSS value.
Creating this new value simplifies the logic about when to enable the
codepath for this CSS value.
* wtf/Platform.h:
2013-12-20 Simon Fraser <simon.fraser@apple.com>
Change "threaded scrolling" terminology to "asynchronous scrolling"
https://bugs.webkit.org/show_bug.cgi?id=126094
Reviewed by Tim Horton.
Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING.
* wtf/FeatureDefines.h:
2013-12-20 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Build fails in debug mode after r160834.
https://bugs.webkit.org/show_bug.cgi?id=126059
Reviewed by Csaba Osztrogonác.
Debug mode build failed due to comparing signed and unsigned in
ASSERT(). Now both values are unsigned.
* wtf/dtoa/double-conversion.cc:
2013-12-19 Alex Christensen <achristensen@webkit.org>
Final preparations for GStreamer on Windows.
https://bugs.webkit.org/show_bug.cgi?id=125958
Reviewed by Benjamin Poulain.
* WTF.vcxproj/WTFDebugWinCairo.props:
* WTF.vcxproj/WTFReleaseWinCairo.props:
Include WinCairo.props.
* wtf/Platform.h:
Use GLib and GStreamer on WinCairo with video.
2013-12-18 Daniel Bates <dabates@apple.com>
WTF, JavaScriptCore fails to build with trunk clang: operators new, new[],
delete, delete[] cannot be declared inline
https://bugs.webkit.org/show_bug.cgi?id=124186
<rdar://problem/15644039>
Reviewed by Geoffrey Garen and Anders Carlsson.
Following <http://llvm.org/viewvc/llvm-project?view=revision&revision=193044>
(http://llvm.org/bugs/show_bug.cgi?id=17591>), Clang emits warnings when
operator new, delete are inlined. Such definitions cannot be inline per
replacement.functions (17.6.4.6/3) of the C++ standard. For now,
disable these warnings instead of exporting these functions.
* wtf/FastMalloc.h:
2013-12-19 Hugo Parente Lima <hugo.lima@openbossa.org>
WTF fails to compile with gcc 4.8.2 and -Werror=array-bounds
https://bugs.webkit.org/show_bug.cgi?id=125936
Reviewed by Anders Carlsson.
* wtf/dtoa/double-conversion.cc: Use a unsigned instead of int on buffer_pos type.
2013-12-19 Peter Szanka <h868064@stud.u-szeged.hu>
Delete RVCT related code parts.
https://bugs.webkit.org/show_bug.cgi?id=125626
Reviewed by Csaba Osztrogonác.
* wtf/Compiler.h: follow-up fix for r160648, remove an unnecessary comment.
2013-12-18 Alex Christensen <achristensen@webkit.org>
[WinCairo] Preparation for GStreamer on Windows.
https://bugs.webkit.org/show_bug.cgi?id=125946
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
Use new GStreamer property sheets for WinCairo.
2013-12-18 Mark Hahnenberg <mhahnenberg@apple.com>
DFG should have a separate StoreBarrier node
https://bugs.webkit.org/show_bug.cgi?id=125530
Reviewed by Filip Pizlo.
* wtf/Platform.h: Added an #define for ENABLE(GGC) which will be used for landing things related to GenGC.
2013-12-16 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebCore/html changes
https://bugs.webkit.org/show_bug.cgi?id=125765
Reviewed by Darin Adler.
Defined ENABLE_IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, enabled by default on iOS.
* wtf/FeatureDefines.h:
2013-12-17 Alex Christensen <achristensen@webkit.org>
Compile fix for WebGL on Windows without GRAPHICS_SURFACE.
https://bugs.webkit.org/show_bug.cgi?id=125867
Reviewed by Martin Robinson.
* wtf/FeatureDefines.h:
Removed unused ENABLE_GLIB_SUPPORT macro.
* wtf/Platform.h:
Don't use GRAPHICS_SURFACE for WebGL on Windows.
2013-12-17 Alex Christensen <achristensen@webkit.org>
[Win] Fixed linker error with GStreamer.
https://bugs.webkit.org/show_bug.cgi?id=124861
Reviewed by Martin Robinson.
* wtf/gobject/GOwnPtr.cpp:
(WTF::GError):
* wtf/gobject/GOwnPtr.h:
Added WTF_EXPORT_PRIVATE to freeOwnedGPtr<GError> declaration and definition.
2013-12-17 Benjamin Poulain <benjamin@webkit.org>
Add a simple register allocator to WebCore for x86_64
https://bugs.webkit.org/show_bug.cgi?id=125771
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Add a new flag "CSS_SELECTOR_JIT" to guard
an experimental JIT compiler in WebCore.
2013-12-16 Anders Carlsson <andersca@apple.com>
Remove EnumClass.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=125820
Reviewed by Darin Adler.
All compilers we build on now support real strongly typed enums, so we can remove the ENUM_CLASS version.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CheckedArithmetic.h:
* wtf/EnumClass.h: Removed.
2013-12-16 Brent Fulgham <bfulgham@apple.com>
[Win] Remove dead code after conversion to VS2013
https://bugs.webkit.org/show_bug.cgi?id=125795
Reviewed by Darin Adler.
* wtf/Assertions.h: Include <inttypes.h> now that it exists.
* wtf/Compiler.h: Update compiler checks for VS2013, and
enable support for NEVER_INLINE
* wtf/HashFunctions.h:
(WTF::PtrHash::hash): Remove compiler workaround.
* wtf/MathExtras.h: Remove C99 functions that are now supplied
by the MS runtime library.
* wtf/Platform.h: Remove old MSVC support flags.
* wtf/StdLibExtras.h: Remove old MSVC workaround code.
2013-12-16 Alex Christensen <achristensen@webkit.org>
Fixed Win64 build on VS2013.
https://bugs.webkit.org/show_bug.cgi?id=125753
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
Added correct PlatformToolset for 64-bit builds.
2013-12-16 Peter Szanka <h868064@stud.u-szeged.hu>
Delete RVCT related code parts.
https://bugs.webkit.org/show_bug.cgi?id=125626
Reviewed by Darin Adler.
* wtf/Assertions.h:
* wtf/Compiler.h:
* wtf/FastMalloc.h:
* wtf/Platform.h:
2013-12-13 Brent Fulgham <bfulgham@apple.com>
[Win] Remove Pre-VS2013 support code.
https://bugs.webkit.org/show_bug.cgi?id=125693
Reviewed by Darin Adler.
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::vprintf): Use va_copy, like a civilized person.
2013-12-12 Darin Adler <darin@apple.com>
Incorrect handling of non-ASCII characters in WTF::base64DecodeInternal
https://bugs.webkit.org/show_bug.cgi?id=125658
Reviewed by Alexey Proskuryakov.
* wtf/text/Base64.cpp:
(WTF::base64EncodeInternal): Use a reference to an array instead of a pointer
for the table argument type so we check the size of the array at the call site.
(WTF::base64DecodeInternal): Ditto. Also added an bounds check before using the
table so we don't load some random value for non-ASCII characters.
2013-12-13 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r160548
* WTF.vcxproj/WTFGenerated.vcxproj: Specify that we are using
the vs12_xp target for Makefile-based projects.
2013-12-13 Anders Carlsson <andersca@apple.com>
Require variadic templates to build WebKit
https://bugs.webkit.org/show_bug.cgi?id=125701
Reviewed by Andreas Kling.
* wtf/Compiler.h:
Add an #error if variadic templates are disabled.
* wtf/NeverDestroyed.h:
* wtf/PassRef.h:
* wtf/StdLibExtras.h:
Remove a bunch of COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES) #ifdefs.
2013-12-13 Peter Szanka <h868064@stud.u-szeged.hu>
Delete INTEL C compiler related code parts.
https://bugs.webkit.org/show_bug.cgi?id=125625
Reviewed by Darin Adler.
* wtf/Assertions.h:
* wtf/Compiler.h:
2013-12-13 Brent Fulgham <bfulgham@apple.com>
[Win] Switch WebKit solution to Visual Studio 2013
https://bugs.webkit.org/show_bug.cgi?id=125192
Reviewed by Anders Carlsson.
* WTF.vcxproj/WTF.vcxproj: Update for VS2013
* WTF.vcxproj/WTF.vcxproj.filters: Ditto
2013-12-12 Brady Eidson <beidson@apple.com>
DatabaseProcess IndexedDB: Establish a metadata backing store on disk
https://bugs.webkit.org/show_bug.cgi?id=125258
Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
* wtf/text/WTFString.h: Export toUInt64Strict().
2013-12-12 Sam Weinig <sam@webkit.org>
Replace uses of WTF::BitArray with std::bitset
https://bugs.webkit.org/show_bug.cgi?id=125642
Reviewed by Anders Carlsson.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/BitArray.h: Removed.
* wtf/CMakeLists.txt:
2013-12-11 David Kilzer <ddkilzer@apple.com>
Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER)
<http://webkit.org/b/125329>
Reviewed by Darin Adler.
* wtf/Assertions.h: Define macro
ASSERT_WITH_SECURITY_IMPLICATION_DISABLED based on whether
ASSERT_WITH_SECURITY_IMPLICATION() is enabled.
2013-12-11 Brendan Long <b.long@cablelabs.com>
Type punning error in MD5.cpp
https://bugs.webkit.org/show_bug.cgi?id=125412
Reviewed by Darin Adler.
* wtf/MD5.cpp:
(WTF::toLittleEndian): Renamed, and use memcpy instead of casting.
(WTF::MD5::addBytes): Renamed reverseBytes to toLittleEndian.
(WTF::MD5::checksum): Same, and use memcpy instead of casting to prevent type punning error.
2013-12-11 Laszlo Vidacs <lac@inf.u-szeged.hu>
Store SHA1 hash in std::array
https://bugs.webkit.org/show_bug.cgi?id=125446
Reviewed by Darin Adler.
Change Vector to std::array and use typedef.
* wtf/SHA1.cpp:
(WTF::SHA1::computeHash):
(WTF::SHA1::hexDigest):
(WTF::SHA1::computeHexDigest):
* wtf/SHA1.h:
2013-12-11 Oliver Hunt <oliver@apple.com>
Give Unique StringImpls a meaningful data pointer
https://bugs.webkit.org/show_bug.cgi?id=125598
Reviewed by Michael Saboff.
Found by code inspection. If there is a collision in an Identifier
table when comparing to a string literal we attempt to use the data
pointer (essentially this ends up being a null termination check).
Previously unique pointers just used the literal 1 as the data address
but this obviously fails when dereferenced. Instead we now make the
data pointer point to the location of the buffer pointer itself. As
the buffer pointer is initialised to 0, this satisfies the requirement
that the 0-length unique string is null terminated.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
2013-12-10 Anders Carlsson <andersca@apple.com>
Add a HashMap constructor that takes an initializer list
https://bugs.webkit.org/show_bug.cgi?id=125551
Reviewed by Dan Bernstein.
* wtf/HashMap.h:
(WTF::HashMap::HashMap):
2013-12-10 Laszlo Vidacs <lac@inf.u-szeged.hu>
Use std::array when computing MD5 checksum
https://bugs.webkit.org/show_bug.cgi?id=125509
Reviewed by Anders Carlsson.
Added MD5::Digest type and MD5::hashSize for computing MD5 checksum.
* wtf/MD5.cpp:
(WTF::MD5::checksum):
* wtf/MD5.h:
2013-12-10 Martin Robinson <mrobinson@igalia.com>
Various fixes for the CMake GTK+ build
Reviewed by Gustavo Noronha.
* wtf/PlatformGTK.cmake: Add Zlib library to the WTF build.
2013-12-09 Sam Weinig <sam@webkit.org>
Remove FixedArray
https://bugs.webkit.org/show_bug.cgi?id=125478
Reviewed by Anders Carlsson.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FixedArray.h: Removed.
2013-12-09 Sam Weinig <sam@webkit.org>
Replace use of WTF::FixedArray with std::array
https://bugs.webkit.org/show_bug.cgi?id=125475
Reviewed by Anders Carlsson.
* wtf/AVLTree.h:
* wtf/Bitmap.h:
* wtf/SixCharacterHash.cpp:
(WTF::integerToSixCharacterHashString):
* wtf/SixCharacterHash.h:
2013-12-06 Roger Fong <roger_fong@apple.com> and Brent Fulgham <bfulgham@apple.com>
[Win] Support compiling with VS2013
https://bugs.webkit.org/show_bug.cgi?id=125353
Reviewed by Anders Carlsson.
* wtf/Compiler.h: Show proper features for VS2012 and VS2013.
* wtf/MathExtras.h: Don't implement common C99 routines when
they are available through the runtime libraries.
* wtf/RetainPtr.h:
(WTF::RetainPtr::operator bool): Added.
* wtf/StdLibExtras.h: Use Microsoft's version of make_unique
when it exists.
2013-12-06 Laszlo Vidacs <lac@inf.u-szeged.hu>
Define SHA1 hash size in SHA1.h and use it at various places.
https://bugs.webkit.org/show_bug.cgi?id=125345
Reviewed by Darin Adler.
Use SHA1::hashSize instead of local variables.
* wtf/SHA1.h: define SHA1 hash size
2013-12-05 Iain Lane <iain.lane@canonical.com>
Remove USE(LOCKFREE_THREADSAFEREFCOUNTED) from Atomics.cpp since it is
no longer defined.
https://bugs.webkit.org/show_bug.cgi?id=124502
Reviewed by Anders Carlsson.
* wtf/Atomics.cpp:
2013-12-04 Ryosuke Niwa <rniwa@webkit.org>
Enable HTMLTemplateElement by default
https://bugs.webkit.org/show_bug.cgi?id=123851
Reviewed by Antti Koivisto.
* wtf/FeatureDefines.h:
2013-12-04 Dan Bernstein <mitz@apple.com>
Replace USE(SECURITY_FRAMEWORK) with finer-grained defines
https://bugs.webkit.org/show_bug.cgi?id=125242
Reviewed by Sam Weinig.
* wtf/Platform.h: Removed definitions of WTF_USE_SECURITY_FRAMEWORK, and defined
HAVE_SEC_IDENTITY and HAVE_SEC_KEYCHAIN.
2013-12-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=124613
Reviewed by Timothy Hatcher.
* wtf/ios/WebCoreThread.cpp:
* wtf/ios/WebCoreThread.h:
Expose WebThreadRun/WebThreadRunSync iOS methods defined in WebCore through
WTF so that JavaScriptCore can use it. Another such method already existed.
2013-12-03 Mark Lam <mark.lam@apple.com>
testapi test crashes on Windows in WTF::Vector<wchar_t,64,WTF::UnsafeVectorOverflow>::size().
https://bugs.webkit.org/show_bug.cgi?id=121972.
Reviewed by Brent Fulgham.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::releaseDecommitted):
- Added a check to ensure that the bytes to decommit / release is not 0.
On Windows, a 0 length passed to VirtualFree() has a special meaning,
and it's not "decommit / release nothing" as one would expect. Adding
this check makes OSAllocatorWin consistent with OSAllocatorPosix for
these 2 functions.
2013-12-02 Mark Lam <mark.lam@apple.com>
Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
https://bugs.webkit.org/show_bug.cgi?id=123809.
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
- Ensure that the ASSEMBLER is enabled when the DISASSEMBLER is enabled.
2013-11-30 peavo@outlook.com <peavo@outlook.com>
[Win] Some JavaScript date tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=124946
Reviewed by Brent Fulgham.
Use native Win32 api functions to compute Daylight saving time offset.
* wtf/DateMath.cpp:
(WTF::UnixTimeToFileTime): Added method to calculate Win32 specific struct FILETIME from time_t value.
(WTF::calculateDSTOffset): Use native Win32 api functions to compute Daylight saving time offset.
2013-11-28 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Nix Upstream: Updating Nix WTF files
https://bugs.webkit.org/show_bug.cgi?id=124980
Reviewed by Csaba Osztrogonác.
Just to sync our private repo files and the trunk, as part of the upstream process.
* wtf/DisallowCType.h:
* wtf/PlatformNix.cmake:
* wtf/nix/FeatureDefinesNix.h:
* wtf/nix/PlatformNix.h:
* wtf/nix/RunLoopNix.cpp: Added.
2013-11-28 Antti Koivisto <antti@apple.com>
Remove feature: CSS variables
https://bugs.webkit.org/show_bug.cgi?id=114119
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h:
2013-11-26 Filip Pizlo <fpizlo@apple.com>
Do bytecode validation as part of testing
https://bugs.webkit.org/show_bug.cgi?id=124913
Reviewed by Oliver Hunt.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastBitVector.cpp: Added.
(WTF::FastBitVector::dump):
* wtf/FastBitVector.h:
(WTF::FastBitVector::resize):
(WTF::FastBitVector::bitCount):
(WTF::FastBitVector::arrayLength):
2013-11-27 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Remove Sparc specific code.
https://bugs.webkit.org/show_bug.cgi?id=124941
Reviewed by Michael Saboff.
Sparc is not supported, remove leftover code.
* wtf/Platform.h:
* wtf/dtoa/utils.h:
2013-11-26 Marcelo Lira <marcelo.lira@openbossa.org>
Nix upstreaming - Adding build files and supporting scripts
https://bugs.webkit.org/show_bug.cgi?id=118367
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/PlatformNix.cmake: Added.
2013-11-26 Drew Yao <ayao@apple.com>
ASSERT_WITH_SECURITY_IMPLICATION should crash in a distinct way.
https://bugs.webkit.org/show_bug.cgi?id=124757
Change ASSERT_WITH_SECURITY_IMPLICATION to access a different address from CRASH()
in order to help screen fuzzing bugs.
Reviewed by Brent Fulgham.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2013-11-24 Tim Horton <timothy_horton@apple.com>
Upstream USE(IOSURFACE) from the iOS port
https://bugs.webkit.org/show_bug.cgi?id=124814
Reviewed by Sam Weinig.
Some code guarded by USE(IOSURFACE) was recently upstreamed,
but not the definition of WTF_USE_IOSURFACE itself.
* wtf/Platform.h:
2013-11-23 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] Remove 0.10 codepath
https://bugs.webkit.org/show_bug.cgi?id=124534
Reviewed by Philippe Normand.
* wtf/Platform.h: Removed macro for GStreamer 1.0 as it is the
only codepath now.
2013-11-21 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove ENABLE_WORKERS
https://bugs.webkit.org/show_bug.cgi?id=105784
Reviewed by Darin Adler.
* wtf/FeatureDefines.h:
* wtf/nix/FeatureDefinesNix.h:
2013-11-21 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/124701> Fix an error in a few Xcode configuration setting files.
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
2013-11-20 Mark Lam <mark.lam@apple.com>
Introducing VMEntryScope to update the VM stack limit.
https://bugs.webkit.org/show_bug.cgi?id=124634.
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
* wtf/StackBounds.h:
(WTF::StackBounds::StackBounds):
2013-11-18 Filip Pizlo <fpizlo@apple.com>
Allow the FTL debug dumps to include the new size field
https://bugs.webkit.org/show_bug.cgi?id=124479
Reviewed by Mark Hahnenberg.
* wtf/PrintStream.cpp:
(WTF::printInternal):
* wtf/PrintStream.h:
2013-11-17 Jer Noble <jer.noble@apple.com>
[WTF] Media time should not have a constructor which accepts a single int or float.
https://bugs.webkit.org/show_bug.cgi?id=124470
Having a constructor taking a single number value, as it's very easy to accidentially mis-
initialize a MediaTime with a double (automatically casted to a int64_t).
Reviewed by Eric Carlson.
* wtf/MediaTime.h:
2013-11-18 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r159432 to make WinCairo build happy.
* wtf/text/WTFString.h:
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file.
2013-11-16 Alexey Proskuryakov <ap@apple.com>
Use uint8_t vectors for WebCrypto data
https://bugs.webkit.org/show_bug.cgi?id=124466
Reviewed by Sam Weinig.
Binary data can be UTF-8, in which case "char*" is idiomatic, or it can be arbitrary
binary data, in which case "uint8_t*" is more common.
Changed encode functions that took "const char *" to "const void*", and decode
functions that took "Vector<char>&" now take an adapter class.
The adapter relies on Vector<char> and Vector<uint8_t> classes having an identical layout.
* wtf/text/Base64.cpp:
(WTF::base64Encode):
(WTF::base64URLEncode):
(WTF::base64DecodeInternal):
(WTF::base64Decode):
(WTF::base64URLDecode):
* wtf/text/Base64.h:
(WTF::SignedOrUnsignedCharVectorAdapter):
(WTF::ConstSignedOrUnsignedCharVectorAdapter):
(WTF::base64Encode):
(WTF::base64URLEncode):
2013-11-15 Alexey Proskuryakov <ap@apple.com>
Support exporting symmetric keys as JWK
https://bugs.webkit.org/show_bug.cgi?id=124442
Reviewed by Sam Weinig.
Base64URL encoding doesn't use '=' padding, and doesn't need any other options.
Added this mode for encode, and removed policy arguments from exposed functions.
* wtf/text/Base64.cpp:
(WTF::base64EncodeInternal):
(WTF::base64URLEncode):
(WTF::base64URLDecode):
* wtf/text/Base64.h:
(WTF::base64URLEncode):
2013-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Remove VTableSpectrum
https://bugs.webkit.org/show_bug.cgi?id=124427
Reviewed by Filip Pizlo.
* wtf/Platform.h:
2013-11-15 Jer Noble <jer.noble@apple.com>
MediaTime addition and subtraction operators have errors when the rhs is infinite.
https://bugs.webkit.org/show_bug.cgi?id=124413
Reviewed by Eric Carlson.
Correctly account for infinities that can occur on the right-hand side of addition or
subtraction operators.
* wtf/MediaTime.cpp:
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):
2013-11-14 Oliver Hunt <oliver@apple.com>
Make CLoop easier to build, and make it work
https://bugs.webkit.org/show_bug.cgi?id=124359
Reviewed by Geoffrey Garen.
Make building with the CLoop forcibly enabled manually
disable the JITs
* wtf/Platform.h:
2013-11-14 Andreas Kling <akling@apple.com>
FontDescription copies should share families list, not duplicate it.
<https://webkit.org/b/124338>
Add RefCountedArray::operator==.
Reviewed by Antti Koivisto.
2013-11-13 Anders Carlsson <andersca@apple.com>
Add a Vector constructor that takes an std::initializer_list
https://bugs.webkit.org/show_bug.cgi?id=124287
Reviewed by Antti Koivisto.
* wtf/Compiler.h:
* wtf/Vector.h:
(WTF::Vector::Vector):
2013-11-12 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening.
* WTF.vcxproj/WTF.vcxproj.filters: Tidy up filters so files show up
in their proper directories.
2013-11-12 Alex Christensen <achristensen@webkit.org>
Build GStreamer files on Windows.
https://bugs.webkit.org/show_bug.cgi?id=124180
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.vcxproj/copy-files.cmd:
Include gobject files in WinCairo build.
2013-11-09 Filip Pizlo <fpizlo@apple.com>
Switch FTL GetById/PutById IC's over to using AnyRegCC
https://bugs.webkit.org/show_bug.cgi?id=124094
Reviewed by Sam Weinig.
I needed to add another set operation, namely filter(), which is an in-place set
intersection.
* wtf/BitVector.cpp:
(WTF::BitVector::filterSlow):
* wtf/BitVector.h:
(WTF::BitVector::filter):
2013-11-10 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break on Ubuntu 13.10
https://bugs.webkit.org/show_bug.cgi?id=124131
Reviewed by Gyuyoung Kim.
Turned DisallowCType macros off on EFL port because gtest-internal.h uses isspace().
* wtf/DisallowCType.h: Added !PLATFORM(EFL) guard.
2013-11-09 Patrick Gansterer <paroga@webkit.org>
Move RunLoop from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=116606
Reviewed by Anders Carlsson.
With this change RunLoop can be used in JavaScriptCore too.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformWin.cmake:
* wtf/RunLoop.cpp: Renamed from Source/WebCore/platform/RunLoop.cpp.
(WTF::RunLoop::Holder::Holder):
(WTF::RunLoop::Holder::runLoop):
(WTF::RunLoop::initializeMainRunLoop):
(WTF::RunLoop::current):
(WTF::RunLoop::main):
(WTF::RunLoop::isMain):
(WTF::RunLoop::performWork):
(WTF::RunLoop::dispatch):
* wtf/RunLoop.h: Renamed from Source/WebCore/platform/RunLoop.h.
(WTF::RunLoop::TimerBase::startRepeating):
(WTF::RunLoop::TimerBase::startOneShot):
(WTF::RunLoop::TimerBase::isRepeating):
(WTF::RunLoop::Timer::Timer):
(WTF::RunLoop::Timer::fired):
* wtf/blackberry/RunLoopBlackBerry.cpp: Renamed from Source/WebCore/platform/blackberry/RunLoopBlackBerry.cpp.
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::~RunLoop):
(WTF::RunLoop::wakeUp):
* wtf/cf/RunLoopCF.cpp: Renamed from Source/WebCore/platform/cf/RunLoopCF.cpp.
(WTF::RunLoop::performWork):
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::~RunLoop):
(WTF::RunLoop::runForDuration):
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::run):
(WTF::RunLoop::stop):
(WTF::RunLoop::TimerBase::timerFired):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::~TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
* wtf/efl/RunLoopEfl.cpp: Renamed from Source/WebCore/platform/efl/RunLoopEfl.cpp.
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::~RunLoop):
(WTF::RunLoop::run):
(WTF::RunLoop::stop):
(WTF::RunLoop::wakeUpEvent):
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::~TimerBase):
(WTF::RunLoop::TimerBase::timerFired):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
* wtf/gtk/RunLoopGtk.cpp: Renamed from Source/WebCore/platform/gtk/RunLoopGtk.cpp.
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::~RunLoop):
(WTF::RunLoop::run):
(WTF::RunLoop::innermostLoop):
(WTF::RunLoop::pushNestedMainLoop):
(WTF::RunLoop::popNestedMainLoop):
(WTF::RunLoop::stop):
(WTF::RunLoop::queueWork):
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::~TimerBase):
(WTF::RunLoop::TimerBase::clearTimerSource):
(WTF::RunLoop::TimerBase::timerFiredCallback):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
* wtf/win/RunLoopWin.cpp: Renamed from Source/WebCore/platform/win/RunLoopWin.cpp.
(WTF::RunLoop::RunLoopWndProc):
(WTF::RunLoop::wndProc):
(WTF::RunLoop::run):
(WTF::RunLoop::stop):
(WTF::RunLoop::registerRunLoopMessageWindowClass):
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::~RunLoop):
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::TimerBase::timerFired):
(WTF::generateTimerID):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::~TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):
2013-11-08 Alexey Proskuryakov <ap@apple.com>
Make base64url decoding actually work
https://bugs.webkit.org/show_bug.cgi?id=124050
Reviewed by Sam Weinig.
* wtf/text/Base64.cpp: (WTF::base64DecodeInternal): Don't hardcode knowledge about
alphabet, put it into the map.
2013-11-07 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
https://bugs.webkit.org/show_bug.cgi?id=50619
Reviewed by Martin Robinson.
Enabled OPENTYPE_VERTICAL by default on GTK+ and EFL ports, which are
currently using Freetype.
* wtf/Platform.h:
2013-11-06 Daniel Bates <dabates@apple.com>
[iOS] Upstream Letterpress effect
https://bugs.webkit.org/show_bug.cgi?id=123932
Reviewed by Sam Weinig.
Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
letterpress on iOS.
* wtf/FeatureDefines.h:
2013-11-06 Nick Diego Yamane <nick.yamane@openbossa.org>
Disable "unused local typedefs" warning for GCC 4.7
https://bugs.webkit.org/show_bug.cgi?id=123913
Reviewed by Martin Robinson.
That warning was actually introduced in gcc 4.7.0.
See: http://gcc.gnu.org/gcc-4.7/changes.html
* wtf/Compiler.h:
2013-11-06 Daniel Bates <dabates@apple.com>
Add ENABLE(TEXT_SELECTION)
https://bugs.webkit.org/show_bug.cgi?id=123827
Reviewed by Ryosuke Niwa.
Enable selection painting by default on all ports except iOS.
* wtf/FeatureDefines.h:
2013-11-04 Alexey Proskuryakov <ap@apple.com>
Implement base64url encoding from RFC 4648
https://bugs.webkit.org/show_bug.cgi?id=123767
Reviewed by Sam Weinig.
No tests yet, will be covered by JWK tests for WebCrypto.
* wtf/text/Base64.cpp:
(WTF::base64EncodeInternal):
(WTF::base64Encode):
(WTF::base64URLEncode):
(WTF::base64DecodeInternal):
(WTF::base64Decode):
(WTF::base64URLDecode):
* wtf/text/Base64.h:
(WTF::base64URLEncode):
2013-11-04 Brent Fulgham <bfulgham@apple.com>
[Win] User VersionStamper for official builds
https://bugs.webkit.org/show_bug.cgi?id=123758
Reviewed by Tim Horton.
* WTF.vcxproj/WTFPostBuild.cmd: Add missing command to run VersionStamper.exe.
2013-11-01 Jer Noble <jer.noble@apple.com>
[PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=123621
Reviewed by Eric Carlson.
Enable WTF_USE_AVFOUNDATION and add some HAVE_AVFOUNDATION_* defines
to replace the existing __MAC_OS_X_VERSION_MIN_REQUIRED macros in
MediaPlayerPrivateAVFoundationObjC.mm.
* wtf/Platform.h:
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Fix compilation of DateMath.cpp with MSVC
https://bugs.webkit.org/show_bug.cgi?id=123680
Reviewed by Darin Adler.
* wtf/DateMath.cpp:
(WTF::appendTwoDigitNumber): Help the compiler finding the
correct overload by casting the characters to LChar.
2013-11-02 Filip Pizlo <fpizlo@apple.com>
LLVM assertion failures should funnel into WTF's crash handling
https://bugs.webkit.org/show_bug.cgi?id=123682
Reviewed by Geoffrey Garen.
Give JSC some new toys to play with for crash handling.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2013-11-02 Patrick Gansterer <paroga@webkit.org>
Fix UnicodeWchar after r157330.
https://bugs.webkit.org/show_bug.cgi?id=123668
Reviewed by Darin Adler.
* wtf/unicode/wchar/UnicodeWchar.cpp:
(unorm_normalize):
(u_strFoldCase):
(u_strToLower):
(u_strToUpper):
* wtf/unicode/wchar/UnicodeWchar.h:
(u_foldCase):
(u_isprint):
(u_isspace):
2013-11-02 Andreas Kling <akling@apple.com>
Make remaining StringImpl functions return PassRef.
<https://webkit.org/b/123683>
Okay, this seems to work well! Let's go all in and convert the
remaining StringImpl functions to return PassRef<StringImpl> instead
of PassRefPtr where we know that null is never returned.
Reviewed by Anders Carlsson.
2013-11-02 Andreas Kling <akling@apple.com>
StringImpl::upper() should return PassRef.
<https://webkit.org/b/123655>
Make upper() return PassRef<StringImpl>. Spotted and removed some
ref churning in implementations.
Reviewed by Darin Adler.
2013-11-01 Alexey Proskuryakov <ap@apple.com>
Add WebCrypto AES-CBC
https://bugs.webkit.org/show_bug.cgi?id=123647
Reviewed by Anders Carlsson.
* wtf/FixedArray.h: (WTF::FixedArray::data): Added a const version of the function.
* wtf/Vector.h: Added a comment to Vector constructor about how it is different
from std::vector.
2013-11-01 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed extended attempt at Windows build fix after r158471.
* wtf/text/cf/AtomicStringCF.cpp:
* wtf/text/cf/StringCF.cpp:
* wtf/text/cf/StringImplCF.cpp:
2013-11-01 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed attempt at Windows build fix after r158471.
* wtf/text/cf/AtomicStringCF.cpp:
* wtf/text/cf/StringCF.cpp:
* wtf/text/cf/StringImplCF.cpp:
2013-11-01 Andreas Kling <akling@apple.com>
Make more StringImpl construction helpers return PassRef.
<https://webkit.org/b/123652>
Tweak another handful of StringImpl constructor functions to return
PassRef<StringImpl> instead of PassRefPtr.
Reviewed by Anders Carlsson.
2013-11-01 Andreas Kling <akling@apple.com>
Neuter WTF_MAKE_FAST_ALLOCATED in GLOBAL_FASTMALLOC_NEW builds.
<https://webkit.org/b/123639>
When building with GLOBAL_FASTMALLOC_NEW, we don't need to expand
operator new/delete overrides in every class.
This change makes allocations group up nicely in Instruments,
instead of being split between "WTF::fastMalloc" and "operator new"
depending on whether the class had WTF_MAKE_FAST_ALLOCATED.
Reviewed by Anders Carlsson.
2013-11-01 Joseph Pecoraro <pecoraro@apple.com>
Move CF/Mac WTF String implementations down into WTF
https://bugs.webkit.org/show_bug.cgi?id=123635
Reviewed by Sam Weinig.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
* wtf/text/cf/AtomicStringCF.cpp: Renamed from Source/WebCore/platform/text/cf/AtomicStringCF.cpp.
(WTF::AtomicString::add):
* wtf/text/cf/StringCF.cpp: Renamed from Source/WebCore/platform/text/cf/StringCF.cpp.
(WTF::String::String):
(WTF::String::createCFString):
* wtf/text/cf/StringImplCF.cpp: Renamed from Source/WebCore/platform/text/cf/StringImplCF.cpp.
(garbageCollectionEnabled):
(WTF::StringWrapperCFAllocator::retain):
(WTF::StringWrapperCFAllocator::release):
(WTF::StringWrapperCFAllocator::copyDescription):
(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::reallocate):
(WTF::StringWrapperCFAllocator::deallocateOnMainThread):
(WTF::StringWrapperCFAllocator::deallocate):
(WTF::StringWrapperCFAllocator::preferredSize):
(WTF::StringWrapperCFAllocator::create):
(WTF::StringWrapperCFAllocator::allocator):
(WTF::StringImpl::createCFString):
* wtf/text/mac/StringImplMac.mm: Renamed from Source/WebCore/platform/text/mac/StringImplMac.mm.
(WTF::StringImpl::operator NSString *):
* wtf/text/mac/StringMac.mm: Renamed from Source/WebCore/platform/text/mac/StringMac.mm.
(WTF::String::String):
2013-11-01 Emilio Pozuelo Monfort <pochu27@gmail.com>
HPPA build fixes
https://bugs.webkit.org/show_bug.cgi?id=123625
Original patch from John David Anglin <dave.anglin@bell.net>
Reviewed by Darin Adler.
* wtf/Platform.h:
* wtf/dtoa/utils.h:
2013-11-01 Patrick Gansterer <paroga@webkit.org>
Buildfix for !USE(ICU_UNICODE) after 156968.
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault):
2013-10-30 Oliver Hunt <oliver@apple.com>
Implement basic ES6 Math functions
https://bugs.webkit.org/show_bug.cgi?id=123536
Reviewed by Michael Saboff.
Add basic implementations of necessary methods to MathExtras to
deal with MSVC not supplying them
* wtf/MathExtras.h:
(asinh):
(acosh):
(atanh):
(expm1):
(log1p):
(cbrt):
2013-10-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r158299.
http://trac.webkit.org/changeset/158299
https://bugs.webkit.org/show_bug.cgi?id=123558
caused assertion failures in fast/canvas/canvas-color-
serialization.html and fast/forms/input-text-paste-
maxlength.html (Requested by rniwa on #webkit).
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
2013-10-30 Ryosuke Niwa <rniwa@webkit.org>
Remove code for Mac Lion
https://bugs.webkit.org/show_bug.cgi?id=123542
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2013-10-30 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove PCRE workaround.
https://bugs.webkit.org/show_bug.cgi?id=123265
Reviewed by Brent Fulgham.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
2013-10-30 peavo@outlook.com <peavo@outlook.com>
[Win] Compile errors when enabling DFG JIT.
https://bugs.webkit.org/show_bug.cgi?id=120998
Reviewed by Brent Fulgham.
* wtf/CompilationThread.cpp: Use new ThreadingOnce class instead of pthread_once.
(WTF::initializeCompilationThreads):
* wtf/ThreadingOnce.h: Added ThreadingOnce class encapsulating pthread_once functionality.
(WTF::ThreadingOnce::ThreadingOnce):
(WTF::ThreadingOnce::~ThreadingOnce):
(WTF::ThreadingOnce::callOnce):
* wtf/text/CString.h: Export needed symbols.
2013-10-30 Alex Christensen <achristensen@webkit.org>
Disabled JIT on Win64.
https://bugs.webkit.org/show_bug.cgi?id=122472
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
Disabled JIT on Win64.
2013-10-29 Andreas Kling <akling@apple.com>
StringImpl::isolatedCopy() should return PassRef.
<https://webkit.org/b/123484>
Make isolatedCopy() return a PassRef<StringImpl>.
Reviewed by Anders Carlsson.
2013-10-29 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Enable MediaSource on the Mac
https://bugs.webkit.org/show_bug.cgi?id=122484
Reviewed by Darin Adler.
Enable ENABLE_MEDIA_SOURCE.
* wtf/FeatureDefines.h:
* wtf/Platform.h: Force a clean build.
2013-10-29 Andreas Kling <akling@apple.com>
StringImpl::adopt() should return PassRef.
<https://webkit.org/b/123456>
Make the StringImpl::adopt() functions return a PassRef<StringImpl>.
Reviewed by Anders Carlsson.
2013-10-29 Jinwoo Song <jinwoo7.song@samsung.com>
Re-enable simple line layout for EFL
https://bugs.webkit.org/show_bug.cgi?id=123402
Reviewed by Antti Koivisto.
* wtf/FeatureDefines.h: Enable 8-bit TextRun support for EFL port.
2013-10-28 Anders Carlsson <andersca@apple.com>
RunLoop::dispatch should take an std::function
https://bugs.webkit.org/show_bug.cgi?id=123407
Reviewed by Andreas Kling.
* wtf/FunctionDispatcher.h:
2013-10-28 Andreas Kling <akling@apple.com>
RenderElement::m_style should be a Ref.
<https://webkit.org/b/123401>
Added a Ref::replace() so we can Indiana Jones the new style in
RenderElement::setStyle() while keeping a handle on the old style
for a while longer.
Reviewed by Antti Koivisto.
2013-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Remove unexistent file from compilation.
2013-10-28 Bastien Nocera <hadess@hadess.net>
Replace 0 timeouts g_timeout_add() by g_idle_add()
https://bugs.webkit.org/show_bug.cgi?id=123260
Reviewed by Carlos Garcia Campos.
A zero timeout should be equivalent to using g_idle_add_full(G_PRIORITY_DEFAULT, ...)
without the nagging feeling that the wrong API was used.
* wtf/gtk/MainThreadGtk.cpp: Use g_idle_add() instead
of 0-timer.
(WTF::scheduleDispatchFunctionsOnMainThread):
2013-10-28 Zan Dobersek <zdobersek@igalia.com>
Re-enable simple line layout for GTK
https://bugs.webkit.org/show_bug.cgi?id=123388
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h: Enable the 8-bit TextRun support for the GTK port.
2013-10-25 Joseph Pecoraro <pecoraro@apple.com>
Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac
https://bugs.webkit.org/show_bug.cgi?id=123111
Reviewed by Timothy Hatcher.
* wtf/FeatureDefines.h:
2013-10-25 Jer Noble <jer.noble@apple.com>
[WTF] Add a multiplication operator (and a few others) to MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123137
Reviewed by Eric Carlson.
Add a multiplication operator and an inequality operator to the
MediaTime class for use by MSE.
* wtf/MediaTime.cpp:
(WTF::signum): Moved to top of file.
(WTF::MediaTime::operator*): Added.
(WTF::MediaTime::operator!=): Added.
* wtf/MediaTime.h:
(WTF::operator*): Added non-class version of operator*.
2013-10-24 Jer Noble <jer.noble@apple.com>
[Mac] Add helper methods to convert CMTime <--> MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123285
Reviewed by Eric Carlson.
Add a #ifdef header_h protector.
* wtf/MediaTime.h:
2013-10-24 Mark Rowe <mrowe@apple.com>
Remove references to OS X 10.7 from Xcode configuration settings.
Now that we're not building for OS X 10.7 they're no longer needed.
Reviewed by Anders Carlsson.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2013-10-24 Mark Rowe <mrowe@apple.com>
<rdar://problem/15312643> Prepare for the mysterious future.
Reviewed by David Kilzer.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2013-10-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157931.
http://trac.webkit.org/changeset/157931
https://bugs.webkit.org/show_bug.cgi?id=123284
Seems to have caused a lot of assertions on debug bots
(Requested by ap on #webkit).
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
2013-10-24 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove PCRE workaround.
https://bugs.webkit.org/show_bug.cgi?id=123265
Reviewed by Darin Adler.
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):
2013-10-24 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Remove Clang workaround.
https://bugs.webkit.org/show_bug.cgi?id=123262
Reviewed by Anders Carlsson.
* wtf/CheckedArithmetic.h:
(WTF::Checked::Checked):
2013-10-24 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break with latest EFL 1.8 libraries.
https://bugs.webkit.org/show_bug.cgi?id=123245
Reviewed by Gyuyoung Kim.
After fixed build break on EFL 1.8 at r138326, EFL libraries are changed
Eo typedef and splitted header files which contain version macro.
* wtf/OwnPtrCommon.h: Changed Eo typedef.
* wtf/efl/RefPtrEfl.h: Ditto.
2013-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GObject bindings] Make EventTarget interface introspectable
https://bugs.webkit.org/show_bug.cgi?id=77835
Reviewed by Gustavo Noronha Silva.
Add support for use GRefPtr with GClosure.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
* wtf/gobject/GTypedefs.h:
2013-10-23 Anders Carlsson <andersca@apple.com>
Remove USE(LOCKFREE_THREADSAFEREFCOUNTED)
https://bugs.webkit.org/show_bug.cgi?id=123228
Reviewed by Geoffrey Garen.
All ports support USE(LOCKFREE_THREADSAFEREFCOUNTED) now and taking a lock on every ref/deref seems bad.
* wtf/Atomics.h:
* wtf/ThreadSafeRefCounted.h:
(WTF::ThreadSafeRefCountedBase::ref):
(WTF::ThreadSafeRefCountedBase::refCount):
(WTF::ThreadSafeRefCountedBase::derefBase):
2013-10-23 Anders Carlsson <andersca@apple.com>
Remove HAVE_XPC
https://bugs.webkit.org/show_bug.cgi?id=123226
Reviewed by Dan Bernstein.
HAVE_XPC has been true on Mac since Lion, so remove it.
* wtf/Platform.h:
2013-10-23 Andreas Kling <akling@apple.com>
Make more StringImpl construction functions return PassRef.
<https://webkit.org/b/123203>
Knock out a couple more of the StringImpl construction helpers that
always return a non-null StringImpl.
Reviewed by Antti Koivisto.
2013-10-22 Filip Pizlo <fpizlo@apple.com>
FTL should be able to do some simple inline caches using LLVM patchpoints
https://bugs.webkit.org/show_bug.cgi?id=123164
Reviewed by Mark Hahnenberg.
This needed some better bitvector support, like merging (|=), excluding (&=~),
hashing, and bit counting.
* wtf/BitVector.cpp:
(WTF::BitVector::setSlow):
(WTF::BitVector::excludeSlow):
(WTF::BitVector::bitCountSlow):
(WTF::BitVector::equalsSlowCase):
(WTF::BitVector::hashSlowCase):
(WTF::BitVector::dump):
* wtf/BitVector.h:
(WTF::BitVector::merge):
(WTF::BitVector::exclude):
(WTF::BitVector::bitCount):
(WTF::BitVector::BitVector):
(WTF::BitVector::isEmptyValue):
(WTF::BitVector::isDeletedValue):
(WTF::BitVector::isEmptyOrDeletedValue):
(WTF::BitVector::operator==):
(WTF::BitVector::hash):
(WTF::BitVectorHash::hash):
(WTF::BitVectorHash::equal):
* wtf/HashTraits.h:
(WTF::CustomHashTraits::constructDeletedValue):
(WTF::CustomHashTraits::isDeletedValue):
(WTF::CustomHashTraits::emptyValue):
(WTF::CustomHashTraits::isEmptyValue):
* wtf/StdLibExtras.h:
(WTF::bitCount):
2013-10-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
Clean-up in Atomics.h
https://bugs.webkit.org/show_bug.cgi?id=123207
Reviewed by Anders Carlsson.
Atomics.h has two confusing and bit-rotted ifdefs with comments.
The first about CPU(SPARC64) was rendered obsolete when we switched
from __exchange_and_add to __sync_add_and_fetch.
The second was caused by a wrong definition that apparently only
caused trouble on GCC.
* wtf/Atomics.h:
2013-10-22 Andreas Kling <akling@apple.com>
StringImpl::lower() should return a PassRef.
<https://webkit.org/b/123190>
Test the waters and hack enough of StringImpl to be able to return
a PassRef<StringImpl> from lower().
Also gave String a constructor that takes a PassRef<StringImpl>.
Reviewed by Antti Koivisto.
2013-10-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r157835.
http://trac.webkit.org/changeset/157835
https://bugs.webkit.org/show_bug.cgi?id=123192
broke 32-bit builds (Requested by smfr on #webkit).
* wtf/MediaTime.cpp:
(WTF::signum):
* wtf/MediaTime.h:
2013-10-22 Jer Noble <jer.noble@apple.com>
[WTF] Add a multiplication operator (and a few others) to MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123137
Reviewed by Eric Carlson.
Add a multiplication operator and an inequality operator to the
MediaTime class for use by MSE.
* wtf/MediaTime.cpp:
(WTF::signum): Moved to top of file.
(WTF::MediaTime::operator*): Added.
(WTF::MediaTime::operator!=): Added.
* wtf/MediaTime.h:
(WTF::operator*): Added non-class version of operator*.
2013-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Make TYPE_CASTS_BASE more flexible
https://bugs.webkit.org/show_bug.cgi?id=122951
Reviewed by Andreas Kling.
TYPE_CASTS_BASE is being used by node|element type casts. However, it is difficult
to be used by other type casts. For instance, CSSValue, Accessibility and so on.
This patch modifies TYPE_CASTS_BASE which can support other type casts.
Besides TYPE_CASTS_BASE body is moved from node.h to Assertions.h.
* wtf/Assertions.h:
2013-10-20 Filip Pizlo <fpizlo@apple.com>
StructureStubInfo's usedRegisters set should be able to track all registers, not just the ones that our JIT's view as temporaries
https://bugs.webkit.org/show_bug.cgi?id=123076
Reviewed by Sam Weinig.
Teach BitVector how to efficiently merge (i.e. bitvector |=).
* wtf/BitVector.cpp:
(WTF::BitVector::mergeSlow):
* wtf/BitVector.h:
(WTF::BitVector::merge):
(WTF::BitVector::cleanseInlineBits):
2013-10-19 Jer Noble <jer.noble@apple.com>
Unreviewed roll out of r157695; broke Mac builds.
* wtf/FeatureDefines.h:
2013-10-07 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Enable MediaSource on the Mac
https://bugs.webkit.org/show_bug.cgi?id=122484
Reviewed by Darin Adler.
Enable ENABLE_MEDIA_SOURCE.
* wtf/FeatureDefines.h:
2013-10-19 Andreas Kling <akling@apple.com>
RefPtr::releaseNonNull() incorrectly increments the refcount.
<https://webkit.org/b/123063>
Make releaseNonNull() use adoptRef(T&), mirroring release().
Reviewed by Anders Carlsson.
2013-10-18 Andreas Kling <akling@apple.com>
Start passing RenderStyle around with PassRef.
<https://webkit.org/b/123051>
Added some new PassRef tricks to make this patch possible.
Reviewed by Darin Adler.
* wtf/PassRef.h:
(WTF::PassRef::get):
Added a get() helper to facilitate writing functions that
construct a new object and call some functions on it before
returning it.
(WTF::PassRef::dropRef):
This will deref() the referenced object and mark the PassRef
as "passed." This is used in code paths where the PassRef is
going to go out of scope with nobody to take it over.
(WTF::PassRef::leakRef):
Renamed takeReference() to leakRef() and made it public so
we don't have to awkwardly sink the PassRef into a Ref for
e.g static locals.
* wtf/RefPtr.h:
(WTF::RefPtr::releaseNonNull):
Added RefPtr::releaseNonNull() for a convenient way of creating
a PassRef<T> from a RefPtr<T>. This function may only be called
if the RefPtr is known to be non-null.
2013-10-18 Filip Pizlo <fpizlo@apple.com>
A CodeBlock's StructureStubInfos shouldn't be in a Vector that we search using code origins and machine code PCs
https://bugs.webkit.org/show_bug.cgi?id=122940
Reviewed by Oliver Hunt.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/BagToHashMap.h: Added.
(WTF::toHashMap):
* wtf/CMakeLists.txt:
2013-10-18 Anders Carlsson <andersca@apple.com>
Remove spaces between template angle brackets
https://bugs.webkit.org/show_bug.cgi?id=123040
Reviewed by Andreas Kling.
* wtf/AVLTree.h:
* wtf/CheckedArithmetic.h:
* wtf/Compression.h:
* wtf/Functional.h:
(WTF::R):
* wtf/HashFunctions.h:
* wtf/HashIterators.h:
* wtf/HashSet.h:
(WTF::::contains):
* wtf/ListHashSet.h:
(WTF::::contains):
* wtf/RefCountedLeakCounter.cpp:
* wtf/RetainPtr.h:
* wtf/SentinelLinkedList.h:
(WTF::::remove):
* wtf/SizeLimits.cpp:
* wtf/StreamBuffer.h:
* wtf/Vector.h:
* wtf/VectorTraits.h:
* wtf/WeakPtr.h:
(WTF::WeakReference::create):
(WTF::WeakReference::createUnbound):
(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtrFactory::WeakPtrFactory):
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
(WTF::findString):
* wtf/text/StringConcatenate.h:
* wtf/text/StringImpl.h:
* wtf/text/StringOperators.h:
(WTF::operator+):
2013-10-18 Brendan Long <b.long@cablelabs.com>
[GStreamer][GTK] Add GRefPtr::outPtr()
https://bugs.webkit.org/show_bug.cgi?id=122996
Reviewed by Philippe Normand.
* wtf/gobject/GRefPtr.h:
(WTF::GRefPtr::outPtr): Added.
2013-10-17 Geoffrey Garen <ggaren@apple.com>
Tidied up the Vector<T> move constructor
https://bugs.webkit.org/show_bug.cgi?id=122998
Reviewed by Anders Carlsson.
* wtf/Vector.h:
(WTF::::Vector): Don't call swap() "weird". It's the way most std types
implement move constructors.
Do inline this function, so the compiler can optimize away a logical
move into a physical no-op.
2013-10-16 Filip Pizlo <fpizlo@apple.com>
Introduce WTF::Bag and start using it for InlineCallFrameSet
https://bugs.webkit.org/show_bug.cgi?id=122941
Reviewed by Geoffrey Garen.
Introduce WTF::Bag, which is basically an allocation pool. No POD restrictions. Does one
malloc per entry. No need to shrink afterwards.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/Bag.h: Added.
(WTF::Bag::Bag):
(WTF::Bag::~Bag):
(WTF::Bag::add):
(WTF::Bag::iterator::iterator):
(WTF::Bag::iterator::operator!):
(WTF::Bag::iterator::operator*):
(WTF::Bag::iterator::operator++):
(WTF::Bag::iterator::operator==):
(WTF::Bag::begin):
(WTF::Bag::end):
(WTF::Bag::isEmpty):
* wtf/CMakeLists.txt:
2013-10-17 Andreas Kling <akling@apple.com>
Make it possible to assign a PassRef to a RefPtr.
<https://webkit.org/b/122943>
We have to use std::move when constructing a RefPtr from a PassRef
since there is no copy constructor for the latter.
Reviewed by Antti Koivisto.
2013-10-16 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix attempt on EFL port after r157520 and r157523
* wtf/PassRef.h: includes <utility>
2013-10-16 Darin Adler <darin@apple.com>
Add PassRef and createRefCounted so we can improve creation of RefCounted objects
https://bugs.webkit.org/show_bug.cgi?id=122904
Reviewed by Anders Carlsson.
* GNUmakefile.list.am: Added PassRef.h.
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/Forward.h: Added PassRef. Also re-sorted and un-indented to match what
the style-checking script expects.
* wtf/PassRef.h: Added. Includes the createRefCounted function template, which
is analogous to make_unique, but is for reference counted objects, and also
assumes that new will never return null. Also includes an overload of adoptRef
that takes a reference rather than a pointer.
* wtf/PassRefPtr.h: Include "PassRef.h" so we can share the adopted function.
Got rid of declarations that duplicate ones in there.
(WTF::refIfNotNull): Use nullptr.
(WTF::derefIfNotNull): Use nullptr.
(WTF::PassRefPtr::PassRefPtr): Use nullptr. Added an overload that takes a PassRef.
(WTF::PassRefPtr::operator UnspecifiedBoolType): Use nullptr.
(WTF::PassRefPtr::operator=): Made this deleted instead of compile time assertion.
(WTF::PassRefPtr::PassRefPtr): Made adopting constructor use an adopt tag instead
of an unused boolean.
(WTF::PassRefPtr::leakRef): Use nullptr.
(WTF::adoptRef): Use the adopt tag.
* wtf/Ref.h: Use Noncopyable instead of rolling our own.
(WTF::Ref::Ref): Add an overload that takes a PassRef.
(WTF::Ref::operator=): Ditto.
* wtf/RefPtr.h: Removed unneeded forward declaration of PassRefPtr.
(WTF::RefPtr::RefPtr): Use nullptr. Added overload that takes a PassRef.
(WTF::RefPtr::release): Use nullptr.
(WTF::RefPtr::operator UnspecifiedBoolType): Use nullptr.
(WTF::RefPtr::operator=): Added overload that takes a PassRef.
(WTF::RefPtr::clear): Use nullptr.
* wtf/StdLibExtras.h: Added inline keyword to isPointerTypeAlignmentOkay,
reinterpret_cast_ptr, and make_unique. Seems like a simple oversight that these
were missing before.
2013-10-15 Dean Jackson <dino@apple.com>
Add ENABLE_WEB_ANIMATIONS flag
https://bugs.webkit.org/show_bug.cgi?id=122871
Reviewed by Tim Horton.
Eventually might be http://dev.w3.org/fxtf/web-animations/
but this is just engine-internal work at the moment.
* wtf/FeatureDefines.h:
2013-10-15 Daniel Bates <dabates@apple.com>
[iOS] Upstream JavaScriptCore support for ARM64
https://bugs.webkit.org/show_bug.cgi?id=122762
Reviewed by Oliver Hunt.
* Configurations/Base.xcconfig:
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
(WTF::armV7_dmb):
* wtf/FastMalloc.cpp:
* wtf/Platform.h:
* wtf/dtoa.cpp:
* wtf/dtoa/utils.h:
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
* wtf/text/StringImpl.h:
2013-10-14 Zan Dobersek <zdobersek@igalia.com>
Static assertions in WTF::adoptPtr should point to using adoptRef for ref-counted objects
https://bugs.webkit.org/show_bug.cgi?id=122745
Reviewed by Anders Carlsson.
* wtf/PassOwnPtr.h:
(WTF::adoptPtr): When the object's type is convertible to the RefCountedBase or ThreadSafeRefCountedBase type,
the static assertion should note that adoptRef should be used instead.
2013-10-14 Anders Carlsson <andersca@apple.com>
WebKit Nightlies broken by r157374
https://bugs.webkit.org/show_bug.cgi?id=122736
Reviewed by Andreas Kling.
Add back a callOnMainThread overload that Safari is using.
* wtf/MainThread.cpp:
(WTF::callOnMainThread):
* wtf/MainThread.h:
2013-10-13 Darin Adler <darin@apple.com>
Deprecate or remove deleteAllValues functions; there are only a few call sites left
https://bugs.webkit.org/show_bug.cgi?id=122738
Reviewed by Anders Carlsson.
* wtf/Deque.h: Deleted deleteAllValues.
* wtf/HashMap.h: Ditto.
* wtf/HashSet.h: Ditto.
* wtf/ListHashSet.h: Ditto.
* wtf/Vector.h: Renamed deleteAllValues to deprecatedDeleteAllValues.
== Rolled over to ChangeLog-2013-10-13 ==