New issue
Advanced search Search tips

Issue 651215 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

WebView overrides logging done by other apps

Project Member Reported by ntfschr@chromium.org, Sep 28 2016

Issue description

This was raised internally as b/31260765.

WebView currently disables logging that has been enabled by other apps via Looper.setMessageLogging() (see https://developer.android.com/reference/android/os/Looper.html).

WebView should disable logging only if it enabled it originally.
 
Components: Mobile>WebView
Owner: ntfschr@chromium.org

Comment 2 by boliu@chromium.org, Sep 28 2016

it's used by chrome for tracing I think (?), either way, webview can certainly enable it, but should restore the original value when done

but as with all global resources that can be modified by both app and webview, this can't ever work perfectly
Yeah, I think that's correct, it's a chrome thing that WebView also takes advantage of.

I originally wanted to restore the old value, since that's probably the best fix, but Looper has no public accessor for that value. The best alternative is probably to just avoid setting things to null unless Chrome logging was previously enabled.

This is buggy in the case where an app is logging things *and* WebView is logging things, but that seems like a rare case, and I'm not sure how to solve it properly without modifying the Looper API.

Comment 4 by sgu...@chromium.org, Sep 29 2016

I know it is super ugly, and it is sth we stay away, but it is a private field after all :)

Try to solve it without using it though.
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c54bb9b87180c4eb1fea08afae89848111ea3ad

commit 0c54bb9b87180c4eb1fea08afae89848111ea3ad
Author: ntfschr <ntfschr@chromium.org>
Date: Fri Sep 30 02:45:40 2016

Fix Chromium tracing to not override app logging

Modify TraceEvent to only override tracing when it has been previously set by
Chromium, not for when other apps have set it.

BUG= 651215 

Review-Url: https://codereview.chromium.org/2380563003
Cr-Commit-Position: refs/heads/master@{#422016}

[modify] https://crrev.com/0c54bb9b87180c4eb1fea08afae89848111ea3ad/base/android/java/src/org/chromium/base/TraceEvent.java

Status: Fixed (was: Untriaged)
Status: Verified (was: Fixed)
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point.

Sign in to add a comment