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

Issue 14668013: Function constructor should avoid String.prototype methods (Closed)

Created:
7 years, 7 months ago by wingo
Modified:
7 years, 7 months ago
Reviewers:
Michael Starzinger
Visibility:
Public.

Description

Function constructor should avoid String.prototype methods Replace a use of .indexOf with a call to StringIndexOf. As always, lexical scoping to the rescue. R=mstarzinger@chromium.org TEST=mjsunit/regress/regress-2686 BUG=v8:2686 Committed: 14678

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use %_CallFunction instead of .call #

Total comments: 1

Patch Set 3 : Fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -13 lines) Patch
M src/v8natives.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download
A + test/mjsunit/regress/regress-2686.js View 1 chunk +4 lines, -12 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
wingo
7 years, 7 months ago (2013-05-14 15:33:28 UTC) #1
wingo
https://codereview.chromium.org/14668013/diff/1/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/14668013/diff/1/src/v8natives.js#newcode1770 src/v8natives.js:1770: if (StringIndexOf.call(p, ')') != -1) This just trades one ...
7 years, 7 months ago (2013-05-14 15:43:26 UTC) #2
Michael Starzinger
LGTM with a nit. https://codereview.chromium.org/14668013/diff/2002/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/14668013/diff/2002/src/v8natives.js#newcode1771 src/v8natives.js:1771: throw MakeSyntaxError('paren_in_arg_string',[]); nit: Either add ...
7 years, 7 months ago (2013-05-15 10:41:18 UTC) #3
wingo
7 years, 7 months ago (2013-05-15 10:52:15 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as r14678 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698