Skip to content
Permalink
Browse files
Don't assume AccessibleObjectFromEvent succeeds
Fixes <http://webkit.org/b/44136> <rdar://problem/8321684> Crash in
DumpRenderTree!notificationListenerProc when running
plugins/access-after-page-destroyed.html

Reviewed by Sam Weinig.

* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(notificationListenerProc): Check both the return value of
AccessibleObjectFromEvent and the object it returns, as MSDN
recommends.

Canonical link: https://commits.webkit.org/59535@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@68907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed Oct 1, 2010
1 parent b33e5cd commit c1757ce0ee3271a468152f538bba307b01aa79ac
Showing 2 changed files with 17 additions and 1 deletion.
@@ -1,3 +1,18 @@
2010-10-01 Adam Roben <aroben@apple.com>

Don't assume AccessibleObjectFromEvent succeeds

Fixes <http://webkit.org/b/44136> <rdar://problem/8321684> Crash in
DumpRenderTree!notificationListenerProc when running
plugins/access-after-page-destroyed.html

Reviewed by Sam Weinig.

* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(notificationListenerProc): Check both the return value of
AccessibleObjectFromEvent and the object it returns, as MSDN
recommends.

2010-10-01 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>

Reviewed by Tony Chang.
@@ -232,7 +232,8 @@ static void CALLBACK notificationListenerProc(HWINEVENTHOOK, DWORD event, HWND h
VariantInit(&vChild);

HRESULT hr = AccessibleObjectFromEvent(hwnd, idObject, idChild, &parentObject, &vChild);
ASSERT(SUCCEEDED(hr));
if (FAILED(hr) || !parentObject)
return;

COMPtr<IDispatch> childDispatch;
if (FAILED(parentObject->get_accChild(vChild, &childDispatch))) {

0 comments on commit c1757ce

Please sign in to comment.