| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index d50432eb253f1b52150af9906821f7c198b8eca7..c03beb94f0ed999618394aefaab43fbe3cc7ab45 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -13517,10 +13517,9 @@ bool Code::IsFunctionCode() const {
|
| void Code::DisableDartCode() const {
|
| DEBUG_ASSERT(IsMutatorOrAtSafepoint());
|
| ASSERT(IsFunctionCode());
|
| - ASSERT(!IsDisabled());
|
| + ASSERT(instructions() == active_instructions());
|
| const Code& new_code =
|
| Code::Handle(StubCode::FixCallersTarget_entry()->code());
|
| - ASSERT(new_code.instructions()->IsVMHeapObject());
|
| SetActiveInstructions(new_code.instructions());
|
| }
|
|
|
| @@ -13528,10 +13527,9 @@ void Code::DisableDartCode() const {
|
| void Code::DisableStubCode() const {
|
| ASSERT(Thread::Current()->IsMutatorThread());
|
| ASSERT(IsAllocationStubCode());
|
| - ASSERT(!IsDisabled());
|
| + ASSERT(instructions() == active_instructions());
|
| const Code& new_code =
|
| Code::Handle(StubCode::FixAllocationStubTarget_entry()->code());
|
| - ASSERT(new_code.instructions()->IsVMHeapObject());
|
| SetActiveInstructions(new_code.instructions());
|
| }
|
|
|
| @@ -13540,6 +13538,7 @@ void Code::SetActiveInstructions(RawInstructions* instructions) const {
|
| DEBUG_ASSERT(IsMutatorOrAtSafepoint() || !is_alive());
|
| // RawInstructions are never allocated in New space and hence a
|
| // store buffer update is not needed here.
|
| + StorePointer(&raw_ptr()->active_instructions_, instructions);
|
| StoreNonPointer(&raw_ptr()->entry_point_,
|
| reinterpret_cast<uword>(instructions->ptr()) +
|
| Instructions::HeaderSize());
|
|
|