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 700337 - ByteArray: don't use a resolve function
ByteArray: don't use a resolve function
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-14 19:59 UTC by Giovanni Campagna
Modified: 2013-05-14 20:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ByteArray: don't use a resolve function (4.71 KB, patch)
2013-05-14 20:00 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-05-14 19:59:58 UTC
This bit me after I replaced all priv_from_js with JS_GetPrivate
Comment 1 Giovanni Campagna 2013-05-14 20:00:01 UTC
Created attachment 244240 [details] [review]
ByteArray: don't use a resolve function

It would do nothing anyway, because it was doing priv_from_js
with the wrong arguments, seeing always NULL and returning TRUE.
We don't need to actually define properties, we can just hook
get and set.

Also, we can prevent setting the JS stored value by storing
undefined in the setter.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-05-14 20:04:13 UTC
Review of attachment 244240 [details] [review]:

OK.
Comment 3 Giovanni Campagna 2013-05-14 20:08:15 UTC
Attachment 244240 [details] pushed as b1ed57a - ByteArray: don't use a resolve function