svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

The tests were still flaky. Changed retry timeout from 0 to 100 ms as previously
suggested by Geoff.

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
https://bugs.webkit.org/show_bug.cgi?id=121236

Reviewed by Geoffrey Garen.

Right now, after a collection all MarkedBlocks are in the Marked block state. When lazy sweeping 
happens, if a block returns an empty free list after being swept, we call didConsumeFreeList(), 
which moves the block into the Allocated block state. This happens to both the block that was 
just being allocated out of (i.e. m_currentBlock) as well as any blocks who are completely full. 
We should distinguish between these two cases: m_currentBlock should transition to 
Allocated (because we were just allocating out of it) and any subsequent block that returns an 
empty free list should transition back to the Marked state. This will make the block state more 
consistent with the actual state the block is in, and it will also allow us to speed up moving 
all blocks the the Marked state during generational collection.

Added new RAII-style HeapIterationScope class that notifies the Heap when it is about to be 
iterated and when iteration has finished. Any clients that need accurate liveness data when 
iterating over the Heap now need to use a HeapIterationScope so that the state of Heap can 
be properly restored after they are done iterating. No new GC-allocated objects can be created 
until this object goes out of scope.

* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp: 
(JSC::Debugger::recompileAllJSFunctions): Added HeapIterationScope for the Recompiler iteration.
* heap/Heap.cpp:
(JSC::Heap::willStartIterating): Callback used by HeapIterationScope to indicate that iteration of 
the Heap is about to begin. This will cause cell liveness data to be canonicalized by calling stopAllocating.
(JSC::Heap::didFinishIterating): Same, but indicates that iteration has finished.
(JSC::Heap::globalObjectCount): Used HeapIterationScope.
(JSC::Heap::objectTypeCounts): Ditto.
(JSC::Heap::markDeadObjects): Ditto.
(JSC::Heap::zombifyDeadObjects): Ditto.
* heap/Heap.h:
* heap/HeapIterationScope.h: Added. New RAII-style object for indicating to the Heap that it's about
to be iterated or that iteration has finished.
(JSC::HeapIterationScope::HeapIterationScope):
(JSC::HeapIterationScope::~HeapIterationScope):
* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::showObjectStatistics): Used new HeapIterationScope.
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper): We now treat the case where we have just finished 
allocating out of the current block differently from the case where we sweep a block and it 
returns an empty free list. This was the primary point of this patch.
(JSC::MarkedAllocator::allocateSlowCase): ASSERT that nobody is currently iterating the Heap 
when allocating.
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::reset): All allocators are reset after every collection. We need to make 
sure that the m_lastActiveBlock gets cleared, which it might not always because we don't call 
takeCanonicalizedBlock on blocks in the large allocators.
(JSC::MarkedAllocator::stopAllocating): We shouldn't already have a last active block,
so ASSERT as much.
(JSC::MarkedAllocator::resumeAllocating): Do the opposite of what stopAllocating
does. So, if we don't have a m_lastActiveBlock then we don't have to worry about undoing anything
done by stopAllocating. If we do, then we call resumeAllocating on the block, which returns the FreeList
as it was prior to stopping allocation. We then set the current block to the last active block and 
clear the last active block. 
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::resumeAllocating): Any block resuming allocation should be in 
the Marked state, so ASSERT as much. We always allocate a m_newlyAllocated Bitmap if we're
FreeListed, so if we didn't allocate one then we know we were Marked when allocation was stopped,
so just return early with an empty FreeList. If we do have a non-null m_newlyAllocated Bitmap
then we need to be swept in order to rebuild our FreeList.
* heap/MarkedBlock.h:
(JSC::MarkedBlock::didConsumeEmptyFreeList): This is called if we ever sweep a block and get back
an empty free list. Instead of transitioning to the Allocated state, we now go straight back to the 
Marked state. This makes sense because we weren't actually allocated out of, so we shouldn't be in 
the allocated state. Also added some ASSERTs to make sure that we're in the state that we expect: all of
our mark bits should be set and we should not have a m_newlyAllocated Bitmap.
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::forEachAllocator): Added a new functor-style iteration method so that we can 
easily iterate over each allocator for, e.g., stopping and resuming allocators without
duplicating code. 
(JSC::StopAllocatingFunctor::operator()): New functors for use with forEachAllocator.
(JSC::MarkedSpace::stopAllocating): Ditto.
(JSC::ResumeAllocatingFunctor::operator()): Ditto.
(JSC::MarkedSpace::resumeAllocating): Ditto.
(JSC::MarkedSpace::willStartIterating): Callback that notifies MarkedSpace that it is being iterated.
Does some ASSERTs, sets a flag, canonicalizes cell liveness data by calling stopAllocating.
(JSC::MarkedSpace::didFinishIterating): Ditto, but to signal that iteration has completed.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::iterationInProgress): Returns true if a HeapIterationScope is currently active.
(JSC::MarkedSpace::forEachLiveCell): Accepts a HeapIterationScope to enforce the rule that you have to 
create one prior to iterating over the Heap.
(JSC::MarkedSpace::forEachDeadCell): Ditto.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime): Changed to use new HeapIterationScope.
* runtime/VM.cpp:
(JSC::VM::releaseExecutableMemory): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build following <http://trac.webkit.org/changeset/155591>
(https://bugs.webkit.org/show_bug.cgi?id=121200)

Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Substitute isWidget() for isRenderWidget()
as the latter is undefined.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files that are now also generated.

* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestException.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNode.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.symbols: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: FrameTree::top() should return a reference.
<https://webkit.org/b/121445>

Reviewed by Anders Carlsson.

There's always a top frame in the tree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fixing the GTK WK2 build after r155888.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/API/gtk/PageClientImpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: TypeError when updating ResourceTreeElement created in strange order
https://bugs.webkit.org/show_bug.cgi?id=121382

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-09-16
Reviewed by Timothy Hatcher.

Patch by Brian Burg. Fix an uncaught exception that can happen on navigations.

* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

The tests are still flaky. Ran out of ideas, so marking them as such and leaving them there.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF::Deque should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121446

Reviewed by Andreas Kling.

Source/WTF:

* wtf/Deque.h:
Use std::move and std::forward where appropriate and get rid of the PassTraits include.

Tools:

* TestWebKitAPI/Tests/WTF/Deque.cpp:
(TestWebKitAPI::TEST):
Add a test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MessageQueue should use a Deque of OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=121450

Reviewed by Andreas Kling.

Source/WebCore:

* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::SameDatabasePredicate::operator()):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
* fileapi/FileThread.cpp:
(WebCore::SameInstancePredicate::operator()):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):

Source/WTF:

* wtf/MessageQueue.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Rendering stops when mouse is moving for some types of animations.
https://bugs.webkit.org/show_bug.cgi?id=121329

Reviewed by Anders Carlsson.

* WebView.cpp:
(WebView::WebView): Add new display flag.
(WebView::repaint): Mark view as needing a display operation.
(WebView::addToDirtyRegion): Ditto
(WebView::scrollBackingStore): Ditto
(WebView::sizeChanged): Ditto
(WebView::updateBackingStore): Ditto
(WebView::performLayeredWindowUpdate): Mark the WebView as having been
moved to screen.
(WebView::paintIntoWindow): Ditto
(WebView::WebViewWndProc): If the view needs display, and it was not done during
this message loop iteration, draw the screen.
* WebView.h:
(WebView::needsDisplay): Added


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