зеркало из https://github.com/mozilla/gecko-dev.git
made the class to use for the JavaAdapter selectable via the Java property "org.mozilla.javascript.JavaAdapter"
This commit is contained in:
Родитель
634d0ee855
Коммит
e413292484
|
@ -56,6 +56,14 @@ public class Interpreter extends LabelTable {
|
|||
|
||||
public void defineJavaAdapter(Scriptable scope) {
|
||||
// do nothing; only the code generator can define the JavaAdapter
|
||||
try {
|
||||
String adapterName = System.getProperty("org.mozilla.javascript.JavaAdapter");
|
||||
if (adapterName != null) {
|
||||
Class adapterClass = Class.forName(adapterName);
|
||||
ScriptableObject.defineClass(scope, adapterClass);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
private void generateICodeFromTree(Node tree,
|
||||
|
|
|
@ -56,6 +56,14 @@ public class Interpreter extends LabelTable {
|
|||
|
||||
public void defineJavaAdapter(Scriptable scope) {
|
||||
// do nothing; only the code generator can define the JavaAdapter
|
||||
try {
|
||||
String adapterName = System.getProperty("org.mozilla.javascript.JavaAdapter");
|
||||
if (adapterName != null) {
|
||||
Class adapterClass = Class.forName(adapterName);
|
||||
ScriptableObject.defineClass(scope, adapterClass);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
private void generateICodeFromTree(Node tree,
|
||||
|
|
Загрузка…
Ссылка в новой задаче