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

Issue 28933003: Delete PNaCl translation cache backend object when no longer needed (Closed)

Created:
7 years, 2 months ago by Derek Schuff
Modified:
7 years, 1 month ago
CC:
chromium-reviews, native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Delete PNaCl translation cache backend object when no longer needed Deleting a disk cache backend causes it to post tasks to its cache thread to sync the files, and block the IO thread waiting for completion. Because PnaclHost is a singleton, it is not destroyed until the browser threads have gone away, which results in hangs on shutdown. Previously the cache backend was deleted on renderer closing if it was unneeded, which worked when there was actual use of PNaCl, but did not work when it was a cache clear request that caused the backend to be initialized. This CL makes PnaclHost also try to free the backend when entries are doomed, and when a nexe finishes storing. R=jvoung@chromium.org BUG=270948 TEST=unit_tests PnaclHostTest.*, PnaclTranslationCacheTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=231128

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : dont free with pending operations #

Patch Set 6 : cleanup #

Total comments: 6

Patch Set 7 : add dcheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -49 lines) Patch
M chrome/browser/nacl_host/pnacl_host.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/nacl_host/pnacl_host.cc View 1 2 3 4 5 6 10 chunks +64 lines, -14 lines 0 comments Download
M chrome/browser/nacl_host/pnacl_host_unittest.cc View 1 2 3 4 5 5 chunks +26 lines, -4 lines 0 comments Download
M chrome/browser/nacl_host/pnacl_translation_cache.h View 1 2 3 4 1 chunk +6 lines, -8 lines 0 comments Download
M chrome/browser/nacl_host/pnacl_translation_cache.cc View 1 2 3 4 5 9 chunks +31 lines, -19 lines 0 comments Download
M chrome/browser/nacl_host/pnacl_translation_cache_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Derek Schuff
7 years, 1 month ago (2013-10-24 17:50:21 UTC) #1
jvoung (off chromium)
What's the cost of ReInit'ing the cache? https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc File chrome/browser/nacl_host/pnacl_host.cc (right): https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc#newcode37 chrome/browser/nacl_host/pnacl_host.cc:37: pnacl::PnaclTranslationCache* cache ...
7 years, 1 month ago (2013-10-24 21:14:57 UTC) #2
Derek Schuff
https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc File chrome/browser/nacl_host/pnacl_host.cc (right): https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc#newcode37 chrome/browser/nacl_host/pnacl_host.cc:37: pnacl::PnaclTranslationCache* cache = disk_cache_.release(); On 2013/10/24 21:14:58, jvoung (cr) ...
7 years, 1 month ago (2013-10-25 19:38:06 UTC) #3
jvoung (off chromium)
lgtm https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc File chrome/browser/nacl_host/pnacl_host.cc (right): https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc#newcode625 chrome/browser/nacl_host/pnacl_host.cc:625: if (pending_translations_.empty() && pending_backend_operations_ <= 0) { On ...
7 years, 1 month ago (2013-10-25 19:51:43 UTC) #4
Derek Schuff
https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc File chrome/browser/nacl_host/pnacl_host.cc (right): https://codereview.chromium.org/28933003/diff/400001/chrome/browser/nacl_host/pnacl_host.cc#newcode625 chrome/browser/nacl_host/pnacl_host.cc:625: if (pending_translations_.empty() && pending_backend_operations_ <= 0) { On 2013/10/25 ...
7 years, 1 month ago (2013-10-25 19:57:08 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dschuff@chromium.org/28933003/520001
7 years, 1 month ago (2013-10-25 20:00:16 UTC) #6
commit-bot: I haz the power
7 years, 1 month ago (2013-10-25 22:07:36 UTC) #7
Message was sent while issue was closed.
Change committed as 231128

Powered by Google App Engine
This is Rietveld 408576698