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..cb368002ac7ca8877ecdde39aa99eb2741de6286 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,17 @@ |
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; |
+ } |
+ |
+ // Perform all assignments in a function to avoid references to |
+ // objects in dead registers when using ignition (chromium:595672) |
+ initialize(); |
gc(); |
var console = document.getElementById("console"); |
console.appendChild(document.createTextNode(result.iterateNext().foo)); |