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

Unified Diff: include/v8.h

Issue 14150017: Change cctest/test-lockers to not copy persistent handles around. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 | test/cctest/test-lockers.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 8efb7c33c532f714277680ab503f4025fe233d80..c85e71a3a2ed756cae1f39718ce57ac37e49f0db 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -377,6 +377,14 @@ template <class T> class Persistent : public Handle<T> {
template <class S> V8_INLINE(Persistent(S* that)) : Handle<T>(that) { }
/**
+ * A constructor that creates a new global cell pointing to that. In contrast
+ * to the copy constructor, this creates a new persistent handle which needs
+ * to be separately disposed.
+ */
+ template <class S> V8_INLINE(Persistent(Isolate* isolate, Handle<S> that))
+ : Handle<T>(New(isolate, that)) { }
+
+ /**
* "Casts" a plain handle which is known to be a persistent handle
* to a persistent handle.
*/
« no previous file with comments | « no previous file | test/cctest/test-lockers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698