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

Side by Side Diff: include/v8.h

Issue 6386011: Clarify some details of global objects implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3035 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 const char** names_; 3046 const char** names_;
3047 }; 3047 };
3048 3048
3049 3049
3050 /** 3050 /**
3051 * A sandboxed execution context with its own set of built-in objects 3051 * A sandboxed execution context with its own set of built-in objects
3052 * and functions. 3052 * and functions.
3053 */ 3053 */
3054 class V8EXPORT Context { 3054 class V8EXPORT Context {
3055 public: 3055 public:
3056 /** Returns the global object of the context. */ 3056 /**
3057 * Returns the global proxy object.
3058 *
3059 * Global proxy object is a thin wrapper whose prototype points to
3060 * actual context's global object with the properties like Object, etc.
3061 * This is done that way for security reasons (for more details see
3062 * https://wiki.mozilla.org/Gecko:SplitWindow).
3063 *
3064 * Please note that changes to global proxy object prototype most probably
3065 * would break VM---v8 expects only global object as a prototype of
3066 * global proxy object.
3067 */
3057 Local<Object> Global(); 3068 Local<Object> Global();
3058 3069
3059 /** 3070 /**
3060 * Detaches the global object from its context before 3071 * Detaches the global object from its context before
3061 * the global object can be reused to create a new context. 3072 * the global object can be reused to create a new context.
3062 */ 3073 */
3063 void DetachGlobal(); 3074 void DetachGlobal();
3064 3075
3065 /** 3076 /**
3066 * Reattaches a global object to a context. This can be used to 3077 * Reattaches a global object to a context. This can be used to
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
3823 3834
3824 3835
3825 } // namespace v8 3836 } // namespace v8
3826 3837
3827 3838
3828 #undef V8EXPORT 3839 #undef V8EXPORT
3829 #undef TYPE_CHECK 3840 #undef TYPE_CHECK
3830 3841
3831 3842
3832 #endif // V8_H_ 3843 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698