[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:56:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit dab5019b5ebfb0934565bb53f600e57dd0601bbc
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 1 01:15:22 2002 +0000

    	- fixed huge leak when doing page load test
    
            * khtml/ecma/kjs_binding.h:
            * khtml/ecma/kjs_binding.cpp: Remove ScriptInterpreter::mark().
    	We don't want to mark the elements of m_domObjects, because we don't want
    	to keep them around the entire lifetime of the interpreter. This is fine
    	because we already have forgetDOMObject(), which takes care of when they
    	are deallocated.
    
            * khtml/ecma/kjs_dom.cpp:
            * khtml/ecma/kjs_dom.h:
            * khtml/ecma/kjs_html.cpp:
            * khtml/ecma/kjs_html.h:
    	Changed lots of parameters to pass by const reference for a bit of a code
    	size and performance gain.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 08a80b7..180762d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-10-31  Darin Adler  <darin at apple.com>
+
+	- fixed huge leak when doing page load test
+
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_binding.cpp: Remove ScriptInterpreter::mark().
+	We don't want to mark the elements of m_domObjects, because we don't want
+	to keep them around the entire lifetime of the interpreter. This is fine
+	because we already have forgetDOMObject(), which takes care of when they
+	are deallocated.
+
+        * khtml/ecma/kjs_dom.cpp:
+        * khtml/ecma/kjs_dom.h:
+        * khtml/ecma/kjs_html.cpp:
+        * khtml/ecma/kjs_html.h:
+	Changed lots of parameters to pass by const reference for a bit of a code
+	size and performance gain.
+
 2002-10-31  Richard Williamson  <rjw at apple.com>
 
         Turned on use of lookup tables.
@@ -17,7 +35,7 @@
 	select element updates if the contents of the option subelements
 	are changed.
 
-=== 30 ===
+=== Alexander-30 ===
 
 2002-10-30  Maciej Stachowiak  <mjs at apple.com>
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 08a80b7..180762d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,21 @@
+2002-10-31  Darin Adler  <darin at apple.com>
+
+	- fixed huge leak when doing page load test
+
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_binding.cpp: Remove ScriptInterpreter::mark().
+	We don't want to mark the elements of m_domObjects, because we don't want
+	to keep them around the entire lifetime of the interpreter. This is fine
+	because we already have forgetDOMObject(), which takes care of when they
+	are deallocated.
+
+        * khtml/ecma/kjs_dom.cpp:
+        * khtml/ecma/kjs_dom.h:
+        * khtml/ecma/kjs_html.cpp:
+        * khtml/ecma/kjs_html.h:
+	Changed lots of parameters to pass by const reference for a bit of a code
+	size and performance gain.
+
 2002-10-31  Richard Williamson  <rjw at apple.com>
 
         Turned on use of lookup tables.
@@ -17,7 +35,7 @@
 	select element updates if the contents of the option subelements
 	are changed.
 
-=== 30 ===
+=== Alexander-30 ===
 
 2002-10-30  Maciej Stachowiak  <mjs at apple.com>
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 08a80b7..180762d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,21 @@
+2002-10-31  Darin Adler  <darin at apple.com>
+
+	- fixed huge leak when doing page load test
+
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_binding.cpp: Remove ScriptInterpreter::mark().
+	We don't want to mark the elements of m_domObjects, because we don't want
+	to keep them around the entire lifetime of the interpreter. This is fine
+	because we already have forgetDOMObject(), which takes care of when they
+	are deallocated.
+
+        * khtml/ecma/kjs_dom.cpp:
+        * khtml/ecma/kjs_dom.h:
+        * khtml/ecma/kjs_html.cpp:
+        * khtml/ecma/kjs_html.h:
+	Changed lots of parameters to pass by const reference for a bit of a code
+	size and performance gain.
+
 2002-10-31  Richard Williamson  <rjw at apple.com>
 
         Turned on use of lookup tables.
@@ -17,7 +35,7 @@
 	select element updates if the contents of the option subelements
 	are changed.
 
-=== 30 ===
+=== Alexander-30 ===
 
 2002-10-30  Maciej Stachowiak  <mjs at apple.com>
 
diff --git a/WebCore/khtml/ecma/kjs_binding.cpp b/WebCore/khtml/ecma/kjs_binding.cpp
index d197be7..ea80f79 100644
--- a/WebCore/khtml/ecma/kjs_binding.cpp
+++ b/WebCore/khtml/ecma/kjs_binding.cpp
@@ -163,15 +163,6 @@ void ScriptInterpreter::forgetDOMObject( void* objectHandle )
   }
 }
 
-void ScriptInterpreter::mark()
-{
-  Interpreter::mark();
-  kdDebug(6070) << "ScriptInterpreter::mark marking " << m_domObjects.count() << " DOM objects" << endl;
-  QPtrDictIterator<DOMObject> it( m_domObjects );
-  for( ; it.current(); ++it )
-    it.current()->mark();
-}
-
 bool ScriptInterpreter::isWindowOpenAllowed() const
 {
   if ( m_evt )
diff --git a/WebCore/khtml/ecma/kjs_binding.h b/WebCore/khtml/ecma/kjs_binding.h
index 6b8b7dd..5a05bd4 100644
--- a/WebCore/khtml/ecma/kjs_binding.h
+++ b/WebCore/khtml/ecma/kjs_binding.h
@@ -101,10 +101,6 @@ namespace KJS {
      */
     static void forgetDOMObject( void* objectHandle );
 
-    /**
-     * Mark objects in the DOMObject cache.
-     */
-    virtual void mark();
     KHTMLPart* part() const { return m_part; }
 
     virtual int rtti() { return 1; }
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 1f3fc24..c0febb6 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -66,12 +66,12 @@ IMPLEMENT_PROTOTYPE(DOMNodeProto,DOMNodeProtoFunc)
 
 const ClassInfo DOMNode::info = { "Node", 0, &DOMNodeTable, 0 };
 
-DOMNode::DOMNode(ExecState *exec, DOM::Node n)
+DOMNode::DOMNode(ExecState *exec, const DOM::Node &n)
   : DOMObject(DOMNodeProto::self(exec)), node(n)
 {
 }
 
-DOMNode::DOMNode(Object proto, DOM::Node n)
+DOMNode::DOMNode(const Object &proto, const DOM::Node &n)
   : DOMObject(proto), node(n)
 {
 }
@@ -687,10 +687,10 @@ const ClassInfo DOMDocument::info = { "Document", &DOMNode::info, &DOMDocumentTa
 @end
 */
 
-DOMDocument::DOMDocument(ExecState *exec, DOM::Document d)
+DOMDocument::DOMDocument(ExecState *exec, const DOM::Document &d)
   : DOMNode(DOMDocumentProto::self(exec), d) { }
 
-DOMDocument::DOMDocument(Object proto, DOM::Document d)
+DOMDocument::DOMDocument(const Object &proto, const DOM::Document &d)
   : DOMNode(proto, d) { }
 
 Value DOMDocument::tryGet(ExecState *exec, const UString &propertyName) const
@@ -880,10 +880,10 @@ const ClassInfo DOMElement::info = { "Element", &DOMNode::info, &DOMElementTable
   style		DOMElement::Style                           DontDelete|ReadOnly
 @end
 */
-DOMElement::DOMElement(ExecState *exec, DOM::Element e)
+DOMElement::DOMElement(ExecState *exec, const DOM::Element &e)
   : DOMNode(DOMElementProto::self(exec), e) { }
 
-DOMElement::DOMElement(Object proto, DOM::Element e)
+DOMElement::DOMElement(const Object &proto, const DOM::Element &e)
   : DOMNode(proto, e) { }
 
 Value DOMElement::tryGet(ExecState *exec, const UString &propertyName) const
@@ -988,7 +988,7 @@ IMPLEMENT_PROTOTYPE(DOMDOMImplementationProto,DOMDOMImplementationProtoFunc)
 
 const ClassInfo DOMDOMImplementation::info = { "DOMImplementation", 0, 0, 0 };
 
-DOMDOMImplementation::DOMDOMImplementation(ExecState *exec, DOM::DOMImplementation i)
+DOMDOMImplementation::DOMDOMImplementation(ExecState *exec, const DOM::DOMImplementation &i)
   : DOMObject(DOMDOMImplementationProto::self(exec)), implementation(i) { }
 
 DOMDOMImplementation::~DOMDOMImplementation()
@@ -1037,7 +1037,7 @@ const ClassInfo DOMDocumentType::info = { "DocumentType", &DOMNode::info, &DOMDo
   internalSubset	DOMDocumentType::InternalSubset	DontDelete|ReadOnly
 @end
 */
-DOMDocumentType::DOMDocumentType(ExecState *exec, DOM::DocumentType dt)
+DOMDocumentType::DOMDocumentType(ExecState *exec, const DOM::DocumentType &dt)
   : DOMNode( /*### no proto yet*/exec, dt ) { }
 
 Value DOMDocumentType::tryGet(ExecState *exec, const UString &propertyName) const
@@ -1087,7 +1087,7 @@ IMPLEMENT_PROTOTYPE(DOMNamedNodeMapProto,DOMNamedNodeMapProtoFunc)
 
 const ClassInfo DOMNamedNodeMap::info = { "NamedNodeMap", 0, 0, 0 };
 
-DOMNamedNodeMap::DOMNamedNodeMap(ExecState *exec, DOM::NamedNodeMap m)
+DOMNamedNodeMap::DOMNamedNodeMap(ExecState *exec, const DOM::NamedNodeMap &m)
   : DOMObject(DOMNamedNodeMapProto::self(exec)), map(m) { }
 
 DOMNamedNodeMap::~DOMNamedNodeMap()
@@ -1251,7 +1251,7 @@ Value DOMEntity::getValueProperty(ExecState *, int token) const
 
 // -------------------------------------------------------------------------
 
-Value KJS::getDOMNode(ExecState *exec, DOM::Node n)
+Value KJS::getDOMNode(ExecState *exec, const DOM::Node &n)
 {
   DOMObject *ret = 0;
   if (n.isNull())
@@ -1309,17 +1309,17 @@ Value KJS::getDOMNode(ExecState *exec, DOM::Node n)
   return Value(ret);
 }
 
-Value KJS::getDOMNamedNodeMap(ExecState *exec, DOM::NamedNodeMap m)
+Value KJS::getDOMNamedNodeMap(ExecState *exec, const DOM::NamedNodeMap &m)
 {
   return Value(cacheDOMObject<DOM::NamedNodeMap, KJS::DOMNamedNodeMap>(exec, m));
 }
 
-Value KJS::getDOMNodeList(ExecState *exec, DOM::NodeList l)
+Value KJS::getDOMNodeList(ExecState *exec, const DOM::NodeList &l)
 {
   return Value(cacheDOMObject<DOM::NodeList, KJS::DOMNodeList>(exec, l));
 }
 
-Value KJS::getDOMDOMImplementation(ExecState *exec, DOM::DOMImplementation i)
+Value KJS::getDOMDOMImplementation(ExecState *exec, const DOM::DOMImplementation &i)
 {
   return Value(cacheDOMObject<DOM::DOMImplementation, KJS::DOMDOMImplementation>(exec, i));
 }
@@ -1472,7 +1472,7 @@ Object KJS::getDOMExceptionConstructor(ExecState *exec)
 // Such a collection is usually very short-lived, it only exists
 // for constructs like document.forms.<name>[1],
 // so it shouldn't be a problem that it's storing all the nodes (with the same name). (David)
-DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *, QValueList<DOM::Node>& nodes )
+DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *, const QValueList<DOM::Node>& nodes )
   : DOMObject(), m_nodes(nodes)
 {
   // Maybe we should ref (and deref in the dtor) the nodes, though ?
@@ -1513,10 +1513,10 @@ DEFINE_PROTOTYPE("DOMCharacterData",DOMCharacterDataProto)
 IMPLEMENT_PROTOFUNC(DOMCharacterDataProtoFunc)
 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMCharacterDataProto,DOMCharacterDataProtoFunc, DOMNodeProto)
 
-DOMCharacterData::DOMCharacterData(ExecState *exec, DOM::CharacterData d)
+DOMCharacterData::DOMCharacterData(ExecState *exec, const DOM::CharacterData &d)
  : DOMNode(DOMCharacterDataProto::self(exec), d) {}
 
-DOMCharacterData::DOMCharacterData(Object proto, DOM::CharacterData d)
+DOMCharacterData::DOMCharacterData(const Object &proto, const DOM::CharacterData &d)
  : DOMNode(proto, d) {}
 
 Value DOMCharacterData::tryGet(ExecState *exec, const UString &p) const
@@ -1594,7 +1594,7 @@ DEFINE_PROTOTYPE("DOMText",DOMTextProto)
 IMPLEMENT_PROTOFUNC(DOMTextProtoFunc)
 IMPLEMENT_PROTOTYPE_WITH_PARENT(DOMTextProto,DOMTextProtoFunc,DOMCharacterDataProto)
 
-DOMText::DOMText(ExecState *exec, DOM::Text t)
+DOMText::DOMText(ExecState *exec, const DOM::Text &t)
   : DOMCharacterData(DOMTextProto::self(exec), t) { }
 
 Value DOMText::tryGet(ExecState *exec, const UString &p) const
diff --git a/WebCore/khtml/ecma/kjs_dom.h b/WebCore/khtml/ecma/kjs_dom.h
index 4fa3b2b..7758764 100644
--- a/WebCore/khtml/ecma/kjs_dom.h
+++ b/WebCore/khtml/ecma/kjs_dom.h
@@ -33,9 +33,9 @@ namespace KJS {
   class DOMNode : public DOMObject {
   public:
     // Build a DOMNode
-    DOMNode(ExecState *exec, DOM::Node n);
+    DOMNode(ExecState *exec, const DOM::Node &n);
     // Constructor for inherited classes
-    DOMNode(Object proto, DOM::Node n);
+    DOMNode(const Object &proto, const DOM::Node &n);
     ~DOMNode();
     virtual bool toBoolean(ExecState *) const;
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
@@ -72,7 +72,7 @@ namespace KJS {
 
   class DOMNodeList : public DOMObject {
   public:
-    DOMNodeList(ExecState *, DOM::NodeList l) : list(l) { }
+    DOMNodeList(ExecState *, const DOM::NodeList &l) : list(l) { }
     ~DOMNodeList();
     virtual bool hasProperty(ExecState *exec, const UString &p) const;
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
@@ -101,9 +101,9 @@ namespace KJS {
   class DOMDocument : public DOMNode {
   public:
     // Build a DOMDocument
-    DOMDocument(ExecState *exec, DOM::Document d);
+    DOMDocument(ExecState *exec, const DOM::Document &d);
     // Constructor for inherited classes
-    DOMDocument(Object proto, DOM::Document d);
+    DOMDocument(const Object &proto, const DOM::Document &d);
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
@@ -123,7 +123,7 @@ namespace KJS {
 
   class DOMAttr : public DOMNode {
   public:
-    DOMAttr(ExecState *exec, DOM::Attr a) : DOMNode(exec, a) { }
+    DOMAttr(ExecState *exec, const DOM::Attr &a) : DOMNode(exec, a) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
     Value getValueProperty(ExecState *exec, int token) const;
@@ -136,9 +136,9 @@ namespace KJS {
   class DOMElement : public DOMNode {
   public:
     // Build a DOMElement
-    DOMElement(ExecState *exec, DOM::Element e);
+    DOMElement(ExecState *exec, const DOM::Element &e);
     // Constructor for inherited classes
-    DOMElement(Object proto, DOM::Element e);
+    DOMElement(const Object &proto, const DOM::Element &e);
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     // no put - all read-only
     virtual const ClassInfo* classInfo() const { return &info; }
@@ -153,7 +153,7 @@ namespace KJS {
   class DOMDOMImplementation : public DOMObject {
   public:
     // Build a DOMDOMImplementation
-    DOMDOMImplementation(ExecState *,DOM::DOMImplementation i);
+    DOMDOMImplementation(ExecState *, const DOM::DOMImplementation &i);
     ~DOMDOMImplementation();
     // no put - all functions
     virtual const ClassInfo* classInfo() const { return &info; }
@@ -168,7 +168,7 @@ namespace KJS {
   class DOMDocumentType : public DOMNode {
   public:
     // Build a DOMDocumentType
-    DOMDocumentType(ExecState *exec, DOM::DocumentType dt);
+    DOMDocumentType(ExecState *exec, const DOM::DocumentType &dt);
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     // no put - all read-only
@@ -179,7 +179,7 @@ namespace KJS {
 
   class DOMNamedNodeMap : public DOMObject {
   public:
-    DOMNamedNodeMap(ExecState *, DOM::NamedNodeMap m);
+    DOMNamedNodeMap(ExecState *, const DOM::NamedNodeMap &m);
     ~DOMNamedNodeMap();
     virtual bool hasProperty(ExecState *exec, const UString &p) const;
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
@@ -196,7 +196,7 @@ namespace KJS {
 
   class DOMProcessingInstruction : public DOMNode {
   public:
-    DOMProcessingInstruction(ExecState *exec, DOM::ProcessingInstruction pi) : DOMNode(exec, pi) { }
+    DOMProcessingInstruction(ExecState *exec, const DOM::ProcessingInstruction &pi) : DOMNode(exec, pi) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
@@ -207,7 +207,7 @@ namespace KJS {
 
   class DOMNotation : public DOMNode {
   public:
-    DOMNotation(ExecState *exec, DOM::Notation n) : DOMNode(exec, n) { }
+    DOMNotation(ExecState *exec, const DOM::Notation &n) : DOMNode(exec, n) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     // no put - all read-only
@@ -218,7 +218,7 @@ namespace KJS {
 
   class DOMEntity : public DOMNode {
   public:
-    DOMEntity(ExecState *exec, DOM::Entity e) : DOMNode(exec, e) { }
+    DOMEntity(ExecState *exec, const DOM::Entity &e) : DOMNode(exec, e) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     // no put - all read-only
@@ -249,10 +249,10 @@ namespace KJS {
     static const ClassInfo info;
   };
 
-  Value getDOMNode(ExecState *exec, DOM::Node n);
-  Value getDOMNamedNodeMap(ExecState *exec, DOM::NamedNodeMap m);
-  Value getDOMNodeList(ExecState *exec, DOM::NodeList l);
-  Value getDOMDOMImplementation(ExecState *exec, DOM::DOMImplementation i);
+  Value getDOMNode(ExecState *exec, const DOM::Node &n);
+  Value getDOMNamedNodeMap(ExecState *exec, const DOM::NamedNodeMap &m);
+  Value getDOMNodeList(ExecState *exec, const DOM::NodeList &l);
+  Value getDOMDOMImplementation(ExecState *exec, const DOM::DOMImplementation &i);
   Object getNodeConstructor(ExecState *exec);
   Object getDOMExceptionConstructor(ExecState *exec);
 
@@ -260,7 +260,7 @@ namespace KJS {
   // when multiple nodes have the same name.
   class DOMNamedNodesCollection : public DOMObject {
   public:
-    DOMNamedNodesCollection(ExecState *exec, QValueList<DOM::Node>& nodes );
+    DOMNamedNodesCollection(ExecState *exec, const QValueList<DOM::Node>& nodes );
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
   private:
     QValueList<DOM::Node> m_nodes;
@@ -269,9 +269,9 @@ namespace KJS {
   class DOMCharacterData : public DOMNode {
   public:
     // Build a DOMCharacterData
-    DOMCharacterData(ExecState *exec, DOM::CharacterData d);
+    DOMCharacterData(ExecState *exec, const DOM::CharacterData &d);
     // Constructor for inherited classes
-    DOMCharacterData(Object proto, DOM::CharacterData d);
+    DOMCharacterData(const Object &proto, const DOM::CharacterData &d);
     virtual Value tryGet(ExecState *exec,const UString &propertyName) const;
     Value getValueProperty(ExecState *, int token) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
@@ -284,7 +284,7 @@ namespace KJS {
 
   class DOMText : public DOMCharacterData {
   public:
-    DOMText(ExecState *exec, DOM::Text t);
+    DOMText(ExecState *exec, const DOM::Text &t);
     virtual Value tryGet(ExecState *exec,const UString &propertyName) const;
     Value getValueProperty(ExecState *, int token) const;
     virtual const ClassInfo* classInfo() const { return &info; }
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 4652f38..6e6ae12 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -2633,7 +2633,7 @@ IMPLEMENT_PROTOTYPE(HTMLCollectionProto,HTMLCollectionProtoFunc)
 
 const ClassInfo HTMLCollection::info = { "HTMLCollection", 0, 0, 0 };
 
-HTMLCollection::HTMLCollection(ExecState *exec, DOM::HTMLCollection c)
+HTMLCollection::HTMLCollection(ExecState *exec, const DOM::HTMLCollection &c)
   : DOMObject(HTMLCollectionProto::self(exec)), collection(c) {}
 
 HTMLCollection::~HTMLCollection()
@@ -3005,12 +3005,12 @@ Image::~Image()
   if ( img ) img->deref(this);
 }
 
-Value KJS::getHTMLCollection(ExecState *exec,DOM::HTMLCollection c)
+Value KJS::getHTMLCollection(ExecState *exec, const DOM::HTMLCollection &c)
 {
   return cacheDOMObject<DOM::HTMLCollection, KJS::HTMLCollection>(exec, c);
 }
 
-Value KJS::getSelectHTMLCollection(ExecState *exec, DOM::HTMLCollection c, DOM::HTMLSelectElement e)
+Value KJS::getSelectHTMLCollection(ExecState *exec, const DOM::HTMLCollection &c, const DOM::HTMLSelectElement &e)
 {
   DOMObject *ret;
   if (c.isNull())
diff --git a/WebCore/khtml/ecma/kjs_html.h b/WebCore/khtml/ecma/kjs_html.h
index cb02252..0c34548 100644
--- a/WebCore/khtml/ecma/kjs_html.h
+++ b/WebCore/khtml/ecma/kjs_html.h
@@ -38,7 +38,7 @@ namespace KJS {
 
   class HTMLDocument : public DOMDocument {
   public:
-    HTMLDocument(ExecState *exec, DOM::HTMLDocument d) : DOMDocument(exec, d) { }
+    HTMLDocument(ExecState *exec, const DOM::HTMLDocument &d) : DOMDocument(exec, d) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
     void putValue(ExecState *exec, int token, const Value& value, int /*attr*/);
@@ -54,7 +54,7 @@ namespace KJS {
 
   class HTMLElement : public DOMElement {
   public:
-    HTMLElement(ExecState *exec, DOM::HTMLElement e) : DOMElement(exec, e) { }
+    HTMLElement(ExecState *exec, const DOM::HTMLElement &e) : DOMElement(exec, e) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     Value getValueProperty(ExecState *exec, int token) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
@@ -161,7 +161,7 @@ namespace KJS {
 
   class HTMLCollection : public DOMObject {
   public:
-    HTMLCollection(ExecState *exec, DOM::HTMLCollection c);
+    HTMLCollection(ExecState *exec, const DOM::HTMLCollection &c);
     ~HTMLCollection();
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     virtual Value call(ExecState *exec, Object &thisObj, const List&args);
@@ -180,7 +180,7 @@ namespace KJS {
 
   class HTMLSelectCollection : public HTMLCollection {
   public:
-    HTMLSelectCollection(ExecState *exec, DOM::HTMLCollection c, DOM::HTMLSelectElement e)
+    HTMLSelectCollection(ExecState *exec, const DOM::HTMLCollection &c, const DOM::HTMLSelectElement &e)
       : HTMLCollection(exec, c), element(e) { }
     virtual Value tryGet(ExecState *exec, const UString &propertyName) const;
     virtual void tryPut(ExecState *exec, const UString &propertyName, const Value& value, int attr = None);
@@ -227,8 +227,8 @@ namespace KJS {
     khtml::CachedImage* img;
   };
 
-  Value getHTMLCollection(ExecState *exec, DOM::HTMLCollection c);
-  Value getSelectHTMLCollection(ExecState *exec, DOM::HTMLCollection c, DOM::HTMLSelectElement e);
+  Value getHTMLCollection(ExecState *exec, const DOM::HTMLCollection &c);
+  Value getSelectHTMLCollection(ExecState *exec, const DOM::HTMLCollection &c, const DOM::HTMLSelectElement &e);
 
 
 }; // namespace

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list