From a9987ae72c8d2d21a37f8ed865aab292db2433d9 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Tue, 22 Jun 2021 20:51:26 +0000 Subject: [PATCH] Bug 1525152 - Use correct dll name for GetProcessImageFileName; r=ahal This code is infrequently used, but has always failed because it references the wrong dll name - corrected here. Differential Revision: https://phabricator.services.mozilla.com/D118215 --- testing/mochitest/runtests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 2a8c909f036d..6e7a0d0f0ecc 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -418,14 +418,14 @@ if mozinfo.isWin: # actually Firefox. namesize = 1024 pName = ctypes.create_string_buffer(namesize) - namelen = ctypes.windll.kernel32.GetProcessImageFileNameA( + namelen = ctypes.windll.psapi.GetProcessImageFileNameA( pHandle, pName, namesize ) if namelen == 0: # Still an active process, so conservatively assume it's Firefox. return True - return pName.value.endswith(("firefox.exe", "plugin-container.exe")) + return pName.value.endswith((b"firefox.exe", b"plugin-container.exe")) finally: ctypes.windll.kernel32.CloseHandle(pHandle)