Page MenuHomePhabricator

eio: remove unecessary use of weak reference.
ClosedPublic

Authored by cedric on Mar 15 2019, 5:02 PM.

Details

Summary

There is no point in keeping a pointer to the main loop now that we
are using efl_future_then. This resolve potential bug with leftover
dangling weak reference as efl_future_then do require a free case
otherwise.

Depends on D8373

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Mar 15 2019, 5:02 PM
bu5hm4n requested changes to this revision.Mar 16 2019, 9:08 AM
bu5hm4n added inline comments.
src/lib/eio/efl_io_model.c
450

A value can still be a error ?

This revision now requires changes to proceed.Mar 16 2019, 9:08 AM
cedric added inline comments.Mar 16 2019, 10:38 AM
src/lib/eio/efl_io_model.c
450

Once you use efl_future_then error have to be catched by an error handler. It won't be popping up in the success handler (make sense, no?). So yes, that code was useless.

bu5hm4n accepted this revision.Mar 16 2019, 10:57 AM
bu5hm4n added inline comments.
src/lib/eio/efl_io_model.c
450

Okay- sorry for those questions, but i never was in touch with this code before ...

This revision is now accepted and ready to land.Mar 16 2019, 10:57 AM
cedric added inline comments.Mar 16 2019, 11:03 AM
src/lib/eio/efl_io_model.c
450

No worry it is good to get someone else to understand how this things are working.

cedric updated this revision to Diff 20818.Mar 20 2019, 11:37 AM
cedric edited the summary of this revision. (Show Details)

Rebase and correct.

cedric updated this revision to Diff 21005.Mar 27 2019, 2:42 PM

Rebase.

This revision was automatically updated to reflect the committed changes.