Profiler experiments: be more careful when accessing TypeFeedbackInfo

Review URL: https://chromiumcodereview.appspot.com/9471008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2012-02-27 08:08:14 +00:00
parent a19c50afb4
commit 2c29f4d575

View File

@ -315,10 +315,13 @@ void IC::PostPatching(Address address, Code* target, Code* old_target) {
if (delta != 0) {
Code* host = target->GetHeap()->isolate()->
inner_pointer_to_code_cache()->GetCacheEntry(address)->code;
TypeFeedbackInfo* info =
TypeFeedbackInfo::cast(host->type_feedback_info());
info->set_ic_with_typeinfo_count(
info->ic_with_typeinfo_count() + delta);
// Not all Code objects have TypeFeedbackInfo.
if (host->type_feedback_info()->IsTypeFeedbackInfo()) {
TypeFeedbackInfo* info =
TypeFeedbackInfo::cast(host->type_feedback_info());
info->set_ic_with_typeinfo_count(
info->ic_with_typeinfo_count() + delta);
}
}
}
}