1 2013-04-22 Andreas Kling <akling@apple.com>
3 Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
4 <http://webkit.org/b/97268>
5 <rdar://problem/12376519>
7 Reviewed by Sam Weinig.
9 Shrink Vector by 8 bytes on 64-bit by using 32-bit capacity and size.
10 Vector now inherits from VectorBuffer instead of having a VectorBuffer member;
11 this is necessary for m_size to fall into the padding after the base class members.
13 The WTF::Vector API still uses size_t.
15 Based on Blink r148313 by <cevans@chromium.org>.
19 (WTF::VectorBufferBase::allocateBuffer):
20 (WTF::VectorBufferBase::tryAllocateBuffer):
22 (WTF::VectorBuffer::shouldReallocateBuffer):
24 (WTF::Vector::Vector):
25 (WTF::Vector::capacity):
30 (WTF::::reserveCapacity):
31 (WTF::::tryReserveCapacity):
32 (WTF::::reserveInitialCapacity):
33 (WTF::::shrinkCapacity):
34 (WTF::::releaseBuffer):
36 2013-04-21 Filip Pizlo <fpizlo@apple.com>
38 Memory barrier support should also ensure that we always do a compiler fence
39 https://bugs.webkit.org/show_bug.cgi?id=114934
41 Reviewed by Michael Saboff.
43 This is a cherry-pick merge of the WTF part of r148836 from the dfgFourthTier
44 branch. It fixes a memory ordering bug that is likely asymptomatic, but
45 nonetheless real: TCSpinLock expects that using a memoryBarrierBeforeUnlock()
46 prior to setting lockword_ to 0 will ensure that the assignment to lockword_
47 won't get floated above any of the stores in the critical section. While that
48 memory barrier does indeed do the right thing on ARM, it doesn't do the right
49 thing on other architectures: it turns into empty code that the compiler blows
50 away, which is fine for the hardware since X86 won't reorder that store - but
51 it's not fine for the compiler, which may still do its own reorderings.
53 The WTF part of r148836 fixes this by using a compiler fence: an empty asm
54 volatile block that is marked as clobbering memory.
56 Instead of doing a separate surgical fix in trunk, I decided to merge the
57 whole WTF change over, to make merging easier in the future.
59 Performance testing of this change in dfgFourthTier showed no regression.
66 (WTF::loadStoreFence):
67 (WTF::storeLoadFence):
68 (WTF::storeStoreFence):
69 (WTF::memoryBarrierAfterLock):
70 (WTF::memoryBarrierBeforeUnlock):
73 2013-04-22 David Kilzer <ddkilzer@apple.com>
75 WTF::AtomicString::find() should take unsigned 'start' argument
76 <http://webkit.org/b/114958>
78 Reviewed by Darin Adler.
80 Fixes the following warnings with -Wshorten-64-to-32:
82 AtomicString.h:113:76: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
83 size_t find(UChar c, size_t start = 0) const { return m_string.find(c, start); }
85 AtomicString.h:115:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
86 { return m_string.find(s, start, caseSentitive); }
88 AtomicString.h:117:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
89 { return m_string.find(s, start, caseSentitive); }
92 * wtf/text/AtomicString.h:
93 (WTF::AtomicString::find): Change type of 'start' argument from
96 2013-04-21 Benjamin Poulain <benjamin@webkit.org>
98 Improve StringImpl code density for older ARM hardware
99 https://bugs.webkit.org/show_bug.cgi?id=114898
101 Reviewed by Geoffrey Garen.
103 Reduce the number of instructions needed for StringImpl::deref
104 on older ARM hardware.
106 The extra indirection should have a negligible impact on x86_64.
108 * wtf/text/StringImpl.cpp:
109 (WTF::StringImpl::destroy):
110 * wtf/text/StringImpl.h:
112 (WTF::StringImpl::deref):
114 2013-04-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
116 LLint should be able to use x87 instead of SSE for floating pointer
117 https://bugs.webkit.org/show_bug.cgi?id=112239
119 Reviewed by Filip Pizlo.
121 Disable GTK workaround now that LLInt does not require SSE2.
125 2013-04-19 Roger Fong <roger_fong@apple.com>
127 Remove uses of WebKit_Source from AppleWin build in WTF.
129 * WTF.vcxproj/WTF.make:
130 * WTF.vcxproj/copy-files.cmd:
131 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
132 (react_to_vsprops_changes):
133 (react_to_webkit1_interface_changes):
135 2013-04-19 Benjamin Poulain <benjamin@webkit.org>
137 Remove the declaration of MemoryObjectInfo from StringImpl
138 https://bugs.webkit.org/show_bug.cgi?id=114788
140 Reviewed by Andreas Kling.
142 * wtf/text/StringImpl.h: The declaration is an other left over from chromium.
144 2013-04-19 Benjamin Poulain <benjamin@webkit.org>
146 Make StringImpl::cost const
147 https://bugs.webkit.org/show_bug.cgi?id=114790
149 Reviewed by Andreas Kling.
151 * wtf/text/StringImpl.h:
152 (WTF::StringImpl::cost):
154 2013-04-19 Roger Fong <roger_fong@apple.com>
156 Unreviewed. WebKit_Source is incorrectly set.
158 * WTF.vcxproj/WTF.make:
160 2013-04-19 Alberto Garcia <agarcia@igalia.com>
162 OSAllocatorPosix: fix build warnings about unused parameters in QNX
163 https://bugs.webkit.org/show_bug.cgi?id=114859
165 Reviewed by Carlos Garcia Campos.
167 * wtf/OSAllocatorPosix.cpp:
168 (WTF::OSAllocator::reserveUncommitted):
170 2013-04-19 Dan Beam <dbeam@chromium.org>
172 Remove unmaintained feature REQUEST_AUTOCOMPLETE
173 https://bugs.webkit.org/show_bug.cgi?id=114846
175 Reviewed by Kent Tamura.
177 * wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.
179 2013-04-18 Zoltan Arvai <zarvai@inf.u-szeged.hu>
181 Speculative build fix for Qt Mountain Lion Release after r148639.
182 https://bugs.webkit.org/show_bug.cgi?id=114793
184 Reviewed by Michael Saboff.
186 * wtf/CurrentTime.cpp:
188 2013-04-17 Mark Lam <mark.lam@apple.com>
190 Added currentCPUTime() and currentCPUTimeMS().
191 https://bugs.webkit.org/show_bug.cgi?id=114577.
193 Reviewed by Geoffrey Garen.
195 The currentCPUTime() implementation came from the old TimeoutChecker.cpp.
197 * wtf/CurrentTime.cpp:
198 (WTF::currentCPUTime):
199 (WTF::currentCPUTimeMS):
202 2013-04-17 Ryosuke Niwa <rniwa@webkit.org>
204 REGRESSION(r148584): WebKit nightly builds don't load any page
205 https://bugs.webkit.org/show_bug.cgi?id=114752
207 Reviewed by Anders Carlsson.
209 We can't use C++ style (//) comments in Platform.h because WebKit2/DerivedSource.make doesn't know
210 how to strip it to be merged with *.sb.in to generate *.sb files. Specifically, we have:
212 # Some versions of clang incorrectly strip out // comments in c89 code.
213 # Use -traditional as a workaround, but only when needed since that causes
214 # other problems with later versions of clang.
215 ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
216 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
218 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
223 2013-04-17 Brent Fulgham <bfulgham@webkit.org>
225 [Windows, WinCairo] Remove Include Settings for Pthreads from WTF
226 https://bugs.webkit.org/show_bug.cgi?id=114694
228 Reviewed by Ryosuke Niwa.
230 * WTF.vcproj/WTFCommon.vsprops: Remove pthread search path.
231 * WTF.vcxproj/WTFCommon.props: Remove pthread search path.
232 * wtf/FastMalloc.cpp: Guard pthread.h include for non-pthread
235 2013-04-16 Oliver Hunt <oliver@apple.com>
237 Harden FastMalloc against partial pointer overflows
238 https://bugs.webkit.org/show_bug.cgi?id=114716
240 Reviewed by Gavin Barraclough.
242 Bite the bullet and perform object alignment checks on free.
243 malloc/free micro benchmark shows a regression, but real
244 benchmarks don't. There's a little code motion in this avoid
245 taking too much of a performance hit. In addition to the
246 alignment check we also validate the containing span as
247 we've already taken the hit of finding it.
249 * wtf/FastMalloc.cpp:
250 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
252 2013-04-16 Sam Weinig <sam@webkit.org>
254 Fix fallout after r148545.
257 Move Platform defines that were incorrectly in WebCore, into Platform.h
259 2013-04-15 Commit Queue <rniwa@webkit.org>
261 Unreviewed, rolling out r148488.
262 http://trac.webkit.org/changeset/148488
263 https://bugs.webkit.org/show_bug.cgi?id=114660
265 Roll back in r148462 since it was a false positive. (Requested
266 by rniwa on #webkit).
268 * wtf/FastMalloc.cpp:
270 (WTF::setThreadHeap):
271 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
272 (WTF::TCMalloc_ThreadCache::InitTSD):
273 * wtf/ThreadSpecificWin.cpp:
274 (WTF::destructorsList):
275 (WTF::destructorsMutex):
276 (WTF::threadSpecificKeyCreate):
277 (WTF::threadSpecificKeyDelete):
279 2013-04-15 Commit Queue <rniwa@webkit.org>
281 Unreviewed, rolling out r148462.
282 http://trac.webkit.org/changeset/148462
283 https://bugs.webkit.org/show_bug.cgi?id=114658
285 Broke Windows builds (Requested by rniwa on #webkit).
287 * wtf/FastMalloc.cpp:
289 (WTF::setThreadHeap):
290 (WTF::TCMalloc_ThreadCache::GetThreadHeap):
291 (WTF::TCMalloc_ThreadCache::InitTSD):
292 * wtf/ThreadSpecificWin.cpp:
293 (WTF::destructorsList):
294 (WTF::destructorsMutex):
295 (WTF::threadSpecificKeyCreate):
296 (WTF::threadSpecificKeyDelete):
298 2013-04-15 Julien Brianceau <jbrianceau@nds.com>
300 LLInt SH4 backend implementation
301 https://bugs.webkit.org/show_bug.cgi?id=112886
303 Reviewed by Oliver Hunt.
307 2013-04-15 Patrick Gansterer <paroga@webkit.org>
309 [CMake] Add WTF_USE_*_UNICODE variables
310 https://bugs.webkit.org/show_bug.cgi?id=114556
312 Reviewed by Brent Fulgham.
314 WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
315 reduce duplication in the platform specific CMake files.
317 * wtf/CMakeLists.txt:
318 * wtf/PlatformBlackBerry.cmake:
319 * wtf/PlatformEfl.cmake:
320 * wtf/PlatformWinCE.cmake:
322 2013-04-15 Patrick Gansterer <paroga@webkit.org>
324 [WIN] Remove remaining calls to pthread from WTF
325 https://bugs.webkit.org/show_bug.cgi?id=114563
327 Reviewed by Brent Fulgham.
329 Replace pthread_key_create with threadSpecificKeyCreate and
330 pthread_setspecific with threadSpecificSet from ThreadSpecific.h.
331 These functions provide a windows-specific implementation for the pthread functions,
332 but require that the thread has been created with WTF::createThread(),
333 which is the case for all threads created within WebKit.
334 To call this function from fastMalloc we must not call fastMalloc in them.
335 To fulfill this constraint ThreadSpecificWin will allocated its memory through the
336 original malloc implementation and use the stack for local and static variables.
337 Keep the Darwin implementation as it is, since it contains some performance tweaks.
339 * wtf/FastMalloc.cpp:
340 * wtf/ThreadSpecificWin.cpp:
341 (WTF::destructorsList):
342 (WTF::destructorsMutex):
343 (WTF::threadSpecificKeyCreate):
344 (WTF::threadSpecificKeyDelete):
346 2013-04-14 Oliver Hunt <oliver@apple.com>
348 Try to fix non-apple windows builds
352 2013-04-14 David Kilzer <ddkilzer@apple.com>
354 Add EnumClass.h to project files
355 <http://webkit.org/b/114582>
357 Rubber-stamped by Dan Bernstein.
359 * WTF.pro: Add EnumClass.h to project.
360 * WTF.vcproj/WTF.vcproj: Ditto.
361 * WTF.vcxproj/WTF.vcxproj: Ditto.
362 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
363 * WTF.xcodeproj/project.pbxproj: Ditto.
365 2013-04-12 Oliver Hunt <oliver@apple.com>
367 Apologies to all, I have no idea what happened to cause this change.
371 2013-04-12 Oliver Hunt <oliver@apple.com>
373 [Qt][Win] r148257 broke the build
374 https://bugs.webkit.org/show_bug.cgi?id=114512
380 2013-04-11 Oliver Hunt <oliver@apple.com>
382 Add more type validation to debug builds
383 https://bugs.webkit.org/show_bug.cgi?id=114478
385 Reviewed by Mark Hahnenberg.
387 Add BINDING_VALIDATION flag and make RELEASE_ASSERT use UNLIKELY.
392 2013-04-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
394 [WTF] Get rid of truncated thread name warnings for non-Windows platforms
395 https://bugs.webkit.org/show_bug.cgi?id=114266
397 Reviewed by Ryosuke Niwa.
399 Hide the annoying message from ports that are not really interested
405 2013-04-10 Benjamin Poulain <bpoulain@apple.com>
407 Mass remove all the empty directories
409 Rubberstamped by Ryosuke Niwa.
411 * wtf/qt/compat: Removed.
412 * wtf/unicode/glib: Removed.
413 * wtf/unicode/qt4: Removed.
414 * wtf/unicode/wince: Removed.
416 2013-04-08 Anders Carlsson <andersca@apple.com>
418 Remove unneeded headers from FrameLoader.h
419 https://bugs.webkit.org/show_bug.cgi?id=114223
421 Reviewed by Geoffrey Garen.
427 Don't include DataLog.h unless DUMP_HASHTABLE_STATS_PER_TABLE is 1.
429 2013-04-10 Laszlo Gombos <l.gombos@samsung.com>
431 Remove ENABLE_3D_PLUGIN
432 https://bugs.webkit.org/show_bug.cgi?id=108002
434 Reviewed by Antti Koivisto.
436 Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
438 * wtf/FeatureDefines.h:
440 2013-04-09 Patrick Gansterer <paroga@webkit.org>
442 [CMake] Remove conditional source file lists in WTF
443 https://bugs.webkit.org/show_bug.cgi?id=114250
445 Reviewed by Laszlo Gombos.
447 Use the #ifdef in the source file instead of conditional adding
448 files to the list of source files. This allows us to remove the
449 information of enabled features from CMake in next step.
451 * wtf/CMakeLists.txt:
453 2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
455 Remove WTF.gyp/WTF.gypi
456 https://bugs.webkit.org/show_bug.cgi?id=114237
458 Reviewed by Maciej Stachowiak.
461 * WTF.gyp/.gitignore: Removed.
462 * WTF.gyp/WTF.gyp: Removed.
465 2013-04-08 Benjamin Poulain <benjamin@webkit.org>
467 Remove HTML Notification
468 https://bugs.webkit.org/show_bug.cgi?id=114231
470 Reviewed by Ryosuke Niwa.
472 * wtf/FeatureDefines.h:
474 2013-04-08 Benjamin Poulain <benjamin@webkit.org>
476 wtf/dtoa/* uses a confusing name to reference its buffers
477 https://bugs.webkit.org/show_bug.cgi?id=109709
479 Reviewed by Darin Adler.
481 The data structure Vector in wtf/dtoa has nothing to do with a traditional
482 vector, is it just a pointer and the length of the pointed buffer.
484 Rename it to BufferReference to avoid mistakes.
486 * wtf/dtoa/bignum-dtoa.cc:
487 * wtf/dtoa/bignum-dtoa.h:
488 * wtf/dtoa/bignum.cc:
491 * wtf/dtoa/double-conversion.cc:
492 * wtf/dtoa/fast-dtoa.cc:
493 * wtf/dtoa/fast-dtoa.h:
494 * wtf/dtoa/fixed-dtoa.cc:
495 * wtf/dtoa/fixed-dtoa.h:
497 * wtf/dtoa/strtod.cc:
502 (WTF::double_conversion::BufferReference::BufferReference):
503 (WTF::double_conversion::BufferReference::SubBufferReference):
506 2013-04-08 Alberto Garcia <agarcia@igalia.com>
508 [BlackBerry] MathExtras: macros defined in math.h conflict with the real functions
509 https://bugs.webkit.org/show_bug.cgi?id=112683
511 Reviewed by Darin Adler.
513 After calls to signbit and friends were prefixed with std:: in
514 r143232, the BlackBerry port no longer compiles.
516 The solution is to get rid of the macros defined in math.h and use
517 the real functions instead.
521 2013-04-08 Max Vujovic <mvujovic@adobe.com>
523 REGRESSION (r147502): Animations of CA filters broken
524 https://bugs.webkit.org/show_bug.cgi?id=114067
526 Reviewed by Dean Jackson.
528 Revert r147502 [1] because it broke CA filter animations.
530 [1]: http://trac.webkit.org/changeset/147502
534 2013-04-08 Andreas Kling <akling@apple.com>
536 REGRESSION(r147894): Broke WTFReportBacktrace() on Mac.
537 <http://webkit.org/b/114174>
539 Reviewed by Anders Carlsson.
541 An #elif !OS(ANDROID) block was erroneously removed, turn it into an #else instead since
542 that path will still be taken for OS(DARWIN).
544 * wtf/Assertions.cpp:
546 2013-04-08 Oliver Hunt <oliver@apple.com>
550 Remove unnecessary include of <wtf/Forward.h> from Vector.h
554 2013-04-08 Csaba Osztrogonác <ossy@webkit.org>
556 Unreviewed trivial buildfix after r147799.
558 Add an ifdef guard to ensure Qt uses its own monotonicallyIncreasingTime()
559 implemenation instead of the GLIB based one.
561 * wtf/CurrentTime.cpp:
564 2013-04-07 Benjamin Poulain <benjamin@webkit.org>
566 Remove the android code from WebKit Template Framework
567 https://bugs.webkit.org/show_bug.cgi?id=114138
569 Reviewed by Dirk Schulze.
571 * wtf/Assertions.cpp:
575 * wtf/ThreadIdentifierDataPthreads.cpp:
577 2013-04-07 Oliver Hunt <oliver@apple.com>
579 Add bounds checking for WTF::Vector::operator[]
580 https://bugs.webkit.org/show_bug.cgi?id=89600
582 Reviewed by Filip Pizlo.
584 Add a template parameter to Vector<> that controls whether
585 bounds checking is performed in release builds or not.
586 Defaults to crashing on overflow.
594 (WTF::Vector::removeLast):
599 (WTF::::reverseFind):
601 (WTF::::appendRange):
602 (WTF::::expandCapacity):
603 (WTF::::tryExpandCapacity):
607 (WTF::::reserveCapacity):
608 (WTF::::tryReserveCapacity):
609 (WTF::::reserveInitialCapacity):
610 (WTF::::shrinkCapacity):
613 (WTF::::appendSlowCase):
614 (WTF::::uncheckedAppend):
615 (WTF::::appendVector):
620 (WTF::::releaseBuffer):
621 (WTF::::checkConsistency):
622 (WTF::deleteAllValues):
627 2013-04-07 Patrick Gansterer <paroga@webkit.org>
629 [WIN] Fix problems with export macros of AutodrainedPool
630 https://bugs.webkit.org/show_bug.cgi?id=114132
632 Reviewed by Geoffrey Garen.
634 Exporting an inline function results in an error with the MS compiler.
636 * wtf/AutodrainedPool.h:
638 (WTF::AutodrainedPool::AutodrainedPool):
639 (WTF::AutodrainedPool::~AutodrainedPool):
640 (WTF::AutodrainedPool::cycle):
642 2013-04-07 Patrick Gansterer <paroga@webkit.org>
644 [WinCE] Add workaround for UNUSED_PARAM()
645 https://bugs.webkit.org/show_bug.cgi?id=113440
647 Reviewed by Benjamin Poulain.
649 The MSVC compiler for Windwos CE throws an error when
650 an function parameter is passed to UNUSED_PARAM() and
651 its type is only forward declared.
655 2013-04-07 Patrick Gansterer <paroga@webkit.org>
657 Do not check if WTF_ARM_ARCH_VERSION is defined in WTF_ARM_ARCH_AT_LEAST macro
658 https://bugs.webkit.org/show_bug.cgi?id=114127
660 Reviewed by Benjamin Poulain.
662 Platform.h defines WTF_ARM_ARCH_VERSION for CPU(ARM) always and removing
663 the check works around a bug in older Microsoft compiler versions.
667 2013-04-07 David Kilzer <ddkilzer@apple.com>
669 Remove the rest of SVG_DOM_OBJC_BINDINGS
670 <http://webkit.org/b/114112>
672 Reviewed by Geoffrey Garen.
674 * wtf/FeatureDefines.h:
675 - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
677 2013-04-06 Geoffrey Garen <ggaren@apple.com>
679 Removed v8 bindings hooks from IDL files
680 https://bugs.webkit.org/show_bug.cgi?id=114091
682 Reviewed by Anders Carlsson and Sam Weinig.
686 (WTF::ArrayBufferContents::ArrayBufferContents):
687 (WTF::ArrayBufferContents::transfer):
688 (ArrayBufferContents):
690 (WTF::ArrayBufferContents::~ArrayBufferContents):
693 2013-04-05 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
695 [GTK] Change from PLATFORM(GTK) to USE(GLIB) in WTF/CurrentTime.cpp
696 https://bugs.webkit.org/show_bug.cgi?id=114061
698 Reviewed by Gustavo Noronha Silva.
700 Now other ports using GLib can use the correct implementation
701 and not the fallback one without adding any other PLATFORM guards
704 * wtf/CurrentTime.cpp:
707 2013-04-05 Geoffrey Garen <ggaren@apple.com>
709 Made USE(JSC) unconditional
710 https://bugs.webkit.org/show_bug.cgi?id=114058
712 Reviewed by Anders Carlsson.
714 * wtf/ThreadRestrictionVerifier.h:
716 * wtf/WTFThreadData.cpp:
717 (WTF::WTFThreadData::WTFThreadData):
718 (WTF::WTFThreadData::~WTFThreadData):
719 * wtf/WTFThreadData.h:
721 * wtf/text/StringImpl.cpp:
722 (WTF::StringImpl::~StringImpl):
724 2013-04-05 Roger Fong <roger_fong@apple.com>
726 More VS2010 solution makefile fixes.
727 <rdar://problem/13588964>
729 * WTF.vcxproj/WTF.make:
731 2013-04-05 Anders Carlsson <andersca@apple.com>
733 Remove more dead Chromium code from WTF
734 https://bugs.webkit.org/show_bug.cgi?id=114037
736 Reviewed by Allan Sandfeld Jensen.
738 * wtf/CurrentTime.cpp:
740 * wtf/DisallowCType.h:
741 * wtf/ExportMacros.h:
742 * wtf/MainThread.cpp:
745 2013-04-05 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
747 [EFL] Disable GLOBAL_FAST_MALLOC_NEW by default.
748 https://bugs.webkit.org/show_bug.cgi?id=114031
750 Reviewed by Alexis Menard.
752 Follow what some other ports already do and avoid globally overriding
753 the `new' and `delete' operators with the ones in FastMalloc.
755 In many cases, third-party or client code allocates memory with
756 standard library calls but the memory gets deleted by FastMalloc,
757 causing a crash. The reverse (ie. memory being allocated by FastMalloc
758 and freed by the system libraries) is also possible.
760 Commits 135666 and 121018 provide more information about this, as well
761 as comment 6 in bug 89358.
765 2013-04-05 Benjamin Poulain <bpoulain@apple.com>
767 Remove WTFURL from WebKit
768 https://bugs.webkit.org/show_bug.cgi?id=113994
770 Reviewed by Ryosuke Niwa.
772 Painful, but that is for the best now :(
774 * GNUmakefile.list.am:
775 * WTF.xcodeproj/project.pbxproj:
776 * wtf/MemoryInstrumentationParsedURL.h: Removed.
777 * wtf/url/api/ParsedURL.cpp: Removed.
778 * wtf/url/api/ParsedURL.h: Removed.
779 * wtf/url/api/URLBuffer.h: Removed.
780 * wtf/url/api/URLQueryCharsetConverter.h: Removed.
781 * wtf/url/api/URLString.cpp: Removed.
782 * wtf/url/api/URLString.h: Removed.
783 * wtf/url/src/RawURLBuffer.h: Removed.
784 * wtf/url/src/URLCanon.h: Removed.
785 * wtf/url/src/URLCanonEtc.cpp: Removed.
786 * wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
787 * wtf/url/src/URLCanonFileurl.cpp: Removed.
788 * wtf/url/src/URLCanonHost.cpp: Removed.
789 * wtf/url/src/URLCanonICU.cpp: Removed.
790 * wtf/url/src/URLCanonIP.cpp: Removed.
791 * wtf/url/src/URLCanonInternal.cpp: Removed.
792 * wtf/url/src/URLCanonInternal.h: Removed.
793 * wtf/url/src/URLCanonMailto.cpp: Removed.
794 * wtf/url/src/URLCanonPath.cpp: Removed.
795 * wtf/url/src/URLCanonPathurl.cpp: Removed.
796 * wtf/url/src/URLCanonQuery.cpp: Removed.
797 * wtf/url/src/URLCanonRelative.cpp: Removed.
798 * wtf/url/src/URLCanonStdURL.cpp: Removed.
799 * wtf/url/src/URLCharacterTypes.cpp: Removed.
800 * wtf/url/src/URLCharacterTypes.h: Removed.
801 * wtf/url/src/URLComponent.h: Removed.
802 * wtf/url/src/URLFile.h: Removed.
803 * wtf/url/src/URLParse.cpp: Removed.
804 * wtf/url/src/URLParse.h: Removed.
805 * wtf/url/src/URLParseFile.cpp: Removed.
806 * wtf/url/src/URLParseInternal.h: Removed.
807 * wtf/url/src/URLSegments.cpp: Removed.
808 * wtf/url/src/URLSegments.h: Removed.
809 * wtf/url/src/URLUtil.cpp: Removed.
810 * wtf/url/src/URLUtil.h: Removed.
811 * wtf/url/src/URLUtilInternal.h: Removed.
813 2013-04-04 Geoffrey Garen <ggaren@apple.com>
815 Nixed the defunct chromium folder from WTF
816 https://bugs.webkit.org/show_bug.cgi?id=113992
818 Reviewed by Ryosuke Niwa.
820 * wtf/chromium: Removed.
821 * wtf/chromium/ChromiumThreading.h: Removed.
822 * wtf/chromium/MainThreadChromium.cpp: Removed.
824 2013-04-04 Martin Robinson <mrobinson@igalia.com>
826 [GTK] Remove the gyp build
827 https://bugs.webkit.org/show_bug.cgi?id=113942
829 Reviewed by Gustavo Noronha Silva.
831 * WTF.gyp/WTFGTK.gyp: Removed.
833 2013-04-04 Anders Carlsson <andersca@apple.com>
835 ObjcRuntimeExtras.h should use variadic templates
836 https://bugs.webkit.org/show_bug.cgi?id=113941
838 Reviewed by Andreas Kling.
840 Reimplement wtfObjcMsgSend and wtfCallIMP as variadic function templates.
842 * wtf/ObjcRuntimeExtras.h:
846 2013-04-04 Andras Becsi <andras.becsi@digia.com>
848 Fix the build with GCC 4.8
849 https://bugs.webkit.org/show_bug.cgi?id=113147
851 Reviewed by Allan Sandfeld Jensen.
853 Disable diagnostic warning -Wunused-local-typedefs for GCC 4.8
854 since dummy typedefs are commonly used in the codebase.
858 2013-04-03 Pratik Solanki <psolanki@apple.com>
860 Enable HAVE_MADV_FREE_REUSE on iOS
861 https://bugs.webkit.org/show_bug.cgi?id=113892
862 <rdar://problem/12787563>
864 Reviewed by Mark Rowe.
868 2013-04-02 Ryosuke Niwa <rniwa@webkit.org>
870 Remove code for Mac 10.5 and earlier from WTF and WebKit2
871 https://bugs.webkit.org/show_bug.cgi?id=113844
873 Reviewed by Benjamin Poulain.
875 Removed the code for 10.5 and removed if-def for 10.6.
877 * wtf/FastMalloc.cpp:
878 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
880 * wtf/ThreadingPthreads.cpp:
881 (WTF::initializeCurrentThreadInternal):
882 * wtf/unicode/icu/CollatorICU.cpp:
883 (WTF::Collator::userDefault):
885 2013-04-02 Max Vujovic <mvujovic@adobe.com>
887 [CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
888 https://bugs.webkit.org/show_bug.cgi?id=109098
890 Reviewed by Dean Jackson.
893 Add flag for HAVE(COMPOSITOR_FILTER_OUTSETS) macro. This is used to check if a
894 platform's compositor expands layers internally for filter outsets when it applies
895 filters like drop-shadow and blur. Currently, only CoreAnimation does has this
898 2013-04-02 Yury Semikhatsky <yurys@chromium.org>
900 Web Inspector: memory instrumentation for external arrays is broken
901 https://bugs.webkit.org/show_bug.cgi?id=113790
903 Reviewed by Pavel Feldman.
905 * wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
906 we know that the pointer is not broken.
907 (WTF::reportMemoryUsage):
909 2013-04-01 Han Shen <shenhan@google.com>
911 Move definition of nested classes that inherit enclosing class outside class definition.
912 https://bugs.webkit.org/show_bug.cgi?id=113454
914 Reviewed by Benjamin Poulain.
916 HashMap.h does not build on GCC 4.8. Inside this file,
917 HashMapKeysProxy and HashMapValuesProxy are defined as nested
918 class inside HashMap - which is legal - the illegal part is that
919 these 2 classes inherit HashMap, that is the enclosing class, that
920 causes "reference to in-complete definition" error.
922 The fix is to move outside the definition of these 2 classes, and
923 leave only declaration part inside HashMap as is illustrated below -
925 template class <typename T>
930 class HashMapKeysProxy;
932 // ERROR - nested class inherits enclosing class.
933 class HashMapKeysProxy : private HashMap {
938 class HashMapKeysProxy : private HashMap {
946 template class <typename T>
951 class HashMapKeysProxy;
952 class HashMapValuesProxy;
958 template <typename T>
959 class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
963 template <typename T>
964 class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
970 (WTF): Factor out nested class definition from enclosing class.
972 2013-03-31 Mark Hahnenberg <mhahnenberg@apple.com>
974 Regions should be allocated from the same contiguous segment of virtual memory
975 https://bugs.webkit.org/show_bug.cgi?id=113662
977 Reviewed by Filip Pizlo.
979 Instead of letting the OS spread our Regions all over the place, we should allocate them all within
980 some range of each other. This change will open the door to some other optimizations, e.g. doing simple
981 range checks for our write barriers and compressing JSCell pointers to 32-bits.
983 * wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
984 use something other than the system page size.
985 (WTF::MetaAllocator::MetaAllocator):
986 * wtf/MetaAllocator.h:
989 2013-04-01 Yury Semikhatsky <yurys@chromium.org>
991 Web Inspector: add memory instrumentation for StringBuffer
992 https://bugs.webkit.org/show_bug.cgi?id=113507
994 Reviewed by Pavel Feldman.
996 Added memory instrumentation for StringBuffer.
998 * wtf/MemoryInstrumentationString.h:
1000 (WTF::reportMemoryUsage):
1002 2013-03-30 Tom Sepez <tsepez@chromium.org>
1004 View-source iframes are dangerous (and not very useful).
1005 https://bugs.webkit.org/show_bug.cgi?id=113345
1007 Reviewed by Adam Barth.
1009 * wtf/FeatureDefines.h:
1010 Default definition of ENABLE_VIEWSOURCE_ATTRIBUTE is enabled.
1012 2013-03-27 Patrick Gansterer <paroga@webkit.org>
1014 Set WTF_ARM_ARCH_VERSION to correct value when used with MSVC
1015 https://bugs.webkit.org/show_bug.cgi?id=113436
1017 Reviewed by Benjamin Poulain.
1019 The Microsoft compiler defines _M_ARM with used ARM version.
1023 2013-03-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
1025 Support C++11 static_assert
1026 https://bugs.webkit.org/show_bug.cgi?id=113308
1028 Reviewed by Alexey Proskuryakov.
1030 Use the C++11 static_assert for COMPILE_ASSERT when it is available. Note that
1031 even when compiling with C++11 support, static_assert will not always be available
1032 since Assertions.h may also be used outside of C++.
1034 C11 _Static_assert is enabled for GCC when it has C11 support (gcc>=4.7 -std=c11).
1039 2013-03-25 Oliver Hunt <oliver@apple.com>
1041 RefCountedArray needs a size based constructor
1042 https://bugs.webkit.org/show_bug.cgi?id=113277
1044 Reviewed by Benjamin Poulain.
1046 Simple patch to add a size based constructor for RefCountedArray
1047 so that we can create an sharable array without a copy.
1049 * wtf/RefCountedArray.h:
1051 (WTF::RefCountedArray::RefCountedArray):
1053 2013-03-26 James Robinson <jamesr@chromium.org>
1055 Compile fix - OS(WINDOWS), not OS(WIN).
1058 (WTF::getCurrentProcessID):
1060 2013-03-26 James Robinson <jamesr@chromium.org>
1062 Fix compile for OS(WIN) != PLATFORM(WIN)
1063 https://bugs.webkit.org/show_bug.cgi?id=113356
1065 Reviewed by Tim Horton.
1068 (WTF::getCurrentProcessID):
1070 2013-03-23 Filip Pizlo <fpizlo@apple.com>
1072 JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
1073 https://bugs.webkit.org/show_bug.cgi?id=113144
1075 Reviewed by Geoffrey Garen.
1077 I got tired of the fact that getpid(2) is not a syscall on Windows (unless you do
1078 _getpid() I believe), so I wrote a header that abstracts it. I also changed existing
1079 code that uses getpid() to use WTF::getCurrentProcessID().
1081 * GNUmakefile.list.am:
1084 * WTF.vcproj/WTF.vcproj:
1085 * WTF.xcodeproj/project.pbxproj:
1086 * wtf/CMakeLists.txt:
1087 * wtf/MetaAllocator.cpp:
1088 (WTF::MetaAllocator::dumpProfile):
1089 * wtf/ProcessID.h: Added.
1091 (WTF::getCurrentProcessID):
1092 * wtf/text/StringImpl.cpp:
1093 (WTF::StringStats::printStats):
1095 2013-03-25 Kent Tamura <tkent@chromium.org>
1097 Rename ENABLE_INPUT_TYPE_DATETIME
1098 https://bugs.webkit.org/show_bug.cgi?id=113254
1100 Reviewed by Kentaro Hara.
1102 Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
1103 Actually I'd like to remove the code, but we shouldn't remove it yet
1104 because we shipped products with it on some platforms.
1106 * wtf/FeatureDefines.h:
1108 2013-03-25 David Kilzer <ddkilzer@apple.com>
1110 WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
1111 <http://webkit.org/b/113170>
1113 Reviewed by Dan Bernstein.
1115 Fixes the following build failure:
1117 /usr/local/include/wtf/StdLibExtras.h:190:30: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
1118 int pos = (size - 1) >> 1;
1122 * wtf/StdLibExtras.h:
1123 (WTF::binarySearchImpl): Switch type from int to size_t.
1125 2013-03-22 Benjamin Poulain <bpoulain@apple.com>
1127 Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
1128 https://bugs.webkit.org/show_bug.cgi?id=113003
1130 Reviewed by Eric Seidel.
1132 StringHash::equal() and CaseFoldingHash::equal() were both testing for
1133 the nullity of the two input pointers. The catch is: neither traits handle
1134 null pointers, and any client code would have crashed on hash(), before equal()
1136 Consequently, the two branches had a pass rate of zero when called from a HashMap code.
1138 The function is also never inlined because it is too big (the code of equal() for characters
1139 is always inlined, causing the function to be quite big).
1141 This patch introduces two new functions in the StringImpl API: equalNonNull() and
1142 equalIgnoringCaseNonNull(). Those functions are similar to their equal() equivalent
1143 but make the assumtion the input is never null.
1145 The functions are used for StringHash to avoid the useless branches.
1147 * wtf/text/StringHash.h:
1148 (WTF::StringHash::equal):
1149 (WTF::CaseFoldingHash::equal):
1150 * wtf/text/StringImpl.cpp:
1151 (WTF::stringImplContentEqual):
1153 (WTF::equalNonNull):
1154 (WTF::equalIgnoringCase):
1155 (WTF::equalIgnoringCaseNonNull):
1156 (WTF::equalIgnoringNullity):
1157 * wtf/text/StringImpl.h:
1158 (WTF::equalIgnoringCase):
1160 2013-03-22 Benjamin Poulain <bpoulain@apple.com>
1162 Name correctly the argument of StringImpl::setIsAtomic()
1163 https://bugs.webkit.org/show_bug.cgi?id=113000
1165 Reviewed by Geoffrey Garen.
1167 * wtf/text/StringImpl.h:
1168 (WTF::StringImpl::setIsAtomic):
1169 The argument was probably an unfortunate copy-paste from setIsIdentifier().
1172 2013-03-22 Hajime Morrita <morrita@google.com>
1174 Custom Elements: "readyCallback" lifecycle callback should be called.
1175 https://bugs.webkit.org/show_bug.cgi?id=112538
1177 Reviewed by Elliott Sprehn.
1180 (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
1182 2013-03-22 Sheriff Bot <webkit.review.bot@gmail.com>
1184 Unreviewed, rolling out r146534 and r146565.
1185 http://trac.webkit.org/changeset/146534
1186 http://trac.webkit.org/changeset/146565
1187 https://bugs.webkit.org/show_bug.cgi?id=113017
1189 "r146534 caused perf regression on Chromium Linux x64"
1190 (Requested by yurys on #webkit).
1194 (WTF::copyToVector):
1196 2013-03-21 Hajime Morrita <morrita@google.com>
1198 Custom Elements: "readyCallback" lifecycle callback should be called.
1199 https://bugs.webkit.org/show_bug.cgi?id=112538
1201 Reviewed by Elliott Sprehn.
1204 (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
1206 2013-03-21 Mark Lam <mark.lam@apple.com>
1208 Introducing String::findNextLineStart().
1209 https://bugs.webkit.org/show_bug.cgi?id=112957.
1211 Reviewed by Geoffrey Garen.
1213 This is replaces String::reverseFindLineTerminator() in the JSC
1214 debugger's code for computing column numbers.
1216 * wtf/text/StringImpl.cpp:
1217 (WTF::StringImpl::findNextLineStart):
1218 * wtf/text/StringImpl.h:
1219 (WTF::findNextLineStart):
1220 * wtf/text/WTFString.h:
1221 (WTF::String::findNextLineStart):
1223 2013-03-21 Adam Barth <abarth@webkit.org>
1225 HTMLNames should construct strings at compile time
1226 https://bugs.webkit.org/show_bug.cgi?id=112831
1228 Reviewed by Darin Adler.
1230 * wtf/text/StringImpl.h:
1232 (StaticASCIILiteral):
1233 - This struct lets us construct StringImpl objects at compile time.
1234 (WTF::StringImpl::assertHashIsCorrect):
1235 - This function lets us sanity check StringImpl objects created from StaticData.
1236 (WTF::StringImpl::find): Remove a stray ;
1237 (WTF::StringImpl::findIgnoringCase): ditto
1238 (WTF::StringImpl::startsWith): ditto
1239 (WTF::ValueCheck<StringImpl*>):
1240 * wtf/text/AtomicStringImpl.h:
1241 (WTF::ValueCheck<AtomicStringImpl*>):
1243 2013-03-21 Gabor Rapcsanyi <rgabor@webkit.org>
1245 Implement LLInt for CPU(ARM_TRADITIONAL)
1246 https://bugs.webkit.org/show_bug.cgi?id=97589
1248 Reviewed by Zoltan Herczeg.
1250 Enable LLInt for ARMv5 and ARMv7 traditional as well.
1254 2013-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
1256 Unreviewed, rolling out r146419.
1257 http://trac.webkit.org/changeset/146419
1258 https://bugs.webkit.org/show_bug.cgi?id=112870
1260 Broke many tests on debug builds (Requested by rniwa_ on
1263 * wtf/text/StringImpl.h:
1266 2013-03-20 Adam Barth <abarth@webkit.org>
1268 HTMLNames should construct strings at compile time
1269 https://bugs.webkit.org/show_bug.cgi?id=112831
1271 Reviewed by Darin Adler.
1273 * wtf/text/StringImpl.h:
1275 (StaticASCIILiteral):
1276 - This struct lets us construct StringImpl objects at compile time.
1277 (WTF::StringImpl::assertValidHash):
1278 - This function lets us sanity check StringImpl objects created from StaticData.
1280 2013-03-20 Jessie Berlin <jberlin@apple.com>
1282 REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into
1284 https://bugs.webkit.org/show_bug.cgi?id=112833
1286 Reviewed by Darin Adler.
1288 * WTF.xcodeproj/project.pbxproj:
1289 Make sure those three headers are copied with the rest of the WTF headers.
1291 2013-03-20 Mark Rowe <mrowe@apple.com>
1293 FastMalloc scavenge timer specifies an overly narrow leeway value.
1295 Reviewed by Alexey Proskuryakov.
1297 There's no need to allow only 1ms of leeway on a 2s timer.
1299 * wtf/FastMalloc.cpp:
1300 (WTF::TCMalloc_PageHeap::initializeScavenger): Bump the leeway window
1301 to 10% of the scavenge timer.
1303 2013-03-20 JungJik Lee <jungjik.lee@samsung.com>
1305 [EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
1306 https://bugs.webkit.org/show_bug.cgi?id=112114
1308 Reviewed by Kenneth Rohde Christiansen.
1310 The issue is that if the animation starts outside of the area covered by keepRects,
1311 the web process does not create tiles of the animation layer and the layer moves
1312 without having any tiles. In order to fix this issue, CoordinatedLayerHost must call
1313 scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
1314 However EFL port didn't call scheduleLayerFlush periodically for animation.
1315 We can tie scripted animations with synchronization of the layer and that already
1316 has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.
1318 The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html
1320 * wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.
1322 2013-03-20 Mark Lam <mark.lam@apple.com>
1324 Introducing String::reverseFindLineTerminator().
1325 https://bugs.webkit.org/show_bug.cgi?id=112741.
1327 Reviewed by Oliver Hunt.
1329 This is needed by the JSC debugger code for computing column numbers.
1331 * wtf/text/StringImpl.cpp:
1332 (WTF::StringImpl::reverseFindLineTerminator):
1333 * wtf/text/StringImpl.h:
1335 (WTF::reverseFindLineTerminator):
1336 * wtf/text/WTFString.h:
1337 (WTF::String::reverseFindLineTerminator):
1339 2013-03-19 Martin Robinson <mrobinson@igalia.com>
1341 Fix the WTF gyp build for GTK+.
1343 * WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.
1345 2013-03-19 Alberto Garcia <agarcia@igalia.com>
1347 [BlackBerry] Enable USE_SYSTEM_MALLOC by default
1348 https://bugs.webkit.org/show_bug.cgi?id=112365
1350 Reviewed by Benjamin Poulain.
1352 Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
1353 harcoding it in wtf/Platform.h
1357 2013-03-18 Benjamin Poulain <benjamin@webkit.org>
1359 [iOS] Make a UChar string equal() based on the LChar version
1360 https://bugs.webkit.org/show_bug.cgi?id=112495
1362 Reviewed by David Kilzer.
1364 * wtf/text/StringImpl.h:
1366 Create a equal() function for UChar based on the work done for LChar.
1368 On A6, this is a speed up of about 40% for any string of 2 or more characters.
1369 It is slower by 8% on a single UChar comparison.
1371 2013-03-18 Brent Fulgham <bfulgham@webkit.org>
1373 [WinCairo] Get build working under VS2010.
1374 https://bugs.webkit.org/show_bug.cgi?id=112604
1376 Reviewed by Tim Horton.
1378 * WTF.vcxproj/WTF.vcxproj: Add Debug_WinCairo and Release_WinCairo
1379 targets so headers get copied to appropriate build folder.
1380 * WTF.vcxproj/WTFGenerated.vcxproj: Ditto.
1382 2013-03-15 Benjamin Poulain <bpoulain@apple.com>
1384 [iOS] Update StringImpl's equal to have a single version on all supported Apple CPUs
1385 https://bugs.webkit.org/show_bug.cgi?id=112400
1387 Reviewed by Michael Saboff.
1389 * wtf/text/StringImpl.h:
1391 Tweak the code to make it work on older Apple CPUs:
1392 -Use external "ouput" variable instead of the registers R9 and R12. This gets rid
1393 of some register pressure previously imposed on the compiler. (Clang nicely
1394 choose R9 and R12 when needed, following iOS ABI).
1395 -Instead of using "R3" for storing the length / 4, update the length by -4 on
1396 each iteration and work in the negative space for the tail. This frees one register
1397 which is then used for isEqual.
1398 -Get rid of the unconditional branch from the loop. By using subs and working in the
1399 negative space, we can test for the Carry flag to jump back to the next LDR.
1401 2013-03-15 Benjamin Poulain <bpoulain@apple.com>
1403 [iOS] Fix the length pass to memcmp in the fallback versions of String's equal
1404 https://bugs.webkit.org/show_bug.cgi?id=112463
1406 Reviewed by Ryosuke Niwa.
1408 * wtf/text/StringImpl.h:
1409 (WTF::equal): It might be a good idea to compare the full UChar strings...
1411 2013-03-15 Michael Saboff <msaboff@apple.com>
1413 Add runtime check for improper register allocations in DFG
1414 https://bugs.webkit.org/show_bug.cgi?id=112380
1416 Reviewed by Geoffrey Garen.
1418 * wtf/Platform.h: Added new ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION compilation flag to
1419 enable generation of register allocation checking. This is on for debug builds.
1421 2013-03-13 Jessie Berlin <jberlin@apple.com>
1423 Remove svn:executable from a file that isn't supposed to be executable.
1425 Rubber-stamped by Geoff Garen.
1429 2013-03-13 Oliver Hunt <oliver@apple.com>
1431 Simplify Checked<> multiplication
1432 https://bugs.webkit.org/show_bug.cgi?id=112286
1434 Reviewed by James Robinson.
1436 Trying to correctly identify multiplication by zero complicated the
1437 unsigned * unsigned multiply, and still didn't handle all cases correctly.
1438 Now we just do the normal division based approach to overflow detection
1439 leading to much simpler reasoning.
1441 Would be nice if we could have a jo style intrinsic one day.
1443 * wtf/CheckedArithmetic.h:
1445 2013-03-13 Dean Jackson <dino@apple.com>
1447 Unreviewed attempted build fix for Windows. SchedulePair.cpp -> SchedulePairCF.cpp
1449 * WTF.vcproj/WTF.vcproj:
1450 * WTF.vcxproj/WTF.vcxproj:
1451 * WTF.vcxproj/WTF.vcxproj.filters:
1453 2013-03-13 Benjamin Poulain <bpoulain@apple.com>
1455 [iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
1456 https://bugs.webkit.org/show_bug.cgi?id=112202
1458 Reviewed by Gavin Barraclough.
1460 * Source/WTF/wtf/Platform.h:
1461 Make the macro WTF_ARM_ARCH_VERSION valid on any architecture.
1462 * wtf/text/StringImpl.h:
1464 On ARMv7S, the new version is about 11% percent faster than the simple loop.
1465 On ARMv7 classic, memcmp is a little faster than the simple loop on Apple A5.
1467 2013-03-13 James Robinson <jamesr@chromium.org>
1469 SchedulePair.cpp is CF-specific
1470 https://bugs.webkit.org/show_bug.cgi?id=112204
1472 Reviewed by Oliver Hunt.
1474 This renames SchedulePair.cpp SchedulePairCF.cpp, since it depends on CF, and excludes it from chromium's gyp
1478 Add CF to the exclusion filter for the Chromium port.
1480 Add SchedulePairCF.cpp
1481 * WTF.xcodeproj/project.pbxproj:
1482 Update project file to point to new .cpp location
1483 * wtf/SchedulePairCF.cpp: Renamed from Source/WTF/wtf/SchedulePair.cpp.
1485 2013-03-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
1487 Support C++11 features in GCC <4.6
1488 https://bugs.webkit.org/show_bug.cgi?id=111553
1490 Reviewed by Simon Hausmann.
1492 Enable support for rvalue references from gcc 4.3, deleted functions
1493 from gcc 4.4, explicit conversion from gcc 4.5, and strongly typed
1498 2013-03-12 Geoffrey Garen <ggaren@apple.com>
1500 Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
1502 * wtf/SchedulePair.cpp:
1503 * wtf/SchedulePair.h:
1504 (WTF::SchedulePair::SchedulePair): Since linking is failing,
1505 try inlining this function.
1507 2013-03-12 Tim Horton <timothy_horton@apple.com>
1509 Typo in earlier Windows build fix. Unreviewed.
1511 * WTF.vcproj/WTF.vcproj:
1513 2013-03-12 Tim Horton <timothy_horton@apple.com>
1515 Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
1517 * WTF.vcproj/WTF.vcproj:
1518 * WTF.vcxproj/WTF.vcxproj:
1519 * WTF.vcxproj/WTF.vcxproj.filters:
1521 2013-03-12 James Robinson <jamesr@chromium.org>
1523 Build fix for r145592 - update gyp files to refer to new file locations.
1527 2013-03-12 Geoffrey Garen <ggaren@apple.com>
1529 Moved RunLoopTimer and SchedulePair to WTF
1530 https://bugs.webkit.org/show_bug.cgi?id=112171
1532 Reviewed by Oliver Hunt.
1534 This will allow us to use timers in lower level primitives without
1535 duplicating all the code.
1537 * WTF.xcodeproj/project.pbxproj:
1538 * wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
1540 * wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
1541 * wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
1542 * wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
1543 * wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
1544 * wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
1546 * wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.
1548 2013-03-12 Oliver Hunt <oliver@apple.com>
1550 Add more Checked<> tests
1551 https://bugs.webkit.org/show_bug.cgi?id=112190
1553 Reviewed by Geoffrey Garen.
1555 Export the CheckedState enum type
1557 * wtf/CheckedArithmetic.h:
1559 2013-03-12 Oliver Hunt <oliver@apple.com>
1561 Make CheckedArithmetic slightly more sane
1562 https://bugs.webkit.org/show_bug.cgi?id=112178
1564 Reviewed by Geoffrey Garen.
1566 Add an enum type for safeGet rather than using a bool,
1567 and correctly handle unsigned * unsigned, when one value
1570 * wtf/CheckedArithmetic.h:
1577 2013-03-11 Michael Saboff <msaboff@apple.com>
1579 Unreviewed build fix. Rolling out inadvertent setting of DATA_LOG_TO_FILE.
1581 2013-03-11 Oliver Hunt <oliver@apple.com>
1583 Make SegmentedVector Noncopyable
1584 https://bugs.webkit.org/show_bug.cgi?id=112059
1586 Reviewed by Geoffrey Garen.
1588 Copying a SegmentedVector can be extraordinarily expensive, so we beat
1589 it with the Noncopyable stick - that way we can ensure that if anyone
1590 wants an actual copy they know what they're doing.
1592 * wtf/SegmentedVector.h:
1595 2013-03-08 Benjamin Poulain <benjamin@webkit.org>
1597 [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
1598 https://bugs.webkit.org/show_bug.cgi?id=111297
1600 Reviewed by Kenneth Rohde Christiansen.
1602 * wtf/FeatureDefines.h: Add a new feature flag for the view-mode
1603 CSS media: ENABLE_VIEW_MODE_CSS_MEDIA.
1605 2013-03-08 Roger Fong <roger_fong@apple.com>
1609 * WTF.vcxproj/WTF.make:
1611 2013-03-08 Gabor Rapcsanyi <rgabor@webkit.org>
1613 Cache flush problem on ARMv7 JSC
1614 https://bugs.webkit.org/show_bug.cgi?id=111441
1616 Reviewed by Zoltan Herczeg.
1618 Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
1619 The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
1620 Change the cache fulsh mechanism similar to ARM traditinal and revert the
1623 * wtf/OSAllocatorPosix.cpp:
1624 (WTF::OSAllocator::reserveUncommitted):
1625 (WTF::OSAllocator::decommit):
1627 2013-03-07 Andrew Bortz <andrew@abortz.net>
1629 Replace Mersenne Twister random number generator with a simpler one.
1630 https://bugs.webkit.org/show_bug.cgi?id=111533
1632 Reviewed by Adam Barth.
1634 The new generator is only a single line long, but passes all the Diehard
1635 statistical tests and runs ~3x faster than the Mersenne Twister, with a
1636 guaranteed cycle length of 2^64 and only 8 bytes of state.
1638 * wtf/Platform.h: Mersenne Twister defines are no longer needed
1639 * wtf/RandomNumber.cpp:
1640 (WTF::Internal::initializeRandomNumber): State initialization
1641 (WTF::Internal::randomNumber): Actual implementation
1642 (WTF::randomNumber): We don't need to fall back on rand()-based generator anymore,
1643 so this code is greatly simplified.
1644 * wtf/RandomNumber.h:
1645 * wtf/RandomNumberSeed.h:
1646 (WTF::initializeRandomNumberGenerator): This code is no longer needed.
1647 Additionally, the code had an error, since rand() returns 32-bits, so each
1648 initializationBuffer's upper 16-bits has more bits set than random.
1650 2013-03-06 Adenilson Cavalcanti <cavalcantii@gmail.com>
1652 Build fix: PageAllocationAligned no longer has executable flag
1653 https://bugs.webkit.org/show_bug.cgi?id=111659
1655 Reviewed by Kentaro Hara.
1657 Build fix: use false as parameter to execution flag.
1659 * wtf/PageAllocationAligned.cpp:
1660 (WTF::PageAllocationAligned::allocate):
1662 2013-03-06 Eric Seidel <eric@webkit.org>
1664 AtomicStringImpls are not safe to send between threads
1665 https://bugs.webkit.org/show_bug.cgi?id=111652
1667 Reviewed by Benjamin Poulain.
1669 We don't have this problem yet, but it's good to be safe.
1671 * wtf/text/WTFString.cpp:
1672 (WTF::String::isSafeToSendToAnotherThread):
1674 2013-03-06 Oliver Hunt <oliver@apple.com>
1676 Don't give PageAllocationAligned the option to allocate executable memory
1677 https://bugs.webkit.org/show_bug.cgi?id=111657
1679 Reviewed by Geoffrey Garen.
1681 * wtf/PageAllocationAligned.cpp:
1682 (WTF::PageAllocationAligned::allocate):
1683 * wtf/PageAllocationAligned.h:
1684 (PageAllocationAligned):
1686 2013-03-04 Jer Noble <jer.noble@apple.com>
1688 Default mouse cursor behavior should be auto-hide for full screen video with custom controls
1689 https://bugs.webkit.org/show_bug.cgi?id=107601
1691 Reviewed by Beth Dakin.
1693 Enable the CURSOR_VISIBILITY feature.
1695 * wtf/FeatureDefines.h:
1697 2013-03-04 Oliver Hunt <oliver@apple.com>
1699 Make fastmalloc use guardpages
1700 https://bugs.webkit.org/show_bug.cgi?id=111353
1702 Reviewed by Anders Carlsson.
1704 Add PROT_NONE pages at the beginning and end of every
1705 mmap call made by fastmalloc.
1707 * wtf/TCSystemAlloc.cpp:
1710 2013-03-06 Paweł Forysiuk <tuxator@o2.pl>
1712 Typo in inline function in ByteOrder.h
1713 https://bugs.webkit.org/show_bug.cgi?id=111473
1715 Reviewed by Benjamin Poulain.
1720 2013-03-05 Ryuan Choi <ryuan.choi@samsung.com>
1722 [EFL] Build break with latest EFL libraries
1723 https://bugs.webkit.org/show_bug.cgi?id=111028
1725 Reviewed by Dirk Pranke.
1727 * wtf/PlatformEfl.cmake: Added ECORE_IMF_INCLUDE_DIRS.
1729 2013-03-05 Csaba Osztrogonác <ossy@webkit.org>
1731 Fix cast-align warning in ASCIIFastPath.h on ARM
1732 https://bugs.webkit.org/show_bug.cgi?id=111436
1734 Reviewed by Benjamin Poulain.
1736 * wtf/text/ASCIIFastPath.h:
1737 (WTF::charactersAreAllASCII):
1739 2013-03-04 Laszlo Gombos <l.gombos@samsung.com>
1741 JSC_OBJC_API_ENABLED should be removed from FeatureDefines.h
1742 https://bugs.webkit.org/show_bug.cgi?id=111269
1744 Reviewed by Mark Hahnenberg.
1746 JSC_OBJC_API_ENABLED flag was added to FeatureDefines.h (r143637)
1747 so that it could be used in WebCore.exp.in to determine whether
1748 or not we should be exporting certain symbols based on whether
1749 the WebKit-related portion of the JSC ObjC API was enabled.
1751 It turned out conditionally including certain symbols didn't
1752 work when building fat binaries, so it's not even necessary any more.
1754 * wtf/FeatureDefines.h: Remove JSC_OBJC_API_ENABLED.
1756 2013-03-04 Andreas Kling <akling@apple.com>
1758 Deque: Free internal buffer in clear().
1759 <http://webkit.org/b/111316>
1760 <rdar://problem/13336675>
1762 Reviewed by Antti Koivisto.
1764 525 kB progression on Membuster3.
1769 2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
1771 Add build flag for FontLoader
1772 https://bugs.webkit.org/show_bug.cgi?id=111289
1774 Reviewed by Benjamin Poulain.
1776 Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
1778 * wtf/FeatureDefines.h:
1780 2013-02-27 Darin Adler <darin@apple.com>
1782 StringHasher functions require alignment that call sites do not all guarantee
1783 https://bugs.webkit.org/show_bug.cgi?id=110171
1785 Reviewed by Benjamin Poulain.
1787 The StringHasher class is optimized for clients who pass it two characters at
1788 a time. However, the function named addCharacters did not make this clear to
1789 clients, and one calculateStringHashAndLengthFromUTF8MaskingTop8Bits got it wrong.
1790 Fix by making addCharacters work regardless of hasher alignment and adding a new
1791 function, addCharactersAssumingAligned, for use when we want a faster path and can
1792 guarantee we are adding characters two at a time.
1794 * wtf/StringHasher.h:
1795 (WTF::StringHasher::addCharactersAssumingAligned): Renamed the addCharacters function
1796 addCharactersAssumingAligned, since it only works if the hasher is currently aligned,
1797 meaning it contains an even number of characters. The function already asserts
1798 that this is true, but the calculateStringHashAndLengthFromUTF8MaskingTop8Bits
1799 function was using it in cases where the assertion could fire. Also updated to
1800 call addCharactersInternal by its new name. Also added some new overloads that take
1801 data pointers and lengths so callers can always use addCharactersAssumingAligned
1802 instead of addCharacters if they know the hasher is aligned.
1803 (WTF::StringHasher::addCharacter): Updated to call the public
1804 addCharactersAssumingAligned function since that's simpler and a bit cleaner.
1805 (WTF::StringHasher::addCharacters): Added functions with this name that handle
1806 the case where the hasher is not aligned. These will be called by existing call sites
1807 that were formerly using the function named addCharactersAssumingAligned above.
1808 Also add an overload that works with the default converter automatically.
1809 (WTF::StringHasher::computeHashAndMaskTop8Bits): Changed to call
1810 addCharactersAssumingAligned to eliminate copied and pasted code. The hasher is empty,
1811 so definitely aligned.
1812 (WTF::StringHasher::computeHash): Ditto.
1813 (WTF::StringHasher::addCharactersInternal): Renamed from addCharactersToHash, since
1814 the former name did not make clear how this differs from the public functions.
1815 The real difference is that this is like addCharactersAssumingAligned, but without
1816 the assertion, so addCharactersAssumingAligned is called instead, even within the
1817 class's implementation.
1819 2013-03-01 Ilya Tikhonovsky <loislo@chromium.org>
1821 Web Inspector: Native Memory Instrumentation: do not visit raw pointers by default.
1822 https://bugs.webkit.org/show_bug.cgi?id=110943
1824 Reviewed by Yury Semikhatsky.
1826 Unfortunately in many cases raw pointer may point to an object that has been deleted.
1827 There is no working solution to solve this problem in general.
1828 It could be solved only on case by case basis.
1830 * wtf/MemoryInstrumentation.h:
1831 (WTF::MemoryInstrumentation::addObject):
1832 (WTF::MemoryInstrumentation::MemberTypeTraits::addObject):
1833 (WTF::MemoryClassInfo::addMember):
1834 (WTF::MemoryInstrumentation::addObjectImpl):
1835 * wtf/MemoryInstrumentationString.h:
1836 (WTF::reportMemoryUsage):
1838 2013-03-01 Eric Seidel <eric@webkit.org>
1840 Threaded HTML Parser has an extra copy of every byte from the network
1841 https://bugs.webkit.org/show_bug.cgi?id=111135
1843 Reviewed by Adam Barth.
1845 The threaded html parser needs to accept ownership
1846 of a string buffer. The easiest way to do this seemed
1847 to be to use a PassRefPtr<StringImpl>, but there was no way
1848 to generated one from a String (easily), so I added one.
1850 * wtf/text/WTFString.h:
1851 (WTF::String::releaseImpl):
1853 2013-02-28 Oliver Hunt <oliver@apple.com>
1855 Crash in JSC::MarkedBlock::FreeList JSC::MarkedBlock::sweepHelper
1856 https://bugs.webkit.org/show_bug.cgi?id=111059
1858 Reviewed by Ryosuke Niwa.
1860 Sometimes C++'s implicit operator conversion rules suck.
1861 Add explicit operator== and !=.
1863 * wtf/FastMalloc.cpp:
1864 (WTF::HardenedSLL::operator!=):
1865 (WTF::HardenedSLL::operator==):
1868 2013-02-28 Zeno Albisser <zeno@webkit.org>
1870 Enable DFG JIT for Qt on Mac
1871 https://bugs.webkit.org/show_bug.cgi?id=111095
1873 Rubber-stamped by Simon Hausmann
1877 2013-02-28 Eric Carlson <eric.carlson@apple.com>
1879 [Mac] use HAVE() macro instead of version check
1880 https://bugs.webkit.org/show_bug.cgi?id=111087
1882 Reviewed by Dean Jackson.
1884 * wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.
1886 2013-02-27 Balazs Kilvady <kilvadyb@homejinni.com>
1888 Bug in atomicIncrement implementation for MIPS GCC
1889 https://bugs.webkit.org/show_bug.cgi?id=110969
1891 Reviewed by Csaba Osztrogonác.
1893 Fix of __sync_[add|sub]_and_fetch_8 for GCC patch.
1897 2013-02-27 Simon Hausmann <simon.hausmann@digia.com>
1899 REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
1900 https://bugs.webkit.org/show_bug.cgi?id=108632
1902 Reviewed by Csaba Osztrogonác.
1904 It appears that mprotect() is very slow on ARM/Linux, so disable the
1905 approach of unreserved mappings there and fall back to overcomitting
1906 memory, based on Uli Schlachter's recommendation.
1908 * wtf/OSAllocatorPosix.cpp:
1909 (WTF::OSAllocator::reserveUncommitted):
1910 (WTF::OSAllocator::decommit):
1912 2013-02-26 Roger Fong <roger_fong@apple.com>
1914 Unreviewed. Build fix for VS2010 solution, take 2.
1916 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
1918 2013-02-26 Roger Fong <roger_fong@apple.com>
1920 Unreviewed. Unreviewed build fix for VS2010 solution.
1922 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
1924 2013-02-26 Balazs Kilvady <kilvadyb@homejinni.com>
1926 Fix the atomicIncrement implementation for MIPS GCC
1927 https://bugs.webkit.org/show_bug.cgi?id=106739
1929 Reviewed by Oliver Hunt.
1931 Implementation of missing __sync_[add|sub]_and_fetch_8 functions.
1933 Some architectures, like MIPS32, don't have GCC implementation for
1934 builtin __sync_* functions with 64 bits variable size. GCC answer
1935 for the problem: If a target doesn't support atomic operations on
1936 certain variable sizes, you are out of luck with atomicity in that
1937 case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
1938 will support __atomic_* builtin functions for this purpose for all
1939 the GCC targets, but for current compilers we have to include our
1942 * GNUmakefile.list.am:
1944 * wtf/Atomics.cpp: Added.
1948 * wtf/CMakeLists.txt:
1950 2013-02-26 Oliver Hunt <oliver@apple.com>
1952 Appease the QT bots.
1954 * wtf/FastMalloc.cpp:
1956 2013-02-26 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
1958 Implement JIT on Windows 64 bits
1959 https://bugs.webkit.org/show_bug.cgi?id=107965
1961 Reviewed by Simon Hausmann.
1965 2013-02-26 Oliver Hunt <oliver@apple.com>
1967 Appease static analyzer warning about null string passed to strlen
1968 https://bugs.webkit.org/show_bug.cgi?id=110658
1970 Reviewed by Benjamin Poulain.
1972 Add a null check before calling strlen
1974 * wtf/Threading.cpp:
1975 (WTF::createThread):
1977 2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
1979 Build fix attempt after r143996.
1981 * wtf/FastMalloc.cpp:
1984 2013-02-25 Roger Fong <roger_fong@apple.com>
1986 Unreviewed. Fix script to use WEBKIT_SOURCE for VS2010 property sheets instead of WEBKIT_LIBRARIES.
1988 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
1990 2013-02-25 Oliver Hunt <oliver@apple.com>
1992 Add cookies to FastMalloc spans
1993 https://bugs.webkit.org/show_bug.cgi?id=110827
1995 Reviewed by Michael Saboff.
1997 Add a cookie to spans, and move some of the hardening around so
1998 that it's more useful.
2000 * wtf/FastMalloc.cpp:
2001 (WTF::internalEntropyValue):
2002 (WTF::spanInitializerCookie):
2003 (WTF::Span::initCookie):
2004 (WTF::Span::clearCookie):
2005 (WTF::Span::isValid):
2009 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2010 (WTF::TCMalloc_Central_FreeList::Populate):
2011 (WTF::TCMalloc_ThreadCache::Deallocate):
2012 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2014 2013-02-25 Jer Noble <jer.noble@apple.com>
2016 Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
2017 https://bugs.webkit.org/show_bug.cgi?id=110806
2019 Reviewed by Alexey Proskuryakov.
2021 Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
2023 * wtf/FeatureDefines.h:
2025 2013-02-23 Ilya Tikhonovsky <loislo@chromium.org>
2027 Web Inspector: Native Memory Instrumentation: replace String with const char* in MemoryObjectInfo
2028 https://bugs.webkit.org/show_bug.cgi?id=110599
2030 Reviewed by Yury Semikhatsky.
2032 Due to potentially dynamic nature of names and classNames we need to make a copy of the strings
2033 that were given us via MemoryInstrumentation calls.
2034 So I extended client api with registerString method that pushes the strings
2035 down to the serializer.
2037 * wtf/MemoryInstrumentation.h:
2038 (MemoryInstrumentationClient):
2039 * wtf/MemoryObjectInfo.h:
2040 (WTF::MemoryObjectInfo::MemoryObjectInfo):
2041 (WTF::MemoryObjectInfo::setClassName):
2042 (WTF::MemoryObjectInfo::classNameId):
2043 (WTF::MemoryObjectInfo::setName):
2044 (WTF::MemoryObjectInfo::nameId):
2047 2013-02-21 Brady Eidson <beidson@apple.com>
2049 Move fastlog2() to WTF/MathExtras.h so it can be used from multiple projects.
2051 Rubberstamped by Geoff Garen.
2056 2013-02-21 Andy Estes <aestes@apple.com>
2058 TriState.h should be a Project header
2059 https://bugs.webkit.org/show_bug.cgi?id=110543
2061 Rubber-stamped by Dan Bernstein.
2063 WTF uses a script to copy headers to the build destination, so it isn't
2064 necessary to mark headers as Private/Public (and doing so can be problematic).
2066 * WTF.xcodeproj/project.pbxproj: Mark TriState.h as a Project header.
2068 2013-02-21 Roger Fong <roger_fong@apple.com>
2070 Unreviewed. Add executable property to cmd file.
2071 Required for executable files to maintain their executable permissions over svn.
2073 * WTF.vcxproj/copy-files.cmd: Added property svn:executable.
2075 2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
2077 Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
2078 https://bugs.webkit.org/show_bug.cgi?id=106059
2080 Reviewed by Geoffrey Garen.
2082 * wtf/FeatureDefines.h: Added enable flag for JSC Objective-C API so it can be used in
2085 2013-02-21 Martin Robinson <mrobinson@igalia.com>
2087 A couple more 'make dist' fixes for WebKitGTK+.
2089 * GNUmakefile.list.am: Add a missing file to the source list.
2091 2013-02-20 Roger Fong <roger_fong@apple.com>
2093 Get VS2010 Solution B&I ready.
2094 <rdar://problem/1322988>
2096 Rubberstamped by Timothy Horton.
2098 Add Production configuration.
2099 Add a WTF submit solution with a DebugSuffix configuration.
2100 Modify WTF.make as necessary.
2102 * WTF.vcxproj: Added property svn:eol-style. Modified property svn:ignore.
2103 * WTF.vcxproj/WTF.make: Added.
2104 * WTF.vcxproj/WTF.submit.sln: Added.
2105 * WTF.vcxproj/WTF.vcxproj:
2106 * WTF.vcxproj/WTFCommon.props:
2107 * WTF.vcxproj/WTFGenerated.vcxproj:
2108 * WTF.vcxproj/WTFGeneratedProduction.props: Added.
2109 * WTF.vcxproj/WTFGeneratedRelease.props:
2110 * WTF.vcxproj/WTFProduction.props: Added.
2111 * WTF.vcxproj/WTFRelease.props:
2112 * WTF.vcxproj/copy-files.cmd:
2114 2013-02-20 Oliver Hunt <oliver@apple.com>
2117 https://bugs.webkit.org/show_bug.cgi?id=110275
2119 Reviewed by Mark Hahnenberg.
2121 We now poison objects when they get freed, and verify that
2122 any object that is being freed is not poisoned. If the
2123 object looks like it's poisoned we validate the freelist,
2124 and ensure the object is not already present. If it is
2127 On allocation, we ensure that the object being allocated
2128 is poisoned, then clear the poisoning fields.
2130 * wtf/FastMalloc.cpp:
2131 (WTF::internalEntropyValue):
2133 (WTF::freedObjectStartPoison):
2134 (WTF::freedObjectEndPoison):
2135 (TCMalloc_ThreadCache_FreeList):
2136 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2137 (WTF::TCMalloc_Central_FreeList::Populate):
2138 (WTF::TCMalloc_ThreadCache::Allocate):
2139 (WTF::TCMalloc_ThreadCache::Deallocate):
2140 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2142 2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
2144 Unreviewed, rolling out r143400.
2145 http://trac.webkit.org/changeset/143400
2146 https://bugs.webkit.org/show_bug.cgi?id=110290
2148 breaks everything (instacrash launching Safari) (Requested by
2149 thorton on #webkit).
2151 * wtf/FastMalloc.cpp:
2152 (WTF::internalEntropyValue):
2154 (WTF::TCMalloc_Central_FreeList::Populate):
2155 (WTF::TCMalloc_ThreadCache::Allocate):
2156 (WTF::TCMalloc_ThreadCache::Deallocate):
2158 2013-02-19 Oliver Hunt <oliver@apple.com>
2161 https://bugs.webkit.org/show_bug.cgi?id=110275
2163 Reviewed by Anders Carlsson.
2165 We now poison objects when they get freed, and verify that
2166 any object that is being freed is not poisoned. If the
2167 object looks like it's poisoned we validate the freelist,
2168 and ensure the object is not already present. If it is
2171 On allocation, we ensure that the object being allocated
2172 is poisoned, then clear the poisoning fields.
2174 * wtf/FastMalloc.cpp:
2175 (WTF::internalEntropyValue):
2177 (WTF::freedObjectStartPoison):
2178 (WTF::freedObjectEndPoison):
2179 (TCMalloc_ThreadCache_FreeList):
2180 (WTF::TCMalloc_ThreadCache_FreeList::Validate):
2181 (WTF::TCMalloc_Central_FreeList::Populate):
2182 (WTF::TCMalloc_ThreadCache::Allocate):
2183 (WTF::TCMalloc_ThreadCache::Deallocate):
2185 2013-02-18 Darin Adler <darin@apple.com>
2187 Style tweaks to StringHasher.h
2188 https://bugs.webkit.org/show_bug.cgi?id=110042
2190 Reviewed by Alexey Proskuryakov.
2192 I have a bug fix coming soon, but figured I'd separate out style tweaks and land them
2193 first to make that patch easier to undrestand.
2195 * wtf/StringHasher.h: Tweak and rearrange comments a bit.
2196 (WTF::StringHasher::addCharacter): Use character instead of ch.
2197 (WTF::StringHasher::addCharacters): Use remainder instead of rem. Also capitalize the U
2198 that we use to make an unsigned 1 constant.
2199 (WTF::StringHasher::computeHashAndMaskTop8Bits): Ditto.
2200 (WTF::StringHasher::hashMemory): Change version that takes size as a template argument
2201 to call the version that takes the size at runtime, since both generate the same code
2202 anyway. Added a FIXME questioning why this function uses the "mask top 8 bits" version
2203 of the hash. Fix incorrect compile assertion that required sizes that are multiples
2204 of four. This function works on sizes that are multiples of two. Also fixed a spelling
2205 error where we called it a "multible".
2206 (WTF::StringHasher::defaultConverter): Use character instead of ch.
2207 (WTF::StringHasher::addCharactersToHash): Eliminated unnecessary local variable.
2209 2013-02-18 Alexey Proskuryakov <ap@apple.com>
2211 Make HexNumber functions return 8-bit strings
2212 https://bugs.webkit.org/show_bug.cgi?id=110152
2214 Reviewed by Michael Saboff.
2218 (WTF::Internal::hexDigitsForMode):
2219 (WTF::appendByteAsHex):
2220 (WTF::placeByteAsHexCompressIfPossible):
2221 (WTF::placeByteAsHex):
2222 (WTF::appendUnsignedAsHex):
2223 (WTF::appendUnsignedAsHexFixedSize):
2224 Use LChar everywhere.
2226 2013-02-18 Benjamin Poulain <bpoulain@apple.com>
2228 Remove Vector::dataSlot(), it has no implementation
2229 https://bugs.webkit.org/show_bug.cgi?id=109999
2231 Reviewed by Andreas Kling.
2233 VectorBufferBase does not implement any function bufferSlot().
2234 The file only compiles because that part of the template is never
2239 2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
2241 Move ENABLE macros for WebCore out from Platform.h
2242 https://bugs.webkit.org/show_bug.cgi?id=105735
2244 Unreviewed, build fix when NETSCAPE_PLUGIN_API is disabled.
2246 Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH even if
2247 NETSCAPE_PLUGIN_API is disabled (Qt, Efl, GTK, WX ports).
2249 * wtf/FeatureDefines.h:
2251 2013-02-18 Balazs Kilvady <kilvadyb@homejinni.com>
2253 MIPS DFG implementation.
2254 https://bugs.webkit.org/show_bug.cgi?id=101328
2256 Reviewed by Oliver Hunt.
2258 DFG implementation for MIPS.
2262 2013-02-18 Zan Dobersek <zdobersek@igalia.com>
2264 Stop placing std::isfinite and std::signbit inside the global scope
2265 https://bugs.webkit.org/show_bug.cgi?id=109817
2267 Reviewed by Darin Adler.
2269 Prefix calls to the isfinite and signbit methods with std:: as the two
2270 methods are no longer being imported into the global scope.
2272 On Solaris and OpenBSD platforms or when using Visual C++ the two methods
2273 are now defined (as incompatibility workarounds) inside the std namespace.
2277 * wtf/DecimalNumber.h:
2278 (WTF::DecimalNumber::DecimalNumber):
2286 * wtf/MediaTime.cpp:
2287 (WTF::MediaTime::createWithFloat):
2288 (WTF::MediaTime::createWithDouble):
2292 2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
2294 Move ENABLE macros for WebCore out from Platform.h
2295 https://bugs.webkit.org/show_bug.cgi?id=105735
2297 Reviewed by Darin Adler and Benjamin Poulain.
2299 Introduce FeatureDefines.h by combining the existing rules from
2300 Platform.h and adding new rules for all the ENABLE flags that are
2301 listed in the FeatureFlags wiki.
2303 The new rules are not used at the moment by any ports
2304 as the port specific build systems already define these flags
2305 so the !defined() guard will prevent redefinition of the macros.
2307 * GNUmakefile.list.am: Add FeatureDefines.h.
2310 * WTF.vcproj/WTF.vcproj: Ditto.
2311 * WTF.xcodeproj/project.pbxproj: Ditto.
2312 * wtf/CMakeLists.txt: Ditto.
2313 * wtf/FeatureDefines.h: Added.
2314 * wtf/Platform.h: Move macro definitions to FeatureDefines.h.
2316 2013-02-16 Darin Adler <darin@apple.com>
2318 Remove redundant use of inline keyword in StringHasher.h
2319 https://bugs.webkit.org/show_bug.cgi?id=110036
2321 Reviewed by Geoffrey Garen.
2323 I have some other improvements for StringHasher.h, but wanted to get the simplest ones
2324 out of the way first.
2326 * wtf/StringHasher.h: Remove inline keyword on functions inside the class definition,
2327 since functions defined inside the class are automatically inline.
2329 2013-02-15 Martin Robinson <mrobinson@igalia.com>
2331 [GTK] Spread the gyp build files throughout the tree
2332 https://bugs.webkit.org/show_bug.cgi?id=109960
2334 Reviewed by Dirk Pranke.
2336 * WTF.gyp/WTFGTK.gyp: Renamed from Source/WebKit/gtk/gyp/WTF.gyp.
2338 2013-02-15 Anders Carlsson <andersca@apple.com>
2340 Add HashMap::isValidKey and HashSet::isValidValue
2341 https://bugs.webkit.org/show_bug.cgi?id=109977
2343 Reviewed by Sam Weinig and Darin Adler.
2345 Add helper functions for determining whether keys are valid, i.e. if
2346 they are _not_ empty or deleted according to the hash traits.
2351 2013-02-15 Laszlo Gombos <l.gombos@samsung.com>
2353 Remove support for RVCT version less than 4.0
2354 https://bugs.webkit.org/show_bug.cgi?id=109390
2356 The 4.0 version of the RVCT compiler was
2359 Remove support for version older then 4.0 of RVCT,
2360 and keep the support for newer RVCT versions.
2362 Reviewed by Zoltan Herczeg.
2364 * WTF.gypi: Remove StringExtras.cpp.
2365 * WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
2366 * WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
2367 * WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
2368 * WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
2369 * wtf/CMakeLists.txt: Remove StringExtras.cpp.
2370 * wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
2371 * wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
2372 * wtf/Float64Array.h: Ditto.
2373 * wtf/Int16Array.h: Ditto.
2374 * wtf/Int32Array.h: Ditto.
2375 * wtf/Int8Array.h: Ditto.
2376 * wtf/MathExtras.h: Remove a quirk needed for RVCT version <= 3.0.
2377 * wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
2378 * wtf/StringExtras.cpp: Removed.
2379 * wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
2380 * wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
2381 * wtf/Uint32Array.h: Ditto.
2382 * wtf/Uint8Array.h: Ditto.
2383 * wtf/Uint8ClampedArray.h: Ditto.
2385 2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
2387 Add CString operators for comparison with const char*
2388 https://bugs.webkit.org/show_bug.cgi?id=109947
2390 Reviewed by Darin Adler.
2392 Add operators to WTF::CString for equality/inequality comparison
2393 with const char* strings. This avoids constructing a CString
2394 from a const char* in such cases, which is can be expensive as
2395 it would copy it and call strlen().
2397 * wtf/text/CString.cpp:
2398 (WTF::operator==): Use memcmp instead of strncmp to compare the
2399 CString buffers as we know they are the same size and we don't
2400 want to scan for terminating null byte.
2402 * wtf/text/CString.h:
2406 2013-02-15 Geoffrey Garen <ggaren@apple.com>
2408 Merged the global function cache into the source code cache
2409 https://bugs.webkit.org/show_bug.cgi?id=108660
2411 Reviewed by Sam Weinig.
2413 Responding to review comments by Darin Adler.
2415 * wtf/HashTraits.h: Added a using directive to simplify client code.
2417 2013-02-14 Dan Bernstein <mitz@apple.com>
2419 No easy way to use a RetainPtr as a key in a HashMap using object (rather than pointer) equality
2420 https://bugs.webkit.org/show_bug.cgi?id=109864
2422 Reviewed by Sam Weinig and Benjamin Poulain.
2424 Added RetainPtrObjectHashTraits and RetainPtrObjectHash, which use CFEqual
2428 (RetainPtrObjectHashTraits):
2429 (WTF::RetainPtrObjectHashTraits::emptyValue):
2430 (WTF::RetainPtrObjectHashTraits::constructDeletedValue):
2431 (WTF::RetainPtrObjectHashTraits::isDeletedValue):
2433 (WTF::RetainPtrObjectHash::hash):
2434 (WTF::RetainPtrObjectHash::equal):
2435 (RetainPtrObjectHash):
2437 2013-02-14 Tony Chang <tony@chromium.org>
2439 Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
2440 https://bugs.webkit.org/show_bug.cgi?id=96934
2442 * WTF.vcproj/WTF.sln: Modified property svn:eol-style.
2444 2013-02-14 Tony Chang <tony@chromium.org>
2446 Unreviewed, set svn:eol-style CRLF for .sln files.
2448 * WTF.vcproj/WTF.sln: Added property svn:eol-style.
2450 2013-02-14 David Kilzer <ddkilzer@apple.com>
2452 [Mac] Clean up WARNING_CFLAGS
2453 <http://webkit.org/b/109747>
2454 <rdar://problem/13208373>
2456 Reviewed by Mark Rowe.
2458 * Configurations/Base.xcconfig: Use
2459 GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
2460 -Wshorten-64-to-32 rather than WARNING_CFLAGS.
2462 * WTF.vcproj/WTF.sln: Added property svn:eol-style.
2464 2013-02-14 Eric Seidel <eric@webkit.org>
2466 String(Vector) behaves differently from String(vector.data(), vector.size()) for vectors with inline capacity in the size=0 case
2467 https://bugs.webkit.org/show_bug.cgi?id=109784
2469 Reviewed by Darin Adler.
2471 This makes String(Vector) never return null strings.
2472 Which matches behavior of String(UChar*, size_t)
2473 for vectors with inlineCapacity, but differs from
2474 String(UChar*, size_t) in the no-inlineCapacity case.
2476 This incidentally will fix a behavioral regression
2477 in the html threaded parser which came from converting
2478 many String(UChar*, size_t) callsites to using String(Vector).
2480 * wtf/text/WTFString.h:
2482 (WTF::String::String):
2484 2013-02-14 Eric Seidel <eric@webkit.org>
2486 REGRESSION(r142712): attribute values show up as "(null)" instead of null with the threaded parser
2487 https://bugs.webkit.org/show_bug.cgi?id=109784
2489 Reviewed by Benjamin Poulain.
2491 When I changed many callsites to use the (existing) String(Vector) constructor
2492 I inadvertantly made those callsites convert empty vectors to null strings
2493 instead of empty strings (like String(UChar,size_t) does).
2495 This is due to an oddity/bug in our Vector implementation where data()
2496 will be 0 if the Vector is empty, but only if it doesn't have inline capacity.
2497 https://bugs.webkit.org/show_bug.cgi?id=109792
2499 This changes String(Vector) to exactly match the behavior of String(vector.data(), vector.size()).
2501 This regression was easily detectable with the threaded parser, because we use String
2502 instead of AtomicString in our CompactToken (used to send the Token data
2503 between threads). The main-thread parser path uses AtomicHTMLToken which
2504 uses AtomicString(Vector) and does not have this bug.
2506 * wtf/text/WTFString.h:
2508 (WTF::String::String):
2510 2013-02-13 Zan Dobersek <zdobersek@igalia.com>
2512 The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2513 https://bugs.webkit.org/show_bug.cgi?id=109325
2515 Reviewed by Anders Carlsson.
2517 Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2518 two methods as they're provided by the C++ standard library being used.
2520 * wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
2521 * wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
2522 when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
2523 (WTF::parseDateFromNullTerminatedCharacters):
2524 * wtf/IntegralTypedArrayBase.h:
2525 (WTF::IntegralTypedArrayBase::set):
2532 * wtf/MediaTime.cpp:
2533 (WTF::MediaTime::createWithFloat):
2534 (WTF::MediaTime::createWithDouble):
2535 * wtf/Uint8ClampedArray.h:
2536 (WTF::Uint8ClampedArray::set):
2538 2013-02-13 Eric Seidel <eric@webkit.org>
2540 Don't copy Vector<UChar> when passing to new String methods from bug 109617
2541 https://bugs.webkit.org/show_bug.cgi?id=109708
2543 Reviewed by Tony Gentilcore.
2545 Thanks for the catch Darin.
2547 * wtf/text/AtomicString.h:
2548 (WTF::AtomicString::AtomicString):
2549 * wtf/text/StringImpl.h:
2550 (WTF::StringImpl::create8BitIfPossible):
2552 2013-02-13 Martin Robinson <mrobinson@igalia.com>
2554 [GTK] Remove remaining dead code from the GLib unicode backend
2555 https://bugs.webkit.org/show_bug.cgi?id=109707
2557 Reviewed by Philippe Normand.
2559 * wtf/unicode/Unicode.h:
2561 2013-02-13 Andrew Wilson <atwilson@chromium.org>
2563 Unreviewed Chromium gyp-file cleanup after glib backend removal.
2564 https://bugs.webkit.org/show_bug.cgi?id=109672
2566 Removed references to GLib unicode backend:
2571 2013-02-12 Martin Robinson <mrobinson@igalia.com>
2573 [GTK] Remove the GLib unicode backend
2574 https://bugs.webkit.org/show_bug.cgi?id=109627
2576 Reviewed by Benjamin Poulain.
2578 Remove references to the GLib unicode backend from WTF.
2580 * GNUmakefile.list.am: Remove GLib unicode files from the source list.
2581 * wtf/unicode/glib/UnicodeGLib.cpp: Removed.
2582 * wtf/unicode/glib/UnicodeGLib.h: Removed.
2584 2013-02-12 Takeshi Yoshino <tyoshino@google.com>
2586 Remove unnecessary and confusing includes from StreamBuffer.h.
2587 https://bugs.webkit.org/show_bug.cgi?id=109652
2589 Reviewed by Benjamin Poulain.
2591 StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
2592 FixedArray.h and PassOwnPtr.h are included but not used.
2594 VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
2595 So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
2598 * wtf/StreamBuffer.h:
2600 2013-02-12 Eric Seidel <eric@webkit.org>
2602 Teach more WTF string classes about vectors with inline capacity
2603 https://bugs.webkit.org/show_bug.cgi?id=109617
2605 Reviewed by Benjamin Poulain.
2607 The HTML and WebVTT parsers use constructions like:
2608 AtomicString name(m_name.data(), m_name.size())
2609 all over the place because they use inline capacity
2610 on the parse vectors for performance.
2612 This change just add the necessary template variants
2613 to the related String constructors/methods in WTF so that
2614 this parser code can just pass the vector directly instead.
2616 I'll do the actual parser cleanups in follow-up patches to keep things simple.
2618 * wtf/text/AtomicString.h:
2620 (WTF::AtomicString::AtomicString):
2621 * wtf/text/StringImpl.h:
2623 (WTF::StringImpl::create8BitIfPossible):
2624 * wtf/text/WTFString.h:
2626 (WTF::String::make8BitFrom16BitSource):
2630 2013-02-11 Oliver Hunt <oliver@apple.com>
2634 * wtf/FastMalloc.cpp:
2635 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
2637 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
2639 Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
2640 https://bugs.webkit.org/show_bug.cgi?id=109534
2642 Reviewed by Anders Carlsson.
2646 2013-02-11 David Kilzer <ddkilzer@apple.com>
2648 [iOS] Upstream changes to Platform.h
2649 <http://webkit.org/b/109459>
2651 Reviewed by Benjamin Poulain.
2654 - Changes for armv7s.
2655 - Add ENABLE() definitions for DASHBOARD_SUPPORT and WEBGL.
2656 - Re-sort ENABLE() and USE() macros.
2657 - Remove ENABLE() macros for JIT, LLINT and YARR_JIT to enable
2658 on iOS Simulator. They are already defined below.
2659 - Turn off HAVE(HOSTED_CORE_ANIMATION) for iOS.
2660 - Turn on USE(COREMEDIA) for iOS 6.0 and later.
2662 2013-02-08 Oliver Hunt <oliver@apple.com>
2664 Harden FastMalloc (again)
2665 https://bugs.webkit.org/show_bug.cgi?id=109334
2667 Reviewed by Mark Hahnenberg.
2669 Re-implement hardening of linked lists in TCMalloc.
2671 In order to keep heap introspection working, we need to thread the
2672 heap entropy manually as the introspection process can't use the
2673 address of a global in determining the mask. Given we now have to
2674 thread a value through anyway, I've stopped relying on ASLR for entropy
2675 and am simply using arc4random() on darwin, and time + ASLR everywhere
2678 I've also made an explicit struct type for the FastMalloc singly linked
2679 lists, as it seemed like the only way to reliably distinguish between
2680 void*'s that were lists vs. void* that were not. This also made it
2681 somewhat easier to reason about things across processes.
2683 Verified that all the introspection tools work as expected.
2685 * wtf/FastMalloc.cpp:
2686 (WTF::internalEntropyValue):
2689 (WTF::HardenedSLL::create):
2690 (WTF::HardenedSLL::null):
2691 (WTF::HardenedSLL::setValue):
2692 (WTF::HardenedSLL::value):
2693 (WTF::HardenedSLL::operator!):
2694 (WTF::HardenedSLL::operator UnspecifiedBoolType):
2700 (WTF::SLL_PopRange):
2701 (WTF::SLL_PushRange):
2703 (PageHeapAllocator):
2704 (WTF::PageHeapAllocator::Init):
2705 (WTF::PageHeapAllocator::New):
2706 (WTF::PageHeapAllocator::Delete):
2707 (WTF::PageHeapAllocator::recordAdministrativeRegions):
2709 (WTF::Span::remoteNext):
2711 (WTF::Span::setNext):
2712 (WTF::Span::setPrev):
2719 (TCMalloc_Central_FreeList):
2720 (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
2721 (WTF::TCMalloc_Central_FreeList::entropy):
2722 (TCMalloc_PageHeap):
2723 (WTF::TCMalloc_PageHeap::init):
2724 (WTF::TCMalloc_PageHeap::scavenge):
2725 (WTF::TCMalloc_PageHeap::New):
2726 (WTF::TCMalloc_PageHeap::AllocLarge):
2727 (WTF::TCMalloc_PageHeap::Carve):
2728 (WTF::TCMalloc_PageHeap::Delete):
2729 (WTF::TCMalloc_PageHeap::ReturnedBytes):
2730 (WTF::TCMalloc_PageHeap::Check):
2731 (WTF::TCMalloc_PageHeap::CheckList):
2732 (WTF::TCMalloc_PageHeap::ReleaseFreeList):
2733 (TCMalloc_ThreadCache_FreeList):
2734 (WTF::TCMalloc_ThreadCache_FreeList::Init):
2735 (WTF::TCMalloc_ThreadCache_FreeList::empty):
2736 (WTF::TCMalloc_ThreadCache_FreeList::Push):
2737 (WTF::TCMalloc_ThreadCache_FreeList::PushRange):
2738 (WTF::TCMalloc_ThreadCache_FreeList::PopRange):
2739 (WTF::TCMalloc_ThreadCache_FreeList::Pop):
2740 (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
2741 (TCMalloc_ThreadCache):
2742 (WTF::TCMalloc_Central_FreeList::Init):
2743 (WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
2744 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
2745 (WTF::TCMalloc_Central_FreeList::InsertRange):
2746 (WTF::TCMalloc_Central_FreeList::RemoveRange):
2747 (WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
2748 (WTF::TCMalloc_Central_FreeList::FetchFromSpans):
2749 (WTF::TCMalloc_Central_FreeList::Populate):
2750 (WTF::TCMalloc_ThreadCache::Init):
2751 (WTF::TCMalloc_ThreadCache::Deallocate):
2752 (WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
2753 (WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
2754 (WTF::TCMalloc_ThreadCache::InitModule):
2755 (WTF::TCMalloc_ThreadCache::NewHeap):
2756 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2757 * wtf/MallocZoneSupport.h:
2758 (RemoteMemoryReader):
2760 2013-02-11 Enrica Casucci <enrica@apple.com>
2762 Add ENABLE_DELETION_UI to control the use of the deletion UI.
2763 https://bugs.webkit.org/show_bug.cgi?id=109463.
2765 ENABLE_DELETION_UI is set to 1 by default for
2766 all ports. It is explicitly enabled for MAC and disabled for iOS.
2768 Reviewed by Ryosuke Niwa.
2772 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
2774 [EFL] Stop using smart pointers for Ecore_Timer
2775 https://bugs.webkit.org/show_bug.cgi?id=109409
2777 Reviewed by Kenneth Rohde Christiansen.
2779 Remove support in OwnPtr for EFL's Ecore_Timer. It is a bad idea to use
2780 OwnPtr for Ecore_Timer because the timer handle may become invalid.
2782 * wtf/OwnPtrCommon.h:
2784 * wtf/efl/OwnPtrEfl.cpp:
2786 2013-02-11 Abhishek Arya <inferno@chromium.org>
2788 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
2789 https://bugs.webkit.org/show_bug.cgi?id=108981
2791 Reviewed by Eric Seidel.
2794 (WTF::BitVector::quickGet):
2795 (WTF::BitVector::quickSet):
2796 (WTF::BitVector::quickClear):
2797 * wtf/DecimalNumber.h:
2798 (WTF::DecimalNumber::DecimalNumber):
2799 * wtf/SegmentedVector.h:
2800 (WTF::SegmentedVector::ensureSegment):
2801 * wtf/StringPrintStream.cpp:
2802 (WTF::StringPrintStream::vprintf):
2807 (WTF::double_conversion::StringBuilder::SetPosition):
2808 (WTF::double_conversion::StringBuilder::AddSubstring):
2810 2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
2812 Consolidate the way WTF_USE_PTHREADS is enabled
2813 https://bugs.webkit.org/show_bug.cgi?id=108191
2815 Reviewed by Benjamin Poulain.
2817 Define WTF_USE_PTHREADS to 1 on all OS(UNIX) environments.
2819 * WTF.gyp/WTF.gyp: Remove duplicated definition of WTF_USE_PTHREADS.
2822 2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
2824 Refactor the way HAVE_XXX macros are set
2825 https://bugs.webkit.org/show_bug.cgi?id=108132
2827 Reviewed by Benjamin Poulain.
2829 OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
2830 builds exactly one of them is enabled. Use this assumption to
2835 2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
2837 Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
2838 https://bugs.webkit.org/show_bug.cgi?id=104266
2840 Reviewed by Philippe Normand.
2842 Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
2843 the existing macro naming conventions.
2846 USE() - use a particular third-party library or optional OS service
2847 ENABLE() - turn on a specific feature of WebKit
2851 * wtf/gobject/GOwnPtr.cpp:
2852 * wtf/gobject/GOwnPtr.h:
2853 * wtf/gobject/GRefPtr.cpp:
2854 * wtf/gobject/GRefPtr.h:
2856 2013-02-08 Michael Saboff <msaboff@apple.com>
2858 ARM_NEON Inline Assembly for copyLCharsFromUCharSource() inefficient for aligned destinations
2859 https://bugs.webkit.org/show_bug.cgi?id=109335
2861 Reviewed by Filip Pizlo.
2863 Change a "do while" to a "while" so that we don't copy single characters to align the
2864 destination when it is already aligned.
2866 * wtf/text/ASCIIFastPath.h:
2867 (WTF::copyLCharsFromUCharSource):
2869 2013-02-08 Jer Noble <jer.noble@apple.com>
2871 Bring WebKit up to speed with latest Encrypted Media spec.
2872 https://bugs.webkit.org/show_bug.cgi?id=97037
2874 Reviewed by Eric Carlson.
2876 Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
2880 2013-02-08 Adam Barth <abarth@webkit.org>
2882 Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
2883 https://bugs.webkit.org/show_bug.cgi?id=107190
2885 Reviewed by Eric Seidel.
2887 Add the ability to create an unbound weak reference. This facility lets
2888 you start sending messages to a WeakPtr on another thread before the
2889 object backing the WeakPtr has actually been created.
2892 (WTF::WeakReference::createUnbound):
2893 (WTF::WeakReference::bindTo):
2895 (WTF::WeakReference::WeakReference):
2896 (WTF::WeakPtr::WeakPtr):
2898 (WTF::WeakPtrFactory::WeakPtrFactory):
2900 (WTF::WeakPtrFactory::revokeAll):
2902 2013-02-08 Martin Robinson <mrobinson@igalia.com>
2904 [GTK] Add an experimental gyp build
2905 https://bugs.webkit.org/show_bug.cgi?id=109003
2907 Reviewed by Gustavo Noronha Silva.
2909 * WTF.gyp/WTF.gyp: Filter out MetaAllocator.(cpp/h) from the Chromium
2910 build. It's only necessary for GTK+.
2911 * WTF.gypi: Add MetaAllocator to the build for WebKitGTK+.
2913 2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
2915 Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
2916 https://bugs.webkit.org/show_bug.cgi?id=109051
2918 Reviewed by Yury Semikhatsky.
2920 * wtf/MemoryInstrumentation.cpp:
2921 (WTF::MemoryInstrumentation::WrapperBase::processPointer):
2923 2013-02-07 David Kilzer <ddkilzer@apple.com>
2925 Fix #endif comment from r142163 and r142183
2928 (WTF): s/PLATFORM/USE/
2930 2013-02-07 Benjamin Poulain <bpoulain@apple.com>
2932 Fix an incorrect comment from r142163
2937 I accidentally copied PLATFORM(IOS) instead of USE(WEB_THREAD) for the #ifdef closing.
2939 2013-02-07 Benjamin Poulain <bpoulain@apple.com>
2941 Upstream iOS isWebThread() and isUIThread()
2942 https://bugs.webkit.org/show_bug.cgi?id=109130
2944 Reviewed by Sam Weinig.
2946 On iOS, it is sometimes necessary to differenciate the thread running WebCore,
2947 and the thread running the UI. This patch upstream those functions.
2949 * wtf/MainThread.cpp:
2951 Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
2954 Return true when the current thread is the Web/UI thread.
2956 * wtf/mac/MainThreadMac.mm:
2960 * wtf/text/AtomicString.cpp:
2961 (WTF::AtomicStringTable::create):
2962 Use the newly added methods.
2964 2013-02-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
2966 [Qt] Fix build without 3D_GRAPHICS
2967 https://bugs.webkit.org/show_bug.cgi?id=109194
2969 Reviewed by Noam Rosenthal.
2971 Now that Coordinated Graphics was moved to WebCore, we need to explicitly enable
2972 it when we have 3D_GRAPHICS. This dependency was implicitly by the fact that
2973 3D_GRAPHICS is a dependency of WebKit2 and Coordinated Graphics was only
2974 available there. This should fix build for Qt SH4 Linux.
2978 2013-02-06 Zan Dobersek <zdobersek@igalia.com>
2980 [WTFURL] Fix erroneous header inclusions in WTFURL code
2981 https://bugs.webkit.org/show_bug.cgi?id=109040
2983 Reviewed by Benjamin Poulain.
2985 Include WTFURL API headers from files in Source/WTF/wtf/url/src
2986 by specifying their relative path to Source/WTF.
2988 * GNUmakefile.am: The changes make it possible to compile the WTF library
2989 without specifying both Source/WTF/wtf/url/api and Source/WTF/wtf/url/src
2990 as inclusion directories in CPPFLAGS, so remove these two entries.
2991 * wtf/url/src/RawURLBuffer.h:
2992 * wtf/url/src/URLCanon.h: Include the URLParse.h header by specifying
2993 only the base name as it's located in the same directory.
2994 * wtf/url/src/URLCanonQuery.cpp:
2995 * wtf/url/src/URLUtil.h:
2997 2013-02-06 Tony Gentilcore <tonyg@chromium.org>
2999 Call XSSAuditor's didBlockScript() for the threaded HTML parser
3000 https://bugs.webkit.org/show_bug.cgi?id=108726
3002 Reviewed by Adam Barth.
3004 This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
3005 These methods check to ensure there are 0 or 1 references.
3007 * wtf/text/CString.cpp:
3008 (WTF::CString::isSafeToSendToAnotherThread): Added.
3010 * wtf/text/CString.h:
3012 * wtf/text/WTFString.cpp:
3013 (WTF::String::isSafeToSendToAnotherThread): Added.
3015 * wtf/text/WTFString.h:
3017 * wtf/url/api/ParsedURL.h:
3018 (WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
3019 * wtf/url/api/URLString.h:
3020 (WTF::URLString::isSafeToSendToAnotherThread): Added.
3022 2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
3024 Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
3025 https://bugs.webkit.org/show_bug.cgi?id=107262
3027 Reviewed by Yury Semikhatsky.
3029 We need a way to calculate class name for a pointer automatically.
3030 Otherwise we need to write className manually in all the instrumentation methods.
3031 And for all reported but not instrumented classes.
3033 C++ can do that for us with help of typeid but unfortunatelly it requires rtti.
3034 There is another way to do that. C++ preprocessor provides a define which has a function name.
3036 For g++ and clang it is __PRETTY_FUNCTION__.
3037 For MSVC it is __FUNCTION__.
3038 The content of the string is a function signature.
3039 We can use it because it has the name of the template argument.
3040 The format is sligthly different. That's why I made two different parsers.
3041 One for MSVC the other for GCC, Clang etc.
3042 The other problem is the resulting binary size.
3043 I made very simple function that does the only thing, returns the smallest possible function signature.
3044 Unfortunatelly MSVC doesn't generate template argument name for functions.
3045 It does this only for classes.
3047 * wtf/MemoryInstrumentation.cpp:
3050 (WTF::MemoryClassInfo::callReportObjectInfo):
3051 (WTF::MemoryClassInfo::init):
3052 * wtf/MemoryInstrumentation.h:
3056 (WTF::MemoryClassInfo::MemoryClassInfo):
3058 (WTF::::reportObjectMemoryUsage):
3060 2013-02-05 Mark Lam <mark.lam@apple.com>
3062 Fix EnumClass so that it can be used with switch statements.
3063 https://bugs.webkit.org/show_bug.cgi?id=109004.
3065 Reviewed by Sam Weinig.
3068 (WTF::EnumClass::operator==):
3069 (WTF::EnumClass::operator!=):
3070 (WTF::EnumClass::operator<):
3071 (WTF::EnumClass::operator<=):
3072 (WTF::EnumClass::operator>):
3073 (WTF::EnumClass::operator>=):
3075 (WTF::EnumClass::operator Value):
3077 2013-02-05 Oliver Hunt <oliver@apple.com>
3079 Disable TCMalloc hardening as it's breaking leaks.
3081 Reviewed by Gavin Barraclough.
3083 * wtf/FastMalloc.cpp:
3085 2013-02-05 Mark Lam <mark.lam@apple.com>
3087 Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
3088 https://bugs.webkit.org/show_bug.cgi?id=108988.
3090 Reviewed by Alexey Proskuryakov.
3094 2013-02-05 Roger Fong <roger_fong@apple.com>
3096 Unreviewed build fix.
3098 * wtf/FastMalloc.cpp:
3100 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3103 https://bugs.webkit.org/show_bug.cgi?id=108889
3105 Reviewed by Ryosuke Niwa.
3107 * wtf/StackBounds.h:
3109 (WTF::StackBounds::isSafeToRecurse):
3110 (WTF::StackBounds::size):
3111 Adopt a more conventional style for a multiline branch.
3113 (WTF::StackBounds::StackBounds):
3114 (WTF::StackBounds::current):
3115 (WTF::StackBounds::recursionLimit):
3116 Make those method private.
3118 Making the constructor private ensure initialize() is alwasy called on any StackBounds.
3120 2013-02-05 Zan Dobersek <zdobersek@igalia.com>
3122 [WTFURL] Comparison between signed and unsigned integer expressions in URLUtil.cpp
3123 https://bugs.webkit.org/show_bug.cgi?id=108955
3125 Reviewed by Benjamin Poulain.
3127 * wtf/url/src/URLUtil.cpp:
3128 (URLUtilities): Make the counter variable a signed integer to get rid of the warning.
3130 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3132 Rationalize the use of iOS/Mac #defines in Assertions.cpp
3133 https://bugs.webkit.org/show_bug.cgi?id=108870
3135 Reviewed by David Kilzer.
3137 * wtf/Assertions.cpp: Instead of using PLATFORM(MAC) and assume it works for iOS and OS X,
3138 use CF as the guard for CFString. Similarily, USE_APPLE_SYSTEM_LOG guards code using ASL.
3140 2013-02-05 Benjamin Poulain <bpoulain@apple.com>
3142 Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of length zero
3143 https://bugs.webkit.org/show_bug.cgi?id=108894
3145 Reviewed by Andreas Kling.
3147 * wtf/text/StringBuilder.h:
3148 (WTF::StringBuilder::toAtomicString): The function was returning the nullAtom for strings of length zero.
3149 This is inconsistent with StringBuilder::toString() which always return an empty string.
3151 This patch unifies the behavior.
3153 2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
3155 Structure::m_outOfLineCapacity is unnecessary
3156 https://bugs.webkit.org/show_bug.cgi?id=108206
3158 Reviewed by Darin Adler.
3160 Simplifying the utility functions that we use since we don't need a
3161 bunch of fancy templates for this one specific call site.
3164 (WTF::roundUpToPowerOfTwo):
3166 2013-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
3168 Unreviewed, rolling out r141905.
3169 http://trac.webkit.org/changeset/141905
3170 https://bugs.webkit.org/show_bug.cgi?id=108963
3172 "Broke mac build" (Requested by tonyg-cr on #webkit).
3174 * wtf/text/CString.cpp:
3175 * wtf/text/CString.h:
3176 * wtf/text/WTFString.cpp:
3177 * wtf/text/WTFString.h:
3179 * wtf/url/api/ParsedURL.h:
3181 * wtf/url/api/URLString.h:
3183 2013-02-05 Tony Gentilcore <tonyg@chromium.org>
3185 Call XSSAuditor's didBlockScript() for the threaded HTML parser
3186 https://bugs.webkit.org/show_bug.cgi?id=108726
3188 Reviewed by Adam Barth.
3190 This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
3191 These methods check to ensure there are 0 or 1 references.
3193 * wtf/text/CString.cpp:
3194 (WTF::CString::isSafeToSendToAnotherThread): Added.
3196 * wtf/text/CString.h:
3198 * wtf/text/WTFString.cpp:
3199 (WTF::String::isSafeToSendToAnotherThread): Added.
3201 * wtf/text/WTFString.h:
3203 * wtf/url/api/ParsedURL.h:
3204 (WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
3205 * wtf/url/api/URLString.h:
3206 (WTF::URLString::isSafeToSendToAnotherThread): Added.
3208 2013-02-04 Benjamin Poulain <bpoulain@apple.com>
3210 Build fix for AtomicString on iOS
3212 Unreviewed. The commit r141812 rely on isUIThread(), there is no such things
3213 in the tree right now. Use pthread_main_np() until more thread handling is upstreamed.
3215 * wtf/text/AtomicString.cpp:
3216 (WTF::AtomicStringTable::create):
3218 2013-02-04 Abhishek Arya <inferno@chromium.org>
3220 Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
3221 https://bugs.webkit.org/show_bug.cgi?id=108668
3223 Reviewed by Eric Seidel.
3226 (WTF::AVLTreeDefaultBSet::operator[]):
3228 (WTF::BitArray::set):
3229 (WTF::BitArray::get):
3230 * wtf/FastBitVector.h:
3231 (WTF::FastBitVector::set):
3232 (WTF::FastBitVector::clear):
3233 (WTF::FastBitVector::get):
3235 (WTF::FixedArray::operator[]):
3236 * wtf/RefCountedArray.h:
3237 (WTF::RefCountedArray::at):
3238 * wtf/TypedArrayBase.h:
3239 (WTF::TypedArrayBase::item):
3240 * wtf/text/StringBuffer.h:
3241 (WTF::StringBuffer::operator[]):
3242 * wtf/text/StringBuilder.h:
3243 (WTF::StringBuilder::operator[]):
3244 * wtf/text/StringImpl.h:
3245 (WTF::StringImpl::operator[]):
3247 2013-02-04 Benjamin Poulain <benjamin@webkit.org>
3249 Upstream iOS's AtomicString
3250 https://bugs.webkit.org/show_bug.cgi?id=108139
3252 Reviewed by David Kilzer.
3254 On iOS, WebCore can be executed from two different threads. To maintain consistency,
3255 a few changes had been made:
3256 -The main UI thread and the WebThread share the same AtomicStringTable.
3257 -A spin lock is needed before any access to prevent any concurrent modification of the string table.
3258 The spin lock also prevent race on the static initialization of the shared table.
3261 Introduce a new USE(WEB_THREAD) to scope changes related to iOS Web Thread.
3262 * wtf/text/AtomicString.cpp:
3263 (AtomicStringTableLocker):
3264 (WTF::AtomicStringTableLocker::AtomicStringTableLocker):
3265 (WTF::AtomicStringTableLocker::~AtomicStringTableLocker):
3266 (WTF::AtomicStringTable::create):
3267 wtfThreadData() is not necessarily inlined on ARM. When it is not inlined, the old code
3268 causes two call to the function. Instead, we can keep the value in register and pass it
3269 to AtomicStringTable::create().
3271 (WTF::addToStringTable):
3272 (WTF::AtomicString::addSlowCase):
3273 (WTF::AtomicString::find):
3274 (WTF::AtomicString::remove):
3276 2013-02-04 Martin Robinson <mrobinson@igalia.com>
3278 Fix GTK+ 'make dist' in preparation for the 1.11.5 release.
3280 * GNUmakefile.list.am:
3282 2013-02-04 David Kilzer <ddkilzer@apple.com>
3284 Sort WTF Xcode project file
3286 * WTF.xcodeproj/project.pbxproj:
3288 2013-02-02 Andreas Kling <akling@apple.com>
3290 Vector should consult allocator about ideal size when choosing capacity.
3291 <http://webkit.org/b/108410>
3292 <rdar://problem/13124002>
3294 Reviewed by Benjamin Poulain.
3296 Added WTF::fastMallocGoodSize(), a workalike/wrapper for OS X's malloc_good_size().
3297 It returns the actual size of the block that will get allocated for a given byte size.
3299 Vector's internal buffer now checks with the allocator if the resulting allocation
3300 could actually house more objects and updates its capacity to make use of the space.
3303 (WTF::::expandCapacity):
3304 * wtf/FastMalloc.cpp:
3305 (WTF::fastMallocGoodSize):
3308 (WTF::VectorBufferBase::allocateBuffer):
3309 (WTF::VectorBufferBase::tryAllocateBuffer):
3310 (WTF::VectorBufferBase::reallocateBuffer):
3312 2013-02-02 Mark Rowe <mrowe@apple.com>
3314 <http://webkit.org/b/108745> WTF shouldn't use a script build phase to detect the presence of headers when the compiler can do it for us
3316 Reviewed by Sam Weinig.
3318 * WTF.xcodeproj/project.pbxproj: Remove the script phase that used to generate a header file
3319 containing information about whether certain header files exist on the system.
3320 * wtf/FastMalloc.cpp: Use Clang's __has_include to detect whether the header exists before including it.
3322 2013-02-01 Roger Fong <roger_fong@apple.com>
3324 Unreviewed. WTF VS2010 project cleanup.
3326 * WTF.vcxproj/WTF.vcxproj:
3327 * WTF.vcxproj/WTF.vcxproj.filters:
3328 * WTF.vcxproj/WTFPreLink.cmd: Removed.
3330 2013-02-01 Zan Dobersek <zdobersek@igalia.com>
3332 [GTK] Add WTFURL source files to the build
3333 https://bugs.webkit.org/show_bug.cgi?id=108215
3335 Reviewed by Benjamin Poulain.
3337 The WTFURL implementation sources are all still guarded by the USE(WTFURL) guard,
3338 meaning that the GTK port still uses the default KURL backend. To use the WTFURL
3339 backend instead, one would have to define WTF_USE_WTFURL in Platform.h.
3341 * GNUmakefile.am: List the directories from which source headers will be included.
3342 Plenty of WTFURL code currently just includes the required header by name rather
3343 than specifying the header path as relative to Source/WTF. In the future all the inclusions
3344 should probaby be changed to include the header through the path relative to Source/WTF.
3345 * GNUmakefile.list.am: Add build targets for the WTFURL source files.
3346 * wtf/url/api/ParsedURL.cpp: Specify the complete path to the required headers and
3347 reorder the inclusions.
3348 * wtf/url/src/URLCanon.h: Ditto.
3350 2013-01-18 Ilya Tikhonovsky <loislo@chromium.org>
3352 Web Inspector: Native Memory Instrumentation: provide edge names and class names for WTF containers and strings
3353 https://bugs.webkit.org/show_bug.cgi?id=107303
3355 Reviewed by Yury Semikhatsky.
3357 I'd like to use ValueType[] as className for the container data members
3358 because class names of template parameters already present in the container class names.
3360 * wtf/MemoryInstrumentationArrayBufferView.h:
3361 (WTF::reportMemoryUsage):
3362 * wtf/MemoryInstrumentationHashCountedSet.h:
3363 (WTF::reportMemoryUsage):
3364 * wtf/MemoryInstrumentationHashMap.h:
3365 (WTF::reportMemoryUsage):
3366 * wtf/MemoryInstrumentationHashSet.h:
3367 (WTF::reportMemoryUsage):
3368 * wtf/MemoryInstrumentationListHashSet.h:
3369 (WTF::reportMemoryUsage):
3370 * wtf/MemoryInstrumentationSequence.h:
3371 * wtf/MemoryInstrumentationString.h:
3372 (WTF::reportMemoryUsage):
3373 * wtf/MemoryInstrumentationVector.h:
3374 (WTF::reportMemoryUsage):
3376 2013-02-01 Geoffrey Garen <ggaren@apple.com>
3378 Added TriState to WTF and started using it in one place
3379 https://bugs.webkit.org/show_bug.cgi?id=108628
3381 Reviewed by Beth Dakin.
3383 Useful for expressing "maybe" conditions in a boolean context.
3385 * WTF.xcodeproj/project.pbxproj:
3386 * wtf/TriState.h: Added.
3389 2013-02-01 Patrick Gansterer <paroga@webkit.org>
3391 Build fix for WinCE after r137709
3392 https://bugs.webkit.org/show_bug.cgi?id=105767
3394 Do not pass functions as const references to
3395 templated arguments to make the compiler happy.
3397 * wtf/StdLibExtras.h:
3398 (WTF::binarySearch):
3399 (WTF::tryBinarySearch):
3400 (WTF::approximateBinarySearch):
3402 2013-01-31 Ilya Tikhonovsky <loislo@chromium.org>
3404 Web Inspector: Native Memory Instrumentation: replace nodeName argument with className
3405 https://bugs.webkit.org/show_bug.cgi?id=107278
3407 Reviewed by Yury Semikhatsky.
3409 I replaced nodeName with className because we newer report node name for private and raw buffers
3410 but need to report their class names.
3412 * wtf/MemoryInstrumentation.cpp:
3413 (WTF::MemoryInstrumentation::reportLinkToBuffer):
3414 (WTF::MemoryClassInfo::addRawBuffer):
3415 (WTF::MemoryClassInfo::addPrivateBuffer):
3416 * wtf/MemoryInstrumentation.h:
3417 (WTF::MemoryInstrumentation::addRawBuffer):
3420 2013-01-31 Jessie Berlin <jberlin@apple.com>
3422 Rolling out r141407 because it is causing crashes under
3423 WTF::TCMalloc_Central_FreeList::FetchFromSpans() in Release builds.
3426 (WTF::::expandCapacity):
3427 * wtf/FastMalloc.cpp:
3431 (WTF::VectorBufferBase::allocateBuffer):
3432 (WTF::VectorBufferBase::tryAllocateBuffer):
3433 (WTF::VectorBufferBase::reallocateBuffer):
3435 2013-01-31 Mark Lam <mark.lam@apple.com>
3437 Abstraction for hiding enum class.
3438 https://bugs.webkit.org/show_bug.cgi?id=108533
3440 Reviewed by Anders Carlsson.
3443 * wtf/EnumClass.h: Copied from Source/WTF/wtf/TypeSafeEnum.h.
3444 (WTF::EnumClass::EnumClass):
3445 (WTF::EnumClass::operator==):
3446 (WTF::EnumClass::operator!=):
3447 (WTF::EnumClass::operator<):
3448 (WTF::EnumClass::operator<=):
3449 (WTF::EnumClass::operator>):
3450 (WTF::EnumClass::operator>=):
3451 * wtf/TypeSafeEnum.h: Removed.
3453 2013-01-31 Andreas Kling <akling@apple.com>
3455 Vector should consult allocator about ideal size when choosing capacity.
3456 <http://webkit.org/b/108410>
3457 <rdar://problem/13124002>
3459 Reviewed by Benjamin Poulain.
3461 Added WTF::fastMallocGoodSize(), a workalike/wrapper for OS X's malloc_good_size().
3462 It returns the actual size of the block that will get allocated for a given byte size.
3464 Vector's internal buffer now checks with the allocator if the resulting allocation
3465 could actually house more objects and updates its capacity to make use of the space.
3468 (WTF::::expandCapacity):
3469 * wtf/FastMalloc.cpp:
3470 (WTF::fastMallocGoodSize):
3473 (WTF::VectorBufferBase::allocateBuffer):
3474 (WTF::VectorBufferBase::tryAllocateBuffer):
3475 (WTF::VectorBufferBase::reallocateBuffer):
3477 2013-01-30 Christophe Dumez <christophe.dumez@intel.com>
3479 Add a StringTypeAdapter for ASCIILiteral
3480 https://bugs.webkit.org/show_bug.cgi?id=108338
3482 Reviewed by Benjamin Poulain.
3484 Add StringTypeAdapter for ASCIILiteral type so that concatenation of an
3485 ASCIILiteral and a String using + operator is efficiently handled.
3487 * wtf/text/StringConcatenate.h:
3488 * wtf/text/StringOperators.h:
3489 (WTF::operator+): Inline some of the operator+ functions that were not
3493 2013-01-30 David Kilzer <ddkilzer@apple.com>
3495 Upstream iOS build file changes for WTF
3496 <http://webkit.org/b/108221>
3498 Reviewed by Mark Rowe.
3500 * Configurations/Base.xcconfig:
3501 - Import iOS.xcconfig.
3502 - Remove VALID_ARCHS. Modern Xcodes define these correctly.
3503 - Make HEADER_SEARCH_PATHS work with iOS Simulator builds.
3504 - Add SUPPORTED_PLATFORMS so both Mac and iOS SDKs appear in
3506 - Define INSTALL_PATH when building for macosx SDK.
3507 * Configurations/CopyWTFHeaders.xcconfig:
3508 - Make PRIVATE_HEADERS_FOLDER_PATH work with iOS Simulator
3510 * Configurations/DebugRelease.xcconfig:
3511 - Simplify ARCHS. This works correctly on 32-bit-only SDKs.
3512 * Configurations/WTF.xcconfig:
3513 - Fix installation directory for iOS Simulator builds by
3514 defining INSTALL_PATH_ACTUAL.
3515 * Configurations/iOS.xcconfig: Add.
3516 * WTF.xcodeproj/project.pbxproj:
3517 - Add iOS.xcconfig to the project.
3519 2013-01-29 Mark Hahnenberg <mhahnenberg@apple.com>
3521 Structure::m_outOfLineCapacity is unnecessary
3522 https://bugs.webkit.org/show_bug.cgi?id=108206
3524 Reviewed by Geoffrey Garen.
3526 We're adding a new function that gives us the ability to round a value up to the next power of a certain base.
3529 (WTF::roundUpToPowerOf):
3531 2013-01-30 Zeno Albisser <zeno@webkit.org>
3533 [Qt] Fix Qt/Mac build after r141024 and r141037
3534 https://bugs.webkit.org/show_bug.cgi?id=108318
3536 Reviewed by Kentaro Hara.
3539 Make sure Block.h is included and its functionality
3540 is enabled for Qt on Mac.
3542 2013-01-30 Simon Hausmann <simon.hausmann@digia.com>
3544 [Qt] Remove QT4_UNICODE related code paths
3545 https://bugs.webkit.org/show_bug.cgi?id=108316
3547 Reviewed by Kenneth Rohde Christiansen.
3549 Get rid of QT4_UNICODE and any related code paths. The Qt port
3550 requires Qt5 and ICU these days.
3554 * wtf/unicode/Unicode.h:
3555 * wtf/unicode/qt4/UnicodeQt4.h: Removed.
3557 2013-01-29 Mark Lam <mark.lam@apple.com>
3559 Introducing WTF::TypeSafeEnum and DatabaseError.
3560 https://bugs.webkit.org/show_bug.cgi?id=108279.
3562 Reviewed by Geoffrey Garen.
3564 * WTF.xcodeproj/project.pbxproj:
3565 * wtf/TypeSafeEnum.h: Added.
3568 (WTF::TypeSafeEnum::TypeSafeEnum):
3569 (WTF::TypeSafeEnum::value):
3570 (WTF::TypeSafeEnum::operator==):
3571 (WTF::TypeSafeEnum::operator!=):
3572 (WTF::TypeSafeEnum::operator<):
3573 (WTF::TypeSafeEnum::operator<=):
3574 (WTF::TypeSafeEnum::operator>):
3575 (WTF::TypeSafeEnum::operator>=):
3577 2013-01-29 Sheriff Bot <webkit.review.bot@gmail.com>
3579 Unreviewed, rolling out r140983.
3580 http://trac.webkit.org/changeset/140983
3581 https://bugs.webkit.org/show_bug.cgi?id=108277
3583 Unfortunately, this API has one last client (Requested by
3588 2013-01-28 Benjamin Poulain <benjamin@webkit.org>
3590 String constructed from Literals should be non-empty
3591 https://bugs.webkit.org/show_bug.cgi?id=108103
3593 Reviewed by Eric Carlson.
3595 For efficiency, the construction from literal only works with valid non-empty strings.
3596 One of the constructor was changed to fix an error from HTMLMediaElement.
3598 This patch replaces the branch with an assertions.
3600 * wtf/text/StringImpl.cpp:
3601 (WTF::StringImpl::createFromLiteral):
3603 2013-01-28 David Kilzer <ddkilzer@apple.com>
3605 BUILD FIX: Platform.h:1212:22: error: '__MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0 [-Werror,-Wundef]
3607 This fixes the following build error introduced in r140366 for
3610 Platform.h:1212:22: error: '__MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0 [-Werror,-Wundef]
3611 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
3615 * wtf/Platform.h: Check !PLATFORM(IOS) first so that iOS builds
3616 do not try to evaluate __MAC_OS_X_VERSION_MIN_REQUIRED.
3618 2013-01-28 Adam Barth <abarth@webkit.org>
3620 Remove webkitNotifications.createHTMLNotification
3621 https://bugs.webkit.org/show_bug.cgi?id=107598
3623 Reviewed by Benjamin Poulain.
3627 2013-01-27 Laszlo Gombos <l.gombos@samsung.com>
3629 [ANDROID] Fix a typo
3630 https://bugs.webkit.org/show_bug.cgi?id=108046
3632 Reviewed by Adam Barth.
3634 HAVE_NMAP -> HAVE_MMAP.
3638 2013-01-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
3640 Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
3641 https://bugs.webkit.org/show_bug.cgi?id=106740
3643 Reviewed by Benjamin Poulain.
3645 Adding int64_t type atomicIncrement and atomicDecrement implementations for Windows
3646 into Atomics.h required by WebKit2 after r139514. Separating WinCE implementation
3647 that does not support WebKit2 and has no support for 64 bit interlocked methods.
3649 Increasing WINVER and _WIN32_WINNT to XP SP2, because the 64 bit type interlocked methods
3650 are not supported on previous versions on 32 bit target.
3655 (WTF::atomicIncrement):
3656 (WTF::atomicDecrement):
3658 2013-01-26 Andras Becsi <andras.becsi@digia.com>
3660 Unreviewed fix after r140451 to make GIT-SVN repositories happy.
3662 * WTF.vcproj/WTF.sln:
3664 2013-01-26 Justin Schuh <jschuh@chromium.org>
3666 [CHROMIUM] Suppress more c4267 build warnings for Win64 targets
3667 https://bugs.webkit.org/show_bug.cgi?id=107993
3669 Reviewed by Abhishek Arya.
3673 2013-01-25 Eric Seidel <eric@webkit.org>
3675 Support 4 and 5 argument bound static functions
3676 https://bugs.webkit.org/show_bug.cgi?id=107973
3678 Reviewed by Anders Carlsson.
3680 Yummy copy/paste template code!
3681 I'm about to use this in a BackgroundHTMLParser patch, but figured this should be landed separately.
3687 2013-01-24 Martin Robinson <mrobinson@igalia.com>
3689 Abstract the logic for appending a UChar32 onto StringBuilder
3690 https://bugs.webkit.org/show_bug.cgi?id=107505
3692 Reviewed by Darin Adler.
3694 * wtf/text/StringBuilder.h:
3695 (WTF::StringBuilder::append): Added a method for appending a UChar32 to a StringBuilder.
3697 2013-01-24 Brent Fulgham <bfulgham@webkit.org>
3699 Stipulate build order between WTFGenerated and WTF
3700 https://bugs.webkit.org/show_bug.cgi?id=107844
3702 Reviewed by Tim Horton.
3704 * WTF.vcxproj/WTF.vcxproj: Use VS2010 project dependency
3705 declaration so WTF depends on a completed WTFGenerated build.
3707 2013-01-23 Abhishek Arya <inferno@chromium.org>
3709 Add support for ASSERT_WITH_SECURITY_IMPLICATION.
3710 https://bugs.webkit.org/show_bug.cgi?id=107699
3712 Reviewed by Eric Seidel.
3714 * wtf/Assertions.h: Add ASSERT_WITH_SECURITY_IMPLICATION to
3715 indicate possible security vulnerabily and enable it by default
3717 * wtf/Vector.h: Use ASSERT_WITH_SECURITY_IMPLICATION for
3718 bounds check on [] operator.
3720 2013-01-23 Tony Chang <tony@chromium.org>
3722 Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
3724 * WTF.vcproj/WTF.sln: Added property svn:eol-style.
3726 2013-01-23 Adam Barth <abarth@webkit.org>
3728 BackgroundHTMLParser::sendTokensToMainThread should use bind
3729 https://bugs.webkit.org/show_bug.cgi?id=107637
3731 Reviewed by Eric Seidel.
3734 - I had to re-work the approach to validating WeakPtr |this|
3735 arguments a bit. Previously you couldn't pass a WeakPtr as a
3736 non-|this| argument to a function because we would try to unwrap
3737 it into a raw pointer.
3739 (WTF::WeakPtrFactory::revokeAll):
3741 - Let clients revoke all outstanding WeakPtrs without needing to
3742 destroy the WeakPtrFactory.
3743 * wtf/chromium/MainThreadChromium.cpp:
3744 (WTF::callFunctionObject):
3745 (WTF::callOnMainThread):
3746 - Implement callOnMainThread for Function objects. The non-Chromium
3747 implementation of MainThread.cpp already implements this feature.
3749 2013-01-23 Justin Schuh <jschuh@chromium.org>
3751 [CHROMIUM] Suppress c4267 build warnings in WTF for Win64 targets
3752 https://bugs.webkit.org/show_bug.cgi?id=107721
3754 Reviewed by Abhishek Arya.
3758 2013-01-23 Oliver Hunt <oliver@apple.com>
3760 Add RELEASE_ASSERT (and a few friends)
3761 https://bugs.webkit.org/show_bug.cgi?id=107725
3763 Reviewed by Filip Pizlo.
3765 Adding a few macros to make release mode assertions easier and more readable.
3766 Also makes same assertions more useful in debug builds.
3770 2013-01-22 Joshua Bell <jsbell@chromium.org>
3772 Prevent race condition during Worker shutdown
3773 https://bugs.webkit.org/show_bug.cgi?id=107577
3775 Reviewed by Dmitry Titov.
3777 Add MessageQueue::appendAndKill() which wraps those two steps with a mutex so other
3778 threads can't sneak a message in between.
3780 * wtf/MessageQueue.h: Added appendAndKill() method.
3782 2013-01-22 Roger Fong <roger_fong@apple.com>
3784 WTF project files and property sheets for getting WebKit to compile in VS2010.
3785 https://bugs.webkit.org/show_bug.cgi?id=106986
3787 Reviewed by Timothy Horton and Brent Fulgham.
3789 * WTF.vcproj/WTF.sln:
3790 * WTF.vcxproj: Added.
3791 * WTF.vcxproj/WTF.vcxproj: Added.
3792 * WTF.vcxproj/WTF.vcxproj.filters: Added.
3793 * WTF.vcxproj/WTF.vcxproj.user: Added.
3794 * WTF.vcxproj/WTFCommon.props: Added.
3795 * WTF.vcxproj/WTFDebug.props: Added.
3796 * WTF.vcxproj/WTFGenerated.make: Added.
3797 * WTF.vcxproj/WTFGenerated.vcxproj: Added.
3798 * WTF.vcxproj/WTFGenerated.vcxproj.filters: Added.
3799 * WTF.vcxproj/WTFGenerated.vcxproj.user: Added.
3800 * WTF.vcxproj/WTFGeneratedCommon.props: Added.
3801 * WTF.vcxproj/WTFGeneratedDebug.props: Added.
3802 * WTF.vcxproj/WTFGeneratedRelease.props: Added.
3803 * WTF.vcxproj/WTFPostBuild.cmd: Added.
3804 * WTF.vcxproj/WTFPreBuild.cmd: Added.
3805 * WTF.vcxproj/WTFPreLink.cmd: Added.
3806 * WTF.vcxproj/WTFRelease.props: Added.
3807 * WTF.vcxproj/build-generated-files.sh: Added.
3808 * WTF.vcxproj/copy-files.cmd: Added.
3809 * WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py: Added.
3812 2013-01-22 David Kilzer <ddkilzer@apple.com>
3814 Fix DateMath.cpp to compile with -Wshorten-64-to-32
3815 <http://webkit.org/b/107503>
3817 Reviewed by Darin Adler.
3819 Fixes the following build errors with -Wshorten-64-to-32:
3821 DateMath.cpp:742:47: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3822 if (month == 2 && day > 28 && !isLeapYear(year))
3824 DateMath.cpp:757:48: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3825 double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
3826 ~~~~~~~~~~~~~~~ ^~~~~
3827 DateMath.cpp:757:55: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3828 double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
3830 DateMath.cpp:757:60: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3831 double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
3832 ~~~~~~~~~~~~~~~ ^~~~~
3833 DateMath.cpp:757:67: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3834 double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
3835 ~~~~~~~~~~~~~~~ ^~~~~~~
3836 DateMath.cpp:996:59: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3837 offset = ((o / 100) * 60 + (o % 100)) * sgn;
3838 ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
3839 DateMath.cpp:998:37: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3840 offset = o * 60 * sgn;
3842 DateMath.cpp:1005:40: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3843 offset = (o * 60 + o2) * sgn;
3844 ~ ~~~~~~~~~~~~~~^~~~~
3845 DateMath.cpp:1041:40: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3846 return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
3847 ~~~~~~~~~~~~~~~ ~~~~~~^~~
3848 DateMath.cpp:1041:45: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3849 return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
3851 DateMath.cpp:1041:50: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3852 return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
3853 ~~~~~~~~~~~~~~~ ^~~~
3854 DateMath.cpp:1041:56: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
3855 return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
3856 ~~~~~~~~~~~~~~~ ^~~~~~
3857 12 errors generated.
3860 (WTF::ymdhmsToSeconds): Change year argument from long to int.
3861 Change mon, day, hour, minute arguments from int to long.
3862 (WTF::parseInt): Add. Identical to parseLong but bounds checks
3864 (WTF::parseLong): Switch to std::numeric_limits<long> instead of
3866 (WTF::parseES5DatePortion): Change year argument from long to
3868 (WTF::parseES5DateFromNullTerminatedCharacters): Change year
3869 local variable from long to int.
3870 (WTF::parseDateFromNullTerminatedCharacters): Change year and
3871 offset local variables from long to int. Switch from using
3872 parseLong() to parseInt() as needed. Ditto for labs() to abs().
3873 Add overflow check when switching from "MM/DD/YYYY" to
3874 "YYYY/MM/DD" parsing.
3876 2013-01-17 Andy Estes <aestes@apple.com>
3878 Add a USE() macro for content filtering code
3879 https://bugs.webkit.org/show_bug.cgi?id=107098
3881 Reviewed by Mark Rowe.
3883 * wtf/Platform.h: Define WTF_USE_CONTENT_FILTERING on Mac platforms
3884 more recent than Lion.
3886 2013-01-18 Laszlo Gombos <l.gombos@samsung.com>
3888 Remove unnecessary PLATFORM() tests
3889 https://bugs.webkit.org/show_bug.cgi?id=107360
3891 Reviewed by Eric Seidel.
3893 PLATFORM(WIN), PLATFORM(CHROMIUM) and PLATFORM(QT) are mutually
3894 exclusive. Remove redundant PLATFORM() tests based on this
3899 2013-01-18 Laszlo Gombos <l.gombos@samsung.com>
3901 Remove PLATFORM(TORCHMOBILE) from Assertions.h
3902 https://bugs.webkit.org/show_bug.cgi?id=107355
3904 Reviewed by Eric Seidel.
3906 This appears to be the only place where PLATFORM(TORCHMOBILE) is
3907 used. I don't believe this ifdef is needed anymore.
3911 2013-01-18 Michael Saboff <msaboff@apple.com>
3913 Refactor isPowerOf2() and add getLSBSet()
3914 https://bugs.webkit.org/show_bug.cgi?id=107306
3916 Reviewed by Filip Pizlo.
3918 Moved runtime/PropertyMapHashTable.h:PowerOf2() to new hasOneBitSet() and added getLSBSet().
3924 2013-01-18 David Kilzer <ddkilzer@apple.com>
3926 Fix WTF::copyLCharsFromUCharSource() to compile with -Wshorten-64-to-32
3927 <http://webkit.org/b/107227>
3929 Reviewed by Benjamin Poulain.
3931 Fixes the following build error:
3933 ASCIIFastPath.h:117:59: error: implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int' [-Werror,-Wshorten-64-to-32]
3934 const unsigned endLength = length - ucharsPerLoop + 1;
3935 ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~
3938 * wtf/text/ASCIIFastPath.h:
3939 (WTF::copyLCharsFromUCharSource): Change local variables from
3942 2013-01-14 Dominik Röttsches <dominik.rottsches@intel.com>
3944 [EFL] Update freetype in jhbuild to 2.4.11 and activate subpixel layout
3945 https://bugs.webkit.org/show_bug.cgi?id=106774
3947 In order to fix a long standing linespacing/font ascent & descent issue
3948 we found that FreeType commit b0962ac34e660 solves that problem.
3949 Let's update FreeType accordingly, but bump it to 2.4.11 due to the
3950 maintainer recommending several security updates after that said commit.
3952 Also, in order to avoid extra rebaselining, let's activate subpixel
3953 layout at the same time.
3955 Reviewed by Martin Robinson.
3957 * wtf/Platform.h: Activate Subpixel Layout for EFL.
3959 2013-01-17 Adam Barth <abarth@webkit.org>
3961 Teach Functional.h about WeakPtr
3962 https://bugs.webkit.org/show_bug.cgi?id=107105
3964 Reviewed by Anders Carlsson.
3966 A common pattern in cross-thread communication is to call member
3967 functions of an object on a remote thread. If the caller's reference to
3968 the object on the remote thread is a WeakPtr, the caller usually wants
3969 to validate that the object still exists when the call actually takes
3972 It's possible to do this manually for every cross-thread call, but that
3973 is tiresome and error prone. Instead, we can teach bind to validate
3974 WeakPtr arguments when passed as the "this" parameter to a member
3978 (WTF::ParamStorageTraits::validate):
3980 2013-01-17 David Kilzer <ddkilzer@apple.com>
3982 Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
3983 <http://webkit.org/b/107126>
3985 Reviewed by Darin Adler.
3987 Fixes the following build error:
3989 Assertions.cpp:92:22: error: implicit conversion loses integer precision: 'CFIndex' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
3990 int length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(str), kCFStringEncodingUTF8);
3991 ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3994 * wtf/Assertions.cpp:
3995 (vprintf_stderr_common): Use CFIndex type instead of int for the
3996 return value of CFStringGetMaximumSizeForEncoding().
3998 2013-01-17 Zan Dobersek <zdobersek@igalia.com>
4000 [Autotools] Unify WTF sources list regardless of the target OS, Unicode backend
4001 https://bugs.webkit.org/show_bug.cgi?id=105886
4003 Reviewed by Gustavo Noronha Silva.
4005 Rather than including files in the sources list in an OS-specific way,
4006 guard specific files with OS(UNIX|WINDOWS), USE((GLIB|ICU)_UNICODE) guards
4007 and include all of them in the list.
4009 Proper comments for namespace and #if guard closings are also added or adjusted
4010 where necessary in the affected files.
4012 * GNUmakefile.list.am:
4013 * wtf/OSAllocatorPosix.cpp: Add OS(UNIX) guards.
4014 * wtf/OSAllocatorWin.cpp: Add OS(WINDOWS) guards.
4015 * wtf/ThreadSpecificWin.cpp: Ditto.
4016 * wtf/ThreadingWin.cpp: Ditto.
4017 * wtf/unicode/glib/UnicodeGLib.cpp: Add USE(GLIB_UNICODE) guards.
4019 * wtf/unicode/glib/UnicodeGLib.h: Ditto.
4021 * wtf/unicode/icu/CollatorICU.cpp: Style changes.
4022 * wtf/unicode/icu/UnicodeIcu.h: Add USE(ICU_UNICODE) guards.
4024 * wtf/win/OwnPtrWin.cpp: Add OS(WINDOWS) guards.
4026 2013-01-16 Benjamin Poulain <benjamin@webkit.org>
4028 Use GCC's implementation of atomicIncrement/Decrement on Mac
4029 https://bugs.webkit.org/show_bug.cgi?id=106976
4031 Reviewed by Filip Pizlo.
4034 GCC and LLVM have builtin for atomic ADD and SUB: __sync_add_and_fetch,
4035 __sync_sub_and_fetch.
4037 Using them let the compiler just generate the atomic operations inline
4038 instead of generating a function call to LibC. It also simplify the
4041 2013-01-15 Adam Barth <abarth@webkit.org>
4043 Generalize DocumentWeakReference into WTF::WeakPtr
4044 https://bugs.webkit.org/show_bug.cgi?id=106854
4046 Reviewed by Darin Adler.
4048 This patch adds a simple WeakPtr object to WTF. To use WeakPtr, objects
4049 must hold a WeakPtrFactory member variable, which clears the WeakPtrs
4050 when the object is destructed. The underlying storage is a
4051 ThreadSafeRefCounted "WeakReference" object, which is shared by all the
4054 WeakPtr is a generalization of DocumentWeakReference, which is used to
4055 check whether the Document object is alive when tasks arive on the main
4056 thread from worker threads. We plan to use a similar pattern in the
4057 threaded HTML parser, but we want to send tasks to objects other than
4060 * GNUmakefile.list.am:
4063 * WTF.vcproj/WTF.vcproj:
4064 * WTF.xcodeproj/project.pbxproj:
4065 * wtf/CMakeLists.txt:
4066 * wtf/WeakPtr.h: Added.
4068 - The ThreadSafeRefCounted object shared by all the WeakPtr
4069 instances. This patch uses ThreadSafeRefCounted so that we can
4070 use WeakPtrs to cancel cross-thread messages.
4071 (WTF::WeakReference::create):
4072 (WTF::WeakReference::get):
4073 (WTF::WeakReference::clear):
4074 - When the object is destroyed, WeakPtrFactory calls this function
4075 to clear all the WeakPtrs.
4076 (WTF::WeakReference::WeakReference):
4077 (WTF::WeakPtr::WeakPtr):
4078 (WTF::WeakPtr::get):
4079 - We might want to add implicit conversions and Boolean operators
4080 in the future, but I've kept this class simple for now.
4081 (WTF::WeakPtrFactory::WeakPtrFactory):
4082 (WTF::WeakPtrFactory::~WeakPtrFactory):
4083 (WTF::WeakPtrFactory::createWeakPtr):
4085 2013-01-12 Csaba Osztrogonác <ossy@webkit.org>
4087 Use __sync_add_and_fetch instead of __gnu_cxx::__exchange_and_add
4088 https://bugs.webkit.org/show_bug.cgi?id=106729
4090 After r139514 we need atomicIncrement(int64_t volatile*) for all platform. Now the
4091 GCC implementation of atomicIncrement() is based on __gnu_cxx::__exchange_and_add,
4092 which doesn't support int64_t type, but __sync_add_and_fetch does.
4094 Reviewed by Benjamin Poulain.
4097 (WTF::atomicIncrement):
4098 (WTF::atomicDecrement):
4100 2013-01-11 Filip Pizlo <fpizlo@apple.com>
4102 Add WTF_EXPORT_PRIVATE to printInternal() methods of PrintStream.h
4104 Rubber stamped by Mark Hahnenberg.
4106 This will make it easier to use dataLog() from WebCore.
4108 * wtf/PrintStream.h:
4111 2013-01-09 Antti Koivisto <antti@apple.com>
4113 Release FastMalloc thread caches on memory warning
4114 https://bugs.webkit.org/show_bug.cgi?id=106471
4116 Reviewed by Geoff Garen.
4118 Use TCMalloc_ThreadCache::Cleanup() instead of calling Scavenge() twice. This releases all the memory
4119 and looks nicer too.
4121 * wtf/FastMalloc.cpp:
4122 (WTF::releaseFastMallocFreeMemory):
4124 2013-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
4126 Unreviewed. Fix make distcheck.
4128 * GNUmakefile.list.am: Add missing header.
4130 2013-01-07 Filip Pizlo <fpizlo@apple.com>
4132 Rationalize closure call heuristics and profiling
4133 https://bugs.webkit.org/show_bug.cgi?id=106270
4135 Reviewed by Oliver Hunt.
4137 Add a macro to add a method to a class that returns a dumper. Allows you to have
4138 secondary dump() methods for dumping either more or less information.
4140 * wtf/PrintStream.h:
4143 2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
4145 Sorted the xcodeproj file.
4147 * WTF.xcodeproj/project.pbxproj:
4149 2013-01-07 Filip Pizlo <fpizlo@apple.com>
4151 Unreviewed, it should be possible to build JSC on ARM.
4153 * wtf/FastMalloc.cpp:
4154 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
4156 2013-01-07 Balazs Kilvady <kilvadyb@homejinni.com>
4158 MIPS LLInt implementation.
4159 https://bugs.webkit.org/show_bug.cgi?id=99706
4161 Reviewed by Filip Pizlo.
4163 LLInt implementation for MIPS.
4167 2013-01-05 Jonathan Liu <net147@gmail.com>
4169 Only enable MinGW-w64 pow() workaround if needed
4170 https://bugs.webkit.org/show_bug.cgi?id=106099
4172 Reviewed by Filip Pizlo.
4174 The pow() workaround is no longer needed in the latest version
4179 2013-01-05 Jonathan Liu <net147@gmail.com>
4181 Fix compilation of MathExtras.h with MinGW-w64
4182 https://bugs.webkit.org/show_bug.cgi?id=106105
4184 Reviewed by Simon Hausmann.
4186 The isfinite and isinf functions are required by wtf_pow but
4187 not defined until after wtf_pow. Move wtf_pow to after
4188 "using std::isfinite" and "using std::isinf" to fix compilation.
4193 2013-01-03 Filip Pizlo <fpizlo@apple.com>
4195 CallLinkStatus should be aware of closure calls, and the DFG bytecode parser should use that as its sole internal notion of how to optimize calls
4196 https://bugs.webkit.org/show_bug.cgi?id=106027
4198 Reviewed by Mark Hahnenberg.
4200 I got tired of the various idioms for printing a list of things with comma in between, so I wrote a helper.
4202 * WTF.xcodeproj/project.pbxproj:
4203 * wtf/CommaPrinter.h: Added.
4206 (WTF::CommaPrinter::CommaPrinter):
4207 (WTF::CommaPrinter::dump):
4209 2013-01-02 Simon Hausmann <simon.hausmann@digia.com>
4211 [MinGW-w64] Centralize workaround for pow() implementation
4212 https://bugs.webkit.org/show_bug.cgi?id=105925
4214 Reviewed by Sam Weinig.
4216 As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h
4217 away from the JSC usage.
4222 2013-01-02 Adam Barth <abarth@webkit.org>
4224 WTF.gypi lists Platform.h twice
4225 https://bugs.webkit.org/show_bug.cgi?id=105731
4227 Reviewed by Tony Chang.
4229 Once ought to be enough for everybody.
4233 2012-12-31 Gavin Barraclough <barraclough@apple.com>
4235 Objective-C API for JavaScriptCore
4236 https://bugs.webkit.org/show_bug.cgi?id=105889
4238 Reviewed by Filip Pizlo.
4240 * wtf/WTFThreadData.cpp:
4241 (WTF::WTFThreadData::WTFThreadData):
4242 * wtf/WTFThreadData.h:
4244 - Added m_apiData - provide convenient storage for use by the API.
4246 2012-12-28 Ilya Tikhonovsky <loislo@chromium.org>
4248 Web Inspector: Native Memory Instrumentation: instrument not instrumented members.
4249 https://bugs.webkit.org/show_bug.cgi?id=105830
4251 Reviewed by Vsevolod Vlasov.
4253 In some cases we don't want to visit some class members.
4254 As example we decided to skip pointers to interface classes such as GraphicLayerClient.
4255 We could use addWeakPointer for them but it can't be used for nonpointer members.
4256 In the offline discussion we came to a conclusion that we need a new instrumentation
4257 method ignoreMember, which will be used for all the members which we won't like to visit/instrument.
4259 DriveBy: Also I instrumented not yet instrumented members.
4261 * wtf/MemoryInstrumentation.h:
4263 (WTF::MemoryClassInfo::ignoreMember):
4265 2012-12-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
4267 Fix build warning in OSAllocatorPosix.cpp
4268 https://bugs.webkit.org/show_bug.cgi?id=105761
4270 Reviewed by Kentaro Hara.
4272 * wtf/OSAllocatorPosix.cpp:
4273 (WTF::OSAllocator::reserveUncommitted): Fix unused param warnings.
4275 2012-12-24 Yury Semikhatsky <yurys@chromium.org>
4277 Memory instrumentation: provide a way to mark a node as a root
4278 https://bugs.webkit.org/show_bug.cgi?id=105737
4280 Reviewed by Alexander Pavlov.
4282 Objects added using MemoryInstrumentation::addRootObject will be marked as roots.
4284 * wtf/MemoryInstrumentation.cpp:
4285 (WTF::MemoryInstrumentation::WrapperBase::process):
4287 (WTF::MemoryInstrumentation::WrapperBase::processPointer):
4288 (WTF::MemoryInstrumentation::WrapperBase::processRootObjectRef):
4289 * wtf/MemoryInstrumentation.h: