1 2013-04-30 Commit Queue <rniwa@webkit.org>
3 Unreviewed, rolling out r149349 and r149354.
4 http://trac.webkit.org/changeset/149349
5 http://trac.webkit.org/changeset/149354
6 https://bugs.webkit.org/show_bug.cgi?id=115444
8 The Thumb version of compileSoftModulo make invalid use of
9 registers (Requested by benjaminp on #webkit).
13 2013-04-30 Darin Adler <darin@apple.com>
15 [Mac] Make adoptNS faster on platforms without garbage collection by skipping a CFRetain/NSRelease pair
16 https://bugs.webkit.org/show_bug.cgi?id=115424
18 Reviewed by Eric Carlson.
21 (WTF::adoptNSReference): When OBJC_NO_GC is set, make this an empty function, because in that case
22 CFRetain and -[NSObject retain] are the same thing and there is no need to call CFRetain and
23 -[NSObject release] to adopt an Objective-C object.
25 2013-04-30 Anders Carlsson <andersca@apple.com>
27 String::isolatedCopy() can avoid a copy if the original is a temporary
28 https://bugs.webkit.org/show_bug.cgi?id=115425
30 Reviewed by Darin Adler.
33 Add WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS define.
35 * wtf/text/WTFString.cpp:
36 (WTF::String::isolatedCopy):
37 * wtf/text/WTFString.h:
38 If COMPILER_SUPPORTS(CXX_REFERENCE_QUALIFIED_FUNCTIONS) is true, add two overloads of String::isolatedCopy().
39 One is used if *this is an lvalue, and one is used if *this is an rvalue. In the latter case, we know that the original
40 String object is a temporary and will be going away, so if it's safe to send it to another thread (if it's not an AtomicString,
41 and if it's refcount is 1), then we can just steal the StringImpl from the original and avoid a copy altogether.
43 2013-04-30 Zalan Bujtas <zalan@apple.com>
45 Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
46 https://bugs.webkit.org/show_bug.cgi?id=111244
48 Reviewed by David Kilzer.
50 Enable performance.now() as a minimal subset of Web Timing API.
51 It returns DOMHighResTimeStamp, a monotonically increasing value representing the
52 number of milliseconds from the start of the navigation of the current document.
53 JS libraries use this API to check against the requestAnimationFrame() timestamp.
55 * wtf/FeatureDefines.h:
57 2013-04-29 Cosmin Truta <ctruta@blackberry.com>
59 [ARM] Expand the use of integer division
60 https://bugs.webkit.org/show_bug.cgi?id=115138
62 Reviewed by Benjamin Poulain.
64 * wtf/Platform.h: Added ENABLE_ARM_INTEGER_DIV.
66 2013-04-29 Anders Carlsson <andersca@apple.com>
68 It should be an error to use adoptPtr with RefCounted subclasses
69 https://bugs.webkit.org/show_bug.cgi?id=115389
71 Reviewed by Benjamin Poulain.
77 2013-04-29 Patrick Gansterer <paroga@webkit.org>
79 [WIN] Add workaround for UNUSED_PARAM()
80 https://bugs.webkit.org/show_bug.cgi?id=115350
82 Reviewed by Andreas Kling.
84 r147882 added an workaround for the MSVC compiler on Windows CE.
85 Extend this workaround to whole MSVC compiler, since the same
86 problem occurs with the Visual Studio 10 compiler too.
90 2013-04-29 Patrick Gansterer <paroga@webkit.org>
92 [WIN] Add WTF_USE_IMLANG_FONT_LINK2
93 https://bugs.webkit.org/show_bug.cgi?id=115198
95 Reviewed by Andreas Kling.
99 2013-04-29 Patrick Gansterer <paroga@webkit.org>
101 Define USE(ICU_UNICODE) if USE(WCHAR_UNICODE) is false
102 https://bugs.webkit.org/show_bug.cgi?id=115349
104 Reviewed by Andreas Kling.
106 Since we support only ICU and WCHAR as Unicode backend (ICU is the default)
107 automatically use ICU if WCHAR was not selected via compiler defines.
111 2013-04-29 Patrick Gansterer <paroga@webkit.org>
113 Build fix for WinCE after r148888 and r149097
114 https://bugs.webkit.org/show_bug.cgi?id=115168
116 Reviewed by Anders Carlsson.
118 When using compiler intrinsics on Windows CE the compiler complains
119 about wrong linkage specification of replaced CRT functions defined
120 in math.h. This is because the compiler has intrinsics for this
121 functions defined, and requires them to have extern "C" linkage.
124 (wtf_atan2): Added extern "C" to function signature.
128 2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
130 Unreviewed. Fix make distcheck.
132 * GNUmakefile.list.am: Add missing header file to compilation.
134 2013-04-27 Darin Adler <darin@apple.com>
136 Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
137 https://bugs.webkit.org/show_bug.cgi?id=115307
139 Reviewed by Geoffrey Garen.
141 * wtf/RunLoopTimerCF.cpp:
142 (WTF::RunLoopTimerBase::start):
143 * wtf/SchedulePair.h:
144 (WTF::SchedulePair::SchedulePair):
145 * wtf/SchedulePairMac.mm:
146 (WTF::SchedulePair::SchedulePair):
147 * wtf/unicode/icu/CollatorICU.cpp:
148 (WTF::Collator::userDefault):
149 Use adoptCF free function.
151 2013-04-26 Geoffrey Garen <ggaren@apple.com>
153 Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
154 https://bugs.webkit.org/show_bug.cgi?id=115057
156 Reviewed by Filip Pizlo.
158 Added a helper constructor for TriState so clients can make one without
159 branching or making assumptions about the integer values of TriStates.
165 2013-04-26 Roger Fong <roger_fong@apple.com>
167 Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders.
168 Make the DebugSuffix configuration use _debug dependencies.
170 * WTF.vcxproj/WTF.make:
171 * WTF.vcxproj/WTF.vcxproj:
172 * WTF.vcxproj/WTFCommon.props:
173 * WTF.vcxproj/WTFDebug.props:
174 * WTF.vcxproj/WTFGenerated.make:
175 * WTF.vcxproj/WTFGenerated.vcxproj:
176 * WTF.vcxproj/WTFGeneratedCommon.props:
177 * WTF.vcxproj/WTFGeneratedDebug.props:
178 * WTF.vcxproj/WTFGeneratedProduction.props:
179 * WTF.vcxproj/WTFGeneratedRelease.props:
180 * WTF.vcxproj/WTFProduction.props:
181 * WTF.vcxproj/WTFRelease.props:
182 * WTF.vcxproj/build-generated-files.sh:
183 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
184 (react_to_vsprops_changes):
186 2013-04-26 Martin Robinson <mrobinson@igalia.com>
188 Remove the remaining Skia #ifdefs
189 https://bugs.webkit.org/show_bug.cgi?id=114886
191 Reviewed by Benjamin Poulain.
195 2013-04-26 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
197 Add move semantics to RefPtr
198 https://bugs.webkit.org/show_bug.cgi?id=115033
200 Reviewed by Anders Carlsson.
202 Add move constructors and move assignment operators to RefPtr when
203 COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES).
204 This obviates unnecessary reffing/ureffing when RefPtr is created
205 or assigned from rvalue references.
209 (WTF::RefPtr::RefPtr):
210 (WTF::RefPtr::operator=):
212 2013-04-26 Andreas Kling <akling@apple.com>
214 Remove wxWebKit from WTF.
215 <http://webkit.org/b/115249>
217 Reviewed by Antti Koivisto.
220 * wtf/ArrayBufferView.h:
222 * wtf/CurrentTime.cpp:
223 * wtf/DisallowCType.h:
224 * wtf/ExportMacros.h:
225 * wtf/FeatureDefines.h:
227 * wtf/text/WTFString.h:
229 * wtf/wx/MainThreadWx.cpp: Removed.
230 * wtf/wx/StringWx.cpp: Removed.
232 2013-04-25 Filip Pizlo <fpizlo@apple.com>
234 Unreviewed, roll out http://trac.webkit.org/changeset/148999
235 It broke http://kripken.github.io/ammo.js/examples/new/ammo.html
239 2013-04-25 Oliver Hunt <oliver@apple.com>
243 * wtf/StackBounds.cpp:
244 (WTF::StackBounds::initialize):
246 2013-04-25 Oliver Hunt <oliver@apple.com>
248 Stack guards are too conservative
249 https://bugs.webkit.org/show_bug.cgi?id=115147
251 Reviewed by Mark Hahnenberg.
253 Use getrlimit on darwin to get the stack size for the main thread.
255 * wtf/StackBounds.cpp:
256 (WTF::StackBounds::initialize):
258 2013-04-25 Andreas Kling <akling@apple.com>
260 Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
262 Rubber-stamped by Anders Koivisto.
264 * wtf/FeatureDefines.h:
266 2013-04-25 peavo@outlook.com <peavo@outlook.com>
268 [Windows] Compile fix.
269 https://bugs.webkit.org/show_bug.cgi?id=115170
271 Reviewed by Filip Pizlo.
273 Forward declare function, instead of including intrin.h.
277 2013-04-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
279 Use std::move in AtomicString
280 https://bugs.webkit.org/show_bug.cgi?id=115102
282 Reviewed by Anders Carlsson.
284 Use std::move in AtomicString instead of direct casting to rvalue references.
286 * wtf/text/AtomicString.h:
288 (WTF::AtomicString::AtomicString):
289 (WTF::AtomicString::operator=):
291 2013-04-25 Patrick Gansterer <paroga@webkit.org>
293 Unreviewed WinCE build fix after r148888.
295 * wtf/Atomics.h: WinCE version of intrin.h is called cmnintrin.h.
297 2013-04-24 Roger Fong <roger_fong@apple.com>
299 Have VS2010 WebKit solution look in WebKit_Libraries/lib32 for dependencies.
301 * WTF.vcxproj/build-generated-files.sh:
303 2013-04-24 Benjamin Poulain <benjamin@webkit.org>
305 Use post-branch store for RefCountedBase::derefBase
306 https://bugs.webkit.org/show_bug.cgi?id=115078
308 Reviewed by Andreas Kling.
311 (WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.
313 2013-04-23 Geoffrey Garen <ggaren@apple.com>
315 Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
316 https://bugs.webkit.org/show_bug.cgi?id=115057
318 Reviewed by Filip Pizlo.
320 Added a helper constructor for TriState so clients can make one without
321 branching or making assumptions about the integer values of TriStates.
327 2013-04-23 Roger Fong <roger_fong@apple.com>
331 * WTF.vcproj/WTF.vcproj:
333 2013-04-23 Benjamin Poulain <bpoulain@apple.com>
335 Remove unused code of RefCounted after chromium removal
336 https://bugs.webkit.org/show_bug.cgi?id=115009
338 Reviewed by Ryosuke Niwa.
341 (WTF::RefCountedBase::refCount):
343 It looks like addressOfCount() is no longer needed.
344 Also change the type back to unsigned as it make more sense.
346 2013-04-23 David Kilzer <ddkilzer@apple.com>
348 RetainPtr.h should compile with -Wshorten-64-to-32
349 <http://webkit.org/b/115047>
351 Reviewed by Anders Carlsson.
353 Fixes the following warning:
355 RetainPtr.h:318:20: error: implicit conversion loses integer precision: 'CFHashCode' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
356 return CFHash(o.get());
357 ~~~~~~ ^~~~~~~~~~~~~~~
360 (WTF::RetainPtrObjectHash::hash): Cast return value of CFHash()
361 to unsigned. This has no effect on 32-bit architectures, but
362 takes the lower 32-bits of the CFHashCode (unsigned long) on
363 64-bit architectures, which is what happens implicitly now.
365 2013-04-22 Patrick Gansterer <paroga@webkit.org>
367 [CMake] Move NullPtr.cpp from PlatformWinCE.cmake to CMakeLists.txt
368 https://bugs.webkit.org/show_bug.cgi?id=114557
370 Reviewed by Laszlo Gombos.
372 This file is not specific to Windwos CE. Move it the the general
373 CMakeLists.txt so other ports can use it to. It does not affect
374 ports which do not need it, since it contains a preprocessor guard.
376 * wtf/CMakeLists.txt:
377 * wtf/PlatformWinCE.cmake:
379 2013-04-22 Benjamin Poulain <benjamin@webkit.org>
381 Remove the memory instrumentation code
382 https://bugs.webkit.org/show_bug.cgi?id=114931
384 Reviewed by Andreas Kling.
386 On Mac x86_64, the code removal cause the binary to be
389 * GNUmakefile.list.am:
391 * WTF.vcproj/WTF.vcproj:
392 * WTF.vcxproj/WTF.vcxproj:
393 * WTF.vcxproj/WTF.vcxproj.filters:
394 * WTF.xcodeproj/project.pbxproj:
395 * wtf/CMakeLists.txt:
399 (ListHashSetNodeAllocator):
400 (WTF::ListHashSetNodeAllocator::pool):
401 (WTF::ListHashSetNodeAllocator::pastPool):
402 * wtf/MemoryInstrumentation.cpp: Removed.
403 * wtf/MemoryInstrumentation.h: Removed.
404 * wtf/MemoryInstrumentationArrayBufferView.h: Removed.
405 * wtf/MemoryInstrumentationHashCountedSet.h: Removed.
406 * wtf/MemoryInstrumentationHashMap.h: Removed.
407 * wtf/MemoryInstrumentationHashSet.h: Removed.
408 * wtf/MemoryInstrumentationListHashSet.h: Removed.
409 * wtf/MemoryInstrumentationSequence.h: Removed.
410 * wtf/MemoryInstrumentationString.h: Removed.
411 * wtf/MemoryInstrumentationVector.h: Removed.
412 * wtf/MemoryObjectInfo.h: Removed.
413 * wtf/text/AtomicString.h:
414 * wtf/text/StringImpl.h:
415 (WTF::StringImpl::isASCIILiteral):
416 * wtf/text/WTFString.h:
418 2013-04-22 David Kilzer <ddkilzer@apple.com>
420 StringImpl.h should compile with -Wshorten-64-to-32
421 <http://webkit.org/b/114970>
423 Reviewed by Darin Adler.
425 Fixes the following warnings with -Wshorten-64-to-32:
427 StringImpl.h:317:25: error: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
428 unsigned hash = reinterpret_cast<uintptr_t>(this);
429 ~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
431 * wtf/text/StringImpl.h:
432 (WTF::StringImpl::StringImpl): Add static_cast<uint32_t>() to
433 formalize taking the lower 32-bits of the pointer value on
434 64-bit architectures.
436 2013-04-22 Andreas Kling <akling@apple.com>
438 Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
439 <http://webkit.org/b/97268>
440 <rdar://problem/12376519>
442 Reviewed by Sam Weinig.
444 Shrink Vector by 8 bytes on 64-bit by using 32-bit capacity and size.
445 Vector now inherits from VectorBuffer instead of having a VectorBuffer member;
446 this is necessary for m_size to fall into the padding after the base class members.
448 The WTF::Vector API still uses size_t.
450 Based on Blink r148313 by <cevans@chromium.org>.
452 * wtf/SizeLimits.cpp:
454 (WTF::VectorBufferBase::allocateBuffer):
455 (WTF::VectorBufferBase::tryAllocateBuffer):
457 (WTF::VectorBuffer::shouldReallocateBuffer):
459 (WTF::Vector::Vector):
460 (WTF::Vector::capacity):
465 (WTF::::reserveCapacity):
466 (WTF::::tryReserveCapacity):
467 (WTF::::reserveInitialCapacity):
468 (WTF::::shrinkCapacity):
469 (WTF::::releaseBuffer):
471 2013-04-21 Filip Pizlo <fpizlo@apple.com>
473 Memory barrier support should also ensure that we always do a compiler fence
474 https://bugs.webkit.org/show_bug.cgi?id=114934
476 Reviewed by Michael Saboff.
478 This is a cherry-pick merge of the WTF part of r148836 from the dfgFourthTier
479 branch. It fixes a memory ordering bug that is likely asymptomatic, but
480 nonetheless real: TCSpinLock expects that using a memoryBarrierBeforeUnlock()
481 prior to setting lockword_ to 0 will ensure that the assignment to lockword_
482 won't get floated above any of the stores in the critical section. While that
483 memory barrier does indeed do the right thing on ARM, it doesn't do the right
484 thing on other architectures: it turns into empty code that the compiler blows
485 away, which is fine for the hardware since X86 won't reorder that store - but
486 it's not fine for the compiler, which may still do its own reorderings.
488 The WTF part of r148836 fixes this by using a compiler fence: an empty asm
489 volatile block that is marked as clobbering memory.
491 Instead of doing a separate surgical fix in trunk, I decided to merge the
492 whole WTF change over, to make merging easier in the future.
494 Performance testing of this change in dfgFourthTier showed no regression.
497 (WTF::compilerFence):
500 (WTF::loadLoadFence):
501 (WTF::loadStoreFence):
502 (WTF::storeLoadFence):
503 (WTF::storeStoreFence):
504 (WTF::memoryBarrierAfterLock):
505 (WTF::memoryBarrierBeforeUnlock):
508 2013-04-22 David Kilzer <ddkilzer@apple.com>
510 WTF::AtomicString::find() should take unsigned 'start' argument
511 <http://webkit.org/b/114958>
513 Reviewed by Darin Adler.
515 Fixes the following warnings with -Wshorten-64-to-32:
517 AtomicString.h:113:76: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
518 size_t find(UChar c, size_t start = 0) const { return m_string.find(c, start); }
520 AtomicString.h:115:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
521 { return m_string.find(s, start, caseSentitive); }
523 AtomicString.h:117:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
524 { return m_string.find(s, start, caseSentitive); }
527 * wtf/text/AtomicString.h:
528 (WTF::AtomicString::find): Change type of 'start' argument from
531 2013-04-21 Benjamin Poulain <benjamin@webkit.org>
533 Improve StringImpl code density for older ARM hardware
534 https://bugs.webkit.org/show_bug.cgi?id=114898
536 Reviewed by Geoffrey Garen.
538 Reduce the number of instructions needed for StringImpl::deref
539 on older ARM hardware.
541 The extra indirection should have a negligible impact on x86_64.
543 * wtf/text/StringImpl.cpp:
544 (WTF::StringImpl::destroy):
545 * wtf/text/StringImpl.h:
547 (WTF::StringImpl::deref):
549 2013-04-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
551 LLint should be able to use x87 instead of SSE for floating pointer
552 https://bugs.webkit.org/show_bug.cgi?id=112239
554 Reviewed by Filip Pizlo.
556 Disable GTK workaround now that LLInt does not require SSE2.
560 2013-04-19 Roger Fong <roger_fong@apple.com>
562 Remove uses of WebKit_Source from AppleWin build in WTF.
564 * WTF.vcxproj/WTF.make:
565 * WTF.vcxproj/copy-files.cmd:
566 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
567 (react_to_vsprops_changes):
568 (react_to_webkit1_interface_changes):
570 2013-04-19 Benjamin Poulain <benjamin@webkit.org>
572 Remove the declaration of MemoryObjectInfo from StringImpl
573 https://bugs.webkit.org/show_bug.cgi?id=114788
575 Reviewed by Andreas Kling.
577 * wtf/text/StringImpl.h: The declaration is an other left over from chromium.
579 2013-04-19 Benjamin Poulain <benjamin@webkit.org>
581 Make StringImpl::cost const
582 https://bugs.webkit.org/show_bug.cgi?id=114790
584 Reviewed by Andreas Kling.
586 * wtf/text/StringImpl.h:
587 (WTF::StringImpl::cost):
589 2013-04-19 Roger Fong <roger_fong@apple.com>
591 Unreviewed. WebKit_Source is incorrectly set.
593 * WTF.vcxproj/WTF.make:
595 2013-04-19 Alberto Garcia <agarcia@igalia.com>
597 OSAllocatorPosix: fix build warnings about unused parameters in QNX
598 https://bugs.webkit.org/show_bug.cgi?id=114859
600 Reviewed by Carlos Garcia Campos.
602 * wtf/OSAllocatorPosix.cpp:
603 (WTF::OSAllocator::reserveUncommitted):
605 2013-04-19 Dan Beam <dbeam@chromium.org>
607 Remove unmaintained feature REQUEST_AUTOCOMPLETE
608 https://bugs.webkit.org/show_bug.cgi?id=114846
610 Reviewed by Kent Tamura.
612 * wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.
614 2013-04-18 Zoltan Arvai <zarvai@inf.u-szeged.hu>
616 Speculative build fix for Qt Mountain Lion Release after r148639.
617 https://bugs.webkit.org/show_bug.cgi?id=114793
619 Reviewed by Michael Saboff.
621 * wtf/CurrentTime.cpp:
623 2013-04-17 Mark Lam <mark.lam@apple.com>
625 Added currentCPUTime() and currentCPUTimeMS().
626 https://bugs.webkit.org/show_bug.cgi?id=114577.
628 Reviewed by Geoffrey Garen.
630 The currentCPUTime() implementation came from the old TimeoutChecker.cpp.
632 * wtf/CurrentTime.cpp:
633 (WTF::currentCPUTime):
634 (WTF::currentCPUTimeMS):
637 2013-04-17 Ryosuke Niwa <rniwa@webkit.org>
639 REGRESSION(r148584): WebKit nightly builds don't load any page
640 https://bugs.webkit.org/show_bug.cgi?id=114752
642 Reviewed by Anders Carlsson.
644 We can't use C++ style (//) comments in Platform.h because WebKit2/DerivedSource.make doesn't know
645 how to strip it to be merged with *.sb.in to generate *.sb files. Specifically, we have:
647 # Some versions of clang incorrectly strip out // comments in c89 code.
648 # Use -traditional as a workaround, but only when needed since that causes
649 # other problems with later versions of clang.
650 ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
651 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
653 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
658 2013-04-17 Brent Fulgham <bfulgham@webkit.org>
660 [Windows, WinCairo] Remove Include Settings for Pthreads from WTF
661 https://bugs.webkit.org/show_bug.cgi?id=114694
663 Reviewed by Ryosuke Niwa.
665 * WTF.vcproj/WTFCommon.vsprops: Remove pthread search path.
666 * WTF.vcxproj/WTFCommon.props: Remove pthread search path.
667 * wtf/FastMalloc.cpp: Guard pthread.h include for non-pthread
670 2013-04-16 Oliver Hunt <oliver@apple.com>
672 Harden FastMalloc against partial pointer overflows
673 https://bugs.webkit.org/show_bug.cgi?id=114716
675 Reviewed by Gavin Barraclough.
677 Bite the bullet and perform object alignment checks on free.
678 malloc/free micro benchmark shows a regression, but real
679 benchmarks don't. There's a little code motion in this avoid
680 taking too much of a performance hit. In addition to the
681 alignment check we also validate the containing span as
682 we've already taken the hit of finding it.
684 * wtf/FastMalloc.cpp:
685 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
687 2013-04-16 Sam Weinig <sam@webkit.org>
689 Fix fallout after r148545.
692 Move Platform defines that were incorrectly in WebCore, into Platform.h
694 2013-04-15 Commit Queue <rniwa@webkit.org>
696 Unreviewed, rolling out r148488.
697 http://trac.webkit.org/changeset/148488
698 https://bugs.webkit.org/show_bug.cgi?id=114660
700 Roll back in r148462 since it was a false positive. (Requested
701 by rniwa on #webkit).
703 * wtf/FastMalloc.cpp:
705 (WTF::setThreadHeap):
706 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
707 (WTF::TCMalloc_ThreadCache::InitTSD):
708 * wtf/ThreadSpecificWin.cpp:
709 (WTF::destructorsList):
710 (WTF::destructorsMutex):
711 (WTF::threadSpecificKeyCreate):
712 (WTF::threadSpecificKeyDelete):
714 2013-04-15 Commit Queue <rniwa@webkit.org>
716 Unreviewed, rolling out r148462.
717 http://trac.webkit.org/changeset/148462
718 https://bugs.webkit.org/show_bug.cgi?id=114658
720 Broke Windows builds (Requested by rniwa on #webkit).
722 * wtf/FastMalloc.cpp:
724 (WTF::setThreadHeap):
725 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
726 (WTF::TCMalloc_ThreadCache::InitTSD):
727 * wtf/ThreadSpecificWin.cpp:
728 (WTF::destructorsList):
729 (WTF::destructorsMutex):
730 (WTF::threadSpecificKeyCreate):
731 (WTF::threadSpecificKeyDelete):
733 2013-04-15 Julien Brianceau <jbrianceau@nds.com>
735 LLInt SH4 backend implementation
736 https://bugs.webkit.org/show_bug.cgi?id=112886
738 Reviewed by Oliver Hunt.
742 2013-04-15 Patrick Gansterer <paroga@webkit.org>
744 [CMake] Add WTF_USE_*_UNICODE variables
745 https://bugs.webkit.org/show_bug.cgi?id=114556
747 Reviewed by Brent Fulgham.
749 WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
750 reduce duplication in the platform specific CMake files.
752 * wtf/CMakeLists.txt:
753 * wtf/PlatformBlackBerry.cmake:
754 * wtf/PlatformEfl.cmake:
755 * wtf/PlatformWinCE.cmake:
757 2013-04-15 Patrick Gansterer <paroga@webkit.org>
759 [WIN] Remove remaining calls to pthread from WTF
760 https://bugs.webkit.org/show_bug.cgi?id=114563
762 Reviewed by Brent Fulgham.
764 Replace pthread_key_create with threadSpecificKeyCreate and
765 pthread_setspecific with threadSpecificSet from ThreadSpecific.h.
766 These functions provide a windows-specific implementation for the pthread functions,
767 but require that the thread has been created with WTF::createThread(),
768 which is the case for all threads created within WebKit.
769 To call this function from fastMalloc we must not call fastMalloc in them.
770 To fulfill this constraint ThreadSpecificWin will allocated its memory through the
771 original malloc implementation and use the stack for local and static variables.
772 Keep the Darwin implementation as it is, since it contains some performance tweaks.
774 * wtf/FastMalloc.cpp:
775 * wtf/ThreadSpecificWin.cpp:
776 (WTF::destructorsList):
777 (WTF::destructorsMutex):
778 (WTF::threadSpecificKeyCreate):
779 (WTF::threadSpecificKeyDelete):
781 2013-04-14 Oliver Hunt <oliver@apple.com>
783 Try to fix non-apple windows builds
787 2013-04-14 David Kilzer <ddkilzer@apple.com>
789 Add EnumClass.h to project files
790 <http://webkit.org/b/114582>
792 Rubber-stamped by Dan Bernstein.
794 * WTF.pro: Add EnumClass.h to project.
795 * WTF.vcproj/WTF.vcproj: Ditto.
796 * WTF.vcxproj/WTF.vcxproj: Ditto.
797 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
798 * WTF.xcodeproj/project.pbxproj: Ditto.
800 2013-04-12 Oliver Hunt <oliver@apple.com>
802 Apologies to all, I have no idea what happened to cause this change.
806 2013-04-12 Oliver Hunt <oliver@apple.com>
808 [Qt][Win] r148257 broke the build
809 https://bugs.webkit.org/show_bug.cgi?id=114512
815 2013-04-11 Oliver Hunt <oliver@apple.com>
817 Add more type validation to debug builds
818 https://bugs.webkit.org/show_bug.cgi?id=114478
820 Reviewed by Mark Hahnenberg.
822 Add BINDING_VALIDATION flag and make RELEASE_ASSERT use UNLIKELY.
827 2013-04-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
829 [WTF] Get rid of truncated thread name warnings for non-Windows platforms
830 https://bugs.webkit.org/show_bug.cgi?id=114266
832 Reviewed by Ryosuke Niwa.
834 Hide the annoying message from ports that are not really interested
840 2013-04-10 Benjamin Poulain <bpoulain@apple.com>
842 Mass remove all the empty directories
844 Rubberstamped by Ryosuke Niwa.
846 * wtf/qt/compat: Removed.
847 * wtf/unicode/glib: Removed.
848 * wtf/unicode/qt4: Removed.
849 * wtf/unicode/wince: Removed.
851 2013-04-08 Anders Carlsson <andersca@apple.com>
853 Remove unneeded headers from FrameLoader.h
854 https://bugs.webkit.org/show_bug.cgi?id=114223
856 Reviewed by Geoffrey Garen.
862 Don't include DataLog.h unless DUMP_HASHTABLE_STATS_PER_TABLE is 1.
864 2013-04-10 Laszlo Gombos <l.gombos@samsung.com>
866 Remove ENABLE_3D_PLUGIN
867 https://bugs.webkit.org/show_bug.cgi?id=108002
869 Reviewed by Antti Koivisto.
871 Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
873 * wtf/FeatureDefines.h:
875 2013-04-09 Patrick Gansterer <paroga@webkit.org>
877 [CMake] Remove conditional source file lists in WTF
878 https://bugs.webkit.org/show_bug.cgi?id=114250
880 Reviewed by Laszlo Gombos.
882 Use the #ifdef in the source file instead of conditional adding
883 files to the list of source files. This allows us to remove the
884 information of enabled features from CMake in next step.
886 * wtf/CMakeLists.txt:
888 2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
890 Remove WTF.gyp/WTF.gypi
891 https://bugs.webkit.org/show_bug.cgi?id=114237
893 Reviewed by Maciej Stachowiak.
896 * WTF.gyp/.gitignore: Removed.
897 * WTF.gyp/WTF.gyp: Removed.
900 2013-04-08 Benjamin Poulain <benjamin@webkit.org>
902 Remove HTML Notification
903 https://bugs.webkit.org/show_bug.cgi?id=114231
905 Reviewed by Ryosuke Niwa.
907 * wtf/FeatureDefines.h:
909 2013-04-08 Benjamin Poulain <benjamin@webkit.org>
911 wtf/dtoa/* uses a confusing name to reference its buffers
912 https://bugs.webkit.org/show_bug.cgi?id=109709
914 Reviewed by Darin Adler.
916 The data structure Vector in wtf/dtoa has nothing to do with a traditional
917 vector, is it just a pointer and the length of the pointed buffer.
919 Rename it to BufferReference to avoid mistakes.
921 * wtf/dtoa/bignum-dtoa.cc:
922 * wtf/dtoa/bignum-dtoa.h:
923 * wtf/dtoa/bignum.cc:
926 * wtf/dtoa/double-conversion.cc:
927 * wtf/dtoa/fast-dtoa.cc:
928 * wtf/dtoa/fast-dtoa.h:
929 * wtf/dtoa/fixed-dtoa.cc:
930 * wtf/dtoa/fixed-dtoa.h:
932 * wtf/dtoa/strtod.cc:
937 (WTF::double_conversion::BufferReference::BufferReference):
938 (WTF::double_conversion::BufferReference::SubBufferReference):
941 2013-04-08 Alberto Garcia <agarcia@igalia.com>
943 [BlackBerry] MathExtras: macros defined in math.h conflict with the real functions
944 https://bugs.webkit.org/show_bug.cgi?id=112683
946 Reviewed by Darin Adler.
948 After calls to signbit and friends were prefixed with std:: in
949 r143232, the BlackBerry port no longer compiles.
951 The solution is to get rid of the macros defined in math.h and use
952 the real functions instead.
956 2013-04-08 Max Vujovic <mvujovic@adobe.com>
958 REGRESSION (r147502): Animations of CA filters broken
959 https://bugs.webkit.org/show_bug.cgi?id=114067
961 Reviewed by Dean Jackson.
963 Revert r147502 [1] because it broke CA filter animations.
965 [1]: http://trac.webkit.org/changeset/147502
969 2013-04-08 Andreas Kling <akling@apple.com>
971 REGRESSION(r147894): Broke WTFReportBacktrace() on Mac.
972 <http://webkit.org/b/114174>
974 Reviewed by Anders Carlsson.
976 An #elif !OS(ANDROID) block was erroneously removed, turn it into an #else instead since
977 that path will still be taken for OS(DARWIN).
979 * wtf/Assertions.cpp:
981 2013-04-08 Oliver Hunt <oliver@apple.com>
985 Remove unnecessary include of <wtf/Forward.h> from Vector.h
989 2013-04-08 Csaba Osztrogonác <ossy@webkit.org>
991 Unreviewed trivial buildfix after r147799.
993 Add an ifdef guard to ensure Qt uses its own monotonicallyIncreasingTime()
994 implemenation instead of the GLIB based one.
996 * wtf/CurrentTime.cpp:
999 2013-04-07 Benjamin Poulain <benjamin@webkit.org>
1001 Remove the android code from WebKit Template Framework
1002 https://bugs.webkit.org/show_bug.cgi?id=114138
1004 Reviewed by Dirk Schulze.
1006 * wtf/Assertions.cpp:
1010 * wtf/ThreadIdentifierDataPthreads.cpp:
1012 2013-04-07 Oliver Hunt <oliver@apple.com>
1014 Add bounds checking for WTF::Vector::operator[]
1015 https://bugs.webkit.org/show_bug.cgi?id=89600
1017 Reviewed by Filip Pizlo.
1019 Add a template parameter to Vector<> that controls whether
1020 bounds checking is performed in release builds or not.
1021 Defaults to crashing on overflow.
1029 (WTF::Vector::removeLast):
1034 (WTF::::reverseFind):
1036 (WTF::::appendRange):
1037 (WTF::::expandCapacity):
1038 (WTF::::tryExpandCapacity):
1042 (WTF::::reserveCapacity):
1043 (WTF::::tryReserveCapacity):
1044 (WTF::::reserveInitialCapacity):
1045 (WTF::::shrinkCapacity):
1048 (WTF::::appendSlowCase):
1049 (WTF::::uncheckedAppend):
1050 (WTF::::appendVector):
1055 (WTF::::releaseBuffer):
1056 (WTF::::checkConsistency):
1057 (WTF::deleteAllValues):
1062 2013-04-07 Patrick Gansterer <paroga@webkit.org>
1064 [WIN] Fix problems with export macros of AutodrainedPool
1065 https://bugs.webkit.org/show_bug.cgi?id=114132
1067 Reviewed by Geoffrey Garen.
1069 Exporting an inline function results in an error with the MS compiler.
1071 * wtf/AutodrainedPool.h:
1073 (WTF::AutodrainedPool::AutodrainedPool):
1074 (WTF::AutodrainedPool::~AutodrainedPool):
1075 (WTF::AutodrainedPool::cycle):
1077 2013-04-07 Patrick Gansterer <paroga@webkit.org>
1079 [WinCE] Add workaround for UNUSED_PARAM()
1080 https://bugs.webkit.org/show_bug.cgi?id=113440
1082 Reviewed by Benjamin Poulain.
1084 The MSVC compiler for Windwos CE throws an error when
1085 an function parameter is passed to UNUSED_PARAM() and
1086 its type is only forward declared.
1088 * wtf/UnusedParam.h:
1090 2013-04-07 Patrick Gansterer <paroga@webkit.org>
1092 Do not check if WTF_ARM_ARCH_VERSION is defined in WTF_ARM_ARCH_AT_LEAST macro
1093 https://bugs.webkit.org/show_bug.cgi?id=114127
1095 Reviewed by Benjamin Poulain.
1097 Platform.h defines WTF_ARM_ARCH_VERSION for CPU(ARM) always and removing
1098 the check works around a bug in older Microsoft compiler versions.
1102 2013-04-07 David Kilzer <ddkilzer@apple.com>
1104 Remove the rest of SVG_DOM_OBJC_BINDINGS
1105 <http://webkit.org/b/114112>
1107 Reviewed by Geoffrey Garen.
1109 * wtf/FeatureDefines.h:
1110 - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
1112 2013-04-06 Geoffrey Garen <ggaren@apple.com>
1114 Removed v8 bindings hooks from IDL files
1115 https://bugs.webkit.org/show_bug.cgi?id=114091
1117 Reviewed by Anders Carlsson and Sam Weinig.
1119 * wtf/ArrayBuffer.h:
1121 (WTF::ArrayBufferContents::ArrayBufferContents):
1122 (WTF::ArrayBufferContents::transfer):
1123 (ArrayBufferContents):
1125 (WTF::ArrayBufferContents::~ArrayBufferContents):
1128 2013-04-05 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
1130 [GTK] Change from PLATFORM(GTK) to USE(GLIB) in WTF/CurrentTime.cpp
1131 https://bugs.webkit.org/show_bug.cgi?id=114061
1133 Reviewed by Gustavo Noronha Silva.
1135 Now other ports using GLib can use the correct implementation
1136 and not the fallback one without adding any other PLATFORM guards
1139 * wtf/CurrentTime.cpp:
1142 2013-04-05 Geoffrey Garen <ggaren@apple.com>
1144 Made USE(JSC) unconditional
1145 https://bugs.webkit.org/show_bug.cgi?id=114058
1147 Reviewed by Anders Carlsson.
1149 * wtf/ThreadRestrictionVerifier.h:
1151 * wtf/WTFThreadData.cpp:
1152 (WTF::WTFThreadData::WTFThreadData):
1153 (WTF::WTFThreadData::~WTFThreadData):
1154 * wtf/WTFThreadData.h:
1156 * wtf/text/StringImpl.cpp:
1157 (WTF::StringImpl::~StringImpl):
1159 2013-04-05 Roger Fong <roger_fong@apple.com>
1161 More VS2010 solution makefile fixes.
1162 <rdar://problem/13588964>
1164 * WTF.vcxproj/WTF.make:
1166 2013-04-05 Anders Carlsson <andersca@apple.com>
1168 Remove more dead Chromium code from WTF
1169 https://bugs.webkit.org/show_bug.cgi?id=114037
1171 Reviewed by Allan Sandfeld Jensen.
1173 * wtf/CurrentTime.cpp:
1175 * wtf/DisallowCType.h:
1176 * wtf/ExportMacros.h:
1177 * wtf/MainThread.cpp:
1180 2013-04-05 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
1182 [EFL] Disable GLOBAL_FAST_MALLOC_NEW by default.
1183 https://bugs.webkit.org/show_bug.cgi?id=114031
1185 Reviewed by Alexis Menard.
1187 Follow what some other ports already do and avoid globally overriding
1188 the `new' and `delete' operators with the ones in FastMalloc.
1190 In many cases, third-party or client code allocates memory with
1191 standard library calls but the memory gets deleted by FastMalloc,
1192 causing a crash. The reverse (ie. memory being allocated by FastMalloc
1193 and freed by the system libraries) is also possible.
1195 Commits 135666 and 121018 provide more information about this, as well
1196 as comment 6 in bug 89358.
1200 2013-04-05 Benjamin Poulain <bpoulain@apple.com>
1202 Remove WTFURL from WebKit
1203 https://bugs.webkit.org/show_bug.cgi?id=113994
1205 Reviewed by Ryosuke Niwa.
1207 Painful, but that is for the best now :(
1209 * GNUmakefile.list.am:
1210 * WTF.xcodeproj/project.pbxproj:
1211 * wtf/MemoryInstrumentationParsedURL.h: Removed.
1212 * wtf/url/api/ParsedURL.cpp: Removed.
1213 * wtf/url/api/ParsedURL.h: Removed.
1214 * wtf/url/api/URLBuffer.h: Removed.
1215 * wtf/url/api/URLQueryCharsetConverter.h: Removed.
1216 * wtf/url/api/URLString.cpp: Removed.
1217 * wtf/url/api/URLString.h: Removed.
1218 * wtf/url/src/RawURLBuffer.h: Removed.
1219 * wtf/url/src/URLCanon.h: Removed.
1220 * wtf/url/src/URLCanonEtc.cpp: Removed.
1221 * wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
1222 * wtf/url/src/URLCanonFileurl.cpp: Removed.
1223 * wtf/url/src/URLCanonHost.cpp: Removed.
1224 * wtf/url/src/URLCanonICU.cpp: Removed.
1225 * wtf/url/src/URLCanonIP.cpp: Removed.
1226 * wtf/url/src/URLCanonInternal.cpp: Removed.
1227 * wtf/url/src/URLCanonInternal.h: Removed.
1228 * wtf/url/src/URLCanonMailto.cpp: Removed.
1229 * wtf/url/src/URLCanonPath.cpp: Removed.
1230 * wtf/url/src/URLCanonPathurl.cpp: Removed.
1231 * wtf/url/src/URLCanonQuery.cpp: Removed.
1232 * wtf/url/src/URLCanonRelative.cpp: Removed.
1233 * wtf/url/src/URLCanonStdURL.cpp: Removed.
1234 * wtf/url/src/URLCharacterTypes.cpp: Removed.
1235 * wtf/url/src/URLCharacterTypes.h: Removed.
1236 * wtf/url/src/URLComponent.h: Removed.
1237 * wtf/url/src/URLFile.h: Removed.
1238 * wtf/url/src/URLParse.cpp: Removed.
1239 * wtf/url/src/URLParse.h: Removed.
1240 * wtf/url/src/URLParseFile.cpp: Removed.
1241 * wtf/url/src/URLParseInternal.h: Removed.
1242 * wtf/url/src/URLSegments.cpp: Removed.
1243 * wtf/url/src/URLSegments.h: Removed.
1244 * wtf/url/src/URLUtil.cpp: Removed.
1245 * wtf/url/src/URLUtil.h: Removed.
1246 * wtf/url/src/URLUtilInternal.h: Removed.
1248 2013-04-04 Geoffrey Garen <ggaren@apple.com>
1250 Nixed the defunct chromium folder from WTF
1251 https://bugs.webkit.org/show_bug.cgi?id=113992
1253 Reviewed by Ryosuke Niwa.
1255 * wtf/chromium: Removed.
1256 * wtf/chromium/ChromiumThreading.h: Removed.
1257 * wtf/chromium/MainThreadChromium.cpp: Removed.
1259 2013-04-04 Martin Robinson <mrobinson@igalia.com>
1261 [GTK] Remove the gyp build
1262 https://bugs.webkit.org/show_bug.cgi?id=113942
1264 Reviewed by Gustavo Noronha Silva.
1266 * WTF.gyp/WTFGTK.gyp: Removed.
1268 2013-04-04 Anders Carlsson <andersca@apple.com>
1270 ObjcRuntimeExtras.h should use variadic templates
1271 https://bugs.webkit.org/show_bug.cgi?id=113941
1273 Reviewed by Andreas Kling.
1275 Reimplement wtfObjcMsgSend and wtfCallIMP as variadic function templates.
1277 * wtf/ObjcRuntimeExtras.h:
1281 2013-04-04 Andras Becsi <andras.becsi@digia.com>
1283 Fix the build with GCC 4.8
1284 https://bugs.webkit.org/show_bug.cgi?id=113147
1286 Reviewed by Allan Sandfeld Jensen.
1288 Disable diagnostic warning -Wunused-local-typedefs for GCC 4.8
1289 since dummy typedefs are commonly used in the codebase.
1293 2013-04-03 Pratik Solanki <psolanki@apple.com>
1295 Enable HAVE_MADV_FREE_REUSE on iOS
1296 https://bugs.webkit.org/show_bug.cgi?id=113892
1297 <rdar://problem/12787563>
1299 Reviewed by Mark Rowe.
1303 2013-04-02 Ryosuke Niwa <rniwa@webkit.org>
1305 Remove code for Mac 10.5 and earlier from WTF and WebKit2
1306 https://bugs.webkit.org/show_bug.cgi?id=113844
1308 Reviewed by Benjamin Poulain.
1310 Removed the code for 10.5 and removed if-def for 10.6.
1312 * wtf/FastMalloc.cpp:
1313 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1315 * wtf/ThreadingPthreads.cpp:
1316 (WTF::initializeCurrentThreadInternal):
1317 * wtf/unicode/icu/CollatorICU.cpp:
1318 (WTF::Collator::userDefault):
1320 2013-04-02 Max Vujovic <mvujovic@adobe.com>
1322 [CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
1323 https://bugs.webkit.org/show_bug.cgi?id=109098
1325 Reviewed by Dean Jackson.
1328 Add flag for HAVE(COMPOSITOR_FILTER_OUTSETS) macro. This is used to check if a
1329 platform's compositor expands layers internally for filter outsets when it applies
1330 filters like drop-shadow and blur. Currently, only CoreAnimation does has this
1333 2013-04-02 Yury Semikhatsky <yurys@chromium.org>
1335 Web Inspector: memory instrumentation for external arrays is broken
1336 https://bugs.webkit.org/show_bug.cgi?id=113790
1338 Reviewed by Pavel Feldman.
1340 * wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
1341 we know that the pointer is not broken.
1342 (WTF::reportMemoryUsage):
1344 2013-04-01 Han Shen <shenhan@google.com>
1346 Move definition of nested classes that inherit enclosing class outside class definition.
1347 https://bugs.webkit.org/show_bug.cgi?id=113454
1349 Reviewed by Benjamin Poulain.
1351 HashMap.h does not build on GCC 4.8. Inside this file,
1352 HashMapKeysProxy and HashMapValuesProxy are defined as nested
1353 class inside HashMap - which is legal - the illegal part is that
1354 these 2 classes inherit HashMap, that is the enclosing class, that
1355 causes "reference to in-complete definition" error.
1357 The fix is to move outside the definition of these 2 classes, and
1358 leave only declaration part inside HashMap as is illustrated below -
1360 template class <typename T>
1365 class HashMapKeysProxy;
1367 // ERROR - nested class inherits enclosing class.
1368 class HashMapKeysProxy : private HashMap {
1373 class HashMapKeysProxy : private HashMap {
1381 template class <typename T>
1386 class HashMapKeysProxy;
1387 class HashMapValuesProxy;
1393 template <typename T>
1394 class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
1398 template <typename T>
1399 class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
1405 (WTF): Factor out nested class definition from enclosing class.
1407 2013-03-31 Mark Hahnenberg <mhahnenberg@apple.com>
1409 Regions should be allocated from the same contiguous segment of virtual memory
1410 https://bugs.webkit.org/show_bug.cgi?id=113662
1412 Reviewed by Filip Pizlo.
1414 Instead of letting the OS spread our Regions all over the place, we should allocate them all within
1415 some range of each other. This change will open the door to some other optimizations, e.g. doing simple
1416 range checks for our write barriers and compressing JSCell pointers to 32-bits.
1418 * wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
1419 use something other than the system page size.
1420 (WTF::MetaAllocator::MetaAllocator):
1421 * wtf/MetaAllocator.h:
1424 2013-04-01 Yury Semikhatsky <yurys@chromium.org>
1426 Web Inspector: add memory instrumentation for StringBuffer
1427 https://bugs.webkit.org/show_bug.cgi?id=113507
1429 Reviewed by Pavel Feldman.
1431 Added memory instrumentation for StringBuffer.
1433 * wtf/MemoryInstrumentationString.h:
1435 (WTF::reportMemoryUsage):
1437 2013-03-30 Tom Sepez <tsepez@chromium.org>
1439 View-source iframes are dangerous (and not very useful).
1440 https://bugs.webkit.org/show_bug.cgi?id=113345
1442 Reviewed by Adam Barth.
1444 * wtf/FeatureDefines.h:
1445 Default definition of ENABLE_VIEWSOURCE_ATTRIBUTE is enabled.
1447 2013-03-27 Patrick Gansterer <paroga@webkit.org>
1449 Set WTF_ARM_ARCH_VERSION to correct value when used with MSVC
1450 https://bugs.webkit.org/show_bug.cgi?id=113436
1452 Reviewed by Benjamin Poulain.
1454 The Microsoft compiler defines _M_ARM with used ARM version.
1458 2013-03-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
1460 Support C++11 static_assert
1461 https://bugs.webkit.org/show_bug.cgi?id=113308
1463 Reviewed by Alexey Proskuryakov.
1465 Use the C++11 static_assert for COMPILE_ASSERT when it is available. Note that
1466 even when compiling with C++11 support, static_assert will not always be available
1467 since Assertions.h may also be used outside of C++.
1469 C11 _Static_assert is enabled for GCC when it has C11 support (gcc>=4.7 -std=c11).
1474 2013-03-25 Oliver Hunt <oliver@apple.com>
1476 RefCountedArray needs a size based constructor
1477 https://bugs.webkit.org/show_bug.cgi?id=113277
1479 Reviewed by Benjamin Poulain.
1481 Simple patch to add a size based constructor for RefCountedArray
1482 so that we can create an sharable array without a copy.
1484 * wtf/RefCountedArray.h:
1486 (WTF::RefCountedArray::RefCountedArray):
1488 2013-03-26 James Robinson <jamesr@chromium.org>
1490 Compile fix - OS(WINDOWS), not OS(WIN).
1493 (WTF::getCurrentProcessID):
1495 2013-03-26 James Robinson <jamesr@chromium.org>
1497 Fix compile for OS(WIN) != PLATFORM(WIN)
1498 https://bugs.webkit.org/show_bug.cgi?id=113356
1500 Reviewed by Tim Horton.
1503 (WTF::getCurrentProcessID):
1505 2013-03-23 Filip Pizlo <fpizlo@apple.com>
1507 JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
1508 https://bugs.webkit.org/show_bug.cgi?id=113144
1510 Reviewed by Geoffrey Garen.
1512 I got tired of the fact that getpid(2) is not a syscall on Windows (unless you do
1513 _getpid() I believe), so I wrote a header that abstracts it. I also changed existing
1514 code that uses getpid() to use WTF::getCurrentProcessID().
1516 * GNUmakefile.list.am:
1519 * WTF.vcproj/WTF.vcproj:
1520 * WTF.xcodeproj/project.pbxproj:
1521 * wtf/CMakeLists.txt:
1522 * wtf/MetaAllocator.cpp:
1523 (WTF::MetaAllocator::dumpProfile):
1524 * wtf/ProcessID.h: Added.
1526 (WTF::getCurrentProcessID):
1527 * wtf/text/StringImpl.cpp:
1528 (WTF::StringStats::printStats):
1530 2013-03-25 Kent Tamura <tkent@chromium.org>
1532 Rename ENABLE_INPUT_TYPE_DATETIME
1533 https://bugs.webkit.org/show_bug.cgi?id=113254
1535 Reviewed by Kentaro Hara.
1537 Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
1538 Actually I'd like to remove the code, but we shouldn't remove it yet
1539 because we shipped products with it on some platforms.
1541 * wtf/FeatureDefines.h:
1543 2013-03-25 David Kilzer <ddkilzer@apple.com>
1545 WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
1546 <http://webkit.org/b/113170>
1548 Reviewed by Dan Bernstein.
1550 Fixes the following build failure:
1552 /usr/local/include/wtf/StdLibExtras.h:190:30: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
1553 int pos = (size - 1) >> 1;
1557 * wtf/StdLibExtras.h:
1558 (WTF::binarySearchImpl): Switch type from int to size_t.
1560 2013-03-22 Benjamin Poulain <bpoulain@apple.com>
1562 Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
1563 https://bugs.webkit.org/show_bug.cgi?id=113003
1565 Reviewed by Eric Seidel.
1567 StringHash::equal() and CaseFoldingHash::equal() were both testing for
1568 the nullity of the two input pointers. The catch is: neither traits handle
1569 null pointers, and any client code would have crashed on hash(), before equal()
1571 Consequently, the two branches had a pass rate of zero when called from a HashMap code.
1573 The function is also never inlined because it is too big (the code of equal() for characters
1574 is always inlined, causing the function to be quite big).
1576 This patch introduces two new functions in the StringImpl API: equalNonNull() and
1577 equalIgnoringCaseNonNull(). Those functions are similar to their equal() equivalent
1578 but make the assumtion the input is never null.
1580 The functions are used for StringHash to avoid the useless branches.
1582 * wtf/text/StringHash.h:
1583 (WTF::StringHash::equal):
1584 (WTF::CaseFoldingHash::equal):
1585 * wtf/text/StringImpl.cpp:
1586 (WTF::stringImplContentEqual):
1588 (WTF::equalNonNull):
1589 (WTF::equalIgnoringCase):
1590 (WTF::equalIgnoringCaseNonNull):
1591 (WTF::equalIgnoringNullity):
1592 * wtf/text/StringImpl.h:
1593 (WTF::equalIgnoringCase):
1595 2013-03-22 Benjamin Poulain <bpoulain@apple.com>
1597 Name correctly the argument of StringImpl::setIsAtomic()
1598 https://bugs.webkit.org/show_bug.cgi?id=113000
1600 Reviewed by Geoffrey Garen.
1602 * wtf/text/StringImpl.h:
1603 (WTF::StringImpl::setIsAtomic):
1604 The argument was probably an unfortunate copy-paste from setIsIdentifier().
1607 2013-03-22 Hajime Morrita <morrita@google.com>
1609 Custom Elements: "readyCallback" lifecycle callback should be called.
1610 https://bugs.webkit.org/show_bug.cgi?id=112538
1612 Reviewed by Elliott Sprehn.
1615 (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
1617 2013-03-22 Sheriff Bot <webkit.review.bot@gmail.com>
1619 Unreviewed, rolling out r146534 and r146565.
1620 http://trac.webkit.org/changeset/146534
1621 http://trac.webkit.org/changeset/146565
1622 https://bugs.webkit.org/show_bug.cgi?id=113017
1624 "r146534 caused perf regression on Chromium Linux x64"
1625 (Requested by yurys on #webkit).
1629 (WTF::copyToVector):
1631 2013-03-21 Hajime Morrita <morrita@google.com>
1633 Custom Elements: "readyCallback" lifecycle callback should be called.
1634 https://bugs.webkit.org/show_bug.cgi?id=112538
1636 Reviewed by Elliott Sprehn.
1639 (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
1641 2013-03-21 Mark Lam <mark.lam@apple.com>
1643 Introducing String::findNextLineStart().
1644 https://bugs.webkit.org/show_bug.cgi?id=112957.
1646 Reviewed by Geoffrey Garen.
1648 This is replaces String::reverseFindLineTerminator() in the JSC
1649 debugger's code for computing column numbers.
1651 * wtf/text/StringImpl.cpp:
1652 (WTF::StringImpl::findNextLineStart):
1653 * wtf/text/StringImpl.h:
1654 (WTF::findNextLineStart):
1655 * wtf/text/WTFString.h:
1656 (WTF::String::findNextLineStart):
1658 2013-03-21 Adam Barth <abarth@webkit.org>
1660 HTMLNames should construct strings at compile time
1661 https://bugs.webkit.org/show_bug.cgi?id=112831
1663 Reviewed by Darin Adler.
1665 * wtf/text/StringImpl.h:
1667 (StaticASCIILiteral):
1668 - This struct lets us construct StringImpl objects at compile time.
1669 (WTF::StringImpl::assertHashIsCorrect):
1670 - This function lets us sanity check StringImpl objects created from StaticData.
1671 (WTF::StringImpl::find): Remove a stray ;
1672 (WTF::StringImpl::findIgnoringCase): ditto
1673 (WTF::StringImpl::startsWith): ditto
1674 (WTF::ValueCheck<StringImpl*>):
1675 * wtf/text/AtomicStringImpl.h:
1676 (WTF::ValueCheck<AtomicStringImpl*>):
1678 2013-03-21 Gabor Rapcsanyi <rgabor@webkit.org>
1680 Implement LLInt for CPU(ARM_TRADITIONAL)
1681 https://bugs.webkit.org/show_bug.cgi?id=97589
1683 Reviewed by Zoltan Herczeg.
1685 Enable LLInt for ARMv5 and ARMv7 traditional as well.
1689 2013-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
1691 Unreviewed, rolling out r146419.
1692 http://trac.webkit.org/changeset/146419
1693 https://bugs.webkit.org/show_bug.cgi?id=112870
1695 Broke many tests on debug builds (Requested by rniwa_ on
1698 * wtf/text/StringImpl.h:
1701 2013-03-20 Adam Barth <abarth@webkit.org>
1703 HTMLNames should construct strings at compile time
1704 https://bugs.webkit.org/show_bug.cgi?id=112831
1706 Reviewed by Darin Adler.
1708 * wtf/text/StringImpl.h:
1710 (StaticASCIILiteral):
1711 - This struct lets us construct StringImpl objects at compile time.
1712 (WTF::StringImpl::assertValidHash):
1713 - This function lets us sanity check StringImpl objects created from StaticData.
1715 2013-03-20 Jessie Berlin <jberlin@apple.com>
1717 REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into
1719 https://bugs.webkit.org/show_bug.cgi?id=112833
1721 Reviewed by Darin Adler.
1723 * WTF.xcodeproj/project.pbxproj:
1724 Make sure those three headers are copied with the rest of the WTF headers.
1726 2013-03-20 Mark Rowe <mrowe@apple.com>
1728 FastMalloc scavenge timer specifies an overly narrow leeway value.
1730 Reviewed by Alexey Proskuryakov.
1732 There's no need to allow only 1ms of leeway on a 2s timer.
1734 * wtf/FastMalloc.cpp:
1735 (WTF::TCMalloc_PageHeap::initializeScavenger): Bump the leeway window
1736 to 10% of the scavenge timer.
1738 2013-03-20 JungJik Lee <jungjik.lee@samsung.com>
1740 [EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
1741 https://bugs.webkit.org/show_bug.cgi?id=112114
1743 Reviewed by Kenneth Rohde Christiansen.
1745 The issue is that if the animation starts outside of the area covered by keepRects,
1746 the web process does not create tiles of the animation layer and the layer moves
1747 without having any tiles. In order to fix this issue, CoordinatedLayerHost must call
1748 scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
1749 However EFL port didn't call scheduleLayerFlush periodically for animation.
1750 We can tie scripted animations with synchronization of the layer and that already
1751 has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.
1753 The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html
1755 * wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.
1757 2013-03-20 Mark Lam <mark.lam@apple.com>
1759 Introducing String::reverseFindLineTerminator().
1760 https://bugs.webkit.org/show_bug.cgi?id=112741.
1762 Reviewed by Oliver Hunt.
1764 This is needed by the JSC debugger code for computing column numbers.
1766 * wtf/text/StringImpl.cpp:
1767 (WTF::StringImpl::reverseFindLineTerminator):
1768 * wtf/text/StringImpl.h:
1770 (WTF::reverseFindLineTerminator):
1771 * wtf/text/WTFString.h:
1772 (WTF::String::reverseFindLineTerminator):
1774 2013-03-19 Martin Robinson <mrobinson@igalia.com>
1776 Fix the WTF gyp build for GTK+.
1778 * WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.
1780 2013-03-19 Alberto Garcia <agarcia@igalia.com>
1782 [BlackBerry] Enable USE_SYSTEM_MALLOC by default
1783 https://bugs.webkit.org/show_bug.cgi?id=112365
1785 Reviewed by Benjamin Poulain.
1787 Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
1788 harcoding it in wtf/Platform.h
1792 2013-03-18 Benjamin Poulain <benjamin@webkit.org>
1794 [iOS] Make a UChar string equal() based on the LChar version
1795 https://bugs.webkit.org/show_bug.cgi?id=112495
1797 Reviewed by David Kilzer.
1799 * wtf/text/StringImpl.h:
1801 Create a equal() function for UChar based on the work done for LChar.
1803 On A6, this is a speed up of about 40% for any string of 2 or more characters.
1804 It is slower by 8% on a single UChar comparison.
1806 2013-03-18 Brent Fulgham <bfulgham@webkit.org>
1808 [WinCairo] Get build working under VS2010.
1809 https://bugs.webkit.org/show_bug.cgi?id=112604
1811 Reviewed by Tim Horton.
1813 * WTF.vcxproj/WTF.vcxproj: Add Debug_WinCairo and Release_WinCairo
1814 targets so headers get copied to appropriate build folder.
1815 * WTF.vcxproj/WTFGenerated.vcxproj: Ditto.
1817 2013-03-15 Benjamin Poulain <bpoulain@apple.com>
1819 [iOS] Update StringImpl's equal to have a single version on all supported Apple CPUs
1820 https://bugs.webkit.org/show_bug.cgi?id=112400
1822 Reviewed by Michael Saboff.
1824 * wtf/text/StringImpl.h:
1826 Tweak the code to make it work on older Apple CPUs:
1827 -Use external "ouput" variable instead of the registers R9 and R12. This gets rid
1828 of some register pressure previously imposed on the compiler. (Clang nicely
1829 choose R9 and R12 when needed, following iOS ABI).
1830 -Instead of using "R3" for storing the length / 4, update the length by -4 on
1831 each iteration and work in the negative space for the tail. This frees one register
1832 which is then used for isEqual.
1833 -Get rid of the unconditional branch from the loop. By using subs and working in the
1834 negative space, we can test for the Carry flag to jump back to the next LDR.
1836 2013-03-15 Benjamin Poulain <bpoulain@apple.com>
1838 [iOS] Fix the length pass to memcmp in the fallback versions of String's equal
1839 https://bugs.webkit.org/show_bug.cgi?id=112463
1841 Reviewed by Ryosuke Niwa.
1843 * wtf/text/StringImpl.h:
1844 (WTF::equal): It might be a good idea to compare the full UChar strings...
1846 2013-03-15 Michael Saboff <msaboff@apple.com>
1848 Add runtime check for improper register allocations in DFG
1849 https://bugs.webkit.org/show_bug.cgi?id=112380
1851 Reviewed by Geoffrey Garen.
1853 * wtf/Platform.h: Added new ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION compilation flag to
1854 enable generation of register allocation checking. This is on for debug builds.
1856 2013-03-13 Jessie Berlin <jberlin@apple.com>
1858 Remove svn:executable from a file that isn't supposed to be executable.
1860 Rubber-stamped by Geoff Garen.
1864 2013-03-13 Oliver Hunt <oliver@apple.com>
1866 Simplify Checked<> multiplication
1867 https://bugs.webkit.org/show_bug.cgi?id=112286
1869 Reviewed by James Robinson.
1871 Trying to correctly identify multiplication by zero complicated the
1872 unsigned * unsigned multiply, and still didn't handle all cases correctly.
1873 Now we just do the normal division based approach to overflow detection
1874 leading to much simpler reasoning.
1876 Would be nice if we could have a jo style intrinsic one day.
1878 * wtf/CheckedArithmetic.h:
1880 2013-03-13 Dean Jackson <dino@apple.com>
1882 Unreviewed attempted build fix for Windows. SchedulePair.cpp -> SchedulePairCF.cpp
1884 * WTF.vcproj/WTF.vcproj:
1885 * WTF.vcxproj/WTF.vcxproj:
1886 * WTF.vcxproj/WTF.vcxproj.filters:
1888 2013-03-13 Benjamin Poulain <bpoulain@apple.com>
1890 [iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
1891 https://bugs.webkit.org/show_bug.cgi?id=112202
1893 Reviewed by Gavin Barraclough.
1895 * Source/WTF/wtf/Platform.h:
1896 Make the macro WTF_ARM_ARCH_VERSION valid on any architecture.
1897 * wtf/text/StringImpl.h:
1899 On ARMv7S, the new version is about 11% percent faster than the simple loop.
1900 On ARMv7 classic, memcmp is a little faster than the simple loop on Apple A5.
1902 2013-03-13 James Robinson <jamesr@chromium.org>
1904 SchedulePair.cpp is CF-specific
1905 https://bugs.webkit.org/show_bug.cgi?id=112204
1907 Reviewed by Oliver Hunt.
1909 This renames SchedulePair.cpp SchedulePairCF.cpp, since it depends on CF, and excludes it from chromium's gyp
1913 Add CF to the exclusion filter for the Chromium port.
1915 Add SchedulePairCF.cpp
1916 * WTF.xcodeproj/project.pbxproj:
1917 Update project file to point to new .cpp location
1918 * wtf/SchedulePairCF.cpp: Renamed from Source/WTF/wtf/SchedulePair.cpp.
1920 2013-03-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
1922 Support C++11 features in GCC <4.6
1923 https://bugs.webkit.org/show_bug.cgi?id=111553
1925 Reviewed by Simon Hausmann.
1927 Enable support for rvalue references from gcc 4.3, deleted functions
1928 from gcc 4.4, explicit conversion from gcc 4.5, and strongly typed
1933 2013-03-12 Geoffrey Garen <ggaren@apple.com>
1935 Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
1937 * wtf/SchedulePair.cpp:
1938 * wtf/SchedulePair.h:
1939 (WTF::SchedulePair::SchedulePair): Since linking is failing,
1940 try inlining this function.
1942 2013-03-12 Tim Horton <timothy_horton@apple.com>
1944 Typo in earlier Windows build fix. Unreviewed.
1946 * WTF.vcproj/WTF.vcproj:
1948 2013-03-12 Tim Horton <timothy_horton@apple.com>
1950 Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
1952 * WTF.vcproj/WTF.vcproj:
1953 * WTF.vcxproj/WTF.vcxproj:
1954 * WTF.vcxproj/WTF.vcxproj.filters:
1956 2013-03-12 James Robinson <jamesr@chromium.org>
1958 Build fix for r145592 - update gyp files to refer to new file locations.
1962 2013-03-12 Geoffrey Garen <ggaren@apple.com>
1964 Moved RunLoopTimer and SchedulePair to WTF
1965 https://bugs.webkit.org/show_bug.cgi?id=112171
1967 Reviewed by Oliver Hunt.
1969 This will allow us to use timers in lower level primitives without
1970 duplicating all the code.
1972 * WTF.xcodeproj/project.pbxproj:
1973 * wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
1975 * wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
1976 * wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
1977 * wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
1978 * wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
1979 * wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
1981 * wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.
1983 2013-03-12 Oliver Hunt <oliver@apple.com>
1985 Add more Checked<> tests
1986 https://bugs.webkit.org/show_bug.cgi?id=112190
1988 Reviewed by Geoffrey Garen.
1990 Export the CheckedState enum type
1992 * wtf/CheckedArithmetic.h:
1994 2013-03-12 Oliver Hunt <oliver@apple.com>
1996 Make CheckedArithmetic slightly more sane
1997 https://bugs.webkit.org/show_bug.cgi?id=112178
1999 Reviewed by Geoffrey Garen.
2001 Add an enum type for safeGet rather than using a bool,
2002 and correctly handle unsigned * unsigned, when one value
2005 * wtf/CheckedArithmetic.h:
2012 2013-03-11 Michael Saboff <msaboff@apple.com>
2014 Unreviewed build fix. Rolling out inadvertent setting of DATA_LOG_TO_FILE.
2016 2013-03-11 Oliver Hunt <oliver@apple.com>
2018 Make SegmentedVector Noncopyable
2019 https://bugs.webkit.org/show_bug.cgi?id=112059
2021 Reviewed by Geoffrey Garen.
2023 Copying a SegmentedVector can be extraordinarily expensive, so we beat
2024 it with the Noncopyable stick - that way we can ensure that if anyone
2025 wants an actual copy they know what they're doing.
2027 * wtf/SegmentedVector.h:
2030 2013-03-08 Benjamin Poulain <benjamin@webkit.org>
2032 [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
2033 https://bugs.webkit.org/show_bug.cgi?id=111297
2035 Reviewed by Kenneth Rohde Christiansen.
2037 * wtf/FeatureDefines.h: Add a new feature flag for the view-mode
2038 CSS media: ENABLE_VIEW_MODE_CSS_MEDIA.
2040 2013-03-08 Roger Fong <roger_fong@apple.com>
2044 * WTF.vcxproj/WTF.make:
2046 2013-03-08 Gabor Rapcsanyi <rgabor@webkit.org>
2048 Cache flush problem on ARMv7 JSC
2049 https://bugs.webkit.org/show_bug.cgi?id=111441
2051 Reviewed by Zoltan Herczeg.
2053 Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
2054 The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
2055 Change the cache fulsh mechanism similar to ARM traditinal and revert the
2058 * wtf/OSAllocatorPosix.cpp:
2059 (WTF::OSAllocator::reserveUncommitted):
2060 (WTF::OSAllocator::decommit):
2062 2013-03-07 Andrew Bortz <andrew@abortz.net>
2064 Replace Mersenne Twister random number generator with a simpler one.
2065 https://bugs.webkit.org/show_bug.cgi?id=111533
2067 Reviewed by Adam Barth.
2069 The new generator is only a single line long, but passes all the Diehard
2070 statistical tests and runs ~3x faster than the Mersenne Twister, with a
2071 guaranteed cycle length of 2^64 and only 8 bytes of state.
2073 * wtf/Platform.h: Mersenne Twister defines are no longer needed
2074 * wtf/RandomNumber.cpp:
2075 (WTF::Internal::initializeRandomNumber): State initialization
2076 (WTF::Internal::randomNumber): Actual implementation
2077 (WTF::randomNumber): We don't need to fall back on rand()-based generator anymore,
2078 so this code is greatly simplified.
2079 * wtf/RandomNumber.h:
2080 * wtf/RandomNumberSeed.h:
2081 (WTF::initializeRandomNumberGenerator): This code is no longer needed.
2082 Additionally, the code had an error, since rand() returns 32-bits, so each
2083 initializationBuffer's upper 16-bits has more bits set than random.
2085 2013-03-06 Adenilson Cavalcanti <cavalcantii@gmail.com>
2087 Build fix: PageAllocationAligned no longer has executable flag
2088 https://bugs.webkit.org/show_bug.cgi?id=111659
2090 Reviewed by Kentaro Hara.
2092 Build fix: use false as parameter to execution flag.
2094 * wtf/PageAllocationAligned.cpp:
2095 (WTF::PageAllocationAligned::allocate):
2097 2013-03-06 Eric Seidel <eric@webkit.org>
2099 AtomicStringImpls are not safe to send between threads
2100 https://bugs.webkit.org/show_bug.cgi?id=111652
2102 Reviewed by Benjamin Poulain.
2104 We don't have this problem yet, but it's good to be safe.
2106 * wtf/text/WTFString.cpp:
2107 (WTF::String::isSafeToSendToAnotherThread):
2109 2013-03-06 Oliver Hunt <oliver@apple.com>
2111 Don't give PageAllocationAligned the option to allocate executable memory
2112 https://bugs.webkit.org/show_bug.cgi?id=111657
2114 Reviewed by Geoffrey Garen.
2116 * wtf/PageAllocationAligned.cpp:
2117 (WTF::PageAllocationAligned::allocate):
2118 * wtf/PageAllocationAligned.h:
2119 (PageAllocationAligned):
2121 2013-03-04 Jer Noble <jer.noble@apple.com>
2123 Default mouse cursor behavior should be auto-hide for full screen video with custom controls
2124 https://bugs.webkit.org/show_bug.cgi?id=107601
2126 Reviewed by Beth Dakin.
2128 Enable the CURSOR_VISIBILITY feature.
2130 * wtf/FeatureDefines.h:
2132 2013-03-04 Oliver Hunt <oliver@apple.com>
2134 Make fastmalloc use guardpages
2135 https://bugs.webkit.org/show_bug.cgi?id=111353
2137 Reviewed by Anders Carlsson.
2139 Add PROT_NONE pages at the beginning and end of every
2140 mmap call made by fastmalloc.
2142 * wtf/TCSystemAlloc.cpp:
2145 2013-03-06 Paweł Forysiuk <tuxator@o2.pl>
2147 Typo in inline function in ByteOrder.h
2148 https://bugs.webkit.org/show_bug.cgi?id=111473
2150 Reviewed by Benjamin Poulain.
2155 2013-03-05 Ryuan Choi <ryuan.choi@samsung.com>
2157 [EFL] Build break with latest EFL libraries
2158 https://bugs.webkit.org/show_bug.cgi?id=111028
2160 Reviewed by Dirk Pranke.
2162 * wtf/PlatformEfl.cmake: Added ECORE_IMF_INCLUDE_DIRS.
2164 2013-03-05 Csaba Osztrogonác <ossy@webkit.org>
2166 Fix cast-align warning in ASCIIFastPath.h on ARM
2167 https://bugs.webkit.org/show_bug.cgi?id=111436
2169 Reviewed by Benjamin Poulain.
2171 * wtf/text/ASCIIFastPath.h:
2172 (WTF::charactersAreAllASCII):
2174 2013-03-04 Laszlo Gombos <l.gombos@samsung.com>
2176 JSC_OBJC_API_ENABLED should be removed from FeatureDefines.h
2177 https://bugs.webkit.org/show_bug.cgi?id=111269
2179 Reviewed by Mark Hahnenberg.
2181 JSC_OBJC_API_ENABLED flag was added to FeatureDefines.h (r143637)
2182 so that it could be used in WebCore.exp.in to determine whether
2183 or not we should be exporting certain symbols based on whether
2184 the WebKit-related portion of the JSC ObjC API was enabled.
2186 It turned out conditionally including certain symbols didn't
2187 work when building fat binaries, so it's not even necessary any more.
2189 * wtf/FeatureDefines.h: Remove JSC_OBJC_API_ENABLED.
2191 2013-03-04 Andreas Kling <akling@apple.com>
2193 Deque: Free internal buffer in clear().
2194 <http://webkit.org/b/111316>
2195 <rdar://problem/13336675>
2197 Reviewed by Antti Koivisto.
2199 525 kB progression on Membuster3.
2204 2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
2206 Add build flag for FontLoader
2207 https://bugs.webkit.org/show_bug.cgi?id=111289
2209 Reviewed by Benjamin Poulain.
2211 Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
2213 * wtf/FeatureDefines.h:
2215 2013-02-27 Darin Adler <darin@apple.com>
2217 StringHasher functions require alignment that call sites do not all guarantee
2218 https://bugs.webkit.org/show_bug.cgi?id=110171
2220 Reviewed by Benjamin Poulain.
2222 The StringHasher class is optimized for clients who pass it two characters at
2223 a time. However, the function named addCharacters did not make this clear to
2224 clients, and one calculateStringHashAndLengthFromUTF8MaskingTop8Bits got it wrong.
2225 Fix by making addCharacters work regardless of hasher alignment and adding a new
2226 function, addCharactersAssumingAligned, for use when we want a faster path and can
2227 guarantee we are adding characters two at a time.
2229 * wtf/StringHasher.h:
2230 (WTF::StringHasher::addCharactersAssumingAligned): Renamed the addCharacters function
2231 addCharactersAssumingAligned, since it only works if the hasher is currently aligned,
2232 meaning it contains an even number of characters. The function already asserts
2233 that this is true, but the calculateStringHashAndLengthFromUTF8MaskingTop8Bits
2234 function was using it in cases where the assertion could fire. Also updated to
2235 call addCharactersInternal by its new name. Also added some new overloads that take
2236 data pointers and lengths so callers can always use addCharactersAssumingAligned
2237 instead of addCharacters if they know the hasher is aligned.
2238 (WTF::StringHasher::addCharacter): Updated to call the public
2239 addCharactersAssumingAligned function since that's simpler and a bit cleaner.
2240 (WTF::StringHasher::addCharacters): Added functions with this name that handle
2241 the case where the hasher is not aligned. These will be called by existing call sites
2242 that were formerly using the function named addCharactersAssumingAligned above.
2243 Also add an overload that works with the default converter automatically.
2244 (WTF::StringHasher::computeHashAndMaskTop8Bits): Changed to call
2245 addCharactersAssumingAligned to eliminate copied and pasted code. The hasher is empty,
2246 so definitely aligned.
2247 (WTF::StringHasher::computeHash): Ditto.
2248 (WTF::StringHasher::addCharactersInternal): Renamed from addCharactersToHash, since
2249 the former name did not make clear how this differs from the public functions.
2250 The real difference is that this is like addCharactersAssumingAligned, but without
2251 the assertion, so addCharactersAssumingAligned is called instead, even within the
2252 class's implementation.
2254 2013-03-01 Ilya Tikhonovsky <loislo@chromium.org>
2256 Web Inspector: Native Memory Instrumentation: do not visit raw pointers by default.
2257 https://bugs.webkit.org/show_bug.cgi?id=110943
2259 Reviewed by Yury Semikhatsky.
2261 Unfortunately in many cases raw pointer may point to an object that has been deleted.
2262 There is no working solution to solve this problem in general.
2263 It could be solved only on case by case basis.
2265 * wtf/MemoryInstrumentation.h:
2266 (WTF::MemoryInstrumentation::addObject):
2267 (WTF::MemoryInstrumentation::MemberTypeTraits::addObject):
2268 (WTF::MemoryClassInfo::addMember):
2269 (WTF::MemoryInstrumentation::addObjectImpl):
2270 * wtf/MemoryInstrumentationString.h:
2271 (WTF::reportMemoryUsage):
2273 2013-03-01 Eric Seidel <eric@webkit.org>
2275 Threaded HTML Parser has an extra copy of every byte from the network
2276 https://bugs.webkit.org/show_bug.cgi?id=111135
2278 Reviewed by Adam Barth.
2280 The threaded html parser needs to accept ownership
2281 of a string buffer. The easiest way to do this seemed
2282 to be to use a PassRefPtr<StringImpl>, but there was no way
2283 to generated one from a String (easily), so I added one.
2285 * wtf/text/WTFString.h:
2286 (WTF::String::releaseImpl):
2288 2013-02-28 Oliver Hunt <oliver@apple.com>
2290 Crash in JSC::MarkedBlock::FreeList JSC::MarkedBlock::sweepHelper
2291 https://bugs.webkit.org/show_bug.cgi?id=111059
2293 Reviewed by Ryosuke Niwa.
2295 Sometimes C++'s implicit operator conversion rules suck.
2296 Add explicit operator== and !=.
2298 * wtf/FastMalloc.cpp:
2299 (WTF::HardenedSLL::operator!=):
2300 (WTF::HardenedSLL::operator==):
2303 2013-02-28 Zeno Albisser <zeno@webkit.org>
2305 Enable DFG JIT for Qt on Mac
2306 https://bugs.webkit.org/show_bug.cgi?id=111095
2308 Rubber-stamped by Simon Hausmann
2312 2013-02-28 Eric Carlson <eric.carlson@apple.com>
2314 [Mac] use HAVE() macro instead of version check
2315 https://bugs.webkit.org/show_bug.cgi?id=111087
2317 Reviewed by Dean Jackson.
2319 * wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.
2321 2013-02-27 Balazs Kilvady <kilvadyb@homejinni.com>
2323 Bug in atomicIncrement implementation for MIPS GCC
2324 https://bugs.webkit.org/show_bug.cgi?id=110969
2326 Reviewed by Csaba Osztrogonác.
2328 Fix of __sync_[add|sub]_and_fetch_8 for GCC patch.
2332 2013-02-27 Simon Hausmann <simon.hausmann@digia.com>
2334 REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
2335 https://bugs.webkit.org/show_bug.cgi?id=108632
2337 Reviewed by Csaba Osztrogonác.
2339 It appears that mprotect() is very slow on ARM/Linux, so disable the
2340 approach of unreserved mappings there and fall back to overcomitting
2341 memory, based on Uli Schlachter's recommendation.
2343 * wtf/OSAllocatorPosix.cpp:
2344 (WTF::OSAllocator::reserveUncommitted):
2345 (WTF::OSAllocator::decommit):
2347 2013-02-26 Roger Fong <roger_fong@apple.com>
2349 Unreviewed. Build fix for VS2010 solution, take 2.
2351 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2353 2013-02-26 Roger Fong <roger_fong@apple.com>
2355 Unreviewed. Unreviewed build fix for VS2010 solution.
2357 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2359 2013-02-26 Balazs Kilvady <kilvadyb@homejinni.com>
2361 Fix the atomicIncrement implementation for MIPS GCC
2362 https://bugs.webkit.org/show_bug.cgi?id=106739
2364 Reviewed by Oliver Hunt.
2366 Implementation of missing __sync_[add|sub]_and_fetch_8 functions.
2368 Some architectures, like MIPS32, don't have GCC implementation for
2369 builtin __sync_* functions with 64 bits variable size. GCC answer
2370 for the problem: If a target doesn't support atomic operations on
2371 certain variable sizes, you are out of luck with atomicity in that
2372 case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
2373 will support __atomic_* builtin functions for this purpose for all
2374 the GCC targets, but for current compilers we have to include our
2377 * GNUmakefile.list.am:
2379 * wtf/Atomics.cpp: Added.
2383 * wtf/CMakeLists.txt:
2385 2013-02-26 Oliver Hunt <oliver@apple.com>
2387 Appease the QT bots.
2389 * wtf/FastMalloc.cpp:
2391 2013-02-26 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
2393 Implement JIT on Windows 64 bits
2394 https://bugs.webkit.org/show_bug.cgi?id=107965
2396 Reviewed by Simon Hausmann.
2400 2013-02-26 Oliver Hunt <oliver@apple.com>
2402 Appease static analyzer warning about null string passed to strlen
2403 https://bugs.webkit.org/show_bug.cgi?id=110658
2405 Reviewed by Benjamin Poulain.
2407 Add a null check before calling strlen
2409 * wtf/Threading.cpp:
2410 (WTF::createThread):
2412 2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
2414 Build fix attempt after r143996.
2416 * wtf/FastMalloc.cpp:
2419 2013-02-25 Roger Fong <roger_fong@apple.com>
2421 Unreviewed. Fix script to use WEBKIT_SOURCE for VS2010 property sheets instead of WEBKIT_LIBRARIES.
2423 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2425 2013-02-25 Oliver Hunt <oliver@apple.com>
2427 Add cookies to FastMalloc spans
2428 https://bugs.webkit.org/show_bug.cgi?id=110827
2430 Reviewed by Michael Saboff.
2432 Add a cookie to spans, and move some of the hardening around so
2433 that it's more useful.
2435 * wtf/FastMalloc.cpp:
2436 (WTF::internalEntropyValue):
2437 (WTF::spanInitializerCookie):
2438 (WTF::Span::initCookie):
2439 (WTF::Span::clearCookie):
2440 (WTF::Span::isValid):
2444 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2445 (WTF::TCMalloc_Central_FreeList::Populate):
2446 (WTF::TCMalloc_ThreadCache::Deallocate):
2447 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2449 2013-02-25 Jer Noble <jer.noble@apple.com>
2451 Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
2452 https://bugs.webkit.org/show_bug.cgi?id=110806
2454 Reviewed by Alexey Proskuryakov.
2456 Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
2458 * wtf/FeatureDefines.h:
2460 2013-02-23 Ilya Tikhonovsky <loislo@chromium.org>
2462 Web Inspector: Native Memory Instrumentation: replace String with const char* in MemoryObjectInfo
2463 https://bugs.webkit.org/show_bug.cgi?id=110599
2465 Reviewed by Yury Semikhatsky.
2467 Due to potentially dynamic nature of names and classNames we need to make a copy of the strings
2468 that were given us via MemoryInstrumentation calls.
2469 So I extended client api with registerString method that pushes the strings
2470 down to the serializer.
2472 * wtf/MemoryInstrumentation.h:
2473 (MemoryInstrumentationClient):
2474 * wtf/MemoryObjectInfo.h:
2475 (WTF::MemoryObjectInfo::MemoryObjectInfo):
2476 (WTF::MemoryObjectInfo::setClassName):
2477 (WTF::MemoryObjectInfo::classNameId):
2478 (WTF::MemoryObjectInfo::setName):
2479 (WTF::MemoryObjectInfo::nameId):
2482 2013-02-21 Brady Eidson <beidson@apple.com>
2484 Move fastlog2() to WTF/MathExtras.h so it can be used from multiple projects.
2486 Rubberstamped by Geoff Garen.
2491 2013-02-21 Andy Estes <aestes@apple.com>
2493 TriState.h should be a Project header
2494 https://bugs.webkit.org/show_bug.cgi?id=110543
2496 Rubber-stamped by Dan Bernstein.
2498 WTF uses a script to copy headers to the build destination, so it isn't
2499 necessary to mark headers as Private/Public (and doing so can be problematic).
2501 * WTF.xcodeproj/project.pbxproj: Mark TriState.h as a Project header.
2503 2013-02-21 Roger Fong <roger_fong@apple.com>
2505 Unreviewed. Add executable property to cmd file.
2506 Required for executable files to maintain their executable permissions over svn.
2508 * WTF.vcxproj/copy-files.cmd: Added property svn:executable.
2510 2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
2512 Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
2513 https://bugs.webkit.org/show_bug.cgi?id=106059
2515 Reviewed by Geoffrey Garen.
2517 * wtf/FeatureDefines.h: Added enable flag for JSC Objective-C API so it can be used in
2520 2013-02-21 Martin Robinson <mrobinson@igalia.com>
2522 A couple more 'make dist' fixes for WebKitGTK+.
2524 * GNUmakefile.list.am: Add a missing file to the source list.
2526 2013-02-20 Roger Fong <roger_fong@apple.com>
2528 Get VS2010 Solution B&I ready.
2529 <rdar://problem/1322988>
2531 Rubberstamped by Timothy Horton.
2533 Add Production configuration.
2534 Add a WTF submit solution with a DebugSuffix configuration.
2535 Modify WTF.make as necessary.
2537 * WTF.vcxproj: Added property svn:eol-style. Modified property svn:ignore.
2538 * WTF.vcxproj/WTF.make: Added.
2539 * WTF.vcxproj/WTF.submit.sln: Added.
2540 * WTF.vcxproj/WTF.vcxproj:
2541 * WTF.vcxproj/WTFCommon.props:
2542 * WTF.vcxproj/WTFGenerated.vcxproj:
2543 * WTF.vcxproj/WTFGeneratedProduction.props: Added.
2544 * WTF.vcxproj/WTFGeneratedRelease.props:
2545 * WTF.vcxproj/WTFProduction.props: Added.
2546 * WTF.vcxproj/WTFRelease.props:
2547 * WTF.vcxproj/copy-files.cmd:
2549 2013-02-20 Oliver Hunt <oliver@apple.com>
2552 https://bugs.webkit.org/show_bug.cgi?id=110275
2554 Reviewed by Mark Hahnenberg.
2556 We now poison objects when they get freed, and verify that
2557 any object that is being freed is not poisoned. If the
2558 object looks like it's poisoned we validate the freelist,
2559 and ensure the object is not already present. If it is
2562 On allocation, we ensure that the object being allocated
2563 is poisoned, then clear the poisoning fields.
2565 * wtf/FastMalloc.cpp:
2566 (WTF::internalEntropyValue):
2568 (WTF::freedObjectStartPoison):
2569 (WTF::freedObjectEndPoison):
2570 (TCMalloc_ThreadCache_FreeList):
2571 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2572 (WTF::TCMalloc_Central_FreeList::Populate):
2573 (WTF::TCMalloc_ThreadCache::Allocate):
2574 (WTF::TCMalloc_ThreadCache::Deallocate):
2575 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2577 2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
2579 Unreviewed, rolling out r143400.
2580 http://trac.webkit.org/changeset/143400
2581 https://bugs.webkit.org/show_bug.cgi?id=110290
2583 breaks everything (instacrash launching Safari) (Requested by
2584 thorton on #webkit).
2586 * wtf/FastMalloc.cpp:
2587 (WTF::internalEntropyValue):
2589 (WTF::TCMalloc_Central_FreeList::Populate):
2590 (WTF::TCMalloc_ThreadCache::Allocate):
2591 (WTF::TCMalloc_ThreadCache::Deallocate):
2593 2013-02-19 Oliver Hunt <oliver@apple.com>
2596 https://bugs.webkit.org/show_bug.cgi?id=110275
2598 Reviewed by Anders Carlsson.
2600 We now poison objects when they get freed, and verify that
2601 any object that is being freed is not poisoned. If the
2602 object looks like it's poisoned we validate the freelist,
2603 and ensure the object is not already present. If it is
2606 On allocation, we ensure that the object being allocated
2607 is poisoned, then clear the poisoning fields.
2609 * wtf/FastMalloc.cpp:
2610 (WTF::internalEntropyValue):
2612 (WTF::freedObjectStartPoison):
2613 (WTF::freedObjectEndPoison):
2614 (TCMalloc_ThreadCache_FreeList):
2615 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2616 (WTF::TCMalloc_Central_FreeList::Populate):
2617 (WTF::TCMalloc_ThreadCache::Allocate):
2618 (WTF::TCMalloc_ThreadCache::Deallocate):
2620 2013-02-18 Darin Adler <darin@apple.com>
2622 Style tweaks to StringHasher.h
2623 https://bugs.webkit.org/show_bug.cgi?id=110042
2625 Reviewed by Alexey Proskuryakov.
2627 I have a bug fix coming soon, but figured I'd separate out style tweaks and land them
2628 first to make that patch easier to undrestand.
2630 * wtf/StringHasher.h: Tweak and rearrange comments a bit.
2631 (WTF::StringHasher::addCharacter): Use character instead of ch.
2632 (WTF::StringHasher::addCharacters): Use remainder instead of rem. Also capitalize the U
2633 that we use to make an unsigned 1 constant.
2634 (WTF::StringHasher::computeHashAndMaskTop8Bits): Ditto.
2635 (WTF::StringHasher::hashMemory): Change version that takes size as a template argument
2636 to call the version that takes the size at runtime, since both generate the same code
2637 anyway. Added a FIXME questioning why this function uses the "mask top 8 bits" version
2638 of the hash. Fix incorrect compile assertion that required sizes that are multiples
2639 of four. This function works on sizes that are multiples of two. Also fixed a spelling
2640 error where we called it a "multible".
2641 (WTF::StringHasher::defaultConverter): Use character instead of ch.
2642 (WTF::StringHasher::addCharactersToHash): Eliminated unnecessary local variable.
2644 2013-02-18 Alexey Proskuryakov <ap@apple.com>
2646 Make HexNumber functions return 8-bit strings
2647 https://bugs.webkit.org/show_bug.cgi?id=110152
2649 Reviewed by Michael Saboff.
2653 (WTF::Internal::hexDigitsForMode):
2654 (WTF::appendByteAsHex):
2655 (WTF::placeByteAsHexCompressIfPossible):
2656 (WTF::placeByteAsHex):
2657 (WTF::appendUnsignedAsHex):
2658 (WTF::appendUnsignedAsHexFixedSize):
2659 Use LChar everywhere.
2661 2013-02-18 Benjamin Poulain <bpoulain@apple.com>
2663 Remove Vector::dataSlot(), it has no implementation
2664 https://bugs.webkit.org/show_bug.cgi?id=109999
2666 Reviewed by Andreas Kling.
2668 VectorBufferBase does not implement any function bufferSlot().
2669 The file only compiles because that part of the template is never
2674 2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
2676 Move ENABLE macros for WebCore out from Platform.h
2677 https://bugs.webkit.org/show_bug.cgi?id=105735
2679 Unreviewed, build fix when NETSCAPE_PLUGIN_API is disabled.
2681 Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH even if
2682 NETSCAPE_PLUGIN_API is disabled (Qt, Efl, GTK, WX ports).
2684 * wtf/FeatureDefines.h:
2686 2013-02-18 Balazs Kilvady <kilvadyb@homejinni.com>
2688 MIPS DFG implementation.
2689 https://bugs.webkit.org/show_bug.cgi?id=101328
2691 Reviewed by Oliver Hunt.
2693 DFG implementation for MIPS.
2697 2013-02-18 Zan Dobersek <zdobersek@igalia.com>
2699 Stop placing std::isfinite and std::signbit inside the global scope
2700 https://bugs.webkit.org/show_bug.cgi?id=109817
2702 Reviewed by Darin Adler.
2704 Prefix calls to the isfinite and signbit methods with std:: as the two
2705 methods are no longer being imported into the global scope.
2707 On Solaris and OpenBSD platforms or when using Visual C++ the two methods
2708 are now defined (as incompatibility workarounds) inside the std namespace.
2712 * wtf/DecimalNumber.h:
2713 (WTF::DecimalNumber::DecimalNumber):
2721 * wtf/MediaTime.cpp:
2722 (WTF::MediaTime::createWithFloat):
2723 (WTF::MediaTime::createWithDouble):
2727 2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
2729 Move ENABLE macros for WebCore out from Platform.h
2730 https://bugs.webkit.org/show_bug.cgi?id=105735
2732 Reviewed by Darin Adler and Benjamin Poulain.
2734 Introduce FeatureDefines.h by combining the existing rules from
2735 Platform.h and adding new rules for all the ENABLE flags that are
2736 listed in the FeatureFlags wiki.
2738 The new rules are not used at the moment by any ports
2739 as the port specific build systems already define these flags
2740 so the !defined() guard will prevent redefinition of the macros.
2742 * GNUmakefile.list.am: Add FeatureDefines.h.
2745 * WTF.vcproj/WTF.vcproj: Ditto.
2746 * WTF.xcodeproj/project.pbxproj: Ditto.
2747 * wtf/CMakeLists.txt: Ditto.
2748 * wtf/FeatureDefines.h: Added.
2749 * wtf/Platform.h: Move macro definitions to FeatureDefines.h.
2751 2013-02-16 Darin Adler <darin@apple.com>
2753 Remove redundant use of inline keyword in StringHasher.h
2754 https://bugs.webkit.org/show_bug.cgi?id=110036
2756 Reviewed by Geoffrey Garen.
2758 I have some other improvements for StringHasher.h, but wanted to get the simplest ones
2759 out of the way first.
2761 * wtf/StringHasher.h: Remove inline keyword on functions inside the class definition,
2762 since functions defined inside the class are automatically inline.
2764 2013-02-15 Martin Robinson <mrobinson@igalia.com>
2766 [GTK] Spread the gyp build files throughout the tree
2767 https://bugs.webkit.org/show_bug.cgi?id=109960
2769 Reviewed by Dirk Pranke.
2771 * WTF.gyp/WTFGTK.gyp: Renamed from Source/WebKit/gtk/gyp/WTF.gyp.
2773 2013-02-15 Anders Carlsson <andersca@apple.com>
2775 Add HashMap::isValidKey and HashSet::isValidValue
2776 https://bugs.webkit.org/show_bug.cgi?id=109977
2778 Reviewed by Sam Weinig and Darin Adler.
2780 Add helper functions for determining whether keys are valid, i.e. if
2781 they are _not_ empty or deleted according to the hash traits.
2786 2013-02-15 Laszlo Gombos <l.gombos@samsung.com>
2788 Remove support for RVCT version less than 4.0
2789 https://bugs.webkit.org/show_bug.cgi?id=109390
2791 The 4.0 version of the RVCT compiler was
2794 Remove support for version older then 4.0 of RVCT,
2795 and keep the support for newer RVCT versions.
2797 Reviewed by Zoltan Herczeg.
2799 * WTF.gypi: Remove StringExtras.cpp.
2800 * WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
2801 * WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
2802 * WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
2803 * WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
2804 * wtf/CMakeLists.txt: Remove StringExtras.cpp.
2805 * wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
2806 * wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
2807 * wtf/Float64Array.h: Ditto.
2808 * wtf/Int16Array.h: Ditto.
2809 * wtf/Int32Array.h: Ditto.
2810 * wtf/Int8Array.h: Ditto.
2811 * wtf/MathExtras.h: Remove a quirk needed for RVCT version <= 3.0.
2812 * wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
2813 * wtf/StringExtras.cpp: Removed.
2814 * wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
2815 * wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
2816 * wtf/Uint32Array.h: Ditto.
2817 * wtf/Uint8Array.h: Ditto.
2818 * wtf/Uint8ClampedArray.h: Ditto.
2820 2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
2822 Add CString operators for comparison with const char*
2823 https://bugs.webkit.org/show_bug.cgi?id=109947
2825 Reviewed by Darin Adler.
2827 Add operators to WTF::CString for equality/inequality comparison
2828 with const char* strings. This avoids constructing a CString
2829 from a const char* in such cases, which is can be expensive as
2830 it would copy it and call strlen().
2832 * wtf/text/CString.cpp:
2833 (WTF::operator==): Use memcmp instead of strncmp to compare the
2834 CString buffers as we know they are the same size and we don't
2835 want to scan for terminating null byte.
2837 * wtf/text/CString.h:
2841 2013-02-15 Geoffrey Garen <ggaren@apple.com>
2843 Merged the global function cache into the source code cache
2844 https://bugs.webkit.org/show_bug.cgi?id=108660
2846 Reviewed by Sam Weinig.
2848 Responding to review comments by Darin Adler.
2850 * wtf/HashTraits.h: Added a using directive to simplify client code.
2852 2013-02-14 Dan Bernstein <mitz@apple.com>
2854 No easy way to use a RetainPtr as a key in a HashMap using object (rather than pointer) equality
2855 https://bugs.webkit.org/show_bug.cgi?id=109864
2857 Reviewed by Sam Weinig and Benjamin Poulain.
2859 Added RetainPtrObjectHashTraits and RetainPtrObjectHash, which use CFEqual
2863 (RetainPtrObjectHashTraits):
2864 (WTF::RetainPtrObjectHashTraits::emptyValue):
2865 (WTF::RetainPtrObjectHashTraits::constructDeletedValue):
2866 (WTF::RetainPtrObjectHashTraits::isDeletedValue):
2868 (WTF::RetainPtrObjectHash::hash):
2869 (WTF::RetainPtrObjectHash::equal):
2870 (RetainPtrObjectHash):
2872 2013-02-14 Tony Chang <tony@chromium.org>
2874 Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
2875 https://bugs.webkit.org/show_bug.cgi?id=96934
2877 * WTF.vcproj/WTF.sln: Modified property svn:eol-style.
2879 2013-02-14 Tony Chang <tony@chromium.org>
2881 Unreviewed, set svn:eol-style CRLF for .sln files.
2883 * WTF.vcproj/WTF.sln: Added property svn:eol-style.
2885 2013-02-14 David Kilzer <ddkilzer@apple.com>
2887 [Mac] Clean up WARNING_CFLAGS
2888 <http://webkit.org/b/109747>
2889 <rdar://problem/13208373>
2891 Reviewed by Mark Rowe.
2893 * Configurations/Base.xcconfig: Use
2894 GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
2895 -Wshorten-64-to-32 rather than WARNING_CFLAGS.
2897 * WTF.vcproj/WTF.sln: Added property svn:eol-style.
2899 2013-02-14 Eric Seidel <eric@webkit.org>
2901 String(Vector) behaves differently from String(vector.data(), vector.size()) for vectors with inline capacity in the size=0 case
2902 https://bugs.webkit.org/show_bug.cgi?id=109784
2904 Reviewed by Darin Adler.
2906 This makes String(Vector) never return null strings.
2907 Which matches behavior of String(UChar*, size_t)
2908 for vectors with inlineCapacity, but differs from
2909 String(UChar*, size_t) in the no-inlineCapacity case.
2911 This incidentally will fix a behavioral regression
2912 in the html threaded parser which came from converting
2913 many String(UChar*, size_t) callsites to using String(Vector).
2915 * wtf/text/WTFString.h:
2917 (WTF::String::String):
2919 2013-02-14 Eric Seidel <eric@webkit.org>
2921 REGRESSION(r142712): attribute values show up as "(null)" instead of null with the threaded parser
2922 https://bugs.webkit.org/show_bug.cgi?id=109784
2924 Reviewed by Benjamin Poulain.
2926 When I changed many callsites to use the (existing) String(Vector) constructor
2927 I inadvertantly made those callsites convert empty vectors to null strings
2928 instead of empty strings (like String(UChar,size_t) does).
2930 This is due to an oddity/bug in our Vector implementation where data()
2931 will be 0 if the Vector is empty, but only if it doesn't have inline capacity.
2932 https://bugs.webkit.org/show_bug.cgi?id=109792
2934 This changes String(Vector) to exactly match the behavior of String(vector.data(), vector.size()).
2936 This regression was easily detectable with the threaded parser, because we use String
2937 instead of AtomicString in our CompactToken (used to send the Token data
2938 between threads). The main-thread parser path uses AtomicHTMLToken which
2939 uses AtomicString(Vector) and does not have this bug.
2941 * wtf/text/WTFString.h:
2943 (WTF::String::String):
2945 2013-02-13 Zan Dobersek <zdobersek@igalia.com>
2947 The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2948 https://bugs.webkit.org/show_bug.cgi?id=109325
2950 Reviewed by Anders Carlsson.
2952 Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2953 two methods as they're provided by the C++ standard library being used.
2955 * wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
2956 * wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
2957 when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
2958 (WTF::parseDateFromNullTerminatedCharacters):
2959 * wtf/IntegralTypedArrayBase.h:
2960 (WTF::IntegralTypedArrayBase::set):
2967 * wtf/MediaTime.cpp:
2968 (WTF::MediaTime::createWithFloat):
2969 (WTF::MediaTime::createWithDouble):
2970 * wtf/Uint8ClampedArray.h:
2971 (WTF::Uint8ClampedArray::set):
2973 2013-02-13 Eric Seidel <eric@webkit.org>
2975 Don't copy Vector<UChar> when passing to new String methods from bug 109617
2976 https://bugs.webkit.org/show_bug.cgi?id=109708
2978 Reviewed by Tony Gentilcore.
2980 Thanks for the catch Darin.
2982 * wtf/text/AtomicString.h:
2983 (WTF::AtomicString::AtomicString):
2984 * wtf/text/StringImpl.h:
2985 (WTF::StringImpl::create8BitIfPossible):
2987 2013-02-13 Martin Robinson <mrobinson@igalia.com>
2989 [GTK] Remove remaining dead code from the GLib unicode backend
2990 https://bugs.webkit.org/show_bug.cgi?id=109707
2992 Reviewed by Philippe Normand.
2994 * wtf/unicode/Unicode.h:
2996 2013-02-13 Andrew Wilson <atwilson@chromium.org>
2998 Unreviewed Chromium gyp-file cleanup after glib backend removal.
2999 https://bugs.webkit.org/show_bug.cgi?id=109672
3001 Removed references to GLib unicode backend:
3006 2013-02-12 Martin Robinson <mrobinson@igalia.com>
3008 [GTK] Remove the GLib unicode backend
3009 https://bugs.webkit.org/show_bug.cgi?id=109627
3011 Reviewed by Benjamin Poulain.
3013 Remove references to the GLib unicode backend from WTF.
3015 * GNUmakefile.list.am: Remove GLib unicode files from the source list.
3016 * wtf/unicode/glib/UnicodeGLib.cpp: Removed.
3017 * wtf/unicode/glib/UnicodeGLib.h: Removed.
3019 2013-02-12 Takeshi Yoshino <tyoshino@google.com>
3021 Remove unnecessary and confusing includes from StreamBuffer.h.
3022 https://bugs.webkit.org/show_bug.cgi?id=109652
3024 Reviewed by Benjamin Poulain.
3026 StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
3027 FixedArray.h and PassOwnPtr.h are included but not used.
3029 VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
3030 So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
3033 * wtf/StreamBuffer.h:
3035 2013-02-12 Eric Seidel <eric@webkit.org>
3037 Teach more WTF string classes about vectors with inline capacity
3038 https://bugs.webkit.org/show_bug.cgi?id=109617
3040 Reviewed by Benjamin Poulain.
3042 The HTML and WebVTT parsers use constructions like:
3043 AtomicString name(m_name.data(), m_name.size())
3044 all over the place because they use inline capacity
3045 on the parse vectors for performance.
3047 This change just add the necessary template variants
3048 to the related String constructors/methods in WTF so that
3049 this parser code can just pass the vector directly instead.
3051 I'll do the actual parser cleanups in follow-up patches to keep things simple.
3053 * wtf/text/AtomicString.h:
3055 (WTF::AtomicString::AtomicString):
3056 * wtf/text/StringImpl.h:
3058 (WTF::StringImpl::create8BitIfPossible):
3059 * wtf/text/WTFString.h:
3061 (WTF::String::make8BitFrom16BitSource):
3065 2013-02-11 Oliver Hunt <oliver@apple.com>
3069 * wtf/FastMalloc.cpp:
3070 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
3072 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
3074 Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
3075 https://bugs.webkit.org/show_bug.cgi?id=109534
3077 Reviewed by Anders Carlsson.
3081 2013-02-11 David Kilzer <ddkilzer@apple.com>
3083 [iOS] Upstream changes to Platform.h
3084 <http://webkit.org/b/109459>
3086 Reviewed by Benjamin Poulain.
3089 - Changes for armv7s.
3090 - Add ENABLE() definitions for DASHBOARD_SUPPORT and WEBGL.
3091 - Re-sort ENABLE() and USE() macros.
3092 - Remove ENABLE() macros for JIT, LLINT and YARR_JIT to enable
3093 on iOS Simulator. They are already defined below.
3094 - Turn off HAVE(HOSTED_CORE_ANIMATION) for iOS.
3095 - Turn on USE(COREMEDIA) for iOS 6.0 and later.
3097 2013-02-08 Oliver Hunt <oliver@apple.com>
3099 Harden FastMalloc (again)
3100 https://bugs.webkit.org/show_bug.cgi?id=109334
3102 Reviewed by Mark Hahnenberg.
3104 Re-implement hardening of linked lists in TCMalloc.
3106 In order to keep heap introspection working, we need to thread the
3107 heap entropy manually as the introspection process can't use the
3108 address of a global in determining the mask. Given we now have to
3109 thread a value through anyway, I've stopped relying on ASLR for entropy
3110 and am simply using arc4random() on darwin, and time + ASLR everywhere
3113 I've also made an explicit struct type for the FastMalloc singly linked
3114 lists, as it seemed like the only way to reliably distinguish between
3115 void*'s that were lists vs. void* that were not. This also made it
3116 somewhat easier to reason about things across processes.
3118 Verified that all the introspection tools work as expected.
3120 * wtf/FastMalloc.cpp:
3121 (WTF::internalEntropyValue):
3124 (WTF::HardenedSLL::create):
3125 (WTF::HardenedSLL::null):
3126 (WTF::HardenedSLL::setValue):
3127 (WTF::HardenedSLL::value):
3128 (WTF::HardenedSLL::operator!):
3129 (WTF::HardenedSLL::operator UnspecifiedBoolType):
3135 (WTF::SLL_PopRange):
3136 (WTF::SLL_PushRange):
3138 (PageHeapAllocator):
3139 (WTF::PageHeapAllocator::Init):
3140 (WTF::PageHeapAllocator::New):
3141 (WTF::PageHeapAllocator::Delete):
3142 (WTF::PageHeapAllocator::recordAdministrativeRegions):
3144 (WTF::Span::remoteNext):
3146 (WTF::Span::setNext):
3147 (WTF::Span::setPrev):
3154 (TCMalloc_Central_FreeList):
3155 (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
3156 (WTF::TCMalloc_Central_FreeList::entropy):
3157 (TCMalloc_PageHeap):
3158 (WTF::TCMalloc_PageHeap::init):
3159 (WTF::TCMalloc_PageHeap::scavenge):
3160 (WTF::TCMalloc_PageHeap::New):
3161 (WTF::TCMalloc_PageHeap::AllocLarge):
3162 (WTF::TCMalloc_PageHeap::Carve):
3163 (WTF::TCMalloc_PageHeap::Delete):
3164 (WTF::TCMalloc_PageHeap::ReturnedBytes):
3165 (WTF::TCMalloc_PageHeap::Check):
3166 (WTF::TCMalloc_PageHeap::CheckList):
3167 (WTF::TCMalloc_PageHeap::ReleaseFreeList):
3168 (TCMalloc_ThreadCache_FreeList):
3169 (WTF::TCMalloc_ThreadCache_FreeList::Init):
3170 (WTF::TCMalloc_ThreadCache_FreeList::empty):
3171 (WTF::TCMalloc_ThreadCache_FreeList::Push):
3172 (WTF::TCMalloc_ThreadCache_FreeList::PushRange):
3173 (WTF::TCMalloc_ThreadCache_FreeList::PopRange):
3174 (WTF::TCMalloc_ThreadCache_FreeList::Pop):
3175 (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
3176 (TCMalloc_ThreadCache):
3177 (WTF::TCMalloc_Central_FreeList::Init):
3178 (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
3179 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
3180 (WTF::TCMalloc_Central_FreeList::InsertRange):
3181 (WTF::TCMalloc_Central_FreeList::RemoveRange):
3182 (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
3183 (WTF::TCMalloc_Central_FreeList::FetchFromSpans):
3184 (WTF::TCMalloc_Central_FreeList::Populate):
3185 (WTF::TCMalloc_ThreadCache::Init):
3186 (WTF::TCMalloc_ThreadCache::Deallocate):
3187 (WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
3188 (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
3189 (WTF::TCMalloc_ThreadCache::InitModule):
3190 (WTF::TCMalloc_ThreadCache::NewHeap):
3191 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
3192 * wtf/MallocZoneSupport.h:
3193 (RemoteMemoryReader):
3195 2013-02-11 Enrica Casucci <enrica@apple.com>
3197 Add ENABLE_DELETION_UI to control the use of the deletion UI.
3198 https://bugs.webkit.org/show_bug.cgi?id=109463.
3200 ENABLE_DELETION_UI is set to 1 by default for
3201 all ports. It is explicitly enabled for MAC and disabled for iOS.
3203 Reviewed by Ryosuke Niwa.
3207 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
3209 [EFL] Stop using smart pointers for Ecore_Timer
3210 https://bugs.webkit.org/show_bug.cgi?id=109409
3212 Reviewed by Kenneth Rohde Christiansen.
3214 Remove support in OwnPtr for EFL's Ecore_Timer. It is a bad idea to use
3215 OwnPtr for Ecore_Timer because the timer handle may become invalid.
3217 * wtf/OwnPtrCommon.h:
3219 * wtf/efl/OwnPtrEfl.cpp:
3221 2013-02-11 Abhishek Arya <inferno@chromium.org>
3223 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
3224 https://bugs.webkit.org/show_bug.cgi?id=108981
3226 Reviewed by Eric Seidel.
3229 (WTF::BitVector::quickGet):
3230 (WTF::BitVector::quickSet):
3231 (WTF::BitVector::quickClear):
3232 * wtf/DecimalNumber.h:
3233 (WTF::DecimalNumber::DecimalNumber):
3234 * wtf/SegmentedVector.h:
3235 (WTF::SegmentedVector::ensureSegment):
3236 * wtf/StringPrintStream.cpp:
3237 (WTF::StringPrintStream::vprintf):
3242 (WTF::double_conversion::StringBuilder::SetPosition):
3243 (WTF::double_conversion::StringBuilder::AddSubstring):
3245 2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
3247 Consolidate the way WTF_USE_PTHREADS is enabled
3248 https://bugs.webkit.org/show_bug.cgi?id=108191
3250 Reviewed by Benjamin Poulain.
3252 Define WTF_USE_PTHREADS to 1 on all OS(UNIX) environments.
3254 * WTF.gyp/WTF.gyp: Remove duplicated definition of WTF_USE_PTHREADS.
3257 2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
3259 Refactor the way HAVE_XXX macros are set
3260 https://bugs.webkit.org/show_bug.cgi?id=108132
3262 Reviewed by Benjamin Poulain.
3264 OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
3265 builds exactly one of them is enabled. Use this assumption to
3270 2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
3272 Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
3273 https://bugs.webkit.org/show_bug.cgi?id=104266
3275 Reviewed by Philippe Normand.
3277 Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
3278 the existing macro naming conventions.
3281 USE() - use a particular third-party library or optional OS service
3282 ENABLE() - turn on a specific feature of WebKit
3286 * wtf/gobject/GOwnPtr.cpp:
3287 * wtf/gobject/GOwnPtr.h:
3288 * wtf/gobject/GRefPtr.cpp:
3289 * wtf/gobject/GRefPtr.h:
3291 2013-02-08 Michael Saboff <msaboff@apple.com>
3293 ARM_NEON Inline Assembly for copyLCharsFromUCharSource() inefficient for aligned destinations
3294 https://bugs.webkit.org/show_bug.cgi?id=109335
3296 Reviewed by Filip Pizlo.
3298 Change a "do while" to a "while" so that we don't copy single characters to align the
3299 destination when it is already aligned.
3301 * wtf/text/ASCIIFastPath.h:
3302 (WTF::copyLCharsFromUCharSource):
3304 2013-02-08 Jer Noble <jer.noble@apple.com>
3306 Bring WebKit up to speed with latest Encrypted Media spec.
3307 https://bugs.webkit.org/show_bug.cgi?id=97037
3309 Reviewed by Eric Carlson.
3311 Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
3315 2013-02-08 Adam Barth <abarth@webkit.org>
3317 Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
3318 https://bugs.webkit.org/show_bug.cgi?id=107190
3320 Reviewed by Eric Seidel.
3322 Add the ability to create an unbound weak reference. This facility lets
3323 you start sending messages to a WeakPtr on another thread before the
3324 object backing the WeakPtr has actually been created.
3327 (WTF::WeakReference::createUnbound):
3328 (WTF::WeakReference::bindTo):
3330 (WTF::WeakReference::WeakReference):
3331 (WTF::WeakPtr::WeakPtr):
3333 (WTF::WeakPtrFactory::WeakPtrFactory):
3335 (WTF::WeakPtrFactory::revokeAll):
3337 2013-02-08 Martin Robinson <mrobinson@igalia.com>
3339 [GTK] Add an experimental gyp build
3340 https://bugs.webkit.org/show_bug.cgi?id=109003
3342 Reviewed by Gustavo Noronha Silva.
3344 * WTF.gyp/WTF.gyp: Filter out MetaAllocator.(cpp/h) from the Chromium
3345 build. It's only necessary for GTK+.
3346 * WTF.gypi: Add MetaAllocator to the build for WebKitGTK+.
3348 2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
3350 Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
3351 https://bugs.webkit.org/show_bug.cgi?id=109051
3353 Reviewed by Yury Semikhatsky.
3355 * wtf/MemoryInstrumentation.cpp:
3356 (WTF::MemoryInstrumentation::WrapperBase::processPointer):
3358 2013-02-07 David Kilzer <ddkilzer@apple.com>
3360 Fix #endif comment from r142163 and r142183
3363 (WTF): s/PLATFORM/USE/
3365 2013-02-07 Benjamin Poulain <bpoulain@apple.com>
3367 Fix an incorrect comment from r142163
3372 I accidentally copied PLATFORM(IOS) instead of USE(WEB_THREAD) for the #ifdef closing.
3374 2013-02-07 Benjamin Poulain <bpoulain@apple.com>
3376 Upstream iOS isWebThread() and isUIThread()
3377 https://bugs.webkit.org/show_bug.cgi?id=109130
3379 Reviewed by Sam Weinig.
3381 On iOS, it is sometimes necessary to differenciate the thread running WebCore,
3382 and the thread running the UI. This patch upstream those functions.
3384 * wtf/MainThread.cpp:
3386 Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
3389 Return true when the current thread is the Web/UI thread.
3391 * wtf/mac/MainThreadMac.mm:
3395 * wtf/text/AtomicString.cpp:
3396 (WTF::AtomicStringTable::create):
3397 Use the newly added methods.
3399 2013-02-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
3401 [Qt] Fix build without 3D_GRAPHICS
3402 https://bugs.webkit.org/show_bug.cgi?id=109194
3404 Reviewed by Noam Rosenthal.
3406 Now that Coordinated Graphics was moved to WebCore, we need to explicitly enable
3407 it when we have 3D_GRAPHICS. This dependency was implicitly by the fact that
3408 3D_GRAPHICS is a dependency of WebKit2 and Coordinated Graphics was only
3409 available there. This should fix build for Qt SH4 Linux.
3413 2013-02-06 Zan Dobersek <zdobersek@igalia.com>
3415 [WTFURL] Fix erroneous header inclusions in WTFURL code
3416 https://bugs.webkit.org/show_bug.cgi?id=109040
3418 Reviewed by Benjamin Poulain.
3420 Include WTFURL API headers from files in Source/WTF/wtf/url/src
3421 by specifying their relative path to Source/WTF.
3423 * GNUmakefile.am: The changes make it possible to compile the WTF library
3424 without specifying both Source/WTF/wtf/url/api and Source/WTF/wtf/url/src
3425 as inclusion directories in CPPFLAGS, so remove these two entries.
3426 * wtf/url/src/RawURLBuffer.h:
3427 * wtf/url/src/URLCanon.h: Include the URLParse.h header by specifying
3428 only the base name as it's located in the same directory.
3429 * wtf/url/src/URLCanonQuery.cpp:
3430 * wtf/url/src/URLUtil.h:
3432 2013-02-06 Tony Gentilcore <tonyg@chromium.org>
3434 Call XSSAuditor's didBlockScript() for the threaded HTML parser
3435 https://bugs.webkit.org/show_bug.cgi?id=108726
3437 Reviewed by Adam Barth.
3439 This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
3440 These methods check to ensure there are 0 or 1 references.
3442 * wtf/text/CString.cpp:
3443 (WTF::CString::isSafeToSendToAnotherThread): Added.
3445 * wtf/text/CString.h:
3447 * wtf/text/WTFString.cpp:
3448 (WTF::String::isSafeToSendToAnotherThread): Added.
3450 * wtf/text/WTFString.h:
3452 * wtf/url/api/ParsedURL.h:
3453 (WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
3454 * wtf/url/api/URLString.h:
3455 (WTF::URLString::isSafeToSendToAnotherThread): Added.
3457 2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
3459 Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
3460 https://bugs.webkit.org/show_bug.cgi?id=107262
3462 Reviewed by Yury Semikhatsky.
3464 We need a way to calculate class name for a pointer automatically.
3465 Otherwise we need to write className manually in all the instrumentation methods.
3466 And for all reported but not instrumented classes.
3468 C++ can do that for us with help of typeid but unfortunatelly it requires rtti.
3469 There is another way to do that. C++ preprocessor provides a define which has a function name.
3471 For g++ and clang it is __PRETTY_FUNCTION__.
3472 For MSVC it is __FUNCTION__.
3473 The content of the string is a function signature.
3474 We can use it because it has the name of the template argument.
3475 The format is sligthly different. That's why I made two different parsers.
3476 One for MSVC the other for GCC, Clang etc.
3477 The other problem is the resulting binary size.
3478 I made very simple function that does the only thing, returns the smallest possible function signature.
3479 Unfortunatelly MSVC doesn't generate template argument name for functions.
3480 It does this only for classes.
3482 * wtf/MemoryInstrumentation.cpp:
3485 (WTF::MemoryClassInfo::callReportObjectInfo):
3486 (WTF::MemoryClassInfo::init):
3487 * wtf/MemoryInstrumentation.h:
3491 (WTF::MemoryClassInfo::MemoryClassInfo):
3493 (WTF::::reportObjectMemoryUsage):
3495 2013-02-05 Mark Lam <mark.lam@apple.com>
3497 Fix EnumClass so that it can be used with switch statements.
3498 https://bugs.webkit.org/show_bug.cgi?id=109004.
3500 Reviewed by Sam Weinig.
3503 (WTF::EnumClass::operator==):
3504 (WTF::EnumClass::operator!=):
3505 (WTF::EnumClass::operator<):
3506 (WTF::EnumClass::operator<=):
3507 (WTF::EnumClass::operator>):
3508 (WTF::EnumClass::operator>=):
3510 (WTF::EnumClass::operator Value):
3512 2013-02-05 Oliver Hunt <oliver@apple.com>
3514 Disable TCMalloc hardening as it's breaking leaks.
3516 Reviewed by Gavin Barraclough.
3518 * wtf/FastMalloc.cpp:
3520 2013-02-05 Mark Lam <mark.lam@apple.com>
3522 Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
3523 https://bugs.webkit.org/show_bug.cgi?id=108988.
3525 Reviewed by Alexey Proskuryakov.
3529 2013-02-05 Roger Fong <roger_fong@apple.com>
3531 Unreviewed build fix.
3533 * wtf/FastMalloc.cpp:
3535 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3538 https://bugs.webkit.org/show_bug.cgi?id=108889
3540 Reviewed by Ryosuke Niwa.
3542 * wtf/StackBounds.h:
3544 (WTF::StackBounds::isSafeToRecurse):
3545 (WTF::StackBounds::size):
3546 Adopt a more conventional style for a multiline branch.
3548 (WTF::StackBounds::StackBounds):
3549 (WTF::StackBounds::current):
3550 (WTF::StackBounds::recursionLimit):
3551 Make those method private.
3553 Making the constructor private ensure initialize() is alwasy called on any StackBounds.
3555 2013-02-05 Zan Dobersek <zdobersek@igalia.com>
3557 [WTFURL] Comparison between signed and unsigned integer expressions in URLUtil.cpp
3558 https://bugs.webkit.org/show_bug.cgi?id=108955
3560 Reviewed by Benjamin Poulain.
3562 * wtf/url/src/URLUtil.cpp:
3563 (URLUtilities): Make the counter variable a signed integer to get rid of the warning.
3565 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3567 Rationalize the use of iOS/Mac #defines in Assertions.cpp
3568 https://bugs.webkit.org/show_bug.cgi?id=108870
3570 Reviewed by David Kilzer.
3572 * wtf/Assertions.cpp: Instead of using PLATFORM(MAC) and assume it works for iOS and OS X,
3573 use CF as the guard for CFString. Similarily, USE_APPLE_SYSTEM_LOG guards code using ASL.
3575 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3577 Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of length zero
3578 https://bugs.webkit.org/show_bug.cgi?id=108894
3580 Reviewed by Andreas Kling.
3582 * wtf/text/StringBuilder.h:
3583 (WTF::StringBuilder::toAtomicString): The function was returning the nullAtom for strings of length zero.
3584 This is inconsistent with StringBuilder::toString() which always return an empty string.
3586 This patch unifies the behavior.
3588 2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
3590 Structure::m_outOfLineCapacity is unnecessary
3591 https://bugs.webkit.org/show_bug.cgi?id=108206
3593 Reviewed by Darin Adler.
3595 Simplifying the utility functions that we use since we don't need a
3596 bunch of fancy templates for this one specific call site.
3599 (WTF::roundUpToPowerOfTwo):
3601 2013-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
3603 Unreviewed, rolling out r141905.
3604 http://trac.webkit.org/changeset/141905
3605 https://bugs.webkit.org/show_bug.cgi?id=108963
3607 "Broke mac build" (Requested by tonyg-cr on #webkit).
3609 * wtf/text/CString.cpp:
3610 * wtf/text/CString.h:
3611 * wtf/text/WTFString.cpp:
3612 * wtf/text/WTFString.h:
3614 * wtf/url/api/ParsedURL.h:
3616 * wtf/url/api/URLString.h:
3618 2013-02-05 Tony Gentilcore <tonyg@chromium.org>
3620 Call XSSAuditor's didBlockScript() for the threaded HTML parser
3621 https://bugs.webkit.org/show_bug.cgi?id=108726
3623 Reviewed by Adam Barth.
3625 This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
3626 These methods check to ensure there are 0 or 1 references.
3628 * wtf/text/CString.cpp:
3629 (WTF::CString::isSafeToSendToAnotherThread): Added.
3631 * wtf/text/CString.h:
3633 * wtf/text/WTFString.cpp:
3634 (WTF::String::isSafeToSendToAnotherThread): Added.
3636 * wtf/text/WTFString.h:
3638 * wtf/url/api/ParsedURL.h:
3639 (WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
3640 * wtf/url/api/URLString.h:
3641 (WTF::URLString::isSafeToSendToAnotherThread): Added.
3643 2013-02-04 Benjamin Poulain <bpoulain@apple.com>
3645 Build fix for AtomicString on iOS
3647 Unreviewed. The commit r141812 rely on isUIThread(), there is no such things
3648 in the tree right now. Use pthread_main_np() until more thread handling is upstreamed.
3650 * wtf/text/AtomicString.cpp:
3651 (WTF::AtomicStringTable::create):
3653 2013-02-04 Abhishek Arya <inferno@chromium.org>
3655 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
3656 https://bugs.webkit.org/show_bug.cgi?id=108668
3658 Reviewed by Eric Seidel.
3661 (WTF::AVLTreeDefaultBSet::operator[]):