Commit 8297cd1b authored by andersca@apple.com's avatar andersca@apple.com

Exception thrown when running accessibility/container-node-delete-causes-crash.html test

https://bugs.webkit.org/show_bug.cgi?id=98291

Reviewed by Andreas Kling.

The accessibility/container-node-delete-causes-crash.html test will cause a full accessibility tree
to be created by trying to look up an element with a non-existent ID. This caused an exception to be thrown
when trying to access the children of an element that didn't have any children. Fix this by adding
BEGIN_AX_OBJC_EXCEPTIONS/END_AX_OBJC_EXCEPTIONS around the call to get the children.

* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(findAccessibleObjectById):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 47757986
2012-10-03 Anders Carlsson <andersca@apple.com>
Exception thrown when running accessibility/container-node-delete-causes-crash.html test
https://bugs.webkit.org/show_bug.cgi?id=98291
Reviewed by Andreas Kling.
The accessibility/container-node-delete-causes-crash.html test will cause a full accessibility tree
to be created by trying to look up an element with a non-existent ID. This caused an exception to be thrown
when trying to access the children of an element that didn't have any children. Fix this by adding
BEGIN_AX_OBJC_EXCEPTIONS/END_AX_OBJC_EXCEPTIONS around the call to get the children.
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(findAccessibleObjectById):
2012-10-03 Ojan Vafai <ojan@chromium.org>
Make partytime work when loading garden-o-matic from trac.webkit.org
......
......@@ -79,6 +79,7 @@ static id findAccessibleObjectById(id obj, NSString *idAttribute)
return obj;
END_AX_OBJC_EXCEPTIONS
BEGIN_AX_OBJC_EXCEPTIONS
NSArray *children = [obj accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
NSUInteger childrenCount = [children count];
for (NSUInteger i = 0; i < childrenCount; ++i) {
......@@ -86,6 +87,7 @@ static id findAccessibleObjectById(id obj, NSString *idAttribute)
if (result)
return result;
}
END_AX_OBJC_EXCEPTIONS
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment