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

Unified Diff: src/objects-inl.h

Issue 177383004: Use native context as key when evicting from optimized code map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed copy mechanism Created 6 years, 10 months 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 | « src/objects.cc ('k') | src/runtime.cc » ('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 2db83f2ba0225a4910bbb340d3b6bb436e7068a1..c7404dd07143a0278941ae0fe3d06dc8f9f8bcb8 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5427,9 +5427,9 @@ 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");
+ if (!is_optimized) {
+ shared()->EvictFromOptimizedCodeMap(context()->native_context(),
+ "Removing optimized code");
}
set_code(code);
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698