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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:23:14 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 6ab63da007c1a6328a8fa18ae16aaed6462bcdad
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 23 01:14:23 2004 +0000

    	Added stubs for ObjC language binding to JavaScript.
    
            * JavaScriptCore.pbproj/project.pbxproj:
            * bindings/jni/jni_runtime.h:
            * bindings/objc/objc_runtime.h: Added.
            (KJS::Bindings::ObjcParameter::ObjcParameter):
            (KJS::Bindings::ObjcParameter::~ObjcParameter):
            (KJS::Bindings::ObjcParameter::operator=):
            (KJS::Bindings::ObjcParameter::type):
            (KJS::Bindings::ObjcConstructor::ObjcConstructor):
            (KJS::Bindings::ObjcConstructor::~ObjcConstructor):
            (KJS::Bindings::ObjcConstructor::_commonCopy):
            (KJS::Bindings::ObjcConstructor::operator=):
            (KJS::Bindings::ObjcConstructor::value):
            (KJS::Bindings::ObjcConstructor::parameterAt):
            (KJS::Bindings::ObjcConstructor::numParameters):
            (KJS::Bindings::ObjcField::ObjcField):
            (KJS::Bindings::ObjcField::~ObjcField):
            * bindings/runtime.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 982c82d..ca93fca 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,27 @@
 2004-01-22  Richard Williamson   <rjw at apple.com>
 
+	Added stubs for ObjC language binding to JavaScript.
+
+        * JavaScriptCore.pbproj/project.pbxproj:
+        * bindings/jni/jni_runtime.h:
+        * bindings/objc/objc_runtime.h: Added.
+        (KJS::Bindings::ObjcParameter::ObjcParameter):
+        (KJS::Bindings::ObjcParameter::~ObjcParameter):
+        (KJS::Bindings::ObjcParameter::operator=):
+        (KJS::Bindings::ObjcParameter::type):
+        (KJS::Bindings::ObjcConstructor::ObjcConstructor):
+        (KJS::Bindings::ObjcConstructor::~ObjcConstructor):
+        (KJS::Bindings::ObjcConstructor::_commonCopy):
+        (KJS::Bindings::ObjcConstructor::operator=):
+        (KJS::Bindings::ObjcConstructor::value):
+        (KJS::Bindings::ObjcConstructor::parameterAt):
+        (KJS::Bindings::ObjcConstructor::numParameters):
+        (KJS::Bindings::ObjcField::ObjcField):
+        (KJS::Bindings::ObjcField::~ObjcField):
+        * bindings/runtime.h:
+
+2004-01-22  Richard Williamson   <rjw at apple.com>
+
 	Simplified JavaString by using UString as backing store.  This
 	revealed a bug in CString's assignment operator which I fixed.
 
diff --git a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
index 11f6af9..46dd108 100644
--- a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
@@ -243,6 +243,7 @@
 				51A58A90057D3A6A00A3E942,
 				7073BE3F0581291E005EE2C9,
 				513DF74305C0861F00F89391,
+				51C4974205C0A5D4006FBFF5,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -631,6 +632,7 @@
 				51A58A8E057D3A6A00A3E942,
 				70B16A260569A10900DB756D,
 				70B16A270569A10900DB756D,
+				51C4974105C0A5D4006FBFF5,
 			);
 			isa = PBXGroup;
 			name = bindings;
@@ -681,6 +683,21 @@
 			settings = {
 			};
 		};
+		51C4974105C0A5D4006FBFF5 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			lastKnownFileType = sourcecode.c.h;
+			name = objc_runtime.h;
+			path = bindings/objc/objc_runtime.h;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		51C4974205C0A5D4006FBFF5 = {
+			fileRef = 51C4974105C0A5D4006FBFF5;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 //510
 //511
 //512
diff --git a/JavaScriptCore/bindings/jni/jni_runtime.h b/JavaScriptCore/bindings/jni/jni_runtime.h
index c78ab7f..6dbaeac 100644
--- a/JavaScriptCore/bindings/jni/jni_runtime.h
+++ b/JavaScriptCore/bindings/jni/jni_runtime.h
@@ -146,7 +146,6 @@ public:
         return *this;
     }
 
-    virtual KJS::Value value() const { return KJS::Value(0); }
     virtual Parameter *parameterAt(long i) const { return &_parameters[i]; };
     virtual long numParameters() const { return _numParameters; };
     
@@ -242,7 +241,6 @@ public:
         return *this;
     };
 
-    virtual KJS::Value value() const { return KJS::Value(0); }
     virtual const char *name() const { return _name.UTF8String(); };
     virtual RuntimeType returnType() const { return _returnType.UTF8String(); };
     virtual Parameter *parameterAt(long i) const { return &_parameters[i]; };
diff --git a/JavaScriptCore/bindings/objc/objc_runtime.h b/JavaScriptCore/bindings/objc/objc_runtime.h
new file mode 100644
index 0000000..d933039
--- /dev/null
+++ b/JavaScriptCore/bindings/objc/objc_runtime.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2003 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+#ifndef _OBJC_RUNTIME_H_
+#define _OBJC_RUNTIME_H_
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include <runtime.h>
+#include <ustring.h>
+
+namespace KJS
+{
+class Value;
+
+namespace Bindings
+{
+
+class ObjcParameter : public Parameter
+{
+public:
+    ObjcParameter () {};
+    
+    ~ObjcParameter() {
+    };
+
+    ObjcParameter(const ObjcParameter &other) : Parameter() {
+    };
+
+    ObjcParameter &operator=(const ObjcParameter &other)
+    {
+        if (this == &other)
+            return *this;
+                    
+        return *this;
+    }
+    
+    virtual RuntimeType type() {}
+    
+private:
+};
+
+
+class ObjcConstructor : public Constructor
+{
+public:
+    ObjcConstructor() : _parameters (0), _numParameters(0) {};
+        
+    ~ObjcConstructor() {
+        delete [] _parameters;
+    };
+
+    void _commonCopy(const ObjcConstructor &other) {
+        _numParameters = other._numParameters;
+        _parameters = new ObjcParameter[_numParameters];
+        long i;
+        for (i = 0; i < _numParameters; i++) {
+            _parameters[i] = other._parameters[i];
+        }
+    }
+    
+    ObjcConstructor(const ObjcConstructor &other) : Constructor() {
+        _commonCopy (other);
+    };
+
+    ObjcConstructor &operator=(const ObjcConstructor &other)
+    {
+        if (this == &other)
+            return *this;
+            
+        delete [] _parameters;
+        
+        _commonCopy (other);
+
+        return *this;
+    }
+
+    virtual KJS::Value value() const { return KJS::Value(0); }
+    virtual Parameter *parameterAt(long i) const { return &_parameters[i]; };
+    virtual long numParameters() const { return _numParameters; };
+    
+private:
+    ObjcParameter *_parameters;
+    long _numParameters;
+};
+
+
+class ObjcField : public Field
+{
+public:
+    ObjcField() {};
+    ~ObjcField() {};
+
+    ObjcField(const ObjcField &other);
+    ObjcField &operator=(const ObjcField &other);
+        
+    virtual KJS::Value valueFromInstance(const Instance *instance) const;
+    virtual void setValueToInstance(KJS::ExecState *exec, const Instance *instance, const KJS::Value &aValue) const;
+    
+    virtual const char *name() const;
+    virtual RuntimeType type() const;
+    
+private:
+};
+
+
+class ObjcMethod : public Method
+{
+public:
+    ObjcMethod() : Method();
+    ~ObjcMethod ();
+
+    ObjcMethod(const ObjcMethod &other) : Method();
+    ObjcMethod &operator=(const ObjcMethod &other);
+
+    virtual const char *name() const;
+    virtual RuntimeType returnType() const;
+    virtual Parameter *parameterAt(long i) const;
+    virtual long numParameters() const;
+    
+private:
+};
+
+class ObjcArray : public Array
+{
+public:
+    ObjcArray (jobject a, const char *type);
+    virtual ~ObjcArray();
+
+    ObjcArray (const ObjcArray &other);
+    ObjcArray &operator=(const ObjcArray &other);
+
+    virtual void setValueAt(KJS::ExecState *exec, unsigned int index, const KJS::Value &aValue) const;
+    virtual KJS::Value valueAt(unsigned int index) const;
+    virtual unsigned int getLength() const;
+    
+
+private:
+};
+
+} // namespace Bindings
+
+} // namespace KJS
+
+#endif
diff --git a/JavaScriptCore/bindings/runtime.h b/JavaScriptCore/bindings/runtime.h
index 4130926..92816a0 100644
--- a/JavaScriptCore/bindings/runtime.h
+++ b/JavaScriptCore/bindings/runtime.h
@@ -53,8 +53,6 @@ public:
     virtual Parameter *parameterAt(long i) const = 0;
     virtual long numParameters() const = 0;
 
-    virtual KJS::Value value() const = 0;
-
     virtual ~Constructor() {};
 };
 
@@ -95,9 +93,7 @@ public:
     virtual RuntimeType returnType() const = 0;
     virtual Parameter *parameterAt(long i) const = 0;
     virtual long numParameters() const = 0;
-    
-    virtual KJS::Value value() const = 0;
-    
+        
     virtual ~Method() {};
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list