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 671410 - Some objects cannot be inspected in the looking glass
Some objects cannot be inspected in the looking glass
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-05 20:25 UTC by Giovanni Campagna
Modified: 2012-03-18 01:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Environment: don't fail in toString() (1.46 KB, patch)
2012-03-05 20:25 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-03-05 20:25:17 UTC
My case was 'imports', which has a resolve hook that throws for unknown properties. Unfortunately the shell overrides toString and checks "'actor' in object", and this fails.

Simple patch following.
(A different fix would be to only override Lang._Base.prototype.toString, as gnome-shell now uses the class framework. Or we could fix gjs not to throw when the appropriate flags are passed to the resolve hook).
Comment 1 Giovanni Campagna 2012-03-05 20:25:41 UTC
Created attachment 209027 [details] [review]
Environment: don't fail in toString()

Some objects have a resolve hooks that throw exceptions, so just
checking "'actor' in object" can fail. In that case we should catch
the exception and return the standard toString() value, or the
object cannot be inspected from the looking glass.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-03-05 20:36:48 UTC
(In reply to comment #0)
> Or we could fix gjs not to throw when
> the appropriate flags are passed to the resolve hook).

I had a fix for that a while ago. I can't find it now. We should never be throwing in a resolve hook, just saying that we couldn't find the property.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-03-18 01:24:21 UTC
Review of attachment 209027 [details] [review]:

Actually, this makes sense. Go for it.
Comment 4 Giovanni Campagna 2012-03-18 01:37:45 UTC
Attachment 209027 [details] pushed as 1f87eb4 - Environment: don't fail in toString()