Bug 76687 - Removed some regexp entry boilerplate code
Summary: Removed some regexp entry boilerplate code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 23:17 PST by Geoffrey Garen
Modified: 2012-01-21 19:23 PST (History)
2 users (show)

See Also:


Attachments
Patch (4.94 KB, patch)
2012-01-20 00:29 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (7.39 KB, patch)
2012-01-20 11:56 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (8.11 KB, patch)
2012-01-20 12:05 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (8.19 KB, patch)
2012-01-20 12:24 PST, Geoffrey Garen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2012-01-19 23:17:08 PST
Removed some regexp entry boilerplate code
Comment 1 Geoffrey Garen 2012-01-20 00:29:47 PST
Created attachment 123261 [details]
Patch
Comment 2 Michael Saboff 2012-01-20 09:03:59 PST
This changes seem fine to me.
Comment 3 Darin Adler 2012-01-20 09:36:28 PST
Comment on attachment 123261 [details]
Patch

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.
Comment 4 Geoffrey Garen 2012-01-20 11:56:11 PST
Created attachment 123351 [details]
Patch
Comment 5 Geoffrey Garen 2012-01-20 12:05:28 PST
Created attachment 123352 [details]
Patch
Comment 6 Geoffrey Garen 2012-01-20 12:24:03 PST
Created attachment 123357 [details]
Patch
Comment 7 Geoffrey Garen 2012-01-20 13:06:02 PST
Committed r105539: <http://trac.webkit.org/changeset/105539>
Comment 8 Daniel Bates 2012-01-21 19:23:42 PST
Comment on attachment 123357 [details]
Patch

Clearing review flag on patch to remove it from the review queue since it was already committed per comment 7.