From ad1a4f746e41f26b0b4c6f73dd9dc9f77f013ec6 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Mon, 7 Mar 2011 16:00:00 +0000 Subject: Android part of fix for bug 3491968 Browser frozen on dunkindonuts.com Setting the new ignore limits flag when doing a sync load. Depends on a chromium change: https://android-git.corp.google.com/g/#change,100399 Change-Id: I5634c5ac6a158e39a31b04e51ccb74bd21430a0b --- WebKit/android/WebCoreSupport/WebRequest.cpp | 5 +++++ WebKit/android/WebCoreSupport/WebRequest.h | 2 ++ WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp | 1 + 3 files changed, 8 insertions(+) (limited to 'WebKit/android') 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 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)); -- cgit v1.1