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

Unified Diff: runtime/vm/isolate.cc

Issue 8497032: Fix crash when running with --report_invocation_count. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 1334)
+++ runtime/vm/isolate.cc (working copy)
@@ -173,7 +173,10 @@
while (iter.HasNext()) {
cls = iter.GetNextClass();
const Array& functions = Array::Handle(cls.functions());
- for (int j = 0; j < functions.Length(); j++) {
+ // Class 'Dynamic' is allocated/initialized in a special way, leaving
+ // the functions field NULL instead of empty.
+ int func_len = functions.IsNull() ? 0 : functions.Length();
regis 2011/11/09 01:51:08 const
srdjan 2011/11/09 16:25:06 Done.
+ for (int j = 0; j < func_len; j++) {
Function& function = Function::Handle();
function ^= functions.At(j);
if (function.invocation_counter() > 0) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698