Gentoo Archives: gentoo-commits

From: Priit Laes <plaes@×××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: net-libs/webkit-gtk/files/, net-libs/webkit-gtk/
Date: Sat, 07 May 2011 19:18:11
Message-Id: 86a19fae13dbbc5fb8f3e5366ba5aef7b22d14e0.plaes@gentoo
1 commit: 86a19fae13dbbc5fb8f3e5366ba5aef7b22d14e0
2 Author: Priit Laes <plaes <AT> plaes <DOT> org>
3 AuthorDate: Sat May 7 19:08:39 2011 +0000
4 Commit: Priit Laes <plaes <AT> plaes <DOT> org>
5 CommitDate: Sat May 7 19:08:39 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=86a19fae
7
8 net-libs/webkit-gtk: Fix for frequent crasher and small cleanups
9
10 ---
11 .../files/webkit-gtk-1.4.0-nav-crasher.patch | 73 ++++++++++++++++++++
12 ...gtk-1.4.0.ebuild => webkit-gtk-1.4.0-r1.ebuild} | 4 +-
13 ....0-r200.ebuild => webkit-gtk-1.4.0-r201.ebuild} | 3 +-
14 3 files changed, 76 insertions(+), 4 deletions(-)
15
16 diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.4.0-nav-crasher.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.4.0-nav-crasher.patch
17 new file mode 100644
18 index 0000000..e447708
19 --- /dev/null
20 +++ b/net-libs/webkit-gtk/files/webkit-gtk-1.4.0-nav-crasher.patch
21 @@ -0,0 +1,73 @@
22 +commit e037ca43e772ac0e5b0d80f95a2a6c996c0c11fb
23 +Author: xan@××××××.org <xan@××××××.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
24 +Date: Sat Apr 30 05:20:07 2011 +0000
25 +
26 + 2011-04-29 Xan Lopez <xlopez@××××××.com>
27 +
28 + Reviewed by Martin Robinson.
29 +
30 + [Gtk+] Crash when navigating back
31 + https://bugs.webkit.org/show_bug.cgi?id=59799
32 +
33 + The innerNode management in WebKitHitTestResult was relying on the
34 + old DOM bindings behavior where every DOM objects had to be
35 + disposed by the caller. Now the objects are garbage collected by
36 + WebKit when either the parent frame or document dies, so this is
37 + not needed anymore. Update the code to simply take ownership of
38 + the node, which effectively correctly balances the reference
39 + count.
40 +
41 + * webkit/webkithittestresult.cpp:
42 + (webkit_hit_test_result_dispose): call C++ dtors in private data.
43 + (webkit_hit_test_result_get_property): adatp to GRefPtr API.
44 + (webkit_hit_test_result_init): call C++ ctors in private data.
45 +
46 + git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 +
48 +diff --git a/Source/WebKit/gtk/webkit/webkithittestresult.cpp b/Source/WebKit/gtk/webkit/webkithittestresult.cpp
49 +index 9632493..1abb166 100644
50 +--- a/Source/WebKit/gtk/webkit/webkithittestresult.cpp
51 ++++ b/Source/WebKit/gtk/webkit/webkithittestresult.cpp
52 +@@ -22,6 +22,7 @@
53 + #include "webkithittestresult.h"
54 +
55 + #include "GOwnPtr.h"
56 ++#include "GRefPtr.h"
57 + #include "HitTestResult.h"
58 + #include "KURL.h"
59 + #include "WebKitDOMBinding.h"
60 +@@ -47,7 +48,7 @@ struct _WebKitHitTestResultPrivate {
61 + char* linkURI;
62 + char* imageURI;
63 + char* mediaURI;
64 +- WebKitDOMNode* innerNode;
65 ++ GRefPtr<WebKitDOMNode> innerNode;
66 + };
67 +
68 + enum {
69 +@@ -74,7 +75,7 @@ static void webkit_hit_test_result_finalize(GObject* object)
70 +
71 + static void webkit_hit_test_result_dispose(GObject* object)
72 + {
73 +- g_object_unref(WEBKIT_HIT_TEST_RESULT(object)->priv->innerNode);
74 ++ WEBKIT_HIT_TEST_RESULT(object)->priv->~WebKitHitTestResultPrivate();
75 +
76 + G_OBJECT_CLASS(webkit_hit_test_result_parent_class)->dispose(object);
77 + }
78 +@@ -98,7 +99,7 @@ static void webkit_hit_test_result_get_property(GObject* object, guint propertyI
79 + g_value_set_string(value, priv->mediaURI);
80 + break;
81 + case PROP_INNER_NODE:
82 +- g_value_set_object(value, priv->innerNode);
83 ++ g_value_set_object(value, priv->innerNode.get());
84 + break;
85 + default:
86 + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyID, pspec);
87 +@@ -230,6 +231,7 @@ static void webkit_hit_test_result_class_init(WebKitHitTestResultClass* webHitTe
88 + static void webkit_hit_test_result_init(WebKitHitTestResult* web_hit_test_result)
89 + {
90 + web_hit_test_result->priv = G_TYPE_INSTANCE_GET_PRIVATE(web_hit_test_result, WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResultPrivate);
91 ++ new (web_hit_test_result->priv) WebKitHitTestResultPrivate();
92 + }
93 +
94 + namespace WebKit {
95
96 diff --git a/net-libs/webkit-gtk/webkit-gtk-1.4.0.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.4.0-r1.ebuild
97 similarity index 97%
98 rename from net-libs/webkit-gtk/webkit-gtk-1.4.0.ebuild
99 rename to net-libs/webkit-gtk/webkit-gtk-1.4.0-r1.ebuild
100 index e37d989..8c8b69b 100644
101 --- a/net-libs/webkit-gtk/webkit-gtk-1.4.0.ebuild
102 +++ b/net-libs/webkit-gtk/webkit-gtk-1.4.0-r1.ebuild
103 @@ -67,6 +67,8 @@ src_prepare() {
104 # XXX: Fails to apply
105 #epatch "${FILESDIR}"/${PN}-1.2.5-darwin8.patch
106
107 + epatch "${FILESDIR}/${P}-nav-crasher.patch"
108 +
109 # Don't force -O2
110 sed -i 's/-O2//g' "${S}"/configure.ac || die "sed failed"
111
112 @@ -112,8 +114,6 @@ src_configure() {
113 }
114
115 src_compile() {
116 - # XXX: This step is required so we properly build gettext catalogs
117 - emake update-po || die "Compile failed"
118 # Fix sandbox error with USE="introspection"
119 # https://bugs.webkit.org/show_bug.cgi?id=35471
120 emake XDG_DATA_HOME="${T}/.local" || die "Compile failed"
121
122 diff --git a/net-libs/webkit-gtk/webkit-gtk-1.4.0-r200.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.4.0-r201.ebuild
123 similarity index 96%
124 rename from net-libs/webkit-gtk/webkit-gtk-1.4.0-r200.ebuild
125 rename to net-libs/webkit-gtk/webkit-gtk-1.4.0-r201.ebuild
126 index 7cb607a..4f379e0 100644
127 --- a/net-libs/webkit-gtk/webkit-gtk-1.4.0-r200.ebuild
128 +++ b/net-libs/webkit-gtk/webkit-gtk-1.4.0-r201.ebuild
129 @@ -65,6 +65,7 @@ src_prepare() {
130 # Fix build on Darwin8 (10.4 Tiger)
131 # XXX: Fails to apply
132 #epatch "${FILESDIR}"/${PN}-1.2.5-darwin8.patch
133 + epatch "${FILESDIR}/${P}-nav-crasher.patch"
134
135 # Don't force -O2
136 sed -i 's/-O2//g' "${S}"/configure.ac || die "sed failed"
137 @@ -110,8 +111,6 @@ src_configure() {
138 }
139
140 src_compile() {
141 - # XXX: This step is required so we properly build gettext catalogs
142 - emake update-po || die "Compile failed"
143 # Fix sandbox error with USE="introspection"
144 # https://bugs.webkit.org/show_bug.cgi?id=35471
145 emake XDG_DATA_HOME="${T}/.local" || die "Compile failed"