blob: dba4643b5d694de71532ea505b2c6a310ab69c80 [file] [log] [blame]
2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
https://bugs.webkit.org/show_bug.cgi?id=105026
Reviewed by Yury Semikhatsky.
Old SFINAE test was replaced with new one based on this article:
http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(yes):
(IsInstrumented):
(no):
(WTF::MemoryInstrumentation::IsInstrumented::BaseMixin::reportMemoryUsage):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(InstrumentationSelector):
(WTF):
(WTF::::reportObjectMemoryUsage):
2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed, rolling out r137892.
http://trac.webkit.org/changeset/137892
https://bugs.webkit.org/show_bug.cgi?id=105026
it broke compilation on windows
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::reportMemoryUsage):
2012-12-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
https://bugs.webkit.org/show_bug.cgi?id=105026
Reviewed by Yury Semikhatsky.
Old SFINAE test was replaced with new one based on this article:
http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(yes):
(IsInstrumented):
(no):
(WTF::MemoryInstrumentation::IsInstrumented::BaseMixin::reportMemoryUsage):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(InstrumentationSelector):
(WTF):
(WTF::::reportObjectMemoryUsage):
2012-12-14 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add data grid for exploring native heap graph
https://bugs.webkit.org/show_bug.cgi?id=105012
Reviewed by Pavel Feldman.
Do not report edges with null target.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):
2012-12-13 Filip Pizlo <fpizlo@apple.com>
Attempt to rationalize and simplify WTF::binarySearch
https://bugs.webkit.org/show_bug.cgi?id=104890
Reviewed by Maciej Stachowiak.
Binary search now has three modes:
The default: assert that the key was found, but return an adjacent element if it
wasn't found, if asserts are turned off.
tryBinarySearch: return 0 if the key wasn't found.
approximateBinarySearch: if the key is not found, return an adjacent element (either
the left or right; no guarantee which).
This also reduces the number of variants of binarySearch. The functor variant is now
gone because binarySearch now always uses a functor for the key extractor. The
generic variant is now gone because binarySearch always expects an array type that
can do operator[].
* wtf/StdLibExtras.h:
(WTF::binarySearchImpl):
(WTF::binarySearch):
(WTF::tryBinarySearch):
(WTF::approximateBinarySearch):
2012-12-13 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: do not validate pointers to objects in RenderArena agains tcmalloc data.
https://bugs.webkit.org/show_bug.cgi?id=104903
Reviewed by Yury Semikhatsky.
This is a simplest approach to do that with zero performance overhead.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::setCustomAllocation):
(WTF):
* wtf/MemoryInstrumentation.h:
(MemoryClassInfo):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::customAllocation):
(WTF::MemoryObjectInfo::setCustomAllocations):
(MemoryObjectInfo):
2012-12-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
https://bugs.webkit.org/show_bug.cgi?id=104796
Reviewed by Yury Semikhatsky.
It was not a good idea to introduce a fake root MemoryObjectInfo.
It makes a problem when we visit an object without its own MemoryObjectType.
Example: RenderBox has a global pointer to a hash map.
HashMap doesn't have its own object type because it is a generic container.
It will inherit object type from the fake root memory object info.
The same could happen for another container in another class with other MemoryObjectType.
This fact forces me to create custom process method for root objects
because they need to have their own MemoryObjectInfo with customisable memory object type.
Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
for instrumented and not instrumented object classes.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::WrapperBase::WrapperBase):
(WTF::MemoryInstrumentation::WrapperBase::process):
(WTF::MemoryInstrumentation::WrapperBase::processRootObjectRef):
(WTF):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
(MemoryInstrumentation):
(WrapperBase):
(WTF::MemoryInstrumentation::WrapperBase::~WrapperBase):
(Wrapper):
(OwningTraits):
(WTF::MemoryInstrumentation::OwningTraits::addRootObject):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::Wrapper):
(WTF::::callReportMemoryUsage):
2012-12-12 Sergio Martins <sergio.martins@kdab.com>
Fix QNX Qt build by enabling JIT.
https://bugs.webkit.org/show_bug.cgi?id=102794
Reviewed by Simon Hausmann.
JIT is working, so enable it. Otherwise LLINT gets enabled, and
that doesn't compile.
YARR_JIT is crashing at this time though, so disable it.
* wtf/Platform.h:
2012-12-11 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: simplify Sequences processing code.
https://bugs.webkit.org/show_bug.cgi?id=104777
Reviewed by Yury Semikhatsky.
Redesign reportMemoryUsage for the sequences.
With the old schema we couldn't instrument HashMap<key, WebCore::LayoutUnit>
because LayoutUnit has overloaded conversion operators for double, int, etc.
I wrote an empty SequenceMemoryInstrumentationTraits for LayoutUnit class
but it doesn't help because the root of problem was hidden in the free template function reportSequenceMemoryUsage.
I could overload reportSequenceMemoryUsage too but in this case I need to fully specify all the types
for the iterators like HashMap<.....>::const_iterator. Too many letters.
I found a better solution. Free reportSequenceMemoryUsage can be converted into default implementation of static
reportMemoryUsage traits method. In this case the types of iterators will be inferred automaticaly. The old default
implementation becomes a custom implementation for the user defined types.
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationSequence.h:
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(SequenceMemoryInstrumentationTraits):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-10 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: make sure each edge is reported only once
https://bugs.webkit.org/show_bug.cgi?id=104630
Reviewed by Pavel Feldman.
Make sure that outgoing edges are reported only once if we come to the same
object twice: first by an address of a base class and then by a real address
of the object.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportLinkToBuffer):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::InstrumentedPointerBase):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::init):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(InstrumentedPointerBase):
(MemoryInstrumentation):
(InstrumentedPointer):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::::InstrumentedPointer):
(WTF::::callReportMemoryUsage):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::firstVisit):
(WTF::MemoryObjectInfo::className):
(WTF::MemoryObjectInfo::name):
(WTF::MemoryObjectInfo::setAlreadyVisited):
(MemoryObjectInfo):
2012-12-10 Benjamin Poulain <benjamin@webkit.org>
Add convenience methods to use ListHashSet for a LRU cache
https://bugs.webkit.org/show_bug.cgi?id=104499
Reviewed by Sam Weinig.
ListHashSet is a great abstract data type to implement caches.
Unfortunately, the class was missing methods to do that easily and
efficiently. This patch fixes that.
The names appendOrMoveToLast() and prependOrMoveToFirst() were chosen
in favor of append()/prepend() to ensure they are not used in place of
add() by accident.
* wtf/ListHashSet.h:
(ListHashSet):
(WTF::::removeFirst):
(WTF::::appendOrMoveToLast):
(WTF::::prependOrMoveToFirst):
(WTF::::unlink):
(WTF::::unlinkAndDelete):
(WTF::::prependNode):
2012-12-10 Eric Carlson <eric.carlson@apple.com>
Add support for in-band text tracks to Mac port
https://bugs.webkit.org/show_bug.cgi?id=103663
Reviewed by Sam Weinig.
* wtf/Platform.h: Define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT.
2012-12-08 Patrick Gansterer <paroga@webkit.org>
Compiling WTF outside of WebKit failed on Windows
https://bugs.webkit.org/show_bug.cgi?id=100201
Reviewed by Darin Adler.
Explicitly use the Unicode variants of the Windows API to
allow building the WTF library without the UNICODE define.
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):
2012-12-08 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed trivial space fix to silence an automake warning.
* GNUmakefile.list.am:
2012-12-05 Halton Huo <halton.huo@intel.com>
[CMake] Unify coding style for CMake files
https://bugs.webkit.org/show_bug.cgi?id=103605
Reviewed by Laszlo Gombos.
Update cmake files(.cmake, CMakeLists.txt) with following style rules:
1. Indentation
1.1 Use spaces, not tabs.
1.2 Four spaces as indent.
2. Spacing
2.1 Place one space between control statements and their parentheses.
For eg, if (), else (), elseif (), endif (), foreach (),
endforeach (), while (), endwhile (), break ().
2.2 Do not place spaces between function and macro statements and
their parentheses. For eg, macro(), endmacro(), function(),
endfunction().
2.3 Do not place spaces between a command or function or macro and its
parentheses, or between a parenthesis and its content. For eg,
message("testing") not message( "testing") or message ("testing" )
2.4 No space at line ending.
3. Lowercase when call commands macros and functions. For eg,
add_executable() not ADD_EXECUTABLE(), set() not SET().
* CMakeLists.txt:
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:
2012-12-04 Jon Lee <jonlee@apple.com>
Extend StringHasher to take a stream of characters
https://bugs.webkit.org/show_bug.cgi?id=104076
<rdar://problem/12811887>
Reviewed by Darin Adler.
We essentially move computeHash() to a member function of StringHasher. This allows clients of the
hasher to append strings to the general hash, without having to first concatenate the strings.
* wtf/StringHasher.h:
(WTF::StringHasher::addCharacters): Same as computeHash(), except also take into account the possibility
that there is a pending character to hash. If this is the case, we align the word boundary by consuming the
first character in data, adjust the length, move the data pointer forward one, and update the hasher's
pending character state. Also add an early return so that we are guaranteed at least one character in case
we run into this situation.
(WTF::StringHasher::computeHash): Refactor into addCharacters().
2012-12-04 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: simplify reportMemoryUsage signature
https://bugs.webkit.org/show_bug.cgi?id=104028
Reviewed by Vsevolod Vlasov.
Removed const& modifier from instrumented pointer type. Was const T* const&,
now it is const T*
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-01 Filip Pizlo <fpizlo@apple.com>
JSC should be able to report profiling data associated with the IR dumps and disassembly
https://bugs.webkit.org/show_bug.cgi?id=102999
Reviewed by Gavin Barraclough.
Made some minor changes to support the new profiler. FileOutputStream now has an
open() method, and DataLog uses it. StringPrintStream has a reset() method, which
allows you to reuse the same StringPrintStream for creating multiple strings.
SegmentedVector now has a const operator[]. And, WTFString now can do fromUTF8() on
a CString directly.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
* wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::open):
(WTF):
* wtf/FilePrintStream.h:
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::at):
(SegmentedVector):
(WTF::SegmentedVector::operator[]):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::reset):
(WTF):
* wtf/StringPrintStream.h:
(StringPrintStream):
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-12-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r136597.
http://trac.webkit.org/changeset/136597
https://bugs.webkit.org/show_bug.cgi?id=104065
broke Windows compilation (Requested by yurys on #webkit).
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-04 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: simplify reportMemoryUsage signature
https://bugs.webkit.org/show_bug.cgi?id=104028
Reviewed by Vsevolod Vlasov.
Removed const& modifier from instrumented pointer type. Was const T* const&,
now it is const T*
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-03 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: NMI introduce heap graph recording API
https://bugs.webkit.org/show_bug.cgi?id=103232
Reviewed by Vsevolod Vlasov.
MemoryInstrumentationClient is extended with several methods for reporting
heap graph vertices and edges. Edge source is always idenfied by heap object
address. Target node might be either a destination object address(either real
or adjusted if the edge was retrieved from a pointer to a base class) or a
MemoryObjectInfo in case of internal buffers.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::reportEdge):
(WTF):
(WTF::MemoryInstrumentation::reportLinkToBuffer): report edge between the object
and a buffer which it owns.
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentationClient::reportNode):
(WTF::MemoryInstrumentationClient::reportEdge):
(WTF::MemoryInstrumentationClient::reportLeaf):
(WTF::MemoryInstrumentationClient::reportBaseAddress): if we found an object by a pointer
to base class it may have different value than real object address. Report both real and
adjusted addresses so that they both can be used for identifying corresponding heap graph
node.
(WTF::MemoryInstrumentation::addRootObject):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryInstrumentation::OwningTraits::addObject):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryObjectInfo.h: added methods for repoting class name and some name string.
(WTF::MemoryObjectInfo::setClassName):
(WTF::MemoryObjectInfo::setName):
(MemoryObjectInfo):
2012-12-03 Filip Pizlo <fpizlo@apple.com>
Replace JSValue::description() with JSValue::dump(PrintStream&)
https://bugs.webkit.org/show_bug.cgi?id=103866
Reviewed by Darin Adler.
Make it easier to get a String from a StringPrintStream.
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::toString):
* wtf/StringPrintStream.h:
(StringPrintStream):
(WTF::toString):
2012-12-02 Filip Pizlo <fpizlo@apple.com>
It should be possible to build and run with DFG_ENABLE(PROPAGATION_VERBOSE)
https://bugs.webkit.org/show_bug.cgi?id=103848
Reviewed by Sam Weinig.
Increase the variadicity of dataLog() and print(), and add a pointerDump()
which allows passing a pointer to something that has a printInternal(). If
the pointer is null, it'll print "(null)"; otherwise it'll invoke the
printInternal() function.
* wtf/DataLog.h:
(WTF):
(WTF::dataLog):
* wtf/PrintStream.h:
(PrintStream):
(WTF::PrintStream::print):
(WTF):
(PointerDump):
(WTF::PointerDump::PointerDump):
(WTF::PointerDump::dump):
(WTF::pointerDump):
2012-11-30 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
https://bugs.webkit.org/show_bug.cgi?id=99314
Reviewed by Tor Arne Vestbø.
This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
shared libraries.
It's a big refactoring that mostly involves moving WebCore dependent
code into QtWebKit and accessing it through exported QWebFrameAdapter
and QWebPageAdapter classes.
* wtf/text/WTFString.h:
(String): Export the QString conversions also as WTF_STRING_API.
2012-11-29 Filip Pizlo <fpizlo@apple.com>
It should be easy to find code blocks in debug dumps
https://bugs.webkit.org/show_bug.cgi?id=103623
Reviewed by Geoffrey Garen.
Changed RawPointer to accept both const void* and void*, and use the former internally.
Cleaned up SHA1 so that the functionality already used internally for self-testing is
available via the API. This includes addBytes(CString) and computing hex digests.
* wtf/RawPointer.h:
(WTF::RawPointer::RawPointer):
(RawPointer):
(WTF::RawPointer::value):
* wtf/SHA1.cpp:
(WTF::expectSHA1):
(WTF::SHA1::hexDigest):
(WTF::SHA1::computeHexDigest):
* wtf/SHA1.h:
(WTF::SHA1::addBytes):
2012-11-29 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r136096.
* wtf/StringPrintStream.cpp: Added missing include file.
2012-11-28 Filip Pizlo <fpizlo@apple.com>
SpeculatedType dumping should not use the static char buffer[thingy] idiom
https://bugs.webkit.org/show_bug.cgi?id=103584
Reviewed by Michael Saboff.
Added a StringPrintStream, and made it easy to create dumpers for typedefs to primitives.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PrintStream.cpp:
(WTF::dumpCharacter):
* wtf/PrintStream.h:
(WTF::printInternal):
* wtf/StringPrintStream.cpp: Added.
(WTF::StringPrintStream::StringPrintStream):
(WTF::StringPrintStream::~StringPrintStream):
(WTF::StringPrintStream::vprintf):
(WTF::StringPrintStream::toCString):
(WTF::StringPrintStream::increaseSize):
* wtf/StringPrintStream.h: Added.
(StringPrintStream):
(WTF::toCString):
2012-11-28 Michael Saboff <msaboff@apple.com>
Update String Stats for recent dataLog changes and add summary
https://bugs.webkit.org/show_bug.cgi?id=103583
Reviewed by Filip Pizlo.
Updated calls to dataLog() to dataLogF() as a results of r135469.
Added total savings from 8 bit strings in bytes and as a percentage.
* wtf/text/StringImpl.cpp:
(WTF::StringStats::printStats):
2012-11-28 Roger Fong <roger_fong@apple.com>
Make DataLog work/compile properly on Windows.
https://bugs.webkit.org/show_bug.cgi?id=103544
Reviewed by Filip Pizlo.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2012-11-28 Filip Pizlo <fpizlo@apple.com>
It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count)
https://bugs.webkit.org/show_bug.cgi?id=103009
Reviewed by Michael Saboff.
Added the ability to use out.print(...) and dataLog(...) variadically and with
WTF::printInternal(PrintStream&, const T&) overloads for any type T that you want
to be able to pass as an argument to out.print() or dataLog(). Also added one
example class for doing this: RawPointer, which can be used to force a pointer
to be printed as "%p" rather than matching any overloads that you might want to
introduce.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DataLog.h:
(WTF):
(WTF::dataLog):
* wtf/PrintStream.cpp:
(WTF::printInternal):
(WTF):
* wtf/PrintStream.h:
(PrintStream):
(WTF::PrintStream::print):
(WTF):
* wtf/RawPointer.h: Added.
(WTF):
(RawPointer):
(WTF::RawPointer::RawPointer):
(WTF::RawPointer::value):
2012-11-27 Filip Pizlo <fpizlo@apple.com>
Convert some remaining uses of FILE* to PrintStream&.
Rubber stamped by Mark Hahnenberg.
* wtf/BitVector.cpp:
(WTF::BitVector::dump):
* wtf/BitVector.h:
(BitVector):
2012-11-27 Pratik Solanki <psolanki@apple.com>
objc/objc-runtime.h does not exist on all PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=101780
Reviewed by Brent Fulgham.
Clean up header includes so we don't include objc/objc-runtime.h.
* wtf/Functional.h:
* wtf/ObjcRuntimeExtras.h: Include objc/message.h here so we don't rely on proper ordering
of includes in files that include this header.
2012-11-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r135828.
http://trac.webkit.org/changeset/135828
https://bugs.webkit.org/show_bug.cgi?id=103405
[Chromium] Multiple ASAN errors after a WebKit roll due to
mismatched malloc/delete (not free) resulting from
StringImpl::deref() (Requested by apavlov on #webkit).
* wtf/FastAllocBase.h:
* wtf/Platform.h:
2012-11-26 Adam Barth <abarth@webkit.org>
[Chromium] fastMalloc has an extra branch on Windows
https://bugs.webkit.org/show_bug.cgi?id=103027
Reviewed by Eric Seidel.
There's no need to override the new/delete operators on non-Mac
platform because:
1) We use the system malloc anyway.
2) We've modified the system malloc to crash in out-of-memory conditions.
This patch removes a branch (and a call) from malloc, which will
hopefully improve performance. I haven't measured the performance
characteristics of this patch, but I will look at the graphs closely
when landing.
* wtf/FastAllocBase.h:
* wtf/Platform.h:
2012-11-26 Filip Pizlo <fpizlo@apple.com>
DataLog to a file should work if there are multiple processes using WTF
https://bugs.webkit.org/show_bug.cgi?id=103323
Reviewed by Mark Hahnenberg.
Whereas before DataLog would open a file with the name you specified, now it'll open a file with the
name plus the PID appended to it. So if you are dealing with multiple processes running with DataLog
to a file enabled, you'll get multiple separate log files.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2012-11-26 Zeno Albisser <zeno@webkit.org>
[Qt] Fix the LLInt build on Mac
https://bugs.webkit.org/show_bug.cgi?id=97587
Reviewed by Simon Hausmann.
* wtf/InlineASM.h:
Use OS(DARWIN) instead of PLATFORM(MAC),
in order to allow Qt to use the same code.
* wtf/Platform.h:
2012-11-26 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r135640.
* wtf/DataLog.cpp:
2012-11-24 Adam Barth <abarth@webkit.org>
Chromium should use TCMalloc on Mac to go fast
https://bugs.webkit.org/show_bug.cgi?id=102866
Reviewed by Eric Seidel.
This patch enables TCMalloc for some WebKit objects. It improves
dom-modify on Mac by 5-10%.
On non-Mac platforms, Chromium already uses TCMalloc throughout the
project. Unfortunately, we haven't yet figured out how to turn TCMalloc
on globally on Mac because the approach we use for other platforms makes
some OS X APIs sad.
The next best thing would be to enable TCMalloc for WebKit by
overriding the global new and delete operator, as is done on apple-mac
and other platforms. Unfortunately, we cannot use that approach either
because the Chromium WebKit API is not memory tight.
Fortunately, WebKit has a mechanism for selectively enabling TCMalloc
for a selection of objects by overriding the new and delete operators
on those objects. This patch opts chromium-mac into that scheme by
setting the appropriate preprocessor macros.
* WTF.gyp/WTF.gyp:
* wtf/Platform.h:
2012-11-21 Filip Pizlo <fpizlo@apple.com>
Any function that can log things should be able to easily log them to a memory buffer as well
https://bugs.webkit.org/show_bug.cgi?id=103000
Reviewed by Sam Weinig.
We have a number of places where we pass around a FILE* as a target to which to print
some logging information. But the purpose of passing FILE* instead of always assuming
that we should dump to stderr is that it may be sometimes useful to send the logging
information elsewhere. Unfortunately, FILE* isn't quite powerful enough: it's combersome
to use it to send logging to a string, for example.
We could get around this by using <iostream> and <sstream>, but so far this aspect of
C++ has not been part of the WebKit coding conventions. Personally I find <iostream>
awkward due to its abuse of operator overloading.
So this patch introduces the PrintStream abstract class, which offers printf-like
functionality while completely abstracting the destination and mechanism of the printing
output. It would be trivial to implement a StringPrintStream, for example. This will feed
into work on https://bugs.webkit.org/show_bug.cgi?id=102999.
This also sets us up for creating templatized print() and println() methods that will
allow us to say things like out.print("count = ", count, "\n"), but that is the topic
of https://bugs.webkit.org/show_bug.cgi?id=103009.
This patch also changes dataLog() to use FilePrintStream internally, and WTF::dataFile()
now returns a FilePrintStream&. Any previous users of WTF::dataFile() have been changed
to expect a PrintStream&.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DataLog.cpp:
(WTF):
(WTF::initializeLogFileOnce):
(WTF::initializeLogFile):
(WTF::dataFile):
(WTF::dataLogV):
(WTF::dataLogString):
* wtf/DataLog.h:
(WTF):
* wtf/FilePrintStream.cpp: Added.
(WTF):
(WTF::FilePrintStream::FilePrintStream):
(WTF::FilePrintStream::~FilePrintStream):
(WTF::FilePrintStream::vprintf):
(WTF::FilePrintStream::flush):
* wtf/FilePrintStream.h: Added.
(WTF):
(FilePrintStream):
(WTF::FilePrintStream::file):
* wtf/PrintStream.cpp: Added.
(WTF):
(WTF::PrintStream::PrintStream):
(WTF::PrintStream::~PrintStream):
(WTF::PrintStream::printf):
(WTF::PrintStream::print):
(WTF::PrintStream::println):
(WTF::PrintStream::flush):
(WTF::print):
* wtf/PrintStream.h: Added.
(WTF):
(PrintStream):
(WTF::print):
(WTF::println):
2012-11-23 Robert Kroeger <rjkroege@chromium.org>
Remove unused ScrollByPixelVelocity
https://bugs.webkit.org/show_bug.cgi?id=102840
Reviewed by Sam Weinig.
The GESTURE_ANIMATION feature turns on code in WebCore is unused.
Remove it.
No new tests: code removal/cleanup.
* wtf/Platform.h:
2012-11-23 Laszlo Gombos <l.gombos@samsung.com>
[EFL] Define WTF_PLATFORM_EFL in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=101482
Reviewed by Kenneth Rohde Christiansen.
Define WTF_PLATFORM_EFL in Platform.h to be consistent with
other ports.
* wtf/Platform.h:
2012-11-16 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
https://bugs.webkit.org/show_bug.cgi?id=102510
Reviewed by Pavel Feldman.
Moved MemoryObjectInfo into separate header. Moved definition of MemoryInstrumentation
methods that depend on MemoryObjectInfo declaration into MemoryInstrumentation.cpp to
make MemoryInstrumentation require only forward declaration of MemoryObjectInfo.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* wtf/CMakeLists.txt:
* wtf/MemoryInstrumentation.cpp: Added.
(WTF):
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::~MemoryInstrumentation):
(WTF::MemoryInstrumentation::getObjectType): this method allows to get object type without
pulling in MemoryObjectInfo.h and all its dependencies.
(WTF::MemoryInstrumentation::callReportObjectInfo):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::InstrumentedPointerBase):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::init):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addRootObject):
(InstrumentedPointerBase):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(InstrumentedPointer):
(WTF::MemoryInstrumentation::addObject): we now pass owner's MemoryObjectInfo in all places
where we report objects pointed by the owner.
(WTF::MemoryInstrumentation::OwningTraits::addObject):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::InstrumentedPointer):
(WTF::::callReportMemoryUsage):
* wtf/MemoryObjectInfo.h: Added.
(WTF):
(MemoryObjectInfo):
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::objectType):
(WTF::MemoryObjectInfo::objectSize):
(WTF::MemoryObjectInfo::reportedPointer):
(WTF::MemoryObjectInfo::memoryInstrumentation):
(WTF::MemoryObjectInfo::reportObjectInfo):
2012-11-23 Krzysztof Czech <k.czech@samsung.com>
[EFL] Platform support for Accessibility feature.
https://bugs.webkit.org/show_bug.cgi?id=100848
Reviewed by Gyuyoung Kim.
Enable HAVE(ACCESSIBILITY) ifdefs so that EFL port can use it.
* wtf/Platform.h:
2012-11-22 Michael Saboff <msaboff@apple.com>
HTML integer parsing functions don't natively handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=102997
Reviewed by Filip Pizlo.
Added exports to the LChar* versions of charactersToIntStrict() and charactersToUIntStrict()
to support the changes made to parseHTMLInteger() and parseHTMLNonNegativeInteger().
* wtf/text/WTFString.h:
(WTF::charactersToIntStrict): Added export
(WTF::charactersToUIntStrict): Added export
2012-11-21 Filip Pizlo <fpizlo@apple.com>
Rename dataLog() and dataLogV() to dataLogF() and dataLogFV()
https://bugs.webkit.org/show_bug.cgi?id=103001
Rubber stamped by Dan Bernstein.
* wtf/DataLog.cpp:
(WTF::dataLogFV):
(WTF::dataLogF):
(WTF::dataLogFString):
* wtf/DataLog.h:
(WTF):
* wtf/HashTable.cpp:
(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(WTF::HashTable::Stats::dumpStats):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::dumpProfile):
* wtf/StackStats.cpp:
(WTF::StackStats::initialize):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
* wtf/text/WTFString.cpp:
(String::show):
2012-11-21 Anthony G. Basile <blueness@gentoo.org>
Source/WTF/wtf/Assertions.cpp: fix build on a uClibc system
https://bugs.webkit.org/show_bug.cgi?id=102946
Reviewed by Tony Chang.
Webkit-Gtk fails to build on a uClibc system because
Assertions.cpp assumes that all Linux systems have execinfo.h
and provide backtrace(). This is not necessarily the case for
uClibc which can be configured without these. This patch
refines the check for OS(LINUX) to prevent this breakage.
Originally reported at https://bugs.gentoo.org/441674
* wtf/Assertions.cpp:
2012-11-19 Filip Pizlo <fpizlo@apple.com>
DFG should be able to cache closure calls
https://bugs.webkit.org/show_bug.cgi?id=102662
Reviewed by Gavin Barraclough.
Added support to the meta allocator for easily querying whether an address falls within
a certain allocated chunk. Also added a useful debug routine to SentinelLinkedList,
which can be used to check if a node is on a particular list.
* wtf/MetaAllocatorHandle.h:
(MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::containsIntegerAddress):
(WTF::MetaAllocatorHandle::contains):
* wtf/SentinelLinkedList.h:
(SentinelLinkedList):
(WTF::::isOnList):
(WTF):
2012-11-19 Laszlo Gombos <l.gombos@samsung.com>
Remove ReadWriteLock
https://bugs.webkit.org/show_bug.cgi?id=101637
Reviewed by Darin Adler.
Remove ReadWriteLock as it does not seems to be used.
* wtf/Platform.h: Remove the definition of HAVE_PTHREAD_RWLOCK.
* wtf/ThreadingPrimitives.h: Remove the PlatformReadWriteLock type
and the ReadWriteLock class.
* wtf/ThreadingPthreads.cpp: Remove the implementation of
the ReadWriteLock class using pthreads.
2012-11-19 Brady Eidson <beidson@apple.com>
Add 64-bit specializations for atomicIncrement and atomicDecrement
https://bugs.webkit.org/show_bug.cgi?id=102702
Reviewed by Eric Carlson.
* wtf/Atomics.h:
(WTF::atomicIncrement): Add A 64-bit version for Darwin.
(WTF::atomicDecrement): Ditto.
2012-11-18 Laszlo Gombos <l.gombos@samsung.com>
Remove non-existent directories from the make system
https://bugs.webkit.org/show_bug.cgi?id=102632
Reviewed by Adam Barth.
Remove (non-existent) symbian references from the exclude list in gyp project files.
* WTF.gyp/WTF.gyp:
2012-11-16 Michael Saboff <msaboff@apple.com>
String::fromUTF8() should take advantage of the ASCII check in convertUTF8ToUTF16()
https://bugs.webkit.org/show_bug.cgi?id=100577
Reviewed by Oliver Hunt.
Passed in ASCII flag to convertUTF8ToUTF16() and if try, create an 8 bit string from the original arguments.
Relanding after fix to https://bugs.webkit.org/show_bug.cgi?id=102482.
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-11-15 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: add code for reporting stack traces of unknown instrumented objects
https://bugs.webkit.org/show_bug.cgi?id=102384
Reviewed by Pavel Feldman.
Added an option to collect stack traces for instrumented pointers so that they
can be printed in case the check failed for the pointer. This code is hidden
behind a define.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentation::checkCountedObject): the method now returns false
in case the check has failed.
(InstrumentedPointer):
(WTF::::InstrumentedPointer):
(WTF):
(WTF::::process):
2012-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Windows Fibers can corrupt the cached StackBounds
https://bugs.webkit.org/show_bug.cgi?id=102411
Reviewed by Geoffrey Garen.
Windows has support for something called fibers, which are like lightweight versions of
threads. Multiple fibers can run within the context of a single thread and they have access
to the same thread local storage but have different stacks. If we create a new JSGlobalContext
on one fiber, then switch to another fiber and create a JSGlobalContext there, we will call
initializeThreading() once for each new JSGlobalContext created. However, since these fibers
are technically running inside the same thread, they will clobber each other's wtfThreadData(),
which is stored using thread local storage. This can lead to corruption of the WTFThreadData
structure for the fibers other than the last one to create a new JSGlobalContext, including
the StackBounds data structure which is used during conservative scanning, among other things.
This can lead to crashes during garbage collection on Windows if fibers are used.
A quick fix would be to always get a fresh StackBounds data structure when asking for it
instead of using the cached version from the thread local storage. There is a larger problem
in that these fibers can corrupt other WebKit data that uses thread local storage. We'll leave
those theoretical fixes for future theoretical bugs.
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::stack): We now refresh the m_stackBounds field whenever somebody asks for
the StackBounds.
2012-11-15 Maciej Stachowiak <mjs@apple.com>
Fix an erroneous comment about the operators required by binarySearch
https://bugs.webkit.org/show_bug.cgi?id=102406
Reviewed by Anders Carlsson.
* wtf/StdLibExtras.h: binarySearch needs '==' and '<', not '--', '<' and '>'.
2012-11-14 Michael Saboff <msaboff@apple.com>
String::append() should handle two 8 bit strings without converting both to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=102286
Reviewed by Oliver Hunt.
If both strings are 8 bit, then allocate and copy to a new 8 bit string. Since most strings are
8 bit, this will save up to 3x the resulting string length in bytes. 2x is due to the possible
surviving 16 bit source string upconversion and 1x for the 16 bit result now being 8 bit.
* wtf/text/WTFString.cpp:
(WTF::String::append):
2012-11-14 Csaba Osztrogonác <ossy@webkit.org>
[Qt][ARM] Enable the DFG JIT on ARMv7(Thumb2)
https://bugs.webkit.org/show_bug.cgi?id=101747
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2012-11-13 Christophe Dumez <christophe.dumez@intel.com>
Use prefix form of increment / decrement operators in WTF String classes when possible
https://bugs.webkit.org/show_bug.cgi?id=101859
Reviewed by Benjamin Poulain.
Use prefix form of increment / decrement operators whenever possible in
WTF String classes as this seems to be the convention in WebKit.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
* wtf/text/Base64.cpp:
(WTF::base64Encode):
(WTF::base64DecodeInternal):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::allocateBufferUpConvert):
* wtf/text/StringConcatenate.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::upconvertCharacters):
(WTF::StringImpl::containsOnlyWhitespace):
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::stripMatchedCharacters):
(WTF::StringImpl::removeCharacters):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::reverseFindInner):
(WTF::reverseFindIgnoringCaseInner):
(WTF::StringImpl::replace):
(WTF::StringImpl::createWithTerminatingNullCharacter):
* wtf/text/StringImpl.h:
(WTF::codePointCompare):
* wtf/text/WTFString.cpp:
(WTF::String::String):
(WTF::toIntegralType):
2012-11-13 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r134490.
* wtf/FastMalloc.cpp:
2012-11-13 Brent Fulgham <bfulgham@webkit.org> and Alex Christensen <alex.christensen@flexsim.com>
Fix FastMalloc.cpp compile error for MSVC in 64-bit.
https://bugs.webkit.org/show_bug.cgi?id=88344
Reviewed by Ryosuke Niwa.
MSVC will not compile array declarations of zero size. The existing
padding math for TCMalloc_Central_FreeListPadded would evaluate
to zero on 64-bit machines, preventing the compile from finishing.
* wtf/FastMalloc.cpp:
(TCMalloc_Central_FreeListPadded_Template): Add new template (and
zero-size specialization) to provide proper behavior under 64-bit
Windows build.
2012-11-13 Brent Fulgham <bfulgham@webkit.org> and Alex Christensen <alex.christensen@flexsim.com>
FastMalloc.cpp needs to be reordered before padding bug can be fixed
https://bugs.webkit.org/show_bug.cgi?id=89366
Note: This file violates Style rules. This change only moves
the TCMalloc_Central_FreeList class declaration and the various
FastMallocZone methods earlier in the file.
Reviewed by Ryosuke Niwa.
* wtf/FastMalloc.cpp:
Reordered definitions to prepare for adding specialized template
(WTF):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::length):
(WTF::TCMalloc_Central_FreeList::tc_length):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(TCMalloc_Central_FreeListPadded):
(FastMallocZone):
(WTF::FastMallocZone::goodSize):
(WTF::FastMallocZone::check):
(WTF::FastMallocZone::print):
(WTF::FastMallocZone::log):
(WTF::FastMallocZone::forceLock):
(WTF::FastMallocZone::forceUnlock):
(WTF::FastMallocZone::statistics):
(WTF::FastMallocZone::zoneValloc):
(WTF::FastMallocZone::zoneDestroy):
(WTF::KernelSupportsTLS):
(WTF::CheckIfKernelSupportsTLS):
(TCMalloc_ThreadCache):
2012-11-11 Kenichi Ishibashi <bashi@chromium.org>
WTFString::utf8() should have a mode of conversion to use replacement character
https://bugs.webkit.org/show_bug.cgi?id=101678
Reviewed by Alexander Pavlov.
Introduce conversion mode to String::utf8().
There are three conversion modes; lenient mode, strict mode, and
"replacing unpaired surrogates with the replacement character" (replacement) mode.
Lenient mode converts unpaired surrogates. Strict mode fails when there is an unpaired
surrogates and returns CString(). Replacement mode replaces unpaired surrogates with
the replacement character(U+FFFD). Replacement mode implements the algorithm defined at
http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode. WebSocket::send() requires
this algorithm to encode a string to utf-8.
* wtf/text/WTFString.cpp:
(WTF::String::utf8): Changed to take ConversionMode as the argument.
* wtf/text/WTFString.h:
(String):
2012-11-09 Alexei Filippov <alph@chromium.org>
Web Inspector: Fix heap snapshots counted several times by NMI
https://bugs.webkit.org/show_bug.cgi?id=101085
The fix moves snapshots size counting to V8PerIsolateData class. As long
as it has one instance per isolate its reportMemoryUsage should be
called once per isolate.
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer):
2012-11-08 Michael Saboff <msaboff@apple.com>
HashAndUTF8CharactersTranslator should create an 8 bit string if possible
https://bugs.webkit.org/show_bug.cgi?id=101515
Reviewed by Darin Adler.
Added isAllASCII flag that's passed to convertUTF8ToUTF16(). If on return it is true, create an
8 bit string, otherwise use the 16 bit string.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::translate):
2012-11-08 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Fix build with MSVC 2012 and Angle
https://bugs.webkit.org/show_bug.cgi?id=101588
Reviewed by Tor Arne Vestbø.
Angle includes STL's <memory> header file, which with MSVC 2012 includes stdint.h. MSVC 2012
does ship stdint.h, but it's lacking other headers such as inttypes.h.
So for the rest of WebKit we have to continue to use our own versions of these files from
JavaScriptCore/os-win32. But for Angle we are just including a shipped STL header file (memory)
and so it's up to the compiler to make that work, i.e. using the stdint.h it ships.
This patch moves the addition of JavaScriptCore/os-win32 out of default_post.prf, so that it
doesn't apply to each and every target anymore. In particular it won't apply to Angle anymore,
because its presence causes a build issue where due to the addition of os-win32/ we end up
including our own stdint.h but are lacking WTF/ to be in the include search path (which our own
stdint.h requires). So out of default_post.prf and into WTF.pri, our own wrappers are now only
used where WTF is also needed, and since os-win32/stdint.h depends on wtf/Platform.h, it seems
like a logical location.
* WTF.pri:
2012-11-07 Hans Wennborg <hans@chromium.org>
Fix asm operand type for weakCompareAndSwap on ARM_THUMB2
https://bugs.webkit.org/show_bug.cgi?id=101238
Reviewed by Benjamin Poulain.
'result' was a bool, but the asm was expecting a 32-bit register. A
recent version of Clang warned about this:
WebKit/Source/WTF/wtf/Atomics.h:163:34: error: the size being stored
is truncated, use a modifier to specify the size [-Werror,-Wasm-operand-widths]
This patch fixes it by making 'result' an unsigned. It does not change
the functionality in practice ('result' would be in a 32-bit register
anyway), but it makes the code more correct and makes the warning go
away.
Also make 'result' for the X86 version an 'unsigned char' to make it
more clear that it is a byte.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2012-11-07 Remy Demarest <rdemarest@apple.com>
Function adoptNS and adoptCF should not generate memory leak diagnostic with Clang Static Analyzer.
https://bugs.webkit.org/show_bug.cgi?id=101420
Reviewed by Benjamin Poulain.
Add attributes to the adoptNS and adoptCF function arguments to remove Clang Static Analyzer diagnotics.
Define CF_RELEASES_ARGUMENT and NS_RELEASES_ARGUMENT if not available, use them in function declarations.
* wtf/RetainPtr.h:
(WTF::adoptCF): Adds CF_RELEASES_ARGUMENT attribute to the argument.
(WTF::adoptNS): Adds NS_RELEASES_ARGUMENT attribute to the argument.
2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
Add replaceWithLiteral() method to WTF::String
https://bugs.webkit.org/show_bug.cgi?id=101257
Reviewed by Benjamin Poulain.
Add replaceWithLiteral() method to WTF::String that takes
replacement string as a literal to avoid uselessly constructing
a String object.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
(WTF):
* wtf/text/StringImpl.h:
(WTF::StringImpl::replace):
(StringImpl):
* wtf/text/WTFString.h:
(String):
(WTF::String::replaceWithLiteral):
2012-11-06 Michael Saboff <msaboff@apple.com>
StringBuilder::append(UChar) with an 8 bit quantity shouldn't change the contents to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=101421
Reviewed by Anders Carlsson.
If the string builder contains only 8 bit data, check if the character being appended contains
8 bit data. If so, append it to the 8 bit buffer instead of converting the buffer to 16 bits.
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
2012-11-06 Benjamin Poulain <benjamin@webkit.org>
Speed up TransformationMatrix::multiply() on modern ARM
https://bugs.webkit.org/show_bug.cgi?id=101084
Reviewed by Gavin Barraclough.
* wtf/Platform.h:
Add CPU(ARM_VFP) for detecting VFP availability.
Add CPU(APPLE_ARMV7S) for the Apple ARMv7S architecture.
2012-11-06 Laszlo Gombos <l.gombos@samsung.com>
Refactor setting TEXTURE_MAPPER_GL
https://bugs.webkit.org/show_bug.cgi?id=99758
Reviewed by Noam Rosenthal.
Make the rule that sets the default for USE(3D_GRAPHICS) port independent.
If not set, set USE(TEXTURE_MAPPER_GL) when USE(TEXTURE_MAPPER) and
USE(3D_GRAPHICS) is enabled.
* wtf/Platform.h:
2012-11-05 Philip Rogers <pdr@google.com>
Unblock SVG external references
https://bugs.webkit.org/show_bug.cgi?id=100635
Reviewed by Adam Barth.
This patch reverts r132849 and r132869 because the potential XSS issue
turned out to not be an issue after all.
Covered by existing tests, many of which are re-whitelisted with this patch.
* wtf/Platform.h:
2012-11-05 Dima Gorbik <dgorbik@apple.com>
Back out controversial changes from Bug 98665.
https://bugs.webkit.org/show_bug.cgi?id=101244
Reviewed by David Kilzer.
Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h.
* wtf/Assertions.h:
2012-11-03 Alexey Proskuryakov <ap@apple.com>
Get rid of USE(CFURLSTORAGESESSIONS)
https://bugs.webkit.org/show_bug.cgi?id=101131
Reviewed by Sam Weinig.
* wtf/Platform.h:
2012-11-02 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI instrument NodeRareData::Map. It uses ~250k on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=101052
Reviewed by Yury Semikhatsky.
I noticed that in many cases cache structures are plain static HashMap, HashSet etc.
MemoryAgent can visit it but instrumentation for these containers report no objectType.
It means that addRootObject method needs to accept objectType property as an argument.
Otherwise I would have had to create a proxy class with proper objectType.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
2012-11-01 Kent Tamura <tkent@chromium.org>
Introduce ENABLE_DATE_AND_TIME_INPUT_TYPES, and clarify usage of other related flags
https://bugs.webkit.org/show_bug.cgi?id=101007
Reviewed by Kentaro Hara.
* wtf/Platform.h:
Add ENABLE_DATE_AND_TIME_INPUT_TYPES. It's a union of
ENABLE_INPUT_TYPE_{DATE,DATETIME,DATETIMELOCAL,MONTH,TIME,WEEK}.
2012-11-01 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: do not call checkCountedObject with wrong pointers
https://bugs.webkit.org/show_bug.cgi?id=100958
Reviewed by Alexander Pavlov.
Removed calls to checkCountedObject from places where the pointer may contain
an address of a base class which may differ from the actual object pointer. Instead
checkCountedObject is only called right after processing deferred pointer where
we know real address.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::process):
2012-11-01 Alexey Proskuryakov <ap@apple.com>
Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
Rubber-stamped by Joe Pecoraro.
All CFNetwork based platforms have this now, but not all use it at the moment.
2012-11-01 Alexey Proskuryakov <ap@apple.com>
Fix HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) build
https://bugs.webkit.org/show_bug.cgi?id=100979
Reviewed by Joseph Pecoraro.
* wtf/Platform.h: Added a FIXME about HAVE(NETWORK_CFDATA_ARRAY_CALLBACK).
2012-11-01 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: report memory occupied by ResourceRequest instead of its base ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=100497
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer): do not report memory usage for empty buffer.
2012-10-31 Anders Carlsson <andersca@apple.com>
Fix build.
<rdar://problem/12612207>.
Reviewed by Sam Weinig.
* wtf/CheckedArithmetic.h:
2012-10-31 Benjamin Poulain <bpoulain@apple.com>
Add an optimized version of copyLCharsFromUCharSource for ARM
https://bugs.webkit.org/show_bug.cgi?id=94886
Reviewed by Gavin Barraclough.
Michael Saboff added a SIMD version of copyLCharsFromUCharSource() in r125846.
This patch a similar optimization for ARMv7 by using the interleaved load/store available
in the NEON extension.
The performance gains:
-10000 characters: ~3.5 times faster.
-20 characters (2 vectors): ~55% faster.
-15 characters (1 vector): ~21% faster.
-3 characters (no vector, pure overhead): ~10% slower.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2012-10-31 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2][AC] Use smart pointers for Evas_GL types
https://bugs.webkit.org/show_bug.cgi?id=100745
Reviewed by Kenneth Rohde Christiansen.
Make OwnPtr usable with Evas_GL type to avoid handling
raw pointers in EFL port.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
(WTF):
(WTF::deleteOwnedPtr):
2012-10-29 Anders Carlsson <andersca@apple.com>
Build WebKit as C++11 on Mac
https://bugs.webkit.org/show_bug.cgi?id=100720
Reviewed by Daniel Bates.
* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
Change the type of length to be unsigned to prevent implicit type conversions in non-constant initializer lists.
* wtf/unicode/UTF8.cpp:
(Unicode):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.
2012-10-29 Anders Carlsson <andersca@apple.com>
String::createCFString should return a RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=100419
Reviewed by Andreas Kling.
Make String::createCFString and StringImpl::createCFString return RetainPtrs.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
2012-10-30 Mark Rowe <mrowe@apple.com>
Fix WTF to not install a few header files in bogus locations.
* WTF.xcodeproj/project.pbxproj:
2012-10-28 Mark Rowe <mrowe@apple.com>
Simplify Xcode configuration settings that used to vary between OS versions.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2012-10-28 Mark Rowe <mrowe@apple.com>
Remove references to unsupported OS and Xcode versions.
Reviewed by Anders Carlsson.
* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2012-10-29 Anders Carlsson <andersca@apple.com>
AtomicString(CFStringRef) shouldn't unconditionally create a StringImpl
https://bugs.webkit.org/show_bug.cgi?id=100701
Reviewed by Dan Bernstein.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
Change the constructors that take a CFStringRef and an NSString * to call AtomicString::add(CFStringRef)
and remove AtomicString::createCFString.
(WTF::AtomicString::add):
Add new member function declaration. The definition is in a new file in WebCore, AtomicStringCF.cpp.
Also, fix the overload of add that takes a const char* to call the right other overload instead of itself.
2012-10-29 Adam Barth <abarth@webkit.org>
Unreviewed. Correct my previous patch to disable external SVG
references only on PLATFORM(CHROMIUM).
* wtf/Platform.h:
2012-10-29 Adam Barth <abarth@webkit.org>
Block SVG external references pending a security review
https://bugs.webkit.org/show_bug.cgi?id=100635
Reviewed by Eric Seidel.
We need to do a security review of loading external SVG references
before we're sure that it is safe.
* wtf/Platform.h:
2012-10-29 Michael Saboff <msaboff@apple.com>
String::split(UChar, Vector<String>&) shouldn't create a temporary String
https://bugs.webkit.org/show_bug.cgi?id=100578
Reviewed by Anders Carlsson.
Changed split(UChar, Vector<String>&) to call split(UChar, bool, Vector<String>&) instead of creating a
string and calling the split(String,...) version and moved it to WTFString.h. Also moved
split(const String& separator, Vector<String>& result) to WTFString.h.
* wtf/text/WTFString.cpp:
(WTF::String::split):
* wtf/text/WTFString.h:
(WTF::String::split):
2012-10-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r132736.
http://trac.webkit.org/changeset/132736
https://bugs.webkit.org/show_bug.cgi?id=100652
It broke all plugin related tests on GTK and on Qt (Requested
by Ossy on #webkit).
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-10-27 Michael Saboff <msaboff@apple.com>
Try to create AtomicString as 8 bit where possible
https://bugs.webkit.org/show_bug.cgi?id=100575
Reviewed by Oliver Hunt.
Added StringImpl::create8BitIfPossible() that first tries to create an 8 bit string. If it finds a 16 bit character
during processing, it calls the standard create() method. The assumption is that this will be used on mostly 8 bit
strings and ones that are shorter (in the tens of characters). Changed AtomicString to use the new creation method
for UChar based construction.
* wtf/text/AtomicString.cpp:
(WTF::UCharBufferTranslator::translate):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
2012-10-27 Michael Saboff <msaboff@apple.com>
String::fromUTF8() should take advantage of the ASCII check in convertUTF8ToUTF16()
https://bugs.webkit.org/show_bug.cgi?id=100577
Reviewed by Oliver Hunt.
Passed is ASCII flag to convertUTF8ToUTF16() and if try, create an 8 bit string from the original arguments.
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-10-27 Dan Bernstein <mitz@apple.com>
REAL_PLATFORM_NAME build setting is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=100587
Reviewed by Mark Rowe.
Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
to PLATFORM_NAME.
* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig:
* Configurations/DebugRelease.xcconfig:
2012-10-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r132689.
http://trac.webkit.org/changeset/132689
https://bugs.webkit.org/show_bug.cgi?id=100574
Broke HashMaps containing RetainPtrs (Requested by andersca on
#webkit).
* wtf/RetainPtr.h:
2012-10-26 Anders Carlsson <andersca@apple.com>
Add an operator& to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=100549
Reviewed by Dan Bernstein.
This is useful for APIs that return references using out parameters.
* wtf/RetainPtr.h:
(WTF::RetainPtr::operator&):
2012-10-26 Gabor Ballabas <gaborb@inf.u-szeged.hu>
[Qt] Enable JSC's disassembler on x86, x86_64 Linux
https://bugs.webkit.org/show_bug.cgi?id=100386
Reviewed by Simon Hausmann.
It works fine on Linux x86, x86_64 just needs to be enabled in the
QtWebKit build system.
* wtf/Platform.h:
2012-10-25 Michael Saboff <msaboff@apple.com>
REGRESSION (r131836): failures in list styles tests on EFL, GTK
https://bugs.webkit.org/show_bug.cgi?id=99824
Reviewed by Oliver Hunt.
Fixed ASCII check.
Added placeholder argument for new argument added to convertUTF8ToUTF16() in http://trac.webkit.org/changeset/131836.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/glib/UnicodeGLib.cpp:
(WTF::Unicode::convertCase):
2012-10-25 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2] Remove some C'ism from EwkView
https://bugs.webkit.org/show_bug.cgi?id=100370
Reviewed by Kenneth Rohde Christiansen.
Make OwnPtr useable for Ecore_IMF_Context to avoid
using raw pointers in EFL port.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):
2012-09-27 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: provide memory instrumentation for ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=97786
Reviewed by Vsevolod Vlasov.
Added memory instrumentation for ListHashSet.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
* wtf/ListHashSet.h:
(ListHashSet):
(ListHashSetNodeAllocator): changed visibility of inPool method to public
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
(WTF::::sizeInBytes): added a method that returns size of the set in bytes including
all its internals but not the content elements.
(WTF):
* wtf/MemoryInstrumentation.h: removed onsolete method. All clients were updated to
use generic addMember instead.
(MemoryInstrumentation):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentationHashSet.h:
* wtf/MemoryInstrumentationListHashSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
(WTF):
(WTF::reportMemoryUsage):
2012-10-23 Benjamin Poulain <benjamin@webkit.org>
WTFURL: Implement KURL::setPort()
https://bugs.webkit.org/show_bug.cgi?id=99898
Reviewed by Adam Barth.
Add an efficient implementation for remplacing the port component
in an URL. This will be the base for replacing other components
efficiently.
The testing is covered by fast/dom/HTMLAnchorElement/set-href-attribute-port.html
* wtf/url/api/ParsedURL.cpp:
(WTF::generateNewSpecWithPort):
(WTF::replacePortWithString):
(WTF::ParsedURL::replacePort):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
2012-10-22 Michael Saboff <msaboff@apple.com>
Regression(r131655): Crash in StringImpl::findIgnoringCase
https://bugs.webkit.org/show_bug.cgi?id=99753
Reviewed by Geoffrey Garen.
Fixed to use the searchLength to take into account the start index.
Added LayoutTests/fast/js/find-ignoring-case-regress-99753.html
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findIgnoringCase):
2012-10-22 Simon Hausmann <simon.hausmann@digia.com>
Unreviewed: Re-enable LLINT on Qt/Linux after r131932.
* wtf/Platform.h:
2012-10-22 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: do not double count memory of objects with multiple ancestors
https://bugs.webkit.org/show_bug.cgi?id=99958
Reviewed by Alexander Pavlov.
Make sure memory occupied by objects of classes with multiple inheritance is
not double counted.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::reportedPointer):
(WTF::MemoryObjectInfo::reportObjectInfo): 1) Store actual pointer to the instrumented
object as it may differ from the original pointer by which it was reported. 2) Make
the method non-template and calculate object size on the caller side.
(MemoryObjectInfo):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryInstrumentation::InstrumentedPointer::process): use adjusted pointer
returned by reportMemoryUsage to check if the object has already been visited when
the pointer differs from the orinal one(it may happen if the object was reported
by a pointer to one of its base classes).
2012-10-20 Martin Robinson <mrobinson@igalia.com>
Fix 'make dist' for the GTK+ port
* GNUmakefile.list.am: Add missing files to the source list.
2012-10-19 Mark Lam <mark.lam@apple.com>
Added WTF::StackStats mechanism.
https://bugs.webkit.org/show_bug.cgi?id=99805.
Reviewed by Geoffrey Garen.
Disabled by default. Should have no performance and memory cost when
disabled. To enable, #define ENABLE_STACK_STATS 1 in StackStats.h.
The output is currently hardcoded to be dumped in /tmp/stack-stats.log,
and is in the form of stack sample events. By default, it only logs
a sample event when a new high watermark value is encountered.
Also renamed StackBounds::recursiveCheck() to isSafeToRecurse().
* WTF.xcodeproj/project.pbxproj:
* wtf/StackBounds.h:
(StackBounds):
(WTF::StackBounds::size):
(WTF::StackBounds::isSafeToRecurse):
* wtf/StackStats.cpp: Added.
(WTF):
(WTF::StackStats::initialize):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h: Added.
(WTF):
(StackStats):
(CheckPoint):
(WTF::StackStats::CheckPoint::CheckPoint):
(PerThreadStats):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::initialize):
(WTF::StackStats::probe):
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
(WTF::WTFThreadData::stackStats):
2012-10-19 Anders Carlsson <andersca@apple.com>
Deque can use std::reverse_iterator for its reverse iterators
https://bugs.webkit.org/show_bug.cgi?id=99789
Reviewed by Andreas Kling.
Remove DequeReverseIterator and DequeConstReverseIterator and just use std::reverse_iterator directly.
Also, remove the DequeIteratorBase<T, inlineCapacity> to Base typedef - We can already use DequeIteratorBase since it's
equivalent to the full class template type.
* wtf/Deque.h:
(WTF::Deque::rbegin):
(WTF::Deque::rend):
(DequeIteratorBase):
(WTF::DequeIteratorBase::assign):
(DequeIterator):
(DequeConstIterator):
(WTF::::checkValidity):
(WTF::::DequeIteratorBase):
(WTF::=):
(WTF::::isEqual):
2012-10-19 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix, use C-style comment instead of C++
* wtf/Platform.h:
2012-10-19 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=99814
Reviewed by Simon Hausmann.
* wtf/Platform.h: Disable LLINT on (PLATFORM(QT) && CPU(X86)) temporarily until proper fix.
2012-10-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
https://bugs.webkit.org/show_bug.cgi?id=99457
Reviewed by Yury Semikhatsky.
countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentation::countObjectSize):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::MemoryInstrumentation::addListHashSet):
(WTF::::process):
2012-10-18 Michael Saboff <msaboff@apple.com>
convertUTF8ToUTF16() Should Check for ASCII Input
ihttps://bugs.webkit.org/show_bug.cgi?id=99739
Reviewed by Geoffrey Garen.
Added code to accumulate the "or" of all characters seen during the UTF8 to UTF16 conversion. This is
used to check to see if all characters are ASCII and is returned via a bool*.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/UTF8.h:
2012-10-18 Michael Saboff <msaboff@apple.com>
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770
Reviewed by Mark Rowe.
Fixed up build rules per Mark Rowe. Made new target an Aggregate and removed "WTF copy".
* Configurations/CopyWTFHeaders.xcconfig: Added.
* Configurations/WTF.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2012-10-18 Michael Saboff <msaboff@apple.com>
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770
Reviewed by Geoffrey Garen.
Added a new build target "Copy WTF HEaders" to copy the header files and made that new target a dependency
for the main WTF build target. Moved the "Copy WTF Headers" phase from WTF target to the new target.
* WTF.xcodeproj/project.pbxproj:
2012-10-17 Anders Carlsson <andersca@apple.com>
Clean up Vector.h
https://bugs.webkit.org/show_bug.cgi?id=99622
Reviewed by Benjamin Poulain.
Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
(as per the WebKit coding style guidelines).
* WTF.xcodeproj/project.pbxproj:
Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/StreamBuffer.h:
(WTF::StreamBuffer::append):
Add std:: prefixes to max and min.
* wtf/Vector.h:
Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
2012-10-17 Michael Saboff <msaboff@apple.com>
Creating a String from an NSString should check for all 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99392
Reviewed by Geoffrey Garen.
Exported the LChar* version of create().
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create):
2012-10-17 Michael Saboff <msaboff@apple.com>
StringImpl::findIgnoringCase() and reverseFindIgnoringCase() don't optimally handle a mix of 8 and 16 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99224
Reviewed by Geoffrey Garen.
Added helper templated functions and all four combinations similar to find() and reverseFind().
(WTF::findIgnoringCaseInner):
(WTF::StringImpl::findIgnoringCase):
(WTF::reverseFindIgnoringCaseInner):
(WTF::StringImpl::reverseFindIgnoringCase):
2012-10-17 Michael Saboff <msaboff@apple.com>
AtomicString::HashAndUTF8CharactersTranslator::equal() doesn't optimally handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99223
Reviewed by Geoffrey Garen.
Added an 8 bit path.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
2012-10-17 Anders Carlsson <andersca@apple.com>
Always use fastRealloc when growing or shrinking the Vector buffer
https://bugs.webkit.org/show_bug.cgi?id=99616
Reviewed by Andreas Kling.
Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
vector buffer when possible; realloc should always be at least as fast as free+malloc.
* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):
2012-10-16 Michael Saboff <msaboff@apple.com>
Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
https://bugs.webkit.org/show_bug.cgi?id=99484
Reviewed by Eric Seidel.
Changed macro name to align with it's purpose.
* wtf/Platform.h:
2012-10-16 Michael Saboff <msaboff@apple.com>
StringImpl::reverseFind() with a single match character isn't optimal for mixed 8/16 bit cases
https://bugs.webkit.org/show_bug.cgi?id=99363
Reviewed by Benjamin Poulain.
Factored out the 8/16 bitness check of the match character from the subject character bitness
check. Did this for both find() and reverseFind(). Added all UChar/LChar combinations to the
inline reverseFind().
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::reverseFind):
* wtf/text/StringImpl.h:
(WTF::reverseFind):
2012-10-16 Dima Gorbik <dgorbik@apple.com>
Remove Platform.h include from the header files.
https://bugs.webkit.org/show_bug.cgi?id=98665
Reviewed by Eric Seidel.
We don't want other clients that include WebKit headers to know about Platform.h.
* wtf/Assertions.h:
* wtf/MainThread.h:
2012-10-16 Adrienne Walker <enne@google.com>
Remove unused WTF_NEW_HASHMAP_ITERATORS_INTERFACE #define
https://bugs.webkit.org/show_bug.cgi?id=99367
Reviewed by James Robinson.
Does what it says on the tin.
* wtf/HashTraits.h:
2012-10-15 Andreas Kling <kling@webkit.org>
Remove WTF::fastDeleteAllValues().
<http://webkit.org/b/99345>
Reviewed by Eric Seidel.
It was only used to fastDelete() a class that was already overriding operator delete
by way of WTF_MAKE_FAST_ALLOCATED anyway.
* wtf/HashSet.h:
(WTF):
(HashSet):
2012-10-15 Mark Hahnenberg <mhahnenberg@apple.com>
Parallel GC should not be disabled for all platforms
* wtf/Platform.h: D'oh!
2012-10-15 George Staikos <staikos@webkit.org>
[BlackBerry] Adapt to Platform API changes in string handling
https://bugs.webkit.org/show_bug.cgi?id=99248
Reviewed by Yong Li.
Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
* wtf/Assertions.cpp: Use proper log function.
* wtf/text/AtomicString.h: Add BlackBerry support
(AtomicString):
(WTF::AtomicString::AtomicString): Add BlackBerry Support
(WTF::AtomicString::operator BlackBerry::Platform::String):
* wtf/text/StringImpl.h: Conversion support.
* wtf/text/WTFString.h: Conversion support.
(Platform):
(String):
2012-10-15 Michael Saboff <msaboff@apple.com>
Update RenderText to use String instead of UChar* for text
https://bugs.webkit.org/show_bug.cgi?id=96979
Reviewed by Dan Bernstein.
Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's. Enabled WTF_USE_8BIT_TEXTRUN
for PLATFORM(MAC). Other platform can update this setting in Platform.h when their platform specific use of
TextRun handle 8 bit data. Added a new Vector::appendVector to allow appending the contents of a vector
containing one type to the end of vector containing another. This is used to append a Vector<LChar> to
the end of a Vector<UChar>.
* wtf/Platform.h:
* wtf/Vector.h:
(Vector):
(WTF::Vector::appendVector):
2012-10-15 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=99309
Reviewed by Yury Semikhatsky.
JSHeap, DOMStorage and HeapProfiler data were counted manually.
Now we count the sizes more generic way.
* wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
* wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.
2012-10-12 Anders Carlsson <andersca@apple.com>
Move QDataStream functions into HistoryItemQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=99203
Reviewed by Andreas Kling.
It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.
* wtf/Vector.h:
* wtf/qt/StringQt.cpp:
* wtf/text/WTFString.h:
2012-10-12 Michael Saboff <msaboff@apple.com>
StringBuilder::append(StringBuilder&) doesn't take into account the bit size of the argument string
https://bugs.webkit.org/show_bug.cgi?id=99225
Reviewed by Benjamin Poulain.
Added 8 bit path.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
2012-10-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r131224.
http://trac.webkit.org/changeset/131224
https://bugs.webkit.org/show_bug.cgi?id=99210
It broke the build (Requested by andersca on #webkit).
* wtf/Vector.h:
(WTF):
(WTF::operator<<):
(WTF::operator>>):
* wtf/qt/StringQt.cpp:
(WTF::operator<<):
(WTF):
(WTF::operator>>):
* wtf/text/WTFString.h:
(WTF):
2012-10-12 Anders Carlsson <andersca@apple.com>
Move QDataStream functions into HistoryItemQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=99203
Reviewed by Andreas Kling.
It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.
* wtf/Vector.h:
* wtf/qt/StringQt.cpp:
* wtf/text/WTFString.h:
2012-10-11 Mark Toller <mark.toller@samsung.com>
Removed incorrect pthread_mutex_trylock code in an ASSERT in TCMalloc_PageHeap::signalScavenger. This
branch is used by the Webkit GTK code.
https://bugs.webkit.org/show_bug.cgi?id=97539
Reviewed by Geoffrey Garen.
The code was never compiled in, and was functionally broken. There is no need for locking around the
m_scavengeThreadActive flag, however, we should lock pageheap_lock before calling 'shouldScavenge()', as we
only want to scavenge when really required, so it's better to wait for any current memory operation to
complete before checking.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::signalScavenger):
2012-10-10 Yong Li <yoli@rim.com>
[BlackBerry] Define WTF_USE_EXTRA_MACROS in cmake rather than Platform.h
https://bugs.webkit.org/show_bug.cgi?id=98819
Reviewed by Rob Buis.
And make it depend on SHARED_CORE
RIM PR# 221339.
* wtf/Platform.h:
2012-10-09 Filip Pizlo <fpizlo@apple.com>
JSC should infer when indexed storage is contiguous, and optimize for it
https://bugs.webkit.org/show_bug.cgi?id=97288
Reviewed by Mark Hahnenberg.
Moved out this helpful math utility to MathExtras, since we now use it in
multiple places.
* wtf/MathExtras.h:
(timesThreePlusOneDividedByTwo):
2012-10-08 Benjamin Poulain <benjamin@webkit.org>
Generalize moving URLComponent's begin position
https://bugs.webkit.org/show_bug.cgi?id=98626
Reviewed by Adam Barth.
The patch r130609 introduced moving URLComponents's position.
It turns out this concept is really useful in the parser so
this patch generalize the idea.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::removePort):
* wtf/url/src/URLCanonEtc.cpp:
* wtf/url/src/URLComponent.h:
(WTF::URLComponent::moveBy):
Rename URLComponent::move() to URLComponent::moveBy() for consistency
with some of WebCore types.
* wtf/url/src/URLParse.cpp:
* wtf/url/src/URLParseFile.cpp:
* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::moveFromComponentBy):
Change the semantic to everything from a certain component. This is
useful to move everything, including the scheme.
* wtf/url/src/URLSegments.h:
(URLSegments):
2012-10-08 Andreas Kling <kling@webkit.org>
Lower minimum table size of WTF::HashTable to reduce memory usage.
<http://webkit.org/b/98406>
<rdar://problem/12432140>
Reviewed by Anders Carlsson.
Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
from this, we can tweak individual tables to have a larger minimumTableSize.
* wtf/HashTraits.h:
2012-10-08 Andreas Kling <kling@webkit.org>
Using float/double as WTF hash table key is unreliable.
<http://webkit.org/b/98627>
Reviewed by Geoffrey Garen.
Change FloatHash::equal() to do a bitwise compare instead of a logical compare.
This fixes a problem where the keys with different binary representation but the
same logical value (e.g 0 and -0) could block each other from being found if they
ended up in the same hash bucket.
* wtf/HashFunctions.h:
(FloatHash):
(WTF::FloatHash::hash):
(WTF::FloatHash::equal):
2012-10-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130619.
http://trac.webkit.org/changeset/130619
https://bugs.webkit.org/show_bug.cgi?id=98634
Causes many crashes on the EFL bots. (Requested by rakuco on
#webkit).
* wtf/efl/MainThreadEfl.cpp:
(WTF::pipeObject):
(WTF):
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
2012-10-08 Byungwoo Lee <bw80.lee@samsung.com>
[EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
https://bugs.webkit.org/show_bug.cgi?id=98505
Reviewed by Kenneth Rohde Christiansen.
Instead of ecore_pipe_write(),
use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
According to the EFL API document, this function is designed to dispatch
a function on ecore main loop by avoiding dead lock or race condition.
With this function, webkit doesn't need to maintain ecore pipe also.
* wtf/efl/MainThreadEfl.cpp:
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=82784
Reviewed by Eric Seidel.
Currently HashMap iterators follow the same interface in std::map: given an
iterator it, we use it->first to access the key and it->second to access the
value. This patch changes these accesses to it->key and it->value, improving the
readability at call sites.
One potential downside of this change would be the confusion between std::map and
HashMap interfaces. However, they are already different in other aspects and the
usage of std::map is more an exception than a rule in WebKit code, so we consider
the confusion will be less likely to happen.
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableKeysIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF::deleteAllValues):
(WTF::deleteAllKeys):
Removed deleteAllPairFirsts() and deleteAllPairSeconds() since they are now unused.
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF):
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-10-07 Benjamin Poulain <benjamin@webkit.org>
WTFURL: implement URL port removal for HTMLAnchorElement
https://bugs.webkit.org/show_bug.cgi?id=98604
Reviewed by Adam Barth.
Add hasStandardScheme() (similar to isStandard from Google URL),
hasPort() and removePort() to implement the port removal of KURL.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::hasStandardScheme):
(WTF::ParsedURL::hasPort):
(WTF::ParsedURL::removePort):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/src/URLComponent.h:
(WTF::URLComponent::move):
* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::moveComponentsAfter):
* wtf/url/src/URLSegments.h:
(URLSegments):
* wtf/url/src/URLUtil.cpp:
(URLUtilities):
(WTF::URLUtilities::isStandard):
* wtf/url/src/URLUtil.h:
(URLUtilities):
Remove LowerCaseEqualsASCII() from the interface, make it an internal template.
(WTF::URLUtilities::isStandard):
Since in WebKit, LChar is a superset of char, expose LChar and cast char* to LChar*.
2012-10-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI fix String instrumentation the way it was discussed in WK97964
https://bugs.webkit.org/show_bug.cgi?id=98500
Reviewed by Benjamin Poulain.
Current instrumentation incorrectly covers the case when StringImpl object has been created via StringImpl::createWithTerminatingNullCharacter().
Looks like the only way to detect the strings that has been created from literals is to compare the addresses of buffer and stringImpl + 1.
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/text/StringImpl.h:
(WTF::StringImpl::hasInternalBuffer):
2012-10-06 Benjamin Poulain <benjamin@webkit.org>
Fix build of WTFURL after r130187
https://bugs.webkit.org/show_bug.cgi?id=98588
Reviewed by Kentaro Hara.
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::spec):
2012-10-05 Simon Pena <spena@igalia.com>
[GTK] Add support for GBytes in GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98489
Reviewed by Carlos Garcia Campos.
Adding support for GBytes in GRefPtr makes it easier
for them to be used when adding GResources support,
and is more consistent with the rest of the port.
This calls g_bytes_ref and g_bytes_unref in the implementation
of the refPtr and derefPtr template functions, in case the GLib
version is met. Otherwise, it does nothing.
* wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h: Define the GBytes datatype.
2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130478.
http://trac.webkit.org/changeset/130478
https://bugs.webkit.org/show_bug.cgi?id=98494
It broke the Qt build (Requested by Ossy on #webkit).
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:
2012-10-05 Simon Pena <spena@igalia.com>
[GTK] Add support for GBytes in GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98489
Reviewed by Carlos Garcia Campos.
Adding support for GBytes in GRefPtr makes it easier
for them to be used when adding GResources support,
and is more consistent with the rest of the port.
This calls g_bytes_ref and g_bytes_unref in the implementation
of the refPtr and derefPtr template functions.
* wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h: Define the GBytes datatype.
2012-10-04 Dirk Pranke <dpranke@chromium.org>
Unreviewed, rolling out r130419.
http://trac.webkit.org/changeset/130419
https://bugs.webkit.org/show_bug.cgi?id=98406
broke editing/pasteboard/data-transfer-items.html on chromium
* wtf/HashTraits.h:
2012-10-04 Andreas Kling <kling@webkit.org>
Lower minimum table size of WTF::HashTable to reduce memory usage.
<http://webkit.org/b/98406>
<rdar://problem/12432140>
Reviewed by Anders Carlsson.
Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
from this, we can tweak individual tables to have a larger minimumTableSize.
* wtf/HashTraits.h:
2012-10-04 Michael Saboff <msaboff@apple.com>
String::remove will convert an 8 bit string to a 16 bit string
https://bugs.webkit.org/show_bug.cgi?id=98299
Reviewed by Benjamin Poulain.
Added an 8 bit path to remove(). Added a private templated helper removeInternal.
* wtf/text/WTFString.cpp:
(WTF::String::removeInternal):
(WTF::String::remove):
* wtf/text/WTFString.h:
(String):
2012-10-03 Kangil Han <kangil.han@samsung.com>
[Refactoring] Tidy NDEBUG optioning in RefCountedBase.
https://bugs.webkit.org/show_bug.cgi?id=98252
Reviewed by Benjamin Poulain.
Fixed incomplete implementation for NDEBUG option.
Additionally, adopted CHECK_REF_COUNTED_LIFECYCLE definition to suppress abusing NDEBUG option.
* wtf/RefCounted.h:
(WTF):
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::turnOffVerifier):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::~RefCountedBase):
(WTF::RefCountedBase::derefBase):
(RefCountedBase):
(WTF::adopted):
(WTF::RefCountedBase::setMutexForVerifier):
(WTF::RefCountedBase::setDispatchQueueForVerifier):
2012-10-03 Yury Semikhatsky <yurys@chromium.org>
Remove MemoryInstrumentation::addCollectionElements
https://bugs.webkit.org/show_bug.cgi?id=98245
Reviewed by Vsevolod Vlasov.
Removed MemoryInstrumentation::addCollectionElements and switched all call sites
to reportSequenceMemoryUsage.
Drive-by fix: removed some unused methods on MemoryInstrumentation.
* wtf/MemoryInstrumentation.h:
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationSequence.h:
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-10-02 Yury Semikhatsky <yurys@chromium.org>
Provide memory instrumentation for HashCountedSet
https://bugs.webkit.org/show_bug.cgi?id=98138
Reviewed by Pavel Feldman.
Added memory instrumentation for HashCountedSet.
Extracted common routines for collecting memory info for an iterable sequence.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationHashCountedSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
(WTF):
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
* wtf/MemoryInstrumentationSequence.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashMap.h.
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(WTF::reportSequenceMemoryUsage):
2012-10-02 Joshua Bell <jsbell@chromium.org>
Add htons/htonl definitions and implementations
https://bugs.webkit.org/show_bug.cgi?id=98054
Reviewed by Darin Adler.
For parsing or serializing binary data, byte order matters. The canonical htons/htonl/
ntohs/ntohl functions are not present everywhere, so implementations are proliferating in
parsers. Expose a new WTF header (wtf/ByteOrder.h) that includes the standard
implementations on UNIX-like OSs and provides basic inlined implementations on Windows.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/ByteOrder.h: Added.
(WTF::wswap32): Inline functions so arguments are only evaluated once.
(WTF::bswap32):
(WTF::bswap16):
(ntohs): Inline functions on OS(WINDOWS) to match macros on OS(UNIX)
(htons):
(ntohl):
(htonl):
* wtf/CMakeLists.txt:
2012-10-02 Michael Saboff <msaboff@apple.com>
HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=97740
Reviewed by Darin Adler.
Added an append method that takes an LChar source. Made both the UChar and LChar versions optimally handle
the appendee and appendend string bitness.
* wtf/text/WTFString.cpp:
(WTF::String::append):
* wtf/text/WTFString.h:
(String):
2012-10-02 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: switch to non intrusive instrumentation of ParsedURL.
https://bugs.webkit.org/show_bug.cgi?id=98150
Reviewed by Yury Semikhatsky.
Memory instrumentation for ParsedURL was extracted into separate header MemoryInstrumentationParsedURL.h
Drive by fix: unnecessary include was removed from String*.cpp files.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationParsedURL.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
* wtf/text/StringImpl.cpp:
* wtf/text/WTFString.cpp:
* wtf/url/api/ParsedURL.cpp:
* wtf/url/api/ParsedURL.h:
* wtf/url/api/URLString.cpp:
* wtf/url/api/URLString.h:
2012-09-29 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI make String* instrumentation non intrusive
https://bugs.webkit.org/show_bug.cgi?id=97964
Reviewed by Yury Semikhatsky.
MemoryInstrumentationString.h was added.
Intrusive instrumentation was removed.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::usesInternalBuffer):
(WTF::StringImpl::baseString):
(StringImpl):
2012-10-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130129.
http://trac.webkit.org/changeset/130129
https://bugs.webkit.org/show_bug.cgi?id=98125
broke 4 webkit_unit_tests
(MemoryInstrumentationTest.hashMapWith*) (Requested by caseq
on #webkit).
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
(CStringBuffer):
(WTF::CStringBuffer::reportMemoryUsage):
(CString):
(WTF::CString::reportMemoryUsage):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-09-29 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI make String* instrumentation non intrusive
https://bugs.webkit.org/show_bug.cgi?id=97964
Reviewed by Yury Semikhatsky.
MemoryInstrumentationString.h was added.
Intrusive instrumentation was removed.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::usesInternalBuffer):
(WTF::StringImpl::baseString):
(StringImpl):
2012-10-01 Daniel Drake <dsd@laptop.org>
Another SIGILL in JavaScriptCore on a Geode processor
https://bugs.webkit.org/show_bug.cgi?id=96286
Reviewed by Filip Pizlo.
Disable LLint for the GTK build where the build target does not
support SSE2 instructions. Restores support for non-SSE2 processors
such as the AMD Geode.
* wtf/Platform.h:
2012-10-01 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: provide memory instrumentation for HashMap
https://bugs.webkit.org/show_bug.cgi?id=98005
Reviewed by Pavel Feldman.
Extracted HashMap memory instrumentation into its own file. The map's content
elements will be automatically traversed if their types are supported
by the memory instrumentation. No need to call special method for hash map
fields any more.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF):
* wtf/MemoryInstrumentationHashMap.h: Added.
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(WTF::reportMemoryUsage):
2012-10-01 Alberto Garcia <agarcia@igalia.com>
Check that __cplusplus is defined before comparing its value
https://bugs.webkit.org/show_bug.cgi?id=98015
Reviewed by Xan Lopez.
If __cplusplus is not defined is interpreted as having the value
0, but it produces a compilation warning with -Wundef.
This is the case with some API tests that are written in C
(JSNode.c, JSNodeList.c, minidom.c).
* wtf/Compiler.h:
2012-10-01 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files to compilation.
2012-09-30 Mark Hahnenberg <mhahnenberg@apple.com>
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754
Reviewed by Sam Weinig.
Mixed up the HasTrivialDestructor/Constructor case for VS2010 and later in the previous patch.
* wtf/TypeTraits.h:
2012-09-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r129982.
http://trac.webkit.org/changeset/129982
https://bugs.webkit.org/show_bug.cgi?id=97971
hit assert in fast/overflow/overflow-height-float-not-removed-
crash3.html (Requested by eae on #webkit).
* wtf/Platform.h:
2012-09-29 Emil A Eklund <eae@chromium.org>
Enable SATURATED_LAYOUT_ARITHMETIC for chromium
https://bugs.webkit.org/show_bug.cgi?id=95053
Reviewed by Abhishek Arya.
Enable the SATURATED_LAYOUT_ARITHMETIC flag for the chromium port.
This changes the behavior of FractionalLayoutUnit to clamp to the
max or min value instead of overflowing.
This may very well impact performance so the current plan is to enable
it for a couple of hours to a day to collect performance data and then
disable it again until we've had a chance to review the perf data.
* wtf/Platform.h:
2012-09-28 Anders Carlsson <andersca@apple.com>
Remove Java bridge
https://bugs.webkit.org/show_bug.cgi?id=97954
Reviewed by Sam Weinig.
The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
* wtf/Platform.h:
2012-09-28 Kai Koehne <kai.koehne@digia.com>
Disable YARR_JIT for Windows 64 bit
https://bugs.webkit.org/show_bug.cgi?id=97772
Reviewed by Simon Hausmann.
Using YARR_JIT requires ASSEMBLER, which in turn enables the
executable fixed allocator, which is mmap based (not available on
Windows).
* wtf/Platform.h:
2012-09-28 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: make HashSet memory instrumentation non-intrusive
https://bugs.webkit.org/show_bug.cgi?id=97879
Reviewed by Vsevolod Vlasov.
Removed reportMemoryUsage declarations as a friend of HashSet and HashTable. Also
removed MemoryInstrumentationHashTable which is not needed if we don't have
access to HashSet's guts.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
(HashSet):
* wtf/HashTable.h:
(HashTable):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashTable.h: Removed.
2012-09-27 Anders Carlsson <andersca@apple.com>
Remove the clang pragmas to disable warnings in Noncopyable.h
https://bugs.webkit.org/show_bug.cgi?id=97826
Reviewed by Beth Dakin.
Warnings about C++11 extensions are already disabled project-wide now so there's no need
to keep these pragmas.
* wtf/Noncopyable.h:
2012-09-26 Mark Hahnenberg <mhahnenberg@apple.com>
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754
Reviewed by Darin Adler.
Cleaned up HasTrivialConstructor and HasTrivialDestructor by defining them in terms of
other type traits we have. Also moved some ifdefs and comments to make things more clear.
* wtf/TypeTraits.h:
2012-09-27 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: move visited and countObjectSize methods implementation into separate class.
https://bugs.webkit.org/show_bug.cgi?id=97461
Reviewed by Yury Semikhatsky.
These methods and the data collected by them need to be used in the instrumentation code for other components.
As example when we are visiting bitmaps we need to visit platform specific objects.
These objects will be instrumented with help of component's own instrumentation code
but we have to keep the single set of visited objects and the map of counters.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentationClient::~MemoryInstrumentationClient):
(WTF):
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::countObjectSize):
(WTF::MemoryInstrumentation::visited):
2012-09-27 Csaba Osztrogonác <ossy@webkit.org>, Tor Arne Vestbø <vestbo@webkit.org>
[Qt] Enable the LLInt on Linux
https://bugs.webkit.org/show_bug.cgi?id=95749
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2012-09-26 Cosmin Truta <ctruta@rim.com>
[BlackBerry] Allow denormal floats in ARM VFP
https://bugs.webkit.org/show_bug.cgi?id=97008
Reviewed by Filip Pizlo.
Reviewed internally by Yong Li.
Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.
* wtf/ThreadingPthreads.cpp:
(WTF::enableIEEE754Denormal): Added.
(WTF::initializeThreading):
(WTF::initializeCurrentThreadInternal):
2012-09-26 Michael Saboff <msaboff@apple.com>
Update ComplexTextController for 8 bit TextRun changes
https://bugs.webkit.org/show_bug.cgi?id=97378
Reviewed by Geoffrey Garen.
Add a new create method to make a 16 bit string from 8 bit source data. This is used in
ComplexTextController when we have LChar* + length text data, but we really want 16 bit
data for the complex text rendering code.
* wtf/text/WTFString.cpp:
(WTF::String::make16BitFrom8BitSource):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-09-26 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=97662
Reviewed by Yury Semikhatsky.
Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
Also we'd like to know exact pointers to strings and buffers for verification purposes.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF):
(WTF::reportMemoryUsage):
2012-09-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
https://bugs.webkit.org/show_bug.cgi?id=97198
Reviewed by Yury Semikhatsky.
Current implementation has overloads for HashSet.
This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
(HashSet):
* wtf/HashTable.h:
(WTF):
(HashTable):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addCollectionElements):
(WTF::MemoryClassInfo::addHashCountedSet):
* wtf/MemoryInstrumentationHashSet.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashTable.h: Added.
(WTF):
(WTF::reportMemoryUsage):
2012-09-26 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: compare objects counted by the memory instrumentation with those allocated in the heap
https://bugs.webkit.org/show_bug.cgi?id=97641
Reviewed by Pavel Feldman.
Added a method for checking if reported object was actually allocated in the heap.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObjectImpl):
2012-09-26 Gavin Barraclough <barraclough@apple.com>
String.localeCompare should normalize input
https://bugs.webkit.org/show_bug.cgi?id=97639
Reviewed by Filip Pizlo.
From the spec: "It is strongly recommended that this function treat Strings that are
canonically equivalent according to the Unicode standard as identical (in other words,
compare the Strings as if they had both been converted to Normalised Form C or D first).
It is also recommended that this function not honour Unicode compatibility equivalences
or decompositions."
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::createCollator):
- Enable normalization.
2012-09-25 Cosmin Truta <ctruta@rim.com>
[BlackBerry] Enable LLInt
https://bugs.webkit.org/show_bug.cgi?id=97604
Reviewed by Yong Li.
Set the prefix of LOCAL_LABEL_STRING to ".L" on QNX.
* wtf/InlineASM.h:
2012-09-25 Patrick Gansterer <paroga@webkit.org>
Do not enable DFG JIT for COMPILER(MSVC).
The current code does not support MSVC inline assembler, so disable it for now.
* wtf/Platform.h:
2012-09-25 Pratik Solanki <psolanki@apple.com>
Remove HAVE_SBRK since we never set use_sbrk to true
https://bugs.webkit.org/show_bug.cgi?id=97525
<rdar://problem/12363601>
Reviewed by Geoffrey Garen.
The code under HAVE(SBRK) has not been used since 2005. We use mmap not sbrk for FastMalloc
not sbrk. We can just remove the define and move all of this code inside #ifndef
WTF_CHANGES.
* wtf/Platform.h:
* wtf/TCSystemAlloc.cpp:
(TCMalloc_SystemAlloc):
2012-09-25 Mark Lam <mark.lam@apple.com>
#undef some symbols before redefining them.
https://bugs.webkit.org/show_bug.cgi?id=97568.
Reviewed by Michael Saboff.
* wtf/Platform.h:
2012-09-21 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
https://bugs.webkit.org/show_bug.cgi?id=96650
Reviewed by Vsevolod Vlasov.
Added reportMemoryUsage free template function with default body to core NMI code
and add custom version of reportMemoryUsage function for Vectors.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryInstrumentationVector.h: Added.
(WTF):
(WTF::instrumentVectorValues):
(WTF::reportMemoryUsage):
2012-09-24 Mark Lam <mark.lam@apple.com>
Deleting the classic interpreter and cleaning up some build options.
https://bugs.webkit.org/show_bug.cgi?id=96969.
Reviewed by Geoffrey Garen.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:
2012-09-24 Patrick Gansterer <paroga@webkit.org>
Remove String::operator+=()
https://bugs.webkit.org/show_bug.cgi?id=96172
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
* wtf/text/WTFString.h:
2012-09-24 Benjamin Poulain <benjamin@webkit.org>
Add support for query encoding to WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97422
Reviewed by Adam Barth.
Expose character conversion through the new abstract class URLQueryCharsetConverter.
URLQueryCharsetConverter is implemented by WebCore to expose the TextEncoding classes.
Unfortunatelly that forces us to bring over URLBuffer in the public API. We may be able
to mitigate that later when moving WTFURL to more templates.
The change fixes 2 of the URL layout tests.
* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
ParsedURL was using the same constructor for ParsedURLString, and URL without a base.
That was a mistake on my part, I did not intend that, fixed it now :)
* wtf/url/api/URLBuffer.h: Renamed from Source/WTF/wtf/url/src/URLBuffer.h.
(URLBuffer):
(WTF::URLBuffer::URLBuffer):
(WTF::URLBuffer::~URLBuffer):
(WTF::URLBuffer::at):
(WTF::URLBuffer::set):
(WTF::URLBuffer::capacity):
(WTF::URLBuffer::length):
(WTF::URLBuffer::data):
(WTF::URLBuffer::setLength):
(WTF::URLBuffer::append):
(WTF::URLBuffer::grow):
* wtf/url/api/URLQueryCharsetConverter.h: Added.
(URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::~URLQueryCharsetConverter):
* wtf/url/src/URLCanon.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonFilesystemurl.cpp:
(WTF::URLCanonicalizer::canonicalizeFileSystemURL):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp:
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonInternal.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonQuery.cpp:
(WTF::URLCanonicalizer::CanonicalizeQuery):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp:
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp:
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLUtil.cpp:
(URLUtilities):
(WTF::URLUtilities::canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
* wtf/url/src/URLUtil.h:
(URLUtilities):
2012-09-24 Benjamin Poulain <benjamin@webkit.org>
Integrate most of GoogleURL in WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97405
Reviewed by Adam Barth.
This patch brings almost all of the implementatation of Google-URL in WTFURL
with only minor changes.
The changes from the original code are mostly:
-Code cleaning.
-Replace url_parse::Parsed by URLSegments.
-Replace url_parse::Component by URLComponent
-More code cleaning.
-Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
-Use URLCharacterTypes instead of the litany of characters functions.
-Some more code cleaning.
-Fix the style to match WebKit as much as possible.
-Rename the files to match WebKit style.
* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isValid):
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Added.
(URLCanonicalizer):
(CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
(CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
(WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
(URLComponentSource):
(WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
(Replacements):
(WTF::URLCanonicalizer::Replacements::Replacements):
(WTF::URLCanonicalizer::Replacements::SetScheme):
(WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
(WTF::URLCanonicalizer::Replacements::SetUsername):
(WTF::URLCanonicalizer::Replacements::ClearUsername):
(WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
(WTF::URLCanonicalizer::Replacements::SetPassword):
(WTF::URLCanonicalizer::Replacements::ClearPassword):
(WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
(WTF::URLCanonicalizer::Replacements::SetHost):
(WTF::URLCanonicalizer::Replacements::ClearHost):
(WTF::URLCanonicalizer::Replacements::IsHostOverridden):
(WTF::URLCanonicalizer::Replacements::SetPort):
(WTF::URLCanonicalizer::Replacements::ClearPort):
(WTF::URLCanonicalizer::Replacements::IsPortOverridden):
(WTF::URLCanonicalizer::Replacements::SetPath):
(WTF::URLCanonicalizer::Replacements::ClearPath):
(WTF::URLCanonicalizer::Replacements::IsPathOverridden):
(WTF::URLCanonicalizer::Replacements::SetQuery):
(WTF::URLCanonicalizer::Replacements::ClearQuery):
(WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
(WTF::URLCanonicalizer::Replacements::SetRef):
(WTF::URLCanonicalizer::Replacements::ClearRef):
(WTF::URLCanonicalizer::Replacements::IsRefOverridden):
(WTF::URLCanonicalizer::Replacements::sources):
(WTF::URLCanonicalizer::Replacements::components):
(WTF::URLCanonicalizer::Replacements::Placeholder):
* wtf/url/src/URLCanonEtc.cpp: Added.
(WTF::URLCanonicalizer::removeURLWhitespace):
(URLCanonicalizer):
(WTF::URLCanonicalizer::canonicalSchemeChar):
(WTF::URLCanonicalizer::CanonicalizeScheme):
(WTF::URLCanonicalizer::CanonicalizeUserInfo):
(WTF::URLCanonicalizer::CanonicalizePort):
(WTF::URLCanonicalizer::CanonicalizeRef):
* wtf/url/src/URLCanonFilesystemurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::FileCanonicalizePath):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonHost.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeHost):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeHostVerbose):
* wtf/url/src/URLCanonICU.cpp: Added.
(WTF::URLCanonicalizer::IDNToASCII):
(URLCanonicalizer):
(WTF::URLCanonicalizer::readUTFChar):
* wtf/url/src/URLCanonIP.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeIPAddress):
(URLCanonicalizer):
* wtf/url/src/URLCanonInternal.cpp: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::AppendInvalidNarrowString):
(WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
(WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
(WTF::URLCanonicalizer::SetupOverrideComponents):
(WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
* wtf/url/src/URLCanonInternal.h: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::hexCharToValue):
(WTF::URLCanonicalizer::isDot):
(WTF::URLCanonicalizer::appendURLEscapedCharacter):
(WTF::URLCanonicalizer::doAppendUTF8):
(WTF::URLCanonicalizer::AppendCharToOutput):
(WTF::URLCanonicalizer::AppendUTF8Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedValue):
(WTF::URLCanonicalizer::AppendUTF16Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedChar):
(WTF::URLCanonicalizer::Is8BitChar):
(WTF::URLCanonicalizer::DecodeEscaped):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
(WTF::URLCanonicalizer::_strtoui64):
* wtf/url/src/URLCanonMailto.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeMailtoURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceMailtoURL):
* wtf/url/src/URLCanonPath.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizePath):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizePartialPath):
* wtf/url/src/URLCanonPathurl.cpp: Added.
(WTF::URLCanonicalizer::canonicalizePathURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplacePathURL):
* wtf/url/src/URLCanonQuery.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeQuery):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp: Added.
(WTF::URLCanonicalizer::isRelativeURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp: Added.
(WTF::URLCanonicalizer::DefaultPortForScheme):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLCharacterTypes.cpp:
* wtf/url/src/URLCharacterTypes.h:
(WTF::URLCharacterTypes::isComponentChar):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isCharacterOfType):
(URLCharacterTypes):
* wtf/url/src/URLEscape.cpp: Removed.
* wtf/url/src/URLFile.h: Added.
(URLParser):
(WTF::URLParser::isWindowsDriveSeparator):
(WTF::URLParser::isWindowsDriveLetter):
(WTF::URLParser::findNextSlash):
(WTF::URLParser::doesBeginWindowsDriveSpec):
(WTF::URLParser::doesBeginUNCPath):
* wtf/url/src/URLParse.cpp: Added.
(WTF::URLParser::ExtractScheme):
(URLParser):
(WTF::URLParser::IsAuthorityTerminator):
(WTF::URLParser::ExtractFileName):
(WTF::URLParser::ExtractQueryKeyValue):
(WTF::URLParser::ParseAuthority):
(WTF::URLParser::ParsePort):
(WTF::URLParser::ParseStandardURL):
(WTF::URLParser::ParsePathURL):
(WTF::URLParser::ParseFileSystemURL):
(WTF::URLParser::ParseMailtoURL):
(WTF::URLParser::parsePathInternal):
(WTF::URLParser::ParseAfterScheme):
* wtf/url/src/URLParse.h: Added.
(URLParser):
* wtf/url/src/URLParseFile.cpp: Added.
(WTF):
(WTF::URLParser::ParseFileURL):
(URLParser):
* wtf/url/src/URLParseInternal.h: Added.
(URLParser):
(WTF::URLParser::isURLSlash):
(WTF::URLParser::shouldTrimFromURL):
(WTF::URLParser::trimURL):
(WTF::URLParser::countConsecutiveSlashes):
* wtf/url/src/URLParser.h: Removed.
* wtf/url/src/URLQueryCanonicalizer.h: Removed.
* wtf/url/src/URLSegments.cpp:
* wtf/url/src/URLSegments.h:
(WTF::URLSegments::URLSegments):
(URLSegments):
(WTF::URLSegments::operator=):
(WTF::URLSegments::innerURLSegments):
(WTF::URLSegments::setInnerURLSegments):
(WTF::URLSegments::clearInnerURLSegments):
* wtf/url/src/URLUtil.cpp: Added.
(URLUtilities):
(WTF::URLUtilities::IsStandard):
(WTF::URLUtilities::FindAndCompareScheme):
(WTF::URLUtilities::Canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
(WTF::URLUtilities::LowerCaseEqualsASCII):
(WTF::URLUtilities::DecodeURLEscapeSequences):
(WTF::URLUtilities::EncodeURIComponent):
(WTF::URLUtilities::CompareSchemeComponent):
* wtf/url/src/URLUtil.h: Added.
(URLUtilities):
* wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
(URLUtilities):
2012-09-24 Joone Hur <joone.hur@intel.com>
[GTK] Implement GraphicsLayer using Clutter
https://bugs.webkit.org/show_bug.cgi?id=73767
Reviewed by Martin Robinson.
Add ClutterActor and GraphicsLayerActor to GTypedefs.h.
* wtf/gobject/GTypedefs.h:
2012-09-23 Byungwoo Lee <bw80.lee@gmail.com>
Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
https://bugs.webkit.org/show_bug.cgi?id=97306
Reviewed by Benjamin Poulain.
Fix build warning about -Wunused-parameter on FastMalloc.cpp,
OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
Fix header including order of FastMalloc.cpp.
* wtf/FastMalloc.cpp:
(WTF::fastMallocSize):
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
2012-09-22 Sam Weinig <sam@webkit.org>
Add explicit conversion operator to RetainPtr for easier use in C++11 environments
https://bugs.webkit.org/show_bug.cgi?id=97403
Reviewed by Dan Bernstein.
* wtf/Compiler.h:
Add support for COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
* wtf/RetainPtr.h:
(RetainPtr):
(WTF::RetainPtr::get):
(WTF::RetainPtr::operator PtrType):
Add the explicit conversion operator and group all the underlying
pointer accessors together.
2012-09-21 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Error out early if we don't have ICU available
Reviewed by Tor Arne Vestbø.
* WTF.pri:
2012-09-20 Patrick Gansterer <paroga@webkit.org>
Add String::numberToStringFixedWidth()
https://bugs.webkit.org/show_bug.cgi?id=96330
Reviewed by Benjamin Poulain.
Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
and remove the now unnecessary branch in String::number() for the old flags.
* wtf/text/WTFString.cpp:
(WTF::String::number):
(WTF::String::numberToStringFixedWidth):
* wtf/text/WTFString.h:
2012-09-19 Geoffrey Garen <ggaren@apple.com>
OSR exit sometimes neglects to create the arguments object
https://bugs.webkit.org/show_bug.cgi?id=97162
Reviewed by Filip Pizlo.
* wtf/HashTraits.h:
(NullableHashTraits):
(WTF::NullableHashTraits::emptyValue):
(WTF):
2012-09-18 Glenn Adams <glenn@skynav.com>
WTFString::show doesn't dump non-ASCII characters in a readable manner
https://bugs.webkit.org/show_bug.cgi?id=96749
Reviewed by Benjamin Poulain.
Dump non-ASCII characters in a useful form for debugging.
* wtf/text/WTFString.cpp:
(asciiDebug):
Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
using \uXXXX format. Also escape \ as \\ in order to remove ambiguity.
2012-09-18 Mark Hahnenberg <mhahnenberg@apple.com>
Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
https://bugs.webkit.org/show_bug.cgi?id=96980
Reviewed by Benjamin Poulain.
* wtf/TypeTraits.h:
(WTF):
2012-09-17 Glenn Adams <glenn@skynav.com>
Including HexNumber.h fails build if hexDigitsForMode is not referenced
https://bugs.webkit.org/show_bug.cgi?id=96873
Reviewed by Benjamin Poulain.
Ensure release build is possible when hexDigitsForMode is not referenced by
template expansion.
* wtf/HexNumber.h:
(WTF::Internal::hexDigitsForMode):
Change hexDigitsForMode to inline (rather than static). Make string literals
{lower,upper}HexDigits non-local and non-static, but const, to which the linker
should merge references in the RO data segment.
2012-09-17 Filip Pizlo <fpizlo@apple.com>
The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
https://bugs.webkit.org/show_bug.cgi?id=96957
Reviewed by Oliver Hunt.
* wtf/ThreadRestrictionVerifier.h:
(WTF):
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
(ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification):
(WTF::ThreadRestrictionVerifier::setShared):
(WTF::ThreadRestrictionVerifier::isSafeToUse):
2012-09-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r128796.
http://trac.webkit.org/changeset/128796
https://bugs.webkit.org/show_bug.cgi?id=96966
It broke everything (Requested by Ossy_NIGHT on #webkit).
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
2012-09-17 Uli Schlachter <psychon@znc.in>
Implement uncommitted memory for Linux.
https://bugs.webkit.org/show_bug.cgi?id=65766
Reviewed by Gavin Barraclough.
The old approach used MAP_NORESERVE to allocate address space without
committing it. However, that flag gets ignored if
/proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
mapping with PROT_NONE. This works because mappings which aren't even
readable don't get accounted as committed on Linux.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
2012-09-17 Filip Pizlo <fpizlo@apple.com>
Array profiling has convergence issues
https://bugs.webkit.org/show_bug.cgi?id=96891
Reviewed by Gavin Barraclough.
Added functions for testing if something is a power of 2.
* wtf/MathExtras.h:
(hasZeroOrOneBitsSet):
(hasTwoOrMoreBitsSet):
2012-09-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: now when we can detect instrumented classes we can
remove addInstrumentedMember and use addMember for everything.
https://bugs.webkit.org/show_bug.cgi?id=96913
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
(WTF::MemoryInstrumentation::addInstrumentedCollection):
(WTF::MemoryInstrumentation::addInstrumentedMapEntries):
(WTF::MemoryInstrumentation::addInstrumentedMapValues):
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/CString.h:
(WTF::CString::reportMemoryUsage):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::reportMemoryUsage):
* wtf/url/api/URLString.cpp:
(WTF::URLString::reportMemoryUsage):
2012-09-17 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed compilation fix.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
2012-09-15 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: automatically detect if class has reportMemoryUsage method
https://bugs.webkit.org/show_bug.cgi?id=96756
Reviewed by Alexander Pavlov.
Implemeted automatic selector of the memory reporting method. If
an object has reportMemoryUsage method then call it. Otherwise
count only object's self size. As the next step we will delete
addInstrumentedMember and addInstrumentedObjectImpl and will
have only addMember and addObjectImpl that would automatically
call reportMemoryUsage if it is present.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::MemoryInstrumentation::addInstrumentedObjectImpl):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::process):
2012-09-14 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: OwnPtr and RefPtr reported by pointer can be double counted by the memory instrumentation
https://bugs.webkit.org/show_bug.cgi?id=96791
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl): check if the smart pointer has already
been visited before counting its size.
2012-09-15 Benjamin Poulain <benjamin@webkit.org>
Fix the build with WTF URL
https://bugs.webkit.org/show_bug.cgi?id=96875
Reviewed by Adam Barth.
Add support for MemoryInstrumentation to WTF's URL classes.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::reportMemoryUsage):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.cpp:
(WTF::URLString::reportMemoryUsage):
* wtf/url/api/URLString.h:
(URLString):
2012-09-15 Raphael Kubo da Costa <rakuco@FreeBSD.org>
llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
https://bugs.webkit.org/show_bug.cgi?id=96870
Reviewed by Filip Pizlo.
* wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
currently used for OS(LINUX) to the BSDs, since they also normally
use GNU as, and clang/llvm seems to parse that syntax just fine as
well.
2012-09-14 Alexey Proskuryakov <ap@apple.com>
Minimize collisions when hashing pairs
https://bugs.webkit.org/show_bug.cgi?id=96022
Build fix (with newer clang?)
* wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
64 bit to 32 bit.
2012-09-14 Dana Jansens <danakj@chromium.org>
Minimize collisions when hashing pairs
https://bugs.webkit.org/show_bug.cgi?id=96022
Reviewed by Adrienne Walker.
The current hash function for pairs has poor performance as it does a
nice hash function on 64 bits, but then just drops the top 32 bits. The
hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
but this requires not dropping any bits in order to retain the
characteristics mentioned by Thomas.
A better method of hashing sets of 32-bit integers is to use
multiplication in 64 bits with random integers. This method is a
provably almost-universal hash function. Testing shows that this
method decreases the time required, when compared with the current
method, by more than 20% due to better hashing characteristics.
* wtf/HashFunctions.h:
(WTF):
(WTF::pairIntHash):
Implments the hashing method for a pair of unsigned integers.
(WTF::PairHash::hash):
Use pairIntHash() on the hash results of each object in the pair.
(WTF::IntPairHash::hash):
Implement an integer-specific PairHash class that does not need to
hash each object in the pair. It uses pairIntHash on the two
integers in the pair directly.
(WTF::IntPairHash::equal):
(IntPairHash):
2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make force_static_libs_as_shared work on Mac OS
We had to move a few LIBS += around that were in the wrong place,
and not caught when everything was just linked into the final
QtWebKit library.
Reviewed by Simon Hausmann.
* WTF.pri:
2012-09-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: convert template versions of String*::reportMemoryUsage functions to normal functions.
https://bugs.webkit.org/show_bug.cgi?id=96759
Reviewed by Yury Semikhatsky.
Now when MemoryInstrumentation.h is a part of WTF we can move reportMemoryUsage functions to cpp file.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
(WTF):
* wtf/text/AtomicString.h:
(WTF):
(AtomicString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
(WTF):
* wtf/text/StringImpl.h:
(WTF):
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
(WTF):
* wtf/text/WTFString.h:
(WTF):
(String):
2012-09-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: remove current traits helper class because it is customizing the instrumentation at a wrong place and is not necessary at the moment.
https://bugs.webkit.org/show_bug.cgi?id=96737
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
WTF::MemoryInstrumentationTraits): removed
(WTF::MemoryInstrumentation::OwningTraits::addInstrumentedObject): direct call inserted
(WTF::MemoryInstrumentation::OwningTraits::addObject):direct call inserted
2012-09-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
Evas_Object* is a ref'ed structure, so tread it as such
https://bugs.webkit.org/show_bug.cgi?id=96659
Reviewed by Gyuyoung Kim.
Remove OwnPtr support for Evas_Object* and add support for it
with RefPtr instead (the latter moved from WebCore).
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
* wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
(WTF):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
(WTF):
2012-09-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, rolling out r128507.
http://trac.webkit.org/changeset/128507
https://bugs.webkit.org/show_bug.cgi?id=96659
Revert. r128507 makes too many crash in EFL layout test bots.
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):
2012-09-13 Kevin Funk <kevin.funk@kdab.com>
Make compile with both OS(WINCE) and PLATFORM(QT) support
https://bugs.webkit.org/show_bug.cgi?id=95536
Reviewed by Simon Hausmann.
Fixes for Windows CE.
* WTF.pri:
Also include path for mt19937ar.c
* wtf/unicode/icu/CollatorICU.cpp:
Fix undeclared strdup() on CE7
* wtf/Platform.h:
2012-09-13 Byungseon Shin <xingri@gmail.com>
Fix for WTF fails to compile in thumb mode when llint is enabled.
https://bugs.webkit.org/show_bug.cgi?id=96400
Reviewed by Filip Pizlo.
When using "+m" with Armv7 cross compiler assume offset range between +/- 4095
(the largest possible offset range).
However, ldrex/strex can only use offset range of 0~1020, so "+m" needed to be changed to "+Q".
Ref. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2012-09-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
Evas_Object* is a ref'ed structure, so tread it as such
https://bugs.webkit.org/show_bug.cgi?id=96659
Reviewed by Adam Barth.
Remove OwnPtr support for Evas_Object* and add support for it
with RefPtr instead (the latter moved from WebCore).
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
* wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
(WTF):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
(WTF):
2012-09-13 Michael Saboff <msaboff@apple.com>
Added 8 bit path to WidthIterator::advance()
https://bugs.webkit.org/show_bug.cgi?id=96590
Reviewed by Geoffrey Garen.
Added new character constant for Hiragana Letter Small A.
* wtf/unicode/CharacterNames.h:
(Unicode):
2012-09-13 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: instrument KURL directly.
https://bugs.webkit.org/show_bug.cgi?id=96624
Reviewed by Yury Semikhatsky.
I replaced traits based instrumentation of KURL with reportMemoryUsage functions.
CString* were also instrumented.
Drive by fix: Instrumentation code in QualifiedName was moved to cpp.
* wtf/text/CString.h:
(CStringBuffer):
(WTF::CStringBuffer::reportMemoryUsage):
(CString):
(WTF::CString::reportMemoryUsage):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: migrate core instrumentation code to WTF namespace
https://bugs.webkit.org/show_bug.cgi?id=96511
Reviewed by Yury Semikhatsky.
After moving core NMI code to WTF namespace I removed forward declarations
of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add
forward declaration into wtf/Forward.h
* wtf/Forward.h:
(WTF):
* wtf/MemoryInstrumentation.h:
2012-09-12 Dan Bernstein <mitz@apple.com>
Removed a reference to a file that doesn’t participate in any target.
* WTF.xcodeproj/project.pbxproj: Removed the reference to
CONTRIBUTORS.pthreads-win32.
2012-09-11 Michael Saboff <msaboff@apple.com>
Element::classAttributeChanged should use characters8/16 to find first non-whitespace
https://bugs.webkit.org/show_bug.cgi?id=96446
Reviewed by Benjamin Poulain.
Added bit size related string accessors to AtomicString to support change.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::is8Bit):
(WTF::AtomicString::characters8):
(WTF::AtomicString::characters16):
2012-09-12 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Removed temporarily added function signature.
* icu/unicode/unistr.h:
(UnicodeString::extract):
2012-09-12 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Change UnicodeString::extract for gcc based on ICU fix described in
http://bugs.icu-project.org/trac/ticket/8197.
* icu/unicode/unistr.h:
(UnicodeString::extract):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI move String* instrumentation to wtf.
https://bugs.webkit.org/show_bug.cgi?id=96405
Reviewed by Yury Semikhatsky.
This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
Tested by webkit_unit_tests.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.h:
(String):
(WTF::String::reportMemoryUsage):
2012-09-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r128279.
http://trac.webkit.org/changeset/128279
https://bugs.webkit.org/show_bug.cgi?id=96487
"Snow Leopard compilation broken" (Requested by yurys on
#webkit).
* wtf/MemoryInstrumentation.h:
(GenericMemoryTypes):
(WebCore):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
2012-09-12 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
https://bugs.webkit.org/show_bug.cgi?id=96483
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WebCore::MemoryClassInfo::addWeakPointer): this method is expected to be
used on fields that are pointers to objects which are parts of bigger memory
blocks (field of another object, element in an array, object allocated in a
memory arena etc.). We don't want to count such objects' memory separately
from their owners but in order to be able to validates the memory instrumentation
with clang plugin we need to make sure all fields in instrumented objects
are reported.
(MemoryClassInfo):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI move String* instrumentation to wtf.
https://bugs.webkit.org/show_bug.cgi?id=96405
Reviewed by Yury Semikhatsky.
This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
Tested by webkit_unit_tests.
* wtf/MemoryInstrumentation.h:
(WebCore):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.h:
(String):
(WTF::String::reportMemoryUsage):
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Added missing include file needed by 96422 for C++ ICU APIs.
* icu/unicode/bytestream.h: Added.
* icu/unicode/rep.h: Added.
* icu/unicode/std_string.h: Added.
* icu/unicode/strenum.h: Added.
* icu/unicode/stringpiece.h: Added.
* icu/unicode/unistr.h: Added.
* icu/unicode/uobject.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Rubber stamped by Stephanie Lewis.
Added missing include file needed by 96422.
* icu/unicode/unorm2.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Rubber stamped by Stephanie Lewis.
Added missing include file needed by 96422.
* icu/unicode/ptypes.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Update ICU header files to more recent version
https://bugs.webkit.org/show_bug.cgi?id=96422