1 2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
3 Fix iOS build after r176971.
5 I had previously modified the WTF forwarding header instead of modifying the real source.
7 * wtf/unicode/CharacterNames.h:
9 2014-12-08 Anders Carlsson <andersca@apple.com>
11 Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
12 https://bugs.webkit.org/show_bug.cgi?id=139410
14 Reviewed by Andreas Kling.
16 * wtf/CurrentTime.cpp:
17 (WTF::currentCPUTime):
18 (WTF::currentCPUTimeMS): Deleted.
21 2014-12-08 Chris Dumez <cdumez@apple.com>
23 Revert r176293 & r176275
25 Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
26 instead of size_t. There is some disagreement regarding the long-term direction
27 of the API and we shouldn’t leave the API partly transitioned to unsigned type
28 while making a decision.
32 (WTF::VectorTypeOperations::compare):
33 (WTF::VectorBufferBase::allocateBuffer):
34 (WTF::VectorBufferBase::tryAllocateBuffer):
35 (WTF::VectorBufferBase::shouldReallocateBuffer):
36 (WTF::VectorBufferBase::reallocateBuffer):
37 (WTF::VectorBufferBase::capacity):
38 (WTF::VectorBufferBase::VectorBufferBase):
39 (WTF::VectorBuffer::VectorBuffer):
40 (WTF::VectorBuffer::allocateBuffer):
41 (WTF::VectorBuffer::tryAllocateBuffer):
42 (WTF::VectorBuffer::shouldReallocateBuffer):
43 (WTF::VectorBuffer::reallocateBuffer):
44 (WTF::VectorBuffer::swap):
45 (WTF::VectorBuffer::swapInlineBuffer):
46 (WTF::VectorBuffer::swapInlineBuffers):
47 (WTF::Vector::Vector):
48 (WTF::Vector::capacity):
50 (WTF::Vector::operator[]):
51 (WTF::OverflowHandler>::find):
52 (WTF::OverflowHandler>::reverseFind):
53 (WTF::OverflowHandler>::fill):
54 (WTF::OverflowHandler>::expandCapacity):
55 (WTF::OverflowHandler>::tryExpandCapacity):
56 (WTF::OverflowHandler>::resize):
57 (WTF::OverflowHandler>::resizeToFit):
58 (WTF::OverflowHandler>::shrink):
59 (WTF::OverflowHandler>::grow):
60 (WTF::OverflowHandler>::reserveCapacity):
61 (WTF::OverflowHandler>::tryReserveCapacity):
62 (WTF::OverflowHandler>::reserveInitialCapacity):
63 (WTF::OverflowHandler>::shrinkCapacity):
64 (WTF::OverflowHandler>::append):
65 (WTF::OverflowHandler>::tryAppend):
66 (WTF::OverflowHandler>::insert):
67 (WTF::OverflowHandler>::insertVector):
68 (WTF::OverflowHandler>::remove):
69 (WTF::OverflowHandler>::reverse):
70 (WTF::OverflowHandler>::checkConsistency):
71 * wtf/text/AtomicString.h:
72 * wtf/text/StringImpl.h:
73 (WTF::StringImpl::adopt):
74 (WTF::equalIgnoringNullity):
75 * wtf/text/StringView.h:
77 * wtf/text/WTFString.h:
79 2014-12-07 Andreas Kling <akling@apple.com>
81 Use more PassRef in AtomicString.
82 <https://webkit.org/b/139319>
84 Reviewed by Antti Koivisto.
86 Make a pass over AtomicString and convert functions that return PassRefPtr
87 into returning RefPtr (where it may be null) and PassRef otherwise.
88 This allows the compiler to skip null checks in many places.
90 * wtf/text/AtomicString.cpp:
91 (WTF::addToStringTable):
92 (WTF::AtomicString::add):
93 (WTF::AtomicString::addFromLiteralData):
94 (WTF::AtomicString::addSlowCase):
95 * wtf/text/AtomicString.h:
96 (WTF::AtomicString::add):
97 (WTF::AtomicString::addWithStringTableProvider):
98 * wtf/text/cf/AtomicStringCF.cpp:
99 (WTF::AtomicString::add):
101 2014-12-05 Roger Fong <roger_fong@apple.com>
103 [Win] proj files copying over too many resources..
104 https://bugs.webkit.org/show_bug.cgi?id=139315.
105 <rdar://problem/19148278>
107 Reviewed by Brent Fulgham.
109 * WTF.vcxproj/WTF.proj: Only copy WTF.dll.
111 2014-12-05 Andreas Kling <akling@apple.com>
113 PassRef should deref on destruction if pointee was not moved.
114 <https://webkit.org/b/139309>
116 Reviewed by Antti Koivisto.
118 Let PassRef become nullptr internally after having WTF::move()'d the pointee.
119 This means that PassRef is now essentially a PassRefPtr that can only be
120 constructed with a non-null pointee.
122 This should make it possible for all ::create()-style construction helpers to
123 return PassRef, removing a branch in each case.
126 (WTF::PassRef<T>::PassRef):
127 (WTF::PassRef<T>::~PassRef):
128 (WTF::PassRef<T>::get):
129 (WTF::PassRef<T>::ptr):
130 (WTF::PassRef<T>::leakRef):
131 (WTF::PassRef<T>::dropRef): Deleted.
133 2014-12-05 Jer Noble <jer.noble@apple.com>
135 [WTF] MediaTime should support round-tripping from and to doubles.
136 https://bugs.webkit.org/show_bug.cgi?id=139248
138 Reviewed by Eric Carlson.
140 MediaTimes should be able to return precisely the same double value as was used
141 when the MediaTime was created, so long as that MediaTime was not modified in a
142 non-destructive way. This will allow API which accepts floating-point values to
143 return the exact same value when asked, but still be able to store that value
147 (WTF::MediaTime::createWithFloat): Added; store the floating-point value in a union.
148 (WTF::MediaTime::createWithDouble): Ditto.
149 (WTF::MediaTime::toFloat): If the value is a double, just return it.
150 (WTF::MediaTime::toDouble): Ditto.
151 (WTF::MediaTime::operator+): Special case when one or both sides are doubles.
152 (WTF::MediaTime::operator-): Ditto.
153 (WTF::MediaTime::operator*): Ditto.
154 (WTF::MediaTime::compare): Ditto.
156 (WTF::MediaTime::setTimeScale): Convert the MediaTime from a double.
158 2014-12-05 peavo@outlook.com <peavo@outlook.com>
160 [WinCairo] WTF project is missing a GStreamer source file.
161 https://bugs.webkit.org/show_bug.cgi?id=139296
163 Reviewed by Philippe Normand.
165 The WTF project file is missing a GStreamer source file,
166 causing a link error when compiling with GStreamer enabled.
168 * WTF.vcxproj/WTF.vcxproj:
169 * WTF.vcxproj/WTF.vcxproj.filters:
171 2014-12-04 David Kilzer <ddkilzer@apple.com>
173 REGRESSION (r176683): RefCounter.h is installed outside SDKROOT
175 * WTF.xcodeproj/project.pbxproj: Don't mark RefCounter.h as a
176 private header. WTF headers use a special build phase script to
179 2014-12-04 Anders Carlsson <andersca@apple.com>
181 Make API::String copy the underlying strings if needed, for thread safety
182 https://bugs.webkit.org/show_bug.cgi?id=139261
184 Reviewed by Sam Weinig.
187 (WTF::RefPtr<T>::leakRef):
188 Add a leakRef() to RefPtr so we don't have to go through PassRefPtr.
190 * wtf/text/WTFString.cpp:
191 (WTF::String::isSafeToSendToAnotherThread):
192 Check if the string is empty before checking whether it's in an atomic string table.
193 It's safe to send empty strings to other threads even if they're in the atomic string table
194 since they will never be deallocated.
196 2014-12-04 Csaba Osztrogonác <ossy@webkit.org>
198 Fix cast-align warning in StringImpl.h
199 https://bugs.webkit.org/show_bug.cgi?id=139222
201 Reviewed by Anders Carlsson.
203 * wtf/text/StringImpl.h:
204 (WTF::StringImpl::tailPointer):
206 2014-12-02 Mark Lam <mark.lam@apple.com>
208 Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
209 https://bugs.webkit.org/show_bug.cgi?id=138821
213 * WTF.vcxproj/WTF.vcxproj:
214 * WTF.vcxproj/WTF.vcxproj.filters:
215 * WTF.xcodeproj/project.pbxproj:
216 * wtf/IndexedIterator.h: Removed.
217 * wtf/RefCountedArray.h:
218 (WTF::RefCountedArray::RefCountedArray):
220 (WTF::Vector::Vector):
221 (WTF::Vector::begin):
223 (WTF::OverflowHandler>::Vector):
225 (WTF::OverflowHandler>::fill):
226 (WTF::OverflowHandler>::expandCapacity):
227 (WTF::OverflowHandler>::tryExpandCapacity):
228 (WTF::OverflowHandler>::resize):
229 (WTF::OverflowHandler>::shrink):
230 (WTF::OverflowHandler>::grow):
231 (WTF::OverflowHandler>::reserveCapacity):
232 (WTF::OverflowHandler>::tryReserveCapacity):
233 (WTF::OverflowHandler>::shrinkCapacity):
234 (WTF::OverflowHandler>::append):
235 (WTF::OverflowHandler>::tryAppend):
236 (WTF::OverflowHandler>::appendSlowCase):
237 (WTF::OverflowHandler>::uncheckedAppend):
238 (WTF::OverflowHandler>::appendVector):
239 (WTF::OverflowHandler>::insert):
240 (WTF::OverflowHandler>::insertVector):
241 (WTF::OverflowHandler>::remove):
243 2014-12-02 Oliver Hunt <oliver@apple.com>
247 * wtf/IndexedIterator.h:
249 2014-12-02 Gavin Barraclough <barraclough@apple.com>
251 Generalize PageActivityAssertionToken
252 https://bugs.webkit.org/show_bug.cgi?id=139106
254 Reviewed by Sam Weinig.
256 PageActivityAssertionToken is a RAII mechanism implementing a counter, used by PageThrottler
257 to count user visible activity in progress on the page (currently page load and media playback).
258 Use of an RAII type is prevents a number of possible errors, including double counting a single
259 media element, or failing to decrement the count after a media element has been deallocated.
261 The current implementation has a number of drawbacks that have been addressed by this refactoring:
262 - specific to single use in PageThrottler class - not reusable.
263 - incomplete encapsulation - the counter and WeakPtrFactory that comprise the current implementation
264 are not encapsulated (are in the client type, PageThrottler).
265 - tokens are not shared - PageActivityAssertionToken instances are managed by std::unique, every
266 increment requires an object allocation.
267 - redundancy - the current implementation uses a WeakPtr to safely reference the PageThrottler, this
268 is internally implemented using a reference counted type, resulting in two counters being
269 incremented (one in the PageActivityAssertionToken, one in the PageThrottler).
271 In the reimplementation:
272 - a callback is provided via a lambda function, which allows for easy reuse without a lot of
274 - the counter, callback and ownership of the otherwise weakly-owned token is encapsulated within the
276 - a single count within RefCounter::Count stores the counter value, and also manage the lifetime
278 - standard RefPtrs are used to manage references to the RefCounter::Count.
280 * WTF.xcodeproj/project.pbxproj:
281 - added RefCounter.cpp/.h
282 * wtf/RefCounter.cpp: Added.
283 (WTF::RefCounter::Count::ref):
284 - increment the counter.
285 (WTF::RefCounter::Count::deref):
286 - decrement the counter, and delete as necessary.
287 (WTF::RefCounter::RefCounter):
288 - create a RefCounter::Count.
289 (WTF::RefCounter::~RefCounter):
290 - eagerly delete the Counter if it has no references, otherwise let it be deleted on last deref.
291 * wtf/RefCounter.h: Added.
292 (WTF::RefCounter::Count::Count):
293 - initialize count to 0.
294 (WTF::RefCounter::RefCounter):
295 - takes a lambda to be called when the value changes.
296 (WTF::RefCounter::count):
297 - reference the counter (and in doing so increment the count).
298 (WTF::RefCounter::value):
299 - access the current value of the counter.
301 2014-12-01 Andreas Kling <akling@apple.com>
303 Optimize constructing JSC::Identifier from AtomicString.
304 <https://webkit.org/b/139157>
306 Reviewed by Michael Saboff.
308 Make AtomicString::isInAtomicStringTable() public so it can be used
309 in some Identifier assertions.
311 * wtf/text/AtomicString.h:
313 2014-12-01 Oliver Hunt <oliver@apple.com>
317 * wtf/IndexedIterator.h:
319 2014-12-01 Oliver Hunt <oliver@apple.com>
323 * wtf/IndexedIterator.h:
325 2014-11-17 Oliver Hunt <oliver@apple.com>
327 Make sure range based iteration of Vector<> still receives bounds checking
328 https://bugs.webkit.org/show_bug.cgi?id=138821
330 Reviewed by Mark Lam.
332 Add a new IndexedIterator struct to WTF that wraps a
333 Vector type and index to provide pointer like semantics
334 while still performing runtime bounds checking, even in
335 release builds. We store a simple index into the vector
336 which means that this iterator allows vector resizing
337 during iteration. If the vector is resized such that the
338 iterator is out of bounds, then any attempt to dereference
339 the iterator will crash safely. Any other errors, including
340 overflows, and over extending the iterator will likewise
343 For the purpose of retaining semantically equivalent
344 behaviour, the iterator can be moved to m_index == size()
345 as that is the standard "end" terminator for these types.
346 Attempting to dereference at that point will still crash
347 rather than perform an unsafe memory operation.
349 In order to maintain the validity of all the bounds checking,
350 we perform full integer range checking prior to any mutation
351 of the iterator location. If we detect an arithmetic overflow
352 we will crash rather than attempting to carry on.
354 By necessity there are many overrides for operator + and - as
355 we otherwise hit many different type promotion ambiguities when
356 performing arithmetic with iterators. These ambiguities are also
357 different for 32- vs. 64-bit, so duplicating the functions
358 and then forwarding to the core implementations that performed
359 the bounds checking and mutation seemed like the right call.
361 * WTF.xcodeproj/project.pbxproj:
362 * wtf/IndexedIterator.h: Added.
363 (WTF::IndexedIterator::IndexedIterator):
364 (WTF::IndexedIterator::operator->):
365 (WTF::IndexedIterator::operator*):
366 (WTF::IndexedIterator::get):
367 (WTF::IndexedIterator::operator++):
368 (WTF::IndexedIterator::operator--):
369 (WTF::IndexedIterator::operator UnspecifiedBoolType):
370 (WTF::IndexedIterator::operator+=):
371 (WTF::IndexedIterator::operator-=):
372 (WTF::IndexedIterator::operator+):
373 (WTF::IndexedIterator::operator-):
374 (WTF::IndexedIterator::operator=):
375 (WTF::IndexedIterator::operator==):
376 (WTF::IndexedIterator::operator!=):
377 (WTF::IndexedIterator::operator<):
378 (WTF::IndexedIterator::operator<=):
379 (WTF::IndexedIterator::operator>):
380 (WTF::IndexedIterator::operator>=):
381 (WTF::IndexedIterator::operator const_iterator):
382 (WTF::IndexedIterator::isSafeToCompare):
383 (WTF::IndexedIterator::unsafeGet):
392 (WTF::IndexedIteratorSelector::makeIterator):
393 (WTF::IndexedIteratorSelector::makeConstIterator):
394 * wtf/RefCountedArray.h:
395 (WTF::RefCountedArray::RefCountedArray):
397 (WTF::Vector::Vector):
398 (WTF::Vector::begin):
400 (WTF::OverflowHandler>::Vector):
402 (WTF::OverflowHandler>::fill):
403 (WTF::OverflowHandler>::expandCapacity):
404 (WTF::OverflowHandler>::tryExpandCapacity):
405 (WTF::OverflowHandler>::resize):
406 (WTF::OverflowHandler>::shrink):
407 (WTF::OverflowHandler>::grow):
408 (WTF::OverflowHandler>::reserveCapacity):
409 (WTF::OverflowHandler>::tryReserveCapacity):
410 (WTF::OverflowHandler>::shrinkCapacity):
411 (WTF::OverflowHandler>::append):
412 (WTF::OverflowHandler>::tryAppend):
413 (WTF::OverflowHandler>::appendSlowCase):
414 (WTF::OverflowHandler>::uncheckedAppend):
415 (WTF::OverflowHandler>::appendVector):
416 (WTF::OverflowHandler>::insert):
417 (WTF::OverflowHandler>::insertVector):
418 (WTF::OverflowHandler>::remove):
420 2014-11-30 Ryuan Choi <ryuan.choi@navercorp.com>
422 [EFL] Drop support for the EFL 1.7
423 https://bugs.webkit.org/show_bug.cgi?id=139114
425 Reviewed by Gyuyoung Kim.
427 * wtf/efl/EflTypedefs.h: Removed old definitions which EFL 1.7 used.
429 2014-11-21 Anders Carlsson <andersca@apple.com>
431 Remove the Timer parameters from timer callbacks
432 https://bugs.webkit.org/show_bug.cgi?id=138974
434 Reviewed by Antti Koivisto.
436 * wtf/RunLoopTimer.h:
437 (WTF::RunLoopTimer::RunLoopTimer):
438 (WTF::RunLoopTimer::fired):
440 2014-11-18 Chris Dumez <cdumez@apple.com>
442 Have Vector::capacity() return an unsigned instead of a size_t
443 https://bugs.webkit.org/show_bug.cgi?id=138842
445 Reviewed by Andreas Kling.
447 Have Vector::capacity() return an unsigned instead of a size_t as
448 capacity is stored as an unsigned internally.
451 (WTF::Vector::capacity):
452 (WTF::OverflowHandler>::expandCapacity):
453 (WTF::OverflowHandler>::tryExpandCapacity):
455 2014-11-18 Geoffrey Garen <ggaren@apple.com>
457 Removed the custom allocator for ListHashSet nodes
458 https://bugs.webkit.org/show_bug.cgi?id=138841
460 Reviewed by Andreas Kling.
462 bmalloc is fast, so we don't need a custom allocator.
464 The MallocBench test for linked list node allocation (list_allocate) is
465 4.09X faster in bmalloc than TCMalloc. Also, I wrote a stress test to
466 add/remove link elements, which modify a ListHashSet on insertion and
467 removal, and it was 1% faster / in the noise with bmalloc enabled.
470 (WTF::ListHashSetNode::ListHashSetNode):
471 (WTF::ListHashSetTranslator::translate):
472 (WTF::U>::ListHashSet):
475 (WTF::U>::~ListHashSet):
480 (WTF::U>::removeFirst):
481 (WTF::U>::takeFirst):
483 (WTF::U>::removeLast):
489 (WTF::U>::unlinkAndDelete):
490 (WTF::U>::appendNode):
491 (WTF::U>::prependNode):
492 (WTF::U>::insertNodeBefore):
493 (WTF::U>::deleteAllNodes):
494 (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Deleted.
495 (WTF::ListHashSetNodeAllocator::allocate): Deleted.
496 (WTF::ListHashSetNodeAllocator::deallocate): Deleted.
497 (WTF::ListHashSetNodeAllocator::pool): Deleted.
498 (WTF::ListHashSetNodeAllocator::pastPool): Deleted.
499 (WTF::ListHashSetNodeAllocator::inPool): Deleted.
500 (WTF::ListHashSetNode::operator new): Deleted.
501 (WTF::ListHashSetNode::destroy): Deleted.
503 2014-11-18 Chris Dumez <cdumez@apple.com>
505 Update the Vector API to deal with unsigned types instead of size_t
506 https://bugs.webkit.org/show_bug.cgi?id=138824
508 Reviewed by Andreas Kling.
510 Update part of the Vector API to deal with unsigned types instead of
511 size_t. The Vector class is already using unsigned type for its
512 capacity and size data members. However, the Vector API was never
515 The rest of the Vector API will be ported in follow-up patches to
516 make the change smaller and more easily reviewable.
520 (WTF::VectorTypeOperations::compare):
521 (WTF::VectorBufferBase::allocateBuffer):
522 (WTF::VectorBufferBase::tryAllocateBuffer):
523 (WTF::VectorBufferBase::shouldReallocateBuffer):
524 (WTF::VectorBufferBase::reallocateBuffer):
525 (WTF::VectorBufferBase::capacity):
526 (WTF::VectorBufferBase::VectorBufferBase):
527 (WTF::VectorBuffer::VectorBuffer):
528 (WTF::VectorBuffer::allocateBuffer):
529 (WTF::VectorBuffer::tryAllocateBuffer):
530 (WTF::VectorBuffer::shouldReallocateBuffer):
531 (WTF::VectorBuffer::reallocateBuffer):
532 (WTF::VectorBuffer::swap):
533 (WTF::VectorBuffer::swapInlineBuffer):
534 (WTF::VectorBuffer::swapInlineBuffers):
535 (WTF::Vector::Vector):
537 (WTF::Vector::operator[]):
538 (WTF::OverflowHandler>::find):
539 (WTF::OverflowHandler>::reverseFind):
540 (WTF::OverflowHandler>::fill):
541 (WTF::OverflowHandler>::expandCapacity):
542 (WTF::OverflowHandler>::tryExpandCapacity):
543 (WTF::OverflowHandler>::resize):
544 (WTF::OverflowHandler>::resizeToFit):
545 (WTF::OverflowHandler>::shrink):
546 (WTF::OverflowHandler>::grow):
547 (WTF::OverflowHandler>::reserveCapacity):
548 (WTF::OverflowHandler>::tryReserveCapacity):
549 (WTF::OverflowHandler>::reserveInitialCapacity):
550 (WTF::OverflowHandler>::shrinkCapacity):
551 (WTF::OverflowHandler>::append):
552 (WTF::OverflowHandler>::tryAppend):
553 (WTF::OverflowHandler>::insert):
554 (WTF::OverflowHandler>::insertVector):
555 (WTF::OverflowHandler>::remove):
556 (WTF::OverflowHandler>::reverse):
557 (WTF::OverflowHandler>::checkConsistency):
558 * wtf/text/AtomicString.h:
559 * wtf/text/StringImpl.h:
560 (WTF::StringImpl::adopt):
561 (WTF::equalIgnoringNullity):
562 * wtf/text/StringView.h:
564 * wtf/text/WTFString.h:
566 2014-11-18 peavo@outlook.com <peavo@outlook.com>
568 [WinCairo] Compile errors when GStreamer is enabled.
569 https://bugs.webkit.org/show_bug.cgi?id=137000
571 Reviewed by Philippe Normand.
573 MSVC does not allow the keyword default on move constructors and move assignment operators.
575 * wtf/gobject/GMainLoopSource.cpp:
576 (WTF::GMainLoopSource::cancel):
577 (WTF::GMainLoopSource::socketCallback):
578 * wtf/gobject/GMainLoopSource.h:
579 (WTF::GMainLoopSource::Context::operator=):
581 2014-11-17 Anders Carlsson <andersca@apple.com>
583 Fix WTF build with newer versions of clang.
584 <rdar://problem/18978705>
587 (WTF::removeIterator):
589 (WTF::double_conversion::BitCast):
591 2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
593 Allow constructing a base PassRef with a derived Ref
594 https://bugs.webkit.org/show_bug.cgi?id=138701
596 Reviewed by Andreas Kling
599 (WTF::PassRef<T>::PassRef):
601 2014-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
603 [EFL] Fix the build with EFL 1.12
604 https://bugs.webkit.org/show_bug.cgi?id=138245
606 Reviewed by Gyuyoung Kim.
608 * wtf/efl/UniquePtrEfl.h:
609 Removed Evas_GL.h from UniquePtrEfl.h, which is commonly included, because
610 it should not be included with official GL headers.
612 2014-11-12 Mark Lam <mark.lam@apple.com>
614 Rename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
615 <https://webkit.org/b/138661>
617 Reviewed by Michael Saboff.
619 Also move the switch for enabling the use of MASM_PROBE from JavaScriptCore's
620 config.h to WTF's Platform.h. This ensures that the setting is consistently
621 applied even when building WebCore parts as well.
625 2014-11-09 Antti Koivisto <antti@apple.com>
627 Remove BloomFilter size limit
628 https://bugs.webkit.org/show_bug.cgi?id=138549
630 Reviewed by Andreas Kling.
632 * wtf/BloomFilter.h: Remove the static_assert, the code works fine with somewhat larger sizes.
634 2014-11-09 Chris Dumez <cdumez@apple.com>
636 Add a more correct way to compare floating point numbers and use it
637 https://bugs.webkit.org/show_bug.cgi?id=138527
639 Reviewed by Darin Adler.
641 To compare floating point numbers in the code base, we would often rely
642 on the following check:
643 std::abs(a - b) <= std::numeric_limits<T>::epsilon()
645 However, this is not correct for arbitrary floating point values, and
646 will fail for values that are not close to zero.
648 This patch introduces a WTF::areEssentiallyEqual() templated function
649 that can only be called with floating point types and relies on the
650 following formula from [1][2] that defines u as being "essentially
651 equal" to v if: | u - v | / |u| <= e and | u - v | / |v| <= e
653 [1] Knuth, D. E. "Accuracy of Floating Point Arithmetic." The Art of
654 Computer Programming. 3rd ed. Vol. 2. Boston: Addison-Wesley, 1998.
656 [2] http://www.boost.org/doc/libs/1_34_0/libs/test/doc/components/test_tools/floating_point_comparison.html
659 (WTF::safeFPDivision):
660 (WTF::areEssentiallyEqual):
661 (WTF::withinEpsilon): Deleted.
663 2014-11-08 Darin Adler <darin@apple.com>
665 Replace FileThread class with a single function
666 https://bugs.webkit.org/show_bug.cgi?id=138282
668 Reviewed by Alexey Proskuryakov.
670 * wtf/MessageQueue.h: Made queue work on any type and not require wrapping
671 everything in a unique_ptr.
674 (WTF::threadEntryPoint): Changed to use a std::function instead of a function pointer.
675 (WTF::createThread): Add a version that takes a std::function. Reimplemented the
676 old version using lambdas. Removed the obsolete versions that were there just to support
677 binary compatibility with very old versions of Safari.
679 * wtf/Threading.h: Removed an incorrect license header that covers code that was long ago
680 moved to a different file. Changed createThread to take a std::function instead of a function
681 pointer and data pointer. Moved internal functions after public functions.
683 2014-11-05 Chris Dumez <cdumez@apple.com>
685 Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
686 https://bugs.webkit.org/show_bug.cgi?id=138440
688 Reviewed by Geoffrey Garen.
690 Move the withinEpsilon() function to WTF to avoid code duplication.
693 (WTF::withinEpsilon):
695 2014-11-05 Chris Dumez <cdumez@apple.com>
697 Allow constructing a PassRef from a Ref
698 https://bugs.webkit.org/show_bug.cgi?id=138389
700 Reviewed by Andreas Kling.
702 Allow constructing a PassRef from a Ref, similarly to PassRefPtr that
703 can be constructed from a RefPtr already. This avoids having to call
704 Ref::get() and simplifies the code a bit.
707 (WTF::PassRef<T>::PassRef):
709 2014-11-05 Dan Bernstein <mitz@apple.com>
711 Remove the unused deletion UI feature
712 https://bugs.webkit.org/show_bug.cgi?id=138442
714 Rubber-stamped by Alexey Proskuryakov.
716 * wtf/FeatureDefines.h: Removed definition of ENABLE_DELETION_UI.
718 2014-11-03 Dean Jackson <dino@apple.com>
720 Add ENABLE_FILTERS_LEVEL_2 feature guard.
721 https://bugs.webkit.org/show_bug.cgi?id=138362
723 Reviewed by Tim Horton.
725 Add a new feature define for Level 2 of CSS Filters.
726 http://dev.w3.org/fxtf/filters-2/
728 * wtf/FeatureDefines.h:
730 2014-11-05 Csaba Osztrogonác <ossy@webkit.org>
732 Enable ARMv7 disassembler for all platforms
733 https://bugs.webkit.org/show_bug.cgi?id=138415
735 Reviewed by Darin Adler.
739 2014-11-04 Chris Dumez <cdumez@apple.com>
741 Add ptr() method to Ref class
742 https://bugs.webkit.org/show_bug.cgi?id=138361
744 Reviewed by Darin Adler.
746 It is a very common pattern in our code base to get a pointer from a
747 Ref object. Previously, we have to call Ref.get() and take its address
748 which is not very nice. This patch adds a ptr() method to Ref class
749 to simplify the code a bit.
752 (WTF::PassRef<T>::ptr):
755 (WTF::GetPtrHelper<Ref<T>>::getPtr):
757 2014-11-04 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
759 ATTR_USED incorrectly applying to Clang
760 https://bugs.webkit.org/show_bug.cgi?id=138313
762 Reviewed by Csaba Osztrogonác.
764 ATTR_USED was only intended for GCC. Also limit it to ENABLE(FTL_NATIVE_CALL_INLINING)
765 since that's the only thing it's needed for.
769 2014-11-03 Chris Dumez <cdumez@apple.com>
771 Allow implicit conversion from Ref<T> to T&
772 https://bugs.webkit.org/show_bug.cgi?id=138331
774 Reviewed by Andreas Kling.
776 Allow implicit conversion from Ref<T> to T& to reduce the amount of
777 Ref<>::get() calls in the code and increase readability. Unlike for
778 RefPtr, doing this for Ref should not be error prone.
781 (WTF::Ref::operator T&):
782 (WTF::Ref::operator const T&):
784 (WTF::RunLoop::Holder::runLoop):
786 2014-10-31 Jeffrey Pfau <jpfau@apple.com>
788 Unreviewed, fix ASan build after r175382
790 * wtf/SizeLimits.cpp:
792 2014-10-31 Geoffrey Garen <ggaren@apple.com>
796 WebKit was failing to build 32bit on some Apple internal systems because
797 those systems were configured to build bmalloc 64-bit-only. Those systems
798 have been updated to build bmalloc as a universal binary, so everything
799 should work fine now.
801 The relevant setting is controlled by an environment variable on the
802 build system, and not by the project file in the source tree, so there's
803 no new code change here.
805 Enable bmalloc in 32bit builds
806 https://bugs.webkit.org/show_bug.cgi?id=138232
808 Reviewed by Andreas Kling.
810 * wtf/FastMalloc.cpp:
812 2014-10-31 Lucas Forschler <lforschler@apple.com>
814 Unreviewed rollout r175389.
816 2014-10-30 Dana Burkart <dburkart@apple.com>
818 <rdar://problem/18821260> Prepare for the mysterious future
820 Reviewed by Lucas Forschler.
822 * Configurations/Base.xcconfig:
823 * Configurations/DebugRelease.xcconfig:
825 2014-10-30 Geoffrey Garen <ggaren@apple.com>
827 Enable bmalloc in 32bit builds
828 https://bugs.webkit.org/show_bug.cgi?id=138232
830 Reviewed by Andreas Kling.
834 * wtf/FastMalloc.cpp:
836 2014-10-30 Jeffrey Pfau <jpfau@apple.com>
838 ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
839 https://bugs.webkit.org/show_bug.cgi?id=138141
841 Reviewed by Alexey Proskuryakov.
844 (WTF::RefCountedBase::ref):
845 (WTF::RefCountedBase::relaxAdoptionRequirement):
846 (WTF::RefCountedBase::derefBase):
849 2014-10-28 Milan Crha <mcrha@redhat.com>
851 Use constants from wtf/MathExtras.h
852 https://bugs.webkit.org/show_bug.cgi?id=137967
854 Reviewed by Darin Adler.
858 2014-10-28 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
860 [EFL] Remove unnecessary defines from OptionsEfl.cmake
861 https://bugs.webkit.org/show_bug.cgi?id=138132
863 Reviewed by Csaba Osztrogonác.
867 2014-10-27 Chris Dumez <cdumez@apple.com>
869 Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
870 https://bugs.webkit.org/show_bug.cgi?id=138079
872 Reviewed by Anders Carlsson.
874 Add HashTraits for C++11 strong enum types. Using integer HashTraits for
875 strong enums would be inconvenient as it would require casting between
876 integer and strong enum types.
879 (WTF::StrongEnumHashTraits::emptyValue):
880 (WTF::StrongEnumHashTraits::constructDeletedValue):
881 (WTF::StrongEnumHashTraits::isDeletedValue):
883 2014-10-25 Brian J. Burg <burg@cs.washington.edu>
885 Web Inspector: timelines should not count time elapsed while paused in the debugger
886 https://bugs.webkit.org/show_bug.cgi?id=136351
888 Unreviewed, follow-up fix after r175203. The debugger agent should not assume
889 that the inspector environment's stopwatch has already been started.
892 (WTF::Stopwatch::isActive): Added. Allow peeking at the stopwatch state.
894 2014-10-18 Brian J. Burg <burg@cs.washington.edu>
896 Web Inspector: timelines should not count time elapsed while paused in the debugger
897 https://bugs.webkit.org/show_bug.cgi?id=136351
899 Reviewed by Timothy Hatcher.
901 * WTF.vcxproj/WTF.vcxproj:
902 * WTF.vcxproj/WTF.vcxproj.filters:
903 * WTF.xcodeproj/project.pbxproj:
904 * wtf/CMakeLists.txt:
905 * wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
906 (WTF::Stopwatch::create):
907 (WTF::Stopwatch::Stopwatch):
908 (WTF::Stopwatch::reset):
909 (WTF::Stopwatch::start):
910 (WTF::Stopwatch::stop):
911 (WTF::Stopwatch::elapsedTime):
913 2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
915 Web Inspector: Provide a way to have alternate inspector agents
916 https://bugs.webkit.org/show_bug.cgi?id=137901
918 Reviewed by Brian Burg.
920 * wtf/FeatureDefines.h:
922 2014-10-23 Alberto Garcia <berto@igalia.com>
924 [GTK] Fix build on Hurd
925 https://bugs.webkit.org/show_bug.cgi?id=138003
927 Reviewed by Carlos Garcia Campos.
932 2014-10-22 Byungseon Shin <sun.shin@lge.com>
934 String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
935 https://bugs.webkit.org/show_bug.cgi?id=130967
937 Reviewed by Mark Lam.
939 By definition of calculateLocalTimeOffset, input time should be UTC time.
940 But there are many cases when input time is based on local time.
941 So, it gives erroneous results while calculating offset of DST boundary time.
942 By adding a argument to distinguish UTC and local time, we can get the correct offset.
945 (WTF::calculateLocalTimeOffset):
946 (WTF::parseDateFromNullTerminatedCharacters):
947 Compensate time offset depends on UTC time or local time.
949 Add argument to differenciate UTC or local time.
951 2014-10-21 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
953 Fix FTL Native Inlining for EFL
954 https://bugs.webkit.org/show_bug.cgi?id=137774
956 Reviewed by Michael Saboff.
958 Updated guard definition for Native Inlining, and added an attribute define for marking functions
959 that should not be left out of the symbol table.
963 2014-10-20 Chris Dumez <cdumez@apple.com>
965 Use is<>() / downcast<>() for Accessibility objects
966 https://bugs.webkit.org/show_bug.cgi?id=137286
968 Reviewed by Darin Adler.
970 Remove the legacy TYPE_CASTS_BASE() macro now that it is no longer
975 2014-10-18 Dan Bernstein <mitz@apple.com>
977 WorkQueue dispatches functions but isn’t a FunctionDispatcher
978 https://bugs.webkit.org/show_bug.cgi?id=137853
980 Reviewed by Anders Carlsson.
982 * wtf/FunctionDispatcher.h: Added header guards.
984 2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
986 [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
987 https://bugs.webkit.org/show_bug.cgi?id=137782
989 Reviewed by Sergio Villar Senin.
991 In some cases when we have a double with the time in seconds, the
992 conversion to milliseconds ends up truncating the value to 0, and
993 the source scheduled immediately.
995 * wtf/gobject/GMainLoopSource.cpp:
996 (WTF::createMicrosecondsTimeoutSource): Use a custom timeout
997 source that handles the interval in microseconds instead of milliseconds.
998 (WTF::GMainLoopSource::scheduleAfterDelay): Use MicrosecondsTimeoutSource.
999 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy): Ditto.
1000 * wtf/gobject/GMainLoopSource.h:
1002 2014-10-17 Dan Bernstein <mitz@apple.com>
1004 Reverted incorrect build fix attempt.
1006 * wtf/Threading.cpp:
1008 2014-10-17 Dan Bernstein <mitz@apple.com>
1010 Tried to fix the Yosemite build.
1012 * wtf/Threading.cpp:
1014 2014-10-16 Dan Bernstein <mitz@apple.com>
1016 OSObjectPtr is missing leakRef()
1017 https://bugs.webkit.org/show_bug.cgi?id=137798
1019 Reviewed by Sam Weinig.
1021 * wtf/OSObjectPtr.h:
1023 2014-10-14 Brent Fulgham <bfulgham@apple.com>
1025 [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
1027 * WTF.vcxproj: Modified property svn:ignore.
1029 2014-10-13 Antti Koivisto <antti@apple.com>
1031 Add StringCapture helper for thread-safe lambda capture
1032 https://bugs.webkit.org/show_bug.cgi?id=137664
1034 Reviewed by Anders Carlsson.
1036 There is currently no clean way to capture a String in a thread-safe manner. This will now work:
1038 StringCapture stringCapture(string);
1039 auto lambdaThatRunsInAnotherThread = [stringCapture] { String string = stringCapture.string(); ... }
1041 This type won't be necessary with C++14 initialized lambda capture: [string = string.isolatedCopy()].
1043 * wtf/text/WTFString.h:
1044 (WTF::StringCapture::StringCapture): Create isolated copy in copy-constructor.
1045 (WTF::StringCapture::string):
1047 2014-10-11 KwangHyuk Kim <hyuki.kim@samsung.com>
1049 [EFL] Enable WebP support.
1050 https://bugs.webkit.org/show_bug.cgi?id=136156
1052 Reviewed by Gyuyoung Kim.
1054 Enable WTF_USE_WEBP macro for WK2 Efl.
1058 2014-10-11 Carlos Garcia Campos <cgarcia@igalia.com>
1060 [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
1061 https://bugs.webkit.org/show_bug.cgi?id=137485
1063 Reviewed by Sergio Villar Senin.
1065 We made GMainLoopSource thread safe, but in most of the cases we
1066 know the sources are used by a single thread, which has an impact
1067 in the performance (mutex, GCancellable, etc.). The new class
1068 GThreadSafeMainLoopSource inherits from GMainLoopSource overriding
1069 the new virtual methods and calling the parent for the common code.
1070 GMutexLocker now supports recursive mutexes, it's a template that
1071 can wrap a GMutex or a GRecMutex. GThreadSafeMainLoopSource uses a
1072 recursive mutex using the new GMutexLocker API.
1074 * wtf/PlatformEfl.cmake: Add new file to compilation.
1075 * wtf/PlatformGTK.cmake: Ditto.
1076 * wtf/gobject/GMainLoopSource.cpp:
1077 (WTF::GMainLoopSource::GMainLoopSource):
1078 (WTF::GMainLoopSource::~GMainLoopSource):
1079 (WTF::GMainLoopSource::cancel):
1080 (WTF::GMainLoopSource::schedule):
1081 (WTF::GMainLoopSource::scheduleAfterDelay):
1082 (WTF::GMainLoopSource::prepareVoidCallback):
1083 (WTF::GMainLoopSource::finishVoidCallback):
1084 (WTF::GMainLoopSource::voidCallback):
1085 (WTF::GMainLoopSource::prepareBoolCallback):
1086 (WTF::GMainLoopSource::finishBoolCallback):
1087 (WTF::GMainLoopSource::boolCallback):
1088 (WTF::GMainLoopSource::socketCallback):
1089 (WTF::GMainLoopSource::cancelWithoutLocking): Deleted.
1090 * wtf/gobject/GMainLoopSource.h:
1091 * wtf/gobject/GMutexLocker.h:
1092 (WTF::MutexWrapper<GMutex>::lock):
1093 (WTF::MutexWrapper<GMutex>::unlock):
1094 (WTF::MutexWrapper<GRecMutex>::lock):
1095 (WTF::MutexWrapper<GRecMutex>::unlock):
1096 (WTF::GMutexLocker::GMutexLocker):
1097 (WTF::GMutexLocker::lock):
1098 (WTF::GMutexLocker::unlock):
1099 * wtf/gobject/GThreadSafeMainLoopSource.cpp: Added.
1100 (WTF::GThreadSafeMainLoopSource::GThreadSafeMainLoopSource):
1101 (WTF::GThreadSafeMainLoopSource::~GThreadSafeMainLoopSource):
1102 (WTF::GThreadSafeMainLoopSource::cancel):
1103 (WTF::GThreadSafeMainLoopSource::schedule):
1104 (WTF::GThreadSafeMainLoopSource::scheduleAfterDelay):
1105 (WTF::GThreadSafeMainLoopSource::prepareVoidCallback):
1106 (WTF::GThreadSafeMainLoopSource::finishVoidCallback):
1107 (WTF::GThreadSafeMainLoopSource::voidCallback):
1108 (WTF::GThreadSafeMainLoopSource::prepareBoolCallback):
1109 (WTF::GThreadSafeMainLoopSource::finishBoolCallback):
1110 (WTF::GThreadSafeMainLoopSource::boolCallback):
1111 * wtf/gobject/GThreadSafeMainLoopSource.h: Added.
1113 2014-10-09 Dean Jackson <dino@apple.com>
1115 Remove ENABLE_CSS3_CONDITIONAL_RULES
1116 https://bugs.webkit.org/show_bug.cgi?id=137571
1118 Reviewed by Simon Fraser.
1120 * wtf/FeatureDefines.h:
1122 2014-10-09 Akos Kiss <akiss@inf.u-szeged.hu>
1124 Enable ARM64 disassembler for all platforms
1125 https://bugs.webkit.org/show_bug.cgi?id=137560
1127 Reviewed by Michael Saboff.
1129 Remove PLATFORM conditions from around WTF_USE_ARM64_DISASSEMBLER since
1130 the ARM64 disassembler has no platform dependencies anymore.
1134 2014-10-08 peavo@outlook.com <peavo@outlook.com>
1136 [WinCairo] Enable JIT on 32-bit.
1137 https://bugs.webkit.org/show_bug.cgi?id=137521
1139 Reviewed by Mark Lam.
1141 Enable JIT on Windows 32-bit, but disable it at runtime if SSE2 is not present.
1145 2014-10-08 Brent Fulgham <bfulgham@apple.com>
1147 [Win] Resolve warnings about missing __has_include macro under MSVC
1148 https://bugs.webkit.org/show_bug.cgi?id=137524
1150 Reviewed by Anders Carlsson.
1152 * wtf/Compiler.h: Provide a dummy implementation of __has_include that
1153 avoids the warning without changing compile behavior.
1155 2014-10-07 Brent Fulgham <bfulgham@apple.com>
1157 [Win] Resolve some MSVC static analyzer warnings
1158 https://bugs.webkit.org/show_bug.cgi?id=137504
1160 Reviewed by Dean Jackson.
1162 * wtf/GregorianDateTime.cpp:
1163 (WTF::GregorianDateTime::setToCurrentLocalTime): Properly handle
1164 possible timezone error case.
1165 * wtf/OSAllocatorWin.cpp:
1166 (WTF::OSAllocator::decommit): Silence a spurious warning about using
1167 MEM_DECOMMIT instead of MEM_RELEASE.
1168 * wtf/ThreadingWin.cpp: Silence a spurious warning about how the
1169 tryLock method is implemented.
1171 2014-10-07 Christophe Dumez <cdumez@apple.com>
1173 [WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses
1174 https://bugs.webkit.org/show_bug.cgi?id=137477
1176 Reviewed by Andreas Kling.
1178 Rename wtf/cf/TypeCasts.h to wtf/cf/TypeCastsCF.h to avoid conflict
1179 with wtf/TypeCasts.h. They were using the same #ifndef guard and it
1180 was causing problems when both were included in the same context.
1182 * WTF.xcodeproj/project.pbxproj:
1183 * wtf/cf/TypeCastsCF.h: Renamed from Source/WTF/wtf/cf/TypeCasts.h.
1184 (WTF::dynamic_cf_cast):
1185 (WTF::checked_cf_cast):
1187 2014-10-07 Anders Carlsson <andersca@apple.com>
1189 Try to fix the Mountain Lion build.
1191 * wtf/text/StringView.h:
1192 (WTF::StringView::underlyingStringIsValid):
1193 (WTF::StringView::setUnderlyingString):
1194 (WTF::StringView::invalidate):
1196 2014-10-07 Anders Carlsson <andersca@apple.com>
1198 Use "1", not "true".
1200 * wtf/text/StringView.h:
1202 2014-10-07 Anders Carlsson <andersca@apple.com>
1204 Temporarily disable the StringView lifetime checking.
1206 * wtf/text/StringView.h:
1208 2014-10-07 Anders Carlsson <andersca@apple.com>
1210 Another build fix attempt.
1212 * wtf/text/StringView.cpp:
1213 (WTF::StringView::UnderlyingString::UnderlyingString):
1215 2014-10-07 Anders Carlsson <andersca@apple.com>
1217 Try to fix the Windows build.
1219 * wtf/text/StringView.cpp:
1220 (WTF::StringView::UnderlyingString::UnderlyingString):
1222 2014-10-06 Darin Adler <darin@apple.com>
1224 Make StringView check the lifetime of the StringImpl it's created from
1225 https://bugs.webkit.org/show_bug.cgi?id=137202
1227 Reviewed by Anders Carlsson.
1229 * WTF.vcxproj/WTF.vcxproj: Added StringView.cpp.
1230 * WTF.vcxproj/WTF.vcxproj.filters: Added StringView.cpp.
1231 * WTF.xcodeproj/project.pbxproj: Added StringView.cpp.
1232 * wtf/CMakeLists.txt: Added StringView.cpp.
1234 * wtf/text/StringImpl.cpp:
1235 (WTF::StringImpl::~StringImpl): Call StringView::invalidate.
1237 * wtf/text/StringView.cpp: Added.
1238 (WTF::underlyingStrings): Returns map from StringImpl to the underlying
1239 string object used by StringView to track validity.
1240 (WTF::StringView::invalidate): Mark the underlying string object invalid,
1241 and remove it from the map, so any future StringImpl will get a new one,
1242 even if it has the same pointer.
1243 (WTF::StringView::underlyingStringIsValid): Return true only if the
1244 underlying string is still valid.
1245 (WTF::StringView::setUnderlyingString): Create and manage reference counts
1246 of underlying string objects as needed.
1248 * wtf/text/StringView.h: Moved function bodies out of the class definition,
1249 so we can now read a clean class definition to see the class design and what
1250 functions it offers.
1251 (WTF::StringView::StringView): Added a comment to the default constructor.
1252 Also added copy and move constructors so they can call setUnderlyingString
1253 and assert the underlying string is valid as needed, replacing the
1254 compiler-generated ones.
1255 (WTF::StringView::~StringView): Added a call to setUnderlyingString.
1256 (WTF::StringView::operator=): Added these assignment operators with the same
1257 job as the constructors above.
1258 (WTF::StringView::initialize): Added a comment.
1259 (WTF::StringView::characters8): Added an assertion that the underlying
1261 (WTF::StringView::characters16): Ditto.
1262 (WTF::StringView::substring): Added code to propagate the underlying string
1263 from the original string to the substring.
1264 (WTF::StringView::invalidate): Inline empty version of this function for
1266 (WTF::StringView::underlyingStringIsValid): Ditto.
1267 (WTF::StringView::setUnderlyingString): Ditto.
1269 2014-10-06 Brent Fulgham <bfulgham@apple.com>
1271 [Win] DateMath's calculateUTFOffset does not account for DST.
1272 https://bugs.webkit.org/show_bug.cgi?id=137458
1273 <rdar://problem/18559172>
1275 Reviewed by Geoffrey Garen.
1277 Check the return value of GetTimeZoneInformation and use the
1278 proper bias against UTC (depending on whether we are in daylight
1279 savings time, or standard time).
1281 Also, handle possible error cases in the FileTimeToSystemTime
1282 and SystemTimeToTzSpecificLocalTime, rather than using potentially
1283 uninitialized values.
1286 (WTF::calculateUTCOffset): Use proper daylight-savings-time state.
1287 (WTF::calculateDSTOffset): Avoid uninitialized data due to failing
1290 2014-10-06 Christophe Dumez <cdumez@apple.com>
1292 Add is<>() / downcast<>() support for RenderObject subclasses
1293 https://bugs.webkit.org/show_bug.cgi?id=137424
1295 Reviewed by Benjamin Poulain.
1297 Handle correctly calling TypeCastTraits<ExpectedType, ArgType>::isOfType(ArgType&)
1298 with ExpectedType being a base class of ArgType (or the same as ArgType). The
1299 previous template specialization was only meant to support the case where
1300 ExpectedType is the same as ArgType but even that wasn't working as the compiler
1301 would complain about ambiguous partial specializations. Since this is needed by
1302 RenderTraversal functions, this patch adds an extra isBaseType template parameter
1303 to TypeCastTraits to resolve the ambiguity and relies on std::is_base_of for the
1308 2014-10-06 Brent Fulgham <bfulgham@apple.com>
1310 [Win] Project file gardening.
1312 * WTF.vcxproj/WTF.vcxproj.filters: Move HashMethod.h and
1313 FastBitVector.cpp to proper places in hierarchy.
1315 2014-10-04 Brian J. Burg <burg@cs.washington.edu>
1317 Unreviewed, rolling out r174319.
1319 Causes assertions in fast/profiler tests. Needs nontrivial
1320 investigation, will take offline.
1324 "Web Inspector: timelines should not count time elapsed while
1325 paused in the debugger"
1326 https://bugs.webkit.org/show_bug.cgi?id=136351
1327 http://trac.webkit.org/changeset/174319
1329 2014-10-04 Brian J. Burg <burg@cs.washington.edu>
1331 Web Inspector: timelines should not count time elapsed while paused in the debugger
1332 https://bugs.webkit.org/show_bug.cgi?id=136351
1334 Reviewed by Timothy Hatcher.
1336 * WTF.vcxproj/WTF.vcxproj:
1337 * WTF.vcxproj/WTF.vcxproj.filters:
1338 * WTF.xcodeproj/project.pbxproj:
1339 * wtf/CMakeLists.txt:
1340 * wtf/Stopwatch.h: Added. This implements a refcounted monotonic stopwatch.
1341 (WTF::Stopwatch::reset):
1342 (WTF::Stopwatch::start):
1343 (WTF::Stopwatch::stop):
1345 2014-10-04 Filip Pizlo <fpizlo@apple.com>
1347 FTL should sink PutLocals
1348 https://bugs.webkit.org/show_bug.cgi?id=137168
1350 Reviewed by Oliver Hunt.
1352 Make the set bits of a BitVector iterable.
1355 (WTF::BitVector::SetBitsIterable::SetBitsIterable):
1356 (WTF::BitVector::SetBitsIterable::iterator::iterator):
1357 (WTF::BitVector::SetBitsIterable::iterator::operator*):
1358 (WTF::BitVector::SetBitsIterable::iterator::operator++):
1359 (WTF::BitVector::SetBitsIterable::iterator::operator==):
1360 (WTF::BitVector::SetBitsIterable::iterator::operator!=):
1361 (WTF::BitVector::SetBitsIterable::begin):
1362 (WTF::BitVector::SetBitsIterable::end):
1363 (WTF::BitVector::setBits):
1365 2014-10-03 Commit Queue <commit-queue@webkit.org>
1367 Unreviewed, rolling out r174275.
1368 https://bugs.webkit.org/show_bug.cgi?id=137408
1370 Build failures on the internal bots. (Requested by dethbakin
1375 "FTL should sink PutLocals"
1376 https://bugs.webkit.org/show_bug.cgi?id=137168
1377 http://trac.webkit.org/changeset/174275
1379 2014-10-03 Christophe Dumez <cdumez@apple.com>
1381 Add TypeCasts.h to xcodeproject
1382 https://bugs.webkit.org/show_bug.cgi?id=137403
1384 Reviewed by Benjamin Poulain.
1386 Add TypeCasts.h to xcodeproject.
1388 * WTF.xcodeproj/project.pbxproj:
1390 2014-09-28 Filip Pizlo <fpizlo@apple.com>
1392 FTL should sink PutLocals
1393 https://bugs.webkit.org/show_bug.cgi?id=137168
1395 Reviewed by Oliver Hunt.
1397 Make the set bits of a BitVector iterable.
1400 (WTF::BitVector::SetBitsIterable::SetBitsIterable):
1401 (WTF::BitVector::SetBitsIterable::iterator::iterator):
1402 (WTF::BitVector::SetBitsIterable::iterator::operator*):
1403 (WTF::BitVector::SetBitsIterable::iterator::operator++):
1404 (WTF::BitVector::SetBitsIterable::iterator::operator==):
1405 (WTF::BitVector::SetBitsIterable::iterator::operator!=):
1406 (WTF::BitVector::SetBitsIterable::begin):
1407 (WTF::BitVector::SetBitsIterable::end):
1408 (WTF::BitVector::setBits):
1410 2014-10-03 Myles C. Maxfield <mmaxfield@apple.com>
1412 Support modern for loops over StringViews
1413 https://bugs.webkit.org/show_bug.cgi?id=137165
1415 Reviewed by Darin Adler.
1417 This patch adds two functions, codePoints() and codeUnits(), on StringView.
1418 These two functions return small objects which have begin() and end() functions,
1419 which means it can be used by the modern for loop style. This small class also
1420 has an inner iterator class which can be incremented, dereferenced, and
1423 Using these new objects looks like this:
1424 for (UChar codeunit : stringView.codeUnits()) { } and
1425 for (UChar32 codepoint : stringView.codePoints()) { }.
1427 * wtf/text/StringView.h:
1428 (WTF::StringView::codepoints):
1429 (WTF::StringView::codeunits):
1430 (WTF::StringViewCodePointIterator::StringViewCodePointIterator):
1431 (WTF::StringViewCodePointIterator::Iterator::Iterator):
1432 (WTF::StringViewCodePointIterator::Iterator::operator*):
1433 (WTF::StringViewCodePointIterator::Iterator::operator!=):
1434 (WTF::StringViewCodeUnitIterator::StringViewCodeUnitIterator):
1435 (WTF::StringViewCodeUnitIterator::Iterator::Iterator):
1436 (WTF::StringViewCodeUnitIterator::Iterator::operator*):
1437 (WTF::StringViewCodeUnitIterator::Iterator::operator!=):
1439 2014-09-28 Sam Weinig <sam@webkit.org>
1441 Remove RefPtrHashMap
1442 https://bugs.webkit.org/show_bug.cgi?id=137200
1444 Reviewed by Darin Adler.
1446 HashMap now has all the features of the RefPtr specialization of HashMap
1447 (which lived in RefPtrHashMap.h) and is in fact more efficient when moving
1448 items into it. For instance:
1450 For HashMap<RefPtr<Foo>, Bar> map:
1452 RefPtr<Foo> foo = ...;
1453 map.add(WTF::move(foo), Bar());
1455 will now not cause a ref() / deref(), but will successfully move the item in
1456 without churn. The same is true if foo.release() was used.
1458 * WTF.vcxproj/WTF.vcxproj:
1459 * WTF.vcxproj/WTF.vcxproj.filters:
1460 * WTF.xcodeproj/project.pbxproj:
1461 * wtf/CMakeLists.txt:
1462 Remove references to RefPtrHashMap.h.
1464 * wtf/RefPtrHashMap.h: Removed.
1467 Remove #include of RefPtrHashMap.h and add inlineGet to match the interface
1468 exposed by the RefPtrHashMap specialization.
1470 2014-10-02 Anders Carlsson <andersca@apple.com>
1472 Add back debugging/testing code that I accidentally removed.
1474 * wtf/text/StringConcatenate.h:
1475 (WTF::StringTypeAdapter<String>::writeTo):
1477 2014-10-02 Anders Carlsson <andersca@apple.com>
1479 Simplify StringTypeAdapter templates
1480 https://bugs.webkit.org/show_bug.cgi?id=137356
1482 Reviewed by Andreas Kling.
1484 * wtf/text/StringConcatenate.h:
1485 Use StringView for copying characters. Use inheritance for char* vs const char* etc. Make all StringAdapter member functions const.
1487 * wtf/text/StringView.h:
1488 Move enough functions out of line so we can include WTFString.h after the StringView class definition.
1490 2014-10-01 Christophe Dumez <cdumez@apple.com>
1492 Have is<>(T*) function do a null check on the pointer argument
1493 https://bugs.webkit.org/show_bug.cgi?id=137333
1495 Reviewed by Gavin Barraclough.
1497 Have is<>(T*) function do a null check on the argument instead of a
1498 simple assertion. This makes sense for 2 reasons:
1499 1. It is more consistent with downcast<>(T*), which will succeed even
1500 if the argument is a nullptr.
1501 2. It simplifies the code a bit as it gets rid of a lot of explicit
1507 2014-10-02 Daniel Bates <dabates@apple.com>
1509 Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
1510 https://bugs.webkit.org/show_bug.cgi?id=137277
1512 Reviewed by Alexey Proskuryakov.
1514 Towards centralizing the declarations of XPC functions used in JavaScriptCore
1515 and WebKit2, add a header that wraps these function declarations called XPCSPI.h
1516 and use it instead of including the corresponding XPC API/SPI headers/forward
1517 declaring XPC functions. This will also aid in the effort to make WebKit2 build
1518 for iOS with the public iOS SDK.
1520 * WTF.xcodeproj/project.pbxproj:
1521 * wtf/spi/darwin/XPCSPI.h: Added.
1523 2014-10-01 Christophe Dumez <cdumez@apple.com>
1525 Unreviewed build fix after r174193.
1527 Adding a return statement as that function is returning a boolean.
1530 (WTF::TypeCastTraits::isOfType):
1532 2014-10-01 Christophe Dumez <cdumez@apple.com>
1534 Fail better when is<>() / downcast<>() is used for an unsupported type
1535 https://bugs.webkit.org/show_bug.cgi?id=137323
1537 Reviewed by Benjamin Poulain.
1539 We should fail better when is<>() / downcast<>() is used for an
1540 unsupported type (i.e. a type that doesn't have the needed
1541 TypeCastTraits template specialization). Previously, we would get an
1542 obscure linking error, which was sub-optimal.
1544 With this patch, you would now hit a static_assert() at build time if
1545 you tried to use is<>() / downcast<>() for a type that did not have the
1546 needed template specialization. There is also a helpful comment above
1547 the assertion letting the developer know how to add the needed template
1551 (WTF::TypeCastTraits::isOfType):
1553 2014-10-01 Commit Queue <commit-queue@webkit.org>
1555 Unreviewed, rolling out r174180, r174183, and r174186.
1556 https://bugs.webkit.org/show_bug.cgi?id=137320
1558 Broke the Mac MountainLion build. Will investigate offline.
1559 (Requested by dydz on #webkit).
1561 Reverted changesets:
1563 "Clean up: Move XPC forward declarations in JavaScriptCore to
1564 WTF SPI wrapper header"
1565 https://bugs.webkit.org/show_bug.cgi?id=137277
1566 http://trac.webkit.org/changeset/174180
1568 "Attempt to fix the build after
1569 <https://trac.webkit.org/changeset/174180>"
1570 https://bugs.webkit.org/show_bug.cgi?id=137277
1571 http://trac.webkit.org/changeset/174183
1573 "Another attempt to fix the Mac build after
1574 <https://trac.webkit.org/changeset/174180>"
1575 https://bugs.webkit.org/show_bug.cgi?id=137277
1576 http://trac.webkit.org/changeset/174186
1578 2014-10-01 Daniel Bates <dabates@apple.com>
1580 Another attempt to fix the Mac build after <https://trac.webkit.org/changeset/174180>
1581 (https://bugs.webkit.org/show_bug.cgi?id=137277)
1583 Include header AvailabilityMacros.h instead of Availability.h, which actually defines the
1584 macro __MAC_OS_X_VERSION_MIN_REQUIRED.
1586 * wtf/spi/darwin/XPCSPI.h:
1588 2014-10-01 Daniel Bates <dabates@apple.com>
1590 Attempt to fix the build after <https://trac.webkit.org/changeset/174180>
1591 (https://bugs.webkit.org/show_bug.cgi?id=137277)
1593 Include header <Availability.h> for the definition of __MAC_OS_X_VERSION_MIN_REQUIRED.
1594 Also, we want to define CONST_ON_OR_AFTER_MAC_OS_X_VERSION_1090 to be const when building
1597 * wtf/spi/darwin/XPCSPI.h:
1599 2014-10-01 Daniel Bates <dabates@apple.com>
1601 Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
1602 https://bugs.webkit.org/show_bug.cgi?id=137277
1604 Reviewed by Alexey Proskuryakov.
1606 Towards centralizing the declarations of XPC functions used in JavaScriptCore
1607 and WebKit2, add a header that wraps these function declarations called XPCSPI.h
1608 and use it instead of including the corresponding XPC API/SPI headers/forward
1609 declaring XPC functions. This will also aid in the effort to make WebKit2 build
1610 for iOS with the public iOS SDK.
1612 * WTF.xcodeproj/project.pbxproj:
1613 * wtf/spi/darwin/XPCSPI.h: Added.
1615 2014-10-01 Brent Fulgham <bfulgham@apple.com>
1617 [Win] 32-bit JavaScriptCore should limit itself to the C loop
1618 https://bugs.webkit.org/show_bug.cgi?id=137304
1619 <rdar://problem/18375370>
1621 Reviewed by Michael Saboff.
1623 * wtf/Platform.h: Force the C loop when building for 32-bit Windows.
1625 2014-09-30 Christophe Dumez <cdumez@apple.com>
1627 Generalize is<>() / downcast<>() support to all types
1628 https://bugs.webkit.org/show_bug.cgi?id=137243
1630 Reviewed by Benjamin Poulain.
1632 Generalize is<>() / downcast<>() support to all types, not just Nodes.
1635 * wtf/TypeCasts.h: Added.
1639 2014-09-30 Anders Carlsson <andersca@apple.com>
1641 Get the STRING_STATS codepath compiling again, and add calls to ref/deref
1642 https://bugs.webkit.org/show_bug.cgi?id=137259
1644 Reviewed by Andreas Kling.
1646 * wtf/text/StringImpl.cpp:
1647 (WTF::StringStats::removeString):
1648 (WTF::StringStats::printStats):
1649 (WTF::StringImpl::~StringImpl):
1650 * wtf/text/StringImpl.h:
1651 (WTF::StringImpl::StringImpl):
1652 (WTF::StringImpl::isSubString):
1653 (WTF::StringImpl::ref):
1654 (WTF::StringImpl::deref):
1655 (WTF::StringStats::addUpconvertedString): Deleted.
1657 2014-09-30 Daniel Bates <dabates@apple.com>
1659 REGRESSION (r172532): JSBase.h declares NSMapTable functions that are SPI
1660 https://bugs.webkit.org/show_bug.cgi?id=137170
1661 <rdar://problem/18477384>
1663 Reviewed by Geoffrey Garen.
1665 Add SPI wrapper header, NSMapTableSPI.h.
1667 Additionally, define convenience macro EXTERN_C that can be used to specify the C linkage
1668 convention for a declaration. For example, the declaration "EXTERN_C const int x;" will
1675 extern "C" const int x;
1677 when used in a C and C++ file, respectively.
1679 * WTF.xcodeproj/project.pbxproj:
1681 * wtf/spi/cocoa/NSMapTableSPI.h: Added.
1683 2014-09-29 Commit Queue <commit-queue@webkit.org>
1685 Unreviewed, rolling out r174045.
1686 https://bugs.webkit.org/show_bug.cgi?id=137231
1688 Introduced a crash during page loading tests on Mac (Requested
1689 by rniwa on #webkit).
1693 "Replace OSObjectPtr with RetainPtr/adoptOS"
1694 https://bugs.webkit.org/show_bug.cgi?id=137158
1695 http://trac.webkit.org/changeset/174045
1697 2014-09-26 Sam Weinig <sam@webkit.org>
1699 Replace OSObjectPtr with RetainPtr/adoptOS
1700 https://bugs.webkit.org/show_bug.cgi?id=137158
1702 Reviewed by Dan Bernstein.
1704 * WTF.xcodeproj/project.pbxproj:
1705 * wtf/OSObjectPtr.h: Removed.
1708 Added. This adopt function is slightly different than both adoptCF and adoptNS,
1709 in that unlike adoptCF(), it can be passed an Objective-C type (since OS objects
1710 are sometimes Objective-C objects, but not always), and unlike adoptNS() it doesn't
1711 require us to jump through hoops to appease GC (since OS objects are not Objective-C
1712 objects if GC is enabled).
1714 2014-09-24 Filip Pizlo <fpizlo@apple.com>
1716 FTL should sink object allocations
1717 https://bugs.webkit.org/show_bug.cgi?id=136330
1719 Reviewed by Oliver Hunt.
1721 Make it possible to reset a Bag.
1728 2014-09-25 Roger Fong <roger_fong@apple.com>
1730 [Windows] Unreviewed build fix. Ensure that python2.7 is used for Windows builds.
1732 * WTF.vcxproj/WTFGenerated.make:
1734 2014-09-25 Csaba Osztrogonác <ossy@webkit.org>
1736 Remove WinCE port from trunk
1737 https://bugs.webkit.org/show_bug.cgi?id=136951
1739 Reviewed by Alex Christensen.
1742 * wtf/Assertions.cpp:
1745 (WTF::weakCompareAndSwap):
1746 * wtf/CurrentTime.cpp:
1747 (WTF::lowResUTCTime):
1750 (WTF::getLocalTime):
1751 (WTF::calculateDSTOffset):
1752 * wtf/FastMalloc.cpp:
1753 * wtf/FeatureDefines.h:
1754 * wtf/OSAllocator.h:
1755 (WTF::OSAllocator::decommitAndRelease):
1757 * wtf/PlatformWin.cmake:
1759 (WTF::computeRAMSize):
1760 * wtf/RandomNumberSeed.h:
1761 (WTF::initializeRandomNumberGenerator):
1762 * wtf/StackBounds.cpp:
1763 (WTF::StackBounds::initialize):
1764 * wtf/StackBounds.h:
1765 (WTF::StackBounds::isGrowingDownward):
1766 * wtf/StdLibExtras.h:
1767 (wtf_bsearch): Deleted.
1768 * wtf/StringExtras.h:
1769 (strnicmp): Deleted.
1772 * wtf/ThreadSpecific.h:
1773 * wtf/ThreadingWin.cpp:
1774 (WTF::createThreadInternal):
1775 * wtf/WindowsExtras.h:
1776 (WTF::getRegistryValue):
1777 (WTF::getWindowPointer):
1778 (WTF::setWindowPointer):
1780 * wtf/text/WTFString.cpp:
1781 (WTF::String::format):
1783 2014-09-24 Geoffrey Garen <ggaren@apple.com>
1786 https://bugs.webkit.org/show_bug.cgi?id=132629
1788 Reviewed by Gavin Barraclough.
1790 64-bit only for now, just to try it out.
1792 * wtf/FastMalloc.cpp:
1794 2014-09-23 Geoffrey Garen <ggaren@apple.com>
1798 bmalloc should honor the FastMalloc statistics API
1799 https://bugs.webkit.org/show_bug.cgi?id=136592
1801 This didn't really work. Because we allow ranges with and without
1802 physical pages to merge, and we allow double-committing and
1803 double-decommitting, we can't rely on commit actions to track memory
1806 * wtf/FastMalloc.cpp:
1807 (WTF::fastMallocStatistics):
1809 2014-09-23 Joseph Pecoraro <pecoraro@apple.com>
1811 Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
1812 https://bugs.webkit.org/show_bug.cgi?id=136893
1814 Reviewed by Timothy Hatcher.
1816 Currently automatic inspection only happens in processes that have a
1817 debugger attached. That condition may change in the future, but this
1818 function can stand on its own in WTF. It may be useful in the future
1819 to perhaps continue though ASSERTs if you have a debugger attached.
1821 * wtf/Assertions.cpp:
1824 2014-09-22 Sam Weinig <sam@webkit.org>
1826 Eliminate redundant PtrHash specializations
1827 https://bugs.webkit.org/show_bug.cgi?id=136990
1829 Reviewed by Darin Adler.
1831 Now that we have IsSmartPtr, we can eliminate all the specializations
1832 of PtrHash that we had (for RefPtr, OwnPtr, RetainPtr, and std::unique_ptr)
1833 and instead just have one that uses GetPtrHelper.
1835 No changes of behavior intended.
1838 Remove unnecessary const_cast that Darin noticed.
1840 * wtf/HashFunctions.h:
1841 (WTF::PtrHash::hash): Deleted.
1842 (WTF::PtrHash::equal): Deleted.
1843 (WTF::PtrHash<RefPtr<P>>::hash): Deleted.
1844 (WTF::PtrHash<RefPtr<P>>::equal): Deleted.
1845 Specialize PtrHash based on whether the type is a smart pointer, and use GetPtrHelper
1846 to implement the smart pointer specialized variant.
1849 Remove include of GetPtr.h that is now included by HashFunctions.h
1852 (WTF::PtrHash<OwnPtr<P>>::hash): Deleted.
1853 (WTF::PtrHash<OwnPtr<P>>::equal): Deleted.
1854 Remove unnecessary specialization of PtrHash.
1857 (WTF::PtrHash<RetainPtr<P>>::hash): Deleted.
1858 (WTF::PtrHash<RetainPtr<P>>::equal): Deleted.
1859 Specialize IsSmartPointer for RetainPtr and remove the then unnecessary specialization of PtrHash.
1860 (This is already tested in the API test WTF/cf/RetainPtrHashing).
1862 2014-09-20 Sam Weinig <sam@webkit.org>
1864 Make possible HashSet<std::unique_ptr<>>
1865 https://bugs.webkit.org/show_bug.cgi?id=136166
1867 Reviewed by Darin Adler.
1871 (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr):
1872 Make specializing GetPtrHelper a bit cleaner (you don't have to put
1873 IsSmartPtr<T>::value everywhere any more) and add specializations for
1876 * wtf/HashFunctions.h:
1877 (WTF::PtrHash<std::unique_ptr<P>>):
1878 Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash
1883 Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that
1884 take the raw pointer type as the parameter. These use SFINAE to make themselves only available
1885 when the IsSmartPtr<KeyType>::value is true.
1888 Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization
1889 since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue
1890 and function named isHashTableDeletedValue().
1893 (WTF::OwnPtr::OwnPtr):
1894 (WTF::OwnPtr::isHashTableDeletedValue):
1895 (WTF::OwnPtr::hashTableDeletedValue):
1896 Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue()
1897 hash traits to work.
1899 (WTF::PtrHash<OwnPtr<P>>::hash):
1900 (WTF::PtrHash<OwnPtr<P>>::equal):
1901 Add specialization for PtrHash for OwnPtr and set it as the DefaultHash
1905 Update for the less verbose GetPtrHelper specialization.
1907 2014-09-19 Chris Dumez <cdumez@apple.com>
1909 Allow DOM methods to return references instead of pointers
1910 https://bugs.webkit.org/show_bug.cgi?id=136931
1912 Add support for having WTF::getPtr() transform reference arguments
1913 into raw pointers so that DOM methods can now return references when
1914 appropriate and so that the generated bindings code can handle this
1917 This patch had to alter the way getPtr() was overloaded for smart
1918 pointer types so that we don't call &p on smart pointers but p.get().
1919 This was needed because the new WTF::getPtr(T&) was being called for
1920 RefPtr<T> arguments instead of the getPtr(const RefPtr<T>&) overload.
1921 This was addressed using traits and template specialization to
1922 distinguish WTF smart pointers from other types.
1924 Reviewed by Sam Weinig.
1929 (WTF::getPtr): Deleted.
1931 (WTF::getPtr): Deleted.
1933 (WTF::getPtr): Deleted.
1936 (WTF::getPtr): Deleted.
1937 * wtf/gobject/GRefPtr.h:
1938 (WTF::getPtr): Deleted.
1940 2014-09-19 Daniel Bates <dabates@apple.com>
1942 Always assume internal SDK when building configuration Production
1943 https://bugs.webkit.org/show_bug.cgi?id=136925
1944 <rdar://problem/18362399>
1946 Reviewed by Dan Bernstein.
1948 * Configurations/Base.xcconfig:
1950 2014-09-19 Diego Pino Garcia <dpino@igalia.com>
1952 Simple ES6 feature:String prototype additions
1953 https://bugs.webkit.org/show_bug.cgi?id=131704
1955 Reviewed by Darin Adler.
1957 * wtf/text/StringImpl.cpp:
1958 (WTF::StringImpl::find):
1959 (WTF::equalInner): Added.
1960 (WTF::StringImpl::startsWith): Add implementation that supports
1961 'startOffset' parameter.
1962 (WTF::StringImpl::endsWith): Add implementation that supports
1963 'endOffset' parameter.
1964 * wtf/text/StringImpl.h:
1965 * wtf/text/WTFString.h:
1966 (WTF::String::contains): Modify current implementation to allow
1967 setting a startOffset, 0 by default.
1968 (WTF::String::startsWith):
1969 (WTF::String::endsWith):
1971 2014-09-18 Carlos Garcia Campos <cgarcia@igalia.com>
1973 [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
1974 https://bugs.webkit.org/show_bug.cgi?id=136923
1976 Reviewed by Gustavo Noronha Silva.
1978 We have several asserts to ensure that delete-on-destroy sources
1979 are not misused, like not scheduling socket sources on a
1980 delete-on-destroy GMainLoopSource or not allowing to cancel them
1981 before they have been dispatched. It's better to ensure all those
1982 things at compile time, using static methods to schedule sources
1983 creating a delete-on-destroy GMainLoopSource that is not returned
1986 * wtf/gobject/GMainLoopSource.cpp:
1987 (WTF::GMainLoopSource::create): Private static method to create a
1988 delete-on-destroy GMainLoopSource.
1989 (WTF::GMainLoopSource::cancelWithoutLocking): Return early in case
1990 of delete-on-destroy source, since they can't be cancelled.
1991 (WTF::GMainLoopSource::schedule): Remove assertion to ensure
1992 socket sources are not scheduled on a delete-on-destroy GMainLoopSource.
1993 (WTF::GMainLoopSource::scheduleAndDeleteOnDestroy):
1994 (WTF::GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy):
1995 (WTF::GMainLoopSource::createAndDeleteOnDestroy): Deleted.
1996 * wtf/gobject/GMainLoopSource.h:
1997 * wtf/gtk/MainThreadGtk.cpp:
1998 (WTF::scheduleDispatchFunctionsOnMainThread): Use GMainLoopSource::scheduleAndDeleteOnDestroy()
1999 * wtf/gtk/RunLoopGtk.cpp:
2000 (WTF::RunLoop::wakeUp): Ditto.
2002 2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
2004 Unreviewed rollout r173731. Broke multiple builds.
2006 * wtf/Assertions.cpp:
2009 2014-09-18 Joseph Pecoraro <pecoraro@apple.com>
2011 Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
2012 https://bugs.webkit.org/show_bug.cgi?id=136893
2014 Reviewed by Timothy Hatcher.
2016 Currently automatic inspection only happens in processes that have a
2017 debugger attached. That condition may change in the future, but this
2018 function can stand on its own in WTF. It may be useful in the future
2019 to perhaps continue though ASSERTs if you have a debugger attached.
2021 * wtf/Assertions.cpp:
2024 2014-09-18 Zan Dobersek <zdobersek@igalia.com>
2026 GMainLoopSource is exposed to race conditions
2027 https://bugs.webkit.org/show_bug.cgi?id=135800
2029 Reviewed by Carlos Garcia Campos.
2031 GMainLoopSource objects can be dispatching tasks on one thread
2032 while having a new task scheduled on a different thread. This
2033 can for instance occur in WebKitVideoSink, where the timeout
2034 callback can be called on main thread while at the same time
2035 it is being rescheduled on a different thread (created through
2038 The initial solution is to use GMutex to prevent parallel data
2039 access from different threads. In the future I plan to look at
2040 the possibility of creating thread-specific GMainLoopSource
2041 objects that wouldn't require the use of GMutex.
2043 GSource, GCancellable and std::function<> objects are now packed
2044 into an internal Context structure. Using the C++11 move semantics
2045 it's simple to, at the time of dispatch, move the current context
2046 out of the GMainLoopSource object in case the dispatch causes a
2047 rescheduling on that same object.
2049 Also added in the Context struct is a new GCancellable. The pointer
2050 of that object is shared with the GMainLoopSource before the Context
2051 is moved out for the callback dispatch. This makes it safe to cancel
2052 or even delete the GMainLoopSource during the dispatch and prevents
2053 use-after-delete on GMainLoopSource once the dispatch is done in
2054 the GMainLoopSource::*Callback() methods.
2056 All the schedule*() methods and the cancelWithoutLocking() method
2057 callers now lock the GMutex to ensure no one else is accessing the
2058 data at that moment. Similar goes for the dispatch methods, but those
2059 do the dispatch and possible destruction duties with the mutex unlocked.
2060 The dispatch can cause rescheduling on the same GMainLoopSource object,
2061 which must not be done with a locked mutex.
2063 * wtf/gobject/GMainLoopSource.cpp:
2064 (WTF::GMainLoopSource::GMainLoopSource):
2065 (WTF::GMainLoopSource::~GMainLoopSource):
2066 (WTF::GMainLoopSource::cancel):
2067 (WTF::GMainLoopSource::cancelWithoutLocking):
2068 (WTF::GMainLoopSource::scheduleIdleSource):
2069 (WTF::GMainLoopSource::schedule):
2070 (WTF::GMainLoopSource::scheduleTimeoutSource):
2071 (WTF::GMainLoopSource::scheduleAfterDelay):
2072 (WTF::GMainLoopSource::voidCallback):
2073 (WTF::GMainLoopSource::boolCallback):
2074 (WTF::GMainLoopSource::socketCallback):
2075 (WTF::GMainLoopSource::socketSourceCallback):
2076 (WTF::GMainLoopSource::Context::destroySource):
2077 (WTF::GMainLoopSource::reset): Deleted.
2078 (WTF::GMainLoopSource::destroy): Deleted.
2079 * wtf/gobject/GMainLoopSource.h:
2081 2014-09-17 Daniel Bates <dabates@apple.com>
2083 Unreviewed, rolling out r173695.
2085 Broke building third-party Legacy WebKit apps; will
2090 "[iOS] Make WebCore build with public iOS SDK"
2091 https://bugs.webkit.org/show_bug.cgi?id=136487
2092 http://trac.webkit.org/changeset/173695
2094 2014-09-17 Benjamin Poulain <bpoulain@apple.com>
2096 CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
2097 https://bugs.webkit.org/show_bug.cgi?id=136807
2099 Reviewed by Antti Koivisto.
2101 * wtf/text/AtomicString.h:
2102 (WTF::AtomicString::find):
2104 2014-09-17 Daniel Bates <dabates@apple.com>
2106 [iOS] Make WebCore build with public iOS SDK
2107 https://bugs.webkit.org/show_bug.cgi?id=136487
2109 Reviewed by David Kilzer.
2111 Define convenience macro EXTERN_C that can be used to specify the C linkage convention
2112 for a declaration. For example, the declaration "EXTERN_C const int x;" will expand to:
2118 extern "C" const int x;
2120 when used in a C and C++ file, respectively.
2124 2014-09-16 Filip Pizlo <fpizlo@apple.com>
2126 Unreviewed, disable native inlining because it causes build failures.
2130 2014-09-15 Jer Noble <jer.noble@apple.com>
2132 [Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
2133 https://bugs.webkit.org/show_bug.cgi?id=135042
2135 Reviewed by Eric Carlson.
2137 * wtf/Platform.h: Add WTF_USE_MEDIATOOLBOX.
2139 2014-09-15 peavo@outlook.com <peavo@outlook.com>
2141 [WinCairo] Make it easier to enable/disable GStreamer.
2142 https://bugs.webkit.org/show_bug.cgi?id=135766
2144 Reviewed by Brent Fulgham.
2146 Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.
2148 * WTF.vcxproj/WTFDebugWinCairo.props: Import GStreamer property file.
2149 * WTF.vcxproj/WTFReleaseWinCairo.props: Ditto.
2150 * wtf/Platform.h: Enable GStreamer if ENABLE(GSTREAMER_WINCAIRO) is true, otherwise use Media Foundation.
2152 2014-09-10 Jon Honeycutt <jhoneycutt@apple.com>
2154 Re-add the request autocomplete feature
2156 <https://bugs.webkit.org/show_bug.cgi?id=136730>
2158 This feature was rolled out in r148731 because it was only used by
2159 Chromium. As we consider supporting this feature, roll it back in, but
2162 This rolls out r148731 (which removed the feature) with small changes
2163 needed to make the code build in ToT, to make the tests run, and to
2166 Reviewed by Andy Estes.
2168 * wtf/FeatureDefines.h:
2170 2014-09-12 Tim Horton <timothy_horton@apple.com>
2172 Swiping back from a Twitter image to Twitter flashes to the wrong position
2173 https://bugs.webkit.org/show_bug.cgi?id=136798
2174 <rdar://problem/18324338>
2176 Reviewed by Darin Adler and Sam Weinig.
2179 (WTF::RunLoop::TimerBase::startRepeating):
2180 Add a std::chrono veresion of RunLoop::TimerBase::startRepeating.
2182 2014-09-12 Geoffrey Garen <ggaren@apple.com>
2186 It broke the Membuster performance bot, and it's still slightly profligate
2190 https://bugs.webkit.org/show_bug.cgi?id=132629
2192 * wtf/FastMalloc.cpp:
2194 2014-09-11 Geoffrey Garen <ggaren@apple.com>
2197 https://bugs.webkit.org/show_bug.cgi?id=132629
2199 Reviewed by Michael Saboff.
2201 64-bit only for now, just to try it out.
2203 * wtf/FastMalloc.cpp:
2205 2014-09-09 Benjamin Poulain <bpoulain@apple.com>
2207 Disable the "unreachable-code" warning
2208 https://bugs.webkit.org/show_bug.cgi?id=136677
2210 Reviewed by Darin Adler.
2212 The warning causes various build errors depending on which Clang you are using.
2214 For example, with recent clangs, it breaks all the ARCHS dependent code like this:
2215 if (sizeof(uintptr_t) == 4)
2216 // Something for 32 bits.
2218 // Somethign for 64 bits.
2220 * Configurations/Base.xcconfig:
2222 2014-09-07 Filip Pizlo <fpizlo@apple.com>
2224 DFG should have a reusable SSA builder
2225 https://bugs.webkit.org/show_bug.cgi?id=136331
2227 Reviewed by Oliver Hunt.
2229 Update the alloc() method to use variadic templates. This makes it more natural to use.
2231 * wtf/SegmentedVector.h:
2232 (WTF::SegmentedVector::alloc):
2234 2014-09-08 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
2237 https://bugs.webkit.org/show_bug.cgi?id=136571
2239 Reviewed by Darin Adler.
2241 * wtf/FeatureDefines.h:
2243 2014-09-08 Dan Bernstein <mitz@apple.com>
2245 HAVE(VOUCHERS) is not available outside of WebKit2
2246 https://bugs.webkit.org/show_bug.cgi?id=136637
2248 Reviewed by Tim Horton.
2250 * wtf/Platform.h: Moved the definition of HAVE_VOUCHERS from WebKit2’s config.h here.
2252 2014-09-08 Tim Horton <timothy_horton@apple.com>
2254 Try to fix the build after r173383, part 2.
2256 * wtf/OSObjectPtr.h:
2258 2014-09-08 Tim Horton <timothy_horton@apple.com>
2260 Try to fix the build after r173383.
2262 * wtf/OSObjectPtr.h:
2264 2014-09-07 Sam Weinig <sam@webkit.org>
2266 Make OSObjectPtr a bit more like RefPtr
2267 https://bugs.webkit.org/show_bug.cgi?id=136613
2269 Reviewed by Darin Adler.
2271 Address some of Darin's feedback by:
2272 - Making the adopting constructor private and friending adoptOSObject().
2273 - Implementing the assignment operator using swap.
2274 - Adding a move assignment operator.
2276 * wtf/OSObjectPtr.h:
2277 (WTF::OSObjectPtr::operator=):
2278 (WTF::OSObjectPtr::swap):
2279 (WTF::OSObjectPtr::OSObjectPtr):
2281 2014-09-08 Jessie Berlin <jberlin@apple.com>
2283 More build fixes after r173374.
2285 * wtf/dtoa/strtod.cc:
2287 2014-09-08 Jessie Berlin <jberlin@apple.com>
2289 Build fix after r173374.
2291 * wtf/dtoa/strtod.cc:
2293 2014-09-08 Jessie Berlin <jberlin@apple.com>
2295 Speculative build fix after r173364.
2297 * wtf/dtoa/strtod.cc:
2299 2014-09-07 Maciej Stachowiak <mjs@apple.com>
2301 Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it
2302 https://bugs.webkit.org/show_bug.cgi?id=136616
2304 Reviewed by Darin Adler.
2306 * wtf/Compiler.h: Define the quirk for all compilers but clang.
2308 2014-09-06 Sam Weinig <sam@webkit.org>
2310 XPCPtr should be converted into an all purpose smart pointer for os_objects
2311 https://bugs.webkit.org/show_bug.cgi?id=136602
2313 Reviewed by Darin Adler.
2315 * WTF.xcodeproj/project.pbxproj:
2316 * wtf/OSObjectPtr.h: Copied from Source/WebKit2/Platform/IPC/mac/XPCPtr.h.
2317 (WTF::retainOSObject):
2318 (WTF::releaseOSObject):
2319 (WTF::OSObjectPtr::OSObjectPtr):
2320 (WTF::OSObjectPtr::~OSObjectPtr):
2321 (WTF::OSObjectPtr::operator=):
2322 (WTF::adoptOSObject):
2323 (IPC::XPCPtr::XPCPtr): Deleted.
2324 (IPC::XPCPtr::~XPCPtr): Deleted.
2325 (IPC::XPCPtr::operator=): Deleted.
2326 (IPC::adoptXPC): Deleted.
2327 Rename/move XPCPtr to OSObjectPtr and make it work with any os_object.
2329 2014-09-06 Darin Adler <darin@apple.com>
2331 Make updates suggested by new version of Xcode
2332 https://bugs.webkit.org/show_bug.cgi?id=136603
2334 Reviewed by Mark Rowe.
2336 * Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE,
2337 COMBINE_HIDPI_IMAGES, and ENABLE_STRICT_OBJC_MSGSEND as suggested by
2338 Xcode upgrade check.
2340 * WTF.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.
2342 2014-09-05 Geoffrey Garen <ggaren@apple.com>
2344 bmalloc should honor the FastMalloc statistics API
2345 https://bugs.webkit.org/show_bug.cgi?id=136592
2347 Reviewed by Gavin Barraclough.
2349 * wtf/FastMalloc.cpp:
2350 (WTF::fastMallocStatistics):
2352 2014-09-05 Geoffrey Garen <ggaren@apple.com>
2354 bmalloc should honor the FastMalloc scavenging API
2355 https://bugs.webkit.org/show_bug.cgi?id=136588
2357 Reviewed by Andreas Kling.
2359 * wtf/FastMalloc.cpp:
2360 (WTF::releaseFastMallocFreeMemory):
2362 2014-09-05 Geoffrey Garen <ggaren@apple.com>
2364 Rolled out <http://trac.webkit.org/changeset/173313>.
2366 It seems to have broken the PLT bot.
2369 https://bugs.webkit.org/show_bug.cgi?id=132629
2371 * wtf/FastMalloc.cpp:
2373 2014-06-06 Jer Noble <jer.noble@apple.com>
2375 Refactoring: make MediaTime the primary time type for audiovisual times.
2376 https://bugs.webkit.org/show_bug.cgi?id=133579
2378 Reviewed by Eric Carlson.
2380 Add a unary minus operator, and add unimplemented private casting operators, to make
2381 unintentional double->MediaTime and MediaTime->double casts hard errors.
2383 * wtf/MediaTime.cpp:
2384 (WTF::MediaTime::operator-):
2387 2014-09-04 Geoffrey Garen <ggaren@apple.com>
2390 https://bugs.webkit.org/show_bug.cgi?id=132629
2392 Reviewed by Michael Saboff.
2394 64-bit only for now, just to try it out.
2396 * wtf/FastMalloc.cpp:
2398 2014-09-05 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
2400 Enable GenGC on ARM Traditional
2401 https://bugs.webkit.org/show_bug.cgi?id=136567
2403 Reviewed by Csaba Osztrogonác.
2407 2014-09-04 Filip Pizlo <fpizlo@apple.com>
2409 Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
2410 https://bugs.webkit.org/show_bug.cgi?id=136520
2412 Fix bug found in Geoff's review but not landed in previous commit.
2414 * wtf/BitVector.cpp:
2415 (WTF::BitVector::equalsSlowCaseFast): return true.
2417 2014-09-03 Filip Pizlo <fpizlo@apple.com>
2419 Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
2420 https://bugs.webkit.org/show_bug.cgi?id=136520
2422 Reviewed by Geoffrey Garen.
2424 Give BitVector a way to quickly find the next set (or unset) bit. Make BitVector equality
2425 faster. Fix a minor closure goof in Spectrum.
2427 * wtf/BitVector.cpp:
2428 (WTF::BitVector::equalsSlowCase):
2429 (WTF::BitVector::equalsSlowCaseFast):
2430 (WTF::BitVector::equalsSlowCaseSimple):
2432 (WTF::BitVector::findBit):
2433 (WTF::BitVector::findBitFast):
2434 (WTF::BitVector::findBitSimple):
2435 (WTF::BitVector::findBitInWord):
2437 (WTF::Spectrum::removeIf):
2439 2014-09-04 Anders Carlsson <andersca@apple.com>
2441 Make hash table classes final
2442 https://bugs.webkit.org/show_bug.cgi?id=136540
2444 Reviewed by Antti Koivisto.
2446 We don't want anybody inheriting from these classes, so make them final.
2448 * wtf/HashCountedSet.h:
2452 2014-09-04 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
2454 Remove CSS_FILTERS flag
2455 https://bugs.webkit.org/show_bug.cgi?id=136529
2457 Reviewed by Dirk Schulze.
2459 * wtf/FeatureDefines.h:
2461 2014-09-04 Commit Queue <commit-queue@webkit.org>
2463 Unreviewed, rolling out r173201.
2464 https://bugs.webkit.org/show_bug.cgi?id=136538
2466 Improves the situation but also introduces additional crashes.
2467 (Requested by zdobersek on #webkit).
2471 "GMainLoopSource is exposed to race conditions"
2472 https://bugs.webkit.org/show_bug.cgi?id=135800
2473 http://trac.webkit.org/changeset/173201
2475 2014-09-04 Pratik Solanki <psolanki@apple.com>
2477 Remove iOS specific disk image cache
2478 https://bugs.webkit.org/show_bug.cgi?id=136517
2480 Reviewed by Antti Koivisto.
2482 Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
2483 this now since we don't enable it in WebKit2 on iOS.
2485 * wtf/FeatureDefines.h:
2487 2014-09-03 Dan Bernstein <mitz@apple.com>
2489 Get rid of HIGH_DPI_CANVAS leftovers
2490 https://bugs.webkit.org/show_bug.cgi?id=136491
2492 Reviewed by Benjamin Poulain.
2494 * wtf/FeatureDefines.h: Removed definition of ENABLE_HIGH_DPI_CANVAS.
2496 2014-09-03 Zan Dobersek <zdobersek@igalia.com>
2498 GMainLoopSource is exposed to race conditions
2499 https://bugs.webkit.org/show_bug.cgi?id=135800
2501 Reviewed by Carlos Garcia Campos.
2503 GMainLoopSource objects can be dispatching tasks on one thread
2504 while having a new task scheduled on a different thread. This
2505 can for instance occur in WebKitVideoSink, where the timeout
2506 callback can be called on main thread while at the same time
2507 it is being rescheduled on a different thread (created through
2510 The initial solution is to use GMutex to prevent parallel data
2511 access from different threads. In the future I plan to add better
2512 assertions, some meaningful comments and look at the possibility
2513 of creating thread-specific GMainLoopSource objects that wouldn't
2514 require the use of GMutex.
2516 GSource, GCancellable and std::function<> objects are now packed
2517 into an internal Context structure. Using the C++11 move semantics
2518 it's simple to, at the time of dispatch, move the current context
2519 out of the GMainLoopSource object in case the dispatch causes a
2520 rescheduling on that same object.
2522 All the schedule*() methods and the cancelInternal() method callers
2523 now lock the GMutex to ensure no one else is accessing the data at
2524 that moment. Similar goes for the dispatch methods, but those do
2525 the dispatch and possible destruction duties with the mutex unlocked.
2526 The dispatch can cause rescheduling on the same GMainLoopSource object,
2527 which must not be done with a locked mutex.
2529 * wtf/gobject/GMainLoopSource.cpp:
2530 (WTF::GMainLoopSource::GMainLoopSource):
2531 (WTF::GMainLoopSource::~GMainLoopSource):
2532 (WTF::GMainLoopSource::cancel):
2533 (WTF::GMainLoopSource::cancelInternal):
2534 (WTF::GMainLoopSource::scheduleIdleSource):
2535 (WTF::GMainLoopSource::schedule):
2536 (WTF::GMainLoopSource::scheduleTimeoutSource):
2537 (WTF::GMainLoopSource::scheduleAfterDelay):
2538 (WTF::GMainLoopSource::voidCallback):
2539 (WTF::GMainLoopSource::boolCallback):
2540 (WTF::GMainLoopSource::socketCallback):
2541 (WTF::GMainLoopSource::destroy):
2542 (WTF::GMainLoopSource::reset): Deleted.
2543 * wtf/gobject/GMainLoopSource.h:
2545 2014-09-02 Daniel Bates <dabates@apple.com>
2547 [iOS] Support using Foundation networking code
2548 https://bugs.webkit.org/show_bug.cgi?id=136467
2550 Reviewed by Pratik Solanki.
2552 Disable USE(CFNETWORK) and use the Foundation networking code by default when building
2553 iOS WebKit without the Apple Internal SDK.
2557 2014-08-26 Maciej Stachowiak <mjs@apple.com>
2559 Use RetainPtr::autorelease in some places where it seems appropriate
2560 https://bugs.webkit.org/show_bug.cgi?id=136280
2562 Reviewed by Darin Adler.
2564 * wtf/text/mac/StringImplMac.mm:
2565 (WTF::StringImpl::operator NSString *): Use autorelease() instead of
2566 CFBridgingRelease(leakRef())
2568 2014-08-29 Joseph Pecoraro <pecoraro@apple.com>
2570 JavaScriptCore: Use ASCIILiteral where possible
2571 https://bugs.webkit.org/show_bug.cgi?id=136179
2573 Reviewed by Michael Saboff.
2575 * wtf/text/WTFString.cpp:
2578 2014-08-27 Filip Pizlo <fpizlo@apple.com>
2580 DFG should compute immediate dominators using the O(n log n) form of Lengauer and Tarjan's "A Fast Algorithm for Finding Dominators in a Flowgraph"
2581 https://bugs.webkit.org/show_bug.cgi?id=93361
2583 Reviewed by Mark Hahnenberg.
2585 Make BitVector operations return the previous value of the bit you're changing. This is
2586 useful for the kinds of set operations that are commonplace in compiler graph searches.
2589 (WTF::BitVector::quickSet):
2590 (WTF::BitVector::quickClear):
2591 (WTF::BitVector::set):
2592 (WTF::BitVector::ensureSizeAndSet):
2593 (WTF::BitVector::clear):
2595 2014-08-27 Filip Pizlo <fpizlo@apple.com>
2597 FTL should be able to do polymorphic call inlining
2598 https://bugs.webkit.org/show_bug.cgi?id=135145
2600 Reviewed by Geoffrey Garen.
2602 Add some power that I need for call edge profiling.
2605 (WTF::OwnPtr<T>::createTransactionally):
2607 (WTF::Spectrum::add):
2608 (WTF::Spectrum::addAll):
2609 (WTF::Spectrum::get):
2610 (WTF::Spectrum::size):
2611 (WTF::Spectrum::KeyAndCount::KeyAndCount):
2612 (WTF::Spectrum::clear):
2613 (WTF::Spectrum::removeIf):
2615 2014-08-27 Nico Weber <thakis@chromium.org>
2617 Delete a MSVS2010 workaround.
2618 https://bugs.webkit.org/show_bug.cgi?id=136321
2620 Reviewed by Benjamin Poulain.
2622 Ports https://codereview.chromium.org/512923004/ by the talented
2623 Nico Weber from Blink. No intended behavior change.
2628 2014-08-27 Mark Rowe <mrowe@apple.com>
2630 JavaScriptCore is missing debug info for WTF because libWTF.a is stripped.
2631 <https://webkit.org/b/136320> / <rdar://problem/18148776>
2633 Reviewed by Dan Bernstein.
2635 * Configurations/WTF.xcconfig: Set STRIP_INSTALLED_PRODUCT = NO for the target
2636 that produces libWTF.a so that the debug symbols will be linked into JavaScriptCore
2637 and end up in its dSYM file.
2639 2014-08-26 Commit Queue <commit-queue@webkit.org>
2641 Unreviewed, rolling out r172940.
2642 https://bugs.webkit.org/show_bug.cgi?id=136256
2644 Caused assertions on fast/storage/serialized-script-
2645 value.html, and possibly flakiness on more tests (Requested by
2650 "FTL should be able to do polymorphic call inlining"
2651 https://bugs.webkit.org/show_bug.cgi?id=135145
2652 http://trac.webkit.org/changeset/172940
2654 2014-08-23 Filip Pizlo <fpizlo@apple.com>
2656 FTL should be able to do polymorphic call inlining
2657 https://bugs.webkit.org/show_bug.cgi?id=135145
2659 Reviewed by Geoffrey Garen.
2661 Add some power that I need for call edge profiling.
2664 (WTF::OwnPtr<T>::createTransactionally):
2666 (WTF::Spectrum::add):
2667 (WTF::Spectrum::addAll):
2668 (WTF::Spectrum::get):
2669 (WTF::Spectrum::size):
2670 (WTF::Spectrum::KeyAndCount::KeyAndCount):
2671 (WTF::Spectrum::clear):
2672 (WTF::Spectrum::removeIf):
2674 2014-08-25 Tomas Popela <tpopela@redhat.com>
2676 Add support for little-endian PowerPC64
2677 https://bugs.webkit.org/show_bug.cgi?id=135647
2679 Reviewed by Oliver Hunt.
2684 2014-08-24 Zan Dobersek <zdobersek@igalia.com>
2686 GenericHashTraits::peek() is producing copies of passed-in temporary values
2687 https://bugs.webkit.org/show_bug.cgi?id=131461
2689 Reviewed by Darin Adler.
2692 (WTF::GenericHashTraits::peek): Make this method a template that passes through
2693 the passed-in value without copying, achieved by using universal references and
2696 2014-08-22 Daniel Bates <dabates@apple.com>
2698 [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
2699 and ENABLE_XSLT when building with the iOS public SDK
2700 https://bugs.webkit.org/show_bug.cgi?id=135945
2702 Reviewed by Andy Estes.
2704 * wtf/FeatureDefines.h:
2706 2014-08-22 Akos Kiss <akiss@inf.u-szeged.hu>
2708 Enable fixed executable allocator for any ARM64 target.
2709 https://bugs.webkit.org/show_bug.cgi?id=136162
2711 Reviewed by Michael Saboff.
2713 The ARM64 macro assembler relies on near calls being implemented by BL
2714 instructions, which have only 128MB offset range from PC. The
2715 on-demand executable allocator cannot ensure that any two locations in
2716 memory allocated for the JIT-compiled code are within this range.
2717 However, the fixed executable allocator has a fixed 16MB memory pool for
2721 Define ENABLE_EXECUTABLE_ALLOCATOR_FIXED if CPU(ARM64), and update
2724 2014-08-22 Commit Queue <commit-queue@webkit.org>
2726 Unreviewed, rolling out r172844.
2727 https://bugs.webkit.org/show_bug.cgi?id=136164
2729 re-applying WEBCORE_EXPORTS patch (Requested by
2730 alexchristensen on #webkit).
2734 "Revert r172831, it broke the Windows build."
2735 http://trac.webkit.org/changeset/172844
2737 2014-08-22 Jon Lee <jonlee@apple.com>
2739 Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
2740 https://bugs.webkit.org/show_bug.cgi?id=136157
2742 Reviewed by Simon Fraser.
2744 * wtf/FeatureDefines.h: Remove ENABLE(RUBBER_BANDING) logic for Mac platform.
2746 2014-08-21 Tim Horton <timothy_horton@apple.com>
2748 Revert r172831, it broke the Windows build.
2750 * wtf/ExportMacros.h:
2752 2014-08-21 Zalan Bujtas <zalan@apple.com>
2754 Enable SATURATED_LAYOUT_ARITHMETIC.
2755 https://bugs.webkit.org/show_bug.cgi?id=136106
2757 Reviewed by Simon Fraser.
2759 SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
2760 (No measurable performance regression on Mac.)
2762 * wtf/FeatureDefines.h:
2764 2014-08-21 Alex Christensen <achristensen@webkit.org>
2766 More WEBCORE_EXPORT macros.
2767 https://bugs.webkit.org/show_bug.cgi?id=136129
2769 Reviewed by Tim Horton.
2771 * wtf/ExportMacros.h:
2772 Removed WTF_TESTING which isn't used.
2774 2014-08-20 Akos Kiss <akiss@inf.u-szeged.hu>
2776 Enable ARM64 disassembler on EFL
2777 https://bugs.webkit.org/show_bug.cgi?id=136089
2779 Reviewed by Filip Pizlo.
2782 Enable WTF_USE_ARM64_DISASSEMBLER for EFL as well.
2784 2014-08-19 Pratik Solanki <psolanki@apple.com>
2786 Remove PurgeableBuffer since it is not very useful any more
2787 https://bugs.webkit.org/show_bug.cgi?id=135939
2789 Reviewed by Andreas Kling.
2791 * wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
2792 * wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
2794 2014-08-19 Magnus Granberg <zorry@gentoo.org>
2796 TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
2797 https://bugs.webkit.org/show_bug.cgi?id=70610
2799 Reviewed by Darin Adler.
2801 Add PLT if we're building with PIC.
2805 2014-08-19 Zalan Bujtas <zalan@apple.com>
2807 Remove ENABLE(SUBPIXEL_LAYOUT).
2808 https://bugs.webkit.org/show_bug.cgi?id=136077
2810 Reviewed by Simon Fraser.
2812 Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
2814 * wtf/FeatureDefines.h:
2816 2014-08-18 Maciej Stachowiak <mjs@apple.com>
2818 Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
2819 https://bugs.webkit.org/show_bug.cgi?id=136035
2821 Reviewed by Dan Bernstein.
2823 * wtf/Platform.h: Define USE(APPLE_INTERNAL_SDK) by default on platforms that have it.
2825 2014-08-18 Commit Queue <commit-queue@webkit.org>
2827 Unreviewed, rolling out r172736.
2828 https://bugs.webkit.org/show_bug.cgi?id=136060
2830 Caused 14% PLT regressions (Requested by rniwa on #webkit).
2834 "Remove PurgeableBuffer since it is not very useful any more"
2835 https://bugs.webkit.org/show_bug.cgi?id=135939
2836 http://trac.webkit.org/changeset/172736
2838 2014-08-18 Pratik Solanki <psolanki@apple.com>
2840 Remove PurgeableBuffer since it is not very useful any more
2841 https://bugs.webkit.org/show_bug.cgi?id=135939
2843 Reviewed by Geoffrey Garen.
2845 * wtf/Platform.h: Remove ENABLE_PURGEABLE_MEMORY define.
2846 * wtf/VMTags.h: Remove VM tags used by WebCore for cached resource purgeable memory.
2848 2014-08-14 Benjamin Poulain <benjamin@webkit.org>
2850 CSS JIT: compile the :empty pseudo class
2851 https://bugs.webkit.org/show_bug.cgi?id=135958
2853 Reviewed by Andreas Kling.
2855 * wtf/text/StringImpl.h:
2856 (WTF::StringImpl::lengthMemoryOffset):
2858 2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
2860 Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is applied to them
2861 https://bugs.webkit.org/show_bug.cgi?id=135756
2863 Reviewed by Darin Adler.
2865 Add a method to StringView which passes through contains() to find().
2867 * wtf/text/StringView.h:
2868 (WTF::StringView::contains):
2870 2014-08-12 Pratik Solanki <psolanki@apple.com>
2872 Enable didReceiveDataArray callback on Mac
2873 https://bugs.webkit.org/show_bug.cgi?id=135554
2874 <rdar://problem/9170731>
2876 Reviewed by Andreas Kling.
2878 Enable WTF_USE_NETWORK_CFDATA_ARRAY_CALLBACK for all Cocoa platforms so that we use the same
2879 code path for Mac and iOS.
2883 2014-08-12 Alex Christensen <achristensen@webkit.org>
2885 Generate header detection headers for CMake on Windows.
2886 https://bugs.webkit.org/show_bug.cgi?id=135807
2888 Reviewed by Brent Fulgham.
2890 * wtf/CMakeLists.txt:
2891 * wtf/PlatformWin.cmake:
2892 Generate and include a stub WTFHeaderDetection.h.
2894 2014-08-11 Andy Estes <aestes@apple.com>
2896 [iOS] Get rid of iOS.xcconfig
2897 https://bugs.webkit.org/show_bug.cgi?id=135809
2899 Reviewed by Joseph Pecoraro.
2901 All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
2903 * Configurations/Base.xcconfig:
2904 * Configurations/iOS.xcconfig: Removed.
2905 * WTF.xcodeproj/project.pbxproj:
2907 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
2909 Clean up GMutexLocker
2910 https://bugs.webkit.org/show_bug.cgi?id=135833
2912 Reviewed by Carlos Garcia Campos.
2914 Place the GMutexLocker into the WTF namespace. There's no need for this
2915 class to use FastMalloc since it's always allocated on the stack. The
2916 constructor and class now operate on a GMutex reference. There's little
2917 need for an additional inline specifier for methods defined in the header.
2918 The mutex() method is removed as it was not used. m_val is renamed to a
2919 more descriptive m_locked and is made a boolean.
2921 * wtf/gobject/GMutexLocker.h:
2922 (WTF::GMutexLocker::GMutexLocker):
2923 (WTF::GMutexLocker::~GMutexLocker):
2924 (WTF::GMutexLocker::lock):
2925 (WTF::GMutexLocker::unlock):
2926 (WebCore::GMutexLocker::GMutexLocker): Deleted.
2927 (WebCore::GMutexLocker::~GMutexLocker): Deleted.
2928 (WebCore::GMutexLocker::lock): Deleted.
2929 (WebCore::GMutexLocker::unlock): Deleted.
2930 (WebCore::GMutexLocker::mutex): Deleted.
2932 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
2934 Make GRefPtr move-able
2935 https://bugs.webkit.org/show_bug.cgi?id=135801
2937 Reviewed by Carlos Garcia Campos.
2939 Add move constructor and move assignment operator for GRefPtr.
2941 * wtf/gobject/GRefPtr.h:
2942 (WTF::GRefPtr::GRefPtr):
2945 2014-08-10 Benjamin Poulain <benjamin@webkit.org>
2947 Update HashTable's operator= after r172167 per review comments
2950 Update the type as suggested by Darin.
2952 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
2954 Get rid of SCRIPTED_SPEECH
2955 https://bugs.webkit.org/show_bug.cgi?id=135729
2957 Reviewed by Brent Fulgham.
2959 * wtf/FeatureDefines.h:
2961 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
2963 Get rid of INPUT_SPEECH
2964 https://bugs.webkit.org/show_bug.cgi?id=135672
2966 Reviewed by Andreas Kling.
2968 * wtf/FeatureDefines.h:
2970 2014-08-06 Dean Jackson <dino@apple.com>
2972 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
2973 https://bugs.webkit.org/show_bug.cgi?id=135675
2975 Reviewed by Sam Weinig.
2977 * wtf/FeatureDefines.h:
2979 2014-08-06 Benjamin Poulain <benjamin@webkit.org>
2981 HashTable based classes leak a lot
2982 https://bugs.webkit.org/show_bug.cgi?id=135638
2984 Reviewed by Darin Adler.
2987 The operator= taking a rvalue reference was never freeing the memory allocated
2988 for the table of the left hand side object.
2990 This patch fixes the leaks by doing an alloc+swap with a new object.
2991 The object temp gets the reference to m_table, and destroys it in the regular destructor
2992 when going out of scope.
2994 Kudos to Pratik Solanki for finding the leaks.
2996 2014-08-06 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
2998 [JSC] Build fix for FTL on EFL after ftlopt merge
2999 https://bugs.webkit.org/show_bug.cgi?id=135565
3001 Reviewed by Mark Lam.
3003 Added ENABLE(FTL_NATIVE_CALL_INLINING).
3007 2014-08-04 Alex Christensen <achristensen@webkit.org>
3009 Progress towards CMake on Mac.
3010 https://bugs.webkit.org/show_bug.cgi?id=135528
3012 Reviewed by Gyuyoung Kim.
3014 * wtf/CMakeLists.txt:
3015 Include text directory.
3016 * wtf/PlatformMac.cmake: Added.
3018 2014-07-31 Alex Christensen <achristensen@webkit.org>
3020 Progress towards cmake on Windows.
3021 https://bugs.webkit.org/show_bug.cgi?id=135484
3023 Reviewed by Martin Robinson.
3025 * wtf/CMakeLists.txt:
3026 Added WTF_LIBRARY_TYPE because Windows needs WTF to be a shared library.
3028 2014-07-30 Andreas Kling <akling@apple.com>
3030 PropertyName's internal string is always atomic.
3031 <https://webkit.org/b/135451>
3033 Remove AtomicString::findStringWithHash() since nobody uses it anymore.
3035 Reviewed by Benjamin Poulain.
3037 * wtf/text/AtomicString.cpp:
3038 (WTF::findString): Deleted.
3039 (WTF::AtomicString::findStringWithHash): Deleted.
3040 * wtf/text/AtomicString.h:
3042 2014-07-30 Andy Estes <aestes@apple.com>
3044 USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
3045 https://bugs.webkit.org/show_bug.cgi?id=135439
3047 Reviewed by Tim Horton.
3049 We now support two different platform content filters, and will soon support a mock content filter (as part of
3050 webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
3051 library. ENABLE() is the correct macro to use for such a feature.
3055 2014-07-29 Brent Fulgham <bfulgham@apple.com>
3057 [Win] Modify version numbering scheme to support 5-tuple versions
3058 https://bugs.webkit.org/show_bug.cgi?id=135400
3059 <rdar://problem/17849033>
3061 Reviewed by David Kilzer.
3063 * WTF.vcxproj/WTFPostBuild.cmd: Use new version-stamp.pl script
3065 * WTF.vcxproj/WTFPreBuild.cmd: Make sure we have created the
3066 appropriate version resource during builds.
3068 2014-07-29 Daniel Bates <dabates@apple.com>
3070 Use WTF::move() instead of std::move() to help ensure move semantics
3071 https://bugs.webkit.org/show_bug.cgi?id=135351
3073 Reviewed by Alexey Proskuryakov.
3076 (WTF::KeyTraits>::HashTable):
3078 2014-07-28 Brian J. Burg <burg@cs.washington.edu>
3080 Should not export symbols for base64Encode inline adapter methods
3081 https://bugs.webkit.org/show_bug.cgi?id=135355
3083 Unreviewed build fix.
3085 Fixes the build break introduced by r171682, where a base64Encode
3086 inline adapter method was used in another header, thus creating
3087 multiple definitions of it (and problems with with weak symbols).
3089 * wtf/text/Base64.h: Remove WTF_EXPORT_PRIVATE for inlined methods.
3091 2014-07-27 Filip Pizlo <fpizlo@apple.com>
3093 Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
3095 * wtf/text/WTFString.h:
3097 2014-07-26 Filip Pizlo <fpizlo@apple.com>
3099 Unreviewed, roll out r171641-r171644. It broke some tests; will investigate and
3102 * wtf/text/WTFString.h:
3104 2014-07-25 Filip Pizlo <fpizlo@apple.com>
3106 Attempt to fix Windows.
3108 * wtf/text/WTFString.h:
3110 2014-07-25 Gavin Barraclough <baraclough@apple.com>
3112 Yosemite version number is 101000
3113 https://bugs.webkit.org/show_bug.cgi?id=135301
3115 Reviewed by Sam Weinig.
3117 * wtf/FeatureDefines.h:
3120 2014-07-23 Brent Fulgham <bfulgham@apple.com>
3122 [Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
3123 https://bugs.webkit.org/show_bug.cgi?id=13519
3125 Reviewed by Mark Lam.
3127 * wtf/Assertions.h: Add MSVC to list of compilers supporting this macro.
3128 * wtf/FastMalloc.cpp: Correct function declaration for NO_RETURN_DUE_TO_CRASH.
3130 2014-07-22 Filip Pizlo <fpizlo@apple.com>
3132 Merge r169148, r169185, r169188, r169578, r169582, r169584, r169588, r169753 from ftlopt.
3134 2014-06-04 Filip Pizlo <fpizlo@apple.com>
3136 [ftlopt] AI should be able track structure sets larger than 1
3137 https://bugs.webkit.org/show_bug.cgi?id=128073
3139 Reviewed by Oliver Hunt.
3142 (WTF::Bag::Node::Node):
3145 2014-07-22 Filip Pizlo <fpizlo@apple.com>
3147 Merge r168635, r168780, r169005, r169014, and r169143 from ftlopt.
3149 2014-05-20 Filip Pizlo <fpizlo@apple.com>
3151 [ftlopt] DFG bytecode parser should turn GetById with nothing but a Getter stub as stuff+handleCall, and handleCall should be allowed to inline if it wants to
3152 https://bugs.webkit.org/show_bug.cgi?id=133105
3154 Reviewed by Michael Saboff.
3157 (WTF::Bag::iterator::operator!=):
3159 2014-07-19 Zan Dobersek <zdobersek@igalia.com>
3161 [WTF] Add the move constructor, move assignment operator for HashTable
3162 https://bugs.webkit.org/show_bug.cgi?id=130772
3164 Reviewed by Darin Adler.
3166 HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
3167 and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
3168 copies when moves can be performed.
3171 (WTF::KeyTraits>::HashTable):
3173 2014-07-15 Commit Queue <commit-queue@webkit.org>
3175 Unreviewed, rolling out r171107.
3176 https://bugs.webkit.org/show_bug.cgi?id=134959
3178 This was not the problem! (Requested by kling on #webkit).
3182 "Revert: Run the FastMalloc scavenger thread on iOS as well."
3183 https://bugs.webkit.org/show_bug.cgi?id=134927
3184 http://trac.webkit.org/changeset/171107
3186 2014-07-15 Andreas Kling <akling@apple.com>
3188 Revert: Run the FastMalloc scavenger thread on iOS as well.
3189 <https://webkit.org/b/134927>
3190 <rdar://problem/17485079>
3192 This appears to be the cause of some elusive crashes, and since I don't
3193 have a way to reproduce them, let's just go back to not running the
3194 scavenger thread on iOS.
3196 Reviewed by Antti Koivisto.
3198 * wtf/FastMalloc.cpp:
3200 2014-07-13 Filip Pizlo <fpizlo@apple.com>
3202 HashMap should have removeIf()
3203 https://bugs.webkit.org/show_bug.cgi?id=134870
3205 Reviewed by Sam Weinig.
3207 Expose a new HashMap method, called removeIf(), which allows you to do an efficient
3208 pass over the map and remove a bunch of things at once. This is used by DFG GCSE as
3209 part of https://bugs.webkit.org/show_bug.cgi?id=134677.
3212 (WTF::X>::removeIf):
3214 (WTF::KeyTraits>::removeIf):
3216 2014-07-11 peavo@outlook.com <peavo@outlook.com>
3218 [Win] Enable DFG JIT.
3219 https://bugs.webkit.org/show_bug.cgi?id=123615
3221 Reviewed by Mark Lam.
3225 2014-07-11 Commit Queue <commit-queue@webkit.org>
3227 Unreviewed, rolling out r170995.
3228 https://bugs.webkit.org/show_bug.cgi?id=134831
3230 Causing odd crashes in debug builds (Requested by zdobersek on
3235 "[WTF] Add the move constructor, move assignment operator for
3237 https://bugs.webkit.org/show_bug.cgi?id=130772
3238 http://trac.webkit.org/changeset/170995
3240 2014-07-09 Zan Dobersek <zdobersek@igalia.com>
3242 [WTF] Add the move constructor, move assignment operator for HashTable
3243 https://bugs.webkit.org/show_bug.cgi?id=130772
3245 Reviewed by Darin Adler.
3247 HashTable has both copy constructor and copy assignment operator, meaning that the move constructor
3248 and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary
3249 copies when moves can be performed.
3252 (WTF::KeyTraits>::HashTable):
3254 2014-07-10 Alex Christensen <achristensen@webkit.org>
3256 Enable same features on all Windows ports.
3257 https://bugs.webkit.org/show_bug.cgi?id=134715
3259 Reviewed by Brent Fulgham.
3262 Use REQUEST_ANIMATION_FRAME_TIMER on WinCairo.
3264 2014-07-09 Brent Fulgham <bfulgham@apple.com>
3266 [Win] Unreviewed build fix after r170930.
3268 * WTF.vcxproj/copy-files.cmd: Include cf files in
3269 post-build copy operation.
3271 2014-07-09 Brent Fulgham <bfulgham@apple.com>
3273 [Win] Remove uses of 'bash' in build system
3274 https://bugs.webkit.org/show_bug.cgi?id=134782
3275 <rdar://problem/17615533>
3277 Reviewed by Dean Jackson.
3279 Remove uses of 'bash' by replacing Windows-specific bash scripts
3280 with Perl equivalents.
3282 * WTF.vcxproj/WTFGenerated.make:
3283 * WTF.vcxproj/WTFGenerated.vcxproj:
3284 * WTF.vcxproj/WTFGenerated.vcxproj.filters:
3285 * WTF.vcxproj/WTFPreBuild.cmd:
3286 * WTF.vcxproj/build-generated-files.pl: Copied from Source/WTF/WTF.vcxproj/build-generated-files.sh.
3287 * WTF.vcxproj/build-generated-files.sh: Removed.
3289 2014-07-09 Brent Fulgham <bfulgham@apple.com>
3291 [Win] Remove use of 'grep' in build steps
3292 https://bugs.webkit.org/show_bug.cgi?id=134770
3293 <rdar://problem/17608783>
3295 Reviewed by Tim Horton.
3297 Replace uses of the grep command in Windows builds with the equivalent
3300 * WTF.vcxproj/WTFPreBuild.cmd:
3302 2014-07-07 Zan Dobersek <zdobersek@igalia.com>
3304 Enable ARMv7 disassembler for the GTK port
3305 https://bugs.webkit.org/show_bug.cgi?id=134676
3307 Reviewed by Benjamin Poulain.
3309 * wtf/Platform.h: Enable the ARMv7 disassembler for the GTK port when
3310 targeting the ARMv7 architecture.
3312 2014-07-06 Yoav Weiss <yoav@yoav.ws>
3314 Turn on img@sizes compile flag
3315 https://bugs.webkit.org/show_bug.cgi?id=134634
3317 Reviewed by Benjamin Poulain.
3319 * wtf/FeatureDefines.h: Added compile flag definition.
3321 2014-07-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3323 Unreivewed, fix build break on EFL and GTK since r170767.
3325 * wtf/CMakeLists.txt: Exclude Decoder.h and Encoder.h because those files were removed.
3327 2014-07-03 Daniel Bates <dabates@apple.com>
3330 https://bugs.webkit.org/show_bug.cgi?id=134500
3332 Reviewed by Darin Adler.
3334 Substitution of WTF::move() for std::move() rubber-stamped by Anders Carlsson.
3336 Implement WTF::move(), a replacement for std::move(). WTF::move() is less error
3337 prone than std::move() as it compile asserts that its argument is a non-const
3338 lvalue reference before ultimately casting it to a rvalue reference (via std::move).
3340 * wtf/Deque.h: Substitute WTF::move() for std::move().
3341 * wtf/HashMap.h: Ditto.
3342 * wtf/HashSet.h: Ditto.
3343 * wtf/HashTable.h: Ditto.
3344 * wtf/IteratorAdaptors.h: Ditto.
3345 * wtf/IteratorRange.h: Ditto.
3346 * wtf/ListHashSet.h: Ditto.
3347 * wtf/MainThread.cpp: Ditto.
3349 * wtf/StdLibExtras.h:
3353 2014-07-03 Anders Carlsson <andersca@apple.com>
3355 Get rid of Encoder.h and Decoder.h from WTF
3356 https://bugs.webkit.org/show_bug.cgi?id=134600
3358 Reviewed by Darin Adler.
3360 * WTF.vcxproj/WTF.vcxproj:
3361 * WTF.vcxproj/WTF.vcxproj.filters:
3362 * WTF.xcodeproj/project.pbxproj:
3363 * wtf/Decoder.h: Removed.
3364 * wtf/Encoder.h: Removed.
3366 2014-07-03 Ryuan Choi <ryuan.choi@samsung.com>
3368 Broken build with build-webkit --no-video
3369 https://bugs.webkit.org/show_bug.cgi?id=134587
3371 Reviewed by Darin Adler.
3373 MEDIA_CONTROLS_SCRIPT requires VIDEO enabled.
3375 * wtf/FeatureDefines.h: Added error message for dependency failure.
3377 2014-07-02 Enrica Casucci <enrica@apple.com>
3379 iOS build fix after http://trac.webkit.org/changeset/170697.
3385 2014-07-02 Dan Bernstein <mitz@apple.com>
3387 Remove some code only needed for versions of Safari that are no longer supported
3388 https://bugs.webkit.org/show_bug.cgi?id=134537
3390 Reviewed by Anders Carlsson.
3392 * wtf/Assertions.cpp:
3395 2014-07-01 Alex Christensen <achristensen@webkit.org>
3397 Reduce dynamic memory allocation in css jit.
3398 https://bugs.webkit.org/show_bug.cgi?id=134416
3400 Reviewed by Benjamin Poulain.
3403 Added inlineCapacity optional template parameter.
3405 2014-06-30 Commit Queue <commit-queue@webkit.org>
3407 Unreviewed, rolling out r170605.
3408 https://bugs.webkit.org/show_bug.cgi?id=134484
3410 The changes cause crashes on ARM64 (Requested by benjaminp on
3415 "Reduce dynamic memory allocation in css jit."
3416 https://bugs.webkit.org/show_bug.cgi?id=134416
3417 http://trac.webkit.org/changeset/170605
3419 2014-06-30 Daniel Bates <dabates@apple.com>
3421 Make TransformIterator::TransformIterator() take rvalue references
3422 https://bugs.webkit.org/show_bug.cgi?id=134468
3424 Reviewed by Darin Adler.
3426 It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
3427 as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
3428 members of TransformIterator.
3430 * wtf/IteratorAdaptors.h:
3431 (WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
3432 (WTF::makeTransformIterator): Substitute std::move() for std::forward().
3434 2014-06-30 Alex Christensen <achristensen@webkit.org>
3436 Reduce dynamic memory allocation in css jit.
3437 https://bugs.webkit.org/show_bug.cgi?id=134416
3439 Reviewed by Benjamin Poulain.
3442 Added inlineCapacity optional template parameter.
3444 2014-06-30 Anders Carlsson <andersca@apple.com>
3446 Add code for encoding legacy session history entries
3447 https://bugs.webkit.org/show_bug.cgi?id=134452
3449 Reviewed by Andreas Kling.
3452 (WTF::MallocPtr::malloc):
3453 (WTF::MallocPtr::realloc):
3455 2014-06-27 Andreas Kling <akling@apple.com>
3457 [ARMv7] Skip one particularly expensive fastFree() alignment check.
3458 <https://webkit.org/b/134402>
3460 The size class alignment check in fastFree() was crazy expensive on ARMv7
3461 due to its use of modulo. Disabling it shaves 470ms off of PLT main thread
3462 time in the web process.
3464 Note that this was very hard to identify in profiles due to TCO.
3466 Reviewed by Gavin Barraclough.
3468 * wtf/FastMalloc.cpp:
3469 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
3471 2014-06-26 Andreas Kling <akling@apple.com>
3473 Bump FastMalloc thread cache max size to 1MB on iOS.
3474 <https://webkit.org/b/134365>
3476 The previous limit (512kB) comes from the old days of very-low-memory
3477 devices, and we can now afford to spend another 512kB here.
3478 Note that we already have a mechanism to purge FastMalloc caches on
3479 system memory pressure.
3481 Looks like a ~400ms progression on PLT.
3483 Reviewed by Geoff Garen.
3485 * wtf/FastMalloc.cpp:
3487 2014-06-26 Laszlo Gombos <l.gombos@samsung.com>
3489 Define TARGET_OS_IPHONE to 0 for non-darwin ports
3490 https://bugs.webkit.org/show_bug.cgi?id=134347
3492 Reviewed by Darin Adler.
3494 A follow-up to r169880 to make it easier to reason about
3495 the code. The purpose of this change to allow
3496 "#if TARGET_OS_IPHONE" in public header files.
3500 2014-06-26 Chris Fleizach <cfleizach@apple.com>
3502 Add an undo group for each dictated utterance in WebKit
3503 https://bugs.webkit.org/show_bug.cgi?id=134086
3505 Applied review comments from Sam Weinig.
3507 Move the associated USE #define into Platform.h.
3511 2014-06-25 Geoffrey Garen <ggaren@apple.com>
3513 Unreviewed, rolling out r166876.
3515 Caused some ECMA test262 failures
3519 "Date object needs to check for ES5 15.9.1.14 TimeClip limit."
3520 https://bugs.webkit.org/show_bug.cgi?id=131248
3521 http://trac.webkit.org/changeset/166876
3523 2014-06-25 peavo@outlook.com <peavo@outlook.com>
3525 [Win64] ASM LLINT is not enabled.
3526 https://bugs.webkit.org/show_bug.cgi?id=130638
3528 Reviewed by Mark Lam.
3530 * wtf/Platform.h: Enable LLINT and JIT for Win64.
3532 2014-06-25 Laszlo Gombos <l.gombos@samsung.com>
3534 Remove build guard for progress element
3535 https://bugs.webkit.org/show_bug.cgi?id=134292
3537 Reviewed by Benjamin Poulain.
3539 The build flag is no longer needed as it is always on.
3541 * wtf/FeatureDefines.h:
3543 2014-06-24 Andreas Kling <akling@apple.com>
3545 Run the FastMalloc scavenger thread on iOS as well.
3546 <https://webkit.org/b/134287>
3547 <rdar://problem/17446198>
3549 Reviewed by Gavin Barraclough.
3551 * wtf/FastMalloc.cpp:
3553 2014-06-24 Anders Carlsson <andersca@apple.com>
3555 Add PageState to HistoryItem conversion code
3556 https://bugs.webkit.org/show_bug.cgi?id=134259
3558 Reviewed by Andreas Kling.
3561 (WTF::Optional::valueOr):
3563 2014-06-24 László Langó <llango.u-szeged@partner.samsung.com>
3565 [JavaScriptCore] Enable concurrent JIT on EFL.
3566 https://bugs.webkit.org/show_bug.cgi?id=134242
3568 Reviewed by Csaba Osztrogonác.
3572 2014-06-23 Ryuan Choi <ryuan.choi@samsung.com>
3574 [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
3575 https://bugs.webkit.org/show_bug.cgi?id=134236
3577 Reviewed by Gyuyoung Kim.
3579 Although there are ref/unref for Evas_Object, it's bit odd so we should call evas_object_del to destroy it.
3580 So, this patch replaced RefPtr<Evas_Object> with UniquePtrEfl for the simplicity.
3582 * wtf/PlatformEfl.cmake: Removed RefPtrEfl.cpp from source list.
3583 * wtf/efl/RefPtrEfl.cpp: Removed.
3584 * wtf/efl/RefPtrEfl.h: Removed.
3586 2014-06-21 Brady Eidson <beidson@apple.com>
3588 Gamepad API - Deprecate the existing implementation
3589 https://bugs.webkit.org/show_bug.cgi?id=134108
3591 Reviewed by Timothy Hatcher.
3593 -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
3594 -Move some implementation files into a "deprecated" subdirectory.
3596 * wtf/FeatureDefines.h:
3598 2014-06-21 Commit Queue <commit-queue@webkit.org>
3600 Unreviewed, rolling out r170244.
3601 https://bugs.webkit.org/show_bug.cgi?id=134157
3603 GTK/EFL bindings generator works differently, making this
3604 patch not work there. Will fix entire patch after a rollout.
3605 (Requested by bradee-oh on #webkit).
3609 "Gamepad API - Deprecate the existing implementation"
3610 https://bugs.webkit.org/show_bug.cgi?id=134108
3611 http://trac.webkit.org/changeset/170244
3613 2014-06-21 Brady Eidson <beidson@apple.com>
3615 Gamepad API - Deprecate the existing implementation
3616 https://bugs.webkit.org/show_bug.cgi?id=134108
3618 Reviewed by Timothy Hatcher.
3620 -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
3621 -Add the "Deprecated" suffix to some implementation files
3623 * wtf/FeatureDefines.h:
3625 2014-06-21 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
3627 Removing PAGE_VISIBILITY_API compile guard.
3628 https://bugs.webkit.org/show_bug.cgi?id=133844
3630 Reviewed by Gavin Barraclough.
3632 * wtf/FeatureDefines.h:
3634 2014-06-20 Anders Carlsson <andersca@apple.com>
3636 Add encoding and decoding support for WTF::Optional
3637 https://bugs.webkit.org/show_bug.cgi?id=134125
3639 Reviewed by Andreas Kling.
3642 (WTF::Optional::operator=):
3644 2014-06-20 Anders Carlsson <andersca@apple.com>
3646 Add copy/move constructors and assignment operators to WTF::Optional
3647 https://bugs.webkit.org/show_bug.cgi?id=134119
3649 Reviewed by Andreas Kling.
3652 (WTF::Optional::Optional):
3653 (WTF::Optional::operator=):
3655 2014-06-19 Anders Carlsson <andersca@apple.com>
3657 Add WTF::Optional class
3658 https://bugs.webkit.org/show_bug.cgi?id=134083
3660 Reviewed by Andreas Kling.
3662 * WTF.xcodeproj/project.pbxproj:
3663 * wtf/Optional.h: Added.
3664 (WTF::Optional::Optional):
3665 (WTF::Optional::~Optional):