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

Issue 1573143002: Do not leak private property names to proxy traps and interceptors. (Closed)

Created:
4 years, 11 months ago by neis
Modified:
4 years, 11 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Do not leak private property names to proxy traps and interceptors. R=rossberg BUG= Committed: https://crrev.com/2b352bb84f0f2d21997c18cd361b95e905c39400 Cr-Commit-Position: refs/heads/master@{#33212}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 1

Patch Set 3 : Typo #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -2 lines) Patch
M src/lookup.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/messages.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.cc View 1 16 chunks +32 lines, -2 lines 1 comment Download
A test/mjsunit/harmony/private-symbols.js View 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
neis
4 years, 11 months ago (2016-01-11 15:15:58 UTC) #1
rossberg
https://codereview.chromium.org/1573143002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1573143002/diff/1/src/objects.cc#newcode4164 src/objects.cc:4164: NewTypeError(MessageTemplate::kIllegalInvocation)); Nit: Maybe use a more explicit error message? ...
4 years, 11 months ago (2016-01-11 15:43:22 UTC) #2
neis
See new patchset. https://codereview.chromium.org/1573143002/diff/1/test/mjsunit/harmony/private-symbols.js File test/mjsunit/harmony/private-symbols.js (right): https://codereview.chromium.org/1573143002/diff/1/test/mjsunit/harmony/private-symbols.js#newcode33 test/mjsunit/harmony/private-symbols.js:33: var proxy = new Proxy({}, new ...
4 years, 11 months ago (2016-01-11 16:00:04 UTC) #3
rossberg
lgtm https://codereview.chromium.org/1573143002/diff/20001/src/messages.h File src/messages.h (right): https://codereview.chromium.org/1573143002/diff/20001/src/messages.h#newcode260 src/messages.h:260: T(ProxyPrivate, "Cannot not pass private property name to ...
4 years, 11 months ago (2016-01-11 16:01:42 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1573143002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1573143002/40001
4 years, 11 months ago (2016-01-11 16:22:44 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-11 16:47:25 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/2b352bb84f0f2d21997c18cd361b95e905c39400 Cr-Commit-Position: refs/heads/master@{#33212}
4 years, 11 months ago (2016-01-11 16:47:34 UTC) #10
Jakob Kummerow
DBC. Wouldn't it be easier to put the checks into {Get,Set,Has,Delete}Private() in the API? AFAICS ...
4 years, 11 months ago (2016-01-11 17:40:27 UTC) #12
neis
4 years, 11 months ago (2016-01-13 09:03:35 UTC) #13
Message was sent while issue was closed.
On 2016/01/11 17:40:27, Jakob wrote:
> DBC.
> 
> Wouldn't it be easier to put the checks into {Get,Set,Has,Delete}Private() in
> the API? AFAICS those are the only possible entry points for private symbols
> into the system. (The unit test in this CL isn't representative, because as
soon
> as there's a "var symbol" on the JS side that contains a private symbol you've
> lost anyway and all bets are off, with or without Proxy traps. So a cctest
would
> be more appropriate, I think.)
> 
> Or am I missing something?

As far as I understand, private symbols are also used internally e.g. in the
implementation of iterators (see testGetInternalIterators() in
mjsunit/harmony/proxies-get.js).


> https://codereview.chromium.org/1573143002/diff/40001/src/objects.cc
> File src/objects.cc (right):
> 
>
https://codereview.chromium.org/1573143002/diff/40001/src/objects.cc#newcode4872
> src/objects.cc:4872: if (name->IsPrivate()) return Just(false);
> According to the DCHECK above, this can never be the case here.

Yep, thanks.

Powered by Google App Engine
This is Rietveld 408576698