| Index: runtime/vm/stub_code.cc
|
| ===================================================================
|
| --- runtime/vm/stub_code.cc (revision 23087)
|
| +++ runtime/vm/stub_code.cc (working copy)
|
| @@ -96,7 +96,10 @@
|
|
|
|
|
| RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
|
| - Code& stub = Code::Handle(cls.allocation_stub());
|
| + Isolate* isolate = Isolate::Current();
|
| + const Error& error = Error::Handle(isolate, cls.EnsureIsFinalized(isolate));
|
| + ASSERT(error.IsNull());
|
| + Code& stub = Code::Handle(isolate, cls.allocation_stub());
|
| if (stub.IsNull()) {
|
| Assembler assembler;
|
| const char* name = cls.ToCString();
|
|
|