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

Unified Diff: LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html

Issue 657983002: Fix crash in MutationObserver::canDeliver due to NULL ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html
diff --git a/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html b/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..d7d706d7c14cb19cbd6f1472fed69cfce1e42e05
--- /dev/null
+++ b/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html
@@ -0,0 +1,22 @@
+<div id=test><iframe src="#test" onload="setTimeout(crash, 0)"></iframe></div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+var observer = new MutationObserver(function() {});
+observer.observe(document.querySelector('#test'), { attributes: true });
+function crash() {
+ if (window.top === window) {
+ var iframe = document.querySelector('iframe');
+ var otherDocument = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html");
+ otherDocument.adoptNode(iframe.contentDocument.documentElement);
+ otherDocument.documentElement.appendChild(iframe);
+ gc();
+ setTimeout(function() {
+ console.log('Test passes if it prints this message without crashing');
+ testRunner.notifyDone();
+ }, 0);
+ }
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698