зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893537 - Crash after unloading an iframe with srcdoc attribute set. r=bz
This commit is contained in:
Родитель
b7de949bc4
Коммит
7ad74eab05
|
@ -390,6 +390,8 @@ MOCHITEST_FILES = \
|
||||||
file_srcdoc.html \
|
file_srcdoc.html \
|
||||||
test_srcdoc-2.html \
|
test_srcdoc-2.html \
|
||||||
file_srcdoc-2.html \
|
file_srcdoc-2.html \
|
||||||
|
test_bug893537.html \
|
||||||
|
file_bug893537.html \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
MOCHITEST_CHROME_FILES = \
|
MOCHITEST_CHROME_FILES = \
|
||||||
|
|
|
@ -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>
|
|
@ -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
|
//By default the page is not expired
|
||||||
mShared->mExpired = false;
|
mShared->mExpired = false;
|
||||||
|
|
||||||
|
mIsSrcdocEntry = false;
|
||||||
|
mSrcdocData = NullString();
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче