VM::shrinkFootprint should call collectNow(Sync) instead of collectSync so it also...
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 05:21:22 +0000 (05:21 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 05:21:22 +0000 (05:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185707

Reviewed by Mark Lam.

* runtime/VM.cpp:
(JSC::VM::shrinkFootprint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231888 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/VM.cpp

index 55a12ad..bd4c31e 100644 (file)
@@ -1,3 +1,13 @@
+2018-05-16  Saam Barati  <sbarati@apple.com>
+
+        VM::shrinkFootprint should call collectNow(Sync) instead of collectSync so it also eagerly sweeps
+        https://bugs.webkit.org/show_bug.cgi?id=185707
+
+        Reviewed by Mark Lam.
+
+        * runtime/VM.cpp:
+        (JSC::VM::shrinkFootprint):
+
 2018-05-16  Caio Lima  <ticaiolima@gmail.com>
 
         [ESNext][BigInt] Implement support for "/" operation
index 8c90631..d69b1e1 100644 (file)
@@ -778,7 +778,7 @@ void VM::shrinkFootprint()
 {
     sanitizeStackForVM(this);
     deleteAllCode(DeleteAllCodeIfNotCollecting);
-    heap.collectSync();
+    heap.collectNow(Synchronousness::Sync);
     WTF::releaseFastMallocFreeMemory();
     // FIXME: Consider stopping various automatic threads here.
     // https://bugs.webkit.org/show_bug.cgi?id=185447