Changeset 242012 in webkit


Ignore:
Timestamp:
Feb 24, 2019 2:37:38 PM (5 years ago)
Author:
Michael Catanzaro
Message:

[WPE] Install MemoryPressureHandler in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=194617

Reviewed by Žan Doberšek.

Currently only GTK and Cocoa ports run MemoryPressureHandler in the UI process. WPE should
too.

We need @no-unify to avoid changing the unified source bundles under API/, which are
notoriously fragile. (WebMemoryPressureHandler.cpp sorts just above API/.)

  • SourcesWPE.txt:
  • UIProcess/WebMemoryPressureHandler.cpp:

(WebKit::installMemoryPressureHandler):

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitialize):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r242010 r242012  
     12019-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [WPE] Install MemoryPressureHandler in UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=194617
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Currently only GTK and Cocoa ports run MemoryPressureHandler in the UI process. WPE should
     9        too.
     10
     11        We need @no-unify to avoid changing the unified source bundles under API/, which are
     12        notoriously fragile. (WebMemoryPressureHandler.cpp sorts just above API/.)
     13
     14        * SourcesWPE.txt:
     15        * UIProcess/WebMemoryPressureHandler.cpp:
     16        (WebKit::installMemoryPressureHandler):
     17        * UIProcess/glib/WebProcessPoolGLib.cpp:
     18        (WebKit::WebProcessPool::platformInitialize):
     19
    1202019-02-23  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebKit/SourcesWPE.txt

    r241790 r242012  
    103103UIProcess/LegacySessionStateCodingNone.cpp
    104104UIProcess/WebGrammarDetail.cpp
     105UIProcess/WebMemoryPressureHandler.cpp @no-unify
    105106UIProcess/WebViewportAttributes.cpp
    106107
  • trunk/Source/WebKit/UIProcess/WebMemoryPressureHandler.cpp

    r241224 r242012  
    2727#include "WebMemoryPressureHandler.h"
    2828
    29 #include "ViewSnapshotStore.h"
    3029#include "WebProcessPool.h"
    3130#include <wtf/MemoryPressureHandler.h>
     31
     32#if PLATFORM(COCOA) || PLATFORM(GTK)
     33#include "ViewSnapshotStore.h"
     34#endif
    3235
    3336namespace WebKit {
     
    3740    auto& memoryPressureHandler = MemoryPressureHandler::singleton();
    3841    memoryPressureHandler.setLowMemoryHandler([] (Critical critical, Synchronous) {
     42#if PLATFORM(COCOA) || PLATFORM(GTK)
    3943        ViewSnapshotStore::singleton().discardSnapshotImages();
     44#endif
    4045
    4146        for (auto* processPool : WebProcessPool::allProcessPools())
  • trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp

    r241816 r242012  
    7979#endif
    8080
    81 #if PLATFORM(GTK)
    82     // To enable this for WPE, we need WebMemoryPressureHandler to lose the
    83     // hard dependency on ViewSnapshotStore.
    8481    if (!memoryPressureMonitorDisabled())
    8582        installMemoryPressureHandler();
    86 #endif
    8783}
    8884
Note: See TracChangeset for help on using the changeset viewer.