mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893537 - Crash after unloading an iframe with srcdoc attribute set. r=bz
This commit is contained in:
parent
ca054d2250
commit
556abefcd4
@ -390,6 +390,8 @@ MOCHITEST_FILES = \
|
||||
file_srcdoc.html \
|
||||
test_srcdoc-2.html \
|
||||
file_srcdoc-2.html \
|
||||
test_bug893537.html \
|
||||
file_bug893537.html \
|
||||
$(NULL)
|
||||
|
||||
MOCHITEST_CHROME_FILES = \
|
||||
|
9
content/html/content/test/file_bug893537.html
Normal file
9
content/html/content/test/file_bug893537.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=893537
|
||||
-->
|
||||
<body>
|
||||
<iframe id="iframe" src="data:text/html;charset=US-ASCII,Goodbye World" srcdoc="Hello World"></iframe>
|
||||
</body>
|
||||
</html>
|
42
content/html/content/test/test_bug893537.html
Normal file
42
content/html/content/test/test_bug893537.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=893537
|
||||
-->
|
||||
<head>
|
||||
<title>Test for crash caused by unloading and reloading srcdoc iframes</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=893537">Mozilla Bug 893537</a>
|
||||
|
||||
<iframe id="pframe" src="file_bug893537.html"></iframe>
|
||||
|
||||
<pre id="test">
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
var pframe = $("pframe");
|
||||
|
||||
var loadState = 1;
|
||||
pframe.contentWindow.addEventListener("load", function () {
|
||||
|
||||
if (loadState == 1) {
|
||||
var iframe = pframe.contentDocument.getElementById("iframe");
|
||||
iframe.removeAttribute("srcdoc");
|
||||
loadState = 2;
|
||||
}
|
||||
if (loadState == 2) {
|
||||
SimpleTest.executeSoon(function () { pframe.contentWindow.location.reload() });
|
||||
loadState = 3;
|
||||
}
|
||||
if (loadState == 3) {
|
||||
ok(true, "This is a mochitest implementation of a crashtest. To finish is to pass");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -374,6 +374,9 @@ nsSHEntry::Create(nsIURI * aURI, const nsAString &aTitle,
|
||||
//By default the page is not expired
|
||||
mShared->mExpired = false;
|
||||
|
||||
mIsSrcdocEntry = false;
|
||||
mSrcdocData = NullString();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user