| Index: Source/core/loader/NavigationScheduler.cpp
|
| diff --git a/Source/core/loader/NavigationScheduler.cpp b/Source/core/loader/NavigationScheduler.cpp
|
| index 9dda7c06a5a5053232b2d3ec86ee362ddfd0e3f8..ffe1447b40653488a9a63e912ce51b02101595c2 100644
|
| --- a/Source/core/loader/NavigationScheduler.cpp
|
| +++ b/Source/core/loader/NavigationScheduler.cpp
|
| @@ -373,6 +373,18 @@ void NavigationScheduler::timerFired(Timer<NavigationScheduler>*)
|
| void NavigationScheduler::schedule(PassOwnPtr<ScheduledNavigation> redirect)
|
| {
|
| ASSERT(m_frame->page());
|
| +
|
| + // In a back/forward navigation, we sometimes restore history state to iframes, even though the state was generated
|
| + // dynamically and JS will try to put something different in the iframe. In this case, we will load stale things
|
| + // and/or confuse the JS when it shortly thereafter tries to schedule a location change. Let the JS have its way.
|
| + // FIXME: This check seems out of place.
|
| + if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && m_frame->loader().provisionalDocumentLoader()) {
|
| + RefPtr<Frame> protect(m_frame);
|
| + m_frame->loader().provisionalDocumentLoader()->stopLoading();
|
| + if (!m_frame->host())
|
| + return;
|
| + }
|
| +
|
| cancel();
|
| m_redirect = redirect;
|
| startTimer();
|
|
|