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

Unified Diff: runtime/vm/object.cc

Issue 1413233004: nt # Enter a description of the change. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 2 months 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 | « runtime/vm/megamorphic_cache_table.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8a407c7c705257db424d9309e6eab066f0c04417..49f99fc8624d1acca4ede11ff8c87bf825bcc0b0 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5386,10 +5386,11 @@ void Function::SetInstructions(const Code& value) const {
}
void Function::AttachCode(const Code& value) const {
+ // Finish setting up code before activating it.
+ value.set_owner(*this);
SetInstructions(value);
ASSERT(Function::Handle(value.function()).IsNull() ||
- (value.function() == this->raw()));
- value.set_owner(*this);
+ (value.function() == this->raw()));
}
« no previous file with comments | « runtime/vm/megamorphic_cache_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698