blob: c39cf2204ec8aa42d3555730f7b0f165aadd0c6a [file] [log] [blame]
2013-05-15 Nico Weber <thakis@chromium.org>
WebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions.
https://bugs.webkit.org/show_bug.cgi?id=116157
Reviewed by Anders Carlsson.
Also remove a gcc3.2 workaround.
Merges parts of these two commits by the talented Nico Weber:
https://chromium.googlesource.com/chromium/blink/+/3677e2f47348daeff405a40b6f90fbdf0654c2f5
https://chromium.googlesource.com/chromium/blink/+/0fcd96c448dc30be1416dcc15713c53710c1a312
* wtf/Alignment.h:
(WTF):
* wtf/Assertions.h:
* wtf/Atomics.h:
(WTF):
* wtf/Compiler.h:
* wtf/DateMath.cpp:
(WTF::getLocalTime):
* wtf/MathExtras.h:
* wtf/RefCountedLeakCounter.h:
(RefCountedLeakCounter):
* wtf/StaticConstructors.h:
2013-05-15 Patrick Gansterer <paroga@webkit.org>
Consolidate lists in WTF CMake files
https://bugs.webkit.org/show_bug.cgi?id=116142
Reviewed by Martin Robinson.
Move common files into the CMakeLists.txt to avoid duplicating the list of files.
Also rebase the recently added GTK files to match the other CMake ports, since
the submitted patch was based on an older version of the source tree.
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformWinCE.cmake:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431
Reviewed by Darin Adler.
* wtf/Platform.h:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Use requestAnimationFrame for animations
https://bugs.webkit.org/show_bug.cgi?id=115896
Reviewed by Rob Buis.
* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER and
WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR for BlackBerry
port.
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Implement platform strategies
https://bugs.webkit.org/show_bug.cgi?id=112162
Reviewed by Rob Buis.
* wtf/Platform.h: Add BlackBerry platform to the list of platforms
using platform strategies.
2013-05-13 Benjamin Poulain <benjamin@webkit.org>
Improve stringProtoFuncLastIndexOf for the prefix case
https://bugs.webkit.org/show_bug.cgi?id=115952
Reviewed by Geoffrey Garen.
Add an optimized version of StringImpl::startsWith() for JavaScriptCore.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::startsWith):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::startsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):
2013-05-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix Qt Linux MIPS32R2 build after r149879.
Bring back GLIB_CHECK_VERSION for GBytes since Qt Linux MIPS32R2
depends on glib 2.24.2.
* wtf/gobject/GRefPtr.cpp:
(_GBytes):
(WTF::refGPtr):
(WTF::derefGPtr):
2013-05-13 Anders Carlsson <andersca@apple.com>
Remove UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116029
Reviewed by Andreas Kling.
Remove UnusedParam.h, it's empty now.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/UnusedParam.h: Removed.
2013-05-13 Zalan Bujtas <zalan@apple.com>
WebProcess consuming very high CPU on linkedin.com
https://bugs.webkit.org/show_bug.cgi?id=115601
Reviewed by Andreas Kling.
Disable WEB_TIMING_MINIMAL.
Turn off window.performance and performance.now(). Some JS frameworks expect
additional Web Timing APIs, when performance.now() is available.
* wtf/FeatureDefines.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* wtf/Atomics.h:
* wtf/BoundsCheckedPointer.h:
* wtf/DateMath.h:
* wtf/FastMalloc.cpp:
* wtf/NumberOfCores.cpp:
* wtf/OSAllocator.h:
* wtf/OSAllocatorPosix.cpp:
* wtf/PageAllocation.h:
* wtf/RefCounted.h:
* wtf/TCSystemAlloc.cpp:
* wtf/ThreadingPthreads.cpp:
* wtf/Vector.h:
* wtf/dtoa/cached-powers.cc:
* wtf/dtoa/fixed-dtoa.cc:
2013-05-12 Anders Carlsson <andersca@apple.com>
Move UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=115997
Reviewed by Benjamin Poulain.
UnusedParam.h predates Compiler.h and the macros defined there should just go into Compiler.h
* wtf/Compiler.h:
(unusedParam):
* wtf/UnusedParam.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989
Reviewed by Beth Dakin.
Complex.h contains a typedef and a single function (that already has an equivalent in the STL).
The header is used by three files in WebCore, so just use std::complex<double> and std::polar directly.
* GNUmakefile.list.am:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Complex.h: Removed.
2013-05-11 Martin Robinson <mrobinson@igalia.com>
[GTK] Add a basic cmake build for WTF and JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=115967
Reviewed by Laszlo Gombos.
* wtf/PlatformGTK.cmake: Added.
2013-05-11 Martin Robinson <mrobinson@igalia.com>
Move defines to platform
[GTK] Move defines that will never be configured to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=115965
Reviewed by Andreas Kling.
* wtf/Platform.h: Add new defines that were previously in the autoconf header.
2013-05-12 Anders Carlsson <andersca@apple.com>
Simplify AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=115986
Reviewed by Andreas Kling.
Remove the ability to cycle an AutodrainedPool, as well as the iteration count.
Creating and draining pools is fast enough now that we don't need to try to be clever about it.
* wtf/AutodrainedPool.h:
(AutodrainedPool):
(WTF::AutodrainedPool::AutodrainedPool):
* wtf/AutodrainedPoolMac.mm:
(WTF::AutodrainedPool::AutodrainedPool):
2013-05-12 Anders Carlsson <andersca@apple.com>
Move RemoteMemoryReader into FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=115985
Reviewed by Andreas Kling.
RemoteMemoryReader is only used in FastMalloc.cpp, and even had one of its member functions
implemented there, so move the entire class template there and remove MallocZoneSupport.h.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
(WTF):
(PageHeapAllocator):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h: Removed.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove USE(OS_RANDOMNESS)
https://bugs.webkit.org/show_bug.cgi?id=108095
Reviewed by Darin Adler.
Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
ports.
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
* wtf/Platform.h:
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904
Reviewed by Martin Robinson.
* wtf/gobject/GRefPtr.cpp:
2013-05-09 Darin Adler <darin@apple.com>
RenderQuote has giant function for language to quotes map
https://bugs.webkit.org/show_bug.cgi?id=115807
Reviewed by Anders Carlsson.
* wtf/unicode/CharacterNames.h: Added a couple of character names.
2013-05-08 Michael Saboff <msaboff@apple.com>
JSC: There should be a disassembler for ARM Thumb 2
https://bugs.webkit.org/show_bug.cgi?id=115827
Reviewed by Filip Pizlo.
Added a new disassembler for ARMv7 Thumb2 instructions for use by the JSC debugging
and profiling code. Enabled the disassembler for IOS bulds.
* wtf/Platform.h:
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Simplify RetainPtrObjectHashTraits
https://bugs.webkit.org/show_bug.cgi?id=115822
Reviewed by Benjamin Poulain.
RetainPtrObjectHashTraits is inherited from SimpleClassHashTraits
instead of GenericHashTraits re-using more shared functionality.
* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHashTraits::emptyValue):
2013-05-08 Anders Carlsson <andersca@apple.com>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115823
Reviewed by Geoffrey Garen.
static_assert in adoptCF that the object passed in is not an Objective-C object.
* wtf/RetainPtr.h:
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove RetainPtr::adoptNS and RetainPtr::adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115817
Reviewed by Jessie Berlin.
These functions are now unused so remove them. The preferred way to create a RetainPtr with an
adopted reference is to use the adoptNS/adoptCF free functions.
Rewrite the move assignment operators to just call CFRelease explicitly.
* wtf/RetainPtr.h:
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove ThreadingNone.cpp
Rubber-stamped by Beth Dakin.
ThreadingNone.cpp is empty and not used anywhere.
* wtf/ThreadingNone.cpp: Removed.
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove HashMap::deleteAllKeys
https://bugs.webkit.org/show_bug.cgi?id=115806
Reviewed by Brent Fulgham.
This function was not used anywhere so let's get rid of it.
* wtf/HashMap.h:
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Inband text tracks are not in track menu on Lion
https://bugs.webkit.org/show_bug.cgi?id=115740
Reviewed by Dean Jackson.
* wtf/Platform.h: AVFOUNDATION_TEXT_TRACK_SUPPORT -> AVFOUNDATION_MEDIA_SELECTION_GROUP
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::peek should consider empty value
https://bugs.webkit.org/show_bug.cgi?id=115799
Reviewed by Darin Adler.
HashTraits<RefPtr<P> >::peek() should consider passing of empty value which is
raw pointer equal to '0', and return it right away instead of converting it to RefPtr
and invoking get().
* wtf/HashTraits.h:
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Avoid unnecessary arguments copying inside GenericHashTraits methods
https://bugs.webkit.org/show_bug.cgi?id=115733
Reviewed by Darin Adler.
Before the change both WTF::GenericHashTraits::passOut and WTF::GenericHashTraits::passOut
used to return the given argument always by value and that caused implicit extra
copying of the argument. It was OK as long as argument type T was POD, as compiler
could optimize it, but in case T was a class having non-trivial copy constructor the
extra copying of the argument could not have been obviated.
The proposed solution is to provide overloaded functions that accept non-temporary
values and return them by reference thus avoiding extra copying.
The proposed solution made an impact on the size of libjavascriptcore_efl.so (EFL
release build): the size decreased from 6554992 bytes to 6554560 bytes.
* wtf/HashTraits.h:
(WTF::GenericHashTraits::passOut):
(WTF::GenericHashTraits::peek):
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove AlwaysInline.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115727
Reviewed by Brent Fulgham.
The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
to keep AlwaysInline.h around anymore.
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/AlwaysInline.h: Removed.
* wtf/BloomFilter.h:
* wtf/FastMalloc.cpp:
* wtf/PassRefPtr.h:
* wtf/dtoa.cpp:
* wtf/gobject/GRefPtr.h:
2013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
https://bugs.webkit.org/show_bug.cgi?id=115646
Reviewed by Darin Adler.
HashTraits<RefPtr<P> >::PeekType should be raw pointer so that we
can obviate multiple RefPtr copying when invoking HashMap<.., RefPtr>::get()
method.
* wtf/HashTraits.h:
2013-05-06 Cosmin Truta <ctruta@blackberry.com>
Cherry-pick fixes to bignum from upstream
https://bugs.webkit.org/show_bug.cgi?id=115658
Reviewed by Darin Adler.
Cherry-picked the following change lists:
Fix bug in bignum implementation
http://codereview.chromium.org/13454019
Make VS2005 project files compile without errors
http://codereview.chromium.org/6286135
* wtf/dtoa/bignum.cc:
2013-05-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Change HashTraits<RefPtr<P> >::PassOutType to PassRefPtr for better performance
https://bugs.webkit.org/show_bug.cgi?id=115410
Reviewed by Darin Adler.
The type HashTraits<RefPtr<P> >::PassOutType is PassRefPtr now to
avoid extra ref/unrefing on return from HashMap methods that transfer
ownership, such as take.
* wtf/HashTable.h:
(WTF::IdentityHashTranslator::equal):
* wtf/HashTraits.h:
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove Vector::prepend
https://bugs.webkit.org/show_bug.cgi?id=115618
Reviewed by Geoffrey Garen.
Given the performance characteristics of prepending something to a Vector, not having prepend
will hopefully make developers think about whether prepending is necessary at all. For example,
the functions in HexNumber.h were easily converted to using Vector::append and then Vector::reverse.
* wtf/HexNumber.h:
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
* wtf/Vector.h:
(Vector):
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove the Vector::append overload that takes a Vector
https://bugs.webkit.org/show_bug.cgi?id=115535
Reviewed by Andreas Kling.
The Vector::append overload that takes a Vector conflicts with rvalues in C++11, so remove it and
replace calls to it with calls to appendVector.
* wtf/Vector.h:
(Vector):
2013-05-04 Andreas Kling <akling@apple.com>
Unreviewed, rolling out r149563.
http://trac.webkit.org/changeset/149563
https://bugs.webkit.org/show_bug.cgi?id=115587
Broke LLInt build.
* wtf/text/StringImpl.h:
(StringImpl):
2013-05-04 Xan Lopez <xlopez@igalia.com>
No need to declare JSC::LLInt::Data as friend class of WTF::StringImpl
https://bugs.webkit.org/show_bug.cgi?id=115587
Reviewed by Andreas Kling.
No need to declare LLInt::Data as friend class of WTF::StringImpl,
it does not use any private method/data member of the latter.
* wtf/text/StringImpl.h:
(StringImpl):
2013-05-03 Brent Fulgham <bfulgham@webkit.org>
Make ThreadFunctionInvocation fast allocated.
https://bugs.webkit.org/show_bug.cgi?id=115552
Reviewed by Benjamin Poulain.
* wtf/ThreadFunctionInvocation.h:
(ThreadFunctionInvocation): Make Fast-allocated.
2013-05-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove WTF::ListRefPtr class
https://bugs.webkit.org/show_bug.cgi?id=115516
Reviewed by Anders Carlsson.
ListRefPtr was used only by FontFamily class, besides it strongly depended
on FontFamily class semantics which made it non-generic and inappropriate
for being present inside WTF.
This patch removes WTF::ListRefPtr class and moves its the functionality
into FontFamily class.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
(WTF):
* wtf/ListRefPtr.h: Removed.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix.
* WTF.vcxproj/WTF.vcxproj: Use WinCairo FeatureDefines
* WTF.vcxproj/WTF.vcxproj.filters: Use WinCairo FeatureDefines
* WTF.vcxproj/WTFDebugWinCairo.props: Added.
* WTF.vcxproj/WTFReleaseWinCairo.props: Added.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Fix crash in fast/js/create-lots-of-workers.html
https://bugs.webkit.org/show_bug.cgi?id=115130
Reviewed by Tim Horton.
Windows is suffering from mismatched allocation/deallocation
between the system allocator and fastMalloc/fastFree. By turning
off the global switch to fastMalloc, only classes specified to
honor fastMalloc/fastFree are affected, and other memory allocation
and freeing is done with consistent library calls.
* wtf/Platform.h: Deactivate ENABLE_GLOBAL_FASTMALLOC_NEW for
the Windows build.
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Caption menu does not include in-band captions
https://bugs.webkit.org/show_bug.cgi?id=111934
Reviewed by Dean Jackson.
* wtf/Platform.h: Define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT on 10.8 and higher. Added
HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
Make BloomFilter fast allocated.
https://bugs.webkit.org/show_bug.cgi?id=115519
Reviewed by Benjamin Poulain.
* wtf/BloomFilter.h:
(BloomFilter): Make BloomFilter Fast-allocated.
2013-05-01 Michael Saboff <msaboff@apple.com>
FastMalloc.cpp should use system defined page size instead of literal constant
https://bugs.webkit.org/show_bug.cgi?id=115502
Reviewed by Geoffrey Garen.
Updated kPageShift to be PAGE_SHIFT for Mac. Changed kMaxSize to be fixed at 32K.
Updated kNumClasses for 4K and 16K page sizes.
* wtf/FastMalloc.cpp:
kPageShift: Changed this to be PAGE_SHIFT on mac.
2013-05-01 Roger Fong <roger_fong@apple.com>
Set Path in makefile for AppleWin.
* WTF.vcxproj/WTF.make:
2013-05-01 Anders Carlsson <andersca@apple.com>
Add FunctionDispatcher class and make RunLoop derive from it
https://bugs.webkit.org/show_bug.cgi?id=115480
Reviewed by Sam Weinig.
Add FunctionDispatcher files.
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/FunctionDispatcher.cpp: Added.
(WTF::FunctionDispatcher::FunctionDispatcher):
(WTF::FunctionDispatcher::~FunctionDispatcher):
* wtf/FunctionDispatcher.h: Added.
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Win] Fix build after r149416.
https://bugs.webkit.org/show_bug.cgi?id=115474
Reviewed by Anders Carlsson.
* WTF.pro:
* wtf/threads/BinarySemaphore.h:
(BinarySemaphore):
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149416.
* WTF.pro:
2013-04-30 Anders Carlsson <andersca@apple.com>
Remove the WebKit2 BinarySemaphore class
https://bugs.webkit.org/show_bug.cgi?id=115458
Reviewed by Benjamin Poulain.
* wtf/Forward.h:
Add BinarySemaphore forward declaration.
* wtf/threads/BinarySemaphore.h:
Add WTF_EXPORT_PRIVATE to declarations.
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149408.
http://trac.webkit.org/changeset/149408
https://bugs.webkit.org/show_bug.cgi?id=115453
Broke Windows Build (Requested by bfulgham on #webkit).
* wtf/Platform.h:
2013-04-30 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Fix crash in fast/js/create-lots-of-workers.html
https://bugs.webkit.org/show_bug.cgi?id=115130
Reviewed by Tim Horton.
Windows is suffering from mismatched allocation/deallocation
between the system allocator and fastMalloc/fastFree. By turning
off the global switch to fastMalloc, only classes specified to
honor fastMalloc/fastFree are affected, and other memory allocation
and freeing is done with consistent library calls.
* wtf/Platform.h: Deactivate ENABLE_GLOBAL_FASTMALLOC_NEW for
the Windows build.
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149349 and r149354.
http://trac.webkit.org/changeset/149349
http://trac.webkit.org/changeset/149354
https://bugs.webkit.org/show_bug.cgi?id=115444
The Thumb version of compileSoftModulo make invalid use of
registers (Requested by benjaminp on #webkit).
* wtf/Platform.h:
2013-04-30 Darin Adler <darin@apple.com>
[Mac] Make adoptNS faster on platforms without garbage collection by skipping a CFRetain/NSRelease pair
https://bugs.webkit.org/show_bug.cgi?id=115424
Reviewed by Eric Carlson.
* wtf/RetainPtr.h:
(WTF::adoptNSReference): When OBJC_NO_GC is set, make this an empty function, because in that case
CFRetain and -[NSObject retain] are the same thing and there is no need to call CFRetain and
-[NSObject release] to adopt an Objective-C object.
2013-04-30 Anders Carlsson <andersca@apple.com>
String::isolatedCopy() can avoid a copy if the original is a temporary
https://bugs.webkit.org/show_bug.cgi?id=115425
Reviewed by Darin Adler.
* wtf/Compiler.h:
Add WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS define.
* wtf/text/WTFString.cpp:
(WTF::String::isolatedCopy):
* wtf/text/WTFString.h:
If COMPILER_SUPPORTS(CXX_REFERENCE_QUALIFIED_FUNCTIONS) is true, add two overloads of String::isolatedCopy().
One is used if *this is an lvalue, and one is used if *this is an rvalue. In the latter case, we know that the original
String object is a temporary and will be going away, so if it's safe to send it to another thread (if it's not an AtomicString,
and if it's refcount is 1), then we can just steal the StringImpl from the original and avoid a copy altogether.
2013-04-30 Zalan Bujtas <zalan@apple.com>
Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
https://bugs.webkit.org/show_bug.cgi?id=111244
Reviewed by David Kilzer.
Enable performance.now() as a minimal subset of Web Timing API.
It returns DOMHighResTimeStamp, a monotonically increasing value representing the
number of milliseconds from the start of the navigation of the current document.
JS libraries use this API to check against the requestAnimationFrame() timestamp.
* wtf/FeatureDefines.h:
2013-04-29 Cosmin Truta <ctruta@blackberry.com>
[ARM] Expand the use of integer division
https://bugs.webkit.org/show_bug.cgi?id=115138
Reviewed by Benjamin Poulain.
* wtf/Platform.h: Added ENABLE_ARM_INTEGER_DIV.
2013-04-29 Anders Carlsson <andersca@apple.com>
It should be an error to use adoptPtr with RefCounted subclasses
https://bugs.webkit.org/show_bug.cgi?id=115389
Reviewed by Benjamin Poulain.
* wtf/PassOwnPtr.h:
(WTF::adoptPtr):
Add COMPILE_ASSERTs.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add workaround for UNUSED_PARAM()
https://bugs.webkit.org/show_bug.cgi?id=115350
Reviewed by Andreas Kling.
r147882 added an workaround for the MSVC compiler on Windows CE.
Extend this workaround to whole MSVC compiler, since the same
problem occurs with the Visual Studio 10 compiler too.
* wtf/UnusedParam.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add WTF_USE_IMLANG_FONT_LINK2
https://bugs.webkit.org/show_bug.cgi?id=115198
Reviewed by Andreas Kling.
* wtf/Platform.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Define USE(ICU_UNICODE) if USE(WCHAR_UNICODE) is false
https://bugs.webkit.org/show_bug.cgi?id=115349
Reviewed by Andreas Kling.
Since we support only ICU and WCHAR as Unicode backend (ICU is the default)
automatically use ICU if WCHAR was not selected via compiler defines.
* wtf/Platform.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r148888 and r149097
https://bugs.webkit.org/show_bug.cgi?id=115168
Reviewed by Anders Carlsson.
When using compiler intrinsics on Windows CE the compiler complains
about wrong linkage specification of replaced CRT functions defined
in math.h. This is because the compiler has intrinsics for this
functions defined, and requires them to have extern "C" linkage.
* wtf/MathExtras.h:
(wtf_atan2): Added extern "C" to function signature.
(wtf_fmod): Ditto.
(wtf_pow): Ditto.
2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file to compilation.
2013-04-27 Darin Adler <darin@apple.com>
Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
https://bugs.webkit.org/show_bug.cgi?id=115307
Reviewed by Geoffrey Garen.
* wtf/RunLoopTimerCF.cpp:
(WTF::RunLoopTimerBase::start):
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair):
* wtf/SchedulePairMac.mm:
(WTF::SchedulePair::SchedulePair):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
Use adoptCF free function.
2013-04-26 Geoffrey Garen <ggaren@apple.com>
Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057
Reviewed by Filip Pizlo.
Added a helper constructor for TriState so clients can make one without
branching or making assumptions about the integer values of TriStates.
* wtf/TriState.h:
(WTF::triState):
(WTF):
2013-04-26 Roger Fong <roger_fong@apple.com>
Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders.
Make the DebugSuffix configuration use _debug dependencies.
* WTF.vcxproj/WTF.make:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFDebug.props:
* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGeneratedCommon.props:
* WTF.vcxproj/WTFGeneratedDebug.props:
* WTF.vcxproj/WTFGeneratedProduction.props:
* WTF.vcxproj/WTFGeneratedRelease.props:
* WTF.vcxproj/WTFProduction.props:
* WTF.vcxproj/WTFRelease.props:
* WTF.vcxproj/build-generated-files.sh:
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
2013-04-26 Martin Robinson <mrobinson@igalia.com>
Remove the remaining Skia #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=114886
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
2013-04-26 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Add move semantics to RefPtr
https://bugs.webkit.org/show_bug.cgi?id=115033
Reviewed by Anders Carlsson.
Add move constructors and move assignment operators to RefPtr when
COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES).
This obviates unnecessary reffing/ureffing when RefPtr is created
or assigned from rvalue references.
* wtf/RefPtr.h:
(RefPtr):
(WTF::RefPtr::RefPtr):
(WTF::RefPtr::operator=):
2013-04-26 Andreas Kling <akling@apple.com>
Remove wxWebKit from WTF.
<http://webkit.org/b/115249>
Reviewed by Antti Koivisto.
* wscript: Removed.
* wtf/ArrayBufferView.h:
(ArrayBufferView):
* wtf/CurrentTime.cpp:
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/text/WTFString.h:
(String):
* wtf/wx/MainThreadWx.cpp: Removed.
* wtf/wx/StringWx.cpp: Removed.
2013-04-25 Filip Pizlo <fpizlo@apple.com>
Unreviewed, roll out http://trac.webkit.org/changeset/148999
It broke http://kripken.github.io/ammo.js/examples/new/ammo.html
* wtf/TriState.h:
2013-04-25 Oliver Hunt <oliver@apple.com>
Fix 32bit build
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-04-25 Oliver Hunt <oliver@apple.com>
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147
Reviewed by Mark Hahnenberg.
Use getrlimit on darwin to get the stack size for the main thread.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-04-25 Andreas Kling <akling@apple.com>
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
Rubber-stamped by Anders Koivisto.
* wtf/FeatureDefines.h:
2013-04-25 peavo@outlook.com <peavo@outlook.com>
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=115170
Reviewed by Filip Pizlo.
Forward declare function, instead of including intrin.h.
* wtf/Atomics.h:
2013-04-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Use std::move in AtomicString
https://bugs.webkit.org/show_bug.cgi?id=115102
Reviewed by Anders Carlsson.
Use std::move in AtomicString instead of direct casting to rvalue references.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
(WTF::AtomicString::operator=):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r148888.
* wtf/Atomics.h: WinCE version of intrin.h is called cmnintrin.h.
2013-04-24 Roger Fong <roger_fong@apple.com>
Have VS2010 WebKit solution look in WebKit_Libraries/lib32 for dependencies.
* WTF.vcxproj/build-generated-files.sh:
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Use post-branch store for RefCountedBase::derefBase
https://bugs.webkit.org/show_bug.cgi?id=115078
Reviewed by Andreas Kling.
* wtf/RefCounted.h:
(WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.
2013-04-23 Geoffrey Garen <ggaren@apple.com>
Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057
Reviewed by Filip Pizlo.
Added a helper constructor for TriState so clients can make one without
branching or making assumptions about the integer values of TriStates.
* wtf/TriState.h:
(WTF::triState):
(WTF):
2013-04-23 Roger Fong <roger_fong@apple.com>
AppleWin build fix.
* WTF.vcproj/WTF.vcproj:
2013-04-23 Benjamin Poulain <bpoulain@apple.com>
Remove unused code of RefCounted after chromium removal
https://bugs.webkit.org/show_bug.cgi?id=115009
Reviewed by Ryosuke Niwa.
* wtf/RefCounted.h:
(WTF::RefCountedBase::refCount):
(RefCountedBase):
It looks like addressOfCount() is no longer needed.
Also change the type back to unsigned as it make more sense.
2013-04-23 David Kilzer <ddkilzer@apple.com>
RetainPtr.h should compile with -Wshorten-64-to-32
<http://webkit.org/b/115047>
Reviewed by Anders Carlsson.
Fixes the following warning:
RetainPtr.h:318:20: error: implicit conversion loses integer precision: 'CFHashCode' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
return CFHash(o.get());
~~~~~~ ^~~~~~~~~~~~~~~
* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHash::hash): Cast return value of CFHash()
to unsigned. This has no effect on 32-bit architectures, but
takes the lower 32-bits of the CFHashCode (unsigned long) on
64-bit architectures, which is what happens implicitly now.
2013-04-22 Patrick Gansterer <paroga@webkit.org>
[CMake] Move NullPtr.cpp from PlatformWinCE.cmake to CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=114557
Reviewed by Laszlo Gombos.
This file is not specific to Windwos CE. Move it the the general
CMakeLists.txt so other ports can use it to. It does not affect
ports which do not need it, since it contains a preprocessor guard.
* wtf/CMakeLists.txt:
* wtf/PlatformWinCE.cmake:
2013-04-22 Benjamin Poulain <benjamin@webkit.org>
Remove the memory instrumentation code
https://bugs.webkit.org/show_bug.cgi?id=114931
Reviewed by Andreas Kling.
On Mac x86_64, the code removal cause the binary to be
9224 bytes smaller.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/ListHashSet.h:
(ListHashSet):
(ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
* wtf/MemoryInstrumentation.cpp: Removed.
* wtf/MemoryInstrumentation.h: Removed.
* wtf/MemoryInstrumentationArrayBufferView.h: Removed.
* wtf/MemoryInstrumentationHashCountedSet.h: Removed.
* wtf/MemoryInstrumentationHashMap.h: Removed.
* wtf/MemoryInstrumentationHashSet.h: Removed.
* wtf/MemoryInstrumentationListHashSet.h: Removed.
* wtf/MemoryInstrumentationSequence.h: Removed.
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/MemoryInstrumentationVector.h: Removed.
* wtf/MemoryObjectInfo.h: Removed.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::isASCIILiteral):
* wtf/text/WTFString.h:
2013-04-22 David Kilzer <ddkilzer@apple.com>
StringImpl.h should compile with -Wshorten-64-to-32
<http://webkit.org/b/114970>
Reviewed by Darin Adler.
Fixes the following warnings with -Wshorten-64-to-32:
StringImpl.h:317:25: error: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
unsigned hash = reinterpret_cast<uintptr_t>(this);
~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl): Add static_cast<uint32_t>() to
formalize taking the lower 32-bits of the pointer value on
64-bit architectures.
2013-04-22 Andreas Kling <akling@apple.com>
Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
<http://webkit.org/b/97268>
<rdar://problem/12376519>
Reviewed by Sam Weinig.
Shrink Vector by 8 bytes on 64-bit by using 32-bit capacity and size.
Vector now inherits from VectorBuffer instead of having a VectorBuffer member;
this is necessary for m_size to fall into the padding after the base class members.
The WTF::Vector API still uses size_t.
Based on Blink r148313 by <cevans@chromium.org>.
* wtf/SizeLimits.cpp:
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(VectorBufferBase):
(WTF::VectorBuffer::shouldReallocateBuffer):
(Vector):
(WTF::Vector::Vector):
(WTF::Vector::capacity):
(WTF::Vector::at):
(WTF::Vector::data):
(WTF::Vector::swap):
(WTF::::Vector):
(WTF::::reserveCapacity):
(WTF::::tryReserveCapacity):
(WTF::::reserveInitialCapacity):
(WTF::::shrinkCapacity):
(WTF::::releaseBuffer):
2013-04-21 Filip Pizlo <fpizlo@apple.com>
Memory barrier support should also ensure that we always do a compiler fence
https://bugs.webkit.org/show_bug.cgi?id=114934
Reviewed by Michael Saboff.
This is a cherry-pick merge of the WTF part of r148836 from the dfgFourthTier
branch. It fixes a memory ordering bug that is likely asymptomatic, but
nonetheless real: TCSpinLock expects that using a memoryBarrierBeforeUnlock()
prior to setting lockword_ to 0 will ensure that the assignment to lockword_
won't get floated above any of the stores in the critical section. While that
memory barrier does indeed do the right thing on ARM, it doesn't do the right
thing on other architectures: it turns into empty code that the compiler blows
away, which is fine for the hardware since X86 won't reorder that store - but
it's not fine for the compiler, which may still do its own reorderings.
The WTF part of r148836 fixes this by using a compiler fence: an empty asm
volatile block that is marked as clobbering memory.
Instead of doing a separate surgical fix in trunk, I decided to merge the
whole WTF change over, to make merging easier in the future.
Performance testing of this change in dfgFourthTier showed no regression.
* wtf/Atomics.h:
(WTF::compilerFence):
(WTF::armV7_dmb):
(WTF::armV7_dmb_st):
(WTF::loadLoadFence):
(WTF::loadStoreFence):
(WTF::storeLoadFence):
(WTF::storeStoreFence):
(WTF::memoryBarrierAfterLock):
(WTF::memoryBarrierBeforeUnlock):
(WTF::x86_mfence):
2013-04-22 David Kilzer <ddkilzer@apple.com>
WTF::AtomicString::find() should take unsigned 'start' argument
<http://webkit.org/b/114958>
Reviewed by Darin Adler.
Fixes the following warnings with -Wshorten-64-to-32:
AtomicString.h:113:76: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
size_t find(UChar c, size_t start = 0) const { return m_string.find(c, start); }
~~~~~~~~ ^~~~~
AtomicString.h:115:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
{ return m_string.find(s, start, caseSentitive); }
~~~~~~~~ ^~~~~
AtomicString.h:117:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
{ return m_string.find(s, start, caseSentitive); }
~~~~~~~~ ^~~~~
* wtf/text/AtomicString.h:
(WTF::AtomicString::find): Change type of 'start' argument from
size_t to unsigned.
2013-04-21 Benjamin Poulain <benjamin@webkit.org>
Improve StringImpl code density for older ARM hardware
https://bugs.webkit.org/show_bug.cgi?id=114898
Reviewed by Geoffrey Garen.
Reduce the number of instructions needed for StringImpl::deref
on older ARM hardware.
The extra indirection should have a negligible impact on x86_64.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::destroy):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::deref):
2013-04-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
LLint should be able to use x87 instead of SSE for floating pointer
https://bugs.webkit.org/show_bug.cgi?id=112239
Reviewed by Filip Pizlo.
Disable GTK workaround now that LLInt does not require SSE2.
* wtf/Platform.h:
2013-04-19 Roger Fong <roger_fong@apple.com>
Remove uses of WebKit_Source from AppleWin build in WTF.
* WTF.vcxproj/WTF.make:
* WTF.vcxproj/copy-files.cmd:
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
(react_to_webkit1_interface_changes):
2013-04-19 Benjamin Poulain <benjamin@webkit.org>
Remove the declaration of MemoryObjectInfo from StringImpl
https://bugs.webkit.org/show_bug.cgi?id=114788
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h: The declaration is an other left over from chromium.
2013-04-19 Benjamin Poulain <benjamin@webkit.org>
Make StringImpl::cost const
https://bugs.webkit.org/show_bug.cgi?id=114790
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h:
(WTF::StringImpl::cost):
2013-04-19 Roger Fong <roger_fong@apple.com>
Unreviewed. WebKit_Source is incorrectly set.
* WTF.vcxproj/WTF.make:
2013-04-19 Alberto Garcia <agarcia@igalia.com>
OSAllocatorPosix: fix build warnings about unused parameters in QNX
https://bugs.webkit.org/show_bug.cgi?id=114859
Reviewed by Carlos Garcia Campos.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
2013-04-19 Dan Beam <dbeam@chromium.org>
Remove unmaintained feature REQUEST_AUTOCOMPLETE
https://bugs.webkit.org/show_bug.cgi?id=114846
Reviewed by Kent Tamura.
* wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.
2013-04-18 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Speculative build fix for Qt Mountain Lion Release after r148639.
https://bugs.webkit.org/show_bug.cgi?id=114793
Reviewed by Michael Saboff.
* wtf/CurrentTime.cpp:
2013-04-17 Mark Lam <mark.lam@apple.com>
Added currentCPUTime() and currentCPUTimeMS().
https://bugs.webkit.org/show_bug.cgi?id=114577.
Reviewed by Geoffrey Garen.
The currentCPUTime() implementation came from the old TimeoutChecker.cpp.
* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::currentCPUTimeMS):
* wtf/CurrentTime.h:
2013-04-17 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r148584): WebKit nightly builds don't load any page
https://bugs.webkit.org/show_bug.cgi?id=114752
Reviewed by Anders Carlsson.
We can't use C++ style (//) comments in Platform.h because WebKit2/DerivedSource.make doesn't know
how to strip it to be merged with *.sb.in to generate *.sb files. Specifically, we have:
# Some versions of clang incorrectly strip out // comments in c89 code.
# Use -traditional as a workaround, but only when needed since that causes
# other problems with later versions of clang.
ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
else
TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
endif
* wtf/Platform.h:
2013-04-17 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Remove Include Settings for Pthreads from WTF
https://bugs.webkit.org/show_bug.cgi?id=114694
Reviewed by Ryosuke Niwa.
* WTF.vcproj/WTFCommon.vsprops: Remove pthread search path.
* WTF.vcxproj/WTFCommon.props: Remove pthread search path.
* wtf/FastMalloc.cpp: Guard pthread.h include for non-pthread
builds.
2013-04-16 Oliver Hunt <oliver@apple.com>
Harden FastMalloc against partial pointer overflows
https://bugs.webkit.org/show_bug.cgi?id=114716
Reviewed by Gavin Barraclough.
Bite the bullet and perform object alignment checks on free.
malloc/free micro benchmark shows a regression, but real
benchmarks don't. There's a little code motion in this avoid
taking too much of a performance hit. In addition to the
alignment check we also validate the containing span as
we've already taken the hit of finding it.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-04-16 Sam Weinig <sam@webkit.org>
Fix fallout after r148545.
* wtf/Platform.h:
Move Platform defines that were incorrectly in WebCore, into Platform.h
2013-04-15 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r148488.
http://trac.webkit.org/changeset/148488
https://bugs.webkit.org/show_bug.cgi?id=114660
Roll back in r148462 since it was a false positive. (Requested
by rniwa on #webkit).
* wtf/FastMalloc.cpp:
(WTF):
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD):
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-15 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r148462.
http://trac.webkit.org/changeset/148462
https://bugs.webkit.org/show_bug.cgi?id=114658
Broke Windows builds (Requested by rniwa on #webkit).
* wtf/FastMalloc.cpp:
(WTF):
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD):
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-15 Julien Brianceau <jbrianceau@nds.com>
LLInt SH4 backend implementation
https://bugs.webkit.org/show_bug.cgi?id=112886
Reviewed by Oliver Hunt.
* wtf/Platform.h:
2013-04-15 Patrick Gansterer <paroga@webkit.org>
[CMake] Add WTF_USE_*_UNICODE variables
https://bugs.webkit.org/show_bug.cgi?id=114556
Reviewed by Brent Fulgham.
WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
reduce duplication in the platform specific CMake files.
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:
2013-04-15 Patrick Gansterer <paroga@webkit.org>
[WIN] Remove remaining calls to pthread from WTF
https://bugs.webkit.org/show_bug.cgi?id=114563
Reviewed by Brent Fulgham.
Replace pthread_key_create with threadSpecificKeyCreate and
pthread_setspecific with threadSpecificSet from ThreadSpecific.h.
These functions provide a windows-specific implementation for the pthread functions,
but require that the thread has been created with WTF::createThread(),
which is the case for all threads created within WebKit.
To call this function from fastMalloc we must not call fastMalloc in them.
To fulfill this constraint ThreadSpecificWin will allocated its memory through the
original malloc implementation and use the stack for local and static variables.
Keep the Darwin implementation as it is, since it contains some performance tweaks.
* wtf/FastMalloc.cpp:
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-14 Oliver Hunt <oliver@apple.com>
Try to fix non-apple windows builds
* wtf/Platform.h:
2013-04-14 David Kilzer <ddkilzer@apple.com>
Add EnumClass.h to project files
<http://webkit.org/b/114582>
Rubber-stamped by Dan Bernstein.
* WTF.pro: Add EnumClass.h to project.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
2013-04-12 Oliver Hunt <oliver@apple.com>
Apologies to all, I have no idea what happened to cause this change.
* wtf/Platform.h:
2013-04-12 Oliver Hunt <oliver@apple.com>
[Qt][Win] r148257 broke the build
https://bugs.webkit.org/show_bug.cgi?id=114512
Build fix.
* wtf/Platform.h:
2013-04-11 Oliver Hunt <oliver@apple.com>
Add more type validation to debug builds
https://bugs.webkit.org/show_bug.cgi?id=114478
Reviewed by Mark Hahnenberg.
Add BINDING_VALIDATION flag and make RELEASE_ASSERT use UNLIKELY.
* wtf/Assertions.h:
* wtf/Platform.h:
2013-04-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
[WTF] Get rid of truncated thread name warnings for non-Windows platforms
https://bugs.webkit.org/show_bug.cgi?id=114266
Reviewed by Ryosuke Niwa.
Hide the annoying message from ports that are not really interested
about it.
* wtf/Threading.cpp:
(WTF::createThread):
2013-04-10 Benjamin Poulain <bpoulain@apple.com>
Mass remove all the empty directories
Rubberstamped by Ryosuke Niwa.
* wtf/qt/compat: Removed.
* wtf/unicode/glib: Removed.
* wtf/unicode/qt4: Removed.
* wtf/unicode/wince: Removed.
2013-04-08 Anders Carlsson <andersca@apple.com>
Remove unneeded headers from FrameLoader.h
https://bugs.webkit.org/show_bug.cgi?id=114223
Reviewed by Geoffrey Garen.
* wtf/Forward.h:
Add PrintStream.
* wtf/HashTable.h:
Don't include DataLog.h unless DUMP_HASHTABLE_STATS_PER_TABLE is 1.
2013-04-10 Laszlo Gombos <l.gombos@samsung.com>
Remove ENABLE_3D_PLUGIN
https://bugs.webkit.org/show_bug.cgi?id=108002
Reviewed by Antti Koivisto.
Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
* wtf/FeatureDefines.h:
2013-04-09 Patrick Gansterer <paroga@webkit.org>
[CMake] Remove conditional source file lists in WTF
https://bugs.webkit.org/show_bug.cgi?id=114250
Reviewed by Laszlo Gombos.
Use the #ifdef in the source file instead of conditional adding
files to the list of source files. This allows us to remove the
information of enabled features from CMake in next step.
* wtf/CMakeLists.txt:
2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
Remove WTF.gyp/WTF.gypi
https://bugs.webkit.org/show_bug.cgi?id=114237
Reviewed by Maciej Stachowiak.
* WTF.gyp: Removed.
* WTF.gyp/.gitignore: Removed.
* WTF.gyp/WTF.gyp: Removed.
* WTF.gypi: Removed.
2013-04-08 Benjamin Poulain <benjamin@webkit.org>
Remove HTML Notification
https://bugs.webkit.org/show_bug.cgi?id=114231
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
2013-04-08 Benjamin Poulain <benjamin@webkit.org>
wtf/dtoa/* uses a confusing name to reference its buffers
https://bugs.webkit.org/show_bug.cgi?id=109709
Reviewed by Darin Adler.
The data structure Vector in wtf/dtoa has nothing to do with a traditional
vector, is it just a pointer and the length of the pointed buffer.
Rename it to BufferReference to avoid mistakes.
* wtf/dtoa/bignum-dtoa.cc:
* wtf/dtoa/bignum-dtoa.h:
* wtf/dtoa/bignum.cc:
* wtf/dtoa/bignum.h:
(Bignum):
* wtf/dtoa/double-conversion.cc:
* wtf/dtoa/fast-dtoa.cc:
* wtf/dtoa/fast-dtoa.h:
* wtf/dtoa/fixed-dtoa.cc:
* wtf/dtoa/fixed-dtoa.h:
(double_conversion):
* wtf/dtoa/strtod.cc:
* wtf/dtoa/strtod.h:
(double_conversion):
* wtf/dtoa/utils.h:
(double_conversion):
(WTF::double_conversion::BufferReference::BufferReference):
(WTF::double_conversion::BufferReference::SubBufferReference):
(StringBuilder):
2013-04-08 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] MathExtras: macros defined in math.h conflict with the real functions
https://bugs.webkit.org/show_bug.cgi?id=112683
Reviewed by Darin Adler.
After calls to signbit and friends were prefixed with std:: in
r143232, the BlackBerry port no longer compiles.
The solution is to get rid of the macros defined in math.h and use
the real functions instead.
* wtf/MathExtras.h:
2013-04-08 Max Vujovic <mvujovic@adobe.com>
REGRESSION (r147502): Animations of CA filters broken
https://bugs.webkit.org/show_bug.cgi?id=114067
Reviewed by Dean Jackson.
Revert r147502 [1] because it broke CA filter animations.
[1]: http://trac.webkit.org/changeset/147502
* wtf/Platform.h:
2013-04-08 Andreas Kling <akling@apple.com>
REGRESSION(r147894): Broke WTFReportBacktrace() on Mac.
<http://webkit.org/b/114174>
Reviewed by Anders Carlsson.
An #elif !OS(ANDROID) block was erroneously removed, turn it into an #else instead since
that path will still be taken for OS(DARWIN).
* wtf/Assertions.cpp:
2013-04-08 Oliver Hunt <oliver@apple.com>
Build fix.
Remove unnecessary include of <wtf/Forward.h> from Vector.h
* wtf/Vector.h:
2013-04-08 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed trivial buildfix after r147799.
Add an ifdef guard to ensure Qt uses its own monotonicallyIncreasingTime()
implemenation instead of the GLIB based one.
* wtf/CurrentTime.cpp:
(WTF):
2013-04-07 Benjamin Poulain <benjamin@webkit.org>
Remove the android code from WebKit Template Framework
https://bugs.webkit.org/show_bug.cgi?id=114138
Reviewed by Dirk Schulze.
* wtf/Assertions.cpp:
* wtf/Atomics.h:
* wtf/MathExtras.h:
* wtf/Platform.h:
* wtf/ThreadIdentifierDataPthreads.cpp:
2013-04-07 Oliver Hunt <oliver@apple.com>
Add bounds checking for WTF::Vector::operator[]
https://bugs.webkit.org/show_bug.cgi?id=89600
Reviewed by Filip Pizlo.
Add a template parameter to Vector<> that controls whether
bounds checking is performed in release builds or not.
Defaults to crashing on overflow.
* wtf/Forward.h:
(WTF):
* wtf/Vector.h:
(WTF):
(Vector):
(WTF::Vector::at):
(WTF::Vector::removeLast):
(WTF::::Vector):
(WTF::=):
(WTF::::contains):
(WTF::::find):
(WTF::::reverseFind):
(WTF::::fill):
(WTF::::appendRange):
(WTF::::expandCapacity):
(WTF::::tryExpandCapacity):
(WTF::::resize):
(WTF::::shrink):
(WTF::::grow):
(WTF::::reserveCapacity):
(WTF::::tryReserveCapacity):
(WTF::::reserveInitialCapacity):
(WTF::::shrinkCapacity):
(WTF::::append):
(WTF::::tryAppend):
(WTF::::appendSlowCase):
(WTF::::uncheckedAppend):
(WTF::::appendVector):
(WTF::::insert):
(WTF::::prepend):
(WTF::::remove):
(WTF::::reverse):
(WTF::::releaseBuffer):
(WTF::::checkConsistency):
(WTF::deleteAllValues):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
2013-04-07 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix problems with export macros of AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=114132
Reviewed by Geoffrey Garen.
Exporting an inline function results in an error with the MS compiler.
* wtf/AutodrainedPool.h:
(AutodrainedPool):
(WTF::AutodrainedPool::AutodrainedPool):
(WTF::AutodrainedPool::~AutodrainedPool):
(WTF::AutodrainedPool::cycle):
2013-04-07 Patrick Gansterer <paroga@webkit.org>
[WinCE] Add workaround for UNUSED_PARAM()
https://bugs.webkit.org/show_bug.cgi?id=113440
Reviewed by Benjamin Poulain.
The MSVC compiler for Windwos CE throws an error when
an function parameter is passed to UNUSED_PARAM() and
its type is only forward declared.
* wtf/UnusedParam.h:
2013-04-07 Patrick Gansterer <paroga@webkit.org>
Do not check if WTF_ARM_ARCH_VERSION is defined in WTF_ARM_ARCH_AT_LEAST macro
https://bugs.webkit.org/show_bug.cgi?id=114127
Reviewed by Benjamin Poulain.
Platform.h defines WTF_ARM_ARCH_VERSION for CPU(ARM) always and removing
the check works around a bug in older Microsoft compiler versions.
* wtf/Platform.h:
2013-04-07 David Kilzer <ddkilzer@apple.com>
Remove the rest of SVG_DOM_OBJC_BINDINGS
<http://webkit.org/b/114112>
Reviewed by Geoffrey Garen.
* wtf/FeatureDefines.h:
- Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
2013-04-06 Geoffrey Garen <ggaren@apple.com>
Removed v8 bindings hooks from IDL files
https://bugs.webkit.org/show_bug.cgi?id=114091
Reviewed by Anders Carlsson and Sam Weinig.
* wtf/ArrayBuffer.h:
(WTF):
(WTF::ArrayBufferContents::ArrayBufferContents):
(WTF::ArrayBufferContents::transfer):
(ArrayBufferContents):
(ArrayBuffer):
(WTF::ArrayBufferContents::~ArrayBufferContents):
* wtf/Platform.h:
2013-04-05 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[GTK] Change from PLATFORM(GTK) to USE(GLIB) in WTF/CurrentTime.cpp
https://bugs.webkit.org/show_bug.cgi?id=114061
Reviewed by Gustavo Noronha Silva.
Now other ports using GLib can use the correct implementation
and not the fallback one without adding any other PLATFORM guards
here.
* wtf/CurrentTime.cpp:
(WTF):
2013-04-05 Geoffrey Garen <ggaren@apple.com>
Made USE(JSC) unconditional
https://bugs.webkit.org/show_bug.cgi?id=114058
Reviewed by Anders Carlsson.
* wtf/ThreadRestrictionVerifier.h:
(WTF):
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
(WTF::WTFThreadData::~WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
2013-04-05 Roger Fong <roger_fong@apple.com>
More VS2010 solution makefile fixes.
<rdar://problem/13588964>
* WTF.vcxproj/WTF.make:
2013-04-05 Anders Carlsson <andersca@apple.com>
Remove more dead Chromium code from WTF
https://bugs.webkit.org/show_bug.cgi?id=114037
Reviewed by Allan Sandfeld Jensen.
* wtf/CurrentTime.cpp:
(WTF):
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/MainThread.cpp:
* wtf/Platform.h:
2013-04-05 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL] Disable GLOBAL_FAST_MALLOC_NEW by default.
https://bugs.webkit.org/show_bug.cgi?id=114031
Reviewed by Alexis Menard.
Follow what some other ports already do and avoid globally overriding
the `new' and `delete' operators with the ones in FastMalloc.
In many cases, third-party or client code allocates memory with
standard library calls but the memory gets deleted by FastMalloc,
causing a crash. The reverse (ie. memory being allocated by FastMalloc
and freed by the system libraries) is also possible.
Commits 135666 and 121018 provide more information about this, as well
as comment 6 in bug 89358.
* wtf/Platform.h:
2013-04-05 Benjamin Poulain <bpoulain@apple.com>
Remove WTFURL from WebKit
https://bugs.webkit.org/show_bug.cgi?id=113994
Reviewed by Ryosuke Niwa.
Painful, but that is for the best now :(
* GNUmakefile.list.am:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentationParsedURL.h: Removed.
* wtf/url/api/ParsedURL.cpp: Removed.
* wtf/url/api/ParsedURL.h: Removed.
* wtf/url/api/URLBuffer.h: Removed.
* wtf/url/api/URLQueryCharsetConverter.h: Removed.
* wtf/url/api/URLString.cpp: Removed.
* wtf/url/api/URLString.h: Removed.
* wtf/url/src/RawURLBuffer.h: Removed.
* wtf/url/src/URLCanon.h: Removed.
* wtf/url/src/URLCanonEtc.cpp: Removed.
* wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
* wtf/url/src/URLCanonFileurl.cpp: Removed.
* wtf/url/src/URLCanonHost.cpp: Removed.
* wtf/url/src/URLCanonICU.cpp: Removed.
* wtf/url/src/URLCanonIP.cpp: Removed.
* wtf/url/src/URLCanonInternal.cpp: Removed.
* wtf/url/src/URLCanonInternal.h: Removed.
* wtf/url/src/URLCanonMailto.cpp: Removed.
* wtf/url/src/URLCanonPath.cpp: Removed.
* wtf/url/src/URLCanonPathurl.cpp: Removed.
* wtf/url/src/URLCanonQuery.cpp: Removed.
* wtf/url/src/URLCanonRelative.cpp: Removed.
* wtf/url/src/URLCanonStdURL.cpp: Removed.
* wtf/url/src/URLCharacterTypes.cpp: Removed.
* wtf/url/src/URLCharacterTypes.h: Removed.
* wtf/url/src/URLComponent.h: Removed.
* wtf/url/src/URLFile.h: Removed.
* wtf/url/src/URLParse.cpp: Removed.
* wtf/url/src/URLParse.h: Removed.
* wtf/url/src/URLParseFile.cpp: Removed.
* wtf/url/src/URLParseInternal.h: Removed.
* wtf/url/src/URLSegments.cpp: Removed.
* wtf/url/src/URLSegments.h: Removed.
* wtf/url/src/URLUtil.cpp: Removed.
* wtf/url/src/URLUtil.h: Removed.
* wtf/url/src/URLUtilInternal.h: Removed.
2013-04-04 Geoffrey Garen <ggaren@apple.com>
Nixed the defunct chromium folder from WTF
https://bugs.webkit.org/show_bug.cgi?id=113992
Reviewed by Ryosuke Niwa.
* wtf/chromium: Removed.
* wtf/chromium/ChromiumThreading.h: Removed.
* wtf/chromium/MainThreadChromium.cpp: Removed.
2013-04-04 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the gyp build
https://bugs.webkit.org/show_bug.cgi?id=113942
Reviewed by Gustavo Noronha Silva.
* WTF.gyp/WTFGTK.gyp: Removed.
2013-04-04 Anders Carlsson <andersca@apple.com>
ObjcRuntimeExtras.h should use variadic templates
https://bugs.webkit.org/show_bug.cgi?id=113941
Reviewed by Andreas Kling.
Reimplement wtfObjcMsgSend and wtfCallIMP as variadic function templates.
* wtf/ObjcRuntimeExtras.h:
(wtfObjcMsgSend):
(wtfCallIMP):
2013-04-04 Andras Becsi <andras.becsi@digia.com>
Fix the build with GCC 4.8
https://bugs.webkit.org/show_bug.cgi?id=113147
Reviewed by Allan Sandfeld Jensen.
Disable diagnostic warning -Wunused-local-typedefs for GCC 4.8
since dummy typedefs are commonly used in the codebase.
* wtf/Compiler.h:
2013-04-03 Pratik Solanki <psolanki@apple.com>
Enable HAVE_MADV_FREE_REUSE on iOS
https://bugs.webkit.org/show_bug.cgi?id=113892
<rdar://problem/12787563>
Reviewed by Mark Rowe.
* wtf/Platform.h:
2013-04-02 Ryosuke Niwa <rniwa@webkit.org>
Remove code for Mac 10.5 and earlier from WTF and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=113844
Reviewed by Benjamin Poulain.
Removed the code for 10.5 and removed if-def for 10.6.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/Platform.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2013-04-02 Max Vujovic <mvujovic@adobe.com>
[CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
https://bugs.webkit.org/show_bug.cgi?id=109098
Reviewed by Dean Jackson.
* wtf/Platform.h:
Add flag for HAVE(COMPOSITOR_FILTER_OUTSETS) macro. This is used to check if a
platform's compositor expands layers internally for filter outsets when it applies
filters like drop-shadow and blur. Currently, only CoreAnimation does has this
capability.
2013-04-02 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: memory instrumentation for external arrays is broken
https://bugs.webkit.org/show_bug.cgi?id=113790
Reviewed by Pavel Feldman.
* wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
we know that the pointer is not broken.
(WTF::reportMemoryUsage):
2013-04-01 Han Shen <shenhan@google.com>
Move definition of nested classes that inherit enclosing class outside class definition.
https://bugs.webkit.org/show_bug.cgi?id=113454
Reviewed by Benjamin Poulain.
HashMap.h does not build on GCC 4.8. Inside this file,
HashMapKeysProxy and HashMapValuesProxy are defined as nested
class inside HashMap - which is legal - the illegal part is that
these 2 classes inherit HashMap, that is the enclosing class, that
causes "reference to in-complete definition" error.
The fix is to move outside the definition of these 2 classes, and
leave only declaration part inside HashMap as is illustrated below -
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
// ERROR - nested class inherits enclosing class.
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
};
Fixed as below:
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
class HashMapValuesProxy;
... ...
... ...
};
template <typename T>
class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
... ...
};
template <typename T>
class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
... ...
};
* wtf/HashMap.h:
(HashMap):
(WTF): Factor out nested class definition from enclosing class.
2013-03-31 Mark Hahnenberg <mhahnenberg@apple.com>
Regions should be allocated from the same contiguous segment of virtual memory
https://bugs.webkit.org/show_bug.cgi?id=113662
Reviewed by Filip Pizlo.
Instead of letting the OS spread our Regions all over the place, we should allocate them all within
some range of each other. This change will open the door to some other optimizations, e.g. doing simple
range checks for our write barriers and compressing JSCell pointers to 32-bits.
* wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
use something other than the system page size.
(WTF::MetaAllocator::MetaAllocator):
* wtf/MetaAllocator.h:
(MetaAllocator):
2013-04-01 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add memory instrumentation for StringBuffer
https://bugs.webkit.org/show_bug.cgi?id=113507
Reviewed by Pavel Feldman.
Added memory instrumentation for StringBuffer.
* wtf/MemoryInstrumentationString.h:
(WTF):
(WTF::reportMemoryUsage):
2013-03-30 Tom Sepez <tsepez@chromium.org>
View-source iframes are dangerous (and not very useful).
https://bugs.webkit.org/show_bug.cgi?id=113345
Reviewed by Adam Barth.
* wtf/FeatureDefines.h:
Default definition of ENABLE_VIEWSOURCE_ATTRIBUTE is enabled.
2013-03-27 Patrick Gansterer <paroga@webkit.org>
Set WTF_ARM_ARCH_VERSION to correct value when used with MSVC
https://bugs.webkit.org/show_bug.cgi?id=113436
Reviewed by Benjamin Poulain.
The Microsoft compiler defines _M_ARM with used ARM version.
* wtf/Platform.h:
2013-03-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Support C++11 static_assert
https://bugs.webkit.org/show_bug.cgi?id=113308
Reviewed by Alexey Proskuryakov.
Use the C++11 static_assert for COMPILE_ASSERT when it is available. Note that
even when compiling with C++11 support, static_assert will not always be available
since Assertions.h may also be used outside of C++.
C11 _Static_assert is enabled for GCC when it has C11 support (gcc>=4.7 -std=c11).
* wtf/Assertions.h:
* wtf/Compiler.h:
2013-03-25 Oliver Hunt <oliver@apple.com>
RefCountedArray needs a size based constructor
https://bugs.webkit.org/show_bug.cgi?id=113277
Reviewed by Benjamin Poulain.
Simple patch to add a size based constructor for RefCountedArray
so that we can create an sharable array without a copy.
* wtf/RefCountedArray.h:
(RefCountedArray):
(WTF::RefCountedArray::RefCountedArray):
2013-03-26 James Robinson <jamesr@chromium.org>
Compile fix - OS(WINDOWS), not OS(WIN).
* wtf/ProcessID.h:
(WTF::getCurrentProcessID):
2013-03-26 James Robinson <jamesr@chromium.org>
Fix compile for OS(WIN) != PLATFORM(WIN)
https://bugs.webkit.org/show_bug.cgi?id=113356
Reviewed by Tim Horton.
* wtf/ProcessID.h:
(WTF::getCurrentProcessID):
2013-03-23 Filip Pizlo <fpizlo@apple.com>
JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
https://bugs.webkit.org/show_bug.cgi?id=113144
Reviewed by Geoffrey Garen.
I got tired of the fact that getpid(2) is not a syscall on Windows (unless you do
_getpid() I believe), so I wrote a header that abstracts it. I also changed existing
code that uses getpid() to use WTF::getCurrentProcessID().
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::dumpProfile):
* wtf/ProcessID.h: Added.
(WTF):
(WTF::getCurrentProcessID):
* wtf/text/StringImpl.cpp:
(WTF::StringStats::printStats):
2013-03-25 Kent Tamura <tkent@chromium.org>
Rename ENABLE_INPUT_TYPE_DATETIME
https://bugs.webkit.org/show_bug.cgi?id=113254
Reviewed by Kentaro Hara.
Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
Actually I'd like to remove the code, but we shouldn't remove it yet
because we shipped products with it on some platforms.
* wtf/FeatureDefines.h:
2013-03-25 David Kilzer <ddkilzer@apple.com>
WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
<http://webkit.org/b/113170>
Reviewed by Dan Bernstein.
Fixes the following build failure:
/usr/local/include/wtf/StdLibExtras.h:190:30: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
int pos = (size - 1) >> 1;
~~~ ~~~~~~~~~~~^~~~
1 error generated.
* wtf/StdLibExtras.h:
(WTF::binarySearchImpl): Switch type from int to size_t.
2013-03-22 Benjamin Poulain <bpoulain@apple.com>
Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
https://bugs.webkit.org/show_bug.cgi?id=113003
Reviewed by Eric Seidel.
StringHash::equal() and CaseFoldingHash::equal() were both testing for
the nullity of the two input pointers. The catch is: neither traits handle
null pointers, and any client code would have crashed on hash(), before equal()
is called.
Consequently, the two branches had a pass rate of zero when called from a HashMap code.
The function is also never inlined because it is too big (the code of equal() for characters
is always inlined, causing the function to be quite big).
This patch introduces two new functions in the StringImpl API: equalNonNull() and
equalIgnoringCaseNonNull(). Those functions are similar to their equal() equivalent
but make the assumtion the input is never null.
The functions are used for StringHash to avoid the useless branches.
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
(WTF::CaseFoldingHash::equal):
* wtf/text/StringImpl.cpp:
(WTF::stringImplContentEqual):
(WTF::equal):
(WTF::equalNonNull):
(WTF::equalIgnoringCase):
(WTF::equalIgnoringCaseNonNull):
(WTF::equalIgnoringNullity):
* wtf/text/StringImpl.h:
(WTF::equalIgnoringCase):
2013-03-22 Benjamin Poulain <bpoulain@apple.com>
Name correctly the argument of StringImpl::setIsAtomic()
https://bugs.webkit.org/show_bug.cgi?id=113000
Reviewed by Geoffrey Garen.
* wtf/text/StringImpl.h:
(WTF::StringImpl::setIsAtomic):
The argument was probably an unfortunate copy-paste from setIsIdentifier().
Fix the name.
2013-03-22 Hajime Morrita <morrita@google.com>
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538
Reviewed by Elliott Sprehn.
* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
2013-03-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r146534 and r146565.
http://trac.webkit.org/changeset/146534
http://trac.webkit.org/changeset/146565
https://bugs.webkit.org/show_bug.cgi?id=113017
"r146534 caused perf regression on Chromium Linux x64"
(Requested by yurys on #webkit).
* wtf/HashSet.h:
(WTF):
(WTF::copyToVector):
2013-03-21 Hajime Morrita <morrita@google.com>
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538
Reviewed by Elliott Sprehn.
* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
2013-03-21 Mark Lam <mark.lam@apple.com>
Introducing String::findNextLineStart().
https://bugs.webkit.org/show_bug.cgi?id=112957.
Reviewed by Geoffrey Garen.
This is replaces String::reverseFindLineTerminator() in the JSC
debugger's code for computing column numbers.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findNextLineStart):
* wtf/text/StringImpl.h:
(WTF::findNextLineStart):
* wtf/text/WTFString.h:
(WTF::String::findNextLineStart):
2013-03-21 Adam Barth <abarth@webkit.org>
HTMLNames should construct strings at compile time
https://bugs.webkit.org/show_bug.cgi?id=112831
Reviewed by Darin Adler.
* wtf/text/StringImpl.h:
(StringImpl):
(StaticASCIILiteral):
- This struct lets us construct StringImpl objects at compile time.
(WTF::StringImpl::assertHashIsCorrect):
- This function lets us sanity check StringImpl objects created from StaticData.
(WTF::StringImpl::find): Remove a stray ;
(WTF::StringImpl::findIgnoringCase): ditto
(WTF::StringImpl::startsWith): ditto
(WTF::ValueCheck<StringImpl*>):
* wtf/text/AtomicStringImpl.h:
(WTF::ValueCheck<AtomicStringImpl*>):
2013-03-21 Gabor Rapcsanyi <rgabor@webkit.org>
Implement LLInt for CPU(ARM_TRADITIONAL)
https://bugs.webkit.org/show_bug.cgi?id=97589
Reviewed by Zoltan Herczeg.
Enable LLInt for ARMv5 and ARMv7 traditional as well.
* wtf/Platform.h:
2013-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r146419.
http://trac.webkit.org/changeset/146419
https://bugs.webkit.org/show_bug.cgi?id=112870
Broke many tests on debug builds (Requested by rniwa_ on
#webkit).
* wtf/text/StringImpl.h:
(StringImpl):
2013-03-20 Adam Barth <abarth@webkit.org>
HTMLNames should construct strings at compile time
https://bugs.webkit.org/show_bug.cgi?id=112831
Reviewed by Darin Adler.
* wtf/text/StringImpl.h:
(StringImpl):
(StaticASCIILiteral):
- This struct lets us construct StringImpl objects at compile time.
(WTF::StringImpl::assertValidHash):
- This function lets us sanity check StringImpl objects created from StaticData.
2013-03-20 Jessie Berlin <jberlin@apple.com>
REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into
the wrong location
https://bugs.webkit.org/show_bug.cgi?id=112833
Reviewed by Darin Adler.
* WTF.xcodeproj/project.pbxproj:
Make sure those three headers are copied with the rest of the WTF headers.
2013-03-20 Mark Rowe <mrowe@apple.com>
FastMalloc scavenge timer specifies an overly narrow leeway value.
Reviewed by Alexey Proskuryakov.
There's no need to allow only 1ms of leeway on a 2s timer.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Bump the leeway window
to 10% of the scavenge timer.
2013-03-20 JungJik Lee <jungjik.lee@samsung.com>
[EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
https://bugs.webkit.org/show_bug.cgi?id=112114
Reviewed by Kenneth Rohde Christiansen.
The issue is that if the animation starts outside of the area covered by keepRects,
the web process does not create tiles of the animation layer and the layer moves
without having any tiles. In order to fix this issue, CoordinatedLayerHost must call
scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
However EFL port didn't call scheduleLayerFlush periodically for animation.
We can tie scripted animations with synchronization of the layer and that already
has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.
The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html
* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.
2013-03-20 Mark Lam <mark.lam@apple.com>
Introducing String::reverseFindLineTerminator().
https://bugs.webkit.org/show_bug.cgi?id=112741.
Reviewed by Oliver Hunt.
This is needed by the JSC debugger code for computing column numbers.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reverseFindLineTerminator):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::reverseFindLineTerminator):
* wtf/text/WTFString.h:
(WTF::String::reverseFindLineTerminator):
2013-03-19 Martin Robinson <mrobinson@igalia.com>
Fix the WTF gyp build for GTK+.
* WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.
2013-03-19 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Enable USE_SYSTEM_MALLOC by default
https://bugs.webkit.org/show_bug.cgi?id=112365
Reviewed by Benjamin Poulain.
Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
harcoding it in wtf/Platform.h
* wtf/Platform.h:
2013-03-18 Benjamin Poulain <benjamin@webkit.org>
[iOS] Make a UChar string equal() based on the LChar version
https://bugs.webkit.org/show_bug.cgi?id=112495
Reviewed by David Kilzer.
* wtf/text/StringImpl.h:
(WTF::equal):
Create a equal() function for UChar based on the work done for LChar.
On A6, this is a speed up of about 40% for any string of 2 or more characters.
It is slower by 8% on a single UChar comparison.
2013-03-18 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Get build working under VS2010.
https://bugs.webkit.org/show_bug.cgi?id=112604
Reviewed by Tim Horton.
* WTF.vcxproj/WTF.vcxproj: Add Debug_WinCairo and Release_WinCairo
targets so headers get copied to appropriate build folder.
* WTF.vcxproj/WTFGenerated.vcxproj: Ditto.
2013-03-15 Benjamin Poulain <bpoulain@apple.com>
[iOS] Update StringImpl's equal to have a single version on all supported Apple CPUs
https://bugs.webkit.org/show_bug.cgi?id=112400
Reviewed by Michael Saboff.
* wtf/text/StringImpl.h:
(WTF::equal):
Tweak the code to make it work on older Apple CPUs:
-Use external "ouput" variable instead of the registers R9 and R12. This gets rid
of some register pressure previously imposed on the compiler. (Clang nicely
choose R9 and R12 when needed, following iOS ABI).
-Instead of using "R3" for storing the length / 4, update the length by -4 on
each iteration and work in the negative space for the tail. This frees one register
which is then used for isEqual.
-Get rid of the unconditional branch from the loop. By using subs and working in the
negative space, we can test for the Carry flag to jump back to the next LDR.
2013-03-15 Benjamin Poulain <bpoulain@apple.com>
[iOS] Fix the length pass to memcmp in the fallback versions of String's equal
https://bugs.webkit.org/show_bug.cgi?id=112463
Reviewed by Ryosuke Niwa.
* wtf/text/StringImpl.h:
(WTF::equal): It might be a good idea to compare the full UChar strings...
2013-03-15 Michael Saboff <msaboff@apple.com>
Add runtime check for improper register allocations in DFG
https://bugs.webkit.org/show_bug.cgi?id=112380
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Added new ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION compilation flag to
enable generation of register allocation checking. This is on for debug builds.
2013-03-13 Jessie Berlin <jberlin@apple.com>
Remove svn:executable from a file that isn't supposed to be executable.
Rubber-stamped by Geoff Garen.
* wtf/MediaTime.h:
2013-03-13 Oliver Hunt <oliver@apple.com>
Simplify Checked<> multiplication
https://bugs.webkit.org/show_bug.cgi?id=112286
Reviewed by James Robinson.
Trying to correctly identify multiplication by zero complicated the
unsigned * unsigned multiply, and still didn't handle all cases correctly.
Now we just do the normal division based approach to overflow detection
leading to much simpler reasoning.
Would be nice if we could have a jo style intrinsic one day.
* wtf/CheckedArithmetic.h:
2013-03-13 Dean Jackson <dino@apple.com>
Unreviewed attempted build fix for Windows. SchedulePair.cpp -> SchedulePairCF.cpp
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
2013-03-13 Benjamin Poulain <bpoulain@apple.com>
[iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
https://bugs.webkit.org/show_bug.cgi?id=112202
Reviewed by Gavin Barraclough.
* Source/WTF/wtf/Platform.h:
Make the macro WTF_ARM_ARCH_VERSION valid on any architecture.
* wtf/text/StringImpl.h:
(WTF::equal):
On ARMv7S, the new version is about 11% percent faster than the simple loop.
On ARMv7 classic, memcmp is a little faster than the simple loop on Apple A5.
2013-03-13 James Robinson <jamesr@chromium.org>
SchedulePair.cpp is CF-specific
https://bugs.webkit.org/show_bug.cgi?id=112204
Reviewed by Oliver Hunt.
This renames SchedulePair.cpp SchedulePairCF.cpp, since it depends on CF, and excludes it from chromium's gyp
files.
* WTF.gyp/WTF.gyp:
Add CF to the exclusion filter for the Chromium port.
* WTF.gypi:
Add SchedulePairCF.cpp
* WTF.xcodeproj/project.pbxproj:
Update project file to point to new .cpp location
* wtf/SchedulePairCF.cpp: Renamed from Source/WTF/wtf/SchedulePair.cpp.
2013-03-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
Support C++11 features in GCC <4.6
https://bugs.webkit.org/show_bug.cgi?id=111553
Reviewed by Simon Hausmann.
Enable support for rvalue references from gcc 4.3, deleted functions
from gcc 4.4, explicit conversion from gcc 4.5, and strongly typed
enums from gcc 4.6.
* wtf/Compiler.h:
2013-03-12 Geoffrey Garen <ggaren@apple.com>
Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
* wtf/SchedulePair.cpp:
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair): Since linking is failing,
try inlining this function.
2013-03-12 Tim Horton <timothy_horton@apple.com>
Typo in earlier Windows build fix. Unreviewed.
* WTF.vcproj/WTF.vcproj:
2013-03-12 Tim Horton <timothy_horton@apple.com>
Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
2013-03-12 James Robinson <jamesr@chromium.org>
Build fix for r145592 - update gyp files to refer to new file locations.
* WTF.gypi:
2013-03-12 Geoffrey Garen <ggaren@apple.com>
Moved RunLoopTimer and SchedulePair to WTF
https://bugs.webkit.org/show_bug.cgi?id=112171
Reviewed by Oliver Hunt.
This will allow us to use timers in lower level primitives without
duplicating all the code.
* WTF.xcodeproj/project.pbxproj:
* wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
(AutodrainedPool):
* wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
* wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
* wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
* wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
* wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
(SchedulePair):
* wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.
2013-03-12 Oliver Hunt <oliver@apple.com>
Add more Checked<> tests
https://bugs.webkit.org/show_bug.cgi?id=112190
Reviewed by Geoffrey Garen.
Export the CheckedState enum type
* wtf/CheckedArithmetic.h:
2013-03-12 Oliver Hunt <oliver@apple.com>
Make CheckedArithmetic slightly more sane
https://bugs.webkit.org/show_bug.cgi?id=112178
Reviewed by Geoffrey Garen.
Add an enum type for safeGet rather than using a bool,
and correctly handle unsigned * unsigned, when one value
is 0.
* wtf/CheckedArithmetic.h:
(WTF::ENUM_CLASS):
(WTF):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):
2013-03-11 Michael Saboff <msaboff@apple.com>
Unreviewed build fix. Rolling out inadvertent setting of DATA_LOG_TO_FILE.
2013-03-11 Oliver Hunt <oliver@apple.com>
Make SegmentedVector Noncopyable
https://bugs.webkit.org/show_bug.cgi?id=112059
Reviewed by Geoffrey Garen.
Copying a SegmentedVector can be extraordinarily expensive, so we beat
it with the Noncopyable stick - that way we can ensure that if anyone
wants an actual copy they know what they're doing.
* wtf/SegmentedVector.h:
(SegmentedVector):
2013-03-08 Benjamin Poulain <benjamin@webkit.org>
[Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
https://bugs.webkit.org/show_bug.cgi?id=111297
Reviewed by Kenneth Rohde Christiansen.
* wtf/FeatureDefines.h: Add a new feature flag for the view-mode
CSS media: ENABLE_VIEW_MODE_CSS_MEDIA.
2013-03-08 Roger Fong <roger_fong@apple.com>
Makefile fixes.
* WTF.vcxproj/WTF.make:
2013-03-08 Gabor Rapcsanyi <rgabor@webkit.org>
Cache flush problem on ARMv7 JSC
https://bugs.webkit.org/show_bug.cgi?id=111441
Reviewed by Zoltan Herczeg.
Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
Change the cache fulsh mechanism similar to ARM traditinal and revert the
temporary fix.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):
2013-03-07 Andrew Bortz <andrew@abortz.net>
Replace Mersenne Twister random number generator with a simpler one.
https://bugs.webkit.org/show_bug.cgi?id=111533
Reviewed by Adam Barth.
The new generator is only a single line long, but passes all the Diehard
statistical tests and runs ~3x faster than the Mersenne Twister, with a
guaranteed cycle length of 2^64 and only 8 bytes of state.
* wtf/Platform.h: Mersenne Twister defines are no longer needed
* wtf/RandomNumber.cpp:
(WTF::Internal::initializeRandomNumber): State initialization
(WTF::Internal::randomNumber): Actual implementation
(WTF::randomNumber): We don't need to fall back on rand()-based generator anymore,
so this code is greatly simplified.
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator): This code is no longer needed.
Additionally, the code had an error, since rand() returns 32-bits, so each
initializationBuffer's upper 16-bits has more bits set than random.
2013-03-06 Adenilson Cavalcanti <cavalcantii@gmail.com>
Build fix: PageAllocationAligned no longer has executable flag
https://bugs.webkit.org/show_bug.cgi?id=111659
Reviewed by Kentaro Hara.
Build fix: use false as parameter to execution flag.
* wtf/PageAllocationAligned.cpp:
(WTF::PageAllocationAligned::allocate):
2013-03-06 Eric Seidel <eric@webkit.org>
AtomicStringImpls are not safe to send between threads
https://bugs.webkit.org/show_bug.cgi?id=111652
Reviewed by Benjamin Poulain.
We don't have this problem yet, but it's good to be safe.
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread):
2013-03-06 Oliver Hunt <oliver@apple.com>
Don't give PageAllocationAligned the option to allocate executable memory
https://bugs.webkit.org/show_bug.cgi?id=111657
Reviewed by Geoffrey Garen.
* wtf/PageAllocationAligned.cpp:
(WTF::PageAllocationAligned::allocate):
* wtf/PageAllocationAligned.h:
(PageAllocationAligned):
2013-03-04 Jer Noble <jer.noble@apple.com>
Default mouse cursor behavior should be auto-hide for full screen video with custom controls
https://bugs.webkit.org/show_bug.cgi?id=107601
Reviewed by Beth Dakin.
Enable the CURSOR_VISIBILITY feature.
* wtf/FeatureDefines.h:
2013-03-04 Oliver Hunt <oliver@apple.com>
Make fastmalloc use guardpages
https://bugs.webkit.org/show_bug.cgi?id=111353
Reviewed by Anders Carlsson.
Add PROT_NONE pages at the beginning and end of every
mmap call made by fastmalloc.
* wtf/TCSystemAlloc.cpp:
(TryMmap):
2013-03-06 Paweł Forysiuk <tuxator@o2.pl>
Typo in inline function in ByteOrder.h
https://bugs.webkit.org/show_bug.cgi?id=111473
Reviewed by Benjamin Poulain.
* wtf/ByteOrder.h:
(ntohs):
2013-03-05 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break with latest EFL libraries
https://bugs.webkit.org/show_bug.cgi?id=111028
Reviewed by Dirk Pranke.
* wtf/PlatformEfl.cmake: Added ECORE_IMF_INCLUDE_DIRS.
2013-03-05 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warning in ASCIIFastPath.h on ARM
https://bugs.webkit.org/show_bug.cgi?id=111436
Reviewed by Benjamin Poulain.
* wtf/text/ASCIIFastPath.h:
(WTF::charactersAreAllASCII):
2013-03-04 Laszlo Gombos <l.gombos@samsung.com>
JSC_OBJC_API_ENABLED should be removed from FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=111269
Reviewed by Mark Hahnenberg.
JSC_OBJC_API_ENABLED flag was added to FeatureDefines.h (r143637)
so that it could be used in WebCore.exp.in to determine whether
or not we should be exporting certain symbols based on whether
the WebKit-related portion of the JSC ObjC API was enabled.
It turned out conditionally including certain symbols didn't
work when building fat binaries, so it's not even necessary any more.
* wtf/FeatureDefines.h: Remove JSC_OBJC_API_ENABLED.
2013-03-04 Andreas Kling <akling@apple.com>
Deque: Free internal buffer in clear().
<http://webkit.org/b/111316>
<rdar://problem/13336675>
Reviewed by Antti Koivisto.
525 kB progression on Membuster3.
* wtf/Deque.h:
(WTF::::clear):
2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
Add build flag for FontLoader
https://bugs.webkit.org/show_bug.cgi?id=111289
Reviewed by Benjamin Poulain.
Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
* wtf/FeatureDefines.h:
2013-02-27 Darin Adler <darin@apple.com>
StringHasher functions require alignment that call sites do not all guarantee
https://bugs.webkit.org/show_bug.cgi?id=110171
Reviewed by Benjamin Poulain.
The StringHasher class is optimized for clients who pass it two characters at
a time. However, the function named addCharacters did not make this clear to
clients, and one calculateStringHashAndLengthFromUTF8MaskingTop8Bits got it wrong.
Fix by making addCharacters work regardless of hasher alignment and adding a new
function, addCharactersAssumingAligned, for use when we want a faster path and can
guarantee we are adding characters two at a time.
* wtf/StringHasher.h:
(WTF::StringHasher::addCharactersAssumingAligned): Renamed the addCharacters function
addCharactersAssumingAligned, since it only works if the hasher is currently aligned,
meaning it contains an even number of characters. The function already asserts
that this is true, but the calculateStringHashAndLengthFromUTF8MaskingTop8Bits
function was using it in cases where the assertion could fire. Also updated to
call addCharactersInternal by its new name. Also added some new overloads that take
data pointers and lengths so callers can always use addCharactersAssumingAligned
instead of addCharacters if they know the hasher is aligned.
(WTF::StringHasher::addCharacter): Updated to call the public
addCharactersAssumingAligned function since that's simpler and a bit cleaner.
(WTF::StringHasher::addCharacters): Added functions with this name that handle
the case where the hasher is not aligned. These will be called by existing call sites
that were formerly using the function named addCharactersAssumingAligned above.
Also add an overload that works with the default converter automatically.
(WTF::StringHasher::computeHashAndMaskTop8Bits): Changed to call
addCharactersAssumingAligned to eliminate copied and pasted code. The hasher is empty,
so definitely aligned.
(WTF::StringHasher::computeHash): Ditto.
(WTF::StringHasher::addCharactersInternal): Renamed from addCharactersToHash, since
the former name did not make clear how this differs from the public functions.
The real difference is that this is like addCharactersAssumingAligned, but without
the assertion, so addCharactersAssumingAligned is called instead, even within the
class's implementation.
2013-03-01 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: do not visit raw pointers by default.
https://bugs.webkit.org/show_bug.cgi?id=110943
Reviewed by Yury Semikhatsky.
Unfortunately in many cases raw pointer may point to an object that has been deleted.
There is no working solution to solve this problem in general.
It could be solved only on case by case basis.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::MemberTypeTraits::addObject):
(WTF::MemoryClassInfo::addMember):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
2013-03-01 Eric Seidel <eric@webkit.org>
Threaded HTML Parser has an extra copy of every byte from the network
https://bugs.webkit.org/show_bug.cgi?id=111135
Reviewed by Adam Barth.
The threaded html parser needs to accept ownership
of a string buffer. The easiest way to do this seemed
to be to use a PassRefPtr<StringImpl>, but there was no way
to generated one from a String (easily), so I added one.
* wtf/text/WTFString.h:
(WTF::String::releaseImpl):
2013-02-28 Oliver Hunt <oliver@apple.com>
Crash in JSC::MarkedBlock::FreeList JSC::MarkedBlock::sweepHelper
https://bugs.webkit.org/show_bug.cgi?id=111059
Reviewed by Ryosuke Niwa.
Sometimes C++'s implicit operator conversion rules suck.
Add explicit operator== and !=.
* wtf/FastMalloc.cpp:
(WTF::HardenedSLL::operator!=):
(WTF::HardenedSLL::operator==):
(HardenedSLL):
2013-02-28 Zeno Albisser <zeno@webkit.org>
Enable DFG JIT for Qt on Mac
https://bugs.webkit.org/show_bug.cgi?id=111095
Rubber-stamped by Simon Hausmann
* wtf/Platform.h:
2013-02-28 Eric Carlson <eric.carlson@apple.com>
[Mac] use HAVE() macro instead of version check
https://bugs.webkit.org/show_bug.cgi?id=111087
Reviewed by Dean Jackson.
* wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.
2013-02-27 Balazs Kilvady <kilvadyb@homejinni.com>
Bug in atomicIncrement implementation for MIPS GCC
https://bugs.webkit.org/show_bug.cgi?id=110969
Reviewed by Csaba Osztrogonác.
Fix of __sync_[add|sub]_and_fetch_8 for GCC patch.
* wtf/Atomics.cpp:
2013-02-27 Simon Hausmann <simon.hausmann@digia.com>
REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
https://bugs.webkit.org/show_bug.cgi?id=108632
Reviewed by Csaba Osztrogonác.
It appears that mprotect() is very slow on ARM/Linux, so disable the
approach of unreserved mappings there and fall back to overcomitting
memory, based on Uli Schlachter's recommendation.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):
2013-02-26 Roger Fong <roger_fong@apple.com>
Unreviewed. Build fix for VS2010 solution, take 2.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-26 Roger Fong <roger_fong@apple.com>
Unreviewed. Unreviewed build fix for VS2010 solution.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-26 Balazs Kilvady <kilvadyb@homejinni.com>
Fix the atomicIncrement implementation for MIPS GCC
https://bugs.webkit.org/show_bug.cgi?id=106739
Reviewed by Oliver Hunt.
Implementation of missing __sync_[add|sub]_and_fetch_8 functions.
Some architectures, like MIPS32, don't have GCC implementation for
builtin __sync_* functions with 64 bits variable size. GCC answer
for the problem: If a target doesn't support atomic operations on
certain variable sizes, you are out of luck with atomicity in that
case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
will support __atomic_* builtin functions for this purpose for all
the GCC targets, but for current compilers we have to include our
own implementation.
* GNUmakefile.list.am:
* WTF.pro:
* wtf/Atomics.cpp: Added.
(WTF):
(WTF::getSwapLock):
(WTF::atomicStep):
* wtf/CMakeLists.txt:
2013-02-26 Oliver Hunt <oliver@apple.com>
Appease the QT bots.
* wtf/FastMalloc.cpp:
2013-02-26 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Implement JIT on Windows 64 bits
https://bugs.webkit.org/show_bug.cgi?id=107965
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2013-02-26 Oliver Hunt <oliver@apple.com>
Appease static analyzer warning about null string passed to strlen
https://bugs.webkit.org/show_bug.cgi?id=110658
Reviewed by Benjamin Poulain.
Add a null check before calling strlen
* wtf/Threading.cpp:
(WTF::createThread):
2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
Build fix attempt after r143996.
* wtf/FastMalloc.cpp:
(WTF):
2013-02-25 Roger Fong <roger_fong@apple.com>
Unreviewed. Fix script to use WEBKIT_SOURCE for VS2010 property sheets instead of WEBKIT_LIBRARIES.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-25 Oliver Hunt <oliver@apple.com>
Add cookies to FastMalloc spans
https://bugs.webkit.org/show_bug.cgi?id=110827
Reviewed by Michael Saboff.
Add a cookie to spans, and move some of the hardening around so
that it's more useful.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF::spanInitializerCookie):
(WTF::Span::initCookie):
(WTF::Span::clearCookie):
(WTF::Span::isValid):
(Span):
(WTF::NewSpan):
(WTF::DeleteSpan):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-02-25 Jer Noble <jer.noble@apple.com>
Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
https://bugs.webkit.org/show_bug.cgi?id=110806
Reviewed by Alexey Proskuryakov.
Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
* wtf/FeatureDefines.h:
2013-02-23 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: replace String with const char* in MemoryObjectInfo
https://bugs.webkit.org/show_bug.cgi?id=110599
Reviewed by Yury Semikhatsky.
Due to potentially dynamic nature of names and classNames we need to make a copy of the strings
that were given us via MemoryInstrumentation calls.
So I extended client api with registerString method that pushes the strings
down to the serializer.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::setClassName):
(WTF::MemoryObjectInfo::classNameId):
(WTF::MemoryObjectInfo::setName):
(WTF::MemoryObjectInfo::nameId):
(MemoryObjectInfo):
2013-02-21 Brady Eidson <beidson@apple.com>
Move fastlog2() to WTF/MathExtras.h so it can be used from multiple projects.
Rubberstamped by Geoff Garen.
* wtf/MathExtras.h:
(WTF::fastLog2):
2013-02-21 Andy Estes <aestes@apple.com>
TriState.h should be a Project header
https://bugs.webkit.org/show_bug.cgi?id=110543
Rubber-stamped by Dan Bernstein.
WTF uses a script to copy headers to the build destination, so it isn't
necessary to mark headers as Private/Public (and doing so can be problematic).
* WTF.xcodeproj/project.pbxproj: Mark TriState.h as a Project header.
2013-02-21 Roger Fong <roger_fong@apple.com>
Unreviewed. Add executable property to cmd file.
Required for executable files to maintain their executable permissions over svn.
* WTF.vcxproj/copy-files.cmd: Added property svn:executable.
2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
https://bugs.webkit.org/show_bug.cgi?id=106059
Reviewed by Geoffrey Garen.
* wtf/FeatureDefines.h: Added enable flag for JSC Objective-C API so it can be used in
export files.
2013-02-21 Martin Robinson <mrobinson@igalia.com>
A couple more 'make dist' fixes for WebKitGTK+.
* GNUmakefile.list.am: Add a missing file to the source list.
2013-02-20 Roger Fong <roger_fong@apple.com>
Get VS2010 Solution B&I ready.
<rdar://problem/1322988>
Rubberstamped by Timothy Horton.
Add Production configuration.
Add a WTF submit solution with a DebugSuffix configuration.
Modify WTF.make as necessary.
* WTF.vcxproj: Added property svn:eol-style. Modified property svn:ignore.
* WTF.vcxproj/WTF.make: Added.
* WTF.vcxproj/WTF.submit.sln: Added.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGeneratedProduction.props: Added.
* WTF.vcxproj/WTFGeneratedRelease.props:
* WTF.vcxproj/WTFProduction.props: Added.
* WTF.vcxproj/WTFRelease.props:
* WTF.vcxproj/copy-files.cmd:
2013-02-20 Oliver Hunt <oliver@apple.com>
Moar hardening
https://bugs.webkit.org/show_bug.cgi?id=110275
Reviewed by Mark Hahnenberg.
We now poison objects when they get freed, and verify that
any object that is being freed is not poisoned. If the
object looks like it's poisoned we validate the freelist,
and ensure the object is not already present. If it is
we crash.
On allocation, we ensure that the object being allocated
is poisoned, then clear the poisoning fields.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::freedObjectStartPoison):
(WTF::freedObjectEndPoison):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r143400.
http://trac.webkit.org/changeset/143400
https://bugs.webkit.org/show_bug.cgi?id=110290
breaks everything (instacrash launching Safari) (Requested by
thorton on #webkit).
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
2013-02-19 Oliver Hunt <oliver@apple.com>
Moar hardening
https://bugs.webkit.org/show_bug.cgi?id=110275
Reviewed by Anders Carlsson.
We now poison objects when they get freed, and verify that
any object that is being freed is not poisoned. If the
object looks like it's poisoned we validate the freelist,
and ensure the object is not already present. If it is
we crash.
On allocation, we ensure that the object being allocated
is poisoned, then clear the poisoning fields.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::freedObjectStartPoison):
(WTF::freedObjectEndPoison):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
2013-02-18 Darin Adler <darin@apple.com>
Style tweaks to StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=110042
Reviewed by Alexey Proskuryakov.
I have a bug fix coming soon, but figured I'd separate out style tweaks and land them
first to make that patch easier to undrestand.
* wtf/StringHasher.h: Tweak and rearrange comments a bit.
(WTF::StringHasher::addCharacter): Use character instead of ch.
(WTF::StringHasher::addCharacters): Use remainder instead of rem. Also capitalize the U
that we use to make an unsigned 1 constant.
(WTF::StringHasher::computeHashAndMaskTop8Bits): Ditto.
(WTF::StringHasher::hashMemory): Change version that takes size as a template argument
to call the version that takes the size at runtime, since both generate the same code
anyway. Added a FIXME questioning why this function uses the "mask top 8 bits" version
of the hash. Fix incorrect compile assertion that required sizes that are multiples
of four. This function works on sizes that are multiples of two. Also fixed a spelling
error where we called it a "multible".
(WTF::StringHasher::defaultConverter): Use character instead of ch.
(WTF::StringHasher::addCharactersToHash): Eliminated unnecessary local variable.
2013-02-18 Alexey Proskuryakov <ap@apple.com>
Make HexNumber functions return 8-bit strings
https://bugs.webkit.org/show_bug.cgi?id=110152
Reviewed by Michael Saboff.
* wtf/HexNumber.h:
(Internal):
(WTF::Internal::hexDigitsForMode):
(WTF::appendByteAsHex):
(WTF::placeByteAsHexCompressIfPossible):
(WTF::placeByteAsHex):
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
Use LChar everywhere.
2013-02-18 Benjamin Poulain <bpoulain@apple.com>
Remove Vector::dataSlot(), it has no implementation
https://bugs.webkit.org/show_bug.cgi?id=109999
Reviewed by Andreas Kling.
VectorBufferBase does not implement any function bufferSlot().
The file only compiles because that part of the template is never
instantiated.
* wtf/Vector.h:
2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735
Unreviewed, build fix when NETSCAPE_PLUGIN_API is disabled.
Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH even if
NETSCAPE_PLUGIN_API is disabled (Qt, Efl, GTK, WX ports).
* wtf/FeatureDefines.h:
2013-02-18 Balazs Kilvady <kilvadyb@homejinni.com>
MIPS DFG implementation.
https://bugs.webkit.org/show_bug.cgi?id=101328
Reviewed by Oliver Hunt.
DFG implementation for MIPS.
* wtf/Platform.h:
2013-02-18 Zan Dobersek <zdobersek@igalia.com>
Stop placing std::isfinite and std::signbit inside the global scope
https://bugs.webkit.org/show_bug.cgi?id=109817
Reviewed by Darin Adler.
Prefix calls to the isfinite and signbit methods with std:: as the two
methods are no longer being imported into the global scope.
On Solaris and OpenBSD platforms or when using Visual C++ the two methods
are now defined (as incompatibility workarounds) inside the std namespace.
* wtf/DateMath.cpp:
(WTF::timeClip):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/MathExtras.h:
(std):
(std::isfinite):
(std::signbit):
(lrint):
(wtf_pow):
(decomposeDouble):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/dtoa.cpp:
(WTF::dtoa):
2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735
Reviewed by Darin Adler and Benjamin Poulain.
Introduce FeatureDefines.h by combining the existing rules from
Platform.h and adding new rules for all the ENABLE flags that are
listed in the FeatureFlags wiki.
The new rules are not used at the moment by any ports
as the port specific build systems already define these flags
so the !defined() guard will prevent redefinition of the macros.
* GNUmakefile.list.am: Add FeatureDefines.h.
* WTF.gypi: Ditto.
* WTF.pro: Ditto.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/FeatureDefines.h: Added.
* wtf/Platform.h: Move macro definitions to FeatureDefines.h.
2013-02-16 Darin Adler <darin@apple.com>
Remove redundant use of inline keyword in StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=110036
Reviewed by Geoffrey Garen.
I have some other improvements for StringHasher.h, but wanted to get the simplest ones
out of the way first.
* wtf/StringHasher.h: Remove inline keyword on functions inside the class definition,
since functions defined inside the class are automatically inline.
2013-02-15 Martin Robinson <mrobinson@igalia.com>
[GTK] Spread the gyp build files throughout the tree
https://bugs.webkit.org/show_bug.cgi?id=109960
Reviewed by Dirk Pranke.
* WTF.gyp/WTFGTK.gyp: Renamed from Source/WebKit/gtk/gyp/WTF.gyp.
2013-02-15 Anders Carlsson <andersca@apple.com>
Add HashMap::isValidKey and HashSet::isValidValue
https://bugs.webkit.org/show_bug.cgi?id=109977
Reviewed by Sam Weinig and Darin Adler.
Add helper functions for determining whether keys are valid, i.e. if
they are _not_ empty or deleted according to the hash traits.
* wtf/HashMap.h:
* wtf/HashSet.h:
2013-02-15 Laszlo Gombos <l.gombos@samsung.com>
Remove support for RVCT version less than 4.0
https://bugs.webkit.org/show_bug.cgi?id=109390
The 4.0 version of the RVCT compiler was
released in 2008.
Remove support for version older then 4.0 of RVCT,
and keep the support for newer RVCT versions.
Reviewed by Zoltan Herczeg.
* WTF.gypi: Remove StringExtras.cpp.
* WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
* WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
* wtf/CMakeLists.txt: Remove StringExtras.cpp.
* wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
* wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
* wtf/Float64Array.h: Ditto.
* wtf/Int16Array.h: Ditto.
* wtf/Int32Array.h: Ditto.
* wtf/Int8Array.h: Ditto.
* wtf/MathExtras.h: Remove a quirk needed for RVCT version <= 3.0.
* wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
* wtf/StringExtras.cpp: Removed.
* wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
* wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
* wtf/Uint32Array.h: Ditto.
* wtf/Uint8Array.h: Ditto.
* wtf/Uint8ClampedArray.h: Ditto.
2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add CString operators for comparison with const char*
https://bugs.webkit.org/show_bug.cgi?id=109947
Reviewed by Darin Adler.
Add operators to WTF::CString for equality/inequality comparison
with const char* strings. This avoids constructing a CString
from a const char* in such cases, which is can be expensive as
it would copy it and call strlen().
* wtf/text/CString.cpp:
(WTF::operator==): Use memcmp instead of strncmp to compare the
CString buffers as we know they are the same size and we don't
want to scan for terminating null byte.
(WTF):
* wtf/text/CString.h:
(WTF):
(WTF::operator!=):
2013-02-15 Geoffrey Garen <ggaren@apple.com>
Merged the global function cache into the source code cache
https://bugs.webkit.org/show_bug.cgi?id=108660
Reviewed by Sam Weinig.
Responding to review comments by Darin Adler.
* wtf/HashTraits.h: Added a using directive to simplify client code.
2013-02-14 Dan Bernstein <mitz@apple.com>
No easy way to use a RetainPtr as a key in a HashMap using object (rather than pointer) equality
https://bugs.webkit.org/show_bug.cgi?id=109864
Reviewed by Sam Weinig and Benjamin Poulain.
Added RetainPtrObjectHashTraits and RetainPtrObjectHash, which use CFEqual
and CFHash.
* wtf/RetainPtr.h:
(RetainPtrObjectHashTraits):
(WTF::RetainPtrObjectHashTraits::emptyValue):
(WTF::RetainPtrObjectHashTraits::constructDeletedValue):
(WTF::RetainPtrObjectHashTraits::isDeletedValue):
(WTF):
(WTF::RetainPtrObjectHash::hash):
(WTF::RetainPtrObjectHash::equal):
(RetainPtrObjectHash):
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
https://bugs.webkit.org/show_bug.cgi?id=96934
* WTF.vcproj/WTF.sln: Modified property svn:eol-style.
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style CRLF for .sln files.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 David Kilzer <ddkilzer@apple.com>
[Mac] Clean up WARNING_CFLAGS
<http://webkit.org/b/109747>
<rdar://problem/13208373>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Use
GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
-Wshorten-64-to-32 rather than WARNING_CFLAGS.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 Eric Seidel <eric@webkit.org>
String(Vector) behaves differently from String(vector.data(), vector.size()) for vectors with inline capacity in the size=0 case
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Darin Adler.
This makes String(Vector) never return null strings.
Which matches behavior of String(UChar*, size_t)
for vectors with inlineCapacity, but differs from
String(UChar*, size_t) in the no-inlineCapacity case.
This incidentally will fix a behavioral regression
in the html threaded parser which came from converting
many String(UChar*, size_t) callsites to using String(Vector).
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-14 Eric Seidel <eric@webkit.org>
REGRESSION(r142712): attribute values show up as "(null)" instead of null with the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Benjamin Poulain.
When I changed many callsites to use the (existing) String(Vector) constructor
I inadvertantly made those callsites convert empty vectors to null strings
instead of empty strings (like String(UChar,size_t) does).
This is due to an oddity/bug in our Vector implementation where data()
will be 0 if the Vector is empty, but only if it doesn't have inline capacity.
https://bugs.webkit.org/show_bug.cgi?id=109792
This changes String(Vector) to exactly match the behavior of String(vector.data(), vector.size()).
This regression was easily detectable with the threaded parser, because we use String
instead of AtomicString in our CompactToken (used to send the Token data
between threads). The main-thread parser path uses AtomicHTMLToken which
uses AtomicString(Vector) and does not have this bug.
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-13 Zan Dobersek <zdobersek@igalia.com>
The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
https://bugs.webkit.org/show_bug.cgi?id=109325
Reviewed by Anders Carlsson.
Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
two methods as they're provided by the C++ standard library being used.
* wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
* wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/IntegralTypedArrayBase.h:
(WTF::IntegralTypedArrayBase::set):
* wtf/MathExtras.h:
(std):
(std::isinf):
(wtf_fmod):
(wtf_pow):
(doubleToInteger):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set):
2013-02-13 Eric Seidel <eric@webkit.org>
Don't copy Vector<UChar> when passing to new String methods from bug 109617
https://bugs.webkit.org/show_bug.cgi?id=109708
Reviewed by Tony Gentilcore.
Thanks for the catch Darin.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
2013-02-13 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove remaining dead code from the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109707
Reviewed by Philippe Normand.
* wtf/unicode/Unicode.h:
2013-02-13 Andrew Wilson <atwilson@chromium.org>
Unreviewed Chromium gyp-file cleanup after glib backend removal.
https://bugs.webkit.org/show_bug.cgi?id=109672
Removed references to GLib unicode backend:
* WTF.gyp/WTF.gyp:
* WTF.gypi:
2013-02-12 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109627
Reviewed by Benjamin Poulain.
Remove references to the GLib unicode backend from WTF.
* GNUmakefile.list.am: Remove GLib unicode files from the source list.
* wtf/unicode/glib/UnicodeGLib.cpp: Removed.
* wtf/unicode/glib/UnicodeGLib.h: Removed.
2013-02-12 Takeshi Yoshino <tyoshino@google.com>
Remove unnecessary and confusing includes from StreamBuffer.h.
https://bugs.webkit.org/show_bug.cgi?id=109652
Reviewed by Benjamin Poulain.
StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
FixedArray.h and PassOwnPtr.h are included but not used.
VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
is even slower).
* wtf/StreamBuffer.h:
2013-02-12 Eric Seidel <eric@webkit.org>
Teach more WTF string classes about vectors with inline capacity
https://bugs.webkit.org/show_bug.cgi?id=109617
Reviewed by Benjamin Poulain.
The HTML and WebVTT parsers use constructions like:
AtomicString name(m_name.data(), m_name.size())
all over the place because they use inline capacity
on the parse vectors for performance.
This change just add the necessary template variants
to the related String constructors/methods in WTF so that
this parser code can just pass the vector directly instead.
I'll do the actual parser cleanups in follow-up patches to keep things simple.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/WTFString.h:
(String):
(WTF::String::make8BitFrom16BitSource):
(WTF):
(WTF::append):
2013-02-11 Oliver Hunt <oliver@apple.com>
Build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
https://bugs.webkit.org/show_bug.cgi?id=109534
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2013-02-11 David Kilzer <ddkilzer@apple.com>
[iOS] Upstream changes to Platform.h
<http://webkit.org/b/109459>
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
- Changes for armv7s.
- Add ENABLE() definitions for DASHBOARD_SUPPORT and WEBGL.
- Re-sort ENABLE() and USE() macros.
- Remove ENABLE() macros for JIT, LLINT and YARR_JIT to enable
on iOS Simulator. They are already defined below.
- Turn off HAVE(HOSTED_CORE_ANIMATION) for iOS.
- Turn on USE(COREMEDIA) for iOS 6.0 and later.
2013-02-08 Oliver Hunt <oliver@apple.com>
Harden FastMalloc (again)
https://bugs.webkit.org/show_bug.cgi?id=109334
Reviewed by Mark Hahnenberg.
Re-implement hardening of linked lists in TCMalloc.
In order to keep heap introspection working, we need to thread the
heap entropy manually as the introspection process can't use the
address of a global in determining the mask. Given we now have to
thread a value through anyway, I've stopped relying on ASLR for entropy
and am simply using arc4random() on darwin, and time + ASLR everywhere
else.
I've also made an explicit struct type for the FastMalloc singly linked
lists, as it seemed like the only way to reliably distinguish between
void*'s that were lists vs. void* that were not. This also made it
somewhat easier to reason about things across processes.
Verified that all the introspection tools work as expected.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(HardenedSLL):
(WTF::HardenedSLL::create):
(WTF::HardenedSLL::null):
(WTF::HardenedSLL::setValue):
(WTF::HardenedSLL::value):
(WTF::HardenedSLL::operator!):
(WTF::HardenedSLL::operator UnspecifiedBoolType):
(TCEntry):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
(WTF::SLL_Push):
(WTF::SLL_Pop):
(WTF::SLL_PopRange):
(WTF::SLL_PushRange):
(WTF::SLL_Size):
(PageHeapAllocator):
(WTF::PageHeapAllocator::Init):
(WTF::PageHeapAllocator::New):
(WTF::PageHeapAllocator::Delete):
(WTF::PageHeapAllocator::recordAdministrativeRegions):
(WTF::Span::next):
(WTF::Span::remoteNext):
(WTF::Span::prev):
(WTF::Span::setNext):
(WTF::Span::setPrev):
(Span):
(WTF::DLL_Init):
(WTF::DLL_Remove):
(WTF::DLL_IsEmpty):
(WTF::DLL_Length):
(WTF::DLL_Prepend):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(WTF::TCMalloc_Central_FreeList::entropy):
(TCMalloc_PageHeap):
(WTF::TCMalloc_PageHeap::init):
(WTF::TCMalloc_PageHeap::scavenge):
(WTF::TCMalloc_PageHeap::New):
(WTF::TCMalloc_PageHeap::AllocLarge):
(WTF::TCMalloc_PageHeap::Carve):
(WTF::TCMalloc_PageHeap::Delete):
(WTF::TCMalloc_PageHeap::ReturnedBytes):
(WTF::TCMalloc_PageHeap::Check):
(WTF::TCMalloc_PageHeap::CheckList):
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Init):
(WTF::TCMalloc_ThreadCache_FreeList::empty):
(WTF::TCMalloc_ThreadCache_FreeList::Push):
(WTF::TCMalloc_ThreadCache_FreeList::PushRange):
(WTF::TCMalloc_ThreadCache_FreeList::PopRange):
(WTF::TCMalloc_ThreadCache_FreeList::Pop):
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
(TCMalloc_ThreadCache):
(WTF::TCMalloc_Central_FreeList::Init):
(WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
(WTF::TCMalloc_Central_FreeList::InsertRange):
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
(WTF::TCMalloc_Central_FreeList::FetchFromSpans):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Init):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
(WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
(WTF::TCMalloc_ThreadCache::InitModule):
(WTF::TCMalloc_ThreadCache::NewHeap):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h:
(RemoteMemoryReader):
2013-02-11 Enrica Casucci <enrica@apple.com>
Add ENABLE_DELETION_UI to control the use of the deletion UI.
https://bugs.webkit.org/show_bug.cgi?id=109463.
ENABLE_DELETION_UI is set to 1 by default for
all ports. It is explicitly enabled for MAC and disabled for iOS.
Reviewed by Ryosuke Niwa.
* wtf/Platform.h:
2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Stop using smart pointers for Ecore_Timer
https://bugs.webkit.org/show_bug.cgi?id=109409
Reviewed by Kenneth Rohde Christiansen.
Remove support in OwnPtr for EFL's Ecore_Timer. It is a bad idea to use
OwnPtr for Ecore_Timer because the timer handle may become invalid.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
2013-02-11 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108981
Reviewed by Eric Seidel.
* wtf/BitVector.h:
(WTF::BitVector::quickGet):
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::ensureSegment):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::vprintf):
* wtf/Vector.h:
(WTF::::insert):
(WTF::::remove):
* wtf/dtoa/utils.h:
(WTF::double_conversion::StringBuilder::SetPosition):
(WTF::double_conversion::StringBuilder::AddSubstring):
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Consolidate the way WTF_USE_PTHREADS is enabled
https://bugs.webkit.org/show_bug.cgi?id=108191
Reviewed by Benjamin Poulain.
Define WTF_USE_PTHREADS to 1 on all OS(UNIX) environments.
* WTF.gyp/WTF.gyp: Remove duplicated definition of WTF_USE_PTHREADS.
* wtf/Platform.h:
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Refactor the way HAVE_XXX macros are set
https://bugs.webkit.org/show_bug.cgi?id=108132
Reviewed by Benjamin Poulain.
OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
builds exactly one of them is enabled. Use this assumption to
cleanup Platform.h.
* wtf/Platform.h:
2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=104266
Reviewed by Philippe Normand.
Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
the existing macro naming conventions.
From Platform.h
USE() - use a particular third-party library or optional OS service
ENABLE() - turn on a specific feature of WebKit
* WTF.pri:
* wtf/Platform.h:
* wtf/gobject/GOwnPtr.cpp:
* wtf/gobject/GOwnPtr.h:
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
2013-02-08 Michael Saboff <msaboff@apple.com>
ARM_NEON Inline Assembly for copyLCharsFromUCharSource() inefficient for aligned destinations
https://bugs.webkit.org/show_bug.cgi?id=109335
Reviewed by Filip Pizlo.
Change a "do while" to a "while" so that we don't copy single characters to align the
destination when it is already aligned.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2013-02-08 Jer Noble <jer.noble@apple.com>
Bring WebKit up to speed with latest Encrypted Media spec.
https://bugs.webkit.org/show_bug.cgi?id=97037
Reviewed by Eric Carlson.
Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
* wtf/Platform.h:
2013-02-08 Adam Barth <abarth@webkit.org>
Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=107190
Reviewed by Eric Seidel.
Add the ability to create an unbound weak reference. This facility lets
you start sending messages to a WeakPtr on another thread before the
object backing the WeakPtr has actually been created.
* wtf/WeakPtr.h:
(WTF::WeakReference::createUnbound):
(WTF::WeakReference::bindTo):
(WeakReference):
(WTF::WeakReference::WeakReference):
(WTF::WeakPtr::WeakPtr):
(WeakPtr):
(WTF::WeakPtrFactory::WeakPtrFactory):
(WeakPtrFactory):
(WTF::WeakPtrFactory::revokeAll):
2013-02-08 Martin Robinson <mrobinson@igalia.com>
[GTK] Add an experimental gyp build
https://bugs.webkit.org/show_bug.cgi?id=109003
Reviewed by Gustavo Noronha Silva.
* WTF.gyp/WTF.gyp: Filter out MetaAllocator.(cpp/h) from the Chromium
build. It's only necessary for GTK+.
* WTF.gypi: Add MetaAllocator to the build for WebKitGTK+.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
https://bugs.webkit.org/show_bug.cgi?id=109051
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::WrapperBase::processPointer):
2013-02-07 David Kilzer <ddkilzer@apple.com>
Fix #endif comment from r142163 and r142183
* wtf/MainThread.h:
(WTF): s/PLATFORM/USE/
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Fix an incorrect comment from r142163
Unreviewed.
* wtf/MainThread.h:
I accidentally copied PLATFORM(IOS) instead of USE(WEB_THREAD) for the #ifdef closing.
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Upstream iOS isWebThread() and isUIThread()
https://bugs.webkit.org/show_bug.cgi?id=109130
Reviewed by Sam Weinig.
On iOS, it is sometimes necessary to differenciate the thread running WebCore,
and the thread running the UI. This patch upstream those functions.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
(WTF::isWebThread):
(WTF::isUIThread):
Return true when the current thread is the Web/UI thread.
* wtf/mac/MainThreadMac.mm:
(WTF::isUIThread):
(WTF::isWebThread):
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
Use the newly added methods.
2013-02-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build without 3D_GRAPHICS
https://bugs.webkit.org/show_bug.cgi?id=109194
Reviewed by Noam Rosenthal.
Now that Coordinated Graphics was moved to WebCore, we need to explicitly enable
it when we have 3D_GRAPHICS. This dependency was implicitly by the fact that
3D_GRAPHICS is a dependency of WebKit2 and Coordinated Graphics was only
available there. This should fix build for Qt SH4 Linux.
* wtf/Platform.h:
2013-02-06 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Fix erroneous header inclusions in WTFURL code
https://bugs.webkit.org/show_bug.cgi?id=109040
Reviewed by Benjamin Poulain.
Include WTFURL API headers from files in Source/WTF/wtf/url/src
by specifying their relative path to Source/WTF.
* GNUmakefile.am: The changes make it possible to compile the WTF library
without specifying both Source/WTF/wtf/url/api and Source/WTF/wtf/url/src
as inclusion directories in CPPFLAGS, so remove these two entries.
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Include the URLParse.h header by specifying
only the base name as it's located in the same directory.
* wtf/url/src/URLCanonQuery.cpp:
* wtf/url/src/URLUtil.h:
2013-02-06 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
https://bugs.webkit.org/show_bug.cgi?id=107262
Reviewed by Yury Semikhatsky.
We need a way to calculate class name for a pointer automatically.
Otherwise we need to write className manually in all the instrumentation methods.
And for all reported but not instrumented classes.
C++ can do that for us with help of typeid but unfortunatelly it requires rtti.
There is another way to do that. C++ preprocessor provides a define which has a function name.
For g++ and clang it is __PRETTY_FUNCTION__.
For MSVC it is __FUNCTION__.
The content of the string is a function signature.
We can use it because it has the name of the template argument.
The format is sligthly different. That's why I made two different parsers.
One for MSVC the other for GCC, Clang etc.
The other problem is the resulting binary size.
I made very simple function that does the only thing, returns the smallest possible function signature.
Unfortunatelly MSVC doesn't generate template argument name for functions.
It does this only for classes.
* wtf/MemoryInstrumentation.cpp:
(WTF):
(WTF::className):
(WTF::MemoryClassInfo::callReportObjectInfo):
(WTF::MemoryClassInfo::init):
* wtf/MemoryInstrumentation.h:
(WTF):
(WTF::FN::fn):
(WTF::fn):
(WTF::MemoryClassInfo::MemoryClassInfo):
(MemoryClassInfo):
(WTF::::reportObjectMemoryUsage):
2013-02-05 Mark Lam <mark.lam@apple.com>
Fix EnumClass so that it can be used with switch statements.
https://bugs.webkit.org/show_bug.cgi?id=109004.
Reviewed by Sam Weinig.
* wtf/EnumClass.h:
(WTF::EnumClass::operator==):
(WTF::EnumClass::operator!=):
(WTF::EnumClass::operator<):
(WTF::EnumClass::operator<=):
(WTF::EnumClass::operator>):
(WTF::EnumClass::operator>=):
(EnumClass):
(WTF::EnumClass::operator Value):
2013-02-05 Oliver Hunt <oliver@apple.com>
Disable TCMalloc hardening as it's breaking leaks.
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
2013-02-05 Mark Lam <mark.lam@apple.com>
Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
https://bugs.webkit.org/show_bug.cgi?id=108988.
Reviewed by Alexey Proskuryakov.
* wtf/EnumClass.h:
2013-02-05 Roger Fong <roger_fong@apple.com>
Unreviewed build fix.
* wtf/FastMalloc.cpp:
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Tidy up StackBounds
https://bugs.webkit.org/show_bug.cgi?id=108889
Reviewed by Ryosuke Niwa.
* wtf/StackBounds.h:
(StackBounds):
(WTF::StackBounds::isSafeToRecurse):
(WTF::StackBounds::size):
Adopt a more conventional style for a multiline branch.
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::current):
(WTF::StackBounds::recursionLimit):
Make those method private.
Making the constructor private ensure initialize() is alwasy called on any StackBounds.
2013-02-05 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Comparison between signed and unsigned integer expressions in URLUtil.cpp
https://bugs.webkit.org/show_bug.cgi?id=108955
Reviewed by Benjamin Poulain.
* wtf/url/src/URLUtil.cpp:
(URLUtilities): Make the counter variable a signed integer to get rid of the warning.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Rationalize the use of iOS/Mac #defines in Assertions.cpp
https://bugs.webkit.org/show_bug.cgi?id=108870
Reviewed by David Kilzer.
* wtf/Assertions.cpp: Instead of using PLATFORM(MAC) and assume it works for iOS and OS X,
use CF as the guard for CFString. Similarily, USE_APPLE_SYSTEM_LOG guards code using ASL.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of length zero
https://bugs.webkit.org/show_bug.cgi?id=108894
Reviewed by Andreas Kling.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::toAtomicString): The function was returning the nullAtom for strings of length zero.
This is inconsistent with StringBuilder::toString() which always return an empty string.
This patch unifies the behavior.
2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206
Reviewed by Darin Adler.
Simplifying the utility functions that we use since we don't need a
bunch of fancy templates for this one specific call site.
* wtf/MathExtras.h:
(WTF::roundUpToPowerOfTwo):
2013-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r141905.
http://trac.webkit.org/changeset/141905
https://bugs.webkit.org/show_bug.cgi?id=108963
"Broke mac build" (Requested by tonyg-cr on #webkit).
* wtf/text/CString.cpp:
* wtf/text/CString.h:
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.h:
2013-02-05 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-04 Benjamin Poulain <bpoulain@apple.com>
Build fix for AtomicString on iOS
Unreviewed. The commit r141812 rely on isUIThread(), there is no such things
in the tree right now. Use pthread_main_np() until more thread handling is upstreamed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
2013-02-04 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108668
Reviewed by Eric Seidel.
* wtf/AVLTree.h:
(WTF::AVLTreeDefaultBSet::operator[]):
* wtf/BitArray.h:
(WTF::BitArray::set):
(WTF::BitArray::get):
* wtf/FastBitVector.h:
(WTF::FastBitVector::set):