WebKit Bugzilla
Attachment 361948 Details for
Bug 194617
: [WPE] Install MemoryPressureHandler in UIProcess
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194617-20190213173943.patch (text/plain), 3.45 KB, created by
Michael Catanzaro
on 2019-02-13 15:39:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2019-02-13 15:39:44 PST
Size:
3.45 KB
patch
obsolete
>Subversion Revision: 241474 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 0dc98140a786115c7784619f3a5d321de5e3a6e3..28fd15773a63c52e6b0a34890abde34890f7b03b 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2019-02-13 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE] Install MemoryPressureHandler in UIProcess >+ https://bugs.webkit.org/show_bug.cgi?id=194617 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2019-02-13 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE][GTK] Merge WebProcessPoolWPE.cpp and WebProcessPoolGtk.cpp >diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt >index 765c69d519df2998b2851beb607f3c5931885930..80b5b46c4e00b2e62fcce23bb94e26ec73de893a 100644 >--- a/Source/WebKit/SourcesWPE.txt >+++ b/Source/WebKit/SourcesWPE.txt >@@ -102,6 +102,7 @@ UIProcess/AcceleratedDrawingAreaProxy.cpp > UIProcess/DefaultUndoController.cpp > UIProcess/LegacySessionStateCodingNone.cpp > UIProcess/WebGrammarDetail.cpp >+UIProcess/WebMemoryPressureHandler.cpp @no-unify > UIProcess/WebViewportAttributes.cpp > > UIProcess/API/C/WKGrammarDetail.cpp >diff --git a/Source/WebKit/UIProcess/WebMemoryPressureHandler.cpp b/Source/WebKit/UIProcess/WebMemoryPressureHandler.cpp >index 70677735545ade8b274b875792f5b18752ffa3d0..e5cc6eeab75aae9bfc295bf518331e436442eb90 100644 >--- a/Source/WebKit/UIProcess/WebMemoryPressureHandler.cpp >+++ b/Source/WebKit/UIProcess/WebMemoryPressureHandler.cpp >@@ -26,17 +26,22 @@ > #include "config.h" > #include "WebMemoryPressureHandler.h" > >-#include "ViewSnapshotStore.h" > #include "WebProcessPool.h" > #include <wtf/MemoryPressureHandler.h> > >+#if PLATFORM(COCOA) || PLATFORM(GTK) >+#include "ViewSnapshotStore.h" >+#endif >+ > namespace WebKit { > > void installMemoryPressureHandler() > { > auto& memoryPressureHandler = MemoryPressureHandler::singleton(); > memoryPressureHandler.setLowMemoryHandler([] (Critical critical, Synchronous) { >+#if PLATFORM(COCOA) || PLATFORM(GTK) > ViewSnapshotStore::singleton().discardSnapshotImages(); >+#endif > > for (auto* processPool : WebProcessPool::allProcessPools()) > processPool->handleMemoryPressureWarning(critical); >diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >index a2a160be6864abddd46d78994bae00c6dcd50287..eb61b8298a3fda47e0c449d6843e9cf35d666c17 100644 >--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp >@@ -73,12 +73,8 @@ void WebProcessPool::platformInitialize() > initializeRemoteInspectorServer(address); > #endif > >-#if PLATFORM(GTK) >- // To enable this for WPE, we need WebMemoryPressureHandler to lose the >- // hard dependency on ViewSnapshotStore. > if (!memoryPressureMonitorDisabled()) > installMemoryPressureHandler(); >-#endif > } > > void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194617
: 361948