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

Issue 3472006: Prevent modification of cached normalized maps.... (Closed)

Created:
10 years, 3 months ago by Vladislav Kaznacheev
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Prevent modification of cached normalized maps. Finally sovles the problem that r5342 attempted to solve. When adding a stub to a map's code cache we need to make sure that this map is not used by object that do not need this stub. Existing solution had 2 flaws: 1. It checked that the map is cached by asking the current context. If the object escaped into another context then NormalizedMapCache::Contains returns false negative. 2. If a map gets evicted from the cache we should not try to modify it even though Contains returns false. This patch implements much less fragile solution of the same problem: A map now has a flag (is_shared) that is set once the map is added to a cache, stays set even after the cache eviction, and is cleared if the object goes back to fast mode. Added a regression test. Committed: http://code.google.com/p/v8/source/detail?r=5518

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 6

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -61 lines) Patch
M src/objects.h View 1 2 3 6 chunks +19 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 3 5 chunks +32 lines, -53 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M src/objects-inl.h View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vladislav Kaznacheev
10 years, 3 months ago (2010-09-23 16:00:49 UTC) #1
Vladislav Kaznacheev
10 years, 3 months ago (2010-09-23 16:07:40 UTC) #2
Vyacheslav Egorov (Chromium)
LGTM! http://codereview.chromium.org/3472006/diff/9001/8008 File src/objects.cc (right): http://codereview.chromium.org/3472006/diff/9001/8008#newcode2177 src/objects.cc:2177: // cleared if the object goes back to ...
10 years, 3 months ago (2010-09-23 17:17:51 UTC) #3
Vladislav Kaznacheev
Thanks for the comments. Please review for naming clarity. http://codereview.chromium.org/3472006/diff/9001/8008 File src/objects.cc (right): http://codereview.chromium.org/3472006/diff/9001/8008#newcode2177 src/objects.cc:2177: ...
10 years, 3 months ago (2010-09-23 19:45:09 UTC) #4
Vyacheslav Egorov (Chromium)
10 years, 3 months ago (2010-09-23 21:06:06 UTC) #5
Still LGTM with a linter error in test-api.cc fixed [some stray whitespaces]

Powered by Google App Engine
This is Rietveld 408576698