diff options
author | Andrei Popescu <andreip@google.com> | 2009-07-30 14:15:29 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-07-30 14:15:29 +0100 |
commit | 6ec93df1269320cc37facebf7fa3e07a620ee185 (patch) | |
tree | fed61fc6682667cd67d6665ee98d157cf88a9926 /WebKit | |
parent | da03bd066d796453c369a98de10fe2cd09bc4280 (diff) | |
download | external_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.cpp | 5 |
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); |