Re: Trouble finding GIR constructor for Soup.Cookie



Hi Jasper

Thanks for the feedback, I guess I'll have hold off on development of my Gnome Shell extension until these issues are resolved and updates pushed to an F15 repo. Any ideas when this might be?

Kind regards...

--
Ricardo Gladwell <ricardo gladwell gmail com>
http://www.google.com/profiles/ricardo.gladwell
Twitter: @rgladwell - MSN: axonrg gmail com

On 07/23/2011 09:21 PM, Jasper St. Pierre wrote:


2011/7/23 Ricardo Gladwell <ricardo gladwell gmail com
<mailto:ricardo gladwell gmail com>>

    The following is also crashing my Gnome Shell session despite being
    surrounded by a try...catch block:

                let cookieJar = new Soup.CookieJar();
                let cookie = Soup.Cookie.prototype.new('SID', this.sid,
    '.google.com <http://google.com>', '/', -1);
                cookieJar.add_cookie(cookie);
                session.add_feature(cookieJar);

    Any ideas why?


If it's what I think it is, it's an unfortunate bug between
gobject-introspection, gjs and libsoup. See, the API defines a few
properties called 'add-feature' and 'add-feature-by-type', designed for
the C API:

   g_object_new (SOUP_TYPE_SESSION,
"add-feature-by-type", SOUP_TYPE_PROXY_RESOLVER_DEFAULT,
     NULL);

But this is interfering with gobject-introspection, and gjs is thinking
it's the property it wants when you do "session.add_feature".
Unfortunately, they don't give it a proper getter, so we get stuck with
a warning, and maybe a crash. See BGO bug #655149 [0] and bug #655150
[1] for details. Unfortunately, this isn't fixed yet: gjs doesn't care
about the typelib when looking for properties, it just looks them up on
the typeinfo. I have a quick patch, but it's probably best if it goes
into the girepository API proper.

    TIA...

    --
    Ricardo Gladwell <ricardo gladwell gmail com
    <mailto:ricardo gladwell gmail com>>
    http://www.google.com/profiles/ricardo.gladwell
    Twitter: @rgladwell - MSN: axonrg gmail com <mailto:axonrg gmail com>


Jasper

[0] https://bugzilla.gnome.org/show_bug.cgi?id=655149
[1] https://bugzilla.gnome.org/show_bug.cgi?id=655150



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]