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

Issue 116533003: Avoid duplication of a hidden & inherited prototype's properties. (Closed)

Created:
7 years ago by sof
Modified:
6 years, 11 months ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@bleeding_edge
Visibility:
Public.

Description

Avoid duplication of a hidden & inherited prototype's properties. In Runtime_GetLocalPropertyNames(), the hidden prototypes of an object are also consulted when deriving the property name set. However, if given a function object and its template was inherited from the template of one of its hidden prototypes, that hidden prototype's property accessors will be present on the object already. Unwanted duplicates will therefore appear. Hence, go through the property names that the hidden prototypes contribute and remove any already occurring ones. Assumed to be a rare constellation, so the cost of this extra pass is considered acceptable. LOG=N R=dcarney@chromium.org, jochen@chromium.org, rossberg@chromium.org BUG=269562 Committed: https://code.google.com/p/v8/source/detail?r=18448

Patch Set 1 #

Patch Set 2 : Reuploaded #

Total comments: 3

Patch Set 3 : Follow v8 coding style #

Total comments: 5

Patch Set 4 : Rework to remove duplicates instead #

Patch Set 5 : Follow variable naming convention #

Total comments: 9

Patch Set 6 : Stub out duplicates using hidden string values instead #

Total comments: 4

Patch Set 7 : Verify that 'hidden strings' book-keeping matches up #

Total comments: 2

Patch Set 8 : Remove DEBUG protection #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -5 lines) Patch
M src/runtime.cc View 1 2 3 4 5 6 7 1 chunk +28 lines, -5 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
sof
Please take a look when you next have a spare moment. The overlap between hidden ...
7 years ago (2013-12-16 21:17:49 UTC) #1
jochen (gone - plz use gerrit)
looks sane https://codereview.chromium.org/116533003/diff/20001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/20001/src/runtime.cc#newcode5733 src/runtime.cc:5733: if (!constructor->IsJSFunction()) { nit. v8 style is ...
7 years ago (2013-12-17 15:00:53 UTC) #2
sof
On 2013/12/17 15:00:53, jochen wrote: > looks sane > > https://codereview.chromium.org/116533003/diff/20001/src/runtime.cc > File src/runtime.cc (right): ...
7 years ago (2013-12-17 15:34:40 UTC) #3
dcarney
https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc#newcode5749 src/runtime.cc:5749: !IsInheritedApiFunctionOf(obj, proto)) { filtering here is problematic as there ...
7 years ago (2013-12-19 19:46:12 UTC) #4
rossberg
I'm doubtful about this CL, see Dan's and my comments. I think the obvious solution ...
7 years ago (2013-12-20 12:54:54 UTC) #5
sof
On 2013/12/20 12:54:54, rossberg wrote: > I'm doubtful about this CL, see Dan's and my ...
7 years ago (2013-12-20 15:13:49 UTC) #6
sof
https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc#newcode5749 src/runtime.cc:5749: !IsInheritedApiFunctionOf(obj, proto)) { On 2013/12/19 19:46:12, dcarney wrote: > ...
7 years ago (2013-12-22 08:39:55 UTC) #7
dcarney
https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc#newcode5815 src/runtime.cc:5815: RUNTIME_ASSERT(names->get(j)->IsString()); I don't think these asserts are necessary, but ...
6 years, 12 months ago (2013-12-24 08:48:08 UTC) #8
dcarney
https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc#newcode5808 src/runtime.cc:5808: if (i > 0 && jsproto->map()->is_hidden_prototype()) { this should ...
6 years, 12 months ago (2013-12-26 13:26:58 UTC) #9
sof
https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/120001/src/runtime.cc#newcode5808 src/runtime.cc:5808: if (i > 0 && jsproto->map()->is_hidden_prototype()) { On 2013/12/26 ...
6 years, 12 months ago (2013-12-26 21:48:44 UTC) #10
dcarney
lgtm, if the comments below are addressed https://codereview.chromium.org/116533003/diff/180001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/180001/src/runtime.cc#newcode5815 src/runtime.cc:5815: String* name_from_hidden_proto ...
6 years, 12 months ago (2013-12-27 09:32:22 UTC) #11
sof
https://codereview.chromium.org/116533003/diff/180001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/180001/src/runtime.cc#newcode5846 src/runtime.cc:5846: if (name == isolate->heap()->hidden_string()) continue; On 2013/12/27 09:32:23, dcarney ...
6 years, 12 months ago (2013-12-27 10:52:42 UTC) #12
dcarney
looking good. https://codereview.chromium.org/116533003/diff/250001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/250001/src/runtime.cc#newcode5847 src/runtime.cc:5847: #ifdef DEBUG If the compiler doesn't complain ...
6 years, 12 months ago (2013-12-27 11:14:16 UTC) #13
sof
https://codereview.chromium.org/116533003/diff/250001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/116533003/diff/250001/src/runtime.cc#newcode5847 src/runtime.cc:5847: #ifdef DEBUG On 2013/12/27 11:14:17, dcarney wrote: > If ...
6 years, 12 months ago (2013-12-27 12:16:00 UTC) #14
dcarney
Great, thanks! I'm not around to be able to land this for a while. @rossberg, ...
6 years, 12 months ago (2013-12-27 12:39:56 UTC) #15
sof
On 2013/12/27 12:39:56, dcarney wrote: > Great, thanks! > I'm not around to be able ...
6 years, 12 months ago (2013-12-27 13:05:33 UTC) #16
jochen (gone - plz use gerrit)
Committed patchset #8 manually as r18448 (presubmit successful).
6 years, 11 months ago (2014-01-03 11:19:19 UTC) #17
sof
6 years, 11 months ago (2014-01-03 12:32:17 UTC) #18
Message was sent while issue was closed.
On 2014/01/03 11:19:19, jochen wrote:
> Committed patchset #8 manually as r18448 (presubmit successful).

Thanks

Powered by Google App Engine
This is Rietveld 408576698