зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1860077 - Convert process `handle` to `int` in ProcessHandlerMixin::Process::__del__ to resolve an issue on Windows r=ahal
I started going down the path I initially proposed in bug 1753797, but that was more effort than it was worth. Converting the handle as necessary seems good enough. Differential Revision: https://phabricator.services.mozilla.com/D192122
This commit is contained in:
Родитель
77924520f0
Коммит
e31ee71874
|
@ -181,7 +181,12 @@ class ProcessHandlerMixin(object):
|
|||
_maxint = sys.maxsize
|
||||
handle = getattr(self, "_handle", None)
|
||||
if handle:
|
||||
# _internal_poll is a Python3 built-in call and requires _handle to be an int on Windows
|
||||
# It's only an AutoHANDLE for legacy Python2 reasons that are non-trivial to remove
|
||||
self._handle = int(self._handle)
|
||||
self._internal_poll(_deadstate=_maxint)
|
||||
# Revert it back to the saved 'handle' (AutoHANDLE) for self._cleanup()
|
||||
self._handle = handle
|
||||
if handle or self._job or self._io_port:
|
||||
self._cleanup()
|
||||
else:
|
||||
|
|
Загрузка…
Ссылка в новой задаче