Reviewed by Darin.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2005 20:40:55 +0000 (20:40 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 May 2005 20:40:55 +0000 (20:40 +0000)
commit86caab53f2d59de9fe83daf12c6898d92c26ef8d
tree59a59df09d7a99b802402001b0e94da58ab8aeb6
parent0382c02c13504ffb9841b6c5c6e6783e99582df0
    Reviewed by Darin.

<rdar://problem/4058167> Unit Converter and Weather widgets crashed in KJS::Collector::markCurrentThreadConservatively

Avoid possibly allocating new prototype objects as parameters to
superclass constructors - there may be an allocated but
uninitilized object so this is a bad time to allocate. Instead,
set the prototype in the constructor body, since the object is
happily allocated by then.

* khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_css.cpp:
        (DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
        (DOMMediaList::DOMMediaList):
        (DOMCSSStyleSheet::DOMCSSStyleSheet):
        (DOMCSSPrimitiveValue::DOMCSSPrimitiveValue):
        (DOMCSSValueList::DOMCSSValueList):
        * khtml/ecma/kjs_css.h:
        (KJS::DOMStyleSheet::DOMStyleSheet):
        (KJS::DOMCSSValue::DOMCSSValue):
        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::DOMNode):
        (DOMDocument::DOMDocument):
        (DOMElement::DOMElement):
        (DOMDOMImplementation::DOMDOMImplementation):
        (DOMNamedNodeMap::DOMNamedNodeMap):
        (DOMNamedNodesCollection::DOMNamedNodesCollection):
        (DOMCharacterData::DOMCharacterData):
        (DOMText::DOMText):
        * khtml/ecma/kjs_dom.h:
        (KJS::NodeConstructor::NodeConstructor):
        (KJS::DOMExceptionConstructor::DOMExceptionConstructor):
        * khtml/ecma/kjs_events.cpp:
        (DOMEvent::DOMEvent):
        (Clipboard::Clipboard):
        * khtml/ecma/kjs_html.cpp:
        (HTMLCollection::HTMLCollection):
        * khtml/ecma/kjs_range.cpp:
        (DOMRange::DOMRange):
        * khtml/ecma/kjs_traversal.cpp:
        (DOMNodeIterator::DOMNodeIterator):
        (DOMNodeFilter::DOMNodeFilter):
        (DOMTreeWalker::DOMTreeWalker):
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::XMLHttpRequest):
        * khtml/ecma/xmlserializer.cpp:
        (KJS::XMLSerializer::XMLSerializer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_binding.h
WebCore/khtml/ecma/kjs_css.cpp
WebCore/khtml/ecma/kjs_css.h
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_dom.h
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_range.cpp
WebCore/khtml/ecma/kjs_traversal.cpp
WebCore/khtml/ecma/xmlhttprequest.cpp
WebCore/khtml/ecma/xmlserializer.cpp