Consider adding StrictMode checks to WebView shell |
|||||
Issue descriptionWe've added an instrumentation test for checking Strictmode violations on WebView startup in https://codereview.chromium.org/2337983004 Since the instrumentation doesn't use the real WebView loading code-path that test might miss some violations. To catch StrictMode violations during development and in certain WebView tests we could turn on Strictmode violations in our WebView Shell (the instrumentation test will still be useful since it is being run on the CQ).
,
Jun 15 2017
I haven't looked at this since I filed it, putting it in the list of available WebView bugs.
,
Jun 15 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 15 2018
This sounds easy.
I see in the test, though, it does:
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
Doesn't that mean *no* thread can do I/O? We definitely do I/O in the background on startup. I guess we just want the ThreadPolicy part?
Also, in https://codereview.chromium.org/2337983004/patch/80001/90004, there should probably be a try/finally.
,
Jun 15 2018
VmPolicy controls a bunch of *other* things, distinct to the set in ThreadPolicy: leaked global resources, discouraged uses of reflection, etc. We probably do want all of those turned on; it's not "the same things but applied to all threads".
,
Jun 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56a6262f1826f71e8426642a498bc0bca92cebbb commit 56a6262f1826f71e8426642a498bc0bca92cebbb Author: Paul Miller <paulmiller@google.com> Date: Mon Jun 18 19:48:39 2018 Enable StrictMode in WebView shell BUG= 655167 Change-Id: I2b18f52fae92993f1e37852924d8cbaf19872eaf Reviewed-on: https://chromium-review.googlesource.com/1103395 Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Paul Miller <paulmiller@chromium.org> Cr-Commit-Position: refs/heads/master@{#568115} [modify] https://crrev.com/56a6262f1826f71e8426642a498bc0bca92cebbb/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/WebViewBrowserActivity.java
,
Jun 18 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by gsennton@chromium.org
, Dec 16 2016