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

Unified Diff: src/objects-inl.h

Issue 109033003: Fix a race between concurrent recompilation and OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress-330046.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index d488fc05e87c7c7902494e1f9646be9d65cd00cb..9c65e1e99998a9f02c7e8543c9f007d19901c63a 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5112,6 +5112,11 @@ void JSFunction::ReplaceCode(Code* code) {
bool was_optimized = IsOptimized();
bool is_optimized = code->kind() == Code::OPTIMIZED_FUNCTION;
+ if (was_optimized && is_optimized) {
+ shared()->EvictFromOptimizedCodeMap(
+ this->code(), "Replacing with another optimized code");
+ }
+
set_code(code);
// Add/remove the function from the list of optimized functions for this
« no previous file with comments | « no previous file | test/mjsunit/regress-330046.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698