mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 829817 - Cycle collect nsCSSPageRule. r=dbaron
This commit is contained in:
parent
b937e3404f
commit
e749b7057e
20
layout/style/crashtests/829817.html
Normal file
20
layout/style/crashtests/829817.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
|
||||
@page {}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
// This shouldn't cause a shutdown leak.
|
||||
document.styleSheets[0].cssRules[0].style.someExpando = "set an expando to preserve the wrapper";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
@ -88,6 +88,7 @@ load 812824.html
|
||||
load 822842.html
|
||||
load 822766-1.html
|
||||
load 827591-1.html
|
||||
load 829817.html
|
||||
load 840898.html
|
||||
load 842134.html
|
||||
load 862113.html
|
||||
|
@ -2261,7 +2261,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsCSSKeyframeRule)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsCSSKeyframeRule)
|
||||
if (tmp->mDOMDeclaration) {
|
||||
tmp->mDOMDeclaration->DropReference();
|
||||
ImplCycleCollectionUnlink(tmp->mDOMDeclaration);
|
||||
tmp->mDOMDeclaration = nullptr;
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsCSSKeyframeRule)
|
||||
@ -2744,13 +2744,23 @@ nsCSSPageRule::Clone() const
|
||||
return clone.forget();
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsCSSPageRule)
|
||||
NS_IMPL_RELEASE(nsCSSPageRule)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsCSSPageRule)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsCSSPageRule)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsCSSPageRule)
|
||||
if (tmp->mDOMDeclaration) {
|
||||
tmp->mDOMDeclaration->DropReference();
|
||||
tmp->mDOMDeclaration = nullptr;
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsCSSPageRule)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDOMDeclaration)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
DOMCI_DATA(CSSPageRule, nsCSSPageRule)
|
||||
|
||||
// QueryInterface implementation for nsCSSPageRule
|
||||
NS_INTERFACE_MAP_BEGIN(nsCSSPageRule)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCSSPageRule)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIStyleRule)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSPageRule)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule)
|
||||
|
@ -554,7 +554,8 @@ private:
|
||||
nsCSSPageRule(const nsCSSPageRule& aCopy);
|
||||
~nsCSSPageRule();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCSSPageRule, nsIDOMCSSPageRule)
|
||||
|
||||
// nsIStyleRule methods
|
||||
#ifdef DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user