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

Issue 7064027: Change calls to undefined property setters to not throw (fixes issue 1355). (Closed)

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

Description

Change calls to undefined property setters to not throw (fixes issue 1355). We currently throw when there is only a getter defined on the property, but this should only be the case in strict mode. Committed: http://code.google.com/p/v8/source/detail?r=8054

Patch Set 1 #

Total comments: 9

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -40 lines) Patch
M src/objects.h View 3 chunks +11 lines, -7 lines 0 comments Download
M src/objects.cc View 1 16 chunks +62 lines, -24 lines 0 comments Download
M test/mjsunit/getter-in-prototype.js View 1 2 2 chunks +27 lines, -7 lines 0 comments Download
M test/mjsunit/indexed-accessors.js View 1 chunk +3 lines, -2 lines 0 comments Download
A test/mjsunit/regress/regress-1355.js View 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Rico
9 years, 7 months ago (2011-05-24 15:05:26 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/7064027/diff/1/src/objects.cc File src/objects.cc (right): http://codereview.chromium.org/7064027/diff/1/src/objects.cc#newcode7474 src/objects.cc:7474: Object* setter = FixedArray::cast(structure)->get(kSetterIndex); Here I notice a ...
9 years, 7 months ago (2011-05-25 07:20:53 UTC) #2
Rico
Comments addressed http://codereview.chromium.org/7064027/diff/1/src/objects.cc File src/objects.cc (right): http://codereview.chromium.org/7064027/diff/1/src/objects.cc#newcode7474 src/objects.cc:7474: Object* setter = FixedArray::cast(structure)->get(kSetterIndex); On 2011/05/25 07:20:53, ...
9 years, 7 months ago (2011-05-25 07:59:28 UTC) #3
Lasse Reichstein
9 years, 7 months ago (2011-05-25 09:10:25 UTC) #4
http://codereview.chromium.org/7064027/diff/1/test/mjsunit/regress/regress-13...
File test/mjsunit/regress/regress-1355.js (right):

http://codereview.chromium.org/7064027/diff/1/test/mjsunit/regress/regress-13...
test/mjsunit/regress/regress-1355.js:44: assertThrows("shouldThrow()");
You can make a with around a strict function:
 with ({get foo() {}) {
   (function() { "use strict";
      foo = 42;
    })();
 }

Powered by Google App Engine
This is Rietveld 408576698