aheinecke added inline comments.

INLINE COMMENTS

> aacid wrote in document.cpp:1139
> This is problematic since it will leave a dangling event pointer for any 
> Action::Script action executed through Document::processAction that doesn't 
> come from this function.

Sorry I can't follow you here.

If an action is processed from somewhere else the scripter won't have an event 
set and the event pointer in the scripter is null.

If the processAction is triggered here for text fields (and probably more in 
the future) we "reset" the event pointer after it was set in the scripter in 
line 1148 after the action is processed and keep using the event here until it 
goes out of scope and is destroyed by the shared pointer.

I don't see a codepath were we leave it dangling.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10048

To: aheinecke, #okular
Cc: aacid, michaelweghorn, ngraham

Reply via email to