diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-30 08:35:35 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-30 08:35:35 -0700 |
commit | 6e84e087cc8b8af787e1af3d75c3c6c24737c697 (patch) | |
tree | 1ac32baaf297b3df5afb7f491cc4b8e2b1c5fe9c /WebKit | |
parent | 4c777b82538d0887d489cd98425a92efa5185f22 (diff) | |
parent | 6ec93df1269320cc37facebf7fa3e07a620ee185 (diff) | |
download | external_webkit-6e84e087cc8b8af787e1af3d75c3c6c24737c697.zip external_webkit-6e84e087cc8b8af787e1af3d75c3c6c24737c697.tar.gz external_webkit-6e84e087cc8b8af787e1af3d75c3c6c24737c697.tar.bz2 |
Merge change 9149
* changes:
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); |