Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html

Issue 1972943002: Modifies few gc related layout tests to work with ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fb8d2b3d607feb982517014c9986a4d1d65ec744 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';
+
+// Do initialization work in an inner function to avoid references to objects
+// remaining live on this function's stack frame (http://crbug.com/595672/).
+initializeObserver();
div = null;
observer = null;
gc();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698