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

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

Issue 9999033: Merge 113378 - Crash in MutationObservers due to an invalid HashSet iterator (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 WebKitMutationObserver(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

Powered by Google App Engine
This is Rietveld 408576698