mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895805 - Ensure nsBindingManager hashtable is initialized before use. r=mrbkap
This commit is contained in:
parent
7e76ab4eb6
commit
0d79ba91bc
30
content/xbl/crashtests/895805-1.xhtml
Normal file
30
content/xbl/crashtests/895805-1.xhtml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
<head>
|
||||
<title>Bug 895805 - Adopting bound element to another document.</title>
|
||||
<xbl:bindings>
|
||||
<xbl:binding id="crash">
|
||||
<xbl:content>
|
||||
<xbl:children />
|
||||
Bug 895805 dummy binding
|
||||
</xbl:content>
|
||||
</xbl:binding>
|
||||
</xbl:bindings>
|
||||
<style type="text/css">
|
||||
#test {
|
||||
-moz-binding:url(#crash);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<span id="test">Test</span>
|
||||
<script>
|
||||
function init() {
|
||||
var boundElement = document.getElementById('test');
|
||||
var otherDoc = document.implementation.createDocument('', '', null);
|
||||
otherDoc.adoptNode(boundElement);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -37,3 +37,4 @@ load 507628-1.xhtml
|
||||
load 507991-1.xhtml
|
||||
load set-field-bad-this.xhtml
|
||||
load 830614-1.xul
|
||||
load 895805-1.xhtml
|
||||
|
@ -1114,7 +1114,7 @@ nsBindingManager::Traverse(nsIContent *aContent,
|
||||
return;
|
||||
}
|
||||
|
||||
if (mBoundContentSet.Contains(aContent)) {
|
||||
if (mBoundContentSet.IsInitialized() && mBoundContentSet.Contains(aContent)) {
|
||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "[via binding manager] mBoundContentSet entry");
|
||||
cb.NoteXPCOMChild(aContent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user