mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
(new RegExp).toString/toSource() now gives /(?:)/ instead of // which is comments and does not work with uneval.
This commit is contained in:
parent
5e69e857ce
commit
2997e9f7ee
@ -201,7 +201,12 @@ public class NativeRegExp extends IdScriptable implements Function {
|
||||
{
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append('/');
|
||||
buf.append(re.source);
|
||||
if (re.source.length != 0) {
|
||||
buf.append(re.source);
|
||||
} else {
|
||||
// See bugzilla 226045
|
||||
buf.append("(?:)");
|
||||
}
|
||||
buf.append('/');
|
||||
if ((re.flags & JSREG_GLOB) != 0)
|
||||
buf.append('g');
|
||||
|
Loading…
Reference in New Issue
Block a user