diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp index 98f9c0217852a..f1f5679eb00fc 100644 --- a/Source/JavaScriptCore/runtime/VM.cpp +++ b/Source/JavaScriptCore/runtime/VM.cpp @@ -807,7 +807,7 @@ void VM::shrinkFootprintWhenIdle() { whenIdle([=, this] () { sanitizeStackForVM(*this); - deleteAllCode(PreventCollectionAndDeleteAllCode); + deleteAllCode(DeleteAllCodeIfNotCollecting); heap.collectNow(Synchronousness::Sync, CollectionScope::Full); // FIXME: Consider stopping various automatic threads here. // https://bugs.webkit.org/show_bug.cgi?id=185447 diff --git a/Source/WTF/wtf/MemoryPressureHandler.cpp b/Source/WTF/wtf/MemoryPressureHandler.cpp index 98804f3e82bbc..2e31fb5d39168 100644 --- a/Source/WTF/wtf/MemoryPressureHandler.cpp +++ b/Source/WTF/wtf/MemoryPressureHandler.cpp @@ -48,7 +48,7 @@ static const double s_conservativeThresholdFraction = 0.8; static const double s_strictThresholdFraction = 0.9; #endif static const std::optional s_killThresholdFraction; -static const Seconds s_pollInterval = 5_s; +static const Seconds s_pollInterval = 30_s; // This file contains the amount of video memory used, and will be filled by some other // platform component. It's a text file containing an unsigned integer value. diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp index 54652cf33b72e..6e491fb1b596c 100644 --- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp +++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp @@ -251,10 +251,6 @@ bool InjectedBundle::isProcessingUserGesture() void InjectedBundle::garbageCollectJavaScriptObjects() { GCController::singleton().garbageCollectNow(); - WTF::releaseFastMallocFreeMemory(); - - JSLockHolder lock(commonVM()); - commonVM().shrinkFootprintWhenIdle(); } void InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging(bool waitUntilDone)