v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 5036 | skipping to change at line 5036 | |||
const char** names_; | const char** names_; | |||
}; | }; | |||
/** | /** | |||
* A sandboxed execution context with its own set of built-in objects | * A sandboxed execution context with its own set of built-in objects | |||
* and functions. | * and functions. | |||
*/ | */ | |||
class V8_EXPORT Context { | class V8_EXPORT Context { | |||
public: | public: | |||
/** | /** | |||
* Returns the global proxy object. | * Returns the global proxy object or global object itself for | |||
* detached contexts. | ||||
* | * | |||
* Global proxy object is a thin wrapper whose prototype points to actual | * Global proxy object is a thin wrapper whose prototype points to | |||
* context's global object with the properties like Object, etc. This is | * actual context's global object with the properties like Object, etc. | |||
done | * This is done that way for security reasons (for more details see | |||
* that way for security reasons (for more details see | ||||
* https://wiki.mozilla.org/Gecko:SplitWindow). | * https://wiki.mozilla.org/Gecko:SplitWindow). | |||
* | * | |||
* Please note that changes to global proxy object prototype most probabl y | * Please note that changes to global proxy object prototype most probabl y | |||
* would break VM---v8 expects only global object as a prototype of globa | * would break VM---v8 expects only global object as a prototype of | |||
l | * global proxy object. | |||
* proxy object. | * | |||
* If DetachGlobal() has been invoked, Global() would return actual globa | ||||
l | ||||
* object until global is reattached with ReattachGlobal(). | ||||
*/ | */ | |||
Local<Object> Global(); | Local<Object> Global(); | |||
/** | /** | |||
* Detaches the global object from its context before | * Detaches the global object from its context before | |||
* the global object can be reused to create a new context. | * the global object can be reused to create a new context. | |||
*/ | */ | |||
void DetachGlobal(); | void DetachGlobal(); | |||
/** | /** | |||
* Reattaches a global object to a context. This can be used to | ||||
* restore the connection between a global object and a context | ||||
* after DetachGlobal has been called. | ||||
* | ||||
* \param global_object The global object to reattach to the | ||||
* context. For this to work, the global object must be the global | ||||
* object that was associated with this context before a call to | ||||
* DetachGlobal. | ||||
*/ | ||||
void ReattachGlobal(Handle<Object> global_object); | ||||
/** | ||||
* Creates a new context and returns a handle to the newly allocated | * Creates a new context and returns a handle to the newly allocated | |||
* context. | * context. | |||
* | * | |||
* \param isolate The isolate in which to create the context. | * \param isolate The isolate in which to create the context. | |||
* | * | |||
* \param extensions An optional extension configuration containing | * \param extensions An optional extension configuration containing | |||
* the extensions to be installed in the newly created context. | * the extensions to be installed in the newly created context. | |||
* | * | |||
* \param global_template An optional object template from which the | * \param global_template An optional object template from which the | |||
* global object for the newly created context will be created. | * global object for the newly created context will be created. | |||
End of changes. 4 change blocks. | ||||
8 lines changed or deleted | 23 lines changed or added | |||