Bug 6679

Summary: evalAfterBackForwardNavigation causes hang when page can't be cached
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal    
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
test case none

Description Eric Seidel (no email) 2006-01-19 17:18:43 PST
evalAfterBackForwardNavigation causes hang when page can't be cached

I was trying to write a test case for back/forward navigation where cacheing the page should be 
disallowed.  This hangs DRT because evalAfterBackForwardNavigation keeps getting called by my onload 
every time the first page is reload.  We need some sort of loop check for evalAfterBackForwardNavigation.
Comment 1 Eric Seidel (no email) 2006-01-19 17:19:32 PST
Created attachment 5789 [details]
test case
Comment 2 Geoffrey Garen 2006-01-27 15:41:29 PST
I didn't consider a page not making it into the cache when I wrote the NavigationController class.

The simple solution here is to have evalAfterBackForwardNavigation execute only once per page. In the future, if someone wants to use it more than once on a page, they can dream up a more interesting hashing solution.
Comment 3 Geoffrey Garen 2006-01-27 15:47:10 PST
We could also use something like

     if (!navigationController.didNavigate) {...}

or

     navigationController.setState(true)
     if (!navigationController.getState())

to make things arbitrarily extensible.

valueForUndefinedKey would be helpful here, but it doesn't work yet.