| Index: runtime/vm/class_finalizer.cc
|
| diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
|
| index 1a256cd8da20a8af2a8b55b80ca91ba520bc9f94..9497eab2d2e9625a4a653be9878863461c2c4339 100644
|
| --- a/runtime/vm/class_finalizer.cc
|
| +++ b/runtime/vm/class_finalizer.cc
|
| @@ -2427,7 +2427,12 @@ void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
|
| // fields because type parameters are parsed before the class body. Since
|
| // 'ResolveAndFinalizeMemberTypes(cls)' has not been called yet, unfinalized
|
| // member types could choke the snapshotter.
|
| - ASSERT(Array::Handle(cls.functions()).Length() == 0);
|
| + // Or
|
| + // if the class is being refinalized because a patch is being applied
|
| + // after the class has been finalized then it is ok for the class to have
|
| + // functions.
|
| + ASSERT((Array::Handle(cls.functions()).Length() == 0) ||
|
| + cls.is_refinalize_after_patch());
|
| }
|
| }
|
|
|
|
|