[GLIB] GVariant floating references are not correctly handled by GRefPtr
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jan 2014 08:01:16 +0000 (08:01 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jan 2014 08:01:16 +0000 (08:01 +0000)
commit91aabd0b879d91d5838db45dbc8d89b33c16d441
tree47b61ac48a76bf2ec969327cc85706f09a8f3989
parent1e11b4a18880c7be5ffd5179d622967e07300cfb
[GLIB] GVariant floating references are not correctly handled by GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=127246

Reviewed by Martin Robinson.

Source/WebCore:

Do not adopt GVariant floating references, they will be converted
to a full reference by GRefPtr.

* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData):
(WebCore::PasteboardHelper::fillDataObjectFromDropData):

Source/WTF:

GRefPtr should always use g_variant_ref_sink to deal with GVariant
floating references. In case of full references,
g_variant_ref_sink calls g_variant_ref, so it's safe to use it always.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Use g_variant_ref_sink().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/gobject/GRefPtr.cpp
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/PasteboardHelper.cpp