Re: Trouble finding GIR constructor for Soup.Cookie
- From: "Jasper St. Pierre" <jstpierre mecheye net>
- To: Ricardo Gladwell <ricardo gladwell gmail com>
- Cc: gnome-shell-list gnome org
- Subject: Re: Trouble finding GIR constructor for Soup.Cookie
- Date: Sat, 23 Jul 2011 16:21:36 -0400
2011/7/23 Ricardo Gladwell
<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', '/', -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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]