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 561664 - Closure support is broken
Closure support is broken
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on: 562545
Blocks:
 
 
Reported: 2008-11-20 11:42 UTC by Johan Bilien
Modified: 2008-12-09 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Failing test case (539 bytes, text/plain)
2008-11-20 11:43 UTC, Johan Bilien
  Details
fix broken closure as argument (1.14 KB, patch)
2008-11-20 12:34 UTC, Johan Bilien
committed Details | Review
Avoid leaking the BigJsClosure (2.43 KB, patch)
2008-11-20 12:35 UTC, Johan Bilien
committed Details | Review
Make the GArg own the BigJsClosure (1002 bytes, patch)
2008-11-20 12:59 UTC, Johan Bilien
committed Details | Review
Fix returning a GValue (2.61 KB, patch)
2008-11-20 13:51 UTC, Johan Bilien
committed Details | Review
test for the GValue case (1010 bytes, text/plain)
2008-11-28 10:25 UTC, Johan Bilien
  Details
same patch again :) (2.12 KB, patch)
2008-12-09 15:04 UTC, Johan Bilien
committed Details | Review

Description Johan Bilien 2008-11-20 11:42:31 UTC
Passing GClosure arguments to function is broken, it gives errors of the kind:

"Object 0x90d8780 proto 0x90c2000 doesn't have a dynamically-registered class, it has Function"
Comment 1 Johan Bilien 2008-11-20 11:43:31 UTC
Created attachment 123101 [details]
Failing test case
Comment 2 Johan Bilien 2008-11-20 12:34:59 UTC
Created attachment 123103 [details] [review]
fix broken closure as argument
Comment 3 Johan Bilien 2008-11-20 12:35:49 UTC
Created attachment 123104 [details] [review]
Avoid leaking the BigJsClosure
Comment 4 Johan Bilien 2008-11-20 12:59:09 UTC
Created attachment 123105 [details] [review]
Make the GArg own the BigJsClosure
Comment 5 Johan Bilien 2008-11-20 13:51:16 UTC
Created attachment 123110 [details] [review]
Fix returning a GValue

Returning a GValue was also broken (it was handled as a struct)
Comment 6 Lucas Rocha 2008-11-20 17:33:19 UTC
Looks good.
Comment 7 Johan (not receiving bugmail) Dahlin 2008-11-27 23:41:27 UTC
(In reply to comment #5)
> Created an attachment (id=123110) [edit]
> Fix returning a GValue
> 
> Returning a GValue was also broken (it was handled as a struct)
> 

Can you include at test for this?
Comment 8 Johan Bilien 2008-11-28 10:25:52 UTC
Created attachment 123599 [details]
test for the GValue case
Comment 9 Lucas Rocha 2008-12-02 11:01:41 UTC
(In reply to comment #8)
> Created an attachment (id=123599) [edit]
> test for the GValue case
 
I'm guessing those test cases fail without your patches, right?

Looks good.
Comment 10 Johan Bilien 2008-12-02 11:03:53 UTC
Yes(In reply to comment #9)
> (In reply to comment #8)
> > Created an attachment (id=123599) [edit]
> > test for the GValue case
> 
> I'm guessing those test cases fail without your patches, right?
> 
> Looks good.
> 

Yes

The test cases depend on http://bugzilla.gnome.org/show_bug.cgi?id=562545
Comment 11 Johan Bilien 2008-12-09 14:56:13 UTC
This broke again in r131. We really need the test case
Comment 12 Johan Bilien 2008-12-09 15:04:09 UTC
Created attachment 124278 [details] [review]
same patch again :)
Comment 13 Johan Bilien 2008-12-09 15:30:18 UTC
committed, together with the test case