From b33cc857e0ef1f7c16626231a7cbfbcdeefa2999 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. --- .../src/org/mozilla/javascript/Context.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/js/rhino/src/org/mozilla/javascript/Context.java b/js/rhino/src/org/mozilla/javascript/Context.java index 3a760520e1a2..02620be2f9cf 100644 --- a/js/rhino/src/org/mozilla/javascript/Context.java +++ b/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);