Implement ForciblyPurgeV8Memory (aka PageMummification) for memory reduction on low-end Android. This is version 2 of OomIntervention project. Design doc: https://docs.google.com/document/d/1koOLSc2e2g1pGjONDEERD5Sae1ds9mllEKgjxkJYRCE/edit?ts=5be9222c#heading=h.xgjl2srtytjt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/edd1ae9c3effdf301b669c60e317a4ba47aa526a commit edd1ae9c3effdf301b669c60e317a4ba47aa526a Author: Yuzu Saijo <yuzus@chromium.org> Date: Fri Jan 11 08:53:02 2019 Call ContextDestroyed from ForciblyPurgeV8Memory This CL adds calls to ContextDestroyed from ForciblyPurgeV8Memory to do cleanup operations in various observer classes. Because of this change, the life time of document and execution context could differ (i.e. execution context is destroyed but document is not shut down yet). This CL also includes a bug fix because of the change. Change-Id: Ib46b3ec6cce2e55edc59001466181131d5987b3a Bug: 917293 Reviewed-on: https://chromium-review.googlesource.com/c/1386071 Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Keishi Hattori <keishi@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Cr-Commit-Position: refs/heads/master@{#621952} [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/bindings/core/v8/remote_window_proxy.cc [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/bindings/core/v8/window_proxy.h [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/css/font_face_set_document.cc [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/css/font_face_set_document.h [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/dom/context_lifecycle_observer.cc [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/dom/context_lifecycle_observer.h [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/dom/document.cc [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/dom/document.h [modify] https://crrev.com/edd1ae9c3effdf301b669c60e317a4ba47aa526a/third_party/blink/renderer/core/frame/local_frame.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/223f24616f7211a0bb8e8e0cd6b456053451c20a commit 223f24616f7211a0bb8e8e0cd6b456053451c20a Author: Yuzu Saijo <yuzus@chromium.org> Date: Wed Jan 16 06:26:40 2019 Call ForciblyPurgeV8Memory from OomIntervention This CL adds a flag to enable ForciblyPurgeV8Memory in OomIntervention. Bug: 917293 Change-Id: I7eafb2b46dd826b6e7e3b5c87e03ece9d0c74126 Reviewed-on: https://chromium-review.googlesource.com/c/1404770 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Cr-Commit-Position: refs/heads/master@{#623135} [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/chrome/browser/android/oom_intervention/oom_intervention_config.h [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/third_party/blink/public/platform/oom_intervention.mojom [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/third_party/blink/renderer/controller/oom_intervention_impl.cc [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/third_party/blink/renderer/controller/oom_intervention_impl.h [modify] https://crrev.com/223f24616f7211a0bb8e8e0cd6b456053451c20a/third_party/blink/renderer/controller/oom_intervention_impl_test.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2faccc060812429500d031f9d1a8090b08fce7a1 commit 2faccc060812429500d031f9d1a8090b08fce7a1 Author: Yuzu Saijo <yuzus@chromium.org> Date: Fri Jan 18 06:11:45 2019 Trigger V8 GC in OomIntervention This CL adds code to trigger V8GC by sending memory pressure notification. Bug: 917293 Change-Id: Id509843743eaaec33afd8613b5690880282f2157 Reviewed-on: https://chromium-review.googlesource.com/c/1414672 Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#624021} [modify] https://crrev.com/2faccc060812429500d031f9d1a8090b08fce7a1/third_party/blink/renderer/controller/oom_intervention_impl.cc [modify] https://crrev.com/2faccc060812429500d031f9d1a8090b08fce7a1/third_party/blink/renderer/controller/oom_intervention_impl.h [modify] https://crrev.com/2faccc060812429500d031f9d1a8090b08fce7a1/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
Comment 1 by schenney@chromium.org
, Dec 26