The scope argument is removed from Context.decompileScript() since
decompilation does not depends on scope. For compatibility the old signature is preserved as a deprecated method. git-svn-id: svn://10.0.0.236/trunk@160756 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
86b75f0608
commit
3fc1e8f2c8
@ -1343,18 +1343,29 @@ public class Context
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #decompileScript(Script script, int indent)}
|
||||
* instead.
|
||||
* <p>
|
||||
* The implementation simply calls <tt>decompileScript(script, indent)</tt>
|
||||
* ignoring the scope argument.
|
||||
*/
|
||||
public final String decompileScript(Script script, Scriptable scope,
|
||||
int indent)
|
||||
{
|
||||
return decompileScript(script, indent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompile the script.
|
||||
* <p>
|
||||
* The canonical source of the script is returned.
|
||||
*
|
||||
* @param script the script to decompile
|
||||
* @param scope the scope under which to decompile
|
||||
* @param indent the number of spaces to indent the result
|
||||
* @return a string representing the script source
|
||||
*/
|
||||
public final String decompileScript(Script script, Scriptable scope,
|
||||
int indent)
|
||||
public final String decompileScript(Script script, int indent)
|
||||
{
|
||||
NativeFunction scriptImpl = (NativeFunction) script;
|
||||
return scriptImpl.decompile(indent, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user