New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767051 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Add tracing to StrictModeContext

Project Member Reported by estevenson@chromium.org, Sep 20 2017

Issue description

StrictModeContext was added in https://chromium-review.googlesource.com/671550, we should add an option for a TraceEvent to be added, likely through another constructor with a string parameter for the TraceEvent name. 
 
Status: WontFix (was: Assigned)
I think this might actually not be worth doing. I could find only two xamples of where we trace strictmode whitelisted sections:
https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java?rcl=95bc77cdc8ab3f3393633ed5d0dd37c716232c5e&l=115
https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java?rcl=95bc77cdc8ab3f3393633ed5d0dd37c716232c5e&l=348

And since tracing also implements try-with-resources, it's simple enough to do:

try (StrictModeContext unused1 = StrictModeContext.allowDiskWrites();
     TraceEvent unused2 = TraceEvent.scoped(EVENT_NAME)) {
...
}

Sign in to add a comment