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 561203 - Fix priv_from_js_with_typecheck() for dynamic types
Fix priv_from_js_with_typecheck() for dynamic types
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-17 13:32 UTC by Owen Taylor
Modified: 2008-11-18 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix priv_from_js_with_typecheck() for dynamic types (4.47 KB, patch)
2008-11-17 13:32 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2008-11-17 13:32:40 UTC
For the dynamic case, priv_from_js_with_typecheck() can't call
JS_InstanceOf(), since the dynamic class isn't an instance of the
static class. Instead do the checks in gjs_get_instance_private_dynamic(),
but don't raise exceptions.
Comment 1 Owen Taylor 2008-11-17 13:32:43 UTC
Created attachment 122842 [details] [review]
Fix priv_from_js_with_typecheck() for dynamic types
Comment 2 Havoc Pennington 2008-11-17 15:10:10 UTC
Looks reasonable, but what is the story on why this wasn't totally breaking everything? I guess we were never using priv_from_js_with_typecheck?
Comment 3 Owen Taylor 2008-11-17 15:30:15 UTC
Yes, it seems unused for dynamic types.
Comment 4 Owen Taylor 2008-11-18 12:41:22 UTC
committed.