bindings: Wrapper tracing improvements

Another set of wrapper tracing improvements that make unified heap
test expectation adjustements obsolete.

Bug: 843903
Change-Id: I5f188215b6ddae095dddbbf7726e2ebcf4d47bdc
Reviewed-on: https://chromium-review.googlesource.com/c/1401061
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620753}
diff --git a/third_party/blink/renderer/core/html/forms/html_output_element.h b/third_party/blink/renderer/core/html/forms/html_output_element.h
index 6ec6cc9..1228a323 100644
--- a/third_party/blink/renderer/core/html/forms/html_output_element.h
+++ b/third_party/blink/renderer/core/html/forms/html_output_element.h
@@ -73,7 +73,7 @@
 
   bool is_default_value_mode_;
   String default_value_;
-  Member<DOMTokenList> tokens_;
+  TraceWrapperMember<DOMTokenList> tokens_;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_iframe_element.h b/third_party/blink/renderer/core/html/html_iframe_element.h
index 29c35ba..dea9767 100644
--- a/third_party/blink/renderer/core/html/html_iframe_element.h
+++ b/third_party/blink/renderer/core/html/html_iframe_element.h
@@ -92,7 +92,7 @@
   bool allow_fullscreen_;
   bool allow_payment_request_;
   bool collapsed_by_client_;
-  Member<HTMLIFrameElementSandbox> sandbox_;
+  TraceWrapperMember<HTMLIFrameElementSandbox> sandbox_;
   Member<DOMFeaturePolicy> policy_;
 
   network::mojom::ReferrerPolicy referrer_policy_;
diff --git a/third_party/blink/renderer/core/html/html_link_element.h b/third_party/blink/renderer/core/html/html_link_element.h
index 57fb644..201537d 100644
--- a/third_party/blink/renderer/core/html/html_link_element.h
+++ b/third_party/blink/renderer/core/html/html_link_element.h
@@ -168,7 +168,7 @@
   String integrity_;
   String importance_;
   network::mojom::ReferrerPolicy referrer_policy_;
-  Member<DOMTokenList> sizes_;
+  TraceWrapperMember<DOMTokenList> sizes_;
   Vector<IntSize> icon_sizes_;
   TraceWrapperMember<RelList> rel_list_;
   LinkRelAttribute rel_attribute_;
diff --git a/third_party/blink/web_tests/fast/dom/gc-9-expected.txt b/third_party/blink/web_tests/fast/dom/gc-9-expected.txt
index e9ceb9e4..792bed5 100644
--- a/third_party/blink/web_tests/fast/dom/gc-9-expected.txt
+++ b/third_party/blink/web_tests/fast/dom/gc-9-expected.txt
@@ -64,10 +64,10 @@
 PASS: document.body.dataset.myCustomProperty should be 1 and is.
 PASS: document.body.classList.myCustomProperty should be 1 and is.
 PASS: document.getElementsByTagName('link')[0].relList.myCustomProperty should be 1 and is.
-FAIL: document.getElementsByTagName('link')[0].sizes.myCustomProperty should be 1 but instead is undefined.
-FAIL: document.getElementsByTagName('output')[0].htmlFor.myCustomProperty should be 1 but instead is undefined.
+PASS: document.getElementsByTagName('link')[0].sizes.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('output')[0].htmlFor.myCustomProperty should be 1 and is.
 PASS: document.getElementsByTagName('output')[0].labels.myCustomProperty should be 1 and is.
-FAIL: document.getElementsByTagName('iframe')[0].sandbox.myCustomProperty should be 1 but instead is undefined.
+PASS: document.getElementsByTagName('iframe')[0].sandbox.myCustomProperty should be 1 and is.
 PASS: document.all.myCustomProperty should be 1 and is.
 PASS: document.images.myCustomProperty should be 1 and is.
 PASS: document.embeds.myCustomProperty should be 1 and is.
diff --git a/third_party/blink/web_tests/flag-specific/enable-blink-features=HeapUnifiedGarbageCollection/fast/dom/gc-9-expected.txt b/third_party/blink/web_tests/flag-specific/enable-blink-features=HeapUnifiedGarbageCollection/fast/dom/gc-9-expected.txt
deleted file mode 100644
index 792bed5..0000000
--- a/third_party/blink/web_tests/flag-specific/enable-blink-features=HeapUnifiedGarbageCollection/fast/dom/gc-9-expected.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-This page tests whether custom properties on DOM objects persist after garbage collection.
-
-If the test passes, you'll see a series of 'PASS' messages below.
-
-Because neither WinIE nor FF has reasonable or predictable behavior in this scenario, this test just documents our behavior to ensure that we don't change it accidentally. It is not a prescription for how things should behave.
-
-DOM OBJECTS BEFORE GARBAGE COLLECTION:
-PASS: document.implementation.myCustomProperty should be 1 and is.
-PASS: document.fonts.myCustomProperty should be 1 and is.
-PASS: document.myCustomProperty should be 1 and is.
-PASS: document.body.myCustomProperty should be 1 and is.
-PASS: document.body.attributes.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('body').myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createLinearGradient(0, 0, 0, 0).myCustomProperty should be undefined and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createPattern(document.getElementsByTagName('canvas')[0], 'no-repeat').myCustomProperty should be undefined and is.
-PASS: document.getElementsByTagName('select')[0].options.myCustomProperty should be 1 and is.
-PASS: document.body.childNodes.myCustomProperty should be 1 and is.
-PASS: document.body.dataset.myCustomProperty should be 1 and is.
-PASS: document.body.classList.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('link')[0].relList.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('link')[0].sizes.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('output')[0].htmlFor.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('output')[0].labels.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('iframe')[0].sandbox.myCustomProperty should be 1 and is.
-PASS: document.all.myCustomProperty should be 1 and is.
-PASS: document.images.myCustomProperty should be 1 and is.
-PASS: document.embeds.myCustomProperty should be 1 and is.
-PASS: document.applets.myCustomProperty should be 1 and is.
-PASS: document.links.myCustomProperty should be 1 and is.
-PASS: document.forms.myCustomProperty should be 1 and is.
-PASS: document.anchors.myCustomProperty should be 1 and is.
-PASS: document.scripts.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('form')[0].elements.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].rows.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].rows[0].cells.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].tBodies.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].tBodies[0].rows.myCustomProperty should be 1 and is.
-PASS: document.body.children.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('map')[0].areas.myCustomProperty should be 1 and is.
-PASS: document.body.style.myCustomProperty should be 1 and is.
-PASS: document.styleSheets.myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].cssRules.myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].cssRules[0].myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('style')[0].sheet.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('svg')[0].firstChild.sheet.myCustomProperty should be 1 and is.
-PASS: new XPathEvaluator().myCustomProperty should be undefined and is.
-PASS: new XPathEvaluator().evaluate('/', document, null, 0, null).myCustomProperty should be undefined and is.
-PASS: document.createNSResolver(document).myCustomProperty should be undefined and is.
-PASS: document.createExpression('/', document.createNSResolver(document)).myCustomProperty should be undefined and is.
-DOM OBJECTS AFTER GARBAGE COLLECTION:
-PASS: document.implementation.myCustomProperty should be 1 and is.
-PASS: document.fonts.myCustomProperty should be 1 and is.
-PASS: document.myCustomProperty should be 1 and is.
-PASS: document.body.myCustomProperty should be 1 and is.
-PASS: document.body.attributes.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('body').myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createLinearGradient(0, 0, 0, 0).myCustomProperty should be undefined and is.
-PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createPattern(document.getElementsByTagName('canvas')[0], 'no-repeat').myCustomProperty should be undefined and is.
-PASS: document.getElementsByTagName('select')[0].options.myCustomProperty should be 1 and is.
-PASS: document.body.childNodes.myCustomProperty should be 1 and is.
-PASS: document.body.dataset.myCustomProperty should be 1 and is.
-PASS: document.body.classList.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('link')[0].relList.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('link')[0].sizes.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('output')[0].htmlFor.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('output')[0].labels.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('iframe')[0].sandbox.myCustomProperty should be 1 and is.
-PASS: document.all.myCustomProperty should be 1 and is.
-PASS: document.images.myCustomProperty should be 1 and is.
-PASS: document.embeds.myCustomProperty should be 1 and is.
-PASS: document.applets.myCustomProperty should be 1 and is.
-PASS: document.links.myCustomProperty should be 1 and is.
-PASS: document.forms.myCustomProperty should be 1 and is.
-PASS: document.anchors.myCustomProperty should be 1 and is.
-PASS: document.scripts.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('form')[0].elements.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].rows.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].rows[0].cells.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].tBodies.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('table')[0].tBodies[0].rows.myCustomProperty should be 1 and is.
-PASS: document.body.children.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('map')[0].areas.myCustomProperty should be 1 and is.
-PASS: document.body.style.myCustomProperty should be 1 and is.
-PASS: document.styleSheets.myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].cssRules.myCustomProperty should be 1 and is.
-PASS: document.styleSheets[0].cssRules[0].myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('style')[0].sheet.myCustomProperty should be 1 and is.
-PASS: document.getElementsByTagName('svg')[0].firstChild.sheet.myCustomProperty should be 1 and is.
-PASS: new XPathEvaluator().myCustomProperty should be undefined and is.
-PASS: new XPathEvaluator().evaluate('/', document, null, 0, null).myCustomProperty should be undefined and is.
-PASS: document.createNSResolver(document).myCustomProperty should be undefined and is.
-PASS: document.createExpression('/', document.createNSResolver(document)).myCustomProperty should be undefined and is.
-DOM EVENT BEFORE GARBAGE COLLECTION
-PASS: event.myCustomProperty should be 1 and is.
-DOM EVENT AFTER GARBAGE COLLECTION
-PASS: event.myCustomProperty should be 1 and is.