Chromium Code Reviews| 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) { |