JavaAdapter no longer uses FlattenedObject, since the prototype is simply the LiveConnect wrapper.

This commit is contained in:
beard%netscape.com 1999-09-22 08:22:53 +00:00
Родитель ec3b77cdbb
Коммит b4d5f900ca
2 изменённых файлов: 6 добавлений и 8 удалений

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

@ -1915,7 +1915,7 @@ public class ScriptRuntime {
return scope;
}
public static FlattenedObject runScript(Script script) {
public static Scriptable runScript(Script script) {
Context cx = Context.enter();
Scriptable global = cx.initStandardObjects(new ImporterTopLevel());
try {
@ -1924,11 +1924,10 @@ public class ScriptRuntime {
throw new Error(e.toString());
}
Context.exit();
return new FlattenedObject(global);
return global;
}
public static void setAdapterProto(FlattenedObject fobj, Object adapter) {
Scriptable obj = fobj.getObject();
public static void setAdapterProto(Scriptable obj, Object adapter) {
Scriptable p = obj.getPrototype();
Scriptable scope = ScriptableObject.getTopLevelScope(obj);
if (p == null || p == ScriptableObject.getObjectPrototype(scope)) {

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

@ -1915,7 +1915,7 @@ public class ScriptRuntime {
return scope;
}
public static FlattenedObject runScript(Script script) {
public static Scriptable runScript(Script script) {
Context cx = Context.enter();
Scriptable global = cx.initStandardObjects(new ImporterTopLevel());
try {
@ -1924,11 +1924,10 @@ public class ScriptRuntime {
throw new Error(e.toString());
}
Context.exit();
return new FlattenedObject(global);
return global;
}
public static void setAdapterProto(FlattenedObject fobj, Object adapter) {
Scriptable obj = fobj.getObject();
public static void setAdapterProto(Scriptable obj, Object adapter) {
Scriptable p = obj.getPrototype();
Scriptable scope = ScriptableObject.getTopLevelScope(obj);
if (p == null || p == ScriptableObject.getObjectPrototype(scope)) {