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

Issue 6712059: Follow jsc on not throwing when trying to add a property to a non-extensible object. (Closed)

Created:
9 years, 9 months ago by Rico
Modified:
9 years, 6 months ago
Reviewers:
MarkM, Martin Maly
CC:
v8-dev
Visibility:
Public.

Description

Follow jsc on not throwing when trying to add a property to a non-extensible object. This change makes us compatible with Safari on not throwing when trying to add a property to a non-extensible object. Committed: http://code.google.com/p/v8/source/detail?r=7379

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -95 lines) Patch
M src/objects.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.cc View 5 chunks +24 lines, -14 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +1 line, -3 lines 0 comments Download
M test/mjsunit/object-freeze.js View 3 chunks +5 lines, -13 lines 0 comments Download
M test/mjsunit/object-prevent-extensions.js View 6 chunks +9 lines, -50 lines 0 comments Download
M test/mjsunit/object-seal.js View 2 chunks +4 lines, -13 lines 0 comments Download
M test/mjsunit/regress/regress-create-exception.js View 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/strict-mode.js View 1 chunk +2 lines, -1 line 1 comment Download

Messages

Total messages: 3 (0 generated)
Rico
Martin, please especially notice my change to test/mjsunit/strict-mode.js I think this is right since the ...
9 years, 9 months ago (2011-03-21 14:25:32 UTC) #1
MarkM
For non-strict code, this testing change seems correct. Non-strict code should indeed not throw on ...
9 years, 9 months ago (2011-03-21 15:38:08 UTC) #2
Martin Maly
9 years, 9 months ago (2011-03-21 20:38:35 UTC) #3
LGTM, feel free to use or discard my comment below.

Cheers!
Martin

http://codereview.chromium.org/6712059/diff/1/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):

http://codereview.chromium.org/6712059/diff/1/test/mjsunit/strict-mode.js#new...
test/mjsunit/strict-mode.js:987: assertEquals(pill.value, undefined);
This is alright. We could also have:

assertThrows(function() { 'use strict'; pill.property = "value"; }, TypeError);

either instead or in addition to your check. I am fine with either option. The
paranoid me would go for both :)

Powered by Google App Engine
This is Rietveld 408576698