Merge pull request #1145 from alexcrichton/less-gc

Fix order of export/gc
This commit is contained in:
Alex Crichton 2019-01-04 10:07:56 -06:00 committed by GitHub
commit 1758c8d5af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -457,6 +457,7 @@ impl<'a> Context<'a> {
}
}
self.export_table();
self.gc();
// Note that it's important `throw` comes last *after* we gc. The
@ -628,9 +629,6 @@ impl<'a> Context<'a> {
)
};
self.export_table();
self.gc();
while js.contains("\n\n\n") {
js = js.replace("\n\n\n", "\n\n");
}