Tentative fix for allowing call to 'exec' on RegExp objects.

This commit is contained in:
rogerl%netscape.com 1999-08-11 04:34:05 +00:00
parent 7971c3069a
commit f5682225f9
2 changed files with 10 additions and 0 deletions

View File

@ -1276,6 +1276,11 @@ public class ScriptRuntime {
return NativeWith.newWithSpecial(cx, args, fo, !isCall);
if (name.equals("jsFunction_exec") && cl == NativeScript.class)
return ((NativeScript)jsThis).exec(cx, scope);
if (name.equals("exec")
&& (cx.getRegExpProxy() != null)
&& (cx.getRegExpProxy().isRegExp(jsThis)))
return call(cx, fun, jsThis, args);
}
if (isCall)

View File

@ -1276,6 +1276,11 @@ public class ScriptRuntime {
return NativeWith.newWithSpecial(cx, args, fo, !isCall);
if (name.equals("jsFunction_exec") && cl == NativeScript.class)
return ((NativeScript)jsThis).exec(cx, scope);
if (name.equals("exec")
&& (cx.getRegExpProxy() != null)
&& (cx.getRegExpProxy().isRegExp(jsThis)))
return call(cx, fun, jsThis, args);
}
if (isCall)