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..36398c81323d2d2ddbb354bd8417eb4af4c1ea18 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,16 @@ |
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)); |
+ } |
+ |
+ // 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.snapshotItem(0).foo)); |