mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
I replaced all ScriptableObject.getClassPrototype(scope, "Function") by ScriptableObject.getFunctionPrototype(scope)
This commit is contained in:
parent
ad78333a43
commit
4dc361a246
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user