Skip to content

Commit

Permalink
Merge branch '8_0_X' into TIMOB-27056_8_0_X
Browse files Browse the repository at this point in the history
  • Loading branch information
keerthi1032 committed Jun 1, 2019
2 parents 9e78346 + 71f89e9 commit 15e4b9d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
23 changes: 14 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,25 @@ def unitTests(os, nodeVersion, npmVersion, testSuiteBranch) {
archiveArtifacts 'mocha_*.crash'
sh 'rm -f mocha_*.crash'
} else {
sh label: 'gather crash reports/tombstones for Android', returnStatus: true, script: 'adb -e pull /data/tombstones'
archiveArtifacts 'tombstones/'
sh 'rm -f tombstones/'
// wipe tombstones and re-build dir with proper permissions/ownership on emulator
sh returnStatus: true, script: 'adb -e shell rm -rf /data/tombstones'
sh returnStatus: true, script: 'adb -e shell mkdir -m 771 /data/tombstones'
sh returnStatus: true, script: 'adb -e shell chown system:system /data/tombstones'
// gather crash reports/tombstones for Android
timeout(5) {
sh label: 'gather crash reports/tombstones for Android', returnStatus: true, script: 'adb -e pull /data/tombstones'
archiveArtifacts allowEmptyArchive: true, artifacts: 'tombstones/'
sh returnStatus: true, script: 'rm -rf tombstones/'
// wipe tombstones and re-build dir with proper permissions/ownership on emulator
sh returnStatus: true, script: 'adb -e shell rm -rf /data/tombstones'
sh returnStatus: true, script: 'adb -e shell mkdir -m 771 /data/tombstones'
sh returnStatus: true, script: 'adb -e shell chown system:system /data/tombstones'
}
}
throw e
} finally {
// Kill the emulators!
if ('android'.equals(os)) {
sh returnStatus: true, script: 'adb -e shell am force-stop com.appcelerator.testApp.testing'
sh returnStatus: true, script: 'adb -e uninstall com.appcelerator.testApp.testing'
timeout(5) {
sh returnStatus: true, script: 'adb -e shell am force-stop com.appcelerator.testApp.testing'
sh returnStatus: true, script: 'adb -e uninstall com.appcelerator.testApp.testing'
}
killAndroidEmulators()
} // if
} // finally
Expand Down
8 changes: 5 additions & 3 deletions iphone/TitaniumKit/TitaniumKit/Sources/Kroll/KrollContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ - (void)invoke:(KrollContext *)context

JSValueRef ThrowException(JSContextRef ctx, NSString *message, JSValueRef *exception)
{
JSStringRef jsString = JSStringCreateWithCFString((CFStringRef)message);
*exception = JSValueMakeString(ctx, jsString);
JSStringRelease(jsString);
JSGlobalContextRef globalContextRef = JSContextGetGlobalContext(ctx);
JSContext *context = [JSContext contextWithJSGlobalContextRef:globalContextRef];
JSValue *value = [JSValue valueWithNewErrorFromMessage:message inContext:context];
*exception = value.JSValueRef;

return JSValueMakeUndefined(ctx);
}

Expand Down

0 comments on commit 15e4b9d

Please sign in to comment.