Revision: 10835
Author:   [email protected]
Date:     Mon Feb 27 00:08:14 2012
Log: Profiler experiments: be more careful when accessing TypeFeedbackInfo

Review URL: https://chromiumcodereview.appspot.com/9471008
http://code.google.com/p/v8/source/detail?r=10835

Modified:
 /branches/bleeding_edge/src/ic.cc

=======================================
--- /branches/bleeding_edge/src/ic.cc   Thu Feb 23 03:43:07 2012
+++ /branches/bleeding_edge/src/ic.cc   Mon Feb 27 00:08:14 2012
@@ -315,10 +315,13 @@
       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);
+        }
       }
     }
   }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to