summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-02 14:57:50 +0000
committerSteve Block <steveblock@google.com>2010-02-04 15:06:55 +0000
commitd0825bca7fe65beaee391d30da42e937db621564 (patch)
tree7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
parent3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff)
downloadexternal_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz
external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp')
-rw-r--r--WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
index 0efc9fa..2b355cb 100644
--- a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "DocumentLoaderGtk.h"
+#include "webkitprivate.h"
#include "webkitwebdatasource.h"
using namespace WebCore;
@@ -60,7 +61,16 @@ void DocumentLoader::attachToFrame()
{
WebCore::DocumentLoader::attachToFrame();
- refDataSource();
+ if (m_dataSource) {
+ refDataSource();
+ return;
+ }
+
+ // We may get to here without having a datasource, when the data
+ // is coming from the page cache.
+ WebKitWebDataSource* dataSource = webkit_web_data_source_new_with_loader(this);
+ setDataSource(dataSource);
+ g_object_unref(dataSource);
}
void DocumentLoader::detachFromFrame()
@@ -110,6 +120,7 @@ void DocumentLoader::unrefDataSource()
ASSERT(m_dataSource);
m_isDataSourceReffed = false;
g_object_unref(m_dataSource);
+ m_dataSource = 0;
}
} // end namespace WebKit