summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-06-12 01:09:45 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-12 01:09:45 +0100
commit1d7514d51e323be193ac8846da5c25ec3a53ce14 (patch)
tree9c547134e8dfa95894978fdd9d79e9e900522b4c /Userland/Libraries
parent592bc1e3313c1fab534eb4c7fc855f2a7a7b60ed (diff)
downloadserenity-1d7514d51e323be193ac8846da5c25ec3a53ce14.zip
LibJS: Hide gc() dbgln() behind #ifdef __serenity__
This spams to stdout when using Lagom, and is therefore included in test-js output. Don't need that.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
index b1c440af9e..6a7bd4ff7a 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
@@ -193,7 +193,9 @@ void GlobalObject::visit_edges(Visitor& visitor)
JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc)
{
+#ifdef __serenity__
dbgln("Forced garbage collection requested!");
+#endif
vm.heap().collect_garbage();
return js_undefined();
}