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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1276753002: 1. Fix the type arguments recursion problem that gets introduced when canonicalization of type argu… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review Created 5 years, 4 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 | « no previous file | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 038bfc85e64e7425fde0e191965309f23fc756ca..3ccb68b0504afae84d5d5113035bd7d482f0982d 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1568,6 +1568,11 @@ static Dart_Handle createLibrarySnapshot(Dart_Handle library,
} else {
lib ^= Api::UnwrapHandle(library);
}
+ isolate->heap()->CollectAllGarbage();
+#if defined(DEBUG)
+ FunctionVisitor check_canonical(isolate);
+ isolate->heap()->IterateObjects(&check_canonical);
+#endif // #if defined(DEBUG).
ScriptSnapshotWriter writer(buffer, ApiReallocate);
writer.WriteScriptSnapshot(lib);
*size = writer.BytesWritten();
« no previous file with comments | « no previous file | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698