made the class to use for the JavaAdapter selectable via the Java property "org.mozilla.javascript.JavaAdapter"

This commit is contained in:
beard%netscape.com 1999-04-24 06:28:17 +00:00
Родитель 634d0ee855
Коммит e413292484
2 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -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,