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

Issue 254433002: Store JSGlobalProxy's identity hash directly on the proxy itself (Closed)

Created:
6 years, 8 months ago by adamk
Modified:
6 years, 7 months ago
Reviewers:
Toon Verwaest
CC:
v8-dev, rafaelw, arv (Not doing code reviews)
Visibility:
Public.

Description

Store JSGlobalProxy's identity hash directly on the proxy itself Previously, the hash was stored on the underlying global object, since it was stored in the hidden property table. This patch moves to an implementation modeled on JSProxy, adding a new 'hash' field to JSGlobalProxy. This allows storing the global proxy in a Map, Set, WeakMap, or WeakSet and accessing it even after the proxy has been attached to a new global, which is Firefox's current behavior and was the consensus of a recent thread on public-script-coord: http://lists.w3.org/Archives/Public/public-script-coord/2014AprJun/0012.html R=verwaest@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=21150

Patch Set 1 #

Patch Set 2 : Re-introduce %UnwrapProxy to make Object.observe work #

Total comments: 6

Patch Set 3 : Remove %UnwrapGlobalProxy #

Patch Set 4 : Merged to trunk, removed Object.observe workaround #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -30 lines) Patch
M src/bootstrapper.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M src/factory.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M src/objects.cc View 1 2 3 6 chunks +30 lines, -23 lines 0 comments Download
M src/objects-inl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
adamk
6 years, 8 months ago (2014-04-23 23:25:15 UTC) #1
Toon Verwaest
https://codereview.chromium.org/254433002/diff/20001/src/object-observe.js File src/object-observe.js (right): https://codereview.chromium.org/254433002/diff/20001/src/object-observe.js#newcode83 src/object-observe.js:83: key = %UnwrapGlobalProxy(key); I'd strongly prefer merging UnwrapGlobalProxy with ...
6 years, 7 months ago (2014-04-28 14:32:49 UTC) #2
adamk
https://codereview.chromium.org/254433002/diff/20001/src/object-observe.js File src/object-observe.js (right): https://codereview.chromium.org/254433002/diff/20001/src/object-observe.js#newcode83 src/object-observe.js:83: key = %UnwrapGlobalProxy(key); On 2014/04/28 14:32:50, Toon Verwaest wrote: ...
6 years, 7 months ago (2014-04-28 18:44:50 UTC) #3
Toon Verwaest
lgtm, thanks!
6 years, 7 months ago (2014-04-29 09:45:29 UTC) #4
adamk
Now that Object.observe never tries to hash the global proxy, this change goes back to ...
6 years, 7 months ago (2014-05-02 18:16:02 UTC) #5
adamk
On 2014/05/02 18:16:02, adamk wrote: > Now that Object.observe never tries to hash the global ...
6 years, 7 months ago (2014-05-02 18:16:28 UTC) #6
Toon Verwaest
Still LGTM. I don't see a security issue with this patch.
6 years, 7 months ago (2014-05-03 05:44:42 UTC) #7
adamk
On 2014/05/03 05:44:42, Toon Verwaest wrote: > Still LGTM. I don't see a security issue ...
6 years, 7 months ago (2014-05-05 18:16:08 UTC) #8
adamk
6 years, 7 months ago (2014-05-05 18:28:04 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 manually as r21150 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698