summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authormnaganov <mnaganov@chromium.org>2016-01-28 16:56:57 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-29 00:58:02 +0000
commitd881bd2507c934240decdcbf2a5002716fe5b308 (patch)
tree37e0308f0a931e69a9dd21f4c234e11244d1f686 /android_webview
parent024f2aa0f1ec971346818bd37ca20b5d431d321c (diff)
downloadchromium_src-d881bd2507c934240decdcbf2a5002716fe5b308.zip
chromium_src-d881bd2507c934240decdcbf2a5002716fe5b308.tar.gz
chromium_src-d881bd2507c934240decdcbf2a5002716fe5b308.tar.bz2
[Android WebView] Do not terminate WebView when second browser is started
Still detect the situation when the app is creating WebView from two processes sharing the same data dir, but do not throw a RuntimeError, only print a warning. BUG=558377,582146 Review URL: https://codereview.chromium.org/1641383002 Cr-Commit-Position: refs/heads/master@{#372231}
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java5
-rw-r--r--android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java20
2 files changed, 16 insertions, 9 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index e7a6389..4b3f4c7 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -104,9 +104,8 @@ public abstract class AwBrowserProcess {
Log.w(TAG, "Failed to create lock file " + lockFile, e);
}
if (!success) {
- throw new RuntimeException(
- "Could not obtain an exclusive lock on the data dir. The app may have "
- + "another WebView opened in a separate process");
+ Log.w(TAG, "The app may have another WebView opened in a separate process. "
+ + "This is not recommended and may stop working in future versions.");
}
}
}
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
index 25f951f..dcf4e7c 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
@@ -13,10 +13,9 @@ import android.os.IBinder;
import android.os.Parcel;
import android.os.Process;
import android.os.RemoteException;
-import android.test.suitebuilder.annotation.LargeTest;
import org.chromium.android_webview.AwBrowserProcess;
-import org.chromium.base.test.util.Feature;
+import org.chromium.base.test.util.DisabledTest;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
@@ -42,15 +41,24 @@ public class AwSecondBrowserProcessTest extends AwTestBase {
super.tearDown();
}
- @LargeTest
- @Feature({"AndroidWebView"})
+ /*
+ * @LargeTest
+ * @Feature({"AndroidWebView"})
+ * See crbug.com/582146. We can't test that creating second browser
+ * process succeeds either, because in debug it will crash due to an assert
+ * in the SQL DB code.
+ */
+ @DisabledTest
public void testCreatingSecondBrowserProcessFails() throws Throwable {
startSecondBrowserProcess();
assertFalse(tryStartingBrowserProcess());
}
- @LargeTest
- @Feature({"AndroidWebView"})
+ /*
+ * @LargeTest
+ * @Feature({"AndroidWebView"})
+ */
+ @DisabledTest
public void testLockCleanupOnProcessShutdown() throws Throwable {
startSecondBrowserProcess();
assertFalse(tryStartingBrowserProcess());