[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:25:32 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 3bcbd01a85a575e2fe5592578c76377ed6dba496
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 6 21:29:17 2004 +0000
Fixed 3550242 and 3546977. The first diff prevents an assert from firing. The second diff prevents a JavaScript exception, caused be an invalid conversion, which has a downstream consequence of preventing a valid conversion.
Reviewed by John.
* bindings/jni/jni_jsobject.cpp:
(JSObject::toString):
* bindings/jni/jni_utility.cpp:
(KJS::Bindings::convertValueToJValue):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 8f2fb95..319f940 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2004-02-06 Richard Williamson <rjw at apple.com>
+
+ Fixed 3550242 and 3546977. The first diff prevents an assert from firing. The second diff prevents a JavaScript exception, caused be an invalid conversion, which has a downstream consequence of preventing a valid conversion.
+
+ Reviewed by John.
+
+ * bindings/jni/jni_jsobject.cpp:
+ (JSObject::toString):
+ * bindings/jni/jni_utility.cpp:
+ (KJS::Bindings::convertValueToJValue):
+
2004-02-02 Darin Adler <darin at apple.com>
Reviewed by Maciej.
diff --git a/JavaScriptCore/bindings/jni/jni_jsobject.cpp b/JavaScriptCore/bindings/jni/jni_jsobject.cpp
index 704bdec..6e64c24 100644
--- a/JavaScriptCore/bindings/jni/jni_jsobject.cpp
+++ b/JavaScriptCore/bindings/jni/jni_jsobject.cpp
@@ -535,10 +535,15 @@ jstring JSObject::toString() const
{
JS_LOG ("\n");
+ Interpreter::lock();
Object thisObj = Object(const_cast<ObjectImp*>(_imp));
ExecState *exec = _root->interpreter()->globalExec();
- return (jstring)convertValueToJValue (exec, thisObj, object_type, "java.lang.String").l;
+ jstring result = (jstring)convertValueToJValue (exec, thisObj, object_type, "java.lang.String").l;
+
+ Interpreter::unlock();
+
+ return result;
}
void JSObject::finalize() const
diff --git a/JavaScriptCore/bindings/jni/jni_utility.cpp b/JavaScriptCore/bindings/jni/jni_utility.cpp
index d4cdddc..56f234b 100644
--- a/JavaScriptCore/bindings/jni/jni_utility.cpp
+++ b/JavaScriptCore/bindings/jni/jni_utility.cpp
@@ -630,9 +630,7 @@ jvalue KJS::Bindings::getJNIField( jobject obj, JNIType type, const char *name,
jvalue KJS::Bindings::convertValueToJValue (KJS::ExecState *exec, KJS::Value value, JNIType _JNIType, const char *javaClassName)
{
jvalue result;
- double d = 0;
- d = value.toNumber(exec);
switch (_JNIType){
case object_type: {
result.l = (jobject)0;
@@ -663,42 +661,42 @@ jvalue KJS::Bindings::convertValueToJValue (KJS::ExecState *exec, KJS::Value val
break;
case boolean_type: {
- result.z = (jboolean)d;
+ result.z = (jboolean)value.toNumber(exec);
}
break;
case byte_type: {
- result.b = (jbyte)d;
+ result.b = (jbyte)value.toNumber(exec);
}
break;
case char_type: {
- result.c = (jchar)d;
+ result.c = (jchar)value.toNumber(exec);
}
break;
case short_type: {
- result.s = (jshort)d;
+ result.s = (jshort)value.toNumber(exec);
}
break;
case int_type: {
- result.i = (jint)d;
+ result.i = (jint)value.toNumber(exec);
}
break;
case long_type: {
- result.j = (jlong)d;
+ result.j = (jlong)value.toNumber(exec);
}
break;
case float_type: {
- result.f = (jfloat)d;
+ result.f = (jfloat)value.toNumber(exec);
}
break;
case double_type: {
- result.d = (jdouble)d;
+ result.d = (jdouble)value.toNumber(exec);
}
break;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list