[webkit-reviews] review granted: [Bug 76687] Removed some regexp entry boilerplate code : [Attachment 123261] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 20 09:36:27 PST 2012


Darin Adler <darin at apple.com> has granted Geoffrey Garen <ggaren at apple.com>'s
request for review:
Bug 76687: Removed some regexp entry boilerplate code
https://bugs.webkit.org/show_bug.cgi?id=76687

Attachment 123261: Patch
https://bugs.webkit.org/attachment.cgi?id=123261&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=123261&action=review


> Source/JavaScriptCore/runtime/RegExp.cpp:339
> +    ASSERT(startOffset >= 0);

Another approach might be to use the type unsigned instead of int.

> Source/JavaScriptCore/runtime/RegExp.cpp:340
> +    ASSERT(!s.isNull());

Clearly the check for null that was here before was unneeded. But the assertion
also seems unneeded. The code seems like it would do just fine if passed a null
string, and shouldn’t be so picky!

> Source/JavaScriptCore/runtime/RegExp.cpp:343
> +    ASSERT(m_state != ParseError);
>  
>      ASSERT(m_state != ParseError);

Oops, left this assertion in twice.


More information about the webkit-reviews mailing list