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

Unified Diff: third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-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
Index: third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
diff --git a/third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html b/third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
index 56760a6e3f18086073814f1a69da8fc6021bc9ae..98c9f18bb48f216d8249bc08d72ff5cc12c47b74 100644
--- a/third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
+++ b/third_party/WebKit/LayoutTests/fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
@@ -20,10 +20,18 @@
function test(type)
{
- var doc = (new DOMParser).parseFromString("<html><body><span></span></body></html>", "text/xml");
- doc.getElementsByTagName("span")[0].foo = "PASS";
- var result = doc.evaluate("//span", doc.documentElement, null, type, null);
- doc = 0;
+ var doc, result;
+ function initialize() {
+ doc = (new DOMParser).parseFromString("<html><body><span></span></body></html>", "text/xml");
+ doc.getElementsByTagName("span")[0].foo = "PASS";
+ result = doc.evaluate("//span", doc.documentElement, null, type, null);
+ doc = 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.iterateNext().foo));

Powered by Google App Engine
This is Rietveld 408576698