Title: [260944] trunk/Tools
- Revision
- 260944
- Author
- [email protected]
- Date
- 2020-04-30 05:52:10 -0700 (Thu, 30 Apr 2020)
Log Message
Fix for crashes in accessibility/accessibility-node-memory-management.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211215
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::executeOnAXThreadIfPossible):
Removed the call CFRunLoopRunInMode and instead we'll use setTimeout in
each of the tests that require to complete a spin of the main run loop.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::accessibleElementById):
Need to retain ObjectiveC object when it is retrieved from the secondary thread.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::getChildrenWithRange): Dito as above.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (260943 => 260944)
--- trunk/Tools/ChangeLog 2020-04-30 12:25:39 UTC (rev 260943)
+++ trunk/Tools/ChangeLog 2020-04-30 12:52:10 UTC (rev 260944)
@@ -1,3 +1,22 @@
+2020-04-30 Andres Gonzalez <[email protected]>
+
+ Fix for crashes in accessibility/accessibility-node-memory-management.html in isolated tree mode.
+ https://bugs.webkit.org/show_bug.cgi?id=211215
+
+ Reviewed by Chris Fleizach.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+ (WTR::AccessibilityController::executeOnAXThreadIfPossible):
+ Removed the call CFRunLoopRunInMode and instead we'll use setTimeout in
+ each of the tests that require to complete a spin of the main run loop.
+
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
+ (WTR::AccessibilityController::accessibleElementById):
+ Need to retain ObjectiveC object when it is retrieved from the secondary thread.
+
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::getChildrenWithRange): Dito as above.
+
2020-04-30 Claudio Saavedra <[email protected]>
[GTK4] Bring back the URI entry to MiniBrowser
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp (260943 => 260944)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp 2020-04-30 12:25:39 UTC (rev 260943)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp 2020-04-30 12:52:10 UTC (rev 260944)
@@ -116,17 +116,12 @@
m_semaphore.signal();
});
- // Spin the main loop so that any required DOM processing can be
- // executed in the main thread. That is the case of most parameterized
- // attributes, where the attribute value has to be calculated
- // back in the main thread.
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, .25, false);
m_semaphore.wait();
} else
#endif
function();
}
-#endif
+#endif // PLATFORM(COCOA)
RefPtr<AccessibilityUIElement> AccessibilityController::elementAtPoint(int x, int y)
{
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm (260943 => 260944)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm 2020-04-30 12:25:39 UTC (rev 260943)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm 2020-04-30 12:52:10 UTC (rev 260944)
@@ -99,13 +99,13 @@
WKBundlePageRef page = InjectedBundle::singleton().page()->page();
PlatformUIElement root = static_cast<PlatformUIElement>(WKAccessibilityRootObject(page));
- id result;
+ RetainPtr<id> result;
executeOnAXThreadIfPossible([&root, &idAttribute, &result] {
result = findAccessibleObjectById(root, [NSString stringWithJSStringRef:idAttribute]);
});
if (result)
- return AccessibilityUIElement::create(result);
+ return AccessibilityUIElement::create(result.get());
return nullptr;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (260943 => 260944)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2020-04-30 12:25:39 UTC (rev 260943)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2020-04-30 12:52:10 UTC (rev 260944)
@@ -372,11 +372,11 @@
void AccessibilityUIElement::getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >& elementVector, unsigned location, unsigned length)
{
BEGIN_AX_OBJC_EXCEPTIONS
- NSArray* children;
+ RetainPtr<NSArray> children;
s_controller->executeOnAXThreadIfPossible([&children, location, length, this] {
children = [m_element accessibilityArrayAttributeValues:NSAccessibilityChildrenAttribute index:location maxCount:length];
});
- elementVector = makeVector<RefPtr<AccessibilityUIElement>>(children);
+ elementVector = makeVector<RefPtr<AccessibilityUIElement>>(children.get());
END_AX_OBJC_EXCEPTIONS
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes