WebKit Bugzilla
Attachment 356649 Details for
Bug 191155
: SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-191155-20181205132245.patch (text/plain), 3.57 KB, created by
BJ Burg
on 2018-12-05 13:22:46 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
BJ Burg
Created:
2018-12-05 13:22:46 PST
Size:
3.57 KB
patch
obsolete
>Subversion Revision: 238881 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3a305c838663319f167f0a0e9cb532f4d6e1c37e..d16aaf2b55dd20c30ab9431c728532014ddaf074 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-05 Brian Burg <bburg@apple.com> >+ >+ SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler >+ https://bugs.webkit.org/show_bug.cgi?id=191155 >+ <rdar://problem/45745569> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Automation/SimulatedInputDispatcher.cpp: >+ (WebKit::SimulatedInputDispatcher::transitionInputSourceToState): >+ Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state. >+ webkitdriver needs to be updated to not produce such states in this scenario, but this will >+ avoid a runtime crash caused by trying to call a moved-out completion handler a second time. >+ > 2018-12-04 Youenn Fablet <youenn@apple.com> > > Calling getUserMedia in a link that was opened with target="_blank" does not work the second time >diff --git a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >index 84630848ff630d6e85b8242c1553747b6c80ec8c..448b2715626823d71dfae3a2a8359562cca3069a 100644 >--- a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >+++ b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >@@ -297,8 +297,13 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > LOG(Automation, "SimulatedInputDispatcher[%p]: simulating KeyRelease[key=%c] for transition to %d.%d", this, a.pressedCharKey.value(), m_keyframeIndex, m_inputSourceStateIndex); > m_client.simulateKeyboardInteraction(m_page, KeyboardInteraction::KeyRelease, a.pressedCharKey.value(), WTFMove(eventDispatchFinished)); > } else if (a.pressedVirtualKeys != b.pressedVirtualKeys) { >+ bool simulatedAnInteraction = false; > for (VirtualKey key : b.pressedVirtualKeys) { > if (!a.pressedVirtualKeys.contains(key)) { >+ ASSERT_WITH_MESSAGE(!simulatedAnInteraction, "Only one VirtualKey may differ at a time between two input source states."); >+ if (simulatedAnInteraction) >+ continue; >+ simulatedAnInteraction = true; > #if !LOG_DISABLED > String virtualKeyName = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(key); > LOG(Automation, "SimulatedInputDispatcher[%p]: simulating KeyPress[key=%s] for transition to %d.%d", this, virtualKeyName.utf8().data(), m_keyframeIndex, m_inputSourceStateIndex); >@@ -309,6 +314,10 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > > for (VirtualKey key : a.pressedVirtualKeys) { > if (!b.pressedVirtualKeys.contains(key)) { >+ ASSERT_WITH_MESSAGE(!simulatedAnInteraction, "Only one VirtualKey may differ at a time between two input source states."); >+ if (simulatedAnInteraction) >+ continue; >+ simulatedAnInteraction = true; > #if !LOG_DISABLED > String virtualKeyName = Inspector::Protocol::AutomationHelpers::getEnumConstantValue(key); > LOG(Automation, "SimulatedInputDispatcher[%p]: simulating KeyRelease[key=%s] for transition to %d.%d", this, virtualKeyName.utf8().data(), m_keyframeIndex, m_inputSourceStateIndex);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 191155
:
356628
| 356649