After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721039 - ShellAppSystem: own the memory for the startup wm class and app id
ShellAppSystem: own the memory for the startup wm class and app id
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-25 19:37 UTC by Giovanni Campagna
Modified: 2013-12-26 22:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ShellAppSystem: own the memory for the startup wm class and app id (1.92 KB, patch)
2013-12-25 19:37 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-12-25 19:37:11 UTC
Fixes the recognition of epiphany web applications (which use StartupWMClass
to override the fact that wm_class_instance is epiphany)
Comment 1 Giovanni Campagna 2013-12-25 19:37:13 UTC
Created attachment 264884 [details] [review]
ShellAppSystem: own the memory for the startup wm class and app id

The hash table must keep a copy of the IDs, because the GAppInfos
are unreferenced (and thus freed) at the end of the function.
This was possibly not a problem if the GAppInfos were referencing
the memory-mapped cache, but it becomes one for regularly parsed
desktop files in ~/.local.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-12-25 23:44:12 UTC
Review of attachment 264884 [details] [review]:

But we ref the GAppInfo when we save it in the ShellApp, no?
Comment 3 Giovanni Campagna 2013-12-26 17:30:42 UTC
(In reply to comment #2)
> Review of attachment 264884 [details] [review]:
> 
> But we ref the GAppInfo when we save it in the ShellApp, no?

No, it's a different GAppInfo, used only for the StartupWMClass scan.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-12-26 20:05:49 UTC
Review of attachment 264884 [details] [review]:

Oh, right, since ShellApps are created "lazily" now, the scan will unref the GAppInfo.
Comment 5 Giovanni Campagna 2013-12-26 22:45:17 UTC
Attachment 264884 [details] pushed as f3feb13 - ShellAppSystem: own the memory for the startup wm class and app id