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

Side by Side Diff: LayoutTests/fast/dom/MutationObserver/transient-gc-crash.html

Issue 12317072: Merge 143386 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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
OLDNEW
1 <script src="../../js/resources/js-test-pre.js"></script> 1 <script src="../../js/resources/js-test-pre.js"></script>
2 <script> 2 <script>
3 window.jsTestIsAsync = true; 3 window.jsTestIsAsync = true;
4 description('Clearing transient observers after observation node is GCed should not cause a crash.'); 4 description('Clearing transient observers after observation node is GCed should not cause a crash.');
5 5
6 function callback(mutations) { 6 function callback(mutations) {
7 window.mutations = mutations; 7 window.mutations = mutations;
8 } 8 }
9 var observer = new WebKitMutationObserver(callback); 9 var observer = new MutationObserver(callback);
10 10
11 var div = document.createElement('div'); 11 var div = document.createElement('div');
12 var span = div.appendChild(document.createElement('span')); 12 var span = div.appendChild(document.createElement('span'));
13 observer.observe(div, {attributes: true, subtree: true}); 13 observer.observe(div, {attributes: true, subtree: true});
14 div.removeChild(span); 14 div.removeChild(span);
15 div = null; 15 div = null;
16 gc(); 16 gc();
17 span.setAttribute('foo', 'bar'); 17 span.setAttribute('foo', 'bar');
18 setTimeout(function() { 18 setTimeout(function() {
19 shouldBe('mutations.length', '1'); 19 shouldBe('mutations.length', '1');
20 finishJSTest(); 20 finishJSTest();
21 }, 0); 21 }, 0);
22 </script> 22 </script>
23 <script src="../../js/resources/js-test-post.js"></script> 23 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/MutationObserver/takeRecords.html ('k') | Source/WebCore/page/DOMWindow.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698