[GTK][AC] Fix unexpected clear of ClutterContent.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2013 15:34:35 +0000 (15:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2013 15:34:35 +0000 (15:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115099

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-04-24
Reviewed by Gustavo Noronha Silva.

adoptGRef doesn't increase a reference count. So if a actor has a valid ClutterContent,
it would be cleared unexpectedly by smart pointer when escaping a function.

No new tests, no functionality changed.

* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorUpdateTexture):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp

index 37e6953..c5c3c95 100644 (file)
@@ -1,3 +1,18 @@
+2013-04-24  ChangSeok Oh  <changseok.oh@collabora.com>
+
+        [GTK][AC] Fix unexpected clear of ClutterContent.
+        https://bugs.webkit.org/show_bug.cgi?id=115099
+
+        Reviewed by Gustavo Noronha Silva.
+
+        adoptGRef doesn't increase a reference count. So if a actor has a valid ClutterContent,
+        it would be cleared unexpectedly by smart pointer when escaping a function.
+
+        No new tests, no functionality changed.
+
+        * platform/graphics/clutter/GraphicsLayerActor.cpp:
+        (graphicsLayerActorUpdateTexture):
+
 2013-04-24  Alberto Garcia  <agarcia@igalia.com>
 
         DOMFileSystemBase: fix multiple definitions in the BlackBerry port
index d65d22f..8392a0f 100644 (file)
@@ -249,7 +249,7 @@ static void graphicsLayerActorUpdateTexture(GraphicsLayerActor* layer)
     ASSERT(priv->layerType != GraphicsLayerClutter::LayerTypeVideoLayer);
 
     ClutterActor* actor = CLUTTER_ACTOR(layer);
-    GRefPtr<ClutterContent> canvas = adoptGRef(clutter_actor_get_content(actor));
+    GRefPtr<ClutterContent> canvas = clutter_actor_get_content(actor);
     if (canvas) {
         // Nothing needs a texture, remove the one we have, if any.
         if (!priv->drawsContent && !priv->surface) {