Skip to content

Commit 6706256

Browse files
abstractmachinesmagomez
authored andcommitted
MemoryPressure: delete JIT code only on synchronous requests.
1 parent eb8da83 commit 6706256

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Source/WebCore/page/MemoryRelease.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,13 @@ static void releaseCriticalMemory(Synchronous synchronous, MaintainBackForwardCa
152152
pluginDocument->releaseMemory();
153153
}
154154

155-
if (synchronous == Synchronous::Yes)
156-
GCController::singleton().deleteAllCode(JSC::PreventCollectionAndDeleteAllCode);
157-
else
158-
GCController::singleton().deleteAllCode(JSC::DeleteAllCodeIfNotCollecting);
159-
160155
#if ENABLE(VIDEO)
161156
for (auto& mediaElement : HTMLMediaElement::allMediaElements())
162157
Ref { mediaElement.get() }->purgeBufferedDataIfPossible();
163158
#endif
164159

165160
if (synchronous == Synchronous::Yes) {
161+
GCController::singleton().deleteAllCode(JSC::PreventCollectionAndDeleteAllCode);
166162
GCController::singleton().garbageCollectNow();
167163
} else {
168164
#if PLATFORM(IOS_FAMILY)

0 commit comments

Comments
 (0)