Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Issue 284313005: Fixes a deadlock between shouldInterceptRequest() and getCookie() (Closed)

Created:
6 years, 7 months ago by hjd
Modified:
6 years, 7 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src
Visibility:
Public.

Description

Fixes a deadlock between shouldInterceptRequest() and getCookie() In the WebView shouldInterceptRequest is called on the IO thread. The CookieManager used to post cookie monster tasks to a thread which was sometimes the IO thread (if the WebView was started before the CookieManager) but sometimes a special thread (if the CookieManager was started before the WebView). getCookie is synchronous and blocks waiting for the result after posting its task so if getCookie was called from shouldInterceptRequest and the cookie monster was on the IO thread then it deadlocked. We fix this by always starting the special thread for the cookie monster. Android Issue: https://code.google.com/p/android/issues/detail?id=65786 BUG=374203 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271715

Patch Set 1 #

Total comments: 2

Patch Set 2 : Changed CookieManagerStartupTest comment. #

Total comments: 1

Patch Set 3 : rebase + fix url #

Patch Set 4 : fix startupTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -54 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java View 1 2 3 6 chunks +45 lines, -22 lines 0 comments Download
M android_webview/native/cookie_manager.cc View 1 2 4 chunks +4 lines, -32 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Torne
https://codereview.chromium.org/284313005/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java File android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java (right): https://codereview.chromium.org/284313005/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java#newcode93 android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java:93: public void testShouldInterceptRequestDeadlock() throws Throwable { Is there a ...
6 years, 7 months ago (2014-05-16 12:18:15 UTC) #1
hjd
ptal https://codereview.chromium.org/284313005/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java File android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java (right): https://codereview.chromium.org/284313005/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java#newcode93 android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java:93: public void testShouldInterceptRequestDeadlock() throws Throwable { On 2014/05/16 ...
6 years, 7 months ago (2014-05-16 15:03:24 UTC) #2
hjd
On 2014/05/16 15:03:24, hjd wrote: > ptal > > https://codereview.chromium.org/284313005/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java > File > android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java > ...
6 years, 7 months ago (2014-05-20 12:52:40 UTC) #3
Torne
lgtm
6 years, 7 months ago (2014-05-20 14:22:27 UTC) #4
hjd
The CQ bit was checked by hjd@chromium.org
6 years, 7 months ago (2014-05-20 14:24:02 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hjd@chromium.org/284313005/20001
6 years, 7 months ago (2014-05-20 14:24:29 UTC) #6
mkosiba (inactive)
lgtm https://codereview.chromium.org/284313005/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java File android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java (right): https://codereview.chromium.org/284313005/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java#newcode90 android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java:90: // https://code.google.com/p/android/issues/detail?id=65786 now that you've filed the crbug ...
6 years, 7 months ago (2014-05-20 14:42:28 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-20 14:57:19 UTC) #8
hjd
The CQ bit was unchecked by hjd@chromium.org
6 years, 7 months ago (2014-05-20 14:58:18 UTC) #9
hjd
The CQ bit was checked by hjd@chromium.org
6 years, 7 months ago (2014-05-20 15:09:39 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hjd@chromium.org/284313005/60001
6 years, 7 months ago (2014-05-20 15:10:01 UTC) #11
commit-bot: I haz the power
6 years, 7 months ago (2014-05-20 18:22:16 UTC) #12
Message was sent while issue was closed.
Change committed as 271715

Powered by Google App Engine
This is Rietveld 408576698