mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 455853 - Javascript: User defined properties disappear after 3 to 10 seconds from nodes that are added to a DOM document that is created using document.implementation.createDocument(), r+sr=peterv
This commit is contained in:
parent
32d0949e81
commit
6184f52ec8
@ -5760,7 +5760,9 @@ nsDocument::FlushPendingNotifications(mozFlushType aType)
|
||||
void
|
||||
nsDocument::AddReference(void *aKey, nsISupports *aReference)
|
||||
{
|
||||
if (mScriptGlobalObject) {
|
||||
PRBool dummy;
|
||||
nsIScriptGlobalObject* scriptObject = GetScriptHandlingObject(dummy);
|
||||
if (scriptObject) {
|
||||
if (!mContentWrapperHash) {
|
||||
mContentWrapperHash = new nsInterfaceHashtable<nsVoidPtrHashKey, nsISupports>;
|
||||
if (mContentWrapperHash) {
|
||||
|
@ -212,6 +212,7 @@ _TEST_FILES = test_bug5141.html \
|
||||
test_bug368972.html \
|
||||
test_bug450160.html \
|
||||
test_bug454326.html \
|
||||
test_bug455853.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
41
content/base/test/test_bug455853.html
Normal file
41
content/base/test/test_bug455853.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=455853
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 455853</title>
|
||||
<script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=455853">Mozilla Bug 455853</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 455853 **/
|
||||
|
||||
function runTest() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var doc = document.implementation.createDocument("", "", null);
|
||||
var root = doc.createElement('nodes');
|
||||
doc.appendChild(root);
|
||||
root.expando = "ok";
|
||||
root = null;
|
||||
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils)
|
||||
.garbageCollect();
|
||||
ok(doc.documentElement.expando, "Should have preserved the expando!");
|
||||
}
|
||||
|
||||
runTest();
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user