Commit 4d0815dc authored by Egor Pasko's avatar Egor Pasko Committed by Commit Bot

[doc]: correct comment about discarding V8 code cache

The comment was describing an aspect of lesser importance. The most
important part is that the cache gets cleared by the caller as soon as
it finds that CachedMetadataHandler returns nullptr from
GetCachedMetadata().

Bug: None
Change-Id: I465b9605f3845ae8bab2870d516bdc93c770d6d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2329536Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793545}
parent 3349ec21
...@@ -33,8 +33,8 @@ void ScriptCachedMetadataHandler::SetCachedMetadata(uint32_t data_type_id, ...@@ -33,8 +33,8 @@ void ScriptCachedMetadataHandler::SetCachedMetadata(uint32_t data_type_id,
size_t size) { size_t size) {
DCHECK(!cached_metadata_); DCHECK(!cached_metadata_);
// Having been discarded once, the further attempts to overwrite the // Having been discarded once, the further attempts to overwrite the
// CachedMetadata are ignored. This behavior is slightly easier to simulate in // CachedMetadata are ignored. This behavior is necessary to avoid clearing
// tests. Should happen rarely enough not to affect performance. The // the disk-based cache every time GetCachedMetadata() returns nullptr. The
// JSModuleScript behaves similarly by preventing the creation of the code // JSModuleScript behaves similarly by preventing the creation of the code
// cache. // cache.
if (cached_metadata_discarded_) if (cached_metadata_discarded_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment