Revision: 17747
Author: [email protected]
Date: Thu Nov 14 14:14:11 2013 UTC
Log: Fix duplicate check in DependentCode::Insert.
[email protected]
BUG=318454
Review URL: https://codereview.chromium.org/71653008
http://code.google.com/p/v8/source/detail?r=17747
Modified:
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/objects.cc Thu Nov 14 12:05:09 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc Thu Nov 14 14:14:11 2013 UTC
@@ -11648,11 +11648,9 @@
int start = starts.at(group);
int end = starts.at(group + 1);
int number_of_entries = starts.number_of_entries();
- if (start < end && entries->object_at(end - 1) == *object) {
- // Do not append the compilation info if it is already in the array.
- // It is sufficient to just check only the last element because
- // we process embedded maps of an optimized code in one batch.
- return entries;
+ // Check for existing entry to avoid duplicates.
+ for (int i = start; i < end; i++) {
+ if (entries->object_at(i) == *object) return entries;
}
if (entries->length() < kCodesStartIndex + number_of_entries + 1) {
Factory* factory = entries->GetIsolate()->factory();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.