Created attachment 106634 [details]
Global i holds the number of times popstate has fired.
If I bind a simple event handler to the popstate event with a console.log, it will execute the console.log multiple times per onpopstate event. The onpopstate event fires only once, it just triggers console.log multiple times.
Looks like the same for hashchange.
Chrome 14.0.835.157 beta-m
I'm told Darin is mr. popstate (but I could be misinformed).
I see. So this isn't a popstate bug, this is an interaction with the web inspector?
In which case, Pavel is your man.
Looks like a bug in web inspector. After navigation two original messages are printed before the actual PopStateEvent.
Created attachment 108817 [details]
Reduced test case
This is a Chromium-specific issue. The problem here is that when back button is pushed we receive OnNavigatingToPendingEntry in the browser and send Detach followed by Attach to the corresponding DevToolsAgent to make sure our front-end is connected to correct RenderViewHost. In case of navigation back to the same URL with a different fragment we probably shouldn't do this as RVH doesn't change in that case.
Filed Chromium bug: http://code.google.com/p/chromium/issues/detail?id=98210
Created attachment 108827 [details]
Committed r96100: <http://trac.webkit.org/changeset/96100>
Chromium patch will be landed after WebKit r96100 is rolled.