Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Issue 13088: Follow jsc in throwing an exception when using test or exec on a... (Closed)

Created:
12 years ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Follow jsc in throwing an exception when using test or exec on a regexp with no input. Fixed problem with assertThrows. Deleted test that tests arbitrary limits on the sizes of regular expressions. Committed: http://code.google.com/p/v8/source/detail?r=907

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -51 lines) Patch
M src/messages.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp-delay.js View 1 3 chunks +8 lines, -7 lines 0 comments Download
M test/mjsunit/mjsunit.js View 1 1 chunk +3 lines, -1 line 0 comments Download
D test/mjsunit/nested-repetition-count-overflow.js View 1 chunk +0 lines, -43 lines 0 comments Download
M test/mjsunit/regexp-static.js View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
12 years ago (2008-12-03 12:01:40 UTC) #1
Christian Plesner Hansen
Lgtm. http://codereview.chromium.org/13088/diff/1/5 File src/regexp-delay.js (right): http://codereview.chromium.org/13088/diff/1/5#newcode318 Line 318: function RegExpGetInput() { return regExpInput || ""; ...
12 years ago (2008-12-03 12:15:59 UTC) #2
Mads Ager (chromium)
12 years ago (2008-12-03 12:43:07 UTC) #3
On 2008/12/03 12:15:59, Christian Plesner Hansen wrote:
> Line 318: function RegExpGetInput() { return regExpInput || ""; }
> Note that this changes the behavior when input is a false-like value like
false,
> 0 or null.  Consider using IS_UNDEFINED instead.

Done.  Using IS_UNDEFINED is clearer.
 
> Also, do we want to distinguish between regExpInput being uninitialized and
> regExpInput being initialized and containing undefined?

We do not have to because the setter always converts the argument to a string. 
The comment in the code is wrongly stating that we do not convert to string on
assignment and I have fixed that.

> Line 93: var threw_exception = true;
> I believe we usually use lower camelcase in JS, lower case with underscores is
> for C++.

Fixed.

Powered by Google App Engine
This is Rietveld 408576698