[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:17:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4e9333e1a4af8f920fa8796f8b436c2a5952ba60
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 10 01:05:57 2003 +0000

    	LiveConnect stubs that correspond to the native methods
    	on JSObject.  These will be called from the new Java plugin
    	when an instance of JSObject is instantiated and messaged.
    	When these are implemented the Java will be able to originate
    	calls into JavaScript.
    
    	Also a temporary work-around added to Makefile.am to solve
    	a link problem.  The 1.4.2 JavaVM accidentally links against
    	libobjc.  This call a failure linking testkjs.  Mike Hay is
    	working with someone to fix the problem (3505587).
    
            Reviewed by Chris.
    
            * JavaScriptCore.pbproj/project.pbxproj:
            * Makefile.am:
            * bindings/jni_jsobject.cpp: Added.
            (KJS_JSCreateNativeJSObject):
            (KJS_JSObject_JSFinalize):
            (KJS_JSObject_JSObjectCall):
            (KJS_JSObject_JSObjectEval):
            (KJS_JSObject_JSObjectGetMember):
            (KJS_JSObject_JSObjectSetMember):
            (KJS_JSObject_JSObjectRemoveMember):
            (KJS_JSObject_JSObjectGetSlot):
            (KJS_JSObject_JSObjectSetSlot):
            (KJS_JSObject_JSObjectToString):
            * bindings/jni_jsobject.h: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 3e3724a..7725874 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,33 @@
+2003-12-09  Richard Williamson   <rjw at apple.com>
+
+	LiveConnect stubs that correspond to the native methods
+	on JSObject.  These will be called from the new Java plugin
+	when an instance of JSObject is instantiated and messaged.
+	When these are implemented the Java will be able to originate
+	calls into JavaScript.
+
+	Also a temporary work-around added to Makefile.am to solve
+	a link problem.  The 1.4.2 JavaVM accidentally links against
+	libobjc.  This call a failure linking testkjs.  Mike Hay is
+	working with someone to fix the problem (3505587).
+
+        Reviewed by Chris.
+
+        * JavaScriptCore.pbproj/project.pbxproj:
+        * Makefile.am:
+        * bindings/jni_jsobject.cpp: Added.
+        (KJS_JSCreateNativeJSObject):
+        (KJS_JSObject_JSFinalize):
+        (KJS_JSObject_JSObjectCall):
+        (KJS_JSObject_JSObjectEval):
+        (KJS_JSObject_JSObjectGetMember):
+        (KJS_JSObject_JSObjectSetMember):
+        (KJS_JSObject_JSObjectRemoveMember):
+        (KJS_JSObject_JSObjectGetSlot):
+        (KJS_JSObject_JSObjectSetSlot):
+        (KJS_JSObject_JSObjectToString):
+        * bindings/jni_jsobject.h: Added.
+
 2003-12-09  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by John.
diff --git a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
index 99663a5..ef88e02 100644
--- a/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
@@ -242,6 +242,7 @@
 				517D534A056BFB5D003851BD,
 				51A58A90057D3A6A00A3E942,
 				7073BE3F0581291E005EE2C9,
+				513589F00586989000813311,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -302,6 +303,7 @@
 				517D5349056BFB5D003851BD,
 				51A58A8F057D3A6A00A3E942,
 				7073BE3E0581291E005EE2C9,
+				513589EF0586989000813311,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -484,6 +486,36 @@
 			settings = {
 			};
 		};
+		513589ED0586989000813311 = {
+			expectedFileType = sourcecode.cpp.cpp;
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			name = jni_jsobject.cpp;
+			path = bindings/jni_jsobject.cpp;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		513589EE0586989000813311 = {
+			expectedFileType = sourcecode.c.h;
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			name = jni_jsobject.h;
+			path = bindings/jni_jsobject.h;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		513589EF0586989000813311 = {
+			fileRef = 513589ED0586989000813311;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		513589F00586989000813311 = {
+			fileRef = 513589EE0586989000813311;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		517D52DC056BF2F5003851BD = {
 			expectedFileType = sourcecode.cpp.cpp;
 			fileEncoding = 30;
@@ -582,6 +614,8 @@
 				517D52DD056BF2F6003851BD,
 				517D5347056BFB5D003851BD,
 				517D5348056BFB5D003851BD,
+				513589ED0586989000813311,
+				513589EE0586989000813311,
 				511B0877056468BB0080E486,
 				511B0876056468BB0080E486,
 				51856D8F0562EE95008B9D83,
diff --git a/JavaScriptCore/Makefile.am b/JavaScriptCore/Makefile.am
index 991cd6b..4ea7c0f 100644
--- a/JavaScriptCore/Makefile.am
+++ b/JavaScriptCore/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = -I $(top_srcdir)/JavaScriptCore/kjs
 noinst_PROGRAMS = kjs/testkjs
 kjs_testkjs_SOURCES = kjs/testkjs.cpp
 kjs_testkjs_DEPENDENCIES = JavaScriptCore-stamp
-kjs_testkjs_LDFLAGS = -F$(SYMROOTS) -framework JavaScriptCore
+kjs_testkjs_LDFLAGS = -F$(SYMROOTS) -framework JavaScriptCore -framework Cocoa
 
 all-am: JavaScriptCore-stamp
 JavaScriptCore-stamp: kjs/*.cpp kjs/*.h pcre/*.c pcre/*.h bindings/*.h bindings/*.cpp bindings/jni/*.cpp bindings/jni/*.h
diff --git a/JavaScriptCore/bindings/jni_jsobject.cpp b/JavaScriptCore/bindings/jni_jsobject.cpp
new file mode 100644
index 0000000..45c28e1
--- /dev/null
+++ b/JavaScriptCore/bindings/jni_jsobject.cpp
@@ -0,0 +1,82 @@
+/*
+ * 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. 
+ */
+#include <jni_jsobject.h>
+ 
+jlong KJS_JSCreateNativeJSObject (JNIEnv *env, jclass clazz, jstring jurl, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return POINTER_JNI_JLONG(0);
+}
+
+void KJS_JSObject_JSFinalize (JNIEnv *env, jclass jsClass, jlong nativeJSObject)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+}
+
+jobject KJS_JSObject_JSObjectCall (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring methodName, jobjectArray args, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+jobject KJS_JSObject_JSObjectEval (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jscript, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+jobject KJS_JSObject_JSObjectGetMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+void KJS_JSObject_JSObjectSetMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jobject value, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+}
+
+void KJS_JSObject_JSObjectRemoveMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+}
+
+jobject KJS_JSObject_JSObjectGetSlot (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jint jindex, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
+void KJS_JSObject_JSObjectSetSlot (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jint jindex, jobject value, jboolean ctx)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+}
+
+jstring KJS_JSObject_JSObjectToString (JNIEnv *env, jclass clazz, jlong nativeJSObject)
+{
+    fprintf (stderr, "%s:\n", __PRETTY_FUNCTION__);
+    return 0;
+}
+
diff --git a/WebCore/kwq/WebCoreKeyGenerator.m b/JavaScriptCore/bindings/jni_jsobject.h
similarity index 50%
copy from WebCore/kwq/WebCoreKeyGenerator.m
copy to JavaScriptCore/bindings/jni_jsobject.h
index 7672ba1..0fd1bd6 100644
--- a/WebCore/kwq/WebCoreKeyGenerator.m
+++ b/JavaScriptCore/bindings/jni_jsobject.h
@@ -22,36 +22,23 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-
-#import "WebCoreKeyGenerator.h"
-
-#import "KWQAssertions.h"
-
-static WebCoreKeyGenerator *sharedGenerator;
-
- at implementation WebCoreKeyGenerator
-
-+ (WebCoreKeyGenerator *)sharedGenerator
-{
-    return sharedGenerator;
-}
-
-- init
-{
-    ASSERT(!sharedGenerator);
-    [super init];
-    sharedGenerator = [self retain];
-    return self;
-}
-
-- (NSArray *)strengthMenuItemTitles
-{
-    return nil;
-}
-
-- (NSString *)signedPublicKeyAndChallengeStringWithStrengthIndex:(unsigned)index challenge:(NSString *)challenge
-{
-    return nil;
-}
-
- at end
+#ifndef _JNI_JS_H_
+#define _JNI_JS_H_
+
+#include <JavaVM/jni.h>
+
+#define POINTER_JNI_JLONG(ptr) ((jlong)ptr)
+
+// Functions called from the Java VM when making class to the JSObject class.
+jlong KJS_JSCreateNativeJSObject (JNIEnv *env, jclass clazz, jstring jurl, jboolean ctx);
+void KJS_JSObject_JSFinalize (JNIEnv *env, jclass jsClass, jlong nativeJSObject);
+jobject KJS_JSObject_JSObjectCall (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring methodName, jobjectArray args, jboolean ctx);
+jobject KJS_JSObject_JSObjectEval (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jscript, jboolean ctx);
+jobject KJS_JSObject_JSObjectGetMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jboolean ctx);
+void KJS_JSObject_JSObjectSetMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jobject value, jboolean ctx);
+void KJS_JSObject_JSObjectRemoveMember (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jstring jname, jboolean ctx);
+jobject KJS_JSObject_JSObjectGetSlot (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jint jindex, jboolean ctx);
+void KJS_JSObject_JSObjectSetSlot (JNIEnv *env, jclass jsClass, jlong nativeJSObject, jstring jurl, jint jindex, jobject value, jboolean ctx);
+jstring KJS_JSObject_JSObjectToString (JNIEnv *env, jclass clazz, jlong nativeJSObject);
+
+#endif
\ No newline at end of file

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list