Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Apr 2015 01:04:24 +0000 (01:04 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Apr 2015 01:04:24 +0000 (01:04 +0000)
commitea58ca21c91bd5b5a1081b8c878799744acb68d0
tree508c7abb524fb7b0899b4c92cd4e91e51d825485
parent1a4ed3745f4766e9aa53b04b09a6ab3743ca5f18
Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
https://bugs.webkit.org/show_bug.cgi?id=143901
<rdar://problem/20488655>

Reviewed by Anders Carlsson.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage):
InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
a sync message arrives while waiting, but it should also avoid waiting
if there's a sync message already in the queue when the waiting starts,
as that will have the same nasty effect.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
If a synchronous message comes in from the Web process while we're waiting,
cancel our synchronous wait for DidUpdateGeometry. This will cause the size
change to not synchronize with the Web process' painting, but that is better
than pointlessly blocking for 500ms.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/IPC/Connection.cpp
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm