Clarify some details of global objects implementation.

Review URL: http://codereview.chromium.org/6386011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2011-01-28 13:41:19 +00:00
parent f8b74a1541
commit 3d4c4951aa

View File

@ -3053,7 +3053,22 @@ class V8EXPORT ExtensionConfiguration {
*/
class V8EXPORT Context {
public:
/** Returns the global object of the context. */
/**
* Returns the global proxy object or global object itself for
* detached contexts.
*
* Global proxy object is a thin wrapper whose prototype points to
* actual context's global object with the properties like Object, etc.
* This is done that way for security reasons (for more details see
* https://wiki.mozilla.org/Gecko:SplitWindow).
*
* Please note that changes to global proxy object prototype most probably
* would break VM---v8 expects only global object as a prototype of
* global proxy object.
*
* If DetachGlobal() has been invoked, Global() would return actual global
* object until global is reattached with ReattachGlobal().
*/
Local<Object> Global();
/**