summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-03-10 02:45:51 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-10 02:45:51 -0800
commit08a7cd3d0a715e83b2b51febab13f9ab62154cf2 (patch)
tree33b202c2e951fe58ab565363e01c6b79501149e4 /WebKit/android
parent95cb21b0cde2a64281360f9e45f31f049e583273 (diff)
parentad1a4f746e41f26b0b4c6f73dd9dc9f77f013ec6 (diff)
downloadexternal_webkit-08a7cd3d0a715e83b2b51febab13f9ab62154cf2.zip
external_webkit-08a7cd3d0a715e83b2b51febab13f9ab62154cf2.tar.gz
external_webkit-08a7cd3d0a715e83b2b51febab13f9ab62154cf2.tar.bz2
Merge "Android part of fix for bug 3491968 Browser frozen on dunkindonuts.com" into honeycomb-mr1
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp5
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.h2
-rw-r--r--WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index a14036f..a7321da 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -71,6 +71,7 @@ WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& web
, m_runnableFactory(this)
, m_wantToPause(false)
, m_isPaused(false)
+ , m_isSync(false)
{
GURL gurl(m_url);
@@ -96,6 +97,7 @@ WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& web
, m_runnableFactory(this)
, m_wantToPause(false)
, m_isPaused(false)
+ , m_isSync(false)
{
}
@@ -196,6 +198,9 @@ void WebRequest::updateLoadFlags(int& loadFlags)
loadFlags |= net::LOAD_BYPASS_CACHE;
if (m_cacheMode == 3) // LOAD_CACHE_ONLY
loadFlags |= net::LOAD_ONLY_FROM_CACHE;
+
+ if (m_isSync)
+ loadFlags |= net::LOAD_IGNORE_LIMITS;
}
void WebRequest::start()
diff --git a/WebKit/android/WebCoreSupport/WebRequest.h b/WebKit/android/WebCoreSupport/WebRequest.h
index dba7559..252267b 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.h
+++ b/WebKit/android/WebCoreSupport/WebRequest.h
@@ -88,6 +88,7 @@ public:
const std::string& getUrl() const;
const std::string& getUserAgent() const;
+ void setSync(bool sync) { m_isSync = sync; }
private:
void startReading();
bool read(int* bytesRead);
@@ -113,6 +114,7 @@ private:
ScopedRunnableMethodFactory<WebRequest> m_runnableFactory;
bool m_wantToPause;
bool m_isPaused;
+ bool m_isSync;
#ifdef LOG_REQUESTS
time_t m_startTime;
#endif
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
index 19f4f34..fcfb4ca 100644
--- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
+++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
@@ -175,6 +175,7 @@ bool WebUrlLoaderClient::start(bool isMainResource, bool isMainFrame, bool sync,
m_sync = sync;
if (m_sync) {
AutoLock autoLock(*syncLock());
+ m_request->setSync(sync);
m_request->setRequestContext(context);
thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(m_request.get(), &WebRequest::start));