unified-heap: Enable per default

Tbr: jochen@chromium.org
Bug: 843903
Change-Id: Iadcfb46bdda3692b3b8717176c2ef992f83ba472
Reviewed-on: https://chromium-review.googlesource.com/c/1491653
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636050}
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 106f889..8d94a18 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -3534,7 +3534,11 @@
 }
 
 // Tests that webviews do get garbage collected.
-IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestGarbageCollect) {
+// This test is disabled because it relies on garbage collections triggered from
+// window.gc() to run precisely. This is not the case with unified heap where
+// they need to conservatively scan the stack, potentially keeping objects
+// alive. https://crbug.com/843903
+IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestGarbageCollect) {
   TestHelper("testGarbageCollect", "web_view/shim", NO_TEST_SERVER);
   GetGuestViewManager()->WaitForSingleViewGarbageCollected();
 }
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 7c1bd09..c68c5a8 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -68,7 +68,7 @@
 
 // Enable unified garbage collection in Blink.
 const base::Feature kBlinkHeapUnifiedGarbageCollection{
-    "BlinkHeapUnifiedGarbageCollection", base::FEATURE_DISABLED_BY_DEFAULT};
+    "BlinkHeapUnifiedGarbageCollection", base::FEATURE_ENABLED_BY_DEFAULT};
 
 // Enable bloated renderer detection.
 const base::Feature kBloatedRendererDetection{
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index bd4af24..e881d26 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -602,6 +602,7 @@
     },
     {
       name: "HeapUnifiedGarbageCollection",
+      status: "stable",
     },
     {
       name: "HrefTranslate",
diff --git a/third_party/blink/web_tests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt b/third_party/blink/web_tests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt
index 1498fba5..1be5545 100644
--- a/third_party/blink/web_tests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt
+++ b/third_party/blink/web_tests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt
@@ -2,6 +2,6 @@
 For this test to PASS you should see 2 PASS below.
 
 
-undefined
-undefined
+PASS
+PASS
 
diff --git a/third_party/blink/web_tests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt b/third_party/blink/web_tests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt
index 55e8936a..33d3e3e 100644
--- a/third_party/blink/web_tests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt
+++ b/third_party/blink/web_tests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt
@@ -2,6 +2,6 @@
 For this test to PASS you should see 2 PASS below.
 
 
-undefined
-undefined
+PASS
+PASS
 
diff --git a/third_party/blink/web_tests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt b/third_party/blink/web_tests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt
index 55e8936a..33d3e3e 100644
--- a/third_party/blink/web_tests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt
+++ b/third_party/blink/web_tests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt
@@ -2,6 +2,6 @@
 For this test to PASS you should see 2 PASS below.
 
 
-undefined
-undefined
+PASS
+PASS