Commit 6ab8a185 authored by andersca's avatar andersca

2006-01-03 Anders Carlsson <andersca@mac.com>

        Reviewed by Eric.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
        JS objects missing "prototype" properties

        * khtml/ecma/XSLTProcessor.cpp:
        (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
        * khtml/ecma/XSLTProcessor.h:
        * khtml/ecma/domparser.cpp:
        (KJS::DOMParserConstructorImp::DOMParserConstructorImp):
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
        * khtml/ecma/xmlserializer.cpp:
        (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
        Add "prototype" property in constructors.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 75691022
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
JS objects missing "prototype" properties
* khtml/ecma/XSLTProcessor.cpp:
(KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
* khtml/ecma/XSLTProcessor.h:
* khtml/ecma/domparser.cpp:
(KJS::DOMParserConstructorImp::DOMParserConstructorImp):
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
* khtml/ecma/xmlserializer.cpp:
(KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
Add "prototype" property in constructors.
2006-01-03 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
......
......@@ -151,6 +151,11 @@ JSValue *XSLTProcessorProtoFunc::callAsFunction(ExecState *exec, JSObject *thisO
return jsUndefined();
}
XSLTProcessorConstructorImp::XSLTProcessorConstructorImp(ExecState *exec)
{
putDirect(prototypePropertyName, XSLTProcessorProto::self(exec), DontEnum|DontDelete|ReadOnly);
}
};
#endif // KHTML_XSLT
......@@ -59,7 +59,7 @@ private:
class XSLTProcessorConstructorImp : public JSObject {
public:
XSLTProcessorConstructorImp(ExecState *) { }
XSLTProcessorConstructorImp(ExecState *);
virtual bool implementsConstruct() const { return true; }
virtual JSObject *construct(ExecState *exec, const List &args) { return new XSLTProcessor(exec); }
};
......
......@@ -40,9 +40,10 @@ KJS_DEFINE_PROTOTYPE(DOMParserProto)
KJS_IMPLEMENT_PROTOFUNC(DOMParserProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("DOMParser",DOMParserProto,DOMParserProtoFunc)
DOMParserConstructorImp::DOMParserConstructorImp(ExecState *, DOM::DocumentImpl *d)
DOMParserConstructorImp::DOMParserConstructorImp(ExecState *exec, DOM::DocumentImpl *d)
: doc(d)
{
putDirect(prototypePropertyName, DOMParserProto::self(exec), DontEnum|DontDelete|ReadOnly);
}
bool DOMParserConstructorImp::implementsConstruct() const
......
......@@ -131,9 +131,10 @@ void XMLHttpRequestQObject::slotRedirection( KIO::Job* job, const KURL& url)
jsObject->slotRedirection( job, url );
}
XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp(ExecState *, DOM::DocumentImpl *d)
XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp(ExecState *exec, DOM::DocumentImpl *d)
: doc(d)
{
putDirect(prototypePropertyName, XMLHttpRequestProto::self(exec), DontEnum|DontDelete|ReadOnly);
}
XMLHttpRequestConstructorImp::~XMLHttpRequestConstructorImp()
......
......@@ -46,9 +46,10 @@ KJS_DEFINE_PROTOTYPE(XMLSerializerProto)
KJS_IMPLEMENT_PROTOFUNC(XMLSerializerProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("XMLSerializer",XMLSerializerProto,XMLSerializerProtoFunc)
XMLSerializerConstructorImp::XMLSerializerConstructorImp(ExecState *)
XMLSerializerConstructorImp::XMLSerializerConstructorImp(ExecState *exec)
: JSObject()
{
putDirect(prototypePropertyName, XMLSerializerProto::self(exec), DontEnum|DontDelete|ReadOnly);
}
bool XMLSerializerConstructorImp::implementsConstruct() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment