Store JSGlobalProxy's identity hash directly on the proxy itself
authoradamk@chromium.org <adamk@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 5 May 2014 18:27:57 +0000 (18:27 +0000)
committeradamk@chromium.org <adamk@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 5 May 2014 18:27:57 +0000 (18:27 +0000)
commit3274485c507bd9c73e3cfe94fb00f9ce5325c7e7
tree8ff8e694fef1bbee9e47fcffd78f128430956a51
parentdde49c9dc3a9418866fe081387fc9749bac1b006
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

Review URL: https://codereview.chromium.org/254433002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/bootstrapper.cc
src/factory.cc
src/objects-inl.h
src/objects.cc
src/objects.h
test/cctest/test-api.cc