Making sure that DBus objects are all created before the service
ClosedPublic

Authored by feverfew on Sep 2 2019, 11:00 AM.

Details

Summary

Currently the DBus service is created before the MainWindow DBus object is
created. This can cause hangs if another service makes calls to a a method
in an object that's not been initialised, when the service is already published.
This patch defers the creation of the service until all DBus objects are
created.

Test Plan

Tested in KDevelop. Have "open new folders in tabs" feature enabled.
Open several folders with Dolphin at once. Before this patch
there would be noticeable hanging. With this patch all tabs instantly open with
no hanging.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
feverfew created this revision.Sep 2 2019, 11:00 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 2 2019, 11:00 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
feverfew requested review of this revision.Sep 2 2019, 11:00 AM
feverfew edited the test plan for this revision. (Show Details)Sep 2 2019, 11:24 AM
elvisangelaccio added inline comments.Sep 2 2019, 6:35 PM
src/main.cpp
147

What about this code path? Previously it would create the dbus objects, now with this patch it would not. Is that a problem?

feverfew added inline comments.Sep 2 2019, 8:08 PM
src/main.cpp
147

No, if the code reaches here, this instance was basically a glorified URL forwarder, and we wouldn't want it to be reachable via DBus at all.

elvisangelaccio accepted this revision.Sep 2 2019, 8:23 PM

Go for it ;)

This revision is now accepted and ready to land.Sep 2 2019, 8:23 PM

Go for it ;)

Can't commit from my laptop for some reason (and don't have time to figure out why). If you could before tagging that'd be great!

This revision was automatically updated to reflect the committed changes.