Source/JavaScriptCore:
authorburg@cs.washington.edu <burg@cs.washington.edu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Sep 2014 21:59:13 +0000 (21:59 +0000)
committerburg@cs.washington.edu <burg@cs.washington.edu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Sep 2014 21:59:13 +0000 (21:59 +0000)
commit2252541616c4d7172c6d10c54ab66e3a14328efd
tree26ccceb1f06f7b0a1c8b1eac1ae46396a9299bcb
parent4f7bc1e91835ad099e7d9a24fe504c139e6c8714
Source/JavaScriptCore:
Web Replay: Check event loop input extents during replaying too
https://bugs.webkit.org/show_bug.cgi?id=136316

Reviewed by Timothy Hatcher.

Sometimes we see different nondeterminism during capture and replay
executions, so we should add determinism checks during replay too.

Move the withinEventLoopInputExtent flag to the base class, and tighten
the assertion to address <http://webkit.org/b/133019>.

* replay/InputCursor.h:
(JSC::InputCursor::InputCursor):
(JSC::InputCursor::setWithinEventLoopInputExtent): Added.
This assertion is slightly wrong because it does not account for nested run loops.
We can be within two input extents when a nested run loop processes additional
user inputs while the debugger is paused.

This should only be the case when execution is being neither captured or
replayed. The debugger should not pause when capturing, and we should not replay
event loop inputs while in a nested run loop.

(JSC::InputCursor::withinEventLoopInputExtent): Added.

Source/WebCore:
Web Replay: Check event loop input extents during replay too
https://bugs.webkit.org/show_bug.cgi?id=136316

Reviewed by Timothy Hatcher.

Sometimes we see different nondeterminism during capture and replay
executions, so we should support determinism checks during replay too.

Move the withinEventLoopInputExtent flag to the base class.

No new tests, no behavior changed.

* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Deleted.
* replay/CapturingInputCursor.h:
* replay/EventLoopInput.cpp:
(WebCore::EventLoopInputExtent::EventLoopInputExtent):
(WebCore::EventLoopInputExtent::~EventLoopInputExtent):
Make m_cursor a pointer and add a new constructor so we can conditionally
enter event loop input extents. This is useful in some network replay situations.

* replay/EventLoopInput.h:
* replay/ReplayController.cpp:
(WebCore::ReplayController::willDispatchEvent): Expand the assertion to include replaying.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/replay/InputCursor.h
Source/WebCore/ChangeLog
Source/WebCore/replay/CapturingInputCursor.cpp
Source/WebCore/replay/CapturingInputCursor.h
Source/WebCore/replay/EventLoopInput.cpp
Source/WebCore/replay/EventLoopInput.h
Source/WebCore/replay/ReplayController.cpp