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

Unified Diff: runtime/vm/parser.cc

Issue 1498933002: Delete patch classes once they are applied (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Now it works Created 5 years 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9619fe4d682274c483cece5142b121bca23daee2..e20ff435075b15f3315162a21f60b7f66545722c 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4644,13 +4644,12 @@ void Parser::ParseClassDeclaration(const GrowableObjectArray& pending_classes,
}
if (is_patch) {
+ cls.set_is_patch();
// Apply the changes to the patched class looked up above.
ASSERT(obj.raw() == library_.LookupLocalObject(class_name));
// The patched class must not be finalized yet.
- const Class& orig_class = Class::Cast(obj);
- ASSERT(!orig_class.is_finalized());
- orig_class.SetPatchClass(cls);
- cls.set_is_patch();
+ ASSERT(!Class::Cast(obj).is_finalized());
+ library_.AddPatchClass(cls);
}
pending_classes.Add(cls, Heap::kOld);
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698