Revision: 6525
Author: [email protected]
Date: Fri Jan 28 05:41:19 2011
Log: Clarify some details of global objects implementation.
Review URL: http://codereview.chromium.org/6386011
http://code.google.com/p/v8/source/detail?r=6525
Modified:
/branches/bleeding_edge/include/v8.h
=======================================
--- /branches/bleeding_edge/include/v8.h Wed Jan 19 03:16:23 2011
+++ /branches/bleeding_edge/include/v8.h Fri Jan 28 05:41:19 2011
@@ -3053,7 +3053,22 @@
*/
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();
/**
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev