Delete event tap correctly. b=436897 r=josh sr=roc

This commit is contained in:
Steven Michaud 2009-01-07 17:03:56 -06:00
Родитель f5e389e009
Коммит 6a9b130b93
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -343,6 +343,10 @@ nsToolkit::UnregisterAllProcessMouseEventHandlers()
mEventTapRLS = nsnull;
}
if (mEventTapPort) {
// mEventTapPort must be invalidated as well as released. Otherwise the
// event tap doesn't get destroyed until the browser process ends (it
// keeps showing up in the list returned by CGGetEventTapList()).
CFMachPortInvalidate(mEventTapPort);
CFRelease(mEventTapPort);
mEventTapPort = nsnull;
}