Objective-C API: testapi.mm should use ARC
https://bugs.webkit.org/show_bug.cgi?id=107838

Reviewed by Oliver Hunt.

In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs. 
We should enable ARC, since that is what most of our clients will be using.

* API/tests/testapi.mm:
(-[TestObject init]):
(-[TestObject dealloc]):
(+[TestObject testObject]):
(testObjectiveCAPI):
* JavaScriptCore.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Heap-buffer-overflow in std::sort
https://bugs.webkit.org/show_bug.cgi?id=108834

Reviewed by Abhishek Arya.

Source/WebCore:

Test: fast/css-grid-layout/grid-strict-ordering-crash.html

* rendering/RenderGrid.cpp:
(WebCore::sortByGridTrackGrowthPotential):
The std::sort documentation says that this function should define a *strict* weak ordering. Fixed the strict
part of the ordering. Also moved the function definition next to where it is needed and made the GridTrack
argument const (as it shouldn't modify them or std::sort will misbehave).

* rendering/RenderGrid.cpp:
(WebCore::sortByGridTrackGrowthPotential):
(WebCore):

LayoutTests:

* fast/css-grid-layout/grid-strict-ordering-crash-expected.txt: Added.
* fast/css-grid-layout/grid-strict-ordering-crash.html: Added.
The test requires a column / row index above the Vector inline capacity to work (which is currently 16).
The values are much higher in case we decide to bump the inline capacity.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141810 268f45cc-cd09-0410-ab3c-d52691b4dbfc