[webkit-reviews] review requested: [Bug 101003] RegExp.prototype.toString Should Produce an 8 bit JSString if possible. : [Attachment 172096] Factored out the line terminator escape logic to fix qt builds

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 2 11:42:59 PDT 2012


Michael Saboff <msaboff at apple.com> has asked  for review:
Bug 101003: RegExp.prototype.toString Should Produce an 8 bit JSString if
possible.
https://bugs.webkit.org/show_bug.cgi?id=101003

Attachment 172096: Factored out the line terminator escape logic to fix qt
builds
https://bugs.webkit.org/attachment.cgi?id=172096&action=review

------- Additional Comments from Michael Saboff <msaboff at apple.com>
(In reply to comment #4)
> (From update of attachment 171964 [details])
> View in context:
https://bugs.webkit.org/attachment.cgi?id=171964&action=review
> 
> > Source/JavaScriptCore/runtime/RegExpObject.cpp:258
> > +		 else if (sizeof(CharacterType) > 1) {
> > +		     if (ch == 0x2028)
> > +			 result.appendLiteral("u2028");
> > +		     else
> > +			 result.appendLiteral("u2029");
> > +		 }
> 
> I don’t think this technique is going to work portably; we’ll get warnings on
some compilers. I think we need a separate inline function for this that we
overload for the 8-bit and 16-bit character types.

I saw this last night as it broke the qt builds.  I factored out as suggested.

> Patch otherwise looks fine.


More information about the webkit-reviews mailing list