Title: [151383] releases/WebKitGTK/webkit-2.0/Source/WebKit2
- Revision
- 151383
- Author
- [email protected]
- Date
- 2013-06-10 05:30:38 -0700 (Mon, 10 Jun 2013)
Log Message
Merge r150232 - [GTK] Fix memory leak in WebKitBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=116222
Patch by Manuel Rego Casasnovas <[email protected]> on 2013-05-16
Reviewed by Carlos Garcia Campos.
Due to the use of leakRef() the ImmutableArray is not being released
automatically. Adding a local variable in the methods to make sure that
the ImmutableArray is freed.
* UIProcess/API/gtk/WebKitBackForwardList.cpp:
(webkit_back_forward_list_get_back_list_with_limit): Add local variable
RefPtr and pass the ImmutableArray to
WebKitBackForwardList::webkitBackForwardListCreateList() using
RefPtr::get().
(webkit_back_forward_list_get_forward_list_with_limit): Ditto.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.0/Source/WebKit2/ChangeLog (151382 => 151383)
--- releases/WebKitGTK/webkit-2.0/Source/WebKit2/ChangeLog 2013-06-10 12:23:04 UTC (rev 151382)
+++ releases/WebKitGTK/webkit-2.0/Source/WebKit2/ChangeLog 2013-06-10 12:30:38 UTC (rev 151383)
@@ -1,3 +1,21 @@
+2013-05-16 Manuel Rego Casasnovas <[email protected]>
+
+ [GTK] Fix memory leak in WebKitBackForwardList
+ https://bugs.webkit.org/show_bug.cgi?id=116222
+
+ Reviewed by Carlos Garcia Campos.
+
+ Due to the use of leakRef() the ImmutableArray is not being released
+ automatically. Adding a local variable in the methods to make sure that
+ the ImmutableArray is freed.
+
+ * UIProcess/API/gtk/WebKitBackForwardList.cpp:
+ (webkit_back_forward_list_get_back_list_with_limit): Add local variable
+ RefPtr and pass the ImmutableArray to
+ WebKitBackForwardList::webkitBackForwardListCreateList() using
+ RefPtr::get().
+ (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
+
2013-05-27 Xan Lopez <[email protected]>
Reset all clients on WebPage close
Modified: releases/WebKitGTK/webkit-2.0/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp (151382 => 151383)
--- releases/WebKitGTK/webkit-2.0/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp 2013-06-10 12:23:04 UTC (rev 151382)
+++ releases/WebKitGTK/webkit-2.0/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp 2013-06-10 12:30:38 UTC (rev 151383)
@@ -252,7 +252,8 @@
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
WebKitBackForwardListPrivate* priv = backForwardList->priv;
- return webkitBackForwardListCreateList(backForwardList, priv->backForwardItems->backListAsImmutableArrayWithLimit(limit).leakRef());
+ RefPtr<ImmutableArray> immutableArray = priv->backForwardItems->backListAsImmutableArrayWithLimit(limit);
+ return webkitBackForwardListCreateList(backForwardList, immutableArray.get());
}
/**
@@ -282,5 +283,6 @@
g_return_val_if_fail(WEBKIT_IS_BACK_FORWARD_LIST(backForwardList), 0);
WebKitBackForwardListPrivate* priv = backForwardList->priv;
- return webkitBackForwardListCreateList(backForwardList, priv->backForwardItems->forwardListAsImmutableArrayWithLimit(limit).leakRef());
+ RefPtr<ImmutableArray> immutableArray = priv->backForwardItems->forwardListAsImmutableArrayWithLimit(limit);
+ return webkitBackForwardListCreateList(backForwardList, immutableArray.get());
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes