Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nondeterminism in NavigationScheduler should be mediated #387

Open
burg opened this issue Oct 20, 2013 · 0 comments
Open

Nondeterminism in NavigationScheduler should be mediated #387

burg opened this issue Oct 20, 2013 · 0 comments

Comments

@burg
Copy link
Owner

burg commented Oct 20, 2013

Sometimes, navigation of a frame is asynchronously scheduled through NavigationScheduler::schedule(). This can be of variable-length delay, and has lots of other logic. So, instead of going through EventSender, this class should directly store and load nondeterministic timings.

The implementation should look similar to ScriptRunner.


Example stack trace:

ASSERTION FAILED: withinInputExtent()
/Users/burg/repos/timelapse/Source/WebCore/replay/CaptureInputIterator.cpp(98) : virtual void WebCore::CaptureInputIterator::incrementExecutionTicks()
1   0x111806270 WTFCrash
2   0x114248815 WebCore::CaptureInputIterator::incrementExecutionTicks()
3   0x1142403b2 WebCore::ReplayController::willDispatchEvent(WebCore::Event const&, WebCore::Frame*, WebCore::PositionMark const&)
4   0x1142465c4 WebCore::InspectorReplayAgent::willDispatchEvent(WebCore::Event const&, WebCore::Frame*)
5   0x113248f78 WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl(WebCore::InstrumentingAgents*, WebCore::Event const&, WebCore::DOMWindow*)
6   0x112ce619a WebCore::InspectorInstrumentation::willDispatchEventOnWindow(WebCore::Frame*, WebCore::Event const&, WebCore::DOMWindow*)
7   0x112cdad13 WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>)
8   0x114238b72 WebCore::AsyncEventProxy::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>)
9   0x114238738 WebCore::AsyncEventProxy::dispatchAsyncEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>, bool)
10  0x112ce1d00 WebCore::DOMWindow::dispatchAsyncEvent(WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::EventTarget>)
11  0x112e6bdb3 WebCore::FrameLoader::handleBeforeUnloadEvent(WebCore::Chrome&, WebCore::FrameLoader*)
12  0x112e6bb93 WebCore::FrameLoader::shouldClose()
13  0x112e66d5d WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)
14  0x112e67117 WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)
15  0x1139f236c WebCore::PolicyCallback::call(bool)
16  0x1139f339a WebCore::PolicyChecker::continueAfterNavigationPolicy(WebCore::PolicyAction)
17  0x1139f8e9e WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*)::$_0::operator()(WebCore::PolicyAction) const
18  0x1139f8e6e std::__1::__function::__func<WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*)::$_0, std::__1::allocator<WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*)::$_0>, void (WebCore::PolicyAction)>::operator()(WebCore::PolicyAction&&)
19  0x10fc5509c std::__1::function<void (WebCore::PolicyAction)>::operator()(WebCore::PolicyAction) const
20  0x10fc5b6ec WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, std::__1::function<void (WebCore::PolicyAction)>)
21  0x1139f2e09 WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*)
22  0x112e66a3c WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>)
23  0x112e65ce0 WebCore::FrameLoader::loadWithNavigationAction(WebCore::ResourceRequest const&, WebCore::NavigationAction const&, bool, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>)
24  0x112e63e79 WebCore::FrameLoader::loadURL(WebCore::URL const&, WTF::String const&, WTF::String const&, bool, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::FormState>)
25  0x112e5fa2b WebCore::FrameLoader::loadFrameRequest(WebCore::FrameLoadRequest const&, bool, bool, WTF::PassRefPtr<WebCore::Event>, WTF::PassRefPtr<WebCore::FormState>, WebCore::ShouldSendReferrer)
26  0x112e5f306 WebCore::FrameLoader::urlSelected(WebCore::FrameLoadRequest const&, WTF::PassRefPtr<WebCore::Event>, bool, bool, WebCore::ShouldSendReferrer, WebCore::ShouldReplaceDocumentIfJavaScriptURL)
27  0x112e5f098 WebCore::FrameLoader::changeLocation(WebCore::SecurityOrigin*, WebCore::URL const&, WTF::String const&, bool, bool, bool)
28  0x11392d302 WebCore::ScheduledURLNavigation::fire(WebCore::Frame*)
29  0x11392a816 WebCore::NavigationScheduler::timerFired(WebCore::Timer<WebCore::NavigationScheduler>*)
30  0x11392c7a3 WebCore::Timer<WebCore::NavigationScheduler>::fired()
31  0x114098963 WebCore::ThreadTimers::sharedTimerFiredInternal()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant