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

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: 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') | src/bootstrapper.cc » ('J')
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 8dabef0d5885448bfdd590c37f88ab4dfe8218a0..ef88564e194a5ccf76a958debf01b52dfd18dc9d 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3864,11 +3864,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.
@@ -3882,6 +3882,13 @@ 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. */
Sven Panne 2013/04/09 07:08:33 Perhaps add an explicit TODO for inserting V8_DEPR
Michael Starzinger 2013/04/09 13:29:18 Done.
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') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698