-
ap@webkit.org authored
Test: fast/events/message-channel-gc-3.html https://bugs.webkit.org/show_bug.cgi?id=21769 MessagePort should be GC protected if there are messages to be delivered * dom/MessagePort.h: Removed pending activity count. Now we track if a close event is pending, and check if the queue is non-empty. (WebCore::MessagePort::workerContext): Added a stub implementation for a cross-heap GC bug fix (below). * dom/MessagePort.cpp: (WebCore::CloseMessagePortTimer::fired): (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::queueCloseEvent): (WebCore::MessagePort::dispatchCloseEvent): (WebCore::MessagePort::hasPendingActivity): Track message and close event activity separately. * bindings/js/JSDOMBinding.cpp: (WebCore::markCrossHeapDependentObjectsForDocument): Fixed a bug in cross-heap GC that was causing same-heap ports to never be deleted. * wtf/MessageQueue.h: (WTF::::isEmpty): Added. Also added a warning for methods that return a snapshot of queue state, thus likely to cause race conditions. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4c610c0e