[GLib] Returning G_TYPE_OBJECT from a constructor does not work
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 10:34:04 +0000 (10:34 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2019 10:34:04 +0000 (10:34 +0000)
commit81ad9043b56f6f3e38386e71249f9ca49462e353
treec726f3762b00f9ad0195131f65694257f986f570
parentd645320e7a1e0808819f47dd0152a67402bff41d
[GLib] Returning G_TYPE_OBJECT from a constructor does not work
https://bugs.webkit.org/show_bug.cgi?id=195206

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

We are freeing the newly created object before returning from the constructor.

* API/glib/JSCCallbackFunction.cpp:
(JSC::JSCCallbackFunction::construct):

Tools:

Add a new test case.

* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCClass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp
Source/JavaScriptCore/ChangeLog
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp