Changeset 85390 in webkit
- Timestamp:
- Apr 29, 2011 10:20:07 PM (13 years ago)
- Location:
- trunk/Source/WebKit/gtk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r85229 r85390 1 2011-04-29 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [Gtk+] Crash when navigating back 6 https://bugs.webkit.org/show_bug.cgi?id=59799 7 8 The innerNode management in WebKitHitTestResult was relying on the 9 old DOM bindings behavior where every DOM objects had to be 10 disposed by the caller. Now the objects are garbage collected by 11 WebKit when either the parent frame or document dies, so this is 12 not needed anymore. Update the code to simply take ownership of 13 the node, which effectively correctly balances the reference 14 count. 15 16 * webkit/webkithittestresult.cpp: 17 (webkit_hit_test_result_dispose): call C++ dtors in private data. 18 (webkit_hit_test_result_get_property): adatp to GRefPtr API. 19 (webkit_hit_test_result_init): call C++ ctors in private data. 20 1 21 2011-04-28 Xan Lopez <xlopez@igalia.com> 2 22 -
trunk/Source/WebKit/gtk/webkit/webkithittestresult.cpp
r74933 r85390 23 23 24 24 #include "GOwnPtr.h" 25 #include "GRefPtr.h" 25 26 #include "HitTestResult.h" 26 27 #include "KURL.h" … … 48 49 char* imageURI; 49 50 char* mediaURI; 50 WebKitDOMNode*innerNode;51 GRefPtr<WebKitDOMNode> innerNode; 51 52 }; 52 53 … … 75 76 static void webkit_hit_test_result_dispose(GObject* object) 76 77 { 77 g_object_unref(WEBKIT_HIT_TEST_RESULT(object)->priv->innerNode);78 WEBKIT_HIT_TEST_RESULT(object)->priv->~WebKitHitTestResultPrivate(); 78 79 79 80 G_OBJECT_CLASS(webkit_hit_test_result_parent_class)->dispose(object); … … 99 100 break; 100 101 case PROP_INNER_NODE: 101 g_value_set_object(value, priv->innerNode );102 g_value_set_object(value, priv->innerNode.get()); 102 103 break; 103 104 default: … … 231 232 { 232 233 web_hit_test_result->priv = G_TYPE_INSTANCE_GET_PRIVATE(web_hit_test_result, WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResultPrivate); 234 new (web_hit_test_result->priv) WebKitHitTestResultPrivate(); 233 235 } 234 236
Note: See TracChangeset
for help on using the changeset viewer.