mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1050340 - Access regexp guts generically. r=luke
This commit is contained in:
parent
4e5e817715
commit
6cad9db1f3
@ -1011,10 +1011,12 @@ JSStructuredCloneWriter::startWrite(HandleValue v)
|
||||
if (backref)
|
||||
return true;
|
||||
|
||||
if (obj->is<RegExpObject>()) {
|
||||
RegExpObject &reobj = obj->as<RegExpObject>();
|
||||
return out.writePair(SCTAG_REGEXP_OBJECT, reobj.getFlags()) &&
|
||||
writeString(SCTAG_STRING, reobj.getSource());
|
||||
if (ObjectClassIs(obj, ESClass_RegExp, context())) {
|
||||
RegExpGuard re(context());
|
||||
if (!RegExpToShared(context(), obj, &re))
|
||||
return false;
|
||||
return out.writePair(SCTAG_REGEXP_OBJECT, re->getFlags()) &&
|
||||
writeString(SCTAG_STRING, re->getSource());
|
||||
} else if (obj->is<DateObject>()) {
|
||||
double d = js_DateGetMsecSinceEpoch(obj);
|
||||
return out.writePair(SCTAG_DATE_OBJECT, 0) && out.writeDouble(d);
|
||||
|
Loading…
Reference in New Issue
Block a user