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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <div>Test passes if it does not crash</div> 2 <div>Test passes if it does not crash</div>
3 <script src="../../../resources/gc.js"></script> 3 <script src="../../../resources/gc.js"></script>
4 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 }
9 var observer, div;
10
11 function initializeObserver() {
12 observer = new MutationObserver(
13 function() {console.log('Should not appear')});
14 div = document.createElement('div');
15 observer.observe(div, {attributes: true});
16 div.id = 'foo';
8 } 17 }
9 var observer = new MutationObserver(function() {console.log('Should not appear') }); 18
10 var div = document.createElement('div'); 19 // Do initialization work in an inner function to avoid references to objects
11 observer.observe(div, {attributes: true}); 20 // remaining live on this function's stack frame (http://crbug.com/595672/).
12 div.id = 'foo'; 21 initializeObserver();
13 div = null; 22 div = null;
14 observer = null; 23 observer = null;
15 gc(); 24 gc();
16 setTimeout(function() { testRunner.notifyDone(); }, 0); 25 setTimeout(function() { testRunner.notifyDone(); }, 0);
17 </script> 26 </script>
OLDNEW
« 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