Title: [258297] trunk/Source/WebCore
Revision
258297
Author
andresg...@apple.com
Date
2020-03-11 16:56:44 -0700 (Wed, 11 Mar 2020)

Log Message

AX: Isolated tree: enabling secondary thread for the wrong clients
https://bugs.webkit.org/show_bug.cgi?id=208950

Reviewed by Chris Fleizach.

Removed incorrect call to _AXUIElementUseSecondaryAXThread and wrap it
in initializeSecondaryAXThread with the appropriate checks.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::initializeSecondaryAXThread):
(WebCore::AXObjectCache::isolatedTreeRootObject):
* accessibility/AXObjectCache.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258296 => 258297)


--- trunk/Source/WebCore/ChangeLog	2020-03-11 23:53:58 UTC (rev 258296)
+++ trunk/Source/WebCore/ChangeLog	2020-03-11 23:56:44 UTC (rev 258297)
@@ -1,3 +1,19 @@
+2020-03-11  Andres Gonzalez  <andresg...@apple.com>
+
+        AX: Isolated tree: enabling secondary thread for the wrong clients
+        https://bugs.webkit.org/show_bug.cgi?id=208950
+
+        Reviewed by Chris Fleizach.
+
+        Removed incorrect call to _AXUIElementUseSecondaryAXThread and wrap it
+        in initializeSecondaryAXThread with the appropriate checks.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
+        (WebCore::AXObjectCache::initializeSecondaryAXThread):
+        (WebCore::AXObjectCache::isolatedTreeRootObject):
+        * accessibility/AXObjectCache.h:
+
 2020-03-11  Jer Noble  <jer.no...@apple.com>
 
         [EME] Issue an "encrypted" event when a new encrypted initialization segment is encountered

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (258296 => 258297)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2020-03-11 23:53:58 UTC (rev 258296)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2020-03-11 23:56:44 UTC (rev 258297)
@@ -393,11 +393,7 @@
     auto tree = AXIsolatedTree::treeForPageID(*pageID);
     if (!tree) {
         tree = generateIsolatedTree(*pageID, document);
-        // Now that we have created our tree, initialize the secondary thread,
-        // so future requests come in on the other thread.
-        if (_AXSIsolatedTreeModeFunctionIsAvailable() && _AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeSecondaryThread)
-            _AXUIElementUseSecondaryAXThread(true);
-        _AXUIElementUseSecondaryAXThread(true);
+        initializeSecondaryAXThread();
     }
 
     if (tree)
@@ -750,6 +746,15 @@
 }
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
+
+void AXObjectCache::initializeSecondaryAXThread()
+{
+    // Now that we have created our tree, initialize the secondary thread,
+    // so future requests come in on the other thread.
+    if (_AXSIsolatedTreeModeFunctionIsAvailable() && _AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeSecondaryThread)
+        _AXUIElementUseSecondaryAXThread(true);
+}
+
 AXCoreObject* AXObjectCache::isolatedTreeRootObject()
 {
     if (!m_pageID)
@@ -760,11 +765,7 @@
         tree = Accessibility::retrieveValueFromMainThread<RefPtr<AXIsolatedTree>>([this] () -> RefPtr<AXIsolatedTree> {
             return generateIsolatedTree(*m_pageID, m_document);
         });
-
-        // Now that we have created our tree, initialize the secondary thread,
-        // so future requests come in on the other thread.
-        if (_AXSIsolatedTreeModeFunctionIsAvailable() && _AXSIsolatedTreeMode_Soft() == AXSIsolatedTreeModeSecondaryThread)
-            _AXUIElementUseSecondaryAXThread(true);
+        AXObjectCache::initializeSecondaryAXThread();
     }
 
     if (tree)

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (258296 => 258297)


--- trunk/Source/WebCore/accessibility/AXObjectCache.h	2020-03-11 23:53:58 UTC (rev 258296)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h	2020-03-11 23:56:44 UTC (rev 258297)
@@ -360,6 +360,7 @@
     void setIsolatedTreeFocusedObject(Node*);
     static Ref<AXIsolatedTree> generateIsolatedTree(PageIdentifier, Document&);
     void updateIsolatedTree(AXCoreObject*, AXNotification);
+    static void initializeSecondaryAXThread();
 #endif
 
 protected:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to