[webkit-reviews] review granted: [Bug 195574] [GLib] Returning G_TYPE_OBJECT from a method does not work : [Attachment 364658] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 20 14:19:24 PDT 2019
Michael Catanzaro <mcatanzaro at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 195574: [GLib] Returning G_TYPE_OBJECT from a method does not work
https://bugs.webkit.org/show_bug.cgi?id=195574
Attachment 364658: Patch
https://bugs.webkit.org/attachment.cgi?id=364658&action=review
--- Comment #11 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 364658
--> https://bugs.webkit.org/attachment.cgi?id=364658
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=364658&action=review
> Source/JavaScriptCore/API/glib/JSCClass.cpp:735
> + * Note that the value returned by @callback must be fully transferred. In
case of boxed types, you could use
fully transferred -> transfer full
could -> should?
(Ditto for copypaste below)
> Source/JavaScriptCore/API/glib/JSCClass.cpp:738
> + * with jsc_value_new_object() that receives the copy as instance parameter.
as an instance
(Ditto for copypaste below)
> Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:1628
> +static GString* getGStringCopyWillRaise(GString* str)
> +{
> + return static_cast<GString*>(g_boxed_copy(G_TYPE_GSTRING, str));
> +}
I don't understand, why does this cause a JS exception?
More information about the webkit-reviews
mailing list