Re: Bug in QWebEngineProfile::setNotificationPresenter
Phil Thompson <[email protected]> Fri, 22 May 2020 09:35:55 +0100
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
On 21/05/2020 10:42, Florian Bruhin wrote: > Hi, > > When running the attached example and clicking "authorize", then "show" > 2-3 > times, either a segfault or an exception like this will happen: > > TypeError: 'QWebEngineNotification' object is not callable > > As a workaround, show_notification_2 can be used instead, which > re-registers > the callback and makes things work fine. > > Looking at the implementation of setNotificationPresenter in > qwebengineprofile.sip, it does "Py_DECREF(a0);", inside its wrapper, > with a0 > being the passed function. That seems to be wrong, as the function gets > called > multiple times with multiple notifications. > > Compare that to e.g. setCookieFilter in qwebenginecookiestore.sip where > the > callback isn't DECREF'd. Should be fixed in tonight's snapshot. Thanks, Phil