Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2015-04-24 09:19:56 +0000
committerSravan Kumar Lakkimsetti2015-04-24 09:24:42 +0000
commit55c4f6b6de3590d264da66bc69c0232e122cb478 (patch)
tree3433f775138a217be2f06cfb5676cfe038c1d73a
parentd36a85f9d3d2a273139a124cc2bfe7d7cc336629 (diff)
downloadeclipse.platform.swt-55c4f6b6de3590d264da66bc69c0232e122cb478.tar.gz
eclipse.platform.swt-55c4f6b6de3590d264da66bc69c0232e122cb478.tar.xz
eclipse.platform.swt-55c4f6b6de3590d264da66bc69c0232e122cb478.zip
build file changes for xulr31 support
-remove xulr24 targets -remove native files specific to xulr24 -update library count for fragments Change-Id: I30ac5692d1e26c3b5fbf90ad0c313b631fe3be00
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.cpp181
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.h58
-rw-r--r--bundles/org.eclipse.swt/buildSWT.xml12
3 files changed, 6 insertions, 245 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.cpp b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.cpp
deleted file mode 100755
index 61c4db1455..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "swt.h"
-#include "xpcom24_custom.h"
-
-#define XPCOM_NATIVE(func) Java_org_eclipse_swt_internal_mozilla_XPCOM_##func
-
-#ifndef NO_CALLBACK_1GetScriptableFlags24
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(CALLBACK_1GetScriptableFlags24)(JNIEnv *env, jclass that, jintLong arg0);
-static jintLong CALLBACK_1GetScriptableFlags24;
-static jint proc_CALLBACK_1GetScriptableFlags24() {
- return ((jint (CALLING_CONVENTION*)())CALLBACK_1GetScriptableFlags24)();
-}
-static jintLong CALLBACK_GetScriptableFlags24(jintLong func) {
- CALLBACK_1GetScriptableFlags24 = func;
- return (jintLong)proc_CALLBACK_1GetScriptableFlags24;
-}
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(CALLBACK_1GetScriptableFlags24)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- XPCOM_NATIVE_ENTER(env, that, CALLBACK_1GetScriptableFlags24_FUNC);
- rc = (jintLong)CALLBACK_GetScriptableFlags24(arg0);
- XPCOM_NATIVE_EXIT(env, that, CALLBACK_1GetScriptableFlags24_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JS_1DefineFunction24
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1JS_1DefineFunction24)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jintLong arg3, jint arg4, jint arg5);
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1JS_1DefineFunction24)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jintLong arg3, jint arg4, jint arg5)
-{
- jbyte *lparg2=NULL;
- jintLong result = 0;
- XPCOM_NATIVE_ENTER(env, that, _1JS_1DefineFunction24_FUNC);
- if (arg2) if ((lparg2 = env->GetByteArrayElements(arg2, NULL)) == NULL) goto fail;
- result = (jintLong)JS_DefineFunction((JSContext *)arg0, (JSObject *)arg1, (const char *)lparg2, (JSNative)arg3, arg4, arg5);
-fail:
- if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0);
- XPCOM_NATIVE_EXIT(env, that, _1JS_1DefineFunction24_FUNC);
- return result;
-}
-#endif
-
-#ifndef NO__1JS_1EvaluateUCScriptForPrincipals24
-extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1JS_1EvaluateUCScriptForPrincipals24) (JNIEnv *env, jclass that, jbyteArray mozillaPath, jintLong arg0, jintLong arg1, jintLong arg2, jcharArray arg3, jint arg4, jbyteArray arg5, jint arg6, jintLong arg7);
-JNIEXPORT jint JNICALL XPCOM_NATIVE(_1JS_1EvaluateUCScriptForPrincipals24)
- (JNIEnv *env, jclass that, jbyteArray mozillaPath, jintLong arg0, jintLong arg1, jintLong arg2, jcharArray arg3, jint arg4, jbyteArray arg5, jint arg6, jintLong arg7)
-{
- jbyte *lpmozillaPath=NULL;
- jchar *lparg3=NULL;
- jbyte *lparg5=NULL;
- jint rc = 0;
-
- XPCOM_NATIVE_ENTER(env, that, _1JS_1EvaluateUCScriptForPrincipals24_FUNC);
- if (mozillaPath) if ((lpmozillaPath = env->GetByteArrayElements(mozillaPath, NULL)) == NULL) goto fail;
- if (arg3) if ((lparg3 = env->GetCharArrayElements(arg3, NULL)) == NULL) goto fail;
- if (arg5) if ((lparg5 = env->GetByteArrayElements(arg5, NULL)) == NULL) goto fail;
-/*
- rc = (jint)JS_EvaluateUCScriptForPrincipals(arg0, arg1, arg2, lparg3, arg4, lparg5, arg6, arg7);
-*/
- {
-
- /*
- * As of XULRunner 24 an AutoCxPusher-derived instance must be used to push the current JS context
- * on the stack, see https://bugzilla.mozilla.org/show_bug.cgi?id=911161. In earlier supported
- * XULRunner releases this was done with an nsIJSContextStack. This JSAutoCompartment creation must
- * happen on the execution stack, and therefore cannot be invoked dynamically.
- */
- JSAutoCompartment ac((JSContext*)arg0, (JSObject*)arg1);
-
-#ifdef _WIN32
- /*
- * VC++6.0 cannot create a lookup symbol for JS_EvaluateUCScriptForPrincipals() that matches the symbol
- * exported by XULRunner 24's mozjs library because VC++6.0 does not define wchar_t as a native type.
- * The workaround is to dynamically look up the function's mangled name and invoke it directly.
- */
- static int initialized = 0;
- static FARPROC fp = NULL;
- if (!initialized) {
- HMODULE hm = LoadLibrary((const char *)lpmozillaPath);
- if (hm) {
- /* try the 32-bit signature first */
- fp = GetProcAddress(hm, "?JS_EvaluateUCScriptForPrincipals@@YAHPAUJSContext@@PAVJSObject@@PAUJSPrincipals@@PB_WIPBDIPAVValue@JS@@@Z");
- if (!fp) {
- /* fall back to the 64-bit signature */
- fp = GetProcAddress(hm, "?JS_EvaluateUCScriptForPrincipals@@YAHPEAUJSContext@@PEAVJSObject@@PEAUJSPrincipals@@PEB_WIPEBDIPEAVValue@JS@@@Z");
- }
- }
- initialized = 1;
- }
- if (fp) {
- rc = (jint)((jint (*)(jintLong, jintLong, jintLong, jchar *, jint, jbyte *, jint, jintLong))fp)(arg0, arg1, arg2, lparg3, arg4, lparg5, arg6, arg7);
- }
-#else
- rc = (jint)JS_EvaluateUCScriptForPrincipals((JSContext*)arg0, (JSObject*)arg1, (JSPrincipals*)arg2, (const jschar *)lparg3, arg4, (const char*)lparg5, arg6, (JS::Value*)arg7);
-#endif /* _WIN32 */
- }
-fail:
- if (arg5 && lparg5) env->ReleaseByteArrayElements(arg5, lparg5, 0);
- if (arg3 && lparg3) env->ReleaseCharArrayElements(arg3, lparg3, 0);
- if (mozillaPath && lpmozillaPath) env->ReleaseByteArrayElements(mozillaPath, lpmozillaPath, 0);
- XPCOM_NATIVE_EXIT(env, that, _1JS_1EvaluateUCScriptForPrincipals_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1JS_1GetGlobalForScopeChain24
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1JS_1GetGlobalForScopeChain24) (JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1JS_1GetGlobalForScopeChain24)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong result = 0;
- XPCOM_NATIVE_ENTER(env, that, _1JS_1GetGlobalForScopeChain24_FUNC);
- result = (jintLong)JS_GetGlobalForScopeChain((JSContext*)arg0);
- XPCOM_NATIVE_EXIT(env, that, _1JS_1GetGlobalForScopeChain24_FUNC);
- return result;
-}
-#endif
-
-#ifndef NO__1nsIScriptContext24_1GetNativeContext
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext24_1GetNativeContext)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext24_1GetNativeContext)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- XPCOM_NATIVE_ENTER(env, that, _1nsIScriptContext24_1GetNativeContext_FUNC);
- rc = (jintLong)((nsIScriptContext *)arg0)->GetNativeContext();
- XPCOM_NATIVE_EXIT(env, that, _1nsIScriptContext24_1GetNativeContext_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1nsIScriptGlobalObject24_1EnsureScriptEnvironment
-extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1EnsureScriptEnvironment)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1EnsureScriptEnvironment)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jint rc = 0;
- XPCOM_NATIVE_ENTER(env, that, _1nsIScriptGlobalObject24_1EnsureScriptEnvironment_FUNC);
- rc = (jint)((nsIScriptGlobalObject *)arg0)->EnsureScriptEnvironment();
- XPCOM_NATIVE_EXIT(env, that, _1nsIScriptGlobalObject24_1EnsureScriptEnvironment_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1nsIScriptGlobalObject24_1GetGlobalJSObject
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1GetGlobalJSObject)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1GetGlobalJSObject)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- XPCOM_NATIVE_ENTER(env, that, _1nsIScriptGlobalObject24_1GetGlobalJSObject_FUNC);
- rc = (jintLong)((nsIGlobalObject *)arg0)->GetGlobalJSObject();
- XPCOM_NATIVE_EXIT(env, that, _1nsIScriptGlobalObject24_1GetGlobalJSObject_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1nsIScriptGlobalObject24_1GetScriptContext
-extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1GetScriptContext)(JNIEnv *env, jclass that, jintLong arg0);
-JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject24_1GetScriptContext)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jintLong rc = 0;
- XPCOM_NATIVE_ENTER(env, that, _1nsIScriptGlobalObject24_1GetScriptContext_FUNC);
- rc = (jintLong)((nsIScriptGlobalObject *)arg0)->GetScriptContext();
- XPCOM_NATIVE_EXIT(env, that, _1nsIScriptGlobalObject24_1GetScriptContext_FUNC);
- return rc;
-}
-#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.h b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.h
deleted file mode 100644
index dc1c6db884..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom24_custom.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef nsIScriptContext_24_h__
-#include "nsIScriptContext_24.h"
-#include "nsIScriptGlobalObject_24.h"
-#endif /* nsIScriptContext_24_h__ */
-
-#ifndef XPCOM_NATIVE_ENTER
-#define XPCOM_NATIVE_ENTER(env, that, func)
-#endif
-#ifndef XPCOM_NATIVE_EXIT
-#define XPCOM_NATIVE_EXIT(env, that, func)
-#endif
-
-/*
-* This class is defined locally in order to avoid compiling against the XULRunner 24 SDK directly. XULRunner
-* 24 uses various C++ features that are not supported by the VC++ and gcc versions used by SWT for compilation
-* of its xulrunner libraries (to ensure that dependencies such as msvcr80.dll are not introduced).
-*/
-struct JSContext;
-class JSObject;
-class JSScript;
-class JSCompartment;
-class JSAutoCompartment {
- JSContext *cx_;
- JSCompartment *oldCompartment_;
- public:
- JSAutoCompartment(JSContext *cx, JSObject *target);
- JSAutoCompartment(JSContext *cx, JSScript *target);
- ~JSAutoCompartment();
-};
-
-namespace JS {
- class Value;
-};
-class JSFunction;
-JSObject* JS_GetGlobalForScopeChain(JSContext *cx);
-typedef int (*JSNative)(JSContext*, unsigned, JS::Value*);
-JSFunction* JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call, unsigned nargs, unsigned attrs);
-
-#ifdef _WIN32
-#include <windows.h>
-#else
-#include <stdint.h>
-class JSPrincipals;
-typedef uint16_t jschar;
-bool JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj, JSPrincipals *principals,
- const jschar *chars, unsigned length, const char *filename, unsigned lineno, JS::Value *rval);
-#endif /* _WIN32 */
diff --git a/bundles/org.eclipse.swt/buildSWT.xml b/bundles/org.eclipse.swt/buildSWT.xml
index c69286d5be..589ce9fe5e 100644
--- a/bundles/org.eclipse.swt/buildSWT.xml
+++ b/bundles/org.eclipse.swt/buildSWT.xml
@@ -59,7 +59,7 @@
</antcall>
-->
<antcall target="check_fragment_libraries">
- <param name="library_count" value="5"/>
+ <param name="library_count" value="4"/>
<param name="fragment" value="org.eclipse.swt.cocoa.macosx.x86_64"/>
</antcall>
<antcall target="check_fragment_libraries">
@@ -119,11 +119,11 @@
<param name="fragment" value="org.eclipse.swt.win32.win32.ia64"/>
</antcall>
<antcall target="check_fragment_libraries">
- <param name="library_count" value="7"/>
+ <param name="library_count" value="6"/>
<param name="fragment" value="org.eclipse.swt.win32.win32.x86"/>
</antcall>
<antcall target="check_fragment_libraries">
- <param name="library_count" value="6"/>
+ <param name="library_count" value="5"/>
<param name="fragment" value="org.eclipse.swt.win32.win32.x86_64"/>
</antcall>
<antcall target="check_fragment_libraries">
@@ -141,7 +141,7 @@
<target name="check_fragment_libraries" depends="get_version">
<echo>Checking ${fragment}</echo>
<property name="checkdir" value="~/build/check_libraries"/>
- <property name="library_count" value="137"/>
+ <property name="library_count" value="134"/>
<property name="fragment" value=""/>
<fileset id="match" dir="${repo.bin}/bundles/${fragment}">
<filename regex="[0-9][0-9][0-9][0-9]."/>
@@ -943,7 +943,7 @@
<equals arg1="${swt.os}" arg2="wce_ppc"/>
</or>
</condition>
- <condition property="xulrunner_target" value="make_xulrunner_64 make_xulrunner24" else="make_xulrunner make_xulrunner24">
+ <condition property="xulrunner_target" value="make_xulrunner_64" else="make_xulrunner">
<equals arg1="${swt.arch}" arg2="x86_64"/>
</condition>
<condition property="xul_cmd" value="cmd /c build.bat ${swt.arch} ${xulrunner_target} install;" else="">
@@ -1021,7 +1021,7 @@
</target>
<target name="build_local_win_xulrunner" if="should_build_xulrunner">
- <condition property="xulrunner_target" value="make_xulrunner_64 make_xulrunner24" else="make_xulrunner make_xulrunner24">
+ <condition property="xulrunner_target" value="make_xulrunner_64" else="make_xulrunner">
<equals arg1="${swt.arch}" arg2="x86_64"/>
</condition>
<exec dir="${build_dir}" executable="cmd" failonerror="true">

Back to the top