From 3fc1e8f2c8dbd2cc3bc2eef669bd7c083aaa51ec Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Sat, 14 Aug 2004 10:28:15 +0000 Subject: [PATCH] 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 --- .../src/org/mozilla/javascript/Context.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/Context.java b/mozilla/js/rhino/src/org/mozilla/javascript/Context.java index 3a760520e1a..02620be2f9c 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/Context.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/Context.java @@ -1343,18 +1343,29 @@ public class Context } } + /** + * @deprecated Use {@link #decompileScript(Script script, int indent)} + * instead. + *

+ * The implementation simply calls decompileScript(script, indent) + * ignoring the scope argument. + */ + public final String decompileScript(Script script, Scriptable scope, + int indent) + { + return decompileScript(script, indent); + } + /** * Decompile the script. *

* 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);