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

Unified Diff: include/v8.h

Issue 13799003: Change Context::New not create persistent handles. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adapted cctest initialization to new API. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index ede5b56ea26148a5c6263ad644b455b2f1daf46f..a43446639749441a888509ee2f81ac97f5efded0 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3867,11 +3867,11 @@ class V8EXPORT Context {
*/
void ReattachGlobal(Handle<Object> global_object);
- /** Creates a new context.
+ /**
+ * Creates a new context and returns a handle to the newly allocated
+ * context.
*
- * Returns a persistent handle to the newly allocated context. This
- * persistent handle has to be disposed when the context is no
- * longer used so the context can be garbage collected.
+ * \param isolate The isolate in which to create the context.
*
* \param extensions An optional extension configuration containing
* the extensions to be installed in the newly created context.
@@ -3885,6 +3885,14 @@ class V8EXPORT Context {
* template. The state of the global object will be completely reset
* and only object identify will remain.
*/
+ static Local<Context> New(
+ Isolate* isolate,
+ ExtensionConfiguration* extensions = NULL,
+ Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
+ Handle<Value> global_object = Handle<Value>());
+
+ /** Deprecated. Use Isolate version instead. */
+ // TODO(mstarzinger): Put this behind the V8_DEPRECATED guard.
static Persistent<Context> New(
ExtensionConfiguration* extensions = NULL,
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(),
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698