mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Tentative fix for allowing call to 'exec' on RegExp objects.
This commit is contained in:
parent
7971c3069a
commit
f5682225f9
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user