Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html

Issue 1972943002: Modifies few gc related layout tests to work with ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
diff --git a/third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html b/third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
index aae0b63bbc6978383f87ee1f922651ab47ceb6a1..3028a3d04ea27bcdd77c86c6fe3db6e577b370b5 100644
--- a/third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
+++ b/third_party/WebKit/LayoutTests/fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
@@ -18,9 +18,17 @@
function test(type)
{
- var result = document.evaluate("//div", document.documentElement, null, type, null);
- result.snapshotItem(0).foo = "PASS";
- document.body.removeChild(result.snapshotItem(0));
+ var result;
+ function initialize() {
+ result = document.evaluate("//div", document.documentElement, null, type, null);
+ result.snapshotItem(0).foo = "PASS";
+ document.body.removeChild(result.snapshotItem(0));
+ }
+
+ // Do initialization work in an inner function to avoid references
+ // to objects remaining live on this function's stack frame
+ // (http://crbug.com/595672/).
+ initialize();
gc();
var console = document.getElementById("console");
console.appendChild(document.createTextNode(result.snapshotItem(0).foo));
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698