Index: third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html b/third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html |
index 0016cb052d09153e56be04b4cbbb747cb2ab74b6..95e9d9ef30d8aea756b391094b493958267b1e30 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html |
@@ -19,7 +19,10 @@ var nodeListKind = { |
var i = 1; |
for (var kind in nodeListKind) { |
var code = nodeListKind[kind]; |
- eval(code).customProperty = i; |
+ // Do initialization work in an inner function to avoid references to |
+ // objects remaining live on this function's stack frame |
+ // (http://crbug.com/595672/). |
+ (() => {eval(code).customProperty = i})(); |
gc(); |
shouldBe(code + '.customProperty', '' + i++); |
} |