Change FrameLoadDelegate to support any number of delegates with delayed work to...
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 16:56:56 +0000 (16:56 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 16:56:56 +0000 (16:56 +0000)
commitef5f308f7bdbb7dc0b5e84b7c9e694f0491f2856
treeaa102eb11ea55c9839e5804677ea5bb25b51354a
parent5ed218de4613acf484f850f79a7e3af406561fc3
Change FrameLoadDelegate to support any number of delegates with delayed work to process

This makes our behavior match Mac more closely, and allows us to remove an incorrect
assertion that was firing during some tests. (The assertion was claiming that there was
never more than one delegate with delayed work to process, but that was not the case.)

Fixes <http://webkit.org/b/55146> Assertion failure in FrameLoadDelegate::locationChangeDone
when running http/tests/navigation/back-twice-without-commit.html

Reviewed by Eric Carlson.

* DumpRenderTree/win/FrameLoadDelegate.cpp:
(delegatesWithDelayedWork): Added. Returns all FrameLoadDelegates that have delayed work to
process. A single delegate may appear in this Vector more than once (just as, on Mac, a
single delegate may have multiple performSelector requests).
(processWorkTimer): Pass the HWND to ::KillTimer, for pedantic brownie points. Added an
assertion that the timer firing is the shared process work timer. Instead of using the
single, global "delegate waiting for timer" delegate, give all delegates that have delayed
work to process a chance to process their work.
(FrameLoadDelegate::locationChangeDone): If we don't already have an active timer for
processing delayed work, create one. Then add ourselves to the delegatesWithDelayedWork
Vector so our processWork function will be called when the timer fires.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/DumpRenderTree/win/FrameLoadDelegate.cpp