Fix order of export/gc

We might gc a table away so if we need to export it be sure to do so
before we gc! Additionally remove an extraneous gc that snuck in at some
point, no need to do more than one.

Closes #1130
This commit is contained in:
Alex Crichton 2019-01-03 11:38:01 -08:00
parent bea4dfc0c2
commit b4f172899c

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");
}