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

Unified Diff: include/v8.h

Issue 14625003: expose AssertNoAllocation to api (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: state is now bool 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 ee49ca4349d804a15020c98d5c573012d35f2e7e..2bfda9d7207689c28bdc0366c1cf0474813acbdb 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3604,6 +3604,24 @@ class V8EXPORT PersistentHandleVisitor { // NOLINT
/**
+ * Asserts that no action is performed that could cause a handle's value
+ * to be modified. Useful when otherwise unsafe handle operations need to
+ * be performed.
+ */
+class V8EXPORT AssertNoGCScope {
+#ifndef DEBUG
+ V8_INLINE(AssertNoGCScope(Isolate* isolate)) {}
+#else
+ AssertNoGCScope(Isolate* isolate);
+ ~AssertNoGCScope();
+ private:
+ Isolate* isolate_;
+ bool last_state_;
+#endif
+};
+
+
+/**
* Container class for static utility functions.
*/
class V8EXPORT V8 {
« 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