I replaced all ScriptableObject.getClassPrototype(scope, "Function") by ScriptableObject.getFunctionPrototype(scope)

This commit is contained in:
igor%mir2.org 2002-12-17 16:36:23 +00:00
parent ad78333a43
commit 4dc361a246
2 changed files with 3 additions and 4 deletions

View File

@ -1940,7 +1940,7 @@ public class ScriptRuntime {
Context cx,
boolean doSetName)
{
fn.setPrototype(ScriptableObject.getClassPrototype(scope, "Function"));
fn.setPrototype(ScriptableObject.getFunctionPrototype(scope));
fn.setParentScope(scope);
if (doSetName) {
ScriptableObject.defineProperty(scope, fnName, fn,
@ -1974,7 +1974,7 @@ public class ScriptRuntime {
throw WrappedException.wrapException(e);
}
result.setPrototype(ScriptableObject.getClassPrototype(scope, "Function"));
result.setPrototype(ScriptableObject.getFunctionPrototype(scope));
result.setParentScope(scope);
String fnName = result.getFunctionName();

View File

@ -137,10 +137,9 @@ public class NativeRegExp extends IdScriptable implements Function {
proto.setParentScope(scope);
proto.setPrototype(getObjectPrototype(scope));
NativeRegExpCtor ctor = new NativeRegExpCtor();
ctor.setPrototype(getClassPrototype(scope, "Function"));
ctor.setPrototype(ScriptableObject.getFunctionPrototype(scope));
ctor.setParentScope(scope);
ctor.setImmunePrototypeProperty(proto);