From 70304a6c16b050262034fd45cafddfb7915a71fa Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Wed, 26 Apr 2000 23:24:30 +0000 Subject: [PATCH] Initialize mRefCnt in the constructor, duh! --- content/html/style/src/nsCSSStyleSheet.cpp | 2 ++ layout/html/style/src/nsCSSStyleSheet.cpp | 2 ++ layout/style/nsCSSStyleSheet.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/content/html/style/src/nsCSSStyleSheet.cpp b/content/html/style/src/nsCSSStyleSheet.cpp index 86e1d6fcc142..a5c27064b8b5 100644 --- a/content/html/style/src/nsCSSStyleSheet.cpp +++ b/content/html/style/src/nsCSSStyleSheet.cpp @@ -750,6 +750,8 @@ DOMMediaListImpl::DOMMediaListImpl(nsISupportsArray *aArray, CSSStyleSheetImpl *aStyleSheet) : mArray(aArray), mStyleSheet(aStyleSheet), mScriptObject(nsnull) { + NS_INIT_REFCNT(); + NS_ABORT_IF_FALSE(mArray, "This can't be used without an array!!"); } diff --git a/layout/html/style/src/nsCSSStyleSheet.cpp b/layout/html/style/src/nsCSSStyleSheet.cpp index 86e1d6fcc142..a5c27064b8b5 100644 --- a/layout/html/style/src/nsCSSStyleSheet.cpp +++ b/layout/html/style/src/nsCSSStyleSheet.cpp @@ -750,6 +750,8 @@ DOMMediaListImpl::DOMMediaListImpl(nsISupportsArray *aArray, CSSStyleSheetImpl *aStyleSheet) : mArray(aArray), mStyleSheet(aStyleSheet), mScriptObject(nsnull) { + NS_INIT_REFCNT(); + NS_ABORT_IF_FALSE(mArray, "This can't be used without an array!!"); } diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp index 86e1d6fcc142..a5c27064b8b5 100644 --- a/layout/style/nsCSSStyleSheet.cpp +++ b/layout/style/nsCSSStyleSheet.cpp @@ -750,6 +750,8 @@ DOMMediaListImpl::DOMMediaListImpl(nsISupportsArray *aArray, CSSStyleSheetImpl *aStyleSheet) : mArray(aArray), mStyleSheet(aStyleSheet), mScriptObject(nsnull) { + NS_INIT_REFCNT(); + NS_ABORT_IF_FALSE(mArray, "This can't be used without an array!!"); }