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

Issue 1960001: Throw an exception when wrong arguments are passed into SwapElements. (Closed)

Created:
10 years, 7 months ago by antonm
Modified:
9 years, 4 months ago
Reviewers:
Lasse Reichstein, Rico
CC:
v8-dev
Visibility:
Public.

Description

Throw an exception when wrong arguments are passed into SwapElements. This runtime function should operate on elements and thus 'receiver' must be JSObject and indices should be numbers. TBR=lrm@chromium.org,ricow@chromium.org Committed: http://code.google.com/p/v8/source/detail?r=4583

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -17 lines) Patch
M src/runtime.cc View 1 chunk +11 lines, -17 lines 5 comments Download

Messages

Total messages: 7 (0 generated)
antonm
Lasse, Rico, may you have a look? I am going to commit to see that ...
10 years, 7 months ago (2010-05-04 17:24:25 UTC) #1
Rico
LGTM (Sorry for late reply)
10 years, 7 months ago (2010-05-06 08:47:44 UTC) #2
Lasse Reichstein
LGTM too. http://codereview.chromium.org/1960001/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/1960001/diff/1/2#newcode7781 src/runtime.cc:7781: Handle<Object> key1 = args.at<Object>(1); Consider using CONVERT_ARG_CHECKED ...
10 years, 7 months ago (2010-05-06 09:03:47 UTC) #3
antonm
Rico, Lasse, thanks a lot for review. http://codereview.chromium.org/1960001/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/1960001/diff/1/2#newcode7781 src/runtime.cc:7781: Handle<Object> key1 ...
10 years, 7 months ago (2010-05-06 16:40:15 UTC) #4
Lasse Reichstein
http://codereview.chromium.org/1960001/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/1960001/diff/1/2#newcode7781 src/runtime.cc:7781: Handle<Object> key1 = args.at<Object>(1); No, that's the one. See ...
10 years, 7 months ago (2010-05-07 07:02:03 UTC) #5
antonm
http://codereview.chromium.org/1960001/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/1960001/diff/1/2#newcode7781 src/runtime.cc:7781: Handle<Object> key1 = args.at<Object>(1); On 2010/05/07 07:02:03, Lasse Reichstein ...
10 years, 7 months ago (2010-05-07 10:06:00 UTC) #6
Lasse Reichstein
10 years, 7 months ago (2010-05-07 11:44:01 UTC) #7
http://codereview.chromium.org/1960001/diff/1/2
File src/runtime.cc (right):

http://codereview.chromium.org/1960001/diff/1/2#newcode7781
src/runtime.cc:7781: Handle<Object> key1 = args.at<Object>(1);
Whoops, my bad. Didn't read your rhs' properly (too used to seeing args[1]).

You could still use the macro, but only for consistency.

Powered by Google App Engine
This is Rietveld 408576698