зеркало из https://github.com/mozilla/gecko-dev.git
Bug 593302 - "ASSERTION: Removing id entry that doesn't exist" after moving nodes between documents. r=peterv a=blocking-final
This commit is contained in:
Родитель
e17a4e27a3
Коммит
e345f4d910
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function boom()
|
||||
{
|
||||
iframe = document.getElementById("iframe");
|
||||
iframeBody = iframe.contentDocument.body;
|
||||
iframeBody.appendChild(makeNamedSpan("w"));
|
||||
remove(iframe);
|
||||
iframeBody.appendChild(makeNamedSpan("w"));
|
||||
remove(iframeBody);
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
|
||||
function makeNamedSpan(i)
|
||||
{
|
||||
var s = document.createElement("span");
|
||||
s.id = i;
|
||||
return s;
|
||||
}
|
||||
|
||||
function remove(n) { n.parentNode.removeChild(n); }
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<iframe id="iframe" src="data:text/html,S"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<!-- This test should not leak. -->
|
||||
<iframe src="data:text/html,
|
||||
<script>
|
||||
var elem = document.createElement('span');
|
||||
document.mozSetImageElement('foo', elem);
|
||||
elem.foo = document;
|
||||
</script>"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -80,3 +80,5 @@ load 590395-1.html
|
|||
load 595606-1.html
|
||||
load 595606-2.html
|
||||
load 606729-1.html
|
||||
load 593302-1.html
|
||||
load 593302-2.html
|
||||
|
|
|
@ -1934,6 +1934,8 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument)
|
|||
// manually.
|
||||
|
||||
tmp->mInUnlinkOrDeletion = PR_FALSE;
|
||||
|
||||
tmp->mIdentifierMap.Clear();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
|
||||
|
@ -7082,10 +7084,6 @@ nsDocument::Destroy()
|
|||
// XXX We really should let cycle collection do this, but that currently still
|
||||
// leaks (see https://bugzilla.mozilla.org/show_bug.cgi?id=406684).
|
||||
nsContentUtils::ReleaseWrapper(static_cast<nsINode*>(this), this);
|
||||
|
||||
// Try really really hard to make sure we don't leak things through
|
||||
// mIdentifierMap
|
||||
mIdentifierMap.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче