Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23310] Update v8 engine to 5.0.71.33 #8041

Merged
merged 25 commits into from Jun 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
73ef3a8
TIMOB-19793 Android: Update makefiles and build.xml to build against …
sgtcoolguy Oct 24, 2015
722ff7b
Bump to V8 5.0.71.33
sgtcoolguy May 2, 2016
55aa336
Get compiling against NDK r10c
sgtcoolguy May 2, 2016
e136e46
Get building with V8 5.0.71.33
sgtcoolguy May 3, 2016
190378f
Update to use libc++_shared
sgtcoolguy Jun 3, 2016
1c42de8
Updated travis
ashcoding Jun 6, 2016
2733591
Remove use of 'armeabi' ABI, use armeabiv7a. Update referenced to stl…
sgtcoolguy Jun 6, 2016
dc40104
Fix some more ToString/ToObject conversions take pass in isolate argu…
sgtcoolguy Jun 7, 2016
8fa5b4a
no more crashing on app shutdown
sgtcoolguy Jun 8, 2016
344e96e
try to fix crash on app restart
sgtcoolguy Jun 9, 2016
abf6095
Check for empty MaybeLocal as result of calling function in V8Object.…
sgtcoolguy Jun 10, 2016
2011f87
Clean up logging statements
sgtcoolguy Jun 15, 2016
1d07c28
Use Android NDK r11c
sgtcoolguy Jun 15, 2016
b4e4566
Set ANDROID_NDK to r11c
sgtcoolguy Jun 20, 2016
248db19
prefix call to SetProtoMethod with titanium namespace
sgtcoolguy Jun 20, 2016
8cbb456
Update native android module templates, update pre-packaged ti.map to…
sgtcoolguy Jun 20, 2016
74fa630
Update pre-packaged ti.facebook module for Android compiled against t…
sgtcoolguy Jun 20, 2016
bcfe5c3
Update module template for Android
sgtcoolguy Jun 21, 2016
b20a49d
Update pre-packaged ti.map and ti.facebook modules
sgtcoolguy Jun 21, 2016
42013f1
Fix more function calls which blindly called ToLocalChecked onr esult…
sgtcoolguy Jun 21, 2016
a378f0d
Use a global std::map to hold persistent functions that need to live …
sgtcoolguy Jun 22, 2016
1bbf64a
Remove redundant code
sgtcoolguy Jun 22, 2016
82c99d9
Update ti.map, ti.facebook, ti.touchid, and ti.cloudpush modules with…
sgtcoolguy Jun 23, 2016
07e7c16
Add overriding test for ti.test.js
sgtcoolguy Jun 23, 2016
4dfa4a6
fix typo
sgtcoolguy Jun 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -4,7 +4,7 @@ jdk:
- oraclejdk7
install:
- ANDROID_SDK_PACKAGE=android-sdk_r24.0.1-macosx.zip
- ANDROID_NDK_PACKAGE=android-ndk-r10e-darwin-x86_64.zip
- ANDROID_NDK_PACKAGE=android-ndk-r11c-darwin-x86_64.zip
- export TITANIUM_ANDROID_API="23"
- export SDKS="$TRAVIS_BUILD_DIR/sdks"
- echo $SDKS
Expand All @@ -23,8 +23,8 @@ install:
- echo yes | android -s update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-22

- # Install required Android NDK
- if [ ! -d "$SDKS/android-ndk-r10e" ]; then wget http://dl.google.com/android/repository/$ANDROID_NDK_PACKAGE; unzip -q -o $ANDROID_NDK_PACKAGE; fi
- export ANDROID_NDK=${PWD}/android-ndk-r10e
- if [ ! -d "$SDKS/android-ndk-r11c" ]; then wget http://dl.google.com/android/repository/$ANDROID_NDK_PACKAGE; unzip -q -o $ANDROID_NDK_PACKAGE; fi
- export ANDROID_NDK=${PWD}/android-ndk-r11c
-
- export ANDROID_PLATFORM=$ANDROID_SDK/platforms/android-$TITANIUM_ANDROID_API
- export GOOGLE_APIS=$ANDROID_SDK/add-ons/addon-google_apis-google-$TITANIUM_ANDROID_API
Expand Down
2 changes: 1 addition & 1 deletion android/build/libv8.properties
@@ -1,2 +1,2 @@
libv8.version=3.9.24.29
libv8.version=5.0.71.33
libv8.mode=release
2 changes: 1 addition & 1 deletion android/cli/commands/_build.js
Expand Up @@ -69,7 +69,7 @@ function AndroidBuilder() {

this.targets = ['emulator', 'device', 'dist-playstore'];

this.validABIs = ['armeabi', 'armeabi-v7a', 'x86'];
this.validABIs = ['armeabi-v7a', 'x86'];

this.xmlMergeRegExp = /^(strings|attrs|styles|bools|colors|dimens|ids|integers|arrays)\.xml$/;

Expand Down
2 changes: 1 addition & 1 deletion android/cli/commands/_buildModule.js
Expand Up @@ -1076,7 +1076,7 @@ AndroidModuleBuilder.prototype.ndkBuild = function (next) {
}

this.dirWalker(this.buildGenLibsDir, function (file) {
if (path.extname(file) == '.so' && file.indexOf('libstlport_shared.so') == -1) {
if (path.extname(file) == '.so' && file.indexOf('libstlport_shared.so') == -1 && file.indexOf('libc++_shared.so') == -1) {

var relativeName = path.relative(this.buildGenLibsDir, file),
targetDir = path.join(this.libsDir, path.dirname(relativeName));
Expand Down
Expand Up @@ -169,29 +169,29 @@

<#macro openModuleNamespace>
<#list moduleId?split(".") as ns>
namespace ${ns?lower_case} {
namespace ${ns?lower_case} {
</#list>
</#macro>

<#macro closeModuleNamespace>
<#list moduleId?split(".")?reverse as ns>
} // ${ns?lower_case}
} // ${ns?lower_case}
</#list>
</#macro>

<#macro openNamespace>
<@openModuleNamespace/>
<#list proxyAttrs.fullAPIName?split(".") as ns>
<#if ns_has_next && ns?lower_case != moduleId?lower_case>
namespace ${ns?lower_case} {
namespace ${ns?lower_case} {
</#if>
</#list>
</#macro>

<#macro closeNamespace>
<#list proxyAttrs.fullAPIName?split(".")?reverse as ns>
<#if ns_index != 0 && ns?lower_case != moduleId?lower_case>
} // namespace ${ns?lower_case}
} // namespace ${ns?lower_case}
</#if>
</#list>
<@closeModuleNamespace/>
Expand Down Expand Up @@ -426,7 +426,7 @@
<#if type?ends_with("Proxy")>
<#return typeInfo["org.appcelerator.kroll.KrollProxy"]>
</#if>

<#if type?ends_with("Exception")>
<#return typeInfo["org.appcelerator.kroll.KrollException"]>
</#if>
Expand Down Expand Up @@ -485,7 +485,8 @@ fails, a JS exception is returned.
const char *error = "Invalid value, expected type ${info.jsType}.";
LOGE(TAG, error);
<#if !(logOnly!false)>
return titanium::JSException::Error(error);
titanium::JSException::Error(isolate, error);
return;
</#if>
}
</#if>
Expand All @@ -510,31 +511,37 @@ fails, a JS exception is returned.
<#local valueExpr = expr>
<#elseif info.jsType == "Number">
<#local type = "Local<Number>">
<#local valueExpr = expr + "->ToNumber()">
<#local stringExpr = expr + "->ToString()">
<#local valueExpr = expr + "->ToNumber(isolate)">
<#local stringExpr = expr + "->ToString(isolate)">
<#elseif info?keys?seq_contains("jsHandleCast")>
<#local type = "Local<" + info.jsType + ">">
<#local valueExpr = "Local<" + info.jsType + ">::Cast(" + expr + ")">
<#local valueExpr = expr + ".As<" + info.jsType + ">()">
<#else>
<#local type = "Local<" + info.jsType + ">">
<#local valueExpr = expr + "->To" + info.jsType + "()">
<#local valueExpr = expr + "->To" + info.jsType + "(isolate)">
</#if>

<#t>
<#if info.jsType == "Number">
if ((titanium::V8Util::isNaN(${expr}) && !${expr}->IsUndefined()) || ${stringExpr}->Length() == 0) {
if ((titanium::V8Util::isNaN(isolate, ${expr}) && !${expr}->IsUndefined()) || ${stringExpr}->Length() == 0) {
const char *error = "Invalid value, expected type ${info.jsType}.";
LOGE(TAG, error);
<#if !(logOnly!false)>
return titanium::JSException::Error(error);
titanium::JSException::Error(isolate, error);
return;
</#if>
}
</#if>
<#t>
if (!${expr}->IsNull()) {
${type} ${current_arg} = ${valueExpr};
jArguments[${index}].${info.jvalue} =
titanium::TypeConverter::${info.jsToJavaConverter}(env, ${current_arg}<#if checkNew>, &isNew_${index}</#if>);
titanium::TypeConverter::${info.jsToJavaConverter}(
<#if info.jsToJavaConverter?matches("^js(Number|Date|String|Boolean)To.+")>
<#else>
isolate,
</#if>
env, ${current_arg}<#if checkNew>, &isNew_${index}</#if>);
} else {
jArguments[${index}].${info.jvalue} = NULL;
}
Expand All @@ -553,7 +560,7 @@ fails, a JS exception is returned.
jobjectArray varArgs = env->NewObjectArray(length, titanium::JNIUtil::objectClass, NULL);
for (uint32_t i = 0; i < length; ++i) {
bool isNew;
jobject arg = titanium::TypeConverter::jsValueToJavaObject(env, args[i+${start}], &isNew);
jobject arg = titanium::TypeConverter::jsValueToJavaObject(isolate, env, args[i+${start}], &isNew);
env->SetObjectArrayElement(varArgs, i, arg);
if (isNew) {
env->DeleteLocalRef(arg);
Expand All @@ -570,7 +577,8 @@ fails, a JS exception is returned.
if (args.Length() < ${requiredCount}) {
char errorStringBuffer[100];
sprintf(errorStringBuffer, "${method.apiName}: Invalid number of arguments. Expected ${requiredCount} but got %d", args.Length());
return ThrowException(Exception::Error(String::New(errorStringBuffer)));
titanium::JSException::Error(isolate, errorStringBuffer);
return;
}
</#if>
</@Proxy.getRequiredArgumentCount>
Expand All @@ -586,9 +594,9 @@ fails, a JS exception is returned.
</#list>

<#if method.hasInvocation>
Handle<Object> scopeVars = args[0]->ToObject();
jstring sourceUrl = titanium::TypeConverter::jsValueToJavaString(env,
scopeVars->Get(Proxy::sourceUrlSymbol));
Local<Object> scopeVars = args[0]->ToObject(isolate);
jstring sourceUrl = titanium::TypeConverter::jsValueToJavaString(isolate, env,
scopeVars->Get(Proxy::sourceUrlSymbol.Get(isolate)));
jArguments[0].l = env->NewObject(titanium::JNIUtil::krollInvocationClass,
titanium::JNIUtil::krollInvocationInitMethod, sourceUrl);
env->DeleteLocalRef(sourceUrl);
Expand Down Expand Up @@ -666,21 +674,22 @@ beprovided to handle the result.
<@Proxy.cleanupMethodArguments args=methodArgs hasInvocation=hasInvocation/>

if (env->ExceptionCheck()) {
<#if hasResult>Handle<Value> jsException = </#if>titanium::JSException::fromJavaException();
<#if hasResult>Local<Value> jsException = </#if>titanium::JSException::fromJavaException(isolate);
env->ExceptionClear();
<#if hasResult>
return jsException;
return;
</#if>
}

<#if hasResult && info.javaValidation!false>
if (jResult == NULL) {
return Null();
args.GetReturnValue().Set(Null(isolate));
return;
}
</#if>

<#if hasResult>
Handle<${jsType}> v8Result = titanium::TypeConverter::${info.javaToJsConverter}(env, jResult);
Local<${jsType}> v8Result = titanium::TypeConverter::${info.javaToJsConverter}(isolate, env, jResult);

<#if info.javaDeleteLocalRef!false>
env->DeleteLocalRef(jResult);
Expand All @@ -693,7 +702,8 @@ beprovided to handle the result.
<#macro initJNIEnv>
JNIEnv *env = titanium::JNIScope::getEnv();
if (!env) {
return titanium::JSException::GetJNIEnvironmentError();
titanium::JSException::GetJNIEnvironmentError(isolate);
return;
}
</#macro>

Expand All @@ -706,7 +716,8 @@ beprovided to handle the result.
const char *error = "Couldn't find proxy method '${name}' with signature '${signature}'";
LOGE(TAG, error);
<#if !(logOnly!false)>
return titanium::JSException::Error(error);
titanium::JSException::Error(isolate, error);
return;
</#if>
}
}
Expand Down