NativeScript no longer implements Script interface which was kept only f

or compatibility.


git-svn-id: svn://10.0.0.236/trunk@160757 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
igor%mir2.org
2004-08-14 10:29:09 +00:00
parent 3fc1e8f2c8
commit 6268464201

View File

@@ -55,7 +55,7 @@ import java.io.IOException;
* @author Norris Boyd
*/
class NativeScript extends NativeFunction implements Script
class NativeScript extends NativeFunction
{
private static final Object SCRIPT_TAG = new Object();
@@ -112,19 +112,6 @@ class NativeScript extends NativeFunction implements Script
return super.getEncodedSource();
}
/**
* @deprecated
*
* NativeScript implements {@link Script} and its
* {@link Script#exec(Context cx, Scriptable scope)} method only for
* backward compatibility.
*/
public Object exec(Context cx, Scriptable scope)
throws JavaScriptException
{
return script == null ? Undefined.instance : script.exec(cx, scope);
}
protected void initPrototypeId(int id)
{
String s;
@@ -161,9 +148,8 @@ class NativeScript extends NativeFunction implements Script
case Id_toString: {
NativeScript real = realThis(thisObj, f);
Script realScript = real.script;
if (realScript == null) { realScript = real; }
return cx.decompileScript(realScript,
getTopLevelScope(scope), 0);
if (realScript == null) { return ""; }
return cx.decompileScript(realScript, 0);
}
case Id_exec: {