Index: third_party/WebKit/LayoutTests/fast/dom/StyleSheet/gc-rule-children-wrappers.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/gc-rule-children-wrappers.html b/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/gc-rule-children-wrappers.html |
index 5bb3d7cdc001943c531158425e4411949e994916..9994a0b3d736db95b4ad4fd3ba9ceefa5a661e7e 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/gc-rule-children-wrappers.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/StyleSheet/gc-rule-children-wrappers.html |
@@ -31,7 +31,10 @@ |
function test(expr, expectedType, testWhat) |
{ |
shouldBe(expr + ".type", expectedType); |
- eval(expr + "." + testWhat).foo = "bar" |
+ // 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(expr + "." + testWhat).foo = "bar";})(); |
gc(); |
shouldBe(expr + "." + testWhat + ".foo", "'bar'"); |
} |