Commit 734fbf64 authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

        Reviewed by Eric.

        - http://bugs.webkit.org/show_bug.cgi?id=17256
          Make clients of RefCounted explicitly set the count to 0.

        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::RootObject):

WebCore:

        Reviewed by Eric.

        - http://bugs.webkit.org/show_bug.cgi?id=17256
          Make clients of RefCounted explicitly set the count to 0.

        * bindings/js/JSSVGPODTypeWrapper.h:
        (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
        * css/CSSFontFace.h:
        (WebCore::CSSFontFace::CSSFontFace):
        * css/CSSRuleList.cpp:
        (WebCore::CSSRuleList::CSSRuleList):
        * css/CSSSegmentedFontFace.cpp:
        (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
        * css/Counter.h:
        (WebCore::Counter::Counter):
        * css/Pair.h:
        (WebCore::Pair::Pair):
        * css/Rect.h:
        (WebCore::Rect::Rect):
        * css/StyleBase.h:
        (WebCore::StyleBase::StyleBase):
        * css/StyleSheetList.cpp:
        (WebCore::StyleSheetList::StyleSheetList):
        * dom/Attr.cpp:
        (WebCore::Attr::Attr):
        * dom/Attr.h:
        * dom/Attribute.h:
        (WebCore::Attribute::Attribute):
        * dom/Clipboard.cpp:
        (WebCore::Clipboard::Clipboard):
        * dom/DOMImplementation.h:
        (WebCore::DOMImplementation::DOMImplementation):
        * dom/Event.cpp:
        (WebCore::Event::Event):
        * dom/EventListener.h:
        (WebCore::EventListener::EventListener):
        * dom/ExceptionBase.cpp:
        (WebCore::ExceptionBase::ExceptionBase):
        * dom/NamedAttrMap.h:
        (WebCore::NamedAttrMap::insertAttribute):
        * dom/NamedNodeMap.h:
        (WebCore::NamedNodeMap::NamedNodeMap):
        * dom/NodeFilter.h:
        (WebCore::NodeFilter::NodeFilter):
        * dom/NodeFilterCondition.h:
        (WebCore::NodeFilterCondition::NodeFilterCondition):
        * dom/NodeList.h:
        (WebCore::NodeList::NodeList):
        * dom/QualifiedName.h:
        (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
        (WebCore::QualifiedName::ref):
        * dom/Range.cpp:
        (WebCore::Range::Range):
        * dom/RegisteredEventListener.cpp:
        (WebCore::RegisteredEventListener::RegisteredEventListener):
        * dom/StyledElement.h:
        * dom/Traversal.cpp:
        (WebCore::Traversal::Traversal):
        * editing/EditCommand.cpp:
        (WebCore::EditCommand::EditCommand):
        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::BackForwardList):
        * history/CachedPage.cpp:
        (WebCore::CachedPage::CachedPage):
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        * html/CanvasGradient.cpp:
        (WebCore::CanvasGradient::CanvasGradient):
        * html/CanvasPattern.cpp:
        (WebCore::CanvasPattern::CanvasPattern):
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::CanvasStyle):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::HTMLCollection):
        * html/MediaError.h:
        (WebCore::MediaError::MediaError):
        * html/TimeRanges.cpp:
        (TimeRanges::TimeRanges):
        * html/TimeRanges.h:
        (WebCore::TimeRanges::TimeRanges):
        * html/VoidCallback.h:
        (WebCore::VoidCallback::VoidCallback):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        * loader/FormState.cpp:
        (WebCore::FormState::FormState):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::ResourceLoader):
        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::TextResourceDecoder):
        * loader/icon/IconRecord.cpp:
        (WebCore::IconRecord::IconRecord):
        * page/BarInfo.cpp:
        (WebCore::BarInfo::BarInfo):
        * page/Console.cpp:
        (WebCore::Console::Console):
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::DOMSelection):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::DOMWindow):
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        * page/History.cpp:
        (WebCore::History::History):
        * page/InspectorController.cpp:
        (WebCore::InspectorResource::InspectorResource):
        (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
        * page/Plugin.h:
        (WebCore::Plugin::Plugin):
        * page/Screen.cpp:
        (WebCore::Screen::Screen):
        * platform/ArrayImpl.cpp:
        (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
        * platform/DeprecatedValueListImpl.cpp:
        (WebCore::DeprecatedValueListImpl::Private::Private):
        * platform/ScrollBar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::SharedBuffer):
        * platform/graphics/FontFallbackList.cpp:
        (WebCore::FontFallbackList::FontFallbackList):
        * platform/graphics/FontFamily.cpp:
        (WebCore::FontFamily::FontFamily):
        * platform/graphics/FontFamily.h:
        (WebCore::FontFamily::FontFamily):
        * platform/graphics/FontSelector.h:
        (WebCore::FontSelector::FontSelector):
        (WebCore::FontSelector::~FontSelector):
        * platform/graphics/GlyphPageTreeNode.h:
        (WebCore::GlyphPage::GlyphPage):
        * platform/graphics/mac/IconMac.mm:
        (WebCore::Icon::Icon):
        * platform/mac/FileChooserMac.mm:
        (WebCore::FileChooser::FileChooser):
        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::PopupMenu):
        * platform/mac/SharedBufferMac.mm:
        (WebCore::SharedBuffer::SharedBuffer):
        * platform/network/FormData.cpp:
        (WebCore::FormData::FormData):
        * platform/network/FormData.h:
        (WebCore::FormData::FormData):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::ResourceHandle):
        * platform/text/CString.h:
        (WebCore::CStringBuffer::CStringBuffer):
        * platform/text/RegularExpression.cpp:
        (WebCore::RegularExpression::Private::Private):
        * rendering/RenderStyle.cpp:
        (WebCore::StyleSurroundData::StyleSurroundData):
        (WebCore::StyleBoxData::StyleBoxData):
        (WebCore::StyleVisualData::StyleVisualData):
        (WebCore::StyleBackgroundData::StyleBackgroundData):
        (WebCore::StyleMarqueeData::StyleMarqueeData):
        (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
        (WebCore::StyleMultiColData::StyleMultiColData):
        (WebCore::StyleTransformData::StyleTransformData):
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleInheritedData::StyleInheritedData):
        * rendering/RenderStyle.h:
        (WebCore::TransformOperation::TransformOperation):
        (WebCore::CursorList::CursorList):
        * rendering/SVGCharacterLayoutInfo.h:
        (WebCore::SVGCharOnPath::SVGCharOnPath):
        * rendering/SVGRenderStyle.cpp:
        (WebCore::SVGRenderStyle::SVGRenderStyle):
        * rendering/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::SVGRenderStyle):
        * rendering/SVGRenderStyleDefs.cpp:
        (StyleFillData::StyleFillData):
        (StyleStrokeData::StyleStrokeData):
        (StyleStopData::StyleStopData):
        (StyleTextData::StyleTextData):
        (StyleClipData::StyleClipData):
        (StyleMaskData::StyleMaskData):
        (StyleMarkerData::StyleMarkerData):
        (StyleMiscData::StyleMiscData):
        * storage/SQLResultSetRowList.h:
        (WebCore::SQLResultSetRowList::SQLResultSetRowList):
        * svg/SVGAngle.cpp:
        (WebCore::SVGAngle::SVGAngle):
        * svg/SVGAnimatedTemplate.h:
        (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
        * svg/SVGElementInstanceList.cpp:
        (WebCore::SVGElementInstanceList::SVGElementInstanceList):
        * svg/SVGList.h:
        (WebCore::SVGList::SVGList):
        (WebCore::SVGPODListItem::SVGPODListItem):
        * svg/SVGPathSeg.h:
        (WebCore::SVGPathSeg::SVGPathSeg):
        * svg/SVGPreserveAspectRatio.cpp:
        (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
        * svg/SVGRenderingIntent.h:
        (WebCore::SVGRenderingIntent::SVGRenderingIntent):
        * svg/SVGUnitTypes.h:
        (WebCore::SVGUnitTypes::SVGUnitTypes):
        * svg/graphics/SVGPaintServerGradient.h:
        (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
        * svg/graphics/SVGResource.cpp:
        (WebCore::SVGResource::SVGResource):
        * xml/DOMParser.h:
        (WebCore::DOMParser::DOMParser):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::XMLHttpRequest):
        * xml/XMLSerializer.h:
        (WebCore::XMLSerializer::XMLSerializer):
        * xml/XPathEvaluator.h:
        (WebCore::XPathEvaluator::XPathEvaluator):
        * xml/XPathExpression.h:
        (WebCore::XPathExpression::XPathExpression):
        * xml/XPathNSResolver.h:
        (WebCore::XPathNSResolver::XPathNSResolver):
        * xml/XPathResult.cpp:
        (WebCore::XPathResult::XPathResult):
        * xml/XPathValue.h:
        (WebCore::XPath::ValueData::ValueData):
        * xml/XSLTProcessor.h:
        (WebCore::XSLTProcessor::XSLTProcessor):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent badc30f6
......@@ -40,7 +40,8 @@ const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* protoClass)
// FIXME: <rdar://problem/4949018>
: className(definition->className)
: RefCounted<OpaqueJSClass>(0)
, className(definition->className)
, parentClass(definition->parentClass)
, prototypeClass(0)
, staticValues(0)
......
2008-02-10 Darin Adler <darin@apple.com>
Reviewed by Eric.
- http://bugs.webkit.org/show_bug.cgi?id=17256
Make clients of RefCounted explicitly set the count to 0.
* API/JSClassRef.cpp:
(OpaqueJSClass::OpaqueJSClass):
* bindings/runtime_root.cpp:
(KJS::Bindings::RootObject::RootObject):
2008-02-09 Darin Adler <darin@apple.com>
Reviewed by Mitz.
......
......@@ -201,7 +201,8 @@ PassRefPtr<RootObject> RootObject::create(const void* nativeHandle, JSGlobalObje
}
RootObject::RootObject(const void* nativeHandle, JSGlobalObject* globalObject)
: m_isValid(true)
: RefCounted<RootObject>(0)
, m_isValid(true)
, m_nativeHandle(nativeHandle)
, m_globalObject(globalObject)
{
......
2008-02-10 Darin Adler <darin@apple.com>
Reviewed by Eric.
- http://bugs.webkit.org/show_bug.cgi?id=17256
Make clients of RefCounted explicitly set the count to 0.
* bindings/js/JSSVGPODTypeWrapper.h:
(WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
* css/CSSFontFace.h:
(WebCore::CSSFontFace::CSSFontFace):
* css/CSSRuleList.cpp:
(WebCore::CSSRuleList::CSSRuleList):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
* css/Counter.h:
(WebCore::Counter::Counter):
* css/Pair.h:
(WebCore::Pair::Pair):
* css/Rect.h:
(WebCore::Rect::Rect):
* css/StyleBase.h:
(WebCore::StyleBase::StyleBase):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::StyleSheetList):
* dom/Attr.cpp:
(WebCore::Attr::Attr):
* dom/Attr.h:
* dom/Attribute.h:
(WebCore::Attribute::Attribute):
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard):
* dom/DOMImplementation.h:
(WebCore::DOMImplementation::DOMImplementation):
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/EventListener.h:
(WebCore::EventListener::EventListener):
* dom/ExceptionBase.cpp:
(WebCore::ExceptionBase::ExceptionBase):
* dom/NamedAttrMap.h:
(WebCore::NamedAttrMap::insertAttribute):
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::NamedNodeMap):
* dom/NodeFilter.h:
(WebCore::NodeFilter::NodeFilter):
* dom/NodeFilterCondition.h:
(WebCore::NodeFilterCondition::NodeFilterCondition):
* dom/NodeList.h:
(WebCore::NodeList::NodeList):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
(WebCore::QualifiedName::ref):
* dom/Range.cpp:
(WebCore::Range::Range):
* dom/RegisteredEventListener.cpp:
(WebCore::RegisteredEventListener::RegisteredEventListener):
* dom/StyledElement.h:
* dom/Traversal.cpp:
(WebCore::Traversal::Traversal):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* history/BackForwardList.cpp:
(WebCore::BackForwardList::BackForwardList):
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* html/CanvasGradient.cpp:
(WebCore::CanvasGradient::CanvasGradient):
* html/CanvasPattern.cpp:
(WebCore::CanvasPattern::CanvasPattern):
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
* html/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
* html/MediaError.h:
(WebCore::MediaError::MediaError):
* html/TimeRanges.cpp:
(TimeRanges::TimeRanges):
* html/TimeRanges.h:
(WebCore::TimeRanges::TimeRanges):
* html/VoidCallback.h:
(WebCore::VoidCallback::VoidCallback):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
* loader/FormState.cpp:
(WebCore::FormState::FormState):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::TextResourceDecoder):
* loader/icon/IconRecord.cpp:
(WebCore::IconRecord::IconRecord):
* page/BarInfo.cpp:
(WebCore::BarInfo::BarInfo):
* page/Console.cpp:
(WebCore::Console::Console):
* page/DOMSelection.cpp:
(WebCore::DOMSelection::DOMSelection):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow):
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/History.cpp:
(WebCore::History::History):
* page/InspectorController.cpp:
(WebCore::InspectorResource::InspectorResource):
(WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
* page/Plugin.h:
(WebCore::Plugin::Plugin):
* page/Screen.cpp:
(WebCore::Screen::Screen):
* platform/ArrayImpl.cpp:
(WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
* platform/DeprecatedValueListImpl.cpp:
(WebCore::DeprecatedValueListImpl::Private::Private):
* platform/ScrollBar.cpp:
(WebCore::Scrollbar::Scrollbar):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::SharedBuffer):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontFallbackList::FontFallbackList):
* platform/graphics/FontFamily.cpp:
(WebCore::FontFamily::FontFamily):
* platform/graphics/FontFamily.h:
(WebCore::FontFamily::FontFamily):
* platform/graphics/FontSelector.h:
(WebCore::FontSelector::FontSelector):
(WebCore::FontSelector::~FontSelector):
* platform/graphics/GlyphPageTreeNode.h:
(WebCore::GlyphPage::GlyphPage):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::Icon):
* platform/mac/FileChooserMac.mm:
(WebCore::FileChooser::FileChooser):
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenu::PopupMenu):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::SharedBuffer):
* platform/network/FormData.cpp:
(WebCore::FormData::FormData):
* platform/network/FormData.h:
(WebCore::FormData::FormData):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::ResourceHandle):
* platform/text/CString.h:
(WebCore::CStringBuffer::CStringBuffer):
* platform/text/RegularExpression.cpp:
(WebCore::RegularExpression::Private::Private):
* rendering/RenderStyle.cpp:
(WebCore::StyleSurroundData::StyleSurroundData):
(WebCore::StyleBoxData::StyleBoxData):
(WebCore::StyleVisualData::StyleVisualData):
(WebCore::StyleBackgroundData::StyleBackgroundData):
(WebCore::StyleMarqueeData::StyleMarqueeData):
(WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleTransformData::StyleTransformData):
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleInheritedData::StyleInheritedData):
* rendering/RenderStyle.h:
(WebCore::TransformOperation::TransformOperation):
(WebCore::CursorList::CursorList):
* rendering/SVGCharacterLayoutInfo.h:
(WebCore::SVGCharOnPath::SVGCharOnPath):
* rendering/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::SVGRenderStyle):
* rendering/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::SVGRenderStyle):
* rendering/SVGRenderStyleDefs.cpp:
(StyleFillData::StyleFillData):
(StyleStrokeData::StyleStrokeData):
(StyleStopData::StyleStopData):
(StyleTextData::StyleTextData):
(StyleClipData::StyleClipData):
(StyleMaskData::StyleMaskData):
(StyleMarkerData::StyleMarkerData):
(StyleMiscData::StyleMiscData):
* storage/SQLResultSetRowList.h:
(WebCore::SQLResultSetRowList::SQLResultSetRowList):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::SVGAngle):
* svg/SVGAnimatedTemplate.h:
(WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
* svg/SVGElementInstanceList.cpp:
(WebCore::SVGElementInstanceList::SVGElementInstanceList):
* svg/SVGList.h:
(WebCore::SVGList::SVGList):
(WebCore::SVGPODListItem::SVGPODListItem):
* svg/SVGPathSeg.h:
(WebCore::SVGPathSeg::SVGPathSeg):
* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
* svg/SVGRenderingIntent.h:
(WebCore::SVGRenderingIntent::SVGRenderingIntent):
* svg/SVGUnitTypes.h:
(WebCore::SVGUnitTypes::SVGUnitTypes):
* svg/graphics/SVGPaintServerGradient.h:
(WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
* svg/graphics/SVGResource.cpp:
(WebCore::SVGResource::SVGResource):
* xml/DOMParser.h:
(WebCore::DOMParser::DOMParser):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
* xml/XMLSerializer.h:
(WebCore::XMLSerializer::XMLSerializer):
* xml/XPathEvaluator.h:
(WebCore::XPathEvaluator::XPathEvaluator):
* xml/XPathExpression.h:
(WebCore::XPathExpression::XPathExpression):
* xml/XPathNSResolver.h:
(WebCore::XPathNSResolver::XPathNSResolver):
* xml/XPathResult.cpp:
(WebCore::XPathResult::XPathResult):
* xml/XPathValue.h:
(WebCore::XPath::ValueData::ValueData):
* xml/XSLTProcessor.h:
(WebCore::XSLTProcessor::XSLTProcessor):
2008-02-09 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Eric Seidel.
......@@ -38,9 +38,9 @@
namespace WebCore {
template<typename PODType>
class JSSVGPODTypeWrapper : public RefCounted<JSSVGPODTypeWrapper<PODType> >
{
class JSSVGPODTypeWrapper : public RefCounted<JSSVGPODTypeWrapper<PODType> > {
public:
JSSVGPODTypeWrapper() : RefCounted<JSSVGPODTypeWrapper<PODType> >(0) { }
virtual ~JSSVGPODTypeWrapper() { }
// Getter wrapper
......
......@@ -39,7 +39,8 @@ class SimpleFontData;
class CSSFontFace : public RefCounted<CSSFontFace> {
public:
CSSFontFace()
: m_segmentedFontFace(0)
: RefCounted<CSSFontFace>(0)
, m_segmentedFontFace(0)
{
}
......
......@@ -30,10 +30,12 @@
namespace WebCore {
CSSRuleList::CSSRuleList()
: RefCounted<CSSRuleList>(0)
{
}
CSSRuleList::CSSRuleList(StyleList* list, bool omitCharsetRules)
: RefCounted<CSSRuleList>(0)
{
if (list) {
unsigned len = list->length();
......
......@@ -35,7 +35,8 @@
namespace WebCore {
CSSSegmentedFontFace::CSSSegmentedFontFace(CSSFontSelector* fontSelector)
: m_fontSelector(fontSelector)
: RefCounted<CSSSegmentedFontFace>(0)
, m_fontSelector(fontSelector)
{
}
......
......@@ -33,7 +33,8 @@ namespace WebCore {
class Counter : public RefCounted<Counter> {
public:
Counter(PassRefPtr<CSSPrimitiveValue> identifier, PassRefPtr<CSSPrimitiveValue> listStyle, PassRefPtr<CSSPrimitiveValue> separator)
: m_identifier(identifier)
: RefCounted<Counter>(0)
, m_identifier(identifier)
, m_listStyle(listStyle)
, m_separator(separator)
{
......
......@@ -35,9 +35,9 @@ namespace WebCore {
// it (eliminating some extra -webkit- internal properties).
class Pair : public RefCounted<Pair> {
public:
Pair() : m_first(0), m_second(0) { }
Pair() : RefCounted<Pair>(0), m_first(0), m_second(0) { }
Pair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second)
: m_first(first), m_second(second) { }
: RefCounted<Pair>(0), m_first(first), m_second(second) { }
virtual ~Pair() { }
CSSPrimitiveValue* first() const { return m_first.get(); }
......
......@@ -30,6 +30,7 @@ namespace WebCore {
class Rect : public RefCounted<Rect> {
public:
Rect() : RefCounted<Rect>(0) { }
virtual ~Rect() { }
CSSPrimitiveValue* top() const { return m_top.get(); }
......@@ -42,7 +43,7 @@ namespace WebCore {
void setBottom(PassRefPtr<CSSPrimitiveValue> bottom) { m_bottom = bottom; }
void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
protected:
private:
RefPtr<CSSPrimitiveValue> m_top;
RefPtr<CSSPrimitiveValue> m_right;
RefPtr<CSSPrimitiveValue> m_bottom;
......
......@@ -36,9 +36,11 @@ namespace WebCore {
class StyleBase : public RefCounted<StyleBase> {
public:
StyleBase(StyleBase* parent)
: m_parent(parent)
: RefCounted<StyleBase>(0)
, m_parent(parent)
, m_strictParsing(!parent || parent->useStrictParsing())
{ }
{
}
virtual ~StyleBase() { }
StyleBase* parent() const { return m_parent; }
......
......@@ -34,7 +34,8 @@ namespace WebCore {
using namespace HTMLNames;
StyleSheetList::StyleSheetList(Document* doc)
: m_doc(doc)
: RefCounted<StyleSheetList>(0)
, m_doc(doc)
{
}
......
......@@ -30,7 +30,7 @@
namespace WebCore {
Attr::Attr(Element* element, Document* docPtr, Attribute* a)
Attr::Attr(Element* element, Document* docPtr, PassRefPtr<Attribute> a)
: ContainerNode(docPtr),
m_element(element),
m_attribute(a),
......
......@@ -46,7 +46,7 @@ class Attr : public ContainerNode {
friend class NamedAttrMap;
public:
Attr(Element*, Document*, Attribute*);
Attr(Element*, Document*, PassRefPtr<Attribute>);
~Attr();
// Call this after calling the constructor so the
......
......@@ -48,11 +48,11 @@ class Attribute : public RefCounted<Attribute> {
public:
// null value is forbidden !
Attribute(const QualifiedName& name, const AtomicString& value)
: m_name(name), m_value(value), m_impl(0)
: RefCounted<Attribute>(0), m_name(name), m_value(value), m_impl(0)
{}
Attribute(const AtomicString& name, const AtomicString& value)
: m_name(nullAtom, name, nullAtom), m_value(value), m_impl(0)
: RefCounted<Attribute>(0), m_name(nullAtom, name, nullAtom), m_value(value), m_impl(0)
{}
virtual ~Attribute() { }
......@@ -70,7 +70,7 @@ public:
bool isNull() const { return m_value.isNull(); }
bool isEmpty() const { return m_value.isEmpty(); }
virtual Attribute* clone(bool preserveDecl=true) const;
virtual Attribute* clone(bool preserveDecl = true) const;
// An extension to get the style information for presentational attributes.
virtual CSSStyleDeclaration* style() const { return 0; }
......
......@@ -35,7 +35,8 @@
namespace WebCore {
Clipboard::Clipboard(ClipboardAccessPolicy policy, bool isForDragging)
: m_policy(policy)
: RefCounted<Clipboard>(0)
, m_policy(policy)
, m_dragStarted(false)
, m_forDragging(isForDragging)
, m_dragImage(0)
......
......@@ -42,7 +42,8 @@ typedef int ExceptionCode;
class DOMImplementation : public RefCounted<DOMImplementation> {
public:
virtual ~DOMImplementation();
DOMImplementation() : RefCounted<DOMImplementation>(0) { }
virtual ~DOMImplementation();
// DOM methods & attributes for DOMImplementation
bool hasFeature(const String& feature, const String& version) const;
......
......@@ -30,7 +30,8 @@
namespace WebCore {
Event::Event()
: m_canBubble(false)
: RefCounted<Event>(0)
, m_canBubble(false)
, m_cancelable(false)
, m_propagationStopped(false)
, m_defaultPrevented(false)
......@@ -43,7 +44,8 @@ Event::Event()
}
Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg)
: m_type(eventType)
: RefCounted<Event>(0)
, m_type(eventType)
, m_canBubble(canBubbleArg)
, m_cancelable(cancelableArg)
, m_propagationStopped(false)
......
......@@ -29,6 +29,7 @@ namespace WebCore {
class EventListener : public RefCounted<EventListener> {
public:
EventListener() : RefCounted<EventListener>(0) { }
virtual ~EventListener() { }
virtual void handleEvent(Event*, bool isWindowEvent = false) = 0;
virtual bool isHTMLEventListener() const { return false; }
......
......@@ -32,6 +32,7 @@
namespace WebCore {
ExceptionBase::ExceptionBase(const ExceptionCodeDescription& description)
: RefCounted<ExceptionBase>(0)
{
m_code = description.code;
if (description.name) {
......
......@@ -68,7 +68,8 @@ public:
// used during parsing: only inserts if not already there
// no error checking!
void insertAttribute(PassRefPtr<Attribute> newAttribute, bool allowDuplicates) {
void insertAttribute(PassRefPtr<Attribute> newAttribute, bool allowDuplicates)
{
ASSERT(!element);
if (allowDuplicates || !getAttributeItem(newAttribute->name()))
addAttribute(newAttribute);
......@@ -83,7 +84,7 @@ public:
protected:
// this method is internal, does no error checking at all
void addAttribute(PassRefPtr<Attribute> newAttribute);
void addAttribute(PassRefPtr<Attribute>);
// this method is internal, does no error checking at all
void removeAttribute(const QualifiedName& name);
virtual void clearAttributes();
......
......@@ -41,7 +41,7 @@ typedef int ExceptionCode;
// Other classes implement this for more specific situations e.g. attributes of an element.
class NamedNodeMap : public RefCounted<NamedNodeMap> {
public:
NamedNodeMap() { }
NamedNodeMap() : RefCounted<NamedNodeMap>(0) { }
virtual ~NamedNodeMap() { }
virtual PassRefPtr<Node> getNamedItem(const String& name) const = 0;
......
......@@ -65,7 +65,7 @@ namespace WebCore {
SHOW_NOTATION = 0x00000800
};
NodeFilter(PassRefPtr<NodeFilterCondition> condition) : m_condition(condition) { }
NodeFilter(PassRefPtr<NodeFilterCondition> condition) : RefCounted<NodeFilter>(0), m_condition(condition) { }
short acceptNode(Node*, KJS::JSValue*& exception) const;
void mark() { m_condition->mark(); };
......
......@@ -37,6 +37,7 @@ namespace WebCore {
class NodeFilterCondition : public RefCounted<NodeFilterCondition> {
public:
NodeFilterCondition() : RefCounted<NodeFilterCondition>(0) { }
virtual ~NodeFilterCondition() { }
virtual short acceptNode(Node*, KJS::JSValue*& exception) const;
virtual void mark() { }
......
......@@ -33,7 +33,7 @@ namespace WebCore {
class NodeList : public RefCounted<NodeList> {
public:
NodeList() { }
NodeList() : RefCounted<NodeList>(0) { }
virtual ~NodeList() { }
// DOM methods & attributes for NodeList
......
......@@ -30,8 +30,13 @@ class QualifiedName {
public:
class QualifiedNameImpl : public RefCounted<QualifiedNameImpl> {
public:
QualifiedNameImpl(const AtomicString& p, const AtomicString& l, const AtomicString& n) :m_prefix(p), m_localName(l), m_namespace(n) {}
QualifiedNameImpl(const AtomicString& p, const AtomicString& l, const AtomicString& n)
: RefCounted<QualifiedNameImpl>(0)
, m_prefix(p)
, m_localName(l)
, m_namespace(n)
{
}
AtomicString m_prefix;
AtomicString m_localName;
AtomicString m_namespace;
......@@ -66,8 +71,7 @@ public:
static void init();
private:
void ref() { m_impl->ref(); }
void ref() { m_impl->ref(); }
void deref();
QualifiedNameImpl* m_impl;
......
......@@ -57,7 +57,8 @@ static RangeCounter rangeCounter;
#endif
Range::Range(Document* ownerDocument)
: m_ownerDocument(ownerDocument)
: RefCounted<Range>(0)
, m_ownerDocument(ownerDocument)
, m_startContainer(ownerDocument)
, m_startOffset(0)
, m_endContainer(ownerDocument)
......@@ -72,7 +73,8 @@ Range::Range(Document* ownerDocument)
Range::Range(Document* ownerDocument,
Node* startContainer, int startOffset,
Node* endContainer, int endOffset)
: m_ownerDocument(ownerDocument)
: RefCounted<Range>(0)
, m_ownerDocument(ownerDocument)
, m_startContainer(ownerDocument)
, m_startOffset(0)
, m_endContainer(ownerDocument)
......@@ -92,7 +94,8 @@ Range::Range(Document* ownerDocument,
}
Range::Range(Document* ownerDocument, const Position& start, const Position& end)
: m_ownerDocument(ownerDocument)
: RefCounted<Range>(0)
, m_ownerDocument(ownerDocument)
, m_startContainer(ownerDocument)
, m_startOffset(0)
, m_endContainer(ownerDocument)
......
......@@ -30,7 +30,8 @@
namespace WebCore {
RegisteredEventListener::RegisteredEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
: m_eventType(eventType)
: RefCounted<RegisteredEventListener>(0)
, m_eventType(eventType)
, m_listener(listener)
, m_useCapture(useCapture)
, m_removed(false)
......