summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-07-30 14:15:29 +0100
committerAndrei Popescu <andreip@google.com>2009-07-30 14:15:29 +0100
commit6ec93df1269320cc37facebf7fa3e07a620ee185 (patch)
treefed61fc6682667cd67d6665ee98d157cf88a9926 /WebKit
parentda03bd066d796453c369a98de10fe2cd09bc4280 (diff)
downloadexternal_webkit-6ec93df1269320cc37facebf7fa3e07a620ee185.zip
external_webkit-6ec93df1269320cc37facebf7fa3e07a620ee185.tar.gz
external_webkit-6ec93df1269320cc37facebf7fa3e07a620ee185.tar.bz2
Fix a bug in the ChromeClientAndroid where the m_newQuota was set to -1 after the call to the browser thread was made.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index ac70939..4f38ce8 100644
--- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -308,13 +308,16 @@ void ChromeClientAndroid::exceededDatabaseQuota(Frame* frame, const String& name
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
void ChromeClientAndroid::reachedMaxAppCacheSize(int64_t spaceNeeded)
{
+ // Set m_newQuota before calling into the Java side. If we do this after,
+ // we could overwrite the result passed from the Java side and deadlock in the
+ // wait call below.
+ m_newQuota = -1;
Page* page = m_webFrame->page();
Frame* mainFrame = page->mainFrame();
FrameView* view = mainFrame->view();
android::WebViewCore::getWebViewCore(view)->reachedMaxAppCacheSize(spaceNeeded);
// We've sent notification to the browser so now wait for it to come back.
- m_newQuota = -1;
m_quotaThreadLock.lock();
while (m_newQuota == -1) {
m_quotaThreadCondition.wait(m_quotaThreadLock);