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

Unified Diff: src/runtime.cc

Issue 1709001: Fix one off error. (Closed)
Patch Set: Rebaseling Created 10 years, 8 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.h ('k') | test/mjsunit/string-search.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 5e4312939703497ea1f64acb9b007b565df8443f..ab7701835032820360f01d86ece1e2bcf366b101 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -10101,8 +10101,10 @@ static Object* Runtime_GetFromCache(Arguments args) {
cache->set(JSFunctionResultCache::kCacheSizeIndex, Smi::FromInt(size + 2));
return CacheMiss(cache, size, key);
} else {
- int target_index = (finger_index < cache->length()) ?
- finger_index + 2 : JSFunctionResultCache::kEntriesIndex;
+ int target_index = finger_index + JSFunctionResultCache::kEntrySize;
+ if (target_index == cache->length()) {
+ target_index = JSFunctionResultCache::kEntriesIndex;
+ }
return CacheMiss(cache, target_index, key);
}
}
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/string-search.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698