mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 795221 part 6. Hook up xml-stylesheet PIs to cycle collect their stylesheet. r=smaug
This commit is contained in:
parent
b9ca5298cb
commit
5dcae470be
6
content/html/content/crashtests/795221-5.xml
Normal file
6
content/html/content/crashtests/795221-5.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml-stylesheet href="data:text/css,div {}"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<script>
|
||||
document.styleSheets[0].cssRules[0].style.foo = document;
|
||||
</script>
|
||||
</html>
|
@ -40,3 +40,4 @@ load 795221-1.html
|
||||
load 795221-2.html
|
||||
load 795221-3.html
|
||||
load 795221-4.html
|
||||
load 795221-5.xml
|
||||
|
@ -26,6 +26,10 @@ public:
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// CC
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsXMLStylesheetPI,
|
||||
nsXMLProcessingInstruction)
|
||||
|
||||
// nsIDOMNode
|
||||
NS_IMETHOD SetNodeValue(const nsAString& aData);
|
||||
|
||||
@ -59,7 +63,7 @@ protected:
|
||||
|
||||
DOMCI_NODE_DATA(XMLStylesheetProcessingInstruction, nsXMLStylesheetPI)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsXMLStylesheetPI)
|
||||
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsXMLStylesheetPI)
|
||||
NS_NODE_INTERFACE_TABLE4(nsXMLStylesheetPI, nsIDOMNode,
|
||||
nsIDOMProcessingInstruction, nsIDOMLinkStyle,
|
||||
nsIStyleSheetLinkingElement)
|
||||
@ -69,6 +73,16 @@ NS_INTERFACE_MAP_END_INHERITING(nsXMLProcessingInstruction)
|
||||
NS_IMPL_ADDREF_INHERITED(nsXMLStylesheetPI, nsXMLProcessingInstruction)
|
||||
NS_IMPL_RELEASE_INHERITED(nsXMLStylesheetPI, nsXMLProcessingInstruction)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(nsXMLStylesheetPI)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXMLStylesheetPI,
|
||||
nsXMLProcessingInstruction)
|
||||
tmp->nsStyleLinkElement::Traverse(cb);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsXMLStylesheetPI,
|
||||
nsXMLProcessingInstruction)
|
||||
tmp->nsStyleLinkElement::Unlink();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
|
||||
nsXMLStylesheetPI::nsXMLStylesheetPI(already_AddRefed<nsINodeInfo> aNodeInfo,
|
||||
const nsAString& aData)
|
||||
|
Loading…
Reference in New Issue
Block a user