Article View: mozilla.dev.tech.js-engine.rhino
Article #1Issue in Rhino API, after integrating progaurd
From: rahulsaini8
Date: Wed, 26 Feb 2014 15:19
Date: Wed, 26 Feb 2014 15:19
47 lines
2161 bytes
2161 bytes
After integrating Progaurd in Android, I'm facing issue with Rhino API.
Without progaurd, below code in working fine.
org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter();
context.setOptimizationLevel(-1);
ScriptableObject scope = context.initStandardObjects();
try {
InputStream inputStream = mContext.getAssets().open(JAVASCRIPT_FILE);
InputStreamReader reader = new InputStreamReader(inputStream);
context.evaluateReader(scope, reader, JAVASCRIPT_FILE, 1, null);
} catch (IOException exception) {
throw new CustomException(null, exception);
}
Function functionAdd = (Function) scope.get(JAVASCRIPT_FUNCTION_NAME);
Object returnObject = functionAdd.call(context, scope, scope, new Object[] {
parameter1, parameter2, parameter3
});
But after integrating Progaurd, I'm getting below error:
02-26 14:58:13.200: E/AndroidRuntime(11607): Caused by: java.lang.IllegalStateException: Failed to create VMBridge instance
02-26 14:58:13.200: E/AndroidRuntime(11607): at org.a.b.ds.<clinit>(Unknown Source)
02-26 14:58:13.200: E/AndroidRuntime(11607): ... 11 more
Thank You
Technical Details
Message-ID:
<9b61981a-84dd-4d8b-aba2-e2441e0af6e3@googlegroups.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <9b61981a-84dd-4d8b-aba2-e2441e0af6e3@googlegroups.com> Subject: Issue in Rhino API, after integrating progaurd Date: Wed, 26 Feb 2014 15:19:28 +0000 From: rahulsaini8@gmail.com Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf1.newsdeef.eu!not-for-mail X-Received: by 10.50.124.33 with SMTP id mf1mr14918816igb.6.1393427968968; X-Received: by 10.50.79.133 with SMTP id j5mr587459igx.7.1393427968875; Wed, Newsgroups: mozilla.dev.tech.js-engine.rhino Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=14.141.12.161; posting-account=wkosJgoAAAC46Pf8HdreG1DkqKS1QiD5 NNTP-Posting-Host: 14.141.12.161 User-Agent: G2/1.0 MIME-Version: 1.0 Injection-Date: Wed, 26 Feb 2014 15:19:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Lines: 46