Summary: | [WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jiewen Tan <jiewen_tan> | ||||||||||
Component: | WebKit2 | Assignee: | chris fleizach <cfleizach> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bfulgham, cfleizach, commit-queue, jcraig, jiewen_tan, webkit-bug-importer | ||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Jiewen Tan
2015-12-21 10:49:13 PST
The looping path is: accessibilityController,rootElement,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,verticalScrollbar,endTextMarker The looping can be explained as follow: The testcase is trying to do a DFS of window object's properties. Since verticalScrollbar itself is an AcessibilityUIElement, and AcessibilityUIElement class by default has verticalScrollbar property, DFS will be stuck. Actually, the class abstract is the same for both WebkitTestRunner and DumpRenderTree for AcessibilityUIElement. The difference is how they implement it. In WebkitTestRunner: PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() const { BEGIN_AX_OBJC_EXCEPTIONS return AccessibilityUIElement::create([m_element accessibilityAttributeValue:NSAccessibilityVerticalScrollBarAttribute]); END_AX_OBJC_EXCEPTIONS return nullptr; } PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::create(PlatformUIElement uiElement) { return adoptRef(new AccessibilityUIElement(uiElement)); } Therefore, every time when the property is accessed, an new AccessibilityUIElement is created and returned. I am not sure which constructor it calls. I am assuming the follows: AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element) : m_element(element) , m_notificationHandler(0) { // FIXME: ap@webkit.org says ObjC objects need to be CFRetained/CFRelease to be GC-compliant on the mac. [m_element retain]; } In DumpRenderTree: AccessibilityUIElement AccessibilityUIElement::verticalScrollbar() const { BEGIN_AX_OBJC_EXCEPTIONS return AccessibilityUIElement([m_element accessibilityAttributeValue:NSAccessibilityVerticalScrollBarAttribute]); END_AX_OBJC_EXCEPTIONS return nullptr; } AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element) : m_element(element) , m_notificationHandler(0) { // FIXME: ap@webkit.org says ObjC objects need to be CFRetained/CFRelease to be GC-compliant on the mac. [m_element retain]; } Here, a ref will be returned directly. In fact, the DumpRenderTree will loop as well, but it stops after the second try. Therefore, I am not sure whether it is due to some reasons specific to the language itself cause the problem. I suggest to handover the bug to the accessibility guy. Created attachment 267765 [details]
Test Case
Created attachment 267766 [details]
Test Case Resource
Created attachment 267781 [details]
patch
Comment on attachment 267781 [details]
patch
Could you please remove the skip statement for the test case under LayoutTests/platform/mac-wk2/TestExpectations L344 as well?
Created attachment 267782 [details]
patch
Comment on attachment 267781 [details]
patch
Thanks for fixing this so quickly! r=me.
Comment on attachment 267782 [details] patch Clearing flags on attachment: 267782 Committed r194364: <http://trac.webkit.org/changeset/194364> All reviewed patches have been landed. Closing bug. |