Title: [262441] branches/safari-610.1.15-branch/Source/WebKit
- Revision
- 262441
- Author
- [email protected]
- Date
- 2020-06-02 14:57:58 -0700 (Tue, 02 Jun 2020)
Log Message
Cherry-pick r262255. rdar://problem/63891604
Do not send a second sync request for positition information to the web process if we have not recieved information since the previous sync request.
https://bugs.webkit.org/show_bug.cgi?id=212289
<rdar://problem/58494578>
Reviewed by Tim Horton.
If we have sent a sync requests to the web process for position information, and timed out, and have not
received a message with position information in the interim, do not send another sync request. The web
process is likely still hung, and there is no reason to hang the UIProcess again if we suspect that it
is unlikely that we will receive a reply.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanUpInteraction]):
(-[WKContentView ensurePositionInformationIsUpToDate:]):
(-[WKContentView _positionInformationDidChange:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.15-branch/Source/WebKit/ChangeLog (262440 => 262441)
--- branches/safari-610.1.15-branch/Source/WebKit/ChangeLog 2020-06-02 21:57:55 UTC (rev 262440)
+++ branches/safari-610.1.15-branch/Source/WebKit/ChangeLog 2020-06-02 21:57:58 UTC (rev 262441)
@@ -1,3 +1,46 @@
+2020-06-02 Alan Coon <[email protected]>
+
+ Cherry-pick r262255. rdar://problem/63891604
+
+ Do not send a second sync request for positition information to the web process if we have not recieved information since the previous sync request.
+ https://bugs.webkit.org/show_bug.cgi?id=212289
+ <rdar://problem/58494578>
+
+ Reviewed by Tim Horton.
+
+ If we have sent a sync requests to the web process for position information, and timed out, and have not
+ received a message with position information in the interim, do not send another sync request. The web
+ process is likely still hung, and there is no reason to hang the UIProcess again if we suspect that it
+ is unlikely that we will receive a reply.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView cleanUpInteraction]):
+ (-[WKContentView ensurePositionInformationIsUpToDate:]):
+ (-[WKContentView _positionInformationDidChange:]):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-28 Megan Gardner <[email protected]>
+
+ Do not send a second sync request for positition information to the web process if we have not recieved information since the previous sync request.
+ https://bugs.webkit.org/show_bug.cgi?id=212289
+ <rdar://problem/58494578>
+
+ Reviewed by Tim Horton.
+
+ If we have sent a sync requests to the web process for position information, and timed out, and have not
+ received a message with position information in the interim, do not send another sync request. The web
+ process is likely still hung, and there is no reason to hang the UIProcess again if we suspect that it
+ is unlikely that we will receive a reply.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView cleanUpInteraction]):
+ (-[WKContentView ensurePositionInformationIsUpToDate:]):
+ (-[WKContentView _positionInformationDidChange:]):
+
2020-05-23 Charlie Turner <[email protected]>
Error sending IPC message: Broken pipe
Modified: branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (262440 => 262441)
--- branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-06-02 21:57:55 UTC (rev 262440)
+++ branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-06-02 21:57:58 UTC (rev 262441)
@@ -359,6 +359,7 @@
BOOL _showDebugTapHighlightsForFastClicking;
BOOL _textInteractionDidChangeFocusedElement;
BOOL _textInteractionIsHappening;
+ bool _isWaitingOnPositionInformation;
WebCore::PointerID m_commitPotentialTapPointerId;
Modified: branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (262440 => 262441)
--- branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-06-02 21:57:55 UTC (rev 262440)
+++ branches/safari-610.1.15-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-06-02 21:57:58 UTC (rev 262441)
@@ -920,6 +920,7 @@
_formInputSession = nil;
[_highlightView removeFromSuperview];
_outstandingPositionInformationRequest = WTF::nullopt;
+ _isWaitingOnPositionInformation = NO;
_focusRequiresStrongPasswordAssistance = NO;
_additionalContextForStrongPasswordAssistance = nil;
@@ -2241,16 +2242,14 @@
if (!connection)
return NO;
- if ([self _hasValidOutstandingPositionInformationRequest:request])
- return connection->waitForAndDispatchImmediately<Messages::WebPageProxy::DidReceivePositionInformation>(_page->webPageID(), 1_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives);
-
- bool receivedResponse = _page->sendSync(Messages::WebPage::GetPositionInformation(request), Messages::WebPage::GetPositionInformation::Reply(_positionInformation), 1_s, IPC::SendSyncOption::ForceDispatchWhenDestinationIsWaitingForUnboundedSyncReply);
+ if (_isWaitingOnPositionInformation)
+ return NO;
+
+ _isWaitingOnPositionInformation = YES;
+ if (![self _hasValidOutstandingPositionInformationRequest:request])
+ [self requestAsynchronousPositionInformationUpdate:request];
+ bool receivedResponse = connection->waitForAndDispatchImmediately<Messages::WebPageProxy::DidReceivePositionInformation>(_page->webPageID(), 1_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives);
_hasValidPositionInformation = receivedResponse && _positionInformation.canBeValid;
-
- // FIXME: We need to clean up these handlers in the event that we are not able to collect data, or if the WebProcess crashes.
- if (_hasValidPositionInformation)
- [self _invokeAndRemovePendingHandlersValidForCurrentPositionInformation];
-
return _hasValidPositionInformation;
}
@@ -2283,6 +2282,7 @@
{
ASSERT(_hasValidPositionInformation);
+ // FIXME: We need to clean up these handlers in the event that we are not able to collect data, or if the WebProcess crashes.
++_positionInformationCallbackDepth;
auto updatedPositionInformation = _positionInformation;
@@ -2865,6 +2865,7 @@
- (void)_positionInformationDidChange:(const WebKit::InteractionInformationAtPosition&)info
{
_outstandingPositionInformationRequest = WTF::nullopt;
+ _isWaitingOnPositionInformation = NO;
WebKit::InteractionInformationAtPosition newInfo = info;
newInfo.mergeCompatibleOptionalInformation(_positionInformation);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes