Index: third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html b/third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html |
index 4cb6819f14bb9594483aaa5efd7575a9f78e152a..fe413c9f08dab257c6eca00aa26ad7128e9a0332 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html |
@@ -5,11 +5,20 @@ |
if (window.testRunner) { |
testRunner.waitUntilDone(); |
testRunner.dumpAsText(); |
+} |
+var observer, div; |
+ |
+function initializeObserver() { |
+ observer = new MutationObserver( |
+ function() {console.log('Should not appear')}); |
+ div = document.createElement('div'); |
+ observer.observe(div, {attributes: true}); |
+ div.id = 'foo'; |
} |
-var observer = new MutationObserver(function() {console.log('Should not appear')}); |
-var div = document.createElement('div'); |
-observer.observe(div, {attributes: true}); |
-div.id = 'foo'; |
+ |
+// Perform all assignments in a function to avoid references to objects |
+// in dead registers when using ignition (chromium:595672) |
rmcilroy
2016/05/13 11:29:37
/s/Perform all assignments in a function/Do initia
mythria
2016/05/16 11:15:10
Done.
|
+initializeObserver(); |
div = null; |
observer = null; |
gc(); |