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

Issue 2465203003: [Android WebView] Keep a reference to the exclusive data dir lock file. (Closed)

Created:
4 years, 1 month ago by gsennton
Modified:
4 years, 1 month ago
Reviewers:
Torne
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android WebView] Keep a reference to the exclusive data dir lock file. RandomAccessFile has a CloseGuard which causes a StrictMode violation during RandomAccessFile.finalize(), i.e. when a RandomAccessFile is garbage collected. We sometimes hit this StrictMode violation, meaning that we sometimes close the corresponding file and its file lock (because the finalizer also closes the actual file). Instead of throwing away the reference to the data dir lock file, store it until process termination to ensure we never unlock the file lock (and to ensure we don't hit the StrictMode violation). BUG=647291 Committed: https://crrev.com/7c1c15a67b2a3523ff4380cd7845a96331438326 Cr-Commit-Position: refs/heads/master@{#428994}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java View 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
gsennton
Tried calling System.gc() 15 times with Thread.sleep(500) after each call from AwStrictModeTest#testLoadEmptyData - that didn't ...
4 years, 1 month ago (2016-11-01 12:12:57 UTC) #2
Torne
lgtm
4 years, 1 month ago (2016-11-01 13:48:03 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2465203003/1
4 years, 1 month ago (2016-11-01 13:52:27 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-01 14:12:46 UTC) #6
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 14:15:12 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/7c1c15a67b2a3523ff4380cd7845a96331438326
Cr-Commit-Position: refs/heads/master@{#428994}

Powered by Google App Engine
This is Rietveld 408576698