summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/gtk/webkit/webkitwebhistoryitem.cpp')
-rw-r--r--WebKit/gtk/webkit/webkitwebhistoryitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
index a75bc0d..aab8b51 100644
--- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
+++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
@@ -297,12 +297,11 @@ WebKitWebHistoryItem* webkit_web_history_item_new()
*/
WebKitWebHistoryItem* webkit_web_history_item_new_with_data(const gchar* uri, const gchar* title)
{
- WebCore::KURL historyUri(uri);
- WebCore::String historyTitle = WebCore::String::fromUTF8(title);
-
WebKitWebHistoryItem* webHistoryItem = WEBKIT_WEB_HISTORY_ITEM(g_object_new(WEBKIT_TYPE_WEB_HISTORY_ITEM, NULL));
WebKitWebHistoryItemPrivate* priv = webHistoryItem->priv;
+ WebCore::KURL historyUri(WebCore::KURL(), uri);
+ WebCore::String historyTitle = WebCore::String::fromUTF8(title);
RefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create(historyUri, historyTitle, 0);
priv->historyItem = item.release().releaseRef();
webkit_history_item_add(webHistoryItem, priv->historyItem);