Title: [258704] trunk/Source/WebCore
- Revision
- 258704
- Author
- [email protected]
- Date
- 2020-03-19 10:02:26 -0700 (Thu, 19 Mar 2020)
Log Message
[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209284
Reviewed by Chris Fleizach.
- Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
- [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
(-[WebAccessibilityObjectWrapper windowElement:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (258703 => 258704)
--- trunk/Source/WebCore/ChangeLog 2020-03-19 16:49:56 UTC (rev 258703)
+++ trunk/Source/WebCore/ChangeLog 2020-03-19 17:02:26 UTC (rev 258704)
@@ -1,3 +1,17 @@
+2020-03-19 Andres Gonzalez <[email protected]>
+
+ [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
+ https://bugs.webkit.org/show_bug.cgi?id=209284
+
+ Reviewed by Chris Fleizach.
+
+ - Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
+ - [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
+ (-[WebAccessibilityObjectWrapper windowElement:]):
+
2020-03-19 Antoine Quint <[email protected]>
[Web Animations] Mark promises as handled when rejected
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (258703 => 258704)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-03-19 16:49:56 UTC (rev 258703)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-03-19 17:02:26 UTC (rev 258704)
@@ -1873,16 +1873,18 @@
- (id)remoteAccessibilityParentObject
{
- ASSERT(isMainThread());
- if (!self.axBackingObject)
- return nil;
+ return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([protectedSelf = retainPtr(self)] () -> RetainPtr<id> {
+ auto* backingObject = protectedSelf.get().axBackingObject;
+ if (!backingObject)
+ return nil;
- if (auto* document = self.axBackingObject->document()) {
- if (auto* frame = document->frame())
- return frame->loader().client().accessibilityRemoteObject();
- }
+ if (auto* document = backingObject->document()) {
+ if (auto* frame = document->frame())
+ return frame->loader().client().accessibilityRemoteObject();
+ }
- return nil;
+ return nil;
+ });
}
static void convertToVector(NSArray* array, AccessibilityObject::AccessibilityChildrenVector& vector)
@@ -2284,14 +2286,13 @@
- (id)windowElement:(NSString*)attributeName
{
- return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([attributeName, protectedSelf = retainPtr(self)] () -> RetainPtr<id> {
- id remoteParent = [protectedSelf remoteAccessibilityParentObject];
- if (remoteParent) {
- ALLOW_DEPRECATED_DECLARATIONS_BEGIN
- return [remoteParent accessibilityAttributeValue:attributeName];
- ALLOW_DEPRECATED_DECLARATIONS_END
- }
+ if (id remoteParent = self.remoteAccessibilityParentObject) {
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ return [remoteParent accessibilityAttributeValue:attributeName];
+ ALLOW_DEPRECATED_DECLARATIONS_END
+ }
+ return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([protectedSelf = retainPtr(self)] () -> RetainPtr<id> {
auto* backingObject = protectedSelf.get().axBackingObject;
if (!backingObject)
return nil;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes