Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2012-01-10 21:19:07 +0000
committerGrant Gayed2012-01-10 21:19:07 +0000
commite15ee682e30fa9bffca77ff4f7bacbb3da9faebf (patch)
treebae094b0ed4cbb6ae1cf971d1c48392374c61311 /bundles/org.eclipse.swt/Eclipse SWT WebKit
parenta2f8593c16171131528bd537dc9bb8261176e97d (diff)
downloadeclipse.platform.swt-e15ee682e30fa9bffca77ff4f7bacbb3da9faebf.tar.gz
eclipse.platform.swt-e15ee682e30fa9bffca77ff4f7bacbb3da9faebf.tar.xz
eclipse.platform.swt-e15ee682e30fa9bffca77ff4f7bacbb3da9faebf.zip
replace JSValueToBoolean use with JSValueToNumber
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java5
5 files changed, 6 insertions, 26 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp
index 321dea3991..443ac1ba82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -705,19 +705,6 @@ JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSValueMakeUndefined)
}
#endif
-#ifndef NO_JSValueToBoolean
-extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueToBoolean)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1);
-JNIEXPORT jint JNICALL WebKit_win32_NATIVE(JSValueToBoolean)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jint rc = 0;
- WebKit_win32_NATIVE_ENTER(env, that, JSValueToBoolean_FUNC);
- rc = (jint)JSValueToBoolean((JSContextRef)arg0, (JSValueRef)arg1);
- WebKit_win32_NATIVE_EXIT(env, that, JSValueToBoolean_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_JSValueToNumber
extern "C" JNIEXPORT jdouble JNICALL WebKit_win32_NATIVE(JSValueToNumber)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2);
JNIEXPORT jdouble JNICALL WebKit_win32_NATIVE(JSValueToNumber)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
index a6fa7bcfa9..071ae7f66b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int WebKit_win32_nativeFunctionCount = 61;
-int WebKit_win32_nativeFunctionCallCount[61];
+int WebKit_win32_nativeFunctionCount = 60;
+int WebKit_win32_nativeFunctionCallCount[60];
char * WebKit_win32_nativeFunctionNames[] = {
"CFArrayGetCount",
"CFArrayGetValueAtIndex",
@@ -74,7 +74,6 @@ char * WebKit_win32_nativeFunctionNames[] = {
"JSValueMakeNumber",
"JSValueMakeString",
"JSValueMakeUndefined",
- "JSValueToBoolean",
"JSValueToNumber",
"JSValueToStringCopy",
"WebKitCreateInstance",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h
index cbf2c86606..2ef83803bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -82,7 +82,6 @@ typedef enum {
JSValueMakeNumber_FUNC,
JSValueMakeString_FUNC,
JSValueMakeUndefined_FUNC,
- JSValueToBoolean_FUNC,
JSValueToNumber_FUNC,
JSValueToStringCopy_FUNC,
WebKitCreateInstance_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
index 1bc1a4e3ba..0f7dd44c5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
@@ -425,7 +425,7 @@ Object convertToJava (int /*long*/ ctx, int /*long*/ value) {
int type = WebKit_win32.JSValueGetType (ctx, value);
switch (type) {
case WebKit_win32.kJSTypeBoolean: {
- int result = WebKit_win32.JSValueToBoolean (ctx, value);
+ int result = (int)WebKit_win32.JSValueToNumber (ctx, value, null);
return new Boolean (result != 0);
}
case WebKit_win32.kJSTypeNumber: {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java
index aaa9c1c817..ea8732f37d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java
@@ -318,11 +318,6 @@ public static final native int /*long*/ JSValueMakeUndefined (int /*long*/ ctx);
/**
* @param ctx cast=(JSContextRef)
* @param value cast=(JSValueRef)
- */
-public static final native int JSValueToBoolean (int /*long*/ ctx, int /*long*/ value);
-/**
- * @param ctx cast=(JSContextRef)
- * @param value cast=(JSValueRef)
* @param exception cast=(JSValueRef*)
*/
public static final native double JSValueToNumber (int /*long*/ ctx, int /*long*/ value, int /*long*/[] exception);

Back to the top