summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/WebCoreSupport')
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp2
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp24
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.h3
-rw-r--r--WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp2
4 files changed, 28 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index fb5701a..980c03e 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -87,8 +87,6 @@ void ChromeClientAndroid::attachRootGraphicsLayer(WebCore::Frame*, WebCore::Grap
{
// frame is not used in Android as we should only get root graphics layer for the main frame
m_rootGraphicsLayer = layer;
- if (!layer)
- return;
scheduleCompositingLayerSync();
}
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index fd6bbe2..a14036f 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -116,10 +116,28 @@ const std::string& WebRequest::getUserAgent() const
return m_userAgent;
}
+#ifdef LOG_REQUESTS
+namespace {
+int remaining = 0;
+}
+#endif
+
void WebRequest::finish(bool success)
{
m_runnableFactory.RevokeAll();
- ASSERT(m_loadState < Finished, "called finish on an already finished WebRequest (%d)", m_loadState);
+ ASSERT(m_loadState < Finished, "(%p) called finish on an already finished WebRequest (%d) (%s)", this, m_loadState, m_url.c_str());
+ if (m_loadState >= Finished)
+ return;
+#ifdef LOG_REQUESTS
+ time_t finish;
+ time(&finish);
+ finish = finish - m_startTime;
+ struct tm * timeinfo;
+ char buffer[80];
+ timeinfo = localtime(&finish);
+ strftime(buffer, 80, "Time: %M:%S",timeinfo);
+ android_printLog(ANDROID_LOG_DEBUG, "KM", "(%p) finish (%d) (%s) (%d) (%s)", this, --remaining, buffer, success, m_url.c_str());
+#endif
// Make sure WebUrlLoaderClient doesn't delete us in the middle of this method.
scoped_refptr<WebRequest> guard(this);
@@ -183,6 +201,10 @@ void WebRequest::updateLoadFlags(int& loadFlags)
void WebRequest::start()
{
ASSERT(m_loadState == Created, "Start called on a WebRequest not in CREATED state: (%s)", m_url.c_str());
+#ifdef LOG_REQUESTS
+ android_printLog(ANDROID_LOG_DEBUG, "KM", "(%p) start (%d) (%s)", this, ++remaining, m_url.c_str());
+ time(&m_startTime);
+#endif
m_loadState = Started;
diff --git a/WebKit/android/WebCoreSupport/WebRequest.h b/WebKit/android/WebCoreSupport/WebRequest.h
index ae386fd..dba7559 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.h
+++ b/WebKit/android/WebCoreSupport/WebRequest.h
@@ -113,6 +113,9 @@ private:
ScopedRunnableMethodFactory<WebRequest> m_runnableFactory;
bool m_wantToPause;
bool m_isPaused;
+#ifdef LOG_REQUESTS
+ time_t m_startTime;
+#endif
};
} // namespace android
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
index 636f7be..642a81a 100644
--- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
+++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
@@ -87,6 +87,8 @@ bool WebUrlLoaderClient::isActive() const
{
if (m_cancelling)
return false;
+ if (!m_resourceHandle)
+ return false;
if (!m_resourceHandle->client())
return false;
if (m_finished)