WebKit Bugzilla
Attachment 368474 Details for
Bug 197377
: Web Automation: use a more informative key to indicate automation availability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197377-20190429122450.patch (text/plain), 4.37 KB, created by
BJ Burg
on 2019-04-29 12:24:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
BJ Burg
Created:
2019-04-29 12:24:50 PDT
Size:
4.37 KB
patch
obsolete
>Subversion Revision: 244685 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index f6c51221c502f51a3314a45ab4f0c82606e7ddc0..ca69a4a9e1bcd5638edd04289a1bbdb3d5e833cc 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-04-29 Brian Burg <bburg@apple.com> >+ >+ Web Automation: use a more informative key to indicate automation availability >+ https://bugs.webkit.org/show_bug.cgi?id=197377 >+ <rdar://problem/50258069> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The existing WIRAutomationEnabledKey does not encode uncertainty. >+ Add a new key that provides an 'Unknown' state, and prefer to use it. >+ >+ Since an application's initial listing is sent from a background dispatch queue >+ on Cocoa platforms, this can race with main thread initialization that sets up >+ RemoteInspector::Client. Therefore, the initial listing may not properly represent >+ the client's capabilites because the client is not yet available. Allowing for >+ an "Unknown" state that is later upgraded to Available or Not Available makes it >+ possible to work around this potential race. >+ >+ * inspector/remote/RemoteInspectorConstants.h: >+ * inspector/remote/cocoa/RemoteInspectorCocoa.mm: >+ (Inspector::RemoteInspector::pushListingsNow): >+ > 2019-04-25 Fujii Hironori <Hironori.Fujii@sony.com> > > Unreviewed, rolling out r244669. >diff --git a/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h b/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h >index 86bd8f761e1e8888b13362d8f3b3096ca34c3fb7..c9ab33fd49bafdf7be6303db0dd5a212c3604c9e 100644 >--- a/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h >+++ b/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h >@@ -68,6 +68,7 @@ > #define WIRListingMessage @"WIRListingMessage" > #define WIRListingKey @"WIRListingKey" > #define WIRRemoteAutomationEnabledKey @"WIRRemoteAutomationEnabledKey" >+#define WIRAutomationAvailabilityKey @"WIRAutomationAvailabilityKey" > #define WIRDestinationKey @"WIRDestinationKey" > #define WIRConnectionDiedMessage @"WIRConnectionDiedMessage" > #define WIRTypeKey @"WIRTypeKey" >@@ -77,6 +78,11 @@ > #define WIRTypeAutomation @"WIRTypeAutomation" > #define WIRAutomaticallyPause @"WIRAutomaticallyPause" > >+// Allowed values for WIRAutomationAvailabilityKey. >+#define WIRAutomationAvailabilityNotAvailable @"WIRAutomationAvailabilityNotAvailable" >+#define WIRAutomationAvailabilityAvailable @"WIRAutomationAvailabilityAvailable" >+#define WIRAutomationAvailabilityUnknown @"WIRAutomationAvailabilityUnknown" >+ > #define WIRAutomaticInspectionEnabledKey @"WIRAutomaticInspectionEnabledKey" > #define WIRAutomaticInspectionSessionIdentifierKey @"WIRAutomaticInspectionSessionIdentifierKey" > #define WIRAutomaticInspectionConfigurationMessage @"WIRAutomaticInspectionConfigurationMessage" >diff --git a/Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm b/Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm >index 5bef21cbb39e3c1ca596fef76f1b137ca8a8bd58..11667a8bd7a79414102fddd3223d373b565d49aa 100644 >--- a/Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm >+++ b/Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm >@@ -454,6 +454,14 @@ void RemoteInspector::pushListingsNow() > RetainPtr<NSMutableDictionary> message = adoptNS([[NSMutableDictionary alloc] init]); > [message setObject:listings.get() forKey:WIRListingKey]; > >+ if (!m_clientCapabilities) >+ [message setObject:WIRAutomationAvailabilityUnknown forKey:WIRAutomationAvailabilityKey]; >+ else if (m_clientCapabilities->remoteAutomationAllowed) >+ [message setObject:WIRAutomationAvailabilityAvailable forKey:WIRAutomationAvailabilityKey]; >+ else >+ [message setObject:WIRAutomationAvailabilityNotAvailable forKey:WIRAutomationAvailabilityKey]; >+ >+ // COMPATIBILITY(iOS 13): this key is deprecated and not used by newer versions of webinspectord. > BOOL isAllowed = m_clientCapabilities && m_clientCapabilities->remoteAutomationAllowed; > [message setObject:@(isAllowed) forKey:WIRRemoteAutomationEnabledKey]; >
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 197377
: 368474 |
368508