/
ChangeLog
15238 lines (11787 loc) · 553 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2013-02-18 Zan Dobersek <zdobersek@igalia.com>
Stop placing std::isfinite and std::signbit inside the global scope
https://bugs.webkit.org/show_bug.cgi?id=109817
Reviewed by Darin Adler.
Prefix calls to the isfinite and signbit methods with std:: as the two
methods are no longer being imported into the global scope.
On Solaris and OpenBSD platforms or when using Visual C++ the two methods
are now defined (as incompatibility workarounds) inside the std namespace.
* wtf/DateMath.cpp:
(WTF::timeClip):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/MathExtras.h:
(std):
(std::isfinite):
(std::signbit):
(lrint):
(wtf_pow):
(decomposeDouble):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/dtoa.cpp:
(WTF::dtoa):
2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735
Reviewed by Darin Adler and Benjamin Poulain.
Introduce FeatureDefines.h by combining the existing rules from
Platform.h and adding new rules for all the ENABLE flags that are
listed in the FeatureFlags wiki.
The new rules are not used at the moment by any ports
as the port specific build systems already define these flags
so the !defined() guard will prevent redefinition of the macros.
* GNUmakefile.list.am: Add FeatureDefines.h.
* WTF.gypi: Ditto.
* WTF.pro: Ditto.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/FeatureDefines.h: Added.
* wtf/Platform.h: Move macro definitions to FeatureDefines.h.
2013-02-16 Darin Adler <darin@apple.com>
Remove redundant use of inline keyword in StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=110036
Reviewed by Geoffrey Garen.
I have some other improvements for StringHasher.h, but wanted to get the simplest ones
out of the way first.
* wtf/StringHasher.h: Remove inline keyword on functions inside the class definition,
since functions defined inside the class are automatically inline.
2013-02-15 Martin Robinson <mrobinson@igalia.com>
[GTK] Spread the gyp build files throughout the tree
https://bugs.webkit.org/show_bug.cgi?id=109960
Reviewed by Dirk Pranke.
* WTF.gyp/WTFGTK.gyp: Renamed from Source/WebKit/gtk/gyp/WTF.gyp.
2013-02-15 Anders Carlsson <andersca@apple.com>
Add HashMap::isValidKey and HashSet::isValidValue
https://bugs.webkit.org/show_bug.cgi?id=109977
Reviewed by Sam Weinig and Darin Adler.
Add helper functions for determining whether keys are valid, i.e. if
they are _not_ empty or deleted according to the hash traits.
* wtf/HashMap.h:
* wtf/HashSet.h:
2013-02-15 Laszlo Gombos <l.gombos@samsung.com>
Remove support for RVCT version less than 4.0
https://bugs.webkit.org/show_bug.cgi?id=109390
The 4.0 version of the RVCT compiler was
released in 2008.
Remove support for version older then 4.0 of RVCT,
and keep the support for newer RVCT versions.
Reviewed by Zoltan Herczeg.
* WTF.gypi: Remove StringExtras.cpp.
* WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
* WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
* wtf/CMakeLists.txt: Remove StringExtras.cpp.
* wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
* wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
* wtf/Float64Array.h: Ditto.
* wtf/Int16Array.h: Ditto.
* wtf/Int32Array.h: Ditto.
* wtf/Int8Array.h: Ditto.
* wtf/MathExtras.h: Remove a quirk needed for RVCT version <= 3.0.
* wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
* wtf/StringExtras.cpp: Removed.
* wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
* wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
* wtf/Uint32Array.h: Ditto.
* wtf/Uint8Array.h: Ditto.
* wtf/Uint8ClampedArray.h: Ditto.
2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add CString operators for comparison with const char*
https://bugs.webkit.org/show_bug.cgi?id=109947
Reviewed by Darin Adler.
Add operators to WTF::CString for equality/inequality comparison
with const char* strings. This avoids constructing a CString
from a const char* in such cases, which is can be expensive as
it would copy it and call strlen().
* wtf/text/CString.cpp:
(WTF::operator==): Use memcmp instead of strncmp to compare the
CString buffers as we know they are the same size and we don't
want to scan for terminating null byte.
(WTF):
* wtf/text/CString.h:
(WTF):
(WTF::operator!=):
2013-02-15 Geoffrey Garen <ggaren@apple.com>
Merged the global function cache into the source code cache
https://bugs.webkit.org/show_bug.cgi?id=108660
Reviewed by Sam Weinig.
Responding to review comments by Darin Adler.
* wtf/HashTraits.h: Added a using directive to simplify client code.
2013-02-14 Dan Bernstein <mitz@apple.com>
No easy way to use a RetainPtr as a key in a HashMap using object (rather than pointer) equality
https://bugs.webkit.org/show_bug.cgi?id=109864
Reviewed by Sam Weinig and Benjamin Poulain.
Added RetainPtrObjectHashTraits and RetainPtrObjectHash, which use CFEqual
and CFHash.
* wtf/RetainPtr.h:
(RetainPtrObjectHashTraits):
(WTF::RetainPtrObjectHashTraits::emptyValue):
(WTF::RetainPtrObjectHashTraits::constructDeletedValue):
(WTF::RetainPtrObjectHashTraits::isDeletedValue):
(WTF):
(WTF::RetainPtrObjectHash::hash):
(WTF::RetainPtrObjectHash::equal):
(RetainPtrObjectHash):
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
https://bugs.webkit.org/show_bug.cgi?id=96934
* WTF.vcproj/WTF.sln: Modified property svn:eol-style.
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style CRLF for .sln files.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 David Kilzer <ddkilzer@apple.com>
[Mac] Clean up WARNING_CFLAGS
<http://webkit.org/b/109747>
<rdar://problem/13208373>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Use
GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
-Wshorten-64-to-32 rather than WARNING_CFLAGS.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 Eric Seidel <eric@webkit.org>
String(Vector) behaves differently from String(vector.data(), vector.size()) for vectors with inline capacity in the size=0 case
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Darin Adler.
This makes String(Vector) never return null strings.
Which matches behavior of String(UChar*, size_t)
for vectors with inlineCapacity, but differs from
String(UChar*, size_t) in the no-inlineCapacity case.
This incidentally will fix a behavioral regression
in the html threaded parser which came from converting
many String(UChar*, size_t) callsites to using String(Vector).
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-14 Eric Seidel <eric@webkit.org>
REGRESSION(r142712): attribute values show up as "(null)" instead of null with the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Benjamin Poulain.
When I changed many callsites to use the (existing) String(Vector) constructor
I inadvertantly made those callsites convert empty vectors to null strings
instead of empty strings (like String(UChar,size_t) does).
This is due to an oddity/bug in our Vector implementation where data()
will be 0 if the Vector is empty, but only if it doesn't have inline capacity.
https://bugs.webkit.org/show_bug.cgi?id=109792
This changes String(Vector) to exactly match the behavior of String(vector.data(), vector.size()).
This regression was easily detectable with the threaded parser, because we use String
instead of AtomicString in our CompactToken (used to send the Token data
between threads). The main-thread parser path uses AtomicHTMLToken which
uses AtomicString(Vector) and does not have this bug.
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-13 Zan Dobersek <zdobersek@igalia.com>
The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
https://bugs.webkit.org/show_bug.cgi?id=109325
Reviewed by Anders Carlsson.
Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
two methods as they're provided by the C++ standard library being used.
* wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
* wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/IntegralTypedArrayBase.h:
(WTF::IntegralTypedArrayBase::set):
* wtf/MathExtras.h:
(std):
(std::isinf):
(wtf_fmod):
(wtf_pow):
(doubleToInteger):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set):
2013-02-13 Eric Seidel <eric@webkit.org>
Don't copy Vector<UChar> when passing to new String methods from bug 109617
https://bugs.webkit.org/show_bug.cgi?id=109708
Reviewed by Tony Gentilcore.
Thanks for the catch Darin.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
2013-02-13 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove remaining dead code from the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109707
Reviewed by Philippe Normand.
* wtf/unicode/Unicode.h:
2013-02-13 Andrew Wilson <atwilson@chromium.org>
Unreviewed Chromium gyp-file cleanup after glib backend removal.
https://bugs.webkit.org/show_bug.cgi?id=109672
Removed references to GLib unicode backend:
* WTF.gyp/WTF.gyp:
* WTF.gypi:
2013-02-12 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109627
Reviewed by Benjamin Poulain.
Remove references to the GLib unicode backend from WTF.
* GNUmakefile.list.am: Remove GLib unicode files from the source list.
* wtf/unicode/glib/UnicodeGLib.cpp: Removed.
* wtf/unicode/glib/UnicodeGLib.h: Removed.
2013-02-12 Takeshi Yoshino <tyoshino@google.com>
Remove unnecessary and confusing includes from StreamBuffer.h.
https://bugs.webkit.org/show_bug.cgi?id=109652
Reviewed by Benjamin Poulain.
StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
FixedArray.h and PassOwnPtr.h are included but not used.
VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
is even slower).
* wtf/StreamBuffer.h:
2013-02-12 Eric Seidel <eric@webkit.org>
Teach more WTF string classes about vectors with inline capacity
https://bugs.webkit.org/show_bug.cgi?id=109617
Reviewed by Benjamin Poulain.
The HTML and WebVTT parsers use constructions like:
AtomicString name(m_name.data(), m_name.size())
all over the place because they use inline capacity
on the parse vectors for performance.
This change just add the necessary template variants
to the related String constructors/methods in WTF so that
this parser code can just pass the vector directly instead.
I'll do the actual parser cleanups in follow-up patches to keep things simple.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/WTFString.h:
(String):
(WTF::String::make8BitFrom16BitSource):
(WTF):
(WTF::append):
2013-02-11 Oliver Hunt <oliver@apple.com>
Build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
https://bugs.webkit.org/show_bug.cgi?id=109534
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2013-02-11 David Kilzer <ddkilzer@apple.com>
[iOS] Upstream changes to Platform.h
<http://webkit.org/b/109459>
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
- Changes for armv7s.
- Add ENABLE() definitions for DASHBOARD_SUPPORT and WEBGL.
- Re-sort ENABLE() and USE() macros.
- Remove ENABLE() macros for JIT, LLINT and YARR_JIT to enable
on iOS Simulator. They are already defined below.
- Turn off HAVE(HOSTED_CORE_ANIMATION) for iOS.
- Turn on USE(COREMEDIA) for iOS 6.0 and later.
2013-02-08 Oliver Hunt <oliver@apple.com>
Harden FastMalloc (again)
https://bugs.webkit.org/show_bug.cgi?id=109334
Reviewed by Mark Hahnenberg.
Re-implement hardening of linked lists in TCMalloc.
In order to keep heap introspection working, we need to thread the
heap entropy manually as the introspection process can't use the
address of a global in determining the mask. Given we now have to
thread a value through anyway, I've stopped relying on ASLR for entropy
and am simply using arc4random() on darwin, and time + ASLR everywhere
else.
I've also made an explicit struct type for the FastMalloc singly linked
lists, as it seemed like the only way to reliably distinguish between
void*'s that were lists vs. void* that were not. This also made it
somewhat easier to reason about things across processes.
Verified that all the introspection tools work as expected.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(HardenedSLL):
(WTF::HardenedSLL::create):
(WTF::HardenedSLL::null):
(WTF::HardenedSLL::setValue):
(WTF::HardenedSLL::value):
(WTF::HardenedSLL::operator!):
(WTF::HardenedSLL::operator UnspecifiedBoolType):
(TCEntry):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
(WTF::SLL_Push):
(WTF::SLL_Pop):
(WTF::SLL_PopRange):
(WTF::SLL_PushRange):
(WTF::SLL_Size):
(PageHeapAllocator):
(WTF::PageHeapAllocator::Init):
(WTF::PageHeapAllocator::New):
(WTF::PageHeapAllocator::Delete):
(WTF::PageHeapAllocator::recordAdministrativeRegions):
(WTF::Span::next):
(WTF::Span::remoteNext):
(WTF::Span::prev):
(WTF::Span::setNext):
(WTF::Span::setPrev):
(Span):
(WTF::DLL_Init):
(WTF::DLL_Remove):
(WTF::DLL_IsEmpty):
(WTF::DLL_Length):
(WTF::DLL_Prepend):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(WTF::TCMalloc_Central_FreeList::entropy):
(TCMalloc_PageHeap):
(WTF::TCMalloc_PageHeap::init):
(WTF::TCMalloc_PageHeap::scavenge):
(WTF::TCMalloc_PageHeap::New):
(WTF::TCMalloc_PageHeap::AllocLarge):
(WTF::TCMalloc_PageHeap::Carve):
(WTF::TCMalloc_PageHeap::Delete):
(WTF::TCMalloc_PageHeap::ReturnedBytes):
(WTF::TCMalloc_PageHeap::Check):
(WTF::TCMalloc_PageHeap::CheckList):
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Init):
(WTF::TCMalloc_ThreadCache_FreeList::empty):
(WTF::TCMalloc_ThreadCache_FreeList::Push):
(WTF::TCMalloc_ThreadCache_FreeList::PushRange):
(WTF::TCMalloc_ThreadCache_FreeList::PopRange):
(WTF::TCMalloc_ThreadCache_FreeList::Pop):
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
(TCMalloc_ThreadCache):
(WTF::TCMalloc_Central_FreeList::Init):
(WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
(WTF::TCMalloc_Central_FreeList::InsertRange):
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
(WTF::TCMalloc_Central_FreeList::FetchFromSpans):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Init):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
(WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
(WTF::TCMalloc_ThreadCache::InitModule):
(WTF::TCMalloc_ThreadCache::NewHeap):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h:
(RemoteMemoryReader):
2013-02-11 Enrica Casucci <enrica@apple.com>
Add ENABLE_DELETION_UI to control the use of the deletion UI.
https://bugs.webkit.org/show_bug.cgi?id=109463.
ENABLE_DELETION_UI is set to 1 by default for
all ports. It is explicitly enabled for MAC and disabled for iOS.
Reviewed by Ryosuke Niwa.
* wtf/Platform.h:
2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Stop using smart pointers for Ecore_Timer
https://bugs.webkit.org/show_bug.cgi?id=109409
Reviewed by Kenneth Rohde Christiansen.
Remove support in OwnPtr for EFL's Ecore_Timer. It is a bad idea to use
OwnPtr for Ecore_Timer because the timer handle may become invalid.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
2013-02-11 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108981
Reviewed by Eric Seidel.
* wtf/BitVector.h:
(WTF::BitVector::quickGet):
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::ensureSegment):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::vprintf):
* wtf/Vector.h:
(WTF::::insert):
(WTF::::remove):
* wtf/dtoa/utils.h:
(WTF::double_conversion::StringBuilder::SetPosition):
(WTF::double_conversion::StringBuilder::AddSubstring):
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Consolidate the way WTF_USE_PTHREADS is enabled
https://bugs.webkit.org/show_bug.cgi?id=108191
Reviewed by Benjamin Poulain.
Define WTF_USE_PTHREADS to 1 on all OS(UNIX) environments.
* WTF.gyp/WTF.gyp: Remove duplicated definition of WTF_USE_PTHREADS.
* wtf/Platform.h:
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Refactor the way HAVE_XXX macros are set
https://bugs.webkit.org/show_bug.cgi?id=108132
Reviewed by Benjamin Poulain.
OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
builds exactly one of them is enabled. Use this assumption to
cleanup Platform.h.
* wtf/Platform.h:
2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=104266
Reviewed by Philippe Normand.
Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
the existing macro naming conventions.
From Platform.h
USE() - use a particular third-party library or optional OS service
ENABLE() - turn on a specific feature of WebKit
* WTF.pri:
* wtf/Platform.h:
* wtf/gobject/GOwnPtr.cpp:
* wtf/gobject/GOwnPtr.h:
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
2013-02-08 Michael Saboff <msaboff@apple.com>
ARM_NEON Inline Assembly for copyLCharsFromUCharSource() inefficient for aligned destinations
https://bugs.webkit.org/show_bug.cgi?id=109335
Reviewed by Filip Pizlo.
Change a "do while" to a "while" so that we don't copy single characters to align the
destination when it is already aligned.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2013-02-08 Jer Noble <jer.noble@apple.com>
Bring WebKit up to speed with latest Encrypted Media spec.
https://bugs.webkit.org/show_bug.cgi?id=97037
Reviewed by Eric Carlson.
Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
* wtf/Platform.h:
2013-02-08 Adam Barth <abarth@webkit.org>
Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=107190
Reviewed by Eric Seidel.
Add the ability to create an unbound weak reference. This facility lets
you start sending messages to a WeakPtr on another thread before the
object backing the WeakPtr has actually been created.
* wtf/WeakPtr.h:
(WTF::WeakReference::createUnbound):
(WTF::WeakReference::bindTo):
(WeakReference):
(WTF::WeakReference::WeakReference):
(WTF::WeakPtr::WeakPtr):
(WeakPtr):
(WTF::WeakPtrFactory::WeakPtrFactory):
(WeakPtrFactory):
(WTF::WeakPtrFactory::revokeAll):
2013-02-08 Martin Robinson <mrobinson@igalia.com>
[GTK] Add an experimental gyp build
https://bugs.webkit.org/show_bug.cgi?id=109003
Reviewed by Gustavo Noronha Silva.
* WTF.gyp/WTF.gyp: Filter out MetaAllocator.(cpp/h) from the Chromium
build. It's only necessary for GTK+.
* WTF.gypi: Add MetaAllocator to the build for WebKitGTK+.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
https://bugs.webkit.org/show_bug.cgi?id=109051
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::WrapperBase::processPointer):
2013-02-07 David Kilzer <ddkilzer@apple.com>
Fix #endif comment from r142163 and r142183
* wtf/MainThread.h:
(WTF): s/PLATFORM/USE/
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Fix an incorrect comment from r142163
Unreviewed.
* wtf/MainThread.h:
I accidentally copied PLATFORM(IOS) instead of USE(WEB_THREAD) for the #ifdef closing.
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Upstream iOS isWebThread() and isUIThread()
https://bugs.webkit.org/show_bug.cgi?id=109130
Reviewed by Sam Weinig.
On iOS, it is sometimes necessary to differenciate the thread running WebCore,
and the thread running the UI. This patch upstream those functions.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
(WTF::isWebThread):
(WTF::isUIThread):
Return true when the current thread is the Web/UI thread.
* wtf/mac/MainThreadMac.mm:
(WTF::isUIThread):
(WTF::isWebThread):
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
Use the newly added methods.
2013-02-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build without 3D_GRAPHICS
https://bugs.webkit.org/show_bug.cgi?id=109194
Reviewed by Noam Rosenthal.
Now that Coordinated Graphics was moved to WebCore, we need to explicitly enable
it when we have 3D_GRAPHICS. This dependency was implicitly by the fact that
3D_GRAPHICS is a dependency of WebKit2 and Coordinated Graphics was only
available there. This should fix build for Qt SH4 Linux.
* wtf/Platform.h:
2013-02-06 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Fix erroneous header inclusions in WTFURL code
https://bugs.webkit.org/show_bug.cgi?id=109040
Reviewed by Benjamin Poulain.
Include WTFURL API headers from files in Source/WTF/wtf/url/src
by specifying their relative path to Source/WTF.
* GNUmakefile.am: The changes make it possible to compile the WTF library
without specifying both Source/WTF/wtf/url/api and Source/WTF/wtf/url/src
as inclusion directories in CPPFLAGS, so remove these two entries.
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Include the URLParse.h header by specifying
only the base name as it's located in the same directory.
* wtf/url/src/URLCanonQuery.cpp:
* wtf/url/src/URLUtil.h:
2013-02-06 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
https://bugs.webkit.org/show_bug.cgi?id=107262
Reviewed by Yury Semikhatsky.
We need a way to calculate class name for a pointer automatically.
Otherwise we need to write className manually in all the instrumentation methods.
And for all reported but not instrumented classes.
C++ can do that for us with help of typeid but unfortunatelly it requires rtti.
There is another way to do that. C++ preprocessor provides a define which has a function name.
For g++ and clang it is __PRETTY_FUNCTION__.
For MSVC it is __FUNCTION__.
The content of the string is a function signature.
We can use it because it has the name of the template argument.
The format is sligthly different. That's why I made two different parsers.
One for MSVC the other for GCC, Clang etc.
The other problem is the resulting binary size.
I made very simple function that does the only thing, returns the smallest possible function signature.
Unfortunatelly MSVC doesn't generate template argument name for functions.
It does this only for classes.
* wtf/MemoryInstrumentation.cpp:
(WTF):
(WTF::className):
(WTF::MemoryClassInfo::callReportObjectInfo):
(WTF::MemoryClassInfo::init):
* wtf/MemoryInstrumentation.h:
(WTF):
(WTF::FN::fn):
(WTF::fn):
(WTF::MemoryClassInfo::MemoryClassInfo):
(MemoryClassInfo):
(WTF::::reportObjectMemoryUsage):
2013-02-05 Mark Lam <mark.lam@apple.com>
Fix EnumClass so that it can be used with switch statements.
https://bugs.webkit.org/show_bug.cgi?id=109004.
Reviewed by Sam Weinig.
* wtf/EnumClass.h:
(WTF::EnumClass::operator==):
(WTF::EnumClass::operator!=):
(WTF::EnumClass::operator<):
(WTF::EnumClass::operator<=):
(WTF::EnumClass::operator>):
(WTF::EnumClass::operator>=):
(EnumClass):
(WTF::EnumClass::operator Value):
2013-02-05 Oliver Hunt <oliver@apple.com>
Disable TCMalloc hardening as it's breaking leaks.
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
2013-02-05 Mark Lam <mark.lam@apple.com>
Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
https://bugs.webkit.org/show_bug.cgi?id=108988.
Reviewed by Alexey Proskuryakov.
* wtf/EnumClass.h:
2013-02-05 Roger Fong <roger_fong@apple.com>
Unreviewed build fix.
* wtf/FastMalloc.cpp:
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Tidy up StackBounds
https://bugs.webkit.org/show_bug.cgi?id=108889
Reviewed by Ryosuke Niwa.
* wtf/StackBounds.h:
(StackBounds):
(WTF::StackBounds::isSafeToRecurse):
(WTF::StackBounds::size):
Adopt a more conventional style for a multiline branch.
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::current):
(WTF::StackBounds::recursionLimit):
Make those method private.
Making the constructor private ensure initialize() is alwasy called on any StackBounds.
2013-02-05 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Comparison between signed and unsigned integer expressions in URLUtil.cpp
https://bugs.webkit.org/show_bug.cgi?id=108955
Reviewed by Benjamin Poulain.
* wtf/url/src/URLUtil.cpp:
(URLUtilities): Make the counter variable a signed integer to get rid of the warning.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Rationalize the use of iOS/Mac #defines in Assertions.cpp
https://bugs.webkit.org/show_bug.cgi?id=108870
Reviewed by David Kilzer.
* wtf/Assertions.cpp: Instead of using PLATFORM(MAC) and assume it works for iOS and OS X,
use CF as the guard for CFString. Similarily, USE_APPLE_SYSTEM_LOG guards code using ASL.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of length zero
https://bugs.webkit.org/show_bug.cgi?id=108894
Reviewed by Andreas Kling.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::toAtomicString): The function was returning the nullAtom for strings of length zero.
This is inconsistent with StringBuilder::toString() which always return an empty string.
This patch unifies the behavior.
2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206
Reviewed by Darin Adler.
Simplifying the utility functions that we use since we don't need a
bunch of fancy templates for this one specific call site.
* wtf/MathExtras.h:
(WTF::roundUpToPowerOfTwo):
2013-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r141905.
http://trac.webkit.org/changeset/141905
https://bugs.webkit.org/show_bug.cgi?id=108963
"Broke mac build" (Requested by tonyg-cr on #webkit).
* wtf/text/CString.cpp:
* wtf/text/CString.h:
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.h:
2013-02-05 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-04 Benjamin Poulain <bpoulain@apple.com>
Build fix for AtomicString on iOS
Unreviewed. The commit r141812 rely on isUIThread(), there is no such things
in the tree right now. Use pthread_main_np() until more thread handling is upstreamed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
2013-02-04 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108668
Reviewed by Eric Seidel.
* wtf/AVLTree.h:
(WTF::AVLTreeDefaultBSet::operator[]):
* wtf/BitArray.h:
(WTF::BitArray::set):
(WTF::BitArray::get):
* wtf/FastBitVector.h:
(WTF::FastBitVector::set):
(WTF::FastBitVector::clear):
(WTF::FastBitVector::get):
* wtf/FixedArray.h:
(WTF::FixedArray::operator[]):
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::at):
* wtf/TypedArrayBase.h:
(WTF::TypedArrayBase::item):
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::operator[]):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::operator[]):
* wtf/text/StringImpl.h:
(WTF::StringImpl::operator[]):
2013-02-04 Benjamin Poulain <benjamin@webkit.org>
Upstream iOS's AtomicString
https://bugs.webkit.org/show_bug.cgi?id=108139
Reviewed by David Kilzer.
On iOS, WebCore can be executed from two different threads. To maintain consistency,
a few changes had been made:
-The main UI thread and the WebThread share the same AtomicStringTable.
-A spin lock is needed before any access to prevent any concurrent modification of the string table.
The spin lock also prevent race on the static initialization of the shared table.
* wtf/Platform.h:
Introduce a new USE(WEB_THREAD) to scope changes related to iOS Web Thread.