GNOME Bugzilla – Bug 671410
Some objects cannot be inspected in the looking glass
Last modified: 2012-03-18 01:37:48 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).
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.
(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.
Review of attachment 209027 [details] [review]: Actually, this makes sense. Go for it.
Attachment 209027 [details] pushed as 1f87eb4 - Environment: don't fail in toString()