Reviewers: Toon Verwaest,
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
In order to keep Object.observe working on the global object, this patch
also reverts r20740 (without reverting that patch, Object.observe(global)
is broken after a global proxy is reattached).
Please review this at https://codereview.chromium.org/254433002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+85, -30 lines):
M src/bootstrapper.cc
M src/factory.cc
M src/object-observe.js
M src/objects.h
M src/objects.cc
M src/objects-inl.h
M src/runtime.h
M src/runtime.cc
M test/cctest/test-api.cc
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.