Commit 534434e6 authored by yangguo@chromium.org's avatar yangguo@chromium.org

a small fix: DependentCode contains check against related dependency group

BUG=
R=ulan@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/23648009

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1c91d00b
...@@ -11432,8 +11432,9 @@ void DependentCode::RemoveCompilationInfo(DependentCode::DependencyGroup group, ...@@ -11432,8 +11432,9 @@ void DependentCode::RemoveCompilationInfo(DependentCode::DependencyGroup group,
bool DependentCode::Contains(DependencyGroup group, Code* code) { bool DependentCode::Contains(DependencyGroup group, Code* code) {
GroupStartIndexes starts(this); GroupStartIndexes starts(this);
int number_of_entries = starts.number_of_entries(); int start = starts.at(group);
for (int i = 0; i < number_of_entries; i++) { int end = starts.at(group + 1);
for (int i = start; i < end; i++) {
if (object_at(i) == code) return true; if (object_at(i) == code) return true;
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment