aboutsummaryrefslogtreecommitdiff
path: root/src/library_gc.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-06-11 10:32:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-06-11 10:32:42 -0700
commit41a99b287182ea2870d51665c224ef6c315132ab (patch)
treeac0b8013875e82ab07ddbe58716a3f6098346b3b /src/library_gc.js
parent9d720befae4ae24ad49b1c814ab947dd090a0b32 (diff)
remove GENERATING_HTML, it was confusing and gave little or no benefit
Diffstat (limited to 'src/library_gc.js')
-rw-r--r--src/library_gc.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/library_gc.js b/src/library_gc.js
index ccf6656d..bf0a6aff 100644
--- a/src/library_gc.js
+++ b/src/library_gc.js
@@ -16,13 +16,15 @@ if (GC_SUPPORT) {
init: function() {
assert(!GC.initted);
GC.initted = true;
-#if GENERATING_HTML
- setInterval(function() {
- GC.maybeCollect();
- }, 1000);
-#else
- // No HTML intervals, so you need to call GC.maybeCollect() or GC.collect() manually
+ if (ENVIRONMENT_IS_WEB) {
+ setInterval(function() {
+ GC.maybeCollect();
+ }, 1000);
+ } else {
+#if ASSERTIONS
+ Module.print('No HTML intervals, so you need to call GC.maybeCollect() or GC.collect() manually');
#endif
+ }
},
malloc: function(bytes, clear, scannable) {