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 672003 - Reference GjsCallbackTrampoline during callbacks to JS
Reference GjsCallbackTrampoline during callbacks to JS
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks: 643014
 
 
Reported: 2012-03-13 16:16 UTC by Owen Taylor
Modified: 2012-03-13 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reference GjsCallbackTrampoline during callbacks to JS (1.25 KB, patch)
2012-03-13 16:16 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2012-03-13 16:16:20 UTC
When we are calling back to Javascript, keep the GjsCallbackTrampoline
object alive for the duration of the call, since we need to use information
from to process the return value even if the callback is removed during the
callback.

(This actually matters only for GI_SCOPE_TYPE_NOTIFIED, but we reference
in all cases for simplicity.)
Comment 1 Owen Taylor 2012-03-13 16:16:21 UTC
Created attachment 209617 [details] [review]
Reference GjsCallbackTrampoline during callbacks to JS
Comment 2 Colin Walters 2012-03-13 16:20:26 UTC
Review of attachment 209617 [details] [review]:

need to use information from to
                            ^ it

I assume you noticed this because you were reading a crash dump or something, can you at least link to it here?  I like to have links to real-world problems if they exist.
Comment 3 Ray Strode [halfline] 2012-03-13 16:42:38 UTC
see bug 643014 comment 15
Comment 4 Owen Taylor 2012-03-13 17:03:47 UTC
Pushed with the commit message fix and a link to other bug.

Attachment 209617 [details] pushed as 63632ac - Reference GjsCallbackTrampoline during callbacks to JS